CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 25 of file L1AnalysisRecoElectron.h.

Constructor & Destructor Documentation

L1Analysis::L1AnalysisRecoElectron::L1AnalysisRecoElectron ( )

Definition at line 5 of file L1AnalysisRecoElectron.cc.

6 {
7 }
L1Analysis::L1AnalysisRecoElectron::~L1AnalysisRecoElectron ( )

Definition at line 10 of file L1AnalysisRecoElectron.cc.

11 {
12 }

Member Function Documentation

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

Definition at line 47 of file L1AnalysisRecoElectron.h.

References recoElectron_.

47 {return &recoElectron_;}
L1AnalysisRecoElectronDataFormat recoElectron_
void L1Analysis::L1AnalysisRecoElectron::Reset ( void  )
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 14 of file L1AnalysisRecoElectron.cc.

References eta, bookConverter::max, and phi.

Referenced by L1ElectronRecoTreeProducer::analyze().

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

Member Data Documentation

L1AnalysisRecoElectronDataFormat L1Analysis::L1AnalysisRecoElectron::recoElectron_
private

Definition at line 51 of file L1AnalysisRecoElectron.h.

Referenced by getData(), and Reset().