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 17 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().

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

Definition at line 50 of file LowPtGsfElectronSeedHeavyObjectCache.cc.

References reco::PreId::chi2Ratio(), reco::PreId::clusterRef(), reco::PreId::dpt(), EcalClusterLazyToolsT< EcalClusterToolsImpl >::e1x5(), EcalClusterLazyToolsT< EcalClusterToolsImpl >::e3x3(), EcalClusterLazyToolsT< EcalClusterToolsImpl >::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< EcalClusterToolsImpl >::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_.

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

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

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().