CMS 3D CMS Logo

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

#include <LowPtGsfElectronSeedHeavyObjectCache.h>

Public Member Functions

std::vector< float > get ()
 
void set (const reco::PreId &ecal, const reco::PreId &hcal, double rho, const reco::BeamSpot &spot, noZS::EcalClusterLazyTools &ecalTools)
 

Public Attributes

float ktf_ecal_cluster_circularity_ = -0.1
 
float ktf_ecal_cluster_covEtaEta_ = -42.
 
float ktf_ecal_cluster_covEtaPhi_ = -42.
 
float ktf_ecal_cluster_covPhiPhi_ = -42.
 
float ktf_ecal_cluster_deta_ = -42.
 
float ktf_ecal_cluster_dphi_ = -42.
 
float ktf_ecal_cluster_e3x3_ = -1.
 
float ktf_ecal_cluster_e5x5_ = -1.
 
float ktf_ecal_cluster_e_ = -1.
 
float ktf_ecal_cluster_r9_ = -0.1
 
float ktf_hcal_cluster_deta_ = -42.
 
float ktf_hcal_cluster_dphi_ = -42.
 
float ktf_hcal_cluster_e_ = -1.
 
float preid_gsf_chi2red_ = -1.
 
float preid_gsf_dpt_ = -1.
 
float preid_trk_gsf_chiratio_ = -1.
 
float rho_ = -1.
 
float trk_chi2red_ = -1.
 
float trk_dxy_sig_ = -1.
 
float trk_eta_ = -1.
 
float trk_high_quality_ = -1.
 
float trk_nhits_ = -1.
 
float trk_p_ = -1.
 
float trk_phi_ = -1.
 
float trk_pt_ = -1.
 

Detailed Description

Definition at line 16 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Member Function Documentation

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

Definition at line 18 of file LowPtGsfElectronSeedHeavyObjectCache.cc.

References ktf_ecal_cluster_circularity_, ktf_ecal_cluster_covEtaEta_, ktf_ecal_cluster_covEtaPhi_, ktf_ecal_cluster_covPhiPhi_, ktf_ecal_cluster_deta_, ktf_ecal_cluster_dphi_, ktf_ecal_cluster_e3x3_, ktf_ecal_cluster_e5x5_, ktf_ecal_cluster_e_, ktf_ecal_cluster_r9_, ktf_hcal_cluster_deta_, ktf_hcal_cluster_dphi_, ktf_hcal_cluster_e_, convertSQLitetoXML_cfg::output, preid_gsf_chi2red_, preid_gsf_dpt_, preid_trk_gsf_chiratio_, rho_, trk_chi2red_, trk_dxy_sig_, trk_eta_, trk_high_quality_, trk_nhits_, trk_p_, trk_phi_, and trk_pt_.

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

18  {
19  std::vector<float> output = {trk_pt_,
20  trk_eta_,
21  trk_phi_,
22  trk_p_,
23  trk_nhits_,
26  rho_,
43  trk_dxy_sig_};
44  return output;
45  }
void lowptgsfeleseed::Features::set ( const reco::PreId ecal,
const reco::PreId hcal,
double  rho,
const reco::BeamSpot spot,
noZS::EcalClusterLazyTools ecalTools 
)

Definition at line 49 of file LowPtGsfElectronSeedHeavyObjectCache.cc.

References reco::PreId::chi2Ratio(), reco::PreId::clusterRef(), reco::PreId::dpt(), EcalClusterLazyToolsT< ClusterTools >::e1x5(), EcalClusterLazyToolsT< ClusterTools >::e3x3(), EcalClusterLazyToolsT< ClusterTools >::e5x5(), reco::PreId::geomMatching(), reco::PreId::gsfChi2(), edm::Ref< C, T, F >::isNonnull(), ktf_ecal_cluster_circularity_, ktf_ecal_cluster_covEtaEta_, ktf_ecal_cluster_covEtaPhi_, ktf_ecal_cluster_covPhiPhi_, ktf_ecal_cluster_deta_, ktf_ecal_cluster_dphi_, ktf_ecal_cluster_e3x3_, ktf_ecal_cluster_e5x5_, ktf_ecal_cluster_e_, ktf_ecal_cluster_r9_, ktf_hcal_cluster_deta_, ktf_hcal_cluster_dphi_, ktf_hcal_cluster_e_, EcalClusterLazyToolsT< ClusterTools >::localCovariances(), preid_gsf_chi2red_, preid_gsf_dpt_, preid_trk_gsf_chiratio_, reco::TrackBase::qualityByName(), rho_, reco::PreId::trackRef(), trk_chi2red_, trk_dxy_sig_, trk_eta_, trk_high_quality_, trk_nhits_, trk_p_, trk_phi_, and trk_pt_.

53  {
54  // Tracks
55  reco::TrackRef trk = ecal.trackRef();
56  if (trk.isNonnull()) {
57  trk_pt_ = trk->pt();
58  trk_eta_ = trk->eta();
59  trk_phi_ = trk->phi();
60  trk_p_ = trk->p();
61  trk_nhits_ = static_cast<float>(trk->found());
62  trk_high_quality_ = static_cast<float>(trk->quality(reco::TrackBase::qualityByName("highPurity")));
63  trk_chi2red_ = trk->normalizedChi2();
64  if (trk->dxy(spot) > 0.) {
65  trk_dxy_sig_ = trk->dxyError() / trk->dxy(spot); //@@ to be consistent with the training based on 94X MC
66  }
67  ktf_ecal_cluster_dphi_ *= trk->charge(); //@@ to be consistent with the training based on 94X MC
68  }
69 
70  // Rho
71  rho_ = static_cast<float>(rho);
72 
73  // ECAL clusters
74  reco::PFClusterRef ecal_clu = ecal.clusterRef();
75  if (ecal_clu.isNonnull()) {
76  ktf_ecal_cluster_e_ = ecal_clu->energy();
79  ktf_ecal_cluster_e3x3_ = tools.e3x3(*ecal_clu);
80  ktf_ecal_cluster_e5x5_ = tools.e5x5(*ecal_clu);
81  auto covs = tools.localCovariances(*ecal_clu);
85  if (ktf_ecal_cluster_e_ > 0.) {
87  }
88  if (ktf_ecal_cluster_e5x5_ > 0.) {
90  } else {
92  }
93  }
94 
95  // HCAL clusters
96  reco::PFClusterRef hcal_clu = hcal.clusterRef();
97  if (hcal_clu.isNonnull()) {
98  ktf_hcal_cluster_e_ = hcal_clu->energy();
101  }
102 
103  // PreId
104  preid_gsf_dpt_ = ecal.dpt();
106  preid_gsf_chi2red_ = ecal.gsfChi2();
107  };
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
reco::TrackRef trackRef() const
Definition: PreId.h:99
Definition: tools.py:1
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
PFClusterRef clusterRef() const
Definition: PreId.h:100
float gsfChi2() const
Definition: PreId.h:89
const std::vector< float > & geomMatching() const
Access methods.
Definition: PreId.h:78
float dpt() const
Definition: PreId.h:98
float chi2Ratio() const
Definition: PreId.h:88

Member Data Documentation

float lowptgsfeleseed::Features::ktf_ecal_cluster_circularity_ = -0.1

Definition at line 35 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::ktf_ecal_cluster_covEtaEta_ = -42.

Definition at line 31 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::ktf_ecal_cluster_covEtaPhi_ = -42.

Definition at line 32 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::ktf_ecal_cluster_covPhiPhi_ = -42.

Definition at line 33 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::ktf_ecal_cluster_deta_ = -42.

Definition at line 27 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::ktf_ecal_cluster_dphi_ = -42.

Definition at line 28 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::ktf_ecal_cluster_e3x3_ = -1.

Definition at line 29 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::ktf_ecal_cluster_e5x5_ = -1.

Definition at line 30 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::ktf_ecal_cluster_e_ = -1.

Definition at line 26 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::ktf_ecal_cluster_r9_ = -0.1

Definition at line 34 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::ktf_hcal_cluster_deta_ = -42.

Definition at line 37 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::ktf_hcal_cluster_dphi_ = -42.

Definition at line 38 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::ktf_hcal_cluster_e_ = -1.

Definition at line 36 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::preid_gsf_chi2red_ = -1.

Definition at line 41 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::preid_gsf_dpt_ = -1.

Definition at line 39 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::preid_trk_gsf_chiratio_ = -1.

Definition at line 40 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

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

Definition at line 25 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

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

Definition at line 24 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::trk_dxy_sig_ = -1.

Definition at line 42 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::trk_eta_ = -1.

Definition at line 19 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::trk_high_quality_ = -1.

Definition at line 23 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

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

Definition at line 22 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

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

Definition at line 21 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::trk_phi_ = -1.

Definition at line 20 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().

float lowptgsfeleseed::Features::trk_pt_ = -1.

Definition at line 18 of file LowPtGsfElectronSeedHeavyObjectCache.h.

Referenced by get(), and set().