19 const unsigned& maxElectron)
23 recoElectron_.nElectrons=0;
25 for(reco::GsfElectronCollection::const_iterator el=electrons->begin();
26 el!=electrons->end() && recoElectron_.nElectrons < maxElectron;
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());
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] );
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();
52 recoElectron_.iso.push_back(iso);
55 recoElectron_.nElectrons++;
def setup(process, global_tag, zero_tesla=False)
~L1AnalysisRecoElectron()
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)