CMS 3D CMS Logo

DQMAnalyzer.h
Go to the documentation of this file.
1 #ifndef DQMAnalyzer_h
2 #define DQMAnalyzer_h
3 
4 //
5 // Package: RecoEgamma/Examples
6 // Class: GsfElectronDataAnalyzer
7 //
8 
9 //
10 // Original Author: Ursula Berthon, Claude Charlot
11 // Created: Mon Mar 27 13:22:06 CEST 2006
12 //
13 //
14 
15 
18 
21 
28 
29 class MagneticField;
30 class TFile;
31 class TH1F;
32 class TH2F;
33 class TH1I;
34 class TProfile;
35 class TTree;
36 
38 {
39  public:
40 
41  explicit DQMAnalyzer( const edm::ParameterSet & conf ) ;
42 
43  ~DQMAnalyzer() override ;
44 
45  void beginJob() override ;
46  void endJob() override ;
47  void analyze( const edm::Event & e, const edm::EventSetup & c) override ;
48 
49  private:
50 
51  //=========================================
52  // parameters
53  //=========================================
54 
60  //std::string type_;
61  bool readAOD_;
62 
63  // matching
66  double deltaR_;
67 
68  // tag and probe
70  double massLow_;
71  double massHigh_;
76 
77  // electron selection
78  double minEt_;
79  double minPt_;
80  double maxAbsEta_;
81  bool isEB_;
82  bool isEE_;
104  double mvaMin_;
107  double tkIso03Max_;
113 
114  // for trigger
116  std::vector<std::string > HLTPathsByName_;
117 
118  // histos limits and binning
119  int nbineta; int nbineta2D; double etamin; double etamax;
120  int nbinphi; int nbinphi2D; double phimin; double phimax;
121  int nbinpt; int nbinpteff; int nbinpt2D; double ptmax;
122  int nbinp; int nbinp2D; double pmax;
123  int nbineop; int nbineop2D; double eopmax; double eopmaxsht;
124  int nbindeta; double detamin; double detamax;
125  int nbindphi; double dphimin; double dphimax;
128  int nbinfhits; double fhitsmax;
129  int nbinlhits; double lhitsmax;
130  int nbinxyz;
131  int nbinpoptrue; double poptruemin; double poptruemax;
132  int nbinmee; double meemin; double meemax;
133  int nbinhoe; double hoemin; double hoemax;
134 
135 
136  //=========================================
137  // usual attributes and methods
138  //=========================================
139 
140 
141  unsigned int nEvents_ ;
142 
143  bool selected( const reco::GsfElectronCollection::const_iterator & gsfIter , double vertexTIP ) ;
144  bool generalCut( const reco::GsfElectronCollection::const_iterator & gsfIter) ;
145  bool etCut( const reco::GsfElectronCollection::const_iterator & gsfIter ) ;
146  bool isolationCut( const reco::GsfElectronCollection::const_iterator & gsfIter, double vertexTIP ) ;
147  bool idCut( const reco::GsfElectronCollection::const_iterator & gsfIter ) ;
148 
149  bool trigger( const edm::Event & e ) ;
150  unsigned int nAfterTrigger_;
151  std::vector<unsigned int> HLTPathsByIndex_;
152 
156 
157  TFile * histfile_ ;
158  TTree * tree_ ;
159 
160  float mcEnergy[10], mcEta[10], mcPhi[10], mcPt[10], mcQ[10] ;
162  float seedMomentum[10], seedEta[10], seedPhi[10], seedPt[10], seedQ[10] ;
163 
164 
165  //=========================================
166  // histograms
167  //=========================================
168 
170 
177 
183 
184  //TH1F *h_ele_vertexP;
186  TH1F *h_ele_Et;
188  //TH1F *h_ele_vertexAbsEta;
195 
196  TH1F *histNum_;
197 
198  TH1F *histSclEn_ ;
199  TH1F *histSclEt_ ;
200  TH1F *histSclEta_ ;
201  TH1F *histSclPhi_ ;
203 
209 // TH1F *h_ele_foundHits_barrel;
210 // TH1F *h_ele_foundHits_endcaps;
215 // TH1F *h_ele_lostHits_barrel;
216 // TH1F *h_ele_lostHits_endcaps;
220  TH1F *h_ele_chi2;
221 // TH1F *h_ele_chi2_barrel_;
222 // TH1F *h_ele_chi2_endcaps_;
226 
227  TH1F *h_ele_EoP;
228 // TH1F *h_ele_EoPout;
236 // TH1F *h_ele_dPhiEleCl_propOut_barrel;
237 // TH1F *h_ele_dPhiEleCl_propOut_endcaps;
238  TH1F *h_ele_HoE;
243 
246 
247  TH1F *h_ele_mva;
249 
258 
260 
261  // OBSOLETE
262  // TH1F *h_ele_PtoPtmatchingObject_matched; //OBSOLETE ?
263  // TH1F *h_ele_PtoPtmatchingObject_barrel_matched; //OBSOLETE ?
264  // TH1F *h_ele_PtoPtmatchingObject_endcaps_matched; //OBSOLETE ?
265  // TH1F *h_ele_PoPmatchingObject_matched; //OBSOLETE ?
266  // TH1F *h_ele_PoPmatchingObject_barrel_matched; //OBSOLETE ?
267  // TH1F *h_ele_PoPmatchingObject_endcaps_matched; //OBSOLETE ?
268  // TH1F *h_ele_EtaMnEtamatchingObject_matched; //OBSOLETE ?
269  // TH1F *h_ele_PhiMnPhimatchingObject_matched; //OBSOLETE ?
270  // TH1F *h_ele_PhiMnPhimatchingObject2_matched; //OBSOLETE ?
271 
272  };
273 
274 #endif
bool isEcalDriven_
Definition: DQMAnalyzer.h:84
TH1F * histNum_
Definition: DQMAnalyzer.h:196
double hcalIso03Depth2MaxEndcaps_
Definition: DQMAnalyzer.h:110
bool trigger(const edm::Event &e)
Definition: DQMAnalyzer.cc:939
double minEt_
Definition: DQMAnalyzer.h:78
double fhitsmax
Definition: DQMAnalyzer.h:128
TH1F * h_matchingObjectAbsEta
Definition: DQMAnalyzer.h:172
TFile * histfile_
Definition: DQMAnalyzer.h:157
double dEtaMinBarrel_
Definition: DQMAnalyzer.h:90
double lhitsmax
Definition: DQMAnalyzer.h:129
edm::InputTag beamSpot_
Definition: DQMAnalyzer.h:58
double hoemin
Definition: DQMAnalyzer.h:133
double eOverPMinBarrel_
Definition: DQMAnalyzer.h:86
float mcPt[10]
Definition: DQMAnalyzer.h:160
float seedPhi[10]
Definition: DQMAnalyzer.h:162
double etamin
Definition: DQMAnalyzer.h:119
double dEtaMaxEndcaps_
Definition: DQMAnalyzer.h:93
edm::InputTag matchingObjectCollection_
Definition: DQMAnalyzer.h:57
TH1F * h_ele_provenance
Definition: DQMAnalyzer.h:248
double ptmax
Definition: DQMAnalyzer.h:121
double sigIetaIetaMinEndcaps_
Definition: DQMAnalyzer.h:100
TH1F * h_ele_mva
Definition: DQMAnalyzer.h:247
double dPhiMinBarrel_
Definition: DQMAnalyzer.h:94
TH1F * h_matchingObjectEta
Definition: DQMAnalyzer.h:171
TH2F * h_ele_ambiguousTracksVsEta
Definition: DQMAnalyzer.h:205
double maxAbsEtaMatchingObject_
Definition: DQMAnalyzer.h:65
int nbindetamatch
Definition: DQMAnalyzer.h:126
TH1F * h_ele_Et
Definition: DQMAnalyzer.h:186
TH1F * h_ele_dEtaSc_propVtx
Definition: DQMAnalyzer.h:230
TH1F * h_ele_ecalRecHitSumEt_dr04
Definition: DQMAnalyzer.h:255
TH2F * h_ele_chi2VsPhi
Definition: DQMAnalyzer.h:224
TH1F * h_ele_dEtaEleCl_propOut
Definition: DQMAnalyzer.h:234
TH1F * h_ele_dPhiSc_propVtx
Definition: DQMAnalyzer.h:231
float superclusterPhi[10]
Definition: DQMAnalyzer.h:161
float mcEnergy[10]
Definition: DQMAnalyzer.h:160
double hcalIso03Depth1MaxBarrel_
Definition: DQMAnalyzer.h:108
TH1F * h_ele_ecalRecHitSumEt_dr03
Definition: DQMAnalyzer.h:251
TH1F * h_ele_vertexPhi
Definition: DQMAnalyzer.h:189
TH1F * h_ele_tkSumPt_dr03
Definition: DQMAnalyzer.h:250
double etamax
Definition: DQMAnalyzer.h:119
double poptruemin
Definition: DQMAnalyzer.h:131
bool generalCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
double dphimatchmax
Definition: DQMAnalyzer.h:127
float seedPt[10]
Definition: DQMAnalyzer.h:162
double massHigh_
Definition: DQMAnalyzer.h:71
double deltaR_
Definition: DQMAnalyzer.h:66
TH1F * h_matchingObjectP
Definition: DQMAnalyzer.h:173
TH1F * h_ele_matchingObjectAbsEta_matched
Definition: DQMAnalyzer.h:179
float mcPhi[10]
Definition: DQMAnalyzer.h:160
TH1F * h_ele_outerPt_mode
Definition: DQMAnalyzer.h:242
double maxPtMatchingObject_
Definition: DQMAnalyzer.h:64
bool readAOD_
Definition: DQMAnalyzer.h:61
double phimin
Definition: DQMAnalyzer.h:120
double detamatchmax
Definition: DQMAnalyzer.h:126
TH1F * h_ele_vertexX
Definition: DQMAnalyzer.h:190
double poptruemax
Definition: DQMAnalyzer.h:131
float seedMomentum[10]
Definition: DQMAnalyzer.h:162
double detamax
Definition: DQMAnalyzer.h:124
TH1F * histSclSigEtaEta_
Definition: DQMAnalyzer.h:202
double sigIetaIetaMaxBarrel_
Definition: DQMAnalyzer.h:99
bool PROBEetcut_
Definition: DQMAnalyzer.h:74
TH1F * h_ele_outerP_mode
Definition: DQMAnalyzer.h:240
TH1F * h_ele_hcalDepth1TowerSumEt_dr03
Definition: DQMAnalyzer.h:252
double hadronicOverEmMaxBarrel_
Definition: DQMAnalyzer.h:102
edm::ESHandle< TrackerGeometry > pDD
Definition: DQMAnalyzer.h:154
float superclusterEt[10]
Definition: DQMAnalyzer.h:161
double phimax
Definition: DQMAnalyzer.h:120
double hcalIso03Depth1MaxEndcaps_
Definition: DQMAnalyzer.h:109
TH1F * h_ele_hcalDepth1TowerSumEt_dr04
Definition: DQMAnalyzer.h:256
bool selected(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP)
bool isTrackerDriven_
Definition: DQMAnalyzer.h:85
double sigIetaIetaMaxEndcaps_
Definition: DQMAnalyzer.h:101
double dPhiMaxBarrel_
Definition: DQMAnalyzer.h:95
edm::ESHandle< MagneticField > theMagField
Definition: DQMAnalyzer.h:155
TH1F * h_ele_lostHits
Definition: DQMAnalyzer.h:214
void endJob() override
Definition: DQMAnalyzer.cc:449
float seedEta[10]
Definition: DQMAnalyzer.h:162
float seedQ[10]
Definition: DQMAnalyzer.h:162
TH2F * h_ele_lostHitsVsEta
Definition: DQMAnalyzer.h:217
double dphimin
Definition: DQMAnalyzer.h:125
unsigned int nAfterTrigger_
Definition: DQMAnalyzer.h:150
TH1F * h_ele_vertexEta
Definition: DQMAnalyzer.h:187
double eOverPMinEndcaps_
Definition: DQMAnalyzer.h:88
TH1F * h_ele_vertexZ
Definition: DQMAnalyzer.h:192
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: DQMAnalyzer.cc:650
TrajectoryStateTransform transformer_
Definition: DQMAnalyzer.h:153
std::vector< unsigned int > HLTPathsByIndex_
Definition: DQMAnalyzer.h:151
double pmax
Definition: DQMAnalyzer.h:122
TH2F * h_ele_lostHitsVsPhi
Definition: DQMAnalyzer.h:218
TH1F * h_ele_mee_os
Definition: DQMAnalyzer.h:259
double massLow_
Definition: DQMAnalyzer.h:70
double eOverPMaxBarrel_
Definition: DQMAnalyzer.h:87
bool isNotEBEEGap_
Definition: DQMAnalyzer.h:83
bool isolationCut(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP)
bool PROBEcheckclass_
Definition: DQMAnalyzer.h:75
double dphimatchmin
Definition: DQMAnalyzer.h:127
TH2F * h_ele_ambiguousTracksVsPhi
Definition: DQMAnalyzer.h:206
std::string outputFile_
Definition: DQMAnalyzer.h:55
TH1F * h_ele_vertexY
Definition: DQMAnalyzer.h:191
bool TAGcheckclass_
Definition: DQMAnalyzer.h:73
TH1F * histSclEta_
Definition: DQMAnalyzer.h:200
TH1F * h_matchingObjectPhi
Definition: DQMAnalyzer.h:175
bool idCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
double tkIso03Max_
Definition: DQMAnalyzer.h:107
double maxAbsEta_
Definition: DQMAnalyzer.h:80
TH1F * histSclEt_
Definition: DQMAnalyzer.h:199
TH1F * h_ele_matchingObjectZ_matched
Definition: DQMAnalyzer.h:182
TTree * tree_
Definition: DQMAnalyzer.h:158
TH1F * h_ele_foundHits
Definition: DQMAnalyzer.h:208
TH1F * h_ele_PinMnPout_mode
Definition: DQMAnalyzer.h:245
int nbindetamatch2D
Definition: DQMAnalyzer.h:126
int nbindphimatch2D
Definition: DQMAnalyzer.h:127
double eopmaxsht
Definition: DQMAnalyzer.h:123
TH2F * h_ele_chi2VsPt
Definition: DQMAnalyzer.h:225
TH1F * h_ele_dPhiEleCl_propOut
Definition: DQMAnalyzer.h:235
TH1F * h_matchingObjectZ
Definition: DQMAnalyzer.h:176
TH1F * histSclPhi_
Definition: DQMAnalyzer.h:201
TH1F * h_ele_matchingObjectPhi_matched
Definition: DQMAnalyzer.h:181
bool etCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
TH1F * h_ele_hcalDepth2TowerSumEt_dr03
Definition: DQMAnalyzer.h:253
TH2F * h_ele_foundHitsVsPhi
Definition: DQMAnalyzer.h:212
float mcQ[10]
Definition: DQMAnalyzer.h:160
~DQMAnalyzer() override
Definition: DQMAnalyzer.cc:177
double hadronicOverEmMaxEndcaps_
Definition: DQMAnalyzer.h:103
double tipMaxEndcaps_
Definition: DQMAnalyzer.h:106
double eOverPMaxEndcaps_
Definition: DQMAnalyzer.h:89
double meemin
Definition: DQMAnalyzer.h:132
TH2F * h_ele_foundHitsVsPt
Definition: DQMAnalyzer.h:213
TH1F * h_ele_outerP
Definition: DQMAnalyzer.h:239
TH1F * h_ele_outerPt
Definition: DQMAnalyzer.h:241
double meemax
Definition: DQMAnalyzer.h:132
std::vector< std::string > HLTPathsByName_
Definition: DQMAnalyzer.h:116
TH2F * h_ele_ambiguousTracksVsPt
Definition: DQMAnalyzer.h:207
std::string matchingCondition_
Definition: DQMAnalyzer.h:59
double sigIetaIetaMinBarrel_
Definition: DQMAnalyzer.h:98
TH1F * h_ele_EoP
Definition: DQMAnalyzer.h:227
double detamin
Definition: DQMAnalyzer.h:124
TH1F * h_ele_charge
Definition: DQMAnalyzer.h:194
TH1F * h_ele_tkSumPt_dr04
Definition: DQMAnalyzer.h:254
TH1F * h_ele_matchingObjectPt_matched
Definition: DQMAnalyzer.h:180
double detamatchmin
Definition: DQMAnalyzer.h:126
double minPt_
Definition: DQMAnalyzer.h:79
TH1F * h_ele_vertexPt
Definition: DQMAnalyzer.h:185
edm::InputTag electronCollection_
Definition: DQMAnalyzer.h:56
double ecalIso03MaxEndcaps_
Definition: DQMAnalyzer.h:112
TH1F * h_ele_dEtaCl_propOut
Definition: DQMAnalyzer.h:232
double hoemax
Definition: DQMAnalyzer.h:133
TH2F * h_ele_chi2VsEta
Definition: DQMAnalyzer.h:223
TH1F * h_matchingObjectPt
Definition: DQMAnalyzer.h:174
int nbindphimatch
Definition: DQMAnalyzer.h:127
TH1F * h_ele_EeleOPout
Definition: DQMAnalyzer.h:229
TH1F * h_ele_vertexTIP
Definition: DQMAnalyzer.h:193
edm::InputTag triggerResults_
Definition: DQMAnalyzer.h:115
TH1F * histSclEn_
Definition: DQMAnalyzer.h:198
TH1F * h_ele_dPhiCl_propOut
Definition: DQMAnalyzer.h:233
double dPhiMinEndcaps_
Definition: DQMAnalyzer.h:96
TH1F * h_ele_HoE
Definition: DQMAnalyzer.h:238
TH2F * h_ele_lostHitsVsPt
Definition: DQMAnalyzer.h:219
TH1F * h_ele_chi2
Definition: DQMAnalyzer.h:220
TH1F * h_ele_matchingObjectEta_matched
Definition: DQMAnalyzer.h:178
double dEtaMinEndcaps_
Definition: DQMAnalyzer.h:92
double dphimax
Definition: DQMAnalyzer.h:125
TH1F * h_matchingObjectNum
Definition: DQMAnalyzer.h:169
double eopmax
Definition: DQMAnalyzer.h:123
bool TPchecksign_
Definition: DQMAnalyzer.h:72
TH1F * h_ele_ambiguousTracks
Definition: DQMAnalyzer.h:204
unsigned int nEvents_
Definition: DQMAnalyzer.h:141
TH2F * h_ele_foundHitsVsEta
Definition: DQMAnalyzer.h:211
double dPhiMaxEndcaps_
Definition: DQMAnalyzer.h:97
double dEtaMaxBarrel_
Definition: DQMAnalyzer.h:91
float superclusterEnergy[10]
Definition: DQMAnalyzer.h:161
DQMAnalyzer(const edm::ParameterSet &conf)
Definition: DQMAnalyzer.cc:57
TH1F * h_ele_hcalDepth2TowerSumEt_dr04
Definition: DQMAnalyzer.h:257
void beginJob() override
Definition: DQMAnalyzer.cc:187
double mvaMin_
Definition: DQMAnalyzer.h:104
double tipMaxBarrel_
Definition: DQMAnalyzer.h:105
double ecalIso03MaxBarrel_
Definition: DQMAnalyzer.h:111
float superclusterEta[10]
Definition: DQMAnalyzer.h:161
float mcEta[10]
Definition: DQMAnalyzer.h:160
TH1F * h_ele_PinMnPout
Definition: DQMAnalyzer.h:244
int Selection_
Definition: DQMAnalyzer.h:69