CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
lowptgsfeleid::Features Class Reference

#include <LowPtGsfElectronIDHeavyObjectCache.h>

Public Member Functions

std::vector< float > get ()
 
void set (const reco::GsfElectronRef &ele, double rho)
 

Public Attributes

float brem_frac_ = -1.
 
float ele_pt_ = -1.
 
float gsf_chi2red_ = -1.
 
float gsf_nhits_ = -1.
 
float match_eclu_EoverP_ = -1.
 
float match_SC_dEta_ = -1.
 
float match_SC_dPhi_ = -1.
 
float match_SC_EoverP_ = -1.
 
float match_seed_dEta_ = -1.
 
float rho_ = -1.
 
float sc_E_ = -1.
 
float sc_eta_ = -1.
 
float sc_etaWidth_ = -1.
 
float sc_phiWidth_ = -1.
 
float shape_full5x5_circularity_ = -1.
 
float shape_full5x5_HoverE_ = -1.
 
float shape_full5x5_r9_ = -1.
 
float shape_full5x5_sigmaIetaIeta_ = -1.
 
float shape_full5x5_sigmaIphiIphi_ = -1.
 
float trk_chi2red_ = -1.
 
float trk_nhits_ = -1.
 
float trk_p_ = -1.
 

Detailed Description

Definition at line 16 of file LowPtGsfElectronIDHeavyObjectCache.h.

Member Function Documentation

std::vector< float > lowptgsfeleid::Features::get ( )

Definition at line 17 of file LowPtGsfElectronIDHeavyObjectCache.cc.

References brem_frac_, ele_pt_, gsf_chi2red_, gsf_nhits_, match_eclu_EoverP_, match_SC_dEta_, match_SC_dPhi_, match_SC_EoverP_, match_seed_dEta_, convertSQLitetoXML_cfg::output, rho_, sc_E_, sc_eta_, sc_etaWidth_, sc_phiWidth_, shape_full5x5_circularity_, shape_full5x5_HoverE_, shape_full5x5_r9_, shape_full5x5_sigmaIetaIeta_, shape_full5x5_sigmaIphiIphi_, trk_chi2red_, trk_nhits_, and trk_p_.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

17  {
18  std::vector<float> output = {
19  rho_,
20  ele_pt_,
21  sc_eta_,
29  trk_nhits_,
32  brem_frac_,
33  gsf_nhits_,
39  sc_E_,
40  trk_p_,
41  };
42  return output;
43  }
void lowptgsfeleid::Features::set ( const reco::GsfElectronRef ele,
double  rho 
)

Definition at line 47 of file LowPtGsfElectronIDHeavyObjectCache.cc.

References brem_frac_, ele_pt_, objects.autophobj::float, ntupleEnum::gsf, gsf_chi2red_, gsf_nhits_, edm::Ref< C, T, F >::isNonnull(), match_eclu_EoverP_, match_SC_dEta_, match_SC_dPhi_, match_SC_EoverP_, match_seed_dEta_, rho_, SimDataFormats::CaloAnalysis::sc, sc_E_, sc_eta_, sc_etaWidth_, sc_phiWidth_, shape_full5x5_circularity_, shape_full5x5_HoverE_, shape_full5x5_r9_, shape_full5x5_sigmaIetaIeta_, shape_full5x5_sigmaIphiIphi_, trk_chi2red_, trk_nhits_, and trk_p_.

Referenced by lowptgsfeleid::HeavyObjectCache::eval().

47  {
48 
49  // KF tracks
50  if ( ele->core().isNonnull() ) {
51  reco::TrackRef trk = ele->core()->ctfTrack(); //@@ is this what we want?!
52  if ( trk.isNonnull() ) {
53  trk_p_ = float(trk->p());
54  trk_nhits_ = float(trk->found());
55  trk_chi2red_ = float(trk->normalizedChi2());
56  }
57  }
58 
59  // GSF tracks
60  if ( ele->core().isNonnull() ) {
61  reco::GsfTrackRef gsf = ele->core()->gsfTrack();
62  if ( gsf.isNonnull() ) {
63  gsf_nhits_ = gsf->found();
64  gsf_chi2red_ = gsf->normalizedChi2();
65  }
66  }
67 
68  // Super clusters
69  if ( ele->core().isNonnull() ) {
70  reco::SuperClusterRef sc = ele->core()->superCluster();
71  if ( sc.isNonnull() ) {
72  sc_E_ = sc->energy();
73  sc_eta_ = sc->eta();
74  sc_etaWidth_ = sc->etaWidth();
75  sc_phiWidth_ = sc->phiWidth();
76  }
77  }
78 
79  // Track-cluster matching
80  if ( ele.isNonnull() ) {
81  match_seed_dEta_ = ele->deltaEtaSeedClusterTrackAtCalo();
82  match_eclu_EoverP_ = (1./ele->ecalEnergy()) - (1./ele->p());
83  match_SC_EoverP_ = ele->eSuperClusterOverP();
84  match_SC_dEta_ = ele->deltaEtaSuperClusterTrackAtVtx();
85  match_SC_dPhi_ = ele->deltaPhiSuperClusterTrackAtVtx();
86  }
87 
88  // Shower shape vars
89  if ( ele.isNonnull() ) {
90  shape_full5x5_sigmaIetaIeta_ = ele->full5x5_sigmaIetaIeta();
91  shape_full5x5_sigmaIphiIphi_ = ele->full5x5_sigmaIphiIphi();
92  shape_full5x5_HoverE_ = ele->full5x5_hcalOverEcal();
93  shape_full5x5_r9_ = ele->full5x5_r9();
94  shape_full5x5_circularity_ = 1. - ele->full5x5_e1x5() / ele->full5x5_e5x5();
95  }
96 
97  // Misc
98  rho_ = rho;
99  if ( ele.isNonnull() ) {
100  brem_frac_ = ele->fbrem();
101  ele_pt_ = ele->pt();
102  }
103 
104  };
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253

Member Data Documentation

float lowptgsfeleid::Features::brem_frac_ = -1.

Definition at line 44 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::ele_pt_ = -1.

Definition at line 45 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::gsf_chi2red_ = -1.

Definition at line 24 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::gsf_nhits_ = -1.

Definition at line 23 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::match_eclu_EoverP_ = -1.

Definition at line 32 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::match_SC_dEta_ = -1.

Definition at line 34 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::match_SC_dPhi_ = -1.

Definition at line 35 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::match_SC_EoverP_ = -1.

Definition at line 33 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::match_seed_dEta_ = -1.

Definition at line 31 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::rho_ = -1.

Definition at line 43 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::sc_E_ = -1.

Definition at line 26 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::sc_eta_ = -1.

Definition at line 27 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::sc_etaWidth_ = -1.

Definition at line 28 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::sc_phiWidth_ = -1.

Definition at line 29 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::shape_full5x5_circularity_ = -1.

Definition at line 41 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::shape_full5x5_HoverE_ = -1.

Definition at line 39 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::shape_full5x5_r9_ = -1.

Definition at line 40 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::shape_full5x5_sigmaIetaIeta_ = -1.

Definition at line 37 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::shape_full5x5_sigmaIphiIphi_ = -1.

Definition at line 38 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::trk_chi2red_ = -1.

Definition at line 21 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::trk_nhits_ = -1.

Definition at line 20 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleid::Features::trk_p_ = -1.

Definition at line 19 of file LowPtGsfElectronIDHeavyObjectCache.h.

Referenced by get(), and set().