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