CMS 3D CMS Logo

SiStripTrackingRecHitsValid.h
Go to the documentation of this file.
1 #ifndef Validation_RecoTrack_SiStripTrackingRecHitsValid_h
2 #define Validation_RecoTrack_SiStripTrackingRecHitsValid_h
3 
4 //DQM services for histogram
10 
13 
15 
17 
25 
37 
38 #include <TROOT.h>
39 #include <TTree.h>
40 #include <TFile.h>
41 #include <TH1F.h>
42 #include <TProfile.h>
43 
49 
50 //--- for SimHit association
64 
66 
68 
69 #include <string>
70 
71 class SiStripDetCabling;
72 class SiStripDCSStatus;
73 
75 public:
77 
79 
80  // ALL
81  //Simple hits MEs either from matched either
82  //from hit1D, hit2D in all subdetectors.
83  struct SimpleHitsMEs {
96 
101 
116  };
117 
118  struct LayerMEs { // MEs for Layer Level
158 
167 
178  };
179 
180  struct StereoAndMatchedMEs { // MEs for stereo and matched hits
181 
209 
218  };
219 
221  float x;
222  float y;
223  float z;
224  float resolxx;
225  float resolxy;
226  float resolyy;
227  float resolxxMF; // in Measurement Frame
228  // float phi;
229  float resx;
230  float resy;
231  float resxMF; // in Measurement Frame
232  float pullx;
233  float pully;
234  float pullxMF; // in Measurement Frame
235  float trackangle;
237  // float trackangle2;
238  float trackwidth;
240  int category;
241  float thickness;
242  int clusiz;
243  float cluchg;
244  };
245 
246 protected:
247  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
248  void bookHistograms(DQMStore::IBooker& ibooker, const edm::Run& run, const edm::EventSetup& es) override;
250  void endJob() override;
251 
252 private:
257 
259 
382 
384  std::vector<PSimHit> matched;
385  std::map<std::string, LayerMEs> LayerMEsMap;
386  std::map<std::string, StereoAndMatchedMEs> StereoAndMatchedMEsMap;
387  std::map<std::string, std::vector<uint32_t> > LayerDetMap;
388  std::map<std::string, std::vector<uint32_t> > StereoAndMatchedDetMap;
389 
391 
392  std::pair<LocalPoint, LocalVector> projectHit(const PSimHit& hit,
393  const StripGeomDetUnit* stripDet,
394  const BoundPlane& plane);
395 
396  LocalVector driftDirection(const StripGeomDetUnit* det) const;
397 
398  MonitorElement* Fit_SliceY(TH2F* Histo2D);
399 
400  void createMEs(DQMStore::IBooker& ibooker, const edm::EventSetup& es);
401  void createSimpleHitsMEs(DQMStore::IBooker& ibooker);
404 
406  const char* ParameterSetLabel,
407  const char* HistoName,
408  const char* HistoTitle);
410  const char* ParameterSetLabel,
411  const char* HistoName,
412  const char* HistoTitle);
413 
414  inline void fillME(MonitorElement* ME, float value1) {
415  if (ME != nullptr)
416  ME->Fill(value1);
417  }
418  inline void fillME(MonitorElement* ME, float value1, float value2) {
419  if (ME != nullptr)
420  ME->Fill(value1, value2);
421  }
422  inline void fillME(MonitorElement* ME, float value1, float value2, float value3) {
423  if (ME != nullptr)
424  ME->Fill(value1, value2, value3);
425  }
426  inline void fillME(MonitorElement* ME, float value1, float value2, float value3, float value4) {
427  if (ME != nullptr)
428  ME->Fill(value1, value2, value3, value4);
429  }
430 
433  unsigned long long m_cacheID_;
435 
437 
438  void rechitanalysis(LocalVector ldir,
439  const TrackingRecHit* rechit,
440  const StripGeomDetUnit* stripdet,
442  TrackerHitAssociator& associate,
443  bool simplehit1or2D);
444 
445  enum class MatchStatus { matched, monoHit, stereoHit };
447  const TrackingRecHit* rechit,
448  const GluedGeomDet* gluedDet,
449  TrackerHitAssociator& associate,
451  const MatchStatus matchedmonorstereo);
452 
455 };
456 
457 #endif
SiStripTrackingRecHitsValid(const edm::ParameterSet &conf)
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
void rechitanalysis_matched(LocalVector ldir, const TrackingRecHit *rechit, const GluedGeomDet *gluedDet, TrackerHitAssociator &associate, edm::ESHandle< StripClusterParameterEstimator > stripcpe, const MatchStatus matchedmonorstereo)
void fillME(MonitorElement *ME, float value1, float value2, float value3, float value4)
std::map< std::string, std::vector< uint32_t > > StereoAndMatchedDetMap
std::map< std::string, StereoAndMatchedMEs > StereoAndMatchedMEsMap
void fillME(MonitorElement *ME, float value1)
void fillME(MonitorElement *ME, float value1, float value2, float value3)
MonitorElement * Fit_SliceY(TH2F *Histo2D)
std::map< std::string, LayerMEs > LayerMEsMap
void createLayerMEs(DQMStore::IBooker &ibooker, std::string label)
MonitorElement * bookME1D(DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName, const char *HistoTitle)
void Fill(long long x)
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: ME.h:11
char const * label
void createSimpleHitsMEs(DQMStore::IBooker &ibooker)
TrackerHitAssociator::Config trackerHitAssociatorConfig_
edm::EDGetTokenT< std::vector< reco::Track > > tracksInputToken_
void createMEs(DQMStore::IBooker &ibooker, const edm::EventSetup &es)
std::pair< LocalPoint, LocalVector > projectHit(const PSimHit &hit, const StripGeomDetUnit *stripDet, const BoundPlane &plane)
void createStereoAndMatchedMEs(DQMStore::IBooker &ibooker, std::string label)
std::map< std::string, std::vector< uint32_t > > LayerDetMap
std::string HistoName
void rechitanalysis(LocalVector ldir, const TrackingRecHit *rechit, const StripGeomDetUnit *stripdet, edm::ESHandle< StripClusterParameterEstimator > stripcpe, TrackerHitAssociator &associate, bool simplehit1or2D)
void fillME(MonitorElement *ME, float value1, float value2)
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &run, const edm::EventSetup &es) override
MonitorElement * bookMEProfile(DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName, const char *HistoTitle)
LocalVector driftDirection(const StripGeomDetUnit *det) const
Definition: Run.h:45