CMS 3D CMS Logo

SiStripMonitorTrack.h
Go to the documentation of this file.
1 #ifndef SiStripMonitorTrack_H
2 #define SiStripMonitorTrack_H
3 
4 // system include files
5 #include <memory>
6 #include <fstream>
7 #include <iostream>
8 #include <vector>
9 #include <string>
10 #include <unordered_set>
11 
12 // user include files
21 
26 
34 
44 
46 
50 
51 //******** Single include for the TkMap *************/
53 //***************************************************/
54 
56 
57 class SiStripDCSStatus;
59 
60 //
61 // class declaration
62 //
63 
65 public:
67  enum RecHitType { Single = 0, Matched = 1, Projected = 2, Null = 3 };
68  explicit SiStripMonitorTrack(const edm::ParameterSet&);
69  ~SiStripMonitorTrack() override;
70  void dqmBeginRun(const edm::Run& run, const edm::EventSetup&) override;
71  void analyze(const edm::Event&, const edm::EventSetup&) override;
72  void bookHistograms(DQMStore::IBooker&, edm::Run const&, const edm::EventSetup&) override;
73 
74 private:
76 
77  struct Det2MEs;
78 
79  //booking
80  void book(DQMStore::IBooker&, const TrackerTopology* tTopo, const TkDetMap* tkDetMap);
81  void bookModMEs(DQMStore::IBooker&, const uint32_t);
82  void bookLayerMEs(DQMStore::IBooker&, const uint32_t, std::string&);
83  void bookRing(DQMStore::IBooker&, const uint32_t, std::string&);
85  void bookRingMEs(DQMStore::IBooker&, const uint32_t, std::string&);
87  MonitorElement* bookME1D(DQMStore::IBooker&, const char*, const char*);
88  MonitorElement* bookME2D(DQMStore::IBooker&, const char*, const char*);
89  MonitorElement* bookME3D(DQMStore::IBooker&, const char*, const char*);
90  MonitorElement* bookMEProfile(DQMStore::IBooker&, const char*, const char*);
92  // internal evaluation of monitorables
93  void AllClusters(const edm::Event& ev);
95  const edm::DetSetVector<SiStripDigi>& digilist,
96  const edm::Event& ev);
98  const edm::DetSetVector<SiStripDigi>& digilist,
99  const edm::Event& ev);
100  void trajectoryStudy(const reco::Track& track,
101  const edm::DetSetVector<SiStripDigi>& digilist,
102  const edm::Event& ev,
103  bool track_ok);
104  void trackStudy(const edm::Event& ev);
105  bool trackFilter(const reco::Track& track);
106  // LocalPoint project(const GeomDet *det,const GeomDet* projdet,LocalPoint position,LocalVector trackdirection)const;
107  void hitStudy(const edm::Event& ev,
108  const edm::DetSetVector<SiStripDigi>& digilist,
109  const ProjectedSiStripRecHit2D* projhit,
110  const SiStripMatchedRecHit2D* matchedhit,
111  const SiStripRecHit2D* hit2D,
112  const SiStripRecHit1D* hit1D,
113  LocalVector localMomentum,
114  const bool track_ok);
115  bool clusterInfos(SiStripClusterInfo* cluster,
116  const uint32_t detid,
117  enum ClusterFlags flags,
118  bool track_ok,
119  LocalVector LV,
120  const Det2MEs& MEs,
121  const TrackerTopology* tTopo,
122  const SiStripGain* stripGain,
123  const SiStripQuality* stripQuality,
124  const edm::DetSetVector<SiStripDigi>& digilist,
125  float clustZ,
126  float clustPhi);
127  template <class T>
128  void RecHitInfo(const T* tkrecHit,
129  LocalVector LV,
130  const edm::DetSetVector<SiStripDigi>& digilist,
131  const edm::Event& ev,
132  bool track_ok);
133 
134  bool fillControlViewHistos(const edm::Event& ev);
135  void return2DME(MonitorElement* input1, MonitorElement* input2, int binx, int biny, double value);
136 
137  // fill monitorables
138  // void fillModMEs(SiStripClusterInfo* cluster,std::string name, float cos, const uint32_t detid, const LocalVector LV);
139  // void fillMEs(SiStripClusterInfo*,const uint32_t detid, float,enum ClusterFlags, const LocalVector LV, const Det2MEs& MEs);
140 
141  inline void fillME(MonitorElement* ME, float value1) {
142  if (ME != nullptr)
143  ME->Fill(value1);
144  }
145  inline void fillME(MonitorElement* ME, float value1, float value2) {
146  if (ME != nullptr)
147  ME->Fill(value1, value2);
148  }
149  inline void fillME(MonitorElement* ME, float value1, float value2, float value3) {
150  if (ME != nullptr)
151  ME->Fill(value1, value2, value3);
152  }
153  inline void fillME(MonitorElement* ME, float value1, float value2, float value3, float value4) {
154  if (ME != nullptr)
155  ME->Fill(value1, value2, value3, value4);
156  }
157 
158  Det2MEs findMEs(const TrackerTopology* tTopo, const uint32_t detid);
159 
160  // ----------member data ---------------------------
161 private:
166 
168 
170 
171  //******* TkHistoMaps*/
177  //******** TkHistoMaps*/
179 
180  struct ModMEs {
191  };
192 
193  struct LayerMEs {
211  };
212  struct RingMEs {
230  };
231  struct SubDetMEs {
257  };
258  std::map<std::string, ModMEs> ModMEsMap;
259  std::map<std::string, LayerMEs> LayerMEsMap;
260  std::map<std::string, RingMEs> RingMEsMap;
261  std::map<std::string, SubDetMEs> SubDetMEsMap;
262 
263  struct Det2MEs {
264  struct LayerMEs* iLayer;
265  struct RingMEs* iRing;
267  };
268 
271 
275 
281 
282  const TrackerGeometry* tkgeom_ = nullptr;
285 
286  bool Mod_On_;
287  bool Trend_On_;
290  bool ring_flag;
293 
296 
297  std::unordered_set<const SiStripCluster*> vPSiStripCluster;
302 
308 
312 
313  // control view plots
323 
329 };
330 #endif
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TIBTID
std::unique_ptr< TkHistoMap > tkhisto_NoiseOffTrack
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyRunToken_
void return2DME(MonitorElement *input1, MonitorElement *input2, int binx, int biny, double value)
Det2MEs findMEs(const TrackerTopology *tTopo, const uint32_t detid)
MonitorElement * ClusterStoNCorr_OnTrack_TECP
MonitorElement * ClusterChargePerCMfromTrack
MonitorElement * bookMEProfile(DQMStore::IBooker &, const char *, const char *)
void fillME(MonitorElement *ME, float value1, float value2, float value3)
SiStripMonitorTrack(const edm::ParameterSet &)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyEventToken_
std::unique_ptr< TkHistoMap > tkhisto_ClChPerCMfromOrigin
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > siStripDetCablingToken_
edm::EDGetTokenT< reco::TrackCollection > trackToken_
void fillME(MonitorElement *ME, float value1)
SiStripDCSStatus * dcsStatus_
void trackStudyFromTrack(edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev)
math::XYZTLorentzVectorD LV
std::map< std::string, RingMEs > RingMEsMap
const TrackerGeometry * tkgeom_
edm::ParameterSet conf_
bool clusterInfos(SiStripClusterInfo *cluster, const uint32_t detid, enum ClusterFlags flags, bool track_ok, LocalVector LV, const Det2MEs &MEs, const TrackerTopology *tTopo, const SiStripGain *stripGain, const SiStripQuality *stripQuality, const edm::DetSetVector< SiStripDigi > &digilist, float clustZ, float clustPhi)
unsigned long long EventNumber_t
MonitorElement * bookMETrend(DQMStore::IBooker &, const char *)
MonitorElement * ClusterChargePerCMfromTrack
MonitorElement * ClusterChargeCorrOnTrack
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
bool trackFilter(const reco::Track &track)
void bookLayerMEs(DQMStore::IBooker &, const uint32_t, std::string &)
void RecHitInfo(const T *tkrecHit, LocalVector LV, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev, bool track_ok)
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECM
void fillME(MonitorElement *ME, float value1, float value2)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, const edm::EventSetup &) override
MonitorElement * ClusterChargePerCMfromOriginOffTrack
#define input2
Definition: AMPTWrapper.h:159
MonitorElement * ClusterChargeCorrThinOnTrack
Definition: ME.h:11
edm::ESGetToken< TkDetMap, TrackerTopologyRcd > tkDetMapToken_
MonitorElement * ClusterCount_OnTrack_FECCratevsFECSlot
MonitorElement * ClusterChargeRawOnTrack
void fillME(MonitorElement *ME, float value1, float value2, float value3, float value4)
MonitorElement * ClusterStoNCorr_OnTrack_TOB
edm::EventNumber_t eventNb
TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
std::unordered_set< const SiStripCluster * > vPSiStripCluster
void bookRing(DQMStore::IBooker &, const uint32_t, std::string &)
std::map< std::string, SubDetMEs > SubDetMEsMap
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
std::unique_ptr< TkHistoMap > tkhisto_ClChPerCMfromTrack
MonitorElement * bookME2D(DQMStore::IBooker &, const char *, const char *)
void bookSubDetMEs(DQMStore::IBooker &, std::string &name)
#define input1
Definition: AMPTWrapper.h:139
void book(DQMStore::IBooker &, const TrackerTopology *tTopo, const TkDetMap *tkDetMap)
SiStripClusterInfo siStripClusterInfo_
Definition: value.py:1
std::unique_ptr< TkHistoMap > tkhisto_NumOffTrack
MonitorElement * ClusterChargePerCMfromOrigin
MonitorElement * ClusterChargePerCMfromOriginOffTrack
SiStripFolderOrganizer folderOrganizer_
MonitorElement * ClusterChargePerCMfromTrack
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TOB
edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > digiToken_
MonitorElement * ClusterChargeCorrThickOnTrack
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TECM
void bookModMEs(DQMStore::IBooker &, const uint32_t)
void trajectoryStudy(const reco::Track &track, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev, bool track_ok)
MonitorElement * ClusterStoNCorr_OnTrack_FECCratevsFECSlot
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TECP
std::unique_ptr< TkHistoMap > tkhisto_ClusterWidthOffTrack
void AllClusters(const edm::Event &ev)
MonitorElement * ClusterChargePerCMfromTrack
bool fillControlViewHistos(const edm::Event &ev)
std::map< std::string, ModMEs > ModMEsMap
std::unique_ptr< TkHistoMap > tkhisto_StoNCorrOnTrack
MonitorElement * ClusterStoNCorr_OnTrack_FECSlotVsFECRing_TOB
void trackStudyFromTrajectory(edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::DetSetVector< SiStripDigi > &digilist, const edm::Event &ev)
MonitorElement * bookME3D(DQMStore::IBooker &, const char *, const char *)
MonitorElement * ClusterStoNCorr_OnTrack_TIBTID
GenericTriggerEventFlag * genTriggerEventFlag_
std::unique_ptr< TkHistoMap > tkhisto_ClusterWidthOnTrack
MonitorElement * ClusterChargePerCMfromOriginOnTrack
std::unique_ptr< TkHistoMap > tkhisto_NumMissingHits
const SiStripDetCabling * siStripDetCabling_
void dqmBeginRun(const edm::Run &run, const edm::EventSetup &) override
std::unique_ptr< TkHistoMap > tkhisto_NoiseOnTrack
std::unique_ptr< TkHistoMap > tkhisto_NumberValidHits
std::unique_ptr< TkHistoMap > tkhisto_NumOnTrack
MonitorElement * bookME1D(DQMStore::IBooker &, const char *, const char *)
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TIBTID
std::unique_ptr< TkHistoMap > tkhisto_NumberInactiveHits
MonitorElement * ClusterChargePerCMfromOriginOnTrack
edm::ParameterSet Parameters
void hitStudy(const edm::Event &ev, const edm::DetSetVector< SiStripDigi > &digilist, const ProjectedSiStripRecHit2D *projhit, const SiStripMatchedRecHit2D *matchedhit, const SiStripRecHit2D *hit2D, const SiStripRecHit1D *hit1D, LocalVector localMomentum, const bool track_ok)
long double T
void trackStudy(const edm::Event &ev)
void bookRingMEs(DQMStore::IBooker &, const uint32_t, std::string &)
MonitorElement * ClusterStoNCorrThickOnTrack
MonitorElement * ClusterChargePerCMfromOriginOnTrack
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * handleBookMEs(DQMStore::IBooker &, std::string &, std::string &, std::string &, std::string &)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
MonitorElement * ClusterCount_OnTrack_FECSlotVsFECRing_TECP
Definition: Run.h:45
MonitorElement * ClusterStoNCorr_OnTrack_TECM
const TrackerTopology * trackerTopology_
MonitorElement * ClusterChargeRawOffTrack
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
std::map< std::string, LayerMEs > LayerMEsMap
MonitorElement * ClusterChargePerCMfromOriginOffTrack