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 
11 protected:
12  TTree* tree;
13 
14 public:
15  HIPMonitorVariables() : tree(nullptr) {}
16  virtual ~HIPMonitorVariables() {}
17 
18  void setTree(TTree* tree_) { tree = tree_; }
19  virtual void bookBranches() = 0;
20  virtual void fill() = 0;
21 };
23 public:
24  const int maxNEvents;
25  const int maxTracksRcd;
26  int nEvents;
27  int nTracks;
28  int m_Ntracks;
29  std::vector<float> m_Pt, m_Eta, m_Phi, m_Chi2n, m_P, m_d0, m_dz, m_wt;
31 
32  HIPTrackMonitorVariables(int maxNEvents_ = -1, int maxTracksRcd_ = -1)
34  maxNEvents(maxNEvents_),
35  maxTracksRcd(maxTracksRcd_),
36  nEvents(0),
37  nTracks(0),
38  m_Ntracks(0) {}
39 
40  void bookBranches() override;
41  void fill() override;
42 
43 protected:
44  void resetPerEvent() {
45  // Do not reset nTracks
46  m_Ntracks = 0;
47  m_Pt.clear();
48  m_Eta.clear();
49  m_Phi.clear();
50  m_Chi2n.clear();
51  m_P.clear();
52  m_d0.clear();
53  m_dz.clear();
54  m_wt.clear();
55  m_Nhits.clear();
56  m_nhPXB.clear();
57  m_nhPXF.clear();
58  m_nhTIB.clear();
59  m_nhTOB.clear();
60  m_nhTID.clear();
61  m_nhTEC.clear();
62  }
63  void resizeVectors(int NewSize) {
64  m_Pt.resize(NewSize);
65  m_Eta.resize(NewSize);
66  m_Phi.resize(NewSize);
67  m_Chi2n.resize(NewSize);
68  m_P.resize(NewSize);
69  m_d0.resize(NewSize);
70  m_dz.resize(NewSize);
71  m_wt.resize(NewSize);
72  m_Nhits.resize(NewSize);
73  m_nhPXB.resize(NewSize);
74  m_nhPXF.resize(NewSize);
75  m_nhTIB.resize(NewSize);
76  m_nhTOB.resize(NewSize);
77  m_nhTID.resize(NewSize);
78  m_nhTEC.resize(NewSize);
79  }
80 };
82 public:
83  const int maxHitsRcd;
84  int nHits;
85 
88  unsigned int m_rawQualityWord;
90 
91 protected:
92  void resetPerHit() {
93  m_hasHitProb = false;
94  m_sinTheta = 0;
95  m_hitwt = 1;
96  m_angle = 0;
97  m_probXY = -1;
98  m_probQ = -1;
99  m_rawQualityWord = 9999;
100  m_detId = 0;
101  }
102 
103 public:
104  HIPHitMonitorVariables(int maxHitsRcd_ = -1) : HIPMonitorVariables(), maxHitsRcd(maxHitsRcd_), nHits(0) {
105  resetPerHit();
106  }
107 
108  void bookBranches() override;
109  void fill() override;
110 };
111 
114 
116 
117  const int maxEventsPerJob;
118 
120  const int maxTracks;
122 
124  const int maxHits;
126 
128 
131 
135 
136  bool checkNevents();
137  bool checkNhits();
138 };
139 
140 #endif
HIPHitMonitorVariables::m_probQ
float m_probQ
Definition: HIPMonitorConfig.h:87
HIPHitMonitorVariables::maxHitsRcd
const int maxHitsRcd
Definition: HIPMonitorConfig.h:83
HIPTrackMonitorVariables::fill
void fill() override
Definition: HIPMonitorConfig.cc:74
HIPMonitorConfig::maxHits
const int maxHits
Definition: HIPMonitorConfig.h:124
HIPMonitorConfig::outfile
std::string outfile
Definition: HIPMonitorConfig.h:127
HIPTrackMonitorVariables::m_Phi
std::vector< float > m_Phi
Definition: HIPMonitorConfig.h:29
HIPHitMonitorVariables::fill
void fill() override
Definition: HIPMonitorConfig.cc:117
HIPMonitorVariables::tree
TTree * tree
Definition: HIPMonitorConfig.h:12
HIPMonitorConfig::fillTrackHitMonitoring
const bool fillTrackHitMonitoring
Definition: HIPMonitorConfig.h:123
HIPTrackMonitorVariables::maxNEvents
const int maxNEvents
Definition: HIPMonitorConfig.h:24
HIPTrackMonitorVariables::resetPerEvent
void resetPerEvent()
Definition: HIPMonitorConfig.h:44
HIPMonitorConfig::maxTracks
const int maxTracks
Definition: HIPMonitorConfig.h:120
tree
Definition: tree.py:1
HIPHitMonitorVariables::m_hitwt
float m_hitwt
Definition: HIPMonitorConfig.h:87
HIPMonitorConfig::~HIPMonitorConfig
~HIPMonitorConfig()
Definition: HIPMonitorConfig.h:134
HIPHitMonitorVariables
Definition: HIPMonitorConfig.h:81
HIPMonitorVariables
Definition: HIPMonitorConfig.h:10
HIPTrackMonitorVariables::m_nhTEC
std::vector< int > m_nhTEC
Definition: HIPMonitorConfig.h:30
HIPTrackMonitorVariables::maxTracksRcd
const int maxTracksRcd
Definition: HIPMonitorConfig.h:25
HIPHitMonitorVariables::HIPHitMonitorVariables
HIPHitMonitorVariables(int maxHitsRcd_=-1)
Definition: HIPMonitorConfig.h:104
HIPTrackMonitorVariables::m_nhTOB
std::vector< int > m_nhTOB
Definition: HIPMonitorConfig.h:30
HIPMonitorConfig::hitCounter
int hitCounter
Definition: HIPMonitorConfig.h:130
HIPTrackMonitorVariables::m_wt
std::vector< float > m_wt
Definition: HIPMonitorConfig.h:29
HIPTrackMonitorVariables::bookBranches
void bookBranches() override
Definition: HIPMonitorConfig.cc:41
HIPTrackMonitorVariables::m_Chi2n
std::vector< float > m_Chi2n
Definition: HIPMonitorConfig.h:29
HIPMonitorConfig::checkNhits
bool checkNhits()
Definition: HIPMonitorConfig.cc:35
HIPHitMonitorVariables::m_detId
align::ID m_detId
Definition: HIPMonitorConfig.h:89
HIPMonitorVariables::bookBranches
virtual void bookBranches()=0
HIPTrackMonitorVariables::m_P
std::vector< float > m_P
Definition: HIPMonitorConfig.h:29
HIPTrackMonitorVariables::resizeVectors
void resizeVectors(int NewSize)
Definition: HIPMonitorConfig.h:63
HIPTrackMonitorVariables::nTracks
int nTracks
Definition: HIPMonitorConfig.h:27
trackingPlots.other
other
Definition: trackingPlots.py:1467
HIPMonitorConfig::hitmonitorvars
HIPHitMonitorVariables hitmonitorvars
Definition: HIPMonitorConfig.h:125
HIPHitMonitorVariables::m_hasHitProb
bool m_hasHitProb
Definition: HIPMonitorConfig.h:86
HIPTrackMonitorVariables::nEvents
int nEvents
Definition: HIPMonitorConfig.h:26
HIPTrackMonitorVariables::m_dz
std::vector< float > m_dz
Definition: HIPMonitorConfig.h:29
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HIPTrackMonitorVariables::m_Pt
std::vector< float > m_Pt
Definition: HIPMonitorConfig.h:29
HIPHitMonitorVariables::resetPerHit
void resetPerHit()
Definition: HIPMonitorConfig.h:92
HIPMonitorConfig
Definition: HIPMonitorConfig.h:112
edm::ParameterSet
Definition: ParameterSet.h:47
HIPTrackMonitorVariables::HIPTrackMonitorVariables
HIPTrackMonitorVariables(int maxNEvents_=-1, int maxTracksRcd_=-1)
Definition: HIPMonitorConfig.h:32
align::ID
uint32_t ID
Definition: Definitions.h:24
HIPHitMonitorVariables::m_angle
float m_angle
Definition: HIPMonitorConfig.h:87
HIPMonitorVariables::fill
virtual void fill()=0
HIPTrackMonitorVariables::m_nhTIB
std::vector< int > m_nhTIB
Definition: HIPMonitorConfig.h:30
HIPTrackMonitorVariables::m_nhPXF
std::vector< int > m_nhPXF
Definition: HIPMonitorConfig.h:30
Definitions.h
HIPTrackMonitorVariables::m_d0
std::vector< float > m_d0
Definition: HIPMonitorConfig.h:29
HIPMonitorVariables::setTree
void setTree(TTree *tree_)
Definition: HIPMonitorConfig.h:18
HIPMonitorConfig::HIPMonitorConfig
HIPMonitorConfig(const edm::ParameterSet &cfg)
Definition: HIPMonitorConfig.cc:3
HIPTrackMonitorVariables
Definition: HIPMonitorConfig.h:22
HIPMonitorConfig::cfgMonitor
const edm::ParameterSet cfgMonitor
Definition: HIPMonitorConfig.h:113
HIPMonitorConfig::maxEventsPerJob
const int maxEventsPerJob
Definition: HIPMonitorConfig.h:117
HIPMonitorVariables::~HIPMonitorVariables
virtual ~HIPMonitorVariables()
Definition: HIPMonitorConfig.h:16
HIPHitMonitorVariables::nHits
int nHits
Definition: HIPMonitorConfig.h:84
looper.cfg
cfg
Definition: looper.py:297
HIPTrackMonitorVariables::m_nhTID
std::vector< int > m_nhTID
Definition: HIPMonitorConfig.h:30
HIPTrackMonitorVariables::m_Nhits
std::vector< int > m_Nhits
Definition: HIPMonitorConfig.h:30
HIPHitMonitorVariables::m_sinTheta
float m_sinTheta
Definition: HIPMonitorConfig.h:87
HIPMonitorVariables::HIPMonitorVariables
HIPMonitorVariables()
Definition: HIPMonitorConfig.h:15
HIPMonitorConfig::outfilecore
const std::string outfilecore
Definition: HIPMonitorConfig.h:115
HIPTrackMonitorVariables::m_Ntracks
int m_Ntracks
Definition: HIPMonitorConfig.h:28
HIPMonitorConfig::checkNevents
bool checkNevents()
Definition: HIPMonitorConfig.cc:30
ParameterSet.h
HIPMonitorConfig::trackmonitorvars
HIPTrackMonitorVariables trackmonitorvars
Definition: HIPMonitorConfig.h:121
HIPMonitorConfig::fillTrackMonitoring
const bool fillTrackMonitoring
Definition: HIPMonitorConfig.h:119
HIPTrackMonitorVariables::m_Eta
std::vector< float > m_Eta
Definition: HIPMonitorConfig.h:29
HIPTrackMonitorVariables::m_nhPXB
std::vector< int > m_nhPXB
Definition: HIPMonitorConfig.h:30
HIPMonitorConfig::eventCounter
int eventCounter
Definition: HIPMonitorConfig.h:129
HIPHitMonitorVariables::m_rawQualityWord
unsigned int m_rawQualityWord
Definition: HIPMonitorConfig.h:88
HIPHitMonitorVariables::m_probXY
float m_probXY
Definition: HIPMonitorConfig.h:87
HIPHitMonitorVariables::bookBranches
void bookBranches() override
Definition: HIPMonitorConfig.cc:62