CMS 3D CMS Logo

Phase2TrackerValidateDigi.h
Go to the documentation of this file.
1 #ifndef Phase2TrackerValidateDigi_h
2 #define Phase2TrackerValidateDigi_h
3 
8 
18 
19 // DQM Histograming
20 class PixelDigiSimLink;
21 class SimTrack;
22 class SimHit;
23 class TrackerTopology;
24 class PixelDigi;
25 class Phase2TrackerDigi;
26 class TrackerGeometry;
28 class TrackerTopologyRcd;
30 public:
32  ~Phase2TrackerValidateDigi() override;
33  void bookHistograms(DQMStore::IBooker& ibooker, edm::Run const& iRun, edm::EventSetup const& iSetup) override;
34  void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
35  void dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) override;
36  std::string getHistoId(uint32_t det_id, bool flag);
37 
38  struct DigiMEs {
62  int nHits;
63  int nDigis;
64  };
65 
66 private:
70 
72 
76 
80 
84 
87 
90 
95 
97  float etaCut_;
98  float ptCut_;
99  float tofUpperCut_;
101 
102  void bookLayerHistos(DQMStore::IBooker& ibooker, unsigned int det_id, bool flag);
103  unsigned int getSimTrackId(const edm::DetSetVector<PixelDigiSimLink>* simLinks,
104  const DetId& detId,
105  unsigned int& channel);
106  int matchedSimTrack(edm::Handle<edm::SimTrackContainer>& SimTk, unsigned int simTrkId);
107  bool isPrimary(const SimTrack& simTrk, const PSimHit& simHit);
108 
109  void fillHistogram(MonitorElement* th1, MonitorElement* th2, MonitorElement* th3, float val, int primary);
110  int fillSimHitInfo(const edm::Event& iEvent, const SimTrack simTrk);
111  bool findOTDigi(unsigned int detid, unsigned int id);
112  bool findITPixelDigi(unsigned int detid, unsigned int id);
113  void fillOTBXInfo();
114  void fillITPixelBXInfo();
115  void fillHitsPerTrack();
116 
118  std::map<std::string, DigiMEs> layerMEs;
119 
122 
127  std::vector<edm::InputTag> pSimHitSrc_;
130 
137  std::vector<edm::EDGetTokenT<edm::PSimHitContainer> > simHitTokens_;
138 
148  const TrackerGeometry* tkGeom_ = nullptr;
149  const TrackerTopology* tTopo_ = nullptr;
150 
151  const float GeVperElectron; // 3.7E-09
152  const float cval; // cm/ns
153 };
154 #endif
Phase2TrackerValidateDigi::nSimHitsPerTrack
MonitorElement * nSimHitsPerTrack
Definition: Phase2TrackerValidateDigi.h:96
Phase2TrackerValidateDigi::GeVperElectron
const float GeVperElectron
Definition: Phase2TrackerValidateDigi.h:151
edm::DetSetVector
Definition: DetSetVector.h:61
Phase2TrackerValidateDigi::DigiMEs::MatchedTrackEta
MonitorElement * MatchedTrackEta
Definition: Phase2TrackerValidateDigi.h:44
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
Handle.h
Phase2TrackerValidateDigi::DigiMEs::MissedHitTrackPhi
MonitorElement * MissedHitTrackPhi
Definition: Phase2TrackerValidateDigi.h:46
Phase2TrackerValidateDigi::getSimTrackId
unsigned int getSimTrackId(const edm::DetSetVector< PixelDigiSimLink > *simLinks, const DetId &detId, unsigned int &channel)
Definition: Phase2TrackerValidateDigi.cc:906
EDAnalyzer.h
Phase2TrackerValidateDigi::MatchedRZPositionMap
MonitorElement * MatchedRZPositionMap
Definition: Phase2TrackerValidateDigi.h:89
Phase2TrackerValidateDigi::getHistoId
std::string getHistoId(uint32_t det_id, bool flag)
Definition: Phase2TrackerValidateDigi.cc:1058
Phase2TrackerValidateDigi::DigiMEs::MatchedTrackPt
MonitorElement * MatchedTrackPt
Definition: Phase2TrackerValidateDigi.h:42
ESHandle.h
Phase2TrackerValidateDigi::matchedSimTrack
int matchedSimTrack(edm::Handle< edm::SimTrackContainer > &SimTk, unsigned int simTrkId)
Definition: Phase2TrackerValidateDigi.cc:1002
Phase2TrackerValidateDigi::SimulatedTrackPtP
MonitorElement * SimulatedTrackPtP
Definition: Phase2TrackerValidateDigi.h:77
edm::Run
Definition: Run.h:45
Phase2TrackerValidateDigi::~Phase2TrackerValidateDigi
~Phase2TrackerValidateDigi() override
Definition: Phase2TrackerValidateDigi.cc:85
edm::EDGetTokenT
Definition: EDGetToken.h:33
Phase2TrackerValidateDigi::simHitTokens_
std::vector< edm::EDGetTokenT< edm::PSimHitContainer > > simHitTokens_
Definition: Phase2TrackerValidateDigi.h:137
TrackerTopology
Definition: TrackerTopology.h:16
Phase2TrackerValidateDigi::DigiMEs
Definition: Phase2TrackerValidateDigi.h:38
PSimHitContainer.h
PixelDigi
Definition: PixelDigi.h:14
Phase2TrackerValidateDigi::fillSimHitInfo
int fillSimHitInfo(const edm::Event &iEvent, const SimTrack simTrk)
Definition: Phase2TrackerValidateDigi.cc:195
Phase2TrackerValidateDigi::otDigiHandle_
edm::Handle< edm::DetSetVector< Phase2TrackerDigi > > otDigiHandle_
Definition: Phase2TrackerValidateDigi.h:140
Phase2TrackerValidateDigi::DigiMEs::MissedDigiTrackPhi
MonitorElement * MissedDigiTrackPhi
Definition: Phase2TrackerValidateDigi.h:49
Phase2TrackerValidateDigi::simVertexSrc_
edm::InputTag simVertexSrc_
Definition: Phase2TrackerValidateDigi.h:129
DQMStore.h
Phase2TrackerValidateDigi::DigiMEs::MatchedTrackPhi
MonitorElement * MatchedTrackPhi
Definition: Phase2TrackerValidateDigi.h:43
Phase2TrackerValidateDigi::DigiMEs::MatchedSimHitElossS
MonitorElement * MatchedSimHitElossS
Definition: Phase2TrackerValidateDigi.h:54
Phase2TrackerValidateDigi::DigiMEs::SimHitDx
MonitorElement * SimHitDx
Definition: Phase2TrackerValidateDigi.h:55
Phase2TrackerValidateDigi::tofLowerCut_
float tofLowerCut_
Definition: Phase2TrackerValidateDigi.h:100
Phase2TrackerValidateDigi::DigiMEs::SimHitDz
MonitorElement * SimHitDz
Definition: Phase2TrackerValidateDigi.h:57
Phase2TrackerValidateDigi::DigiMEs::BunchXTimeBin
MonitorElement * BunchXTimeBin
Definition: Phase2TrackerValidateDigi.h:58
edm::Handle< edm::SimTrackContainer >
Phase2TrackerValidateDigi::itPixelDigiHandle_
edm::Handle< edm::DetSetVector< PixelDigi > > itPixelDigiHandle_
Definition: Phase2TrackerValidateDigi.h:139
Phase2TrackerValidateDigi::cval
const float cval
Definition: Phase2TrackerValidateDigi.h:152
Phase2TrackerValidateDigi::SimulatedTOFZMap
MonitorElement * SimulatedTOFZMap
Definition: Phase2TrackerValidateDigi.h:94
Phase2TrackerValidateDigi::geomType_
std::string geomType_
Definition: Phase2TrackerValidateDigi.h:121
Phase2TrackerValidateDigi::tkGeom_
const TrackerGeometry * tkGeom_
Definition: Phase2TrackerValidateDigi.h:148
DetId
Definition: DetId.h:17
Phase2TrackerValidateDigi::SimulatedTOFPhiMap
MonitorElement * SimulatedTOFPhiMap
Definition: Phase2TrackerValidateDigi.h:92
Phase2TrackerValidateDigi::findITPixelDigi
bool findITPixelDigi(unsigned int detid, unsigned int id)
Definition: Phase2TrackerValidateDigi.cc:348
Phase2TrackerValidateDigi::SimulatedTOFRMap
MonitorElement * SimulatedTOFRMap
Definition: Phase2TrackerValidateDigi.h:93
Phase2TrackerValidateDigi
Definition: Phase2TrackerValidateDigi.h:29
Phase2TrackerValidateDigi::simVertexToken_
const edm::EDGetTokenT< edm::SimVertexContainer > simVertexToken_
Definition: Phase2TrackerValidateDigi.h:136
Phase2TrackerValidateDigi::topoToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Definition: Phase2TrackerValidateDigi.h:147
rpcPointValidation_cfi.simHit
simHit
Definition: rpcPointValidation_cfi.py:24
Phase2TrackerValidateDigi::otDigiSrc_
edm::InputTag otDigiSrc_
Definition: Phase2TrackerValidateDigi.h:123
Phase2TrackerValidateDigi::SimulatedTrackPhiP
MonitorElement * SimulatedTrackPhiP
Definition: Phase2TrackerValidateDigi.h:79
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
Phase2TrackerValidateDigi::isPrimary
bool isPrimary(const SimTrack &simTrk, const PSimHit &simHit)
Definition: Phase2TrackerValidateDigi.cc:1014
Phase2TrackerValidateDigi::layerMEs
std::map< std::string, DigiMEs > layerMEs
Definition: Phase2TrackerValidateDigi.h:118
Phase2TrackerValidateDigi::nSimVertices
MonitorElement * nSimVertices
Definition: Phase2TrackerValidateDigi.h:71
Phase2TrackerValidateDigi::SimulatedTrackPtS
MonitorElement * SimulatedTrackPtS
Definition: Phase2TrackerValidateDigi.h:81
Phase2TrackerValidateDigi::DigiMEs::MissedDigiSimHitElossS
MonitorElement * MissedDigiSimHitElossS
Definition: Phase2TrackerValidateDigi.h:52
Phase2TrackerValidateDigi::DigiMEs::MissedHitTrackEta
MonitorElement * MissedHitTrackEta
Definition: Phase2TrackerValidateDigi.h:47
Phase2TrackerValidateDigi::fillOTBXInfo
void fillOTBXInfo()
Definition: Phase2TrackerValidateDigi.cc:927
Phase2TrackerValidateDigi::Phase2TrackerValidateDigi
Phase2TrackerValidateDigi(const edm::ParameterSet &)
Definition: Phase2TrackerValidateDigi.cc:50
Phase2TrackerValidateDigi::simTrackToken_
const edm::EDGetTokenT< edm::SimTrackContainer > simTrackToken_
Definition: Phase2TrackerValidateDigi.h:135
Phase2TrackerValidateDigi::DigiMEs::FractionOfOOTDigis
MonitorElement * FractionOfOOTDigis
Definition: Phase2TrackerValidateDigi.h:59
Phase2TrackerValidateDigi::DigiMEs::MissedDigiTimeWindow
MonitorElement * MissedDigiTimeWindow
Definition: Phase2TrackerValidateDigi.h:61
Phase2TrackerValidateDigi::DigiMEs::MissedDigiTrackPt
MonitorElement * MissedDigiTrackPt
Definition: Phase2TrackerValidateDigi.h:48
Phase2TrackerValidateDigi::DigiMEs::SimHitDy
MonitorElement * SimHitDy
Definition: Phase2TrackerValidateDigi.h:56
Phase2TrackerValidateDigi::SimulatedRZPositionMap
MonitorElement * SimulatedRZPositionMap
Definition: Phase2TrackerValidateDigi.h:86
Phase2TrackerValidateDigi::nSimulatedTracks
MonitorElement * nSimulatedTracks
Definition: Phase2TrackerValidateDigi.h:67
Phase2TrackerValidateDigi::pixelFlag_
bool pixelFlag_
Definition: Phase2TrackerValidateDigi.h:120
DQMEDAnalyzer.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Phase2TrackerValidateDigi::SimulatedTrackEtaP
MonitorElement * SimulatedTrackEtaP
Definition: Phase2TrackerValidateDigi.h:78
Phase2TrackerValidateDigi::MatchedXYPositionMap
MonitorElement * MatchedXYPositionMap
Definition: Phase2TrackerValidateDigi.h:88
Phase2TrackerValidateDigi::DigiMEs::MissedHitTrackPt
MonitorElement * MissedHitTrackPt
Definition: Phase2TrackerValidateDigi.h:45
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
Phase2TrackerValidateDigi::SimulatedTOFEtaMap
MonitorElement * SimulatedTOFEtaMap
Definition: Phase2TrackerValidateDigi.h:91
Phase2TrackerValidateDigi::fillITPixelBXInfo
void fillITPixelBXInfo()
Definition: Phase2TrackerValidateDigi.cc:963
Phase2TrackerValidateDigi::DigiMEs::nDigis
int nDigis
Definition: Phase2TrackerValidateDigi.h:63
Phase2TrackerValidateDigi::otDigiToken_
const edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > otDigiToken_
Definition: Phase2TrackerValidateDigi.h:131
Phase2TrackerValidateDigi::SimulatedTrackEta
MonitorElement * SimulatedTrackEta
Definition: Phase2TrackerValidateDigi.h:74
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
Phase2TrackerValidateDigi::SimulatedTrackPhiS
MonitorElement * SimulatedTrackPhiS
Definition: Phase2TrackerValidateDigi.h:83
Phase2TrackerValidateDigi::DigiMEs::SimTrackPhi
MonitorElement * SimTrackPhi
Definition: Phase2TrackerValidateDigi.h:41
Phase2TrackerValidateDigi::SimulatedTrackEtaS
MonitorElement * SimulatedTrackEtaS
Definition: Phase2TrackerValidateDigi.h:82
Phase2TrackerValidateDigi::otDigiSimLinkSrc_
edm::InputTag otDigiSimLinkSrc_
Definition: Phase2TrackerValidateDigi.h:124
Phase2TrackerValidateDigi::simTrackSrc_
edm::InputTag simTrackSrc_
Definition: Phase2TrackerValidateDigi.h:128
Phase2TrackerValidateDigi::analyze
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition: Phase2TrackerValidateDigi.cc:108
iEvent
int iEvent
Definition: GenABIO.cc:224
Phase2TrackerValidateDigi::dqmBeginRun
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
Definition: Phase2TrackerValidateDigi.cc:92
Phase2TrackerValidateDigi::itPixelDigiToken_
const edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > itPixelDigiToken_
Definition: Phase2TrackerValidateDigi.h:133
Phase2TrackerValidateDigi::pSimHitSrc_
std::vector< edm::InputTag > pSimHitSrc_
Definition: Phase2TrackerValidateDigi.h:127
Phase2TrackerValidateDigi::itPixelDigiSimLinkToken_
const edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > itPixelDigiSimLinkToken_
Definition: Phase2TrackerValidateDigi.h:134
Phase2TrackerValidateDigi::nSimulatedTracksP
MonitorElement * nSimulatedTracksP
Definition: Phase2TrackerValidateDigi.h:68
Phase2TrackerValidateDigi::DigiMEs::MissedDigiLocalXposVsYPos
MonitorElement * MissedDigiLocalXposVsYPos
Definition: Phase2TrackerValidateDigi.h:60
Phase2TrackerValidateDigi::otSimLinkHandle_
edm::Handle< edm::DetSetVector< PixelDigiSimLink > > otSimLinkHandle_
Definition: Phase2TrackerValidateDigi.h:142
edm::EventSetup
Definition: EventSetup.h:57
Phase2TrackerValidateDigi::DigiMEs::SimTrackEta
MonitorElement * SimTrackEta
Definition: Phase2TrackerValidateDigi.h:40
DetSetVector.h
Phase2TrackerValidateDigi::bookLayerHistos
void bookLayerHistos(DQMStore::IBooker &ibooker, unsigned int det_id, bool flag)
Definition: Phase2TrackerValidateDigi.cc:640
Phase2TrackerValidateDigi::DigiMEs::SimTrackPt
MonitorElement * SimTrackPt
Definition: Phase2TrackerValidateDigi.h:39
Phase2TrackerValidateDigi::SimulatedTrackPhi
MonitorElement * SimulatedTrackPhi
Definition: Phase2TrackerValidateDigi.h:75
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord >
Phase2TrackerValidateDigi::DigiMEs::MissedDigiSimHitElossP
MonitorElement * MissedDigiSimHitElossP
Definition: Phase2TrackerValidateDigi.h:51
Phase2TrackerValidateDigi::nSimulatedTracksS
MonitorElement * nSimulatedTracksS
Definition: Phase2TrackerValidateDigi.h:69
Phase2TrackerValidateDigi::fillHitsPerTrack
void fillHitsPerTrack()
Phase2TrackerValidateDigi::ptCut_
float ptCut_
Definition: Phase2TrackerValidateDigi.h:98
Phase2TrackerValidateDigi::tTopo_
const TrackerTopology * tTopo_
Definition: Phase2TrackerValidateDigi.h:149
Phase2TrackerDigi
Definition: Phase2TrackerDigi.h:12
Phase2TrackerValidateDigi::DigiMEs::MatchedSimHitElossP
MonitorElement * MatchedSimHitElossP
Definition: Phase2TrackerValidateDigi.h:53
Phase2TrackerValidateDigi::simVertices
edm::Handle< edm::SimVertexContainer > simVertices
Definition: Phase2TrackerValidateDigi.h:145
heppy_batch.val
val
Definition: heppy_batch.py:351
Phase2TrackerValidateDigi::simHits
edm::Handle< edm::PSimHitContainer > simHits
Definition: Phase2TrackerValidateDigi.h:143
Phase2TrackerValidateDigi::bookHistograms
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
Definition: Phase2TrackerValidateDigi.cc:371
DetId.h
SimTrack
Definition: SimTrack.h:6
Frameworkfwd.h
Phase2TrackerValidateDigi::itPixelSimLinkHandle_
edm::Handle< edm::DetSetVector< PixelDigiSimLink > > itPixelSimLinkHandle_
Definition: Phase2TrackerValidateDigi.h:141
Phase2TrackerValidateDigi::fillHistogram
void fillHistogram(MonitorElement *th1, MonitorElement *th2, MonitorElement *th3, float val, int primary)
Definition: Phase2TrackerValidateDigi.cc:1028
Phase2TrackerValidateDigi::DigiMEs::nHits
int nHits
Definition: Phase2TrackerValidateDigi.h:62
dqm::implementation::IBooker
Definition: DQMStore.h:43
Phase2TrackerValidateDigi::itPixelDigiSimLinkSrc_
edm::InputTag itPixelDigiSimLinkSrc_
Definition: Phase2TrackerValidateDigi.h:126
Phase2TrackerValidateDigi::DigiMEs::MissedDigiTrackEta
MonitorElement * MissedDigiTrackEta
Definition: Phase2TrackerValidateDigi.h:50
Phase2TrackerValidateDigi::etaCut_
float etaCut_
Definition: Phase2TrackerValidateDigi.h:97
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
Phase2TrackerValidateDigi::SimulatedTrackPt
MonitorElement * SimulatedTrackPt
Definition: Phase2TrackerValidateDigi.h:73
ParameterSet.h
Phase2TrackerValidateDigi::config_
edm::ParameterSet config_
Definition: Phase2TrackerValidateDigi.h:117
PSimHit
Definition: PSimHit.h:15
Phase2TrackerValidateDigi::SimulatedXYPositionMap
MonitorElement * SimulatedXYPositionMap
Definition: Phase2TrackerValidateDigi.h:85
edm::Event
Definition: Event.h:73
Phase2TrackerValidateDigi::otDigiSimLinkToken_
const edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > otDigiSimLinkToken_
Definition: Phase2TrackerValidateDigi.h:132
Phase2TrackerValidateDigi::findOTDigi
bool findOTDigi(unsigned int detid, unsigned int id)
Definition: Phase2TrackerValidateDigi.cc:329
Phase2TrackerValidateDigi::itPixelDigiSrc_
edm::InputTag itPixelDigiSrc_
Definition: Phase2TrackerValidateDigi.h:125
SimTrackContainer.h
edm::InputTag
Definition: InputTag.h:15
SimVertexContainer.h
Phase2TrackerValidateDigi::simTracks
edm::Handle< edm::SimTrackContainer > simTracks
Definition: Phase2TrackerValidateDigi.h:144
Phase2TrackerValidateDigi::geomToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition: Phase2TrackerValidateDigi.h:146
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
Phase2TrackerValidateDigi::tofUpperCut_
float tofUpperCut_
Definition: Phase2TrackerValidateDigi.h:99
TrackerGeometry
Definition: TrackerGeometry.h:14