CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1Analysis::L1AnalysisRecoElectron Class Reference

#include <L1AnalysisRecoElectron.h>

Public Member Functions

L1AnalysisRecoElectronDataFormatgetData ()
 
 L1AnalysisRecoElectron ()
 
void Reset ()
 
void SetElectron (const edm::Event &event, const edm::EventSetup &setup, const edm::Handle< reco::GsfElectronCollection > electrons, const std::vector< edm::Handle< edm::ValueMap< bool > > > eleVIDDecisionHandles, const unsigned &maxElectron)
 
 ~L1AnalysisRecoElectron ()
 

Private Attributes

L1AnalysisRecoElectronDataFormat recoElectron_
 

Detailed Description

Definition at line 22 of file L1AnalysisRecoElectron.h.

Constructor & Destructor Documentation

L1Analysis::L1AnalysisRecoElectron::L1AnalysisRecoElectron ( )

Definition at line 5 of file L1AnalysisRecoElectron.cc.

5 {}
L1Analysis::L1AnalysisRecoElectron::~L1AnalysisRecoElectron ( )

Definition at line 7 of file L1AnalysisRecoElectron.cc.

7 {}

Member Function Documentation

L1AnalysisRecoElectronDataFormat* L1Analysis::L1AnalysisRecoElectron::getData ( void  )
inline

Definition at line 43 of file L1AnalysisRecoElectron.h.

References recoElectron_.

43 { return &recoElectron_; }
L1AnalysisRecoElectronDataFormat recoElectron_
void L1Analysis::L1AnalysisRecoElectron::Reset ( )
inline
void L1Analysis::L1AnalysisRecoElectron::SetElectron ( const edm::Event event,
const edm::EventSetup setup,
const edm::Handle< reco::GsfElectronCollection electrons,
const std::vector< edm::Handle< edm::ValueMap< bool > > >  eleVIDDecisionHandles,
const unsigned &  maxElectron 
)

Definition at line 9 of file L1AnalysisRecoElectron.cc.

References PVValHelper::eta, SiStripPI::max, l1ElectronRecoTree_cfi::maxElectron, and phi.

Referenced by L1ElectronRecoTreeProducer::analyze().

17 {
19 
20  for (reco::GsfElectronCollection::const_iterator el = electrons->begin();
21  el != electrons->end() && recoElectron_.nElectrons < maxElectron;
22  ++el) {
23  recoElectron_.e.push_back(el->energy());
24  recoElectron_.pt.push_back(el->pt());
25  recoElectron_.et.push_back(el->et());
26  recoElectron_.eta.push_back(el->eta());
27  recoElectron_.phi.push_back(el->phi());
28  recoElectron_.eta_SC.push_back((el->superClusterPosition()).eta());
29  recoElectron_.phi_SC.push_back((el->superClusterPosition()).phi());
30  recoElectron_.e_ECAL.push_back(el->ecalEnergy());
31  recoElectron_.e_SC.push_back(el->superCluster()->energy());
32  recoElectron_.charge.push_back(el->charge());
33 
35 
36  recoElectron_.isVetoElectron.push_back((*(eleVIDDecisionHandles[0]))[electronEdmRef]);
37  recoElectron_.isLooseElectron.push_back((*(eleVIDDecisionHandles[1]))[electronEdmRef]);
38  recoElectron_.isMediumElectron.push_back((*(eleVIDDecisionHandles[2]))[electronEdmRef]);
39  recoElectron_.isTightElectron.push_back((*(eleVIDDecisionHandles[3]))[electronEdmRef]);
40 
41  double iso = (el->pfIsolationVariables().sumChargedHadronPt +
42  max(el->pfIsolationVariables().sumNeutralHadronEt + el->pfIsolationVariables().sumPhotonEt -
43  0.5 * el->pfIsolationVariables().sumPUPt,
44  0.0)) /
45  el->pt();
46 
47  recoElectron_.iso.push_back(iso);
48  // cout<<ConversionTools::hasMatchedConversion(*el,conversions,theBeamSpot->position())<<endl;
49 
51  }
52  // for(reco::GsfElectronCollection::const_iterator it=electrons->begin();
53  // it!=electrons->end() && recoElectron_.nElectrons < maxElectron;
54  // ++it) {
55 
56  // recoElectron_.e.push_back(it->energy());
57  // recoElectron_.pt.push_back(it->pt());
58  // recoElectron_.et.push_back(it->et());
59  // recoElectron_.eta.push_back(it->eta());
60  // recoElectron_.phi.push_back(it->phi());
61 
62  // // cout<<it->superCluster().position().eta()<<endl;
63  // isVetoElectronCustom(*it, vertices, conversions, theBeamSpot, Rho);
64 
65  // // cout<<ConversionTools::hasMatchedConversion(*it,conversions,theBeamSpot->position())<<endl;
66 
67  // recoElectron_.nElectrons++;
68 
69  // }
70 }
L1AnalysisRecoElectronDataFormat recoElectron_

Member Data Documentation

L1AnalysisRecoElectronDataFormat L1Analysis::L1AnalysisRecoElectron::recoElectron_
private

Definition at line 47 of file L1AnalysisRecoElectron.h.

Referenced by getData(), and Reset().