CMS 3D CMS Logo

ElectronAnalyzer.h
Go to the documentation of this file.
1 
2 #ifndef DQMOffline_EGamma_ElectronAnalyzer_h
3 #define DQMOffline_EGamma_ElectronAnalyzer_h
4 
6 
9 
25 
28 
29 class MagneticField;
30 
34 
36 public:
37  explicit ElectronAnalyzer(const edm::ParameterSet &conf);
38  ~ElectronAnalyzer() override;
39 
40  // virtual void book() ;
41  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
42  void analyze(const edm::Event &e, const edm::EventSetup &c) override;
43 
44 private:
45  //=========================================
46  // parameters
47  //=========================================
48 
49  // general, collections
57  bool readAOD_; //NEW
58 
63 
64  // matching
66  double maxPtMatchingObject_; // SURE ?
67  double maxAbsEtaMatchingObject_; // SURE ?
68  double deltaR_;
69 
70  // electron selection NEW
71  double minEt_;
72  double minPt_;
73  double maxAbsEta_;
74  bool isEB_;
75  bool isEE_;
97  double mvaMin_;
98  double tipMaxBarrel_;
100  double tkIso03Max_;
106 
107  // for trigger NEW
109  // std::vector<std::string > HLTPathsByName_;
110 
111  // histos limits and binning
112  int nbineta;
114  double etamin;
115  double etamax;
116  int nbinphi;
118  double phimin;
119  double phimax;
120  int nbinpt;
122  int nbinpt2D;
123  double ptmax;
124  int nbinp;
125  int nbinp2D;
126  double pmax;
127  int nbineop;
129  double eopmax;
130  double eopmaxsht;
131  int nbindeta;
132  double detamin;
133  double detamax;
134  int nbindphi;
135  double dphimin;
136  double dphimax;
139  double detamatchmin;
140  double detamatchmax;
143  double dphimatchmin;
144  double dphimatchmax;
146  double fhitsmax;
148  double lhitsmax;
149  int nbinxyz;
152  double poptruemin;
153  double poptruemax; //NEW
154  int nbinmee;
155  double meemin;
156  double meemax; //NEW
157  int nbinhoe;
158  double hoemin;
159  double hoemax; //NEW
160  // bool set_EfficiencyFlag ; bool set_StatOverflowFlag ;
161 
162  //=========================================
163  // general attributes and utility methods
164  //=========================================
165 
166  unsigned int nEvents_;
167 
168  float computeInvMass(const reco::GsfElectron &e1, const reco::GsfElectron &e2);
169 
170  bool selected(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP);
171  bool generalCut(const reco::GsfElectronCollection::const_iterator &gsfIter);
172  bool etCut(const reco::GsfElectronCollection::const_iterator &gsfIter);
173  bool isolationCut(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP);
174  bool idCut(const reco::GsfElectronCollection::const_iterator &gsfIter);
175 
176  // bool trigger( const edm::Event & e ) ;
177  // unsigned int nAfterTrigger_;
178  // std::vector<unsigned int> HLTPathsByIndex_;
179 
182 
183  float mcEnergy[10], mcEta[10], mcPhi[10], mcPt[10], mcQ[10];
185  float seedMomentum[10], seedEta[10], seedPhi[10], seedPt[10], seedQ[10];
186 
187  //=========================================
188  // histograms
189  //=========================================
190 
191  // general
199 
200  // basic quantities
201  // MonitorElement * h1_num_ ; // number of electrons in a single event
202  // MonitorElement * h1_charge ;
203  // MonitorElement * h1_vertexP ;
204  // MonitorElement * h1_Et ;
205  // MonitorElement * h1_vertexTIP ;
206  // MonitorElement * h1_vertexPhi ;
207  // MonitorElement * h1_vertexX ;
208  // MonitorElement * h1_vertexY ;
215 
216  // super-clusters
217  // MonitorElement * h1_sclEn ;
218  // MonitorElement * h1_sclEta ;
219  // MonitorElement * h1_sclPhi ;
221 
222  // gsf tracks
223  // MonitorElement * h1_ambiguousTracks ;
224  // MonitorElement * h2ele_ambiguousTracksVsEta ;
225  // MonitorElement * h2_ambiguousTracksVsPhi ;
226  // MonitorElement * h2_ambiguousTracksVsPt ;
230  // MonitorElement * h2_chi2VsPt ;
234  // MonitorElement * h2_foundHitsVsPt ;
238  // MonitorElement * h2_lostHitsVsPt ;
239 
240  // electron matching and ID
241  //MonitorElement * h_EopOut ;
242  //MonitorElement * h_dEtaCl_propOut ;
243  //MonitorElement * h_dPhiCl_propOut ;
244  // MonitorElement * h1_Eop ;
245  // MonitorElement * h2_EopVsEta ;
249  // MonitorElement * h1_EopVsPt ;
250  // MonitorElement * h1_EeleOPout ;
251  // MonitorElement * h2_EeleOPoutVsEta ;
254  // MonitorElement * h2_EeleOPoutVsPhi ;
255  // MonitorElement * h2_EeleOPoutVsPt ;
256  // MonitorElement * h1_dEtaSc_propVtx ;
257  // MonitorElement * h2_dEtaSc_propVtxVsEta ;
262  // MonitorElement * h2_dEtaSc_propVtxVsPt ;
263  // MonitorElement * h1_dEtaEleCl_propOut ;
264  // MonitorElement * h2_dEtaEleCl_propOutVsEta ;
268  // MonitorElement * h2_dEtaEleCl_propOutVsPhi ;
269  // MonitorElement * h2_dEtaEleCl_propOutVsPt ;
270  // MonitorElement * h1_dPhiSc_propVtx ;
271  // MonitorElement * h2_dPhiSc_propVtxVsEta ;
276  // MonitorElement * h2_dPhiSc_propVtxVsPt ;
277  // MonitorElement * h1_dPhiEleCl_propOut ;
278  // MonitorElement * h2_dPhiEleCl_propOutVsEta ;
282  // MonitorElement * h2_dPhiEleCl_propOutVsPhi ;
283  // MonitorElement * h2_dPhiEleCl_propOutVsPt ;
284  // MonitorElement * h1_Hoe ;
285  // MonitorElement * h2_HoeVsEta ;
289  // MonitorElement * h2_HoeVsPt ;
294 
295  // fbrem related variables
296  //MonitorElement * h_outerP ;
297  //MonitorElement * h_outerP_mode ;
298  // MonitorElement * h_innerPt_mean ;
299  // MonitorElement * h_outerPt_mean ;
300  // MonitorElement * h_outerPt_mode ;
301  // MonitorElement * h_PinMnPout ;
302  // MonitorElement * h_PinMnPout_mode ;
306  // MonitorElement * h2_fbremVsPt ;
308 
309  // pflow
312 
313  // isolation
320  // MonitorElement * h1_hcalDepth1TowerSumEt_dr03 ;
321  // MonitorElement * h1_hcalDepth2TowerSumEt_dr03 ;
322  // MonitorElement * h1_tkSumPt_dr04 ;
323  // MonitorElement * h1_ecalRecHitSumEt_dr04 ;
324  // MonitorElement * h1_hcalTowerSumEt_dr04 ;
327 
328  // di-electron mass
334 
335  // histos for matching and matched objects
336 
337  // MonitorElement * h1_matchedEle_eta ;
338  // MonitorElement * h1_matchedEle_eta_golden ;
339  // MonitorElement * h1_matchedEle_eta_shower ;
340  // //MonitorElement * h1_matchedEle_eta_bbrem ;
341  // //MonitorElement * h1_matchedEle_eta_narrow ;
342 
344  // MonitorElement * h1_matchedObject_AbsEta ;
347  // MonitorElement * h1_matchedObject_Z ;
348 
349  // MonitorElement * h1_matchingObject_Num ;
351  // MonitorElement * h1_matchingObject_AbsEta ;
352  // MonitorElement * h1_matchingObject_P ;
355  // MonitorElement * h1_matchingObject_Z ;
356 };
357 
358 #endif
MonitorElement * py_nElectronsVsLs
MonitorElement * h1_foundHits
MonitorElement * h2_beamSpotXvsY
MonitorElement * h1_dEtaSc_propVtx_endcapsPos
double hadronicOverEmMaxEndcaps_
MonitorElement * h1_mee_os
bool selected(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP)
MonitorElement * h1_dPhiSc_propVtx_barrel
unsigned int nEvents_
MonitorElement * h1_vertexPt_barrel
MonitorElement * h1_PFch_dr03
MonitorElement * py_lostHitsVsEta
MonitorElement * h1_mee_os_bb
edm::ESHandle< TrackerGeometry > pDD
MonitorElement * h1_sclSigEtaEta_barrel
MonitorElement * py_chi2VsEta
edm::EDGetTokenT< reco::SuperClusterCollection > matchingObjectCollection_
MonitorElement * h1_vertexEta
MonitorElement * py_chi2VsPhi
MonitorElement * h1_Eop_endcaps
MonitorElement * h1_ecalRecHitSumEt_dr03
MonitorElement * h1_hcalTowerSumEt_dr03
std::string inputInternalPath_
MonitorElement * h1_dPhiEleCl_propOut_endcapsNeg
MonitorElement * h1_matchingObject_Eta
MonitorElement * h1_Hoe_barrel
edm::InputTag triggerResults_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * py_HoeVsPhi
MonitorElement * h1_matchedObject_Pt
double sigIetaIetaMinBarrel_
float superclusterPhi[10]
edm::ESHandle< MagneticField > theMagField
std::string inputFile_
MonitorElement * h1_matchedObject_Phi
MonitorElement * h1_PFem_dr03
MonitorElement * h1_mee_os_ee
MonitorElement * h1_tkSumPt_dr03
MonitorElement * h1_dEtaEleCl_propOut_endcapsPos
std::string outputFile_
double sigIetaIetaMaxBarrel_
float superclusterEta[10]
MonitorElement * h2_vertexXvsY
MonitorElement * h1_dPhiSc_propVtx_endcapsPos
MonitorElement * py_fbremVsEta
MonitorElement * h1_provenance
MonitorElement * h1_dEtaEleCl_propOut_barrel
MonitorElement * py_nTracksVsLs
MonitorElement * py_EopVsPhi
MonitorElement * h1_PFnh_dr03
MonitorElement * h1_Eop_barrel
MonitorElement * py_nGsfTracksVsLs
double sigIetaIetaMinEndcaps_
MonitorElement * py_nClustersVsLs
MonitorElement * py_dEtaSc_propVtxVsPhi
double sigIetaIetaMaxEndcaps_
std::string matchingCondition_
MonitorElement * h1_dPhiEleCl_propOut_endcapsPos
double hcalIso03Depth1MaxBarrel_
MonitorElement * h1_Hoe_endcaps
MonitorElement * h1_dEtaEleCl_propOut_endcapsNeg
MonitorElement * py_nVerticesVsLs
MonitorElement * h1_dPhiSc_propVtx_endcapsNeg
ElectronAnalyzer(const edm::ParameterSet &conf)
~ElectronAnalyzer() override
edm::EDGetTokenT< reco::GsfTrackCollection > gsftrackCollection_
MonitorElement * h1_vertexPt_endcaps
MonitorElement * py_lostHitsVsPhi
MonitorElement * h1_vertexZ
MonitorElement * py_dPhiSc_propVtxVsPhi
double hcalIso03Depth1MaxEndcaps_
MonitorElement * py_fbremVsPhi
MonitorElement * h1_dEtaSc_propVtx_endcapsNeg
MonitorElement * py_foundHitsVsPhi
bool etCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
MonitorElement * h1_fbrem
edm::EDGetTokenT< reco::TrackCollection > trackCollection_
MonitorElement * h1_chi2
double maxAbsEtaMatchingObject_
MonitorElement * h1_lostHits
MonitorElement * h2_vertexEtaVsPhi
MonitorElement * h1_EeleOPout_endcaps
MonitorElement * h1_mee
edm::EDGetTokenT< reco::GsfElectronCollection > electronCollection_
MonitorElement * h1_classes
MonitorElement * h1_sclEt
MonitorElement * h1_sigIEtaIEta5x5_barrel
MonitorElement * h1_EeleOPout_barrel
std::string outputInternalPath_
bool generalCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
MonitorElement * h1_dEtaSc_propVtx_barrel
float computeInvMass(const reco::GsfElectron &e1, const reco::GsfElectron &e2)
MonitorElement * h1_matchingObject_Phi
MonitorElement * h1_mee_os_eb
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
float superclusterEt[10]
MonitorElement * h1_sigIEtaIEta5x5_endcaps
MonitorElement * h1_sclSigEtaEta_endcaps
MonitorElement * py_foundHitsVsEta
edm::EDGetTokenT< reco::VertexCollection > vertexCollection_
float superclusterEnergy[10]
bool idCut(const reco::GsfElectronCollection::const_iterator &gsfIter)
double hcalIso03Depth2MaxEndcaps_
void analyze(const edm::Event &e, const edm::EventSetup &c) override
double hadronicOverEmMaxBarrel_
MonitorElement * h1_matchedObject_Eta
MonitorElement * h1_matchingObject_Pt
MonitorElement * h1_dPhiEleCl_propOut_barrel
MonitorElement * h1_mva
Definition: Run.h:45
bool isolationCut(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP)
MonitorElement * h1_triggers