CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripMonitorTrack.h
Go to the documentation of this file.
1 
2 #ifndef SiStripMonitorTrack_H
3 #define SiStripMonitorTrack_H
4 
5 // system include files
6 #include <memory>
7 #include <fstream>
8 #include <iostream>
9 #include <vector>
10 #include <string>
11 #include <unordered_set>
12 
13 // user include files
23 
27 
35 
40 
44 
46 
47 //******** Single include for the TkMap *************
49 //***************************************************
50 
52 
53 class SiStripDCSStatus;
55 class TrackerTopology;
56 
57 //
58 // class declaration
59 //
60 
62 public:
64  enum RecHitType { Single=0, Matched=1, Projected=2, Null=3};
65  explicit SiStripMonitorTrack(const edm::ParameterSet&);
67  void dqmBeginRun(const edm::Run& run, const edm::EventSetup& es) ;
68  virtual void analyze(const edm::Event&, const edm::EventSetup&);
69  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
70 
71 private:
72  enum ClusterFlags {
75  };
76 
77  struct Det2MEs;
78 
79  //booking
80  void book(DQMStore::IBooker &, const TrackerTopology* tTopo);
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*);
91  MonitorElement * bookMETrend(DQMStore::IBooker & , const char*);
92  // internal evaluation of monitorables
93  void AllClusters(const edm::Event& ev, const edm::EventSetup& es);
94  void trackStudyFromTrack(edm::Handle<reco::TrackCollection > trackCollectionHandle, const edm::EventSetup& es);
96  void trajectoryStudy(const edm::Ref<std::vector<Trajectory> > traj, const edm::EventSetup& es);
97  void trackStudy(const edm::Event& ev, const edm::EventSetup& es);
98  // LocalPoint project(const GeomDet *det,const GeomDet* projdet,LocalPoint position,LocalVector trackdirection)const;
99  void hitStudy(const edm::EventSetup& es,
100  const ProjectedSiStripRecHit2D* projhit,
101  const SiStripMatchedRecHit2D* matchedhit,
102  const SiStripRecHit2D* hit2D,
103  const SiStripRecHit1D* hit1D,
104  LocalVector localMomentum);
105  bool clusterInfos(SiStripClusterInfo* cluster, const uint32_t detid, enum ClusterFlags flags, LocalVector LV, const Det2MEs& MEs);
106  template <class T> void RecHitInfo(const T* tkrecHit, LocalVector LV, const edm::EventSetup&);
107 
108  // fill monitorables
109 // void fillModMEs(SiStripClusterInfo* cluster,std::string name, float cos, const uint32_t detid, const LocalVector LV);
110 // void fillMEs(SiStripClusterInfo*,const uint32_t detid, float,enum ClusterFlags, const LocalVector LV, const Det2MEs& MEs);
111 
112  inline void fillME(MonitorElement* ME,float value1){if (ME!=0)ME->Fill(value1);}
113  inline void fillME(MonitorElement* ME,float value1,float value2){if (ME!=0)ME->Fill(value1,value2);}
114  inline void fillME(MonitorElement* ME,float value1,float value2,float value3){if (ME!=0)ME->Fill(value1,value2,value3);}
115  inline void fillME(MonitorElement* ME,float value1,float value2,float value3,float value4){if (ME!=0)ME->Fill(value1,value2,value3,value4);}
116 
117  Det2MEs findMEs(const TrackerTopology* tTopo, const uint32_t detid);
118 
119  // ----------member data ---------------------------
120 private:
125 
127 
128  //******* TkHistoMaps
130  //******** TkHistoMaps
131 
132  struct ModMEs{
141  };
142 
143  struct LayerMEs{
157  };
158  struct RingMEs{
170  };
171  struct SubDetMEs{
185  };
186  std::map<std::string, ModMEs> ModMEsMap;
187  std::map<std::string, LayerMEs> LayerMEsMap;
188  std::map<std::string, RingMEs> RingMEsMap;
189  std::map<std::string, SubDetMEs> SubDetMEsMap;
190 
191  struct Det2MEs {
192  struct LayerMEs *iLayer;
193  struct RingMEs *iRing;
195  };
196 
199 
202 
205  // edm::EDGetTokenT<std::vector<Trajectory> > trajectoryToken_;
207 
208  bool Mod_On_;
209  bool Trend_On_;
212  bool ring_flag;
214 
217 
218  std::unordered_set<const SiStripCluster*> vPSiStripCluster;
223 
229 
233 };
234 #endif
Det2MEs findMEs(const TrackerTopology *tTopo, const uint32_t detid)
MonitorElement * ClusterChargePerCMfromTrack
void fillME(MonitorElement *ME, float value1, float value2, float value3)
TkHistoMap * tkhisto_NumOffTrack
SiStripMonitorTrack(const edm::ParameterSet &)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void trackStudy(const edm::Event &ev, const edm::EventSetup &es)
void trackStudyFromTrack(edm::Handle< reco::TrackCollection > trackCollectionHandle, const edm::EventSetup &es)
edm::EDGetTokenT< reco::TrackCollection > trackToken_
void trackStudyFromTrajectory(edm::Handle< TrajTrackAssociationCollection > TItkAssociatorCollection, const edm::EventSetup &es)
void fillME(MonitorElement *ME, float value1)
SiStripDCSStatus * dcsStatus_
void hitStudy(const edm::EventSetup &es, const ProjectedSiStripRecHit2D *projhit, const SiStripMatchedRecHit2D *matchedhit, const SiStripRecHit2D *hit2D, const SiStripRecHit1D *hit1D, LocalVector localMomentum)
void book(DQMStore::IBooker &, const TrackerTopology *tTopo)
void AllClusters(const edm::Event &ev, const edm::EventSetup &es)
std::map< std::string, RingMEs > RingMEsMap
edm::ParameterSet conf_
unsigned long long EventNumber_t
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
MonitorElement * bookME1D(DQMStore::IBooker &, const char *, 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...
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
void bookLayerMEs(DQMStore::IBooker &, const uint32_t, std::string &)
void trajectoryStudy(const edm::Ref< std::vector< Trajectory > > traj, const edm::EventSetup &es)
void fillME(MonitorElement *ME, float value1, float value2)
MonitorElement * ClusterChargePerCMfromOriginOffTrack
void Fill(long long x)
edm::ESHandle< TrackerGeometry > tkgeom_
Definition: ME.h:11
math::XYZTLorentzVectorD LV
void fillME(MonitorElement *ME, float value1, float value2, float value3, float value4)
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
MonitorElement * bookME2D(DQMStore::IBooker &, const char *, const char *)
void bookSubDetMEs(DQMStore::IBooker &, std::string &name)
MonitorElement * bookME3D(DQMStore::IBooker &, const char *, const char *)
MonitorElement * ClusterChargePerCMfromOrigin
MonitorElement * ClusterChargePerCMfromOriginOffTrack
SiStripFolderOrganizer folderOrganizer_
MonitorElement * ClusterChargePerCMfromTrack
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< TrajTrackAssociationCollection > trackTrajToken_
void bookModMEs(DQMStore::IBooker &, const uint32_t)
MonitorElement * ClusterChargePerCMfromTrack
void dqmBeginRun(const edm::Run &run, const edm::EventSetup &es)
std::map< std::string, ModMEs > ModMEsMap
MonitorElement * bookMETrend(DQMStore::IBooker &, const char *)
TkHistoMap * tkhisto_NumOnTrack
GenericTriggerEventFlag * genTriggerEventFlag_
void RecHitInfo(const T *tkrecHit, LocalVector LV, const edm::EventSetup &)
MonitorElement * ClusterChargePerCMfromOriginOnTrack
MonitorElement * handleBookMEs(DQMStore::IBooker &, std::string &, std::string &, std::string &, std::string &)
MonitorElement * bookMEProfile(DQMStore::IBooker &, const char *, const char *)
TkHistoMap * tkhisto_StoNCorrOnTrack
MonitorElement * ClusterChargePerCMfromOriginOnTrack
bool clusterInfos(SiStripClusterInfo *cluster, const uint32_t detid, enum ClusterFlags flags, LocalVector LV, const Det2MEs &MEs)
edm::ParameterSet Parameters
long double T
void bookRingMEs(DQMStore::IBooker &, const uint32_t, std::string &)
MonitorElement * ClusterChargePerCMfromOriginOnTrack
Definition: Run.h:43
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
std::map< std::string, LayerMEs > LayerMEsMap
MonitorElement * ClusterChargePerCMfromOriginOffTrack