CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual ~ElectronAnalyzer();
42 
43 // virtual void book() ;
44  virtual void bookHistograms( DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) ;
45  virtual void analyze( const edm::Event & e, const edm::EventSetup & c) ;
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
304 
305 
306  // histos for matching and matched objects
307 
308 // MonitorElement * h1_matchedEle_eta ;
309 // MonitorElement * h1_matchedEle_eta_golden ;
310 // MonitorElement * h1_matchedEle_eta_shower ;
311 // //MonitorElement * h1_matchedEle_eta_bbrem ;
312 // //MonitorElement * h1_matchedEle_eta_narrow ;
313 
315 // MonitorElement * h1_matchedObject_AbsEta ;
318 // MonitorElement * h1_matchedObject_Z ;
319 
320 // MonitorElement * h1_matchingObject_Num ;
322 // MonitorElement * h1_matchingObject_AbsEta ;
323 // MonitorElement * h1_matchingObject_P ;
326 // MonitorElement * h1_matchingObject_Z ;
327 
328  } ;
329 
330 #endif
331 
332 
333 
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
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_
MonitorElement * py_HoeVsPhi
MonitorElement * h1_matchedObject_Pt
double sigIetaIetaMinBarrel_
float superclusterPhi[10]
edm::ESHandle< MagneticField > theMagField
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
std::string inputFile_
MonitorElement * h1_matchedObject_Phi
MonitorElement * h1_PFem_dr03
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
tuple conf
Definition: dbtoconf.py:185
MonitorElement * py_nVerticesVsLs
MonitorElement * h1_dPhiSc_propVtx_endcapsNeg
ElectronAnalyzer(const edm::ParameterSet &conf)
edm::EDGetTokenT< reco::GsfTrackCollection > gsftrackCollection_
MonitorElement * h1_vertexPt_endcaps
MonitorElement * py_lostHitsVsPhi
MonitorElement * h1_vertexZ
MonitorElement * py_dPhiSc_propVtxVsPhi
double hcalIso03Depth1MaxEndcaps_
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
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
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
virtual ~ElectronAnalyzer()
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_
double hadronicOverEmMaxBarrel_
MonitorElement * h1_matchedObject_Eta
MonitorElement * h1_matchingObject_Pt
MonitorElement * h1_dPhiEleCl_propOut_barrel
MonitorElement * h1_mva
Definition: Run.h:43
bool isolationCut(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP)
MonitorElement * h1_triggers