CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
22 
27 
35 
45 
47 
51 
52 //******** Single include for the TkMap *************/
54 //***************************************************/
55 
57 
58 class SiStripDCSStatus;
60 
61 //
62 // class declaration
63 //
64 
66 public:
68  enum RecHitType { Single = 0, Matched = 1, Projected = 2, Null = 3 };
69  explicit SiStripMonitorTrack(const edm::ParameterSet&);
70  ~SiStripMonitorTrack() override;
71  void dqmBeginRun(const edm::Run& run, const edm::EventSetup&) override;
72  void analyze(const edm::Event&, const edm::EventSetup&) override;
73  void bookHistograms(DQMStore::IBooker&, edm::Run const&, const edm::EventSetup&) override;
74 
75 private:
77 
78  struct Det2MEs;
79 
80  //booking
81  void book(DQMStore::IBooker&, const TrackerTopology* tTopo, const TkDetMap* tkDetMap);
82  void bookModMEs(DQMStore::IBooker&, const uint32_t);
83  void bookLayerMEs(DQMStore::IBooker&, const uint32_t, std::string&);
84  void bookRing(DQMStore::IBooker&, const uint32_t, std::string&);
86  void bookRingMEs(DQMStore::IBooker&, const uint32_t, std::string&);
88  MonitorElement* bookME1D(DQMStore::IBooker&, const char*, const char*);
89  MonitorElement* bookME2D(DQMStore::IBooker&, const char*, const char*);
90  MonitorElement* bookME3D(DQMStore::IBooker&, const char*, const char*);
91  MonitorElement* bookMEProfile(DQMStore::IBooker&, const char*, const char*);
93  // internal evaluation of monitorables
94  void AllClusters(const edm::Event& ev);
96  const edm::DetSetVector<SiStripDigi>& digilist,
97  const edm::Event& ev);
99  const edm::DetSetVector<SiStripDigi>& digilist,
100  const edm::Event& ev);
101  void trajectoryStudy(const reco::Track& track,
102  const edm::DetSetVector<SiStripDigi>& digilist,
103  const edm::Event& ev,
104  bool track_ok);
105  void trackStudy(const edm::Event& ev);
106  bool trackFilter(const reco::Track& track);
107  // LocalPoint project(const GeomDet *det,const GeomDet* projdet,LocalPoint position,LocalVector trackdirection)const;
108  void hitStudy(const edm::Event& ev,
109  const edm::DetSetVector<SiStripDigi>& digilist,
110  const ProjectedSiStripRecHit2D* projhit,
111  const SiStripMatchedRecHit2D* matchedhit,
112  const SiStripRecHit2D* hit2D,
113  const SiStripRecHit1D* hit1D,
114  LocalVector localMomentum,
115  const bool track_ok);
116  bool clusterInfos(SiStripClusterInfo* cluster,
117  const uint32_t detid,
118  enum ClusterFlags flags,
119  bool track_ok,
120  LocalVector LV,
121  const Det2MEs& MEs,
122  const TrackerTopology* tTopo,
123  const SiStripGain* stripGain,
124  const SiStripQuality* stripQuality,
125  const edm::DetSetVector<SiStripDigi>& digilist,
126  float clustZ,
127  float clustPhi);
128  template <class T>
129  void RecHitInfo(const T* tkrecHit,
130  LocalVector LV,
131  const edm::DetSetVector<SiStripDigi>& digilist,
132  const edm::Event& ev,
133  bool track_ok);
134 
135  bool fillControlViewHistos(const edm::Event& ev);
136  void return2DME(MonitorElement* input1, MonitorElement* input2, int binx, int biny, double value);
137 
138  // fill monitorables
139  // void fillModMEs(SiStripClusterInfo* cluster,std::string name, float cos, const uint32_t detid, const LocalVector LV);
140  // void fillMEs(SiStripClusterInfo*,const uint32_t detid, float,enum ClusterFlags, const LocalVector LV, const Det2MEs& MEs);
141 
142  inline void fillME(MonitorElement* ME, float value1) {
143  if (ME != nullptr)
144  ME->Fill(value1);
145  }
146  inline void fillME(MonitorElement* ME, float value1, float value2) {
147  if (ME != nullptr)
148  ME->Fill(value1, value2);
149  }
150  inline void fillME(MonitorElement* ME, float value1, float value2, float value3) {
151  if (ME != nullptr)
152  ME->Fill(value1, value2, value3);
153  }
154  inline void fillME(MonitorElement* ME, float value1, float value2, float value3, float value4) {
155  if (ME != nullptr)
156  ME->Fill(value1, value2, value3, value4);
157  }
158 
159  Det2MEs findMEs(const TrackerTopology* tTopo, const uint32_t detid);
160 
161  // ----------member data ---------------------------
162 private:
167 
169 
171 
172  //******* TkHistoMaps*/
178  //******** TkHistoMaps*/
180 
181  struct ModMEs {
192  };
193 
194  struct LayerMEs {
212  };
213  struct RingMEs {
231  };
232  struct SubDetMEs {
254  };
255  std::map<std::string, ModMEs> ModMEsMap;
256  std::map<std::string, LayerMEs> LayerMEsMap;
257  std::map<std::string, RingMEs> RingMEsMap;
258  std::map<std::string, SubDetMEs> SubDetMEsMap;
259 
260  struct Det2MEs {
261  struct LayerMEs* iLayer;
262  struct RingMEs* iRing;
264  };
265 
268 
272 
278 
279  const TrackerGeometry* tkgeom_ = nullptr;
282 
283  bool Mod_On_;
284  bool Trend_On_;
287  bool ring_flag;
290 
293 
294  std::unordered_set<const SiStripCluster*> vPSiStripCluster;
299 
305 
309 
310  // control view plots
320 
326 };
327 #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
bool ev
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
void Fill(long long x)
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_
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