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
11 
14 
16 
18 
26 
38 
39 #include <TROOT.h>
40 #include <TTree.h>
41 #include <TFile.h>
42 #include <TH1F.h>
43 #include <TProfile.h>
44 
50 
51 //--- for SimHit association
65 
67 
69 
70 #include <string>
71 
72 class SiStripDetCabling;
73 class SiStripDCSStatus;
74 
76 {
77  public:
78 
80 
82 
83  // ALL
84  //Simple hits MEs either from matched either
85  //from hit1D, hit2D in all subdetectors.
86  struct SimpleHitsMEs{
99 
104 
119 
120  };
121 
122  struct LayerMEs{ // MEs for Layer Level
162 
171 
182 
183 
184  };
185 
186  struct StereoAndMatchedMEs{ // MEs for stereo and matched hits
187 
215 
224 
225  };
226 
228  float x;
229  float y;
230  float z;
231  float resolxx;
232  float resolxy;
233  float resolyy;
234  float resolxxMF; // in Measurement Frame
235 // float phi;
236  float resx;
237  float resy;
238  float resxMF;// in Measurement Frame
239  float pullx;
240  float pully;
241  float pullxMF;// in Measurement Frame
242  float trackangle;
244 // float trackangle2;
245  float trackwidth;
247  int category;
248  float thickness;
249  int clusiz;
250  float cluchg;
251  };
252 
253  protected:
254 
255  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
256  void bookHistograms(DQMStore::IBooker & ibooker,const edm::Run& run, const edm::EventSetup& es) override;
258  void endJob() override;
259 
260  private:
261 
266 
268 
269 
392 
394  std::vector<PSimHit> matched;
395  std::map<std::string, LayerMEs> LayerMEsMap;
396  std::map<std::string, StereoAndMatchedMEs> StereoAndMatchedMEsMap;
397  std::map<std::string, std::vector< uint32_t > > LayerDetMap;
398  std::map<std::string, std::vector< uint32_t > > StereoAndMatchedDetMap;
399 
401 
402  std::pair<LocalPoint,LocalVector> projectHit( const PSimHit& hit, const StripGeomDetUnit* stripDet,const BoundPlane& plane);
403 
405 
406  MonitorElement* Fit_SliceY(TH2F * Histo2D);
407 
408  void createMEs(DQMStore::IBooker & ibooker,const edm::EventSetup& es);
409  void createSimpleHitsMEs(DQMStore::IBooker & ibooker);
412 
413  MonitorElement* bookME1D(DQMStore::IBooker & ibooker,const char* ParameterSetLabel, const char* HistoName, const char* HistoTitle);
414  MonitorElement* bookMEProfile(DQMStore::IBooker & ibooker,const char* ParameterSetLabel, const char* HistoName, const char* HistoTitle);
415 
416  inline void fillME(MonitorElement* ME,float value1){if (ME!=nullptr)ME->Fill(value1);}
417  inline void fillME(MonitorElement* ME,float value1,float value2){if (ME!=nullptr)ME->Fill(value1,value2);}
418  inline void fillME(MonitorElement* ME,float value1,float value2,float value3){if (ME!=nullptr)ME->Fill(value1,value2,value3);}
419  inline void fillME(MonitorElement* ME,float value1,float value2,float value3,float value4){if (ME!=nullptr)ME->Fill(value1,value2,value3,value4);}
420 
421 
424  unsigned long long m_cacheID_;
426 
428 
429  void rechitanalysis(LocalVector ldir, const TrackingRecHit *rechit, const StripGeomDetUnit *stripdet, edm::ESHandle < StripClusterParameterEstimator > stripcpe, TrackerHitAssociator& associate, bool simplehit1or2D);
430 
431  enum class MatchStatus { matched, monoHit, stereoHit};
432  void rechitanalysis_matched(LocalVector ldir, const TrackingRecHit *rechit, const GluedGeomDet* gluedDet,TrackerHitAssociator& associate, edm::ESHandle < StripClusterParameterEstimator > stripcpe, const MatchStatus matchedmonorstereo);
433 
434 
437 
438 };
439 
440 
441 #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, StereoAndMatchedMEs > StereoAndMatchedMEsMap
MonitorElement * bookME1D(DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName, const char *HistoTitle)
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)
void Fill(long long x)
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: ME.h:11
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)
MonitorElement * bookMEProfile(DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName, const char *HistoTitle)
void createStereoAndMatchedMEs(DQMStore::IBooker &ibooker, std::string label)
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)
std::map< std::string, std::vector< uint32_t > > StereoAndMatchedDetMap
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &run, const edm::EventSetup &es) override
std::map< std::string, std::vector< uint32_t > > LayerDetMap
LocalVector driftDirection(const StripGeomDetUnit *det) const
Definition: Run.h:44