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 
112  bool findOTDigi(unsigned int detid, unsigned int id);
113 
114  bool findITPixelDigi(unsigned int detid, unsigned int id);
115  void fillOTBXInfo();
116  void fillITPixelBXInfo();
117  void fillHitsPerTrack();
118 
120  std::map<std::string, DigiMEs> layerMEs;
121 
124 
129  std::vector<edm::InputTag> pSimHitSrc_;
132 
143  std::vector<edm::EDGetTokenT<edm::PSimHitContainer>> simHitTokens_;
149  const TrackerGeometry* tkGeom_ = nullptr;
150  const TrackerTopology* tTopo_ = nullptr;
151 
152  const float GeVperElectron; // 3.7E-09
153  const float cval; // cm/ns
154 };
155 #endif
const edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > otDigiToken_
edm::Handle< edm::SimTrackContainer > simTracks
bool isPrimary(const SimTrack &simTrk, const PSimHit &simHit)
const edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > itPixelDigiSimLinkToken_
bool findOTDigi(unsigned int detid, unsigned int id)
const edm::DetSetVector< PixelDigiSimLink > * itSimLink_
int matchedSimTrack(edm::Handle< edm::SimTrackContainer > &SimTk, unsigned int simTrkId)
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
std::vector< edm::InputTag > pSimHitSrc_
const edm::EDGetTokenT< edm::SimVertexContainer > simVertexToken_
unsigned int getSimTrackId(const edm::DetSetVector< PixelDigiSimLink > *simLinks, const DetId &detId, unsigned int &channel)
std::map< std::string, DigiMEs > layerMEs
int iEvent
Definition: GenABIO.cc:224
bool findITPixelDigi(unsigned int detid, unsigned int id)
edm::Handle< edm::PSimHitContainer > simHits
std::vector< edm::EDGetTokenT< edm::PSimHitContainer > > simHitTokens_
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
void fillHistogram(MonitorElement *th1, MonitorElement *th2, MonitorElement *th3, float val, int primary)
void bookLayerHistos(DQMStore::IBooker &ibooker, unsigned int det_id, bool flag)
const edm::DetSetVector< PixelDigi > * itdigis_
edm::Handle< edm::SimVertexContainer > simVertices
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Definition: DetId.h:17
const edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > itPixelDigiToken_
int fillSimHitInfo(const edm::Event &iEvent, const SimTrack simTrk)
const edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > otDigiSimLinkToken_
const edm::DetSetVector< PixelDigiSimLink > * otSimLink_
Phase2TrackerValidateDigi(const edm::ParameterSet &)
const edm::EDGetTokenT< edm::SimTrackContainer > simTrackToken_
std::string getHistoId(uint32_t det_id, bool flag)
const edm::DetSetVector< Phase2TrackerDigi > * otdigis_
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &iRun, edm::EventSetup const &iSetup) override
Definition: Run.h:45