CMS 3D CMS Logo

HIPMonitorConfig.h
Go to the documentation of this file.
1 #ifndef Alignment_HIPAlignmentAlgorithm_HIPMonitorConfig_h
2 #define Alignment_HIPAlignmentAlgorithm_HIPMonitorConfig_h
3 
4 #include <vector>
5 #include <string>
6 #include "TTree.h"
9 
10 
12 protected:
13 
14  TTree* tree;
15 
16 public:
17 
20 
21  void setTree(TTree* tree_){ tree=tree_; }
22  virtual void bookBranches()=0;
23  virtual void fill()=0;
24 
25 };
27 public:
28 
29  const int maxNEvents;
30  const int maxTracksRcd;
31  int nEvents;
32  int nTracks;
33  int m_Ntracks;
34  std::vector<float> m_Pt, m_Eta, m_Phi, m_Chi2n, m_P, m_d0, m_dz, m_wt;
35  std::vector<int> m_Nhits, m_nhPXB, m_nhPXF, m_nhTIB, m_nhTOB, m_nhTID, m_nhTEC;
36 
37  HIPTrackMonitorVariables(int maxNEvents_=-1, int maxTracksRcd_=-1) : HIPMonitorVariables(), maxNEvents(maxNEvents_), maxTracksRcd(maxTracksRcd_), nEvents(0), nTracks(0), m_Ntracks(0){}
38 
39  void bookBranches();
40  void fill();
41 
42 protected:
43 
44  void resetPerEvent(){
45  // Do not reset nTracks
46  m_Ntracks=0;
47  m_Pt.clear(); m_Eta.clear(); m_Phi.clear(); m_Chi2n.clear(); m_P.clear(); m_d0.clear(); m_dz.clear(); m_wt.clear();
48  m_Nhits.clear(); m_nhPXB.clear(); m_nhPXF.clear(); m_nhTIB.clear(); m_nhTOB.clear(); m_nhTID.clear(); m_nhTEC.clear();
49  }
50  void resizeVectors(int NewSize){
51  m_Pt.resize(NewSize); m_Eta.resize(NewSize); m_Phi.resize(NewSize); m_Chi2n.resize(NewSize); m_P.resize(NewSize); m_d0.resize(NewSize); m_dz.resize(NewSize); m_wt.resize(NewSize);
52  m_Nhits.resize(NewSize); m_nhPXB.resize(NewSize); m_nhPXF.resize(NewSize); m_nhTIB.resize(NewSize); m_nhTOB.resize(NewSize); m_nhTID.resize(NewSize); m_nhTEC.resize(NewSize);
53  }
54 
55 };
57 public:
58 
59  const int maxHitsRcd;
60  int nHits;
61 
63  float m_sinTheta, m_hitwt, m_angle, m_probXY, m_probQ;
64  unsigned int m_rawQualityWord;
66 
67 protected:
68 
69  void resetPerHit(){
70  m_hasHitProb=false;
71  m_sinTheta=0;
72  m_hitwt=1;
73  m_angle=0;
74  m_probXY=-1;
75  m_probQ=-1;
76  m_rawQualityWord=9999;
77  m_detId=0;
78  }
79 
80 public:
81 
82  HIPHitMonitorVariables(int maxHitsRcd_=-1) : HIPMonitorVariables(), maxHitsRcd(maxHitsRcd_), nHits(0){ resetPerHit(); }
83 
84  void bookBranches();
85  void fill();
86 
87 };
88 
91 
93 
94  const int maxEventsPerJob;
95 
96  const bool fillTrackMonitoring;
97  const int maxTracks;
99 
101  const int maxHits;
103 
105 
108 
112 
113  bool checkNevents();
114  bool checkNhits();
115 };
116 
117 #endif
virtual void fill()=0
HIPTrackMonitorVariables(int maxNEvents_=-1, int maxTracksRcd_=-1)
uint32_t ID
Definition: Definitions.h:26
#define nullptr
const bool fillTrackHitMonitoring
std::vector< float > m_wt
const edm::ParameterSet cfgMonitor
const int maxEventsPerJob
HIPHitMonitorVariables hitmonitorvars
const bool fillTrackMonitoring
unsigned int m_rawQualityWord
void setTree(TTree *tree_)
std::vector< int > m_nhTOB
HIPTrackMonitorVariables trackmonitorvars
const std::string outfilecore
virtual void bookBranches()=0
virtual ~HIPMonitorVariables()
HIPHitMonitorVariables(int maxHitsRcd_=-1)
void resizeVectors(int NewSize)