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 
40 
41  recoElectron_.isVetoElectron.push_back( (*(eleVIDDecisionHandles[0]))[electronEdmRef] );
42  recoElectron_.isLooseElectron.push_back( (*(eleVIDDecisionHandles[1]))[electronEdmRef] );
43  recoElectron_.isMediumElectron.push_back( (*(eleVIDDecisionHandles[2]))[electronEdmRef] );
44  recoElectron_.isTightElectron.push_back( (*(eleVIDDecisionHandles[3]))[electronEdmRef] );
45 
46  double iso = (el->pfIsolationVariables().sumChargedHadronPt + max(
47  el->pfIsolationVariables().sumNeutralHadronEt +
48  el->pfIsolationVariables().sumPhotonEt -
49  0.5 * el->pfIsolationVariables().sumPUPt, 0.0)) / el->pt();
50 
51  recoElectron_.iso.push_back(iso);
52  // cout<<ConversionTools::hasMatchedConversion(*el,conversions,theBeamSpot->position())<<endl;
53 
55 
56  }
57  // for(reco::GsfElectronCollection::const_iterator it=electrons->begin();
58  // it!=electrons->end() && recoElectron_.nElectrons < maxElectron;
59  // ++it) {
60 
61  // recoElectron_.e.push_back(it->energy());
62  // recoElectron_.pt.push_back(it->pt());
63  // recoElectron_.et.push_back(it->et());
64  // recoElectron_.eta.push_back(it->eta());
65  // recoElectron_.phi.push_back(it->phi());
66 
67  // // cout<<it->superCluster().position().eta()<<endl;
68  // isVetoElectronCustom(*it, vertices, conversions, theBeamSpot, Rho);
69 
70  // // cout<<ConversionTools::hasMatchedConversion(*it,conversions,theBeamSpot->position())<<endl;
71 
72  // recoElectron_.nElectrons++;
73 
74  // }
75 }
L1AnalysisRecoElectronDataFormat recoElectron_

Member Data Documentation

L1AnalysisRecoElectronDataFormat L1Analysis::L1AnalysisRecoElectron::recoElectron_
private

Definition at line 51 of file L1AnalysisRecoElectron.h.

Referenced by getData(), and Reset().