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 endJob(void);
69  virtual void analyze(const edm::Event&, const edm::EventSetup&);
70  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
71 
72 private:
73  enum ClusterFlags {
76  };
77  //booking
78  void book(DQMStore::IBooker &, const TrackerTopology* tTopo);
79  void bookModMEs(DQMStore::IBooker &, const uint32_t& );
80  void bookLayerMEs(DQMStore::IBooker &, const uint32_t&, std::string&);
82  MonitorElement * bookME1D(DQMStore::IBooker & , const char*, const char*);
83  MonitorElement * bookME2D(DQMStore::IBooker & , const char*, const char*);
84  MonitorElement * bookME3D(DQMStore::IBooker & , const char*, const char*);
85  MonitorElement * bookMEProfile(DQMStore::IBooker & , const char*, const char*);
86  MonitorElement * bookMETrend(DQMStore::IBooker & , const char*, const char*);
87  // internal evaluation of monitorables
88  void AllClusters(const edm::Event& ev, const edm::EventSetup& es);
89  void trackStudyFromTrack(edm::Handle<reco::TrackCollection > trackCollectionHandle, const edm::EventSetup& es);
91  void trajectoryStudy(const edm::Ref<std::vector<Trajectory> > traj, const edm::EventSetup& es);
92  // void trajectoryStudy(const edm::Ref<std::vector<Trajectory> > traj, reco::TrackRef trackref, const edm::EventSetup& es);
93  void trackStudy(const edm::Event& ev, const edm::EventSetup& es);
94  // LocalPoint project(const GeomDet *det,const GeomDet* projdet,LocalPoint position,LocalVector trackdirection)const;
95  void hitStudy(const edm::EventSetup& es,
96  const ProjectedSiStripRecHit2D* projhit,
97  const SiStripMatchedRecHit2D* matchedhit,
98  const SiStripRecHit2D* hit2D,
99  const SiStripRecHit1D* hit1D,
100  LocalVector localMomentum);
101  bool clusterInfos(SiStripClusterInfo* cluster, const uint32_t& detid, const TrackerTopology* tTopo, enum ClusterFlags flags, LocalVector LV);
102  template <class T> void RecHitInfo(const T* tkrecHit, LocalVector LV, const edm::EventSetup&);
103 
104  // fill monitorables
106  void fillMEs(SiStripClusterInfo*,uint32_t detid, const TrackerTopology* tTopo, float,enum ClusterFlags);
107  inline void fillME(MonitorElement* ME,float value1){if (ME!=0)ME->Fill(value1);}
108  inline void fillME(MonitorElement* ME,float value1,float value2){if (ME!=0)ME->Fill(value1,value2);}
109  inline void fillME(MonitorElement* ME,float value1,float value2,float value3){if (ME!=0)ME->Fill(value1,value2,value3);}
110  inline void fillME(MonitorElement* ME,float value1,float value2,float value3,float value4){if (ME!=0)ME->Fill(value1,value2,value3,value4);}
111  void getSubDetTag(std::string& folder_name, std::string& tag);
112 
113  // ----------member data ---------------------------
114 
115 private:
120  float iOrbitSec;
121 
123 
124  //******* TkHistoMaps
126  //******** TkHistoMaps
127 
128  struct ModMEs{
135  };
136 
137  struct LayerMEs{
148  };
149  struct SubDetMEs{
160 
161  };
162  std::map<std::string, ModMEs> ModMEsMap;
163  std::map<std::string, LayerMEs> LayerMEsMap;
164  std::map<std::string, SubDetMEs> SubDetMEsMap;
165 
168 
171 
174  // edm::EDGetTokenT<std::vector<Trajectory> > trajectoryToken_;
176 
177  bool Mod_On_;
178  bool Trend_On_;
181  bool ring_flag;
183 
186 
187  std::unordered_set<const SiStripCluster*> vPSiStripCluster;
190  bool flag_ring;
193 
199 
203 };
204 #endif
MonitorElement * bookMETrend(DQMStore::IBooker &, const char *, const char *)
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)
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 *)
void bookLayerMEs(DQMStore::IBooker &, const uint32_t &, std::string &)
bool ev
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
void trajectoryStudy(const edm::Ref< std::vector< Trajectory > > traj, const edm::EventSetup &es)
void fillME(MonitorElement *ME, float value1, float value2)
void Fill(long long x)
edm::ESHandle< TrackerGeometry > tkgeom_
Definition: ME.h:11
math::XYZTLorentzVectorD LV
void fillMEs(SiStripClusterInfo *, uint32_t detid, const TrackerTopology *tTopo, float, enum ClusterFlags)
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
std::map< std::string, SubDetMEs > SubDetMEsMap
void fillModMEs(SiStripClusterInfo *, std::string, float)
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 *)
SiStripFolderOrganizer folderOrganizer_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void getSubDetTag(std::string &folder_name, std::string &tag)
edm::EDGetTokenT< TrajTrackAssociationCollection > trackTrajToken_
void bookModMEs(DQMStore::IBooker &, const uint32_t &)
void dqmBeginRun(const edm::Run &run, const edm::EventSetup &es)
std::map< std::string, ModMEs > ModMEsMap
TkHistoMap * tkhisto_NumOnTrack
bool clusterInfos(SiStripClusterInfo *cluster, const uint32_t &detid, const TrackerTopology *tTopo, enum ClusterFlags flags, LocalVector LV)
GenericTriggerEventFlag * genTriggerEventFlag_
void RecHitInfo(const T *tkrecHit, LocalVector LV, const edm::EventSetup &)
MonitorElement * bookMEProfile(DQMStore::IBooker &, const char *, const char *)
TkHistoMap * tkhisto_StoNCorrOnTrack
virtual void endJob(void)
edm::ParameterSet Parameters
long double T
Definition: Run.h:41
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
std::map< std::string, LayerMEs > LayerMEsMap