Skip to content

Commit

Permalink
Merge pull request #31666 from sroychow/phase2ITrechit
Browse files Browse the repository at this point in the history
Phase2 IT RechHit DQM and Validation modules
  • Loading branch information
cmsbuild authored Oct 13, 2020
2 parents 432c4f5 + 49ac5cf commit bf0befb
Show file tree
Hide file tree
Showing 15 changed files with 1,252 additions and 11 deletions.
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

0 comments on commit bf0befb

Please sign in to comment.