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 
7 
10 
26 
29 
30 class MagneticField ;
31 
35 
37  {
38  public:
39 
40  explicit ElectronAnalyzer(const edm::ParameterSet& conf);
41  ~ElectronAnalyzer() override;
42 
43 // virtual void book() ;
44  void bookHistograms( DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override ;
45  void analyze( const edm::Event & e, const edm::EventSetup & c) override ;
46 
47  private:
48 
49  //=========================================
50  // parameters
51  //=========================================
52 
53  // general, collections
61  bool readAOD_; //NEW
62 
67 
68  // matching
70  double maxPtMatchingObject_; // SURE ?
71  double maxAbsEtaMatchingObject_; // SURE ?
72  double deltaR_;
73 
74  // electron selection NEW
75  double minEt_;
76  double minPt_;
77  double maxAbsEta_;
78  bool isEB_;
79  bool isEE_;
101  double mvaMin_;
104  double tkIso03Max_;
110 
111  // for trigger NEW
113 // std::vector<std::string > HLTPathsByName_;
114 
115  // histos limits and binning
116  int nbineta; int nbineta2D; double etamin; double etamax;
117  int nbinphi; int nbinphi2D; double phimin; double phimax;
118  int nbinpt; int nbinpteff; int nbinpt2D; double ptmax;
119  int nbinp; int nbinp2D; double pmax;
120  int nbineop; int nbineop2D; double eopmax; double eopmaxsht;
121  int nbindeta; double detamin; double detamax;
122  int nbindphi; double dphimin; double dphimax;
125  int nbinfhits; double fhitsmax;
126  int nbinlhits; double lhitsmax;
127  int nbinxyz; int nbinxyz2D;
128  int nbinpoptrue; double poptruemin; double poptruemax; //NEW
129  int nbinmee; double meemin; double meemax; //NEW
130  int nbinhoe; double hoemin; double hoemax; //NEW
131 // bool set_EfficiencyFlag ; bool set_StatOverflowFlag ;
132 
133  //=========================================
134  // general attributes and utility methods
135  //=========================================
136 
137  unsigned int nEvents_ ;
138 
139  float computeInvMass
140  ( const reco::GsfElectron & e1,
141  const reco::GsfElectron & e2 ) ;
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 
155 
156  float mcEnergy[10], mcEta[10], mcPhi[10], mcPt[10], mcQ[10];
158  float seedMomentum[10], seedEta[10], seedPhi[10], seedPt[10], seedQ[10];
159 
160  //=========================================
161  // histograms
162  //=========================================
163 
164  // general
172 
173  // basic quantities
174 // MonitorElement * h1_num_ ; // number of electrons in a single event
175 // MonitorElement * h1_charge ;
176 // MonitorElement * h1_vertexP ;
177 // MonitorElement * h1_Et ;
178 // MonitorElement * h1_vertexTIP ;
179 // MonitorElement * h1_vertexPhi ;
180 // MonitorElement * h1_vertexX ;
181 // MonitorElement * h1_vertexY ;
188 
189  // super-clusters
190 // MonitorElement * h1_sclEn ;
191 // MonitorElement * h1_sclEta ;
192 // MonitorElement * h1_sclPhi ;
194 
195  // gsf tracks
196 // MonitorElement * h1_ambiguousTracks ;
197 // MonitorElement * h2ele_ambiguousTracksVsEta ;
198 // MonitorElement * h2_ambiguousTracksVsPhi ;
199 // MonitorElement * h2_ambiguousTracksVsPt ;
203 // MonitorElement * h2_chi2VsPt ;
207 // MonitorElement * h2_foundHitsVsPt ;
211 // MonitorElement * h2_lostHitsVsPt ;
212 
213  // electron matching and ID
214  //MonitorElement * h_EopOut ;
215  //MonitorElement * h_dEtaCl_propOut ;
216  //MonitorElement * h_dPhiCl_propOut ;
217 // MonitorElement * h1_Eop ;
218 // MonitorElement * h2_EopVsEta ;
222 // MonitorElement * h1_EopVsPt ;
223 // MonitorElement * h1_EeleOPout ;
224 // MonitorElement * h2_EeleOPoutVsEta ;
227 // MonitorElement * h2_EeleOPoutVsPhi ;
228 // MonitorElement * h2_EeleOPoutVsPt ;
229 // MonitorElement * h1_dEtaSc_propVtx ;
230 // MonitorElement * h2_dEtaSc_propVtxVsEta ;
235 // MonitorElement * h2_dEtaSc_propVtxVsPt ;
236 // MonitorElement * h1_dEtaEleCl_propOut ;
237 // MonitorElement * h2_dEtaEleCl_propOutVsEta ;
241 // MonitorElement * h2_dEtaEleCl_propOutVsPhi ;
242 // MonitorElement * h2_dEtaEleCl_propOutVsPt ;
243 // MonitorElement * h1_dPhiSc_propVtx ;
244 // MonitorElement * h2_dPhiSc_propVtxVsEta ;
249 // MonitorElement * h2_dPhiSc_propVtxVsPt ;
250 // MonitorElement * h1_dPhiEleCl_propOut ;
251 // MonitorElement * h2_dPhiEleCl_propOutVsEta ;
255 // MonitorElement * h2_dPhiEleCl_propOutVsPhi ;
256 // MonitorElement * h2_dPhiEleCl_propOutVsPt ;
257 // MonitorElement * h1_Hoe ;
258 // MonitorElement * h2_HoeVsEta ;
262 // MonitorElement * h2_HoeVsPt ;
267 
268  // fbrem related variables
269  //MonitorElement * h_outerP ;
270  //MonitorElement * h_outerP_mode ;
271 // MonitorElement * h_innerPt_mean ;
272 // MonitorElement * h_outerPt_mean ;
273 // MonitorElement * h_outerPt_mode ;
274 // MonitorElement * h_PinMnPout ;
275 // MonitorElement * h_PinMnPout_mode ;
279 // MonitorElement * h2_fbremVsPt ;
281 
282  // pflow
285 
286  // isolation
293 // MonitorElement * h1_hcalDepth1TowerSumEt_dr03 ;
294 // MonitorElement * h1_hcalDepth2TowerSumEt_dr03 ;
295 // MonitorElement * h1_tkSumPt_dr04 ;
296 // MonitorElement * h1_ecalRecHitSumEt_dr04 ;
297 // MonitorElement * h1_hcalTowerSumEt_dr04 ;
300 
301  // di-electron mass
307 
308 
309  // histos for matching and matched objects
310 
311 // MonitorElement * h1_matchedEle_eta ;
312 // MonitorElement * h1_matchedEle_eta_golden ;
313 // MonitorElement * h1_matchedEle_eta_shower ;
314 // //MonitorElement * h1_matchedEle_eta_bbrem ;
315 // //MonitorElement * h1_matchedEle_eta_narrow ;
316 
318 // MonitorElement * h1_matchedObject_AbsEta ;
321 // MonitorElement * h1_matchedObject_Z ;
322 
323 // MonitorElement * h1_matchingObject_Num ;
325 // MonitorElement * h1_matchingObject_AbsEta ;
326 // MonitorElement * h1_matchingObject_P ;
329 // MonitorElement * h1_matchingObject_Z ;
330 
331  } ;
332 
333 #endif
334 
335 
336 
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