Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phase2 IT RechHit DQM and Validation modules #31666

Merged
merged 12 commits into from
Oct 13, 2020
60 changes: 60 additions & 0 deletions DQM/SiTrackerPhase2/interface/TrackerPhase2DQMUtil.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#ifndef _DQM_SiTrackerPhase2_Phase2TrackerValidationUtil_h
#define _DQM_SiTrackerPhase2_Phase2TrackerValidationUtil_h
#include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include <string>
#include <sstream>

namespace phase2tkutil {

std::string getITHistoId(uint32_t det_id, const TrackerTopology* tTopo);
std::string getOTHistoId(uint32_t det_id, const TrackerTopology* tTopo);

typedef dqm::reco::MonitorElement MonitorElement;
typedef dqm::reco::DQMStore DQMStore;
MonitorElement* book1DFromPSet(const edm::ParameterSet& hpars, const std::string& hname, DQMStore::IBooker& ibooker) {
MonitorElement* temp = nullptr;
if (hpars.getParameter<bool>("switch")) {
temp = ibooker.book1D(hpars.getParameter<std::string>("name"),
hpars.getParameter<std::string>("title"),
hpars.getParameter<int32_t>("NxBins"),
hpars.getParameter<double>("xmin"),
hpars.getParameter<double>("xmax"));
}
return temp;
}

MonitorElement* book2DFromPSet(const edm::ParameterSet& hpars, const std::string& hname, DQMStore::IBooker& ibooker) {
MonitorElement* temp = nullptr;
if (hpars.getParameter<bool>("switch")) {
temp = ibooker.book2D(hpars.getParameter<std::string>("name"),
hpars.getParameter<std::string>("title"),
hpars.getParameter<int32_t>("NxBins"),
hpars.getParameter<double>("xmin"),
hpars.getParameter<double>("xmax"),
hpars.getParameter<int32_t>("NyBins"),
hpars.getParameter<double>("ymin"),
hpars.getParameter<double>("ymax"));
}
return temp;
}

MonitorElement* bookProfile1DFromPSet(const edm::ParameterSet& hpars,
const std::string& hname,
DQMStore::IBooker& ibooker) {
MonitorElement* temp = nullptr;
if (hpars.getParameter<bool>("switch")) {
temp = ibooker.bookProfile(hpars.getParameter<std::string>("name"),
hpars.getParameter<std::string>("title"),
hpars.getParameter<int32_t>("NxBins"),
hpars.getParameter<double>("xmin"),
hpars.getParameter<double>("xmax"),
hpars.getParameter<double>("ymin"),
hpars.getParameter<double>("ymax"));
}
return temp;
}
} // namespace phase2tkutil
#endif
4 changes: 3 additions & 1 deletion DQM/SiTrackerPhase2/plugins/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<use name="FWCore/Framework"/>
<use name="FWCore/ParameterSet"/>
<use name="DataFormats/SiPixelDigi"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/DetId"/>
<use name="DataFormats/TrackerRecHit2D"/>
<use name="Geometry/Records"/>
<use name="Geometry/CommonDetUnit"/>
<use name="Geometry/TrackerGeometryBuilder"/>
<use name="DQMServices/Core"/>
<use name="DataFormats/Common"/>
<use name="DQM/SiTrackerPhase2"/>
<use name="boost_system"/>
<use name="rootcling"/>
<flags EDM_PLUGIN="1"/>
Loading