test
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, bool track_ok);
97  void trackStudy(const edm::Event& ev, const edm::EventSetup& es);
98  bool trackFilter(const reco::Track& track);
99  // LocalPoint project(const GeomDet *det,const GeomDet* projdet,LocalPoint position,LocalVector trackdirection)const;
100  void hitStudy(const edm::EventSetup& es,
101  const ProjectedSiStripRecHit2D* projhit,
102  const SiStripMatchedRecHit2D* matchedhit,
103  const SiStripRecHit2D* hit2D,
104  const SiStripRecHit1D* hit1D,
105  LocalVector localMomentum,
106  const bool track_ok);
107  bool clusterInfos(SiStripClusterInfo* cluster, const uint32_t detid, enum ClusterFlags flags, bool track_ok, LocalVector LV, const Det2MEs& MEs);
108  template <class T> void RecHitInfo(const T* tkrecHit, LocalVector LV, const edm::EventSetup&, bool ok);
109 
110  // fill monitorables
111 // void fillModMEs(SiStripClusterInfo* cluster,std::string name, float cos, const uint32_t detid, const LocalVector LV);
112 // void fillMEs(SiStripClusterInfo*,const uint32_t detid, float,enum ClusterFlags, const LocalVector LV, const Det2MEs& MEs);
113 
114  inline void fillME(MonitorElement* ME,float value1){if (ME!=0)ME->Fill(value1);}
115  inline void fillME(MonitorElement* ME,float value1,float value2){if (ME!=0)ME->Fill(value1,value2);}
116  inline void fillME(MonitorElement* ME,float value1,float value2,float value3){if (ME!=0)ME->Fill(value1,value2,value3);}
117  inline void fillME(MonitorElement* ME,float value1,float value2,float value3,float value4){if (ME!=0)ME->Fill(value1,value2,value3,value4);}
118 
119  Det2MEs findMEs(const TrackerTopology* tTopo, const uint32_t detid);
120 
121  // ----------member data ---------------------------
122 private:
127 
129 
130  //******* TkHistoMaps
134  //******** TkHistoMaps
136 
137  struct ModMEs{
146  };
147 
148  struct LayerMEs{
162  };
163  struct RingMEs{
175  };
176  struct SubDetMEs{
190  };
191  std::map<std::string, ModMEs> ModMEsMap;
192  std::map<std::string, LayerMEs> LayerMEsMap;
193  std::map<std::string, RingMEs> RingMEsMap;
194  std::map<std::string, SubDetMEs> SubDetMEsMap;
195 
196  struct Det2MEs {
197  struct LayerMEs *iLayer;
198  struct RingMEs *iRing;
200  };
201 
204 
207 
210  // edm::EDGetTokenT<std::vector<Trajectory> > trajectoryToken_;
212 
213  bool Mod_On_;
214  bool Trend_On_;
217  bool ring_flag;
220 
223 
224  std::unordered_set<const SiStripCluster*> vPSiStripCluster;
229 
235 
239 };
240 #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 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...
bool trackFilter(const reco::Track &track)
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
void bookLayerMEs(DQMStore::IBooker &, const uint32_t, std::string &)
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
TkHistoMap * tkhisto_NumMissingHits
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)
TkHistoMap * tkhisto_NumberInactiveHits
TkHistoMap * tkhisto_ClChPerCMfromOrigin
void hitStudy(const edm::EventSetup &es, const ProjectedSiStripRecHit2D *projhit, const SiStripMatchedRecHit2D *matchedhit, const SiStripRecHit2D *hit2D, const SiStripRecHit1D *hit1D, LocalVector localMomentum, const bool track_ok)
MonitorElement * ClusterChargePerCMfromTrack
bool clusterInfos(SiStripClusterInfo *cluster, const uint32_t detid, enum ClusterFlags flags, bool track_ok, LocalVector LV, const Det2MEs &MEs)
void dqmBeginRun(const edm::Run &run, const edm::EventSetup &es)
std::map< std::string, ModMEs > ModMEsMap
MonitorElement * bookMETrend(DQMStore::IBooker &, const char *)
TkHistoMap * tkhisto_ClChPerCMfromTrack
TkHistoMap * tkhisto_NumOnTrack
GenericTriggerEventFlag * genTriggerEventFlag_
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
edm::ParameterSet Parameters
long double T
void bookRingMEs(DQMStore::IBooker &, const uint32_t, std::string &)
MonitorElement * ClusterChargePerCMfromOriginOnTrack
void trajectoryStudy(const edm::Ref< std::vector< Trajectory > > traj, const edm::EventSetup &es, bool track_ok)
TkHistoMap * tkhisto_NumberValidHits
Definition: Run.h:43
void RecHitInfo(const T *tkrecHit, LocalVector LV, const edm::EventSetup &, bool ok)
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
std::map< std::string, LayerMEs > LayerMEsMap
MonitorElement * ClusterChargePerCMfromOriginOffTrack