CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
EcalRegressionData Class Reference

#include <EcalRegressionData.h>

Public Types

enum  SubClusNr { SubClusNr::C1 = 0, SubClusNr::C2 = 1, SubClusNr::C3 = 2 }
 

Public Member Functions

void clear ()
 
float e2nd () const
 
float e2ndOverSCRawEnergy () const
 
float e3x3 () const
 
float eBottom () const
 
 EcalRegressionData ()
 
float eLeft () const
 
float eMax () const
 
float eMaxOverSCRawEnergy () const
 
float eRight () const
 
float eTop () const
 
void fill (const reco::SuperCluster &superClus, const EcalRecHitCollection *ebRecHits, const EcalRecHitCollection *eeRecHits, const CaloGeometry *geom, const CaloTopology *topology, const reco::VertexCollection *vertices)
 
void fill (const reco::SuperCluster &superClus, const EcalRecHitCollection *ebRecHits, const EcalRecHitCollection *eeRecHits, const CaloGeometry *geom, const CaloTopology *topology, int nrVertices)
 
void fillVec (std::vector< float > &inputVec) const
 
bool isEB () const
 
float maxSubClusDR () const
 
float maxSubClusDRDEta () const
 
float maxSubClusDRDPhi () const
 
float maxSubClusDRRawEnergy () const
 
float maxSubClusDRRawEnergyOverSCRawEnergy () const
 
int nrVtx () const
 
float scCalibEnergy () const
 
float scEta () const
 
float scEtaWidth () const
 
int scNrAdditionalClusters () const
 
float scPhi () const
 
float scPhiWidth () const
 
float scPreShowerEnergy () const
 
float scPreShowerEnergyOverSCRawEnergy () const
 
float scRawEnergy () const
 
float scSeedR9 () const
 
float seedClusEnergy () const
 
float seedClusEnergyOverSCRawEnergy () const
 
float seedCrysEtaOrX () const
 
float seedCrysIEtaOrIX () const
 
float seedCrysIPhiOrIY () const
 
float seedCrysPhiOrY () const
 
float seedLeftRightAsym () const
 
float seedTopBottomAsym () const
 
float sigmaIEtaIEta () const
 
float sigmaIEtaIPhi () const
 
float sigmaIPhiIPhi () const
 
const std::vector< float > & subClusDEta () const
 
float subClusDEta (size_t clusNr) const
 
float subClusDEta (SubClusNr clusNr) const
 
const std::vector< float > & subClusDPhi () const
 
float subClusDPhi (size_t clusNr) const
 
float subClusDPhi (SubClusNr clusNr) const
 
const std::vector< float > & subClusRawEnergy () const
 
float subClusRawEnergy (size_t clusNr) const
 
float subClusRawEnergy (SubClusNr clusNr) const
 
float subClusRawEnergyOverSCRawEnergy (size_t clusNr) const
 
float subClusRawEnergyOverSCRawEnergy (SubClusNr clusNr) const
 

Private Member Functions

float divideBySCRawEnergy_ (float numer) const
 
void fillVecEB_ (std::vector< float > &inputVec) const
 
void fillVecEE_ (std::vector< float > &inputVec) const
 

Private Attributes

float e2nd_
 
float e3x3_
 
float eBottom_
 
float eLeft_
 
float eMax_
 
float eRight_
 
float eTop_
 
bool isEB_
 
float maxSubClusDR2_
 
float maxSubClusDRDEta_
 
float maxSubClusDRDPhi_
 
float maxSubClusDRRawEnergy_
 
int nrVtx_
 
float scCalibEnergy_
 
float scEta_
 
float scEtaWidth_
 
int scNrAdditionalClusters_
 
float scPhi_
 
float scPhiWidth_
 
float scPreShowerEnergy_
 
float scRawEnergy_
 
float seedClusEnergy_
 
float seedCrysEtaOrX_
 
int seedCrysIEtaOrIX_
 
int seedCrysIPhiOrIY_
 
float seedCrysPhiOrY_
 
float sigmaIEtaIEta_
 
float sigmaIEtaIPhi_
 
float sigmaIPhiIPhi_
 
std::vector< float > subClusDEta_
 
std::vector< float > subClusDPhi_
 
std::vector< float > subClusRawEnergy_
 

Detailed Description

Definition at line 17 of file EcalRegressionData.h.

Member Enumeration Documentation

◆ SubClusNr

Enumerator
C1 
C2 
C3 

Definition at line 24 of file EcalRegressionData.h.

24 { C1 = 0, C2 = 1, C3 = 2 };

Constructor & Destructor Documentation

◆ EcalRegressionData()

EcalRegressionData::EcalRegressionData ( )
inline

Definition at line 19 of file EcalRegressionData.h.

References clear().

19 { clear(); }

Member Function Documentation

◆ clear()

void EcalRegressionData::clear ( void  )

Definition at line 118 of file EcalRegressionData.cc.

References e2nd_, e3x3_, eBottom_, eLeft_, eMax_, eRight_, eTop_, isEB_, maxSubClusDR2_, maxSubClusDRDEta_, maxSubClusDRDPhi_, maxSubClusDRRawEnergy_, nrVtx_, scCalibEnergy_, scEta_, scEtaWidth_, scNrAdditionalClusters_, scPhi_, scPhiWidth_, scPreShowerEnergy_, scRawEnergy_, seedClusEnergy_, seedCrysEtaOrX_, seedCrysIEtaOrIX_, seedCrysIPhiOrIY_, seedCrysPhiOrY_, sigmaIEtaIEta_, sigmaIEtaIPhi_, sigmaIPhiIPhi_, subClusDEta_, subClusDPhi_, and subClusRawEnergy_.

Referenced by EcalRegressionData(), and fill().

118  {
119  isEB_ = false;
120  scRawEnergy_ = 0.;
121  scCalibEnergy_ = 0.;
122  scPreShowerEnergy_ = 0.;
123  scEta_ = 0.;
124  scPhi_ = 0.;
125  scEtaWidth_ = 0.;
126  scPhiWidth_ = 0.;
128 
129  seedClusEnergy_ = 0.;
130  eMax_ = 0.;
131  e2nd_ = 0.;
132  e3x3_ = 0.;
133  eTop_ = 0.;
134  eBottom_ = 0.;
135  eLeft_ = 0.;
136  eRight_ = 0.;
137  sigmaIEtaIEta_ = 0.;
138  sigmaIEtaIPhi_ = 0.;
139  sigmaIPhiIPhi_ = 0.;
140 
141  seedCrysPhiOrY_ = 0.;
142  seedCrysEtaOrX_ = 0.;
143  seedCrysIEtaOrIX_ = 0;
144  seedCrysIPhiOrIY_ = 0;
145 
146  maxSubClusDR2_ = 998001.;
147  maxSubClusDRDPhi_ = 999.;
148  maxSubClusDRDEta_ = 999;
150 
151  subClusRawEnergy_.clear();
152  subClusDPhi_.clear();
153  subClusDEta_.clear();
154 
155  nrVtx_ = 0;
156 }
std::vector< float > subClusDPhi_
std::vector< float > subClusRawEnergy_
std::vector< float > subClusDEta_

◆ divideBySCRawEnergy_()

float EcalRegressionData::divideBySCRawEnergy_ ( float  numer) const
inlineprivate

◆ e2nd()

float EcalRegressionData::e2nd ( ) const
inline

Definition at line 38 of file EcalRegressionData.h.

References e2nd_.

Referenced by e2ndOverSCRawEnergy(), and pat::PATPhotonProducer::produce().

38 { return e2nd_; }

◆ e2ndOverSCRawEnergy()

float EcalRegressionData::e2ndOverSCRawEnergy ( ) const
inline

Definition at line 66 of file EcalRegressionData.h.

References divideBySCRawEnergy_(), and e2nd().

Referenced by fillVecEB_(), and fillVecEE_().

66 { return divideBySCRawEnergy_(e2nd()); }
float divideBySCRawEnergy_(float numer) const

◆ e3x3()

float EcalRegressionData::e3x3 ( ) const
inline

Definition at line 39 of file EcalRegressionData.h.

References e3x3_.

Referenced by pat::PATPhotonProducer::produce(), and scSeedR9().

39 { return e3x3_; }

◆ eBottom()

float EcalRegressionData::eBottom ( ) const
inline

Definition at line 41 of file EcalRegressionData.h.

References eBottom_.

Referenced by pat::PATPhotonProducer::produce(), and seedTopBottomAsym().

41 { return eBottom_; }

◆ eLeft()

float EcalRegressionData::eLeft ( ) const
inline

Definition at line 42 of file EcalRegressionData.h.

References eLeft_.

Referenced by pat::PATPhotonProducer::produce(), and seedLeftRightAsym().

42 { return eLeft_; }

◆ eMax()

float EcalRegressionData::eMax ( ) const
inline

Definition at line 37 of file EcalRegressionData.h.

References eMax_.

Referenced by eMaxOverSCRawEnergy(), and pat::PATPhotonProducer::produce().

37 { return eMax_; }

◆ eMaxOverSCRawEnergy()

float EcalRegressionData::eMaxOverSCRawEnergy ( ) const
inline

Definition at line 65 of file EcalRegressionData.h.

References divideBySCRawEnergy_(), and eMax().

Referenced by fillVecEB_(), and fillVecEE_().

65 { return divideBySCRawEnergy_(eMax()); }
float divideBySCRawEnergy_(float numer) const

◆ eRight()

float EcalRegressionData::eRight ( ) const
inline

Definition at line 43 of file EcalRegressionData.h.

References eRight_.

Referenced by pat::PATPhotonProducer::produce(), and seedLeftRightAsym().

43 { return eRight_; }

◆ eTop()

float EcalRegressionData::eTop ( ) const
inline

Definition at line 40 of file EcalRegressionData.h.

References eTop_.

Referenced by pat::PATPhotonProducer::produce(), and seedTopBottomAsym().

40 { return eTop_; }

◆ fill() [1/2]

void EcalRegressionData::fill ( const reco::SuperCluster superClus,
const EcalRecHitCollection ebRecHits,
const EcalRecHitCollection eeRecHits,
const CaloGeometry geom,
const CaloTopology topology,
const reco::VertexCollection vertices 
)
inline

Definition at line 82 of file EcalRegressionData.h.

References relativeConstraints::geom, HLT_2024v14_cff::topology, and AlignmentTracksFromVertexSelector_cfi::vertices.

Referenced by RegressionHelper::getEcalRegression(), and pat::PATPhotonProducer::produce().

87  {
88  fill(superClus, ebRecHits, eeRecHits, geom, topology, vertices->size());
89  }
void fill(const reco::SuperCluster &superClus, const EcalRecHitCollection *ebRecHits, const EcalRecHitCollection *eeRecHits, const CaloGeometry *geom, const CaloTopology *topology, const reco::VertexCollection *vertices)

◆ fill() [2/2]

void EcalRegressionData::fill ( const reco::SuperCluster superClus,
const EcalRecHitCollection ebRecHits,
const EcalRecHitCollection eeRecHits,
const CaloGeometry geom,
const CaloTopology topology,
int  nrVertices 
)

Definition at line 49 of file EcalRegressionData.cc.

References clear(), reco::SuperCluster::clustersBegin(), reco::SuperCluster::clustersEnd(), reco::SuperCluster::clustersSize(), reco::CaloCluster::correctedEnergy(), reco::deltaPhi(), DetId::det(), HLT_2024v14_cff::dEta, HLT_2024v14_cff::dPhi, ALPAKA_ACCELERATOR_NAMESPACE::dR2(), electrons_cff::e2nd, e2nd_, e3x3_, electrons_cff::eBottom, eBottom_, EcalBarrel, electrons_cff::eLeft, eLeft_, cosmicPhotonAnalyzer_cfi::eMax, eMax_, electrons_cff::eRight, eRight_, reco::CaloCluster::eta(), reco::SuperCluster::etaWidth(), electrons_cff::eTop, eTop_, relativeConstraints::geom, isEB(), isEB_, EcalTools::isHGCalDet(), edm::isNotFinite(), egammaTools::localEcalClusterCoordsEB(), egammaTools::localEcalClusterCoordsEE(), maxSubClusDR2_, maxSubClusDRDEta_, maxSubClusDRDPhi_, maxSubClusDRRawEnergy_, nrVtx_, reco::CaloCluster::phi(), reco::SuperCluster::phiWidth(), reco::SuperCluster::preshowerEnergy(), reco::SuperCluster::rawEnergy(), FastTrackerRecHitMaskProducer_cfi::recHits, scCalibEnergy_, scEta_, scEtaWidth_, scNrAdditionalClusters_, scPhi_, scPhiWidth_, scPreShowerEnergy_, scRawEnergy_, reco::SuperCluster::seed(), seedClusEnergy_, seedCrysEtaOrX_, seedCrysIEtaOrIX_, seedCrysIPhiOrIY_, seedCrysPhiOrY_, sigmaIEtaIEta_, sigmaIEtaIPhi_, sigmaIPhiIPhi_, mathSSE::sqrt(), subClusDEta_, subClusDPhi_, subClusRawEnergy_, DetId::subdetId(), and HLT_2024v14_cff::topology.

54  {
55  clear();
56 
57  const DetId& seedid = superClus.seed()->hitsAndFractions().at(0).first;
58  isEB_ = (seedid.subdetId() == EcalBarrel);
59 
60  // skip HGCal
61  if (EcalTools::isHGCalDet(seedid.det()))
62  return;
63 
64  const EcalRecHitCollection* recHits = isEB_ ? ebRecHits : eeRecHits;
65 
66  scRawEnergy_ = superClus.rawEnergy();
67  scCalibEnergy_ = superClus.correctedEnergy();
68  scPreShowerEnergy_ = superClus.preshowerEnergy();
69  scEta_ = superClus.eta();
70  scPhi_ = superClus.phi();
71  scEtaWidth_ = superClus.etaWidth();
72  scPhiWidth_ = superClus.phiWidth();
73  scNrAdditionalClusters_ = superClus.clustersSize() - 1;
74 
75  seedClusEnergy_ = superClus.seed()->energy();
76  eMax_ = EcalClusterTools::eMax(*superClus.seed(), recHits);
77  e2nd_ = EcalClusterTools::e2nd(*superClus.seed(), recHits);
78  e3x3_ = EcalClusterTools::e3x3(*superClus.seed(), recHits, topology);
83  const auto& localCovs = EcalClusterTools::localCovariances(*superClus.seed(), recHits, topology);
84  sigmaIEtaIEta_ = edm::isNotFinite(localCovs[0]) ? 0. : std::sqrt(localCovs[0]);
85  sigmaIPhiIPhi_ = edm::isNotFinite(localCovs[2]) ? 0. : std::sqrt(localCovs[2]);
86 
88  sigmaIEtaIPhi_ = localCovs[1] / (sigmaIEtaIEta_ * sigmaIPhiIPhi_);
89  else if (localCovs[1] > 0)
90  sigmaIEtaIPhi_ = 1.;
91  else
92  sigmaIEtaIPhi_ = -1.;
93 
95 
96  float dummy;
97  localCoordsFunc(
99 
100  for (auto clus = superClus.clustersBegin() + 1; clus != superClus.clustersEnd(); ++clus) {
101  const float dEta = (*clus)->eta() - superClus.seed()->eta();
102  const float dPhi = reco::deltaPhi((*clus)->phi(), superClus.seed()->phi());
103  const float dR2 = dEta * dEta + dPhi * dPhi;
104  if (dR2 > maxSubClusDR2_ || maxSubClusDR2_ == 998001.) {
108  maxSubClusDRRawEnergy_ = (*clus)->energy();
109  }
110  subClusRawEnergy_.push_back((*clus)->energy());
111  subClusDEta_.push_back(dEta);
112  subClusDPhi_.push_back(dPhi);
113  }
114 
115  nrVtx_ = nrVertices;
116 }
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
static bool isHGCalDet(DetId::Detector thedet)
identify HGCal cells
Definition: EcalTools.h:49
void localEcalClusterCoordsEB(const reco::CaloCluster &bclus, const CaloGeometry &geom, float &etacry, float &phicry, int &ieta, int &iphi, float &thetatilt, float &phitilt)
constexpr bool isNotFinite(T x)
Definition: isFinite.h:9
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:60
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
Definition: SuperCluster.h:88
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:183
double phiWidth() const
obtain phi and eta width of the Super Cluster
Definition: SuperCluster.h:68
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
Definition: SuperCluster.h:91
double correctedEnergy() const
Definition: CaloCluster.h:149
std::vector< float > subClusDPhi_
ALPAKA_FN_ACC static ALPAKA_FN_INLINE float dR2(Position4 pos1, Position4 pos2)
T sqrt(T t)
Definition: SSEVec.h:19
std::vector< float > subClusRawEnergy_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
void localEcalClusterCoordsEE(const reco::CaloCluster &bclus, const CaloGeometry &geom, float &xcry, float &ycry, int &ix, int &iy, float &thetatilt, float &phitilt)
double etaWidth() const
Definition: SuperCluster.h:69
Definition: DetId.h:17
std::vector< float > subClusDEta_
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:79
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:180
size_t clustersSize() const
number of BasicCluster constituents
Definition: SuperCluster.h:100
double preshowerEnergy() const
energy deposited in preshower
Definition: SuperCluster.h:63

◆ fillVec()

void EcalRegressionData::fillVec ( std::vector< float > &  inputVec) const

Definition at line 158 of file EcalRegressionData.cc.

References fillVecEB_(), fillVecEE_(), and isEB().

Referenced by RegressionHelper::getEcalRegression().

158  {
159  if (isEB())
160  fillVecEB_(inputVec);
161  else
162  fillVecEE_(inputVec);
163 }
void fillVecEB_(std::vector< float > &inputVec) const
void fillVecEE_(std::vector< float > &inputVec) const

◆ fillVecEB_()

void EcalRegressionData::fillVecEB_ ( std::vector< float > &  inputVec) const
private

Definition at line 165 of file EcalRegressionData.cc.

References C1, C2, C3, e2ndOverSCRawEnergy(), eMaxOverSCRawEnergy(), maxSubClusDR(), maxSubClusDRDEta(), maxSubClusDRDPhi(), maxSubClusDRRawEnergyOverSCRawEnergy(), nrVtx(), scCalibEnergy(), scEta(), scEtaWidth(), scNrAdditionalClusters(), scPhi(), scPhiWidth(), scSeedR9(), seedClusEnergyOverSCRawEnergy(), seedCrysEtaOrX(), seedCrysIEtaOrIX(), seedCrysIPhiOrIY(), seedCrysPhiOrY(), seedLeftRightAsym(), seedTopBottomAsym(), sigmaIEtaIEta(), sigmaIEtaIPhi(), sigmaIPhiIPhi(), subClusDEta(), subClusDPhi(), and subClusRawEnergyOverSCRawEnergy().

Referenced by fillVec().

165  {
166  inputVec.clear();
167  inputVec.resize(33);
168  inputVec[0] = nrVtx(); //nVtx
169  inputVec[1] = scEta(); //scEta
170  inputVec[2] = scPhi(); //scPhi
171  inputVec[3] = scEtaWidth(); //scEtaWidth
172  inputVec[4] = scPhiWidth(); //scPhiWidth
173  inputVec[5] = scSeedR9(); //scSeedR9
174  inputVec[6] = seedClusEnergyOverSCRawEnergy(); //scSeedRawEnergy/scRawEnergy
175  inputVec[7] = eMaxOverSCRawEnergy(); //scSeedEmax/scRawEnergy
176  inputVec[8] = e2ndOverSCRawEnergy(); //scSeedE2nd/scRawEnergy
177  inputVec[9] = seedLeftRightAsym(); //scSeedLeftRightAsym
178  inputVec[10] = seedTopBottomAsym(); //scSeedTopBottomAsym
179  inputVec[11] = sigmaIEtaIEta(); //scSeedSigmaIetaIeta
180  inputVec[12] = sigmaIEtaIPhi(); //scSeedSigmaIetaIphi
181  inputVec[13] = sigmaIPhiIPhi(); //scSeedSigmaIphiIphi
182  inputVec[14] = scNrAdditionalClusters(); //N_ECALClusters
183  inputVec[15] = maxSubClusDR(); //clusterMaxDR
184  inputVec[16] = maxSubClusDRDPhi(); //clusterMaxDRDPhi
185  inputVec[17] = maxSubClusDRDEta(); //clusterMaxDRDEta
186  inputVec[18] = maxSubClusDRRawEnergyOverSCRawEnergy(); //clusMaxDRRawEnergy/scRawEnergy
187  inputVec[19] = subClusRawEnergyOverSCRawEnergy(SubClusNr::C1); //clusterRawEnergy[0]/scRawEnergy
188  inputVec[20] = subClusRawEnergyOverSCRawEnergy(
189  SubClusNr::C2); //clusterRawEnergy[1]/scRawEnergy float scPreShowerEnergy()const{return scPreShowerEnergy_;}
190 
191  inputVec[21] = subClusRawEnergyOverSCRawEnergy(SubClusNr::C3); //clusterRawEnergy[2]/scRawEnergy
192  inputVec[22] = subClusDPhi(SubClusNr::C1); //clusterDPhiToSeed[0]
193  inputVec[23] = subClusDPhi(SubClusNr::C2); //clusterDPhiToSeed[1]
194  inputVec[24] = subClusDPhi(SubClusNr::C3); //clusterDPhiToSeed[2]
195  inputVec[25] = subClusDEta(SubClusNr::C1); //clusterDEtaToSeed[0]
196  inputVec[26] = subClusDEta(SubClusNr::C2); //clusterDEtaToSeed[1]
197  inputVec[27] = subClusDEta(SubClusNr::C3); //clusterDEtaToSeed[2]
198  inputVec[28] = seedCrysEtaOrX(); //scSeedCryEta
199  inputVec[29] = seedCrysPhiOrY(); //scSeedCryPhi
200  inputVec[30] = seedCrysIEtaOrIX(); //scSeedCryIeta
201  inputVec[31] = seedCrysIPhiOrIY(); //scSeedCryIphi
202  inputVec[32] = scCalibEnergy(); //scCalibratedEnergy
203 }
float maxSubClusDRDEta() const
float sigmaIPhiIPhi() const
float seedCrysPhiOrY() const
float maxSubClusDRDPhi() const
float seedCrysIPhiOrIY() const
int scNrAdditionalClusters() const
float seedLeftRightAsym() const
float seedCrysEtaOrX() const
float scCalibEnergy() const
float e2ndOverSCRawEnergy() const
float seedCrysIEtaOrIX() const
float scPhiWidth() const
float maxSubClusDRRawEnergyOverSCRawEnergy() const
const std::vector< float > & subClusDEta() const
const std::vector< float > & subClusDPhi() const
float scEtaWidth() const
float sigmaIEtaIEta() const
float sigmaIEtaIPhi() const
float subClusRawEnergyOverSCRawEnergy(size_t clusNr) const
float maxSubClusDR() const
float eMaxOverSCRawEnergy() const
float scSeedR9() const
float seedTopBottomAsym() const
float seedClusEnergyOverSCRawEnergy() const

◆ fillVecEE_()

void EcalRegressionData::fillVecEE_ ( std::vector< float > &  inputVec) const
private

Definition at line 205 of file EcalRegressionData.cc.

References C1, C2, C3, e2ndOverSCRawEnergy(), eMaxOverSCRawEnergy(), maxSubClusDR(), maxSubClusDRDEta(), maxSubClusDRDPhi(), maxSubClusDRRawEnergyOverSCRawEnergy(), nrVtx(), scCalibEnergy(), scEta(), scEtaWidth(), scNrAdditionalClusters(), scPhi(), scPhiWidth(), scPreShowerEnergyOverSCRawEnergy(), scSeedR9(), seedClusEnergyOverSCRawEnergy(), seedLeftRightAsym(), seedTopBottomAsym(), sigmaIEtaIEta(), sigmaIEtaIPhi(), sigmaIPhiIPhi(), subClusDEta(), subClusDPhi(), and subClusRawEnergyOverSCRawEnergy().

Referenced by fillVec().

205  {
206  inputVec.clear();
207  inputVec.resize(33); //this emulates the old behaviour of RegressionHelper, even if past 29 we dont use elements
208  inputVec[0] = nrVtx(); //nVtx
209  inputVec[1] = scEta(); //scEta
210  inputVec[2] = scPhi(); //scPhi
211  inputVec[3] = scEtaWidth(); //scEtaWidth
212  inputVec[4] = scPhiWidth(); //scPhiWidth
213  inputVec[5] = scSeedR9(); //scSeedR9
214  inputVec[6] = seedClusEnergyOverSCRawEnergy(); //scSeedRawEnergy/scRawEnergy
215  inputVec[7] = eMaxOverSCRawEnergy(); //scSeedEmax/scRawEnergy
216  inputVec[8] = e2ndOverSCRawEnergy(); //scSeedE2nd/scRawEnergy
217  inputVec[9] = seedLeftRightAsym(); //scSeedLeftRightAsym
218  inputVec[10] = seedTopBottomAsym(); //scSeedTopBottomAsym
219  inputVec[11] = sigmaIEtaIEta(); //scSeedSigmaIetaIeta
220  inputVec[12] = sigmaIEtaIPhi(); //scSeedSigmaIetaIphi
221  inputVec[13] = sigmaIPhiIPhi(); //scSeedSigmaIphiIphi
222  inputVec[14] = scNrAdditionalClusters(); //N_ECALClusters
223  inputVec[15] = maxSubClusDR(); //clusterMaxDR
224  inputVec[16] = maxSubClusDRDPhi(); //clusterMaxDRDPhi
225  inputVec[17] = maxSubClusDRDEta(); //clusterMaxDRDEta
226  inputVec[18] = maxSubClusDRRawEnergyOverSCRawEnergy(); //clusMaxDRRawEnergy/scRawEnergy
227  inputVec[19] = subClusRawEnergyOverSCRawEnergy(SubClusNr::C1); //clusterRawEnergy[0]/scRawEnergy
228  inputVec[20] = subClusRawEnergyOverSCRawEnergy(SubClusNr::C2); //clusterRawEnergy[1]/scRawEnergy
229  inputVec[21] = subClusRawEnergyOverSCRawEnergy(SubClusNr::C3); //clusterRawEnergy[2]/scRawEnergy
230  inputVec[22] = subClusDPhi(SubClusNr::C1); //clusterDPhiToSeed[0]
231  inputVec[23] = subClusDPhi(SubClusNr::C2); //clusterDPhiToSeed[1]
232  inputVec[24] = subClusDPhi(SubClusNr::C3); //clusterDPhiToSeed[2]
233  inputVec[25] = subClusDEta(SubClusNr::C1); //clusterDEtaToSeed[0]
234  inputVec[26] = subClusDEta(SubClusNr::C2); //clusterDEtaToSeed[1]
235  inputVec[27] = subClusDEta(SubClusNr::C3); //clusterDEtaToSeed[2]
236  inputVec[28] = scPreShowerEnergyOverSCRawEnergy();
237  inputVec[29] = scCalibEnergy(); //scCalibratedEnergy
238 }
float maxSubClusDRDEta() const
float sigmaIPhiIPhi() const
float maxSubClusDRDPhi() const
int scNrAdditionalClusters() const
float seedLeftRightAsym() const
float scCalibEnergy() const
float e2ndOverSCRawEnergy() const
float scPhiWidth() const
float maxSubClusDRRawEnergyOverSCRawEnergy() const
const std::vector< float > & subClusDEta() const
const std::vector< float > & subClusDPhi() const
float scPreShowerEnergyOverSCRawEnergy() const
float scEtaWidth() const
float sigmaIEtaIEta() const
float sigmaIEtaIPhi() const
float subClusRawEnergyOverSCRawEnergy(size_t clusNr) const
float maxSubClusDR() const
float eMaxOverSCRawEnergy() const
float scSeedR9() const
float seedTopBottomAsym() const
float seedClusEnergyOverSCRawEnergy() const

◆ isEB()

bool EcalRegressionData::isEB ( ) const
inline

Definition at line 27 of file EcalRegressionData.h.

References isEB_.

Referenced by Electron.Electron::absIsoWithFSR(), fill(), and fillVec().

27 { return isEB_; }

◆ maxSubClusDR()

float EcalRegressionData::maxSubClusDR ( ) const
inline

Definition at line 52 of file EcalRegressionData.h.

References maxSubClusDR2_, and mathSSE::sqrt().

Referenced by fillVecEB_(), fillVecEE_(), and pat::PATPhotonProducer::produce().

52 { return std::sqrt(maxSubClusDR2_); }
T sqrt(T t)
Definition: SSEVec.h:19

◆ maxSubClusDRDEta()

float EcalRegressionData::maxSubClusDRDEta ( ) const
inline

Definition at line 54 of file EcalRegressionData.h.

References maxSubClusDRDEta_.

Referenced by fillVecEB_(), fillVecEE_(), and pat::PATPhotonProducer::produce().

54 { return maxSubClusDRDEta_; }

◆ maxSubClusDRDPhi()

float EcalRegressionData::maxSubClusDRDPhi ( ) const
inline

Definition at line 53 of file EcalRegressionData.h.

References maxSubClusDRDPhi_.

Referenced by fillVecEB_(), fillVecEE_(), and pat::PATPhotonProducer::produce().

53 { return maxSubClusDRDPhi_; }

◆ maxSubClusDRRawEnergy()

float EcalRegressionData::maxSubClusDRRawEnergy ( ) const
inline

◆ maxSubClusDRRawEnergyOverSCRawEnergy()

float EcalRegressionData::maxSubClusDRRawEnergyOverSCRawEnergy ( ) const
inline

Definition at line 69 of file EcalRegressionData.h.

References divideBySCRawEnergy_(), and maxSubClusDRRawEnergy().

Referenced by fillVecEB_(), and fillVecEE_().

float maxSubClusDRRawEnergy() const
float divideBySCRawEnergy_(float numer) const

◆ nrVtx()

int EcalRegressionData::nrVtx ( ) const
inline

Definition at line 59 of file EcalRegressionData.h.

References nrVtx_.

Referenced by fillVecEB_(), and fillVecEE_().

59 { return nrVtx_; }

◆ scCalibEnergy()

float EcalRegressionData::scCalibEnergy ( ) const
inline

Definition at line 29 of file EcalRegressionData.h.

References scCalibEnergy_.

Referenced by fillVecEB_(), and fillVecEE_().

29 { return scCalibEnergy_; }

◆ scEta()

float EcalRegressionData::scEta ( ) const
inline

Definition at line 31 of file EcalRegressionData.h.

References scEta_.

Referenced by fillVecEB_(), and fillVecEE_().

31 { return scEta_; }

◆ scEtaWidth()

float EcalRegressionData::scEtaWidth ( ) const
inline

Definition at line 33 of file EcalRegressionData.h.

References scEtaWidth_.

Referenced by fillVecEB_(), and fillVecEE_().

33 { return scEtaWidth_; }

◆ scNrAdditionalClusters()

int EcalRegressionData::scNrAdditionalClusters ( ) const
inline

Definition at line 35 of file EcalRegressionData.h.

References scNrAdditionalClusters_.

Referenced by fillVecEB_(), and fillVecEE_().

◆ scPhi()

float EcalRegressionData::scPhi ( ) const
inline

Definition at line 32 of file EcalRegressionData.h.

References scPhi_.

Referenced by fillVecEB_(), and fillVecEE_().

32 { return scPhi_; }

◆ scPhiWidth()

float EcalRegressionData::scPhiWidth ( ) const
inline

Definition at line 34 of file EcalRegressionData.h.

References scPhiWidth_.

Referenced by fillVecEB_(), and fillVecEE_().

34 { return scPhiWidth_; }

◆ scPreShowerEnergy()

float EcalRegressionData::scPreShowerEnergy ( ) const
inline

Definition at line 30 of file EcalRegressionData.h.

References scPreShowerEnergy_.

Referenced by scPreShowerEnergyOverSCRawEnergy().

30 { return scPreShowerEnergy_; }

◆ scPreShowerEnergyOverSCRawEnergy()

float EcalRegressionData::scPreShowerEnergyOverSCRawEnergy ( ) const
inline

Definition at line 62 of file EcalRegressionData.h.

References divideBySCRawEnergy_(), and scPreShowerEnergy().

Referenced by fillVecEE_().

float divideBySCRawEnergy_(float numer) const
float scPreShowerEnergy() const

◆ scRawEnergy()

float EcalRegressionData::scRawEnergy ( ) const
inline

Definition at line 28 of file EcalRegressionData.h.

References scRawEnergy_.

Referenced by divideBySCRawEnergy_().

28 { return scRawEnergy_; }

◆ scSeedR9()

float EcalRegressionData::scSeedR9 ( ) const
inline

Definition at line 63 of file EcalRegressionData.h.

References divideBySCRawEnergy_(), and e3x3().

Referenced by fillVecEB_(), and fillVecEE_().

63 { return divideBySCRawEnergy_(e3x3()); }
float divideBySCRawEnergy_(float numer) const

◆ seedClusEnergy()

float EcalRegressionData::seedClusEnergy ( ) const
inline

Definition at line 36 of file EcalRegressionData.h.

References seedClusEnergy_.

Referenced by seedClusEnergyOverSCRawEnergy().

36 { return seedClusEnergy_; }

◆ seedClusEnergyOverSCRawEnergy()

float EcalRegressionData::seedClusEnergyOverSCRawEnergy ( ) const
inline

Definition at line 64 of file EcalRegressionData.h.

References divideBySCRawEnergy_(), and seedClusEnergy().

Referenced by fillVecEB_(), and fillVecEE_().

float divideBySCRawEnergy_(float numer) const
float seedClusEnergy() const

◆ seedCrysEtaOrX()

float EcalRegressionData::seedCrysEtaOrX ( ) const
inline

Definition at line 49 of file EcalRegressionData.h.

References seedCrysEtaOrX_.

Referenced by fillVecEB_(), and pat::PATPhotonProducer::produce().

49 { return seedCrysEtaOrX_; }

◆ seedCrysIEtaOrIX()

float EcalRegressionData::seedCrysIEtaOrIX ( ) const
inline

Definition at line 50 of file EcalRegressionData.h.

References seedCrysIEtaOrIX_.

Referenced by fillVecEB_(), and pat::PATPhotonProducer::produce().

◆ seedCrysIPhiOrIY()

float EcalRegressionData::seedCrysIPhiOrIY ( ) const
inline

Definition at line 51 of file EcalRegressionData.h.

References seedCrysIPhiOrIY_.

Referenced by fillVecEB_(), and pat::PATPhotonProducer::produce().

◆ seedCrysPhiOrY()

float EcalRegressionData::seedCrysPhiOrY ( ) const
inline

Definition at line 48 of file EcalRegressionData.h.

References seedCrysPhiOrY_.

Referenced by fillVecEB_(), and pat::PATPhotonProducer::produce().

48 { return seedCrysPhiOrY_; }

◆ seedLeftRightAsym()

float EcalRegressionData::seedLeftRightAsym ( ) const

Definition at line 16 of file EcalRegressionData.cc.

References eLeft(), and eRight().

Referenced by fillVecEB_(), and fillVecEE_().

16  {
17  float eLeftRightSum = eLeft() + eRight();
18  float eLeftRightDiff = eLeft() - eRight();
19  return eLeftRightSum != 0 ? eLeftRightDiff / eLeftRightSum : 0.;
20 }

◆ seedTopBottomAsym()

float EcalRegressionData::seedTopBottomAsym ( ) const

Definition at line 22 of file EcalRegressionData.cc.

References eBottom(), and eTop().

Referenced by fillVecEB_(), and fillVecEE_().

22  {
23  float eTopBottomSum = eTop() + eBottom();
24  float eTopBottomDiff = eTop() - eBottom();
25  return eTopBottomSum != 0 ? eTopBottomDiff / eTopBottomSum : 0.;
26 }

◆ sigmaIEtaIEta()

float EcalRegressionData::sigmaIEtaIEta ( ) const
inline

Definition at line 44 of file EcalRegressionData.h.

References sigmaIEtaIEta_.

Referenced by fillVecEB_(), fillVecEE_(), and pat::PATPhotonProducer::produce().

44 { return sigmaIEtaIEta_; }

◆ sigmaIEtaIPhi()

float EcalRegressionData::sigmaIEtaIPhi ( ) const
inline

Definition at line 45 of file EcalRegressionData.h.

References sigmaIEtaIPhi_.

Referenced by fillVecEB_(), fillVecEE_(), and pat::PATPhotonProducer::produce().

45 { return sigmaIEtaIPhi_; }

◆ sigmaIPhiIPhi()

float EcalRegressionData::sigmaIPhiIPhi ( ) const
inline

Definition at line 46 of file EcalRegressionData.h.

References sigmaIPhiIPhi_.

Referenced by fillVecEB_(), fillVecEE_(), and pat::PATPhotonProducer::produce().

46 { return sigmaIPhiIPhi_; }

◆ subClusDEta() [1/3]

const std::vector<float>& EcalRegressionData::subClusDEta ( ) const
inline

Definition at line 58 of file EcalRegressionData.h.

References subClusDEta_.

Referenced by fillVecEB_(), fillVecEE_(), and pat::PATPhotonProducer::produce().

58 { return subClusDEta_; }
std::vector< float > subClusDEta_

◆ subClusDEta() [2/3]

float EcalRegressionData::subClusDEta ( size_t  clusNr) const

Definition at line 35 of file EcalRegressionData.cc.

References subClusDEta_.

35  {
36  if (clusNr < subClusDEta_.size())
37  return subClusDEta_[clusNr];
38  else
39  return 0.;
40 }
std::vector< float > subClusDEta_

◆ subClusDEta() [3/3]

float EcalRegressionData::subClusDEta ( SubClusNr  clusNr) const
inline

Definition at line 79 of file EcalRegressionData.h.

References subClusDEta().

Referenced by subClusDEta().

79 { return subClusDEta(static_cast<int>(clusNr)); }
const std::vector< float > & subClusDEta() const

◆ subClusDPhi() [1/3]

const std::vector<float>& EcalRegressionData::subClusDPhi ( ) const
inline

Definition at line 57 of file EcalRegressionData.h.

References subClusDPhi_.

Referenced by fillVecEB_(), fillVecEE_(), and pat::PATPhotonProducer::produce().

57 { return subClusDPhi_; }
std::vector< float > subClusDPhi_

◆ subClusDPhi() [2/3]

float EcalRegressionData::subClusDPhi ( size_t  clusNr) const

Definition at line 42 of file EcalRegressionData.cc.

References subClusDPhi_.

42  {
43  if (clusNr < subClusDPhi_.size())
44  return subClusDPhi_[clusNr];
45  else
46  return 0.;
47 }
std::vector< float > subClusDPhi_

◆ subClusDPhi() [3/3]

float EcalRegressionData::subClusDPhi ( SubClusNr  clusNr) const
inline

Definition at line 78 of file EcalRegressionData.h.

References subClusDPhi().

Referenced by subClusDPhi().

78 { return subClusDPhi(static_cast<int>(clusNr)); }
const std::vector< float > & subClusDPhi() const

◆ subClusRawEnergy() [1/3]

const std::vector<float>& EcalRegressionData::subClusRawEnergy ( ) const
inline

Definition at line 56 of file EcalRegressionData.h.

References subClusRawEnergy_.

Referenced by pat::PATPhotonProducer::produce(), and subClusRawEnergyOverSCRawEnergy().

56 { return subClusRawEnergy_; }
std::vector< float > subClusRawEnergy_

◆ subClusRawEnergy() [2/3]

float EcalRegressionData::subClusRawEnergy ( size_t  clusNr) const

Definition at line 28 of file EcalRegressionData.cc.

References subClusRawEnergy_.

28  {
29  if (clusNr < subClusRawEnergy_.size())
30  return subClusRawEnergy_[clusNr];
31  else
32  return 0.;
33 }
std::vector< float > subClusRawEnergy_

◆ subClusRawEnergy() [3/3]

float EcalRegressionData::subClusRawEnergy ( SubClusNr  clusNr) const
inline

Definition at line 77 of file EcalRegressionData.h.

References subClusRawEnergy().

Referenced by subClusRawEnergy().

77 { return subClusRawEnergy(static_cast<int>(clusNr)); }
const std::vector< float > & subClusRawEnergy() const

◆ subClusRawEnergyOverSCRawEnergy() [1/2]

float EcalRegressionData::subClusRawEnergyOverSCRawEnergy ( size_t  clusNr) const
inline

Definition at line 70 of file EcalRegressionData.h.

References divideBySCRawEnergy_(), and subClusRawEnergy().

Referenced by fillVecEB_(), fillVecEE_(), and subClusRawEnergyOverSCRawEnergy().

70 { return divideBySCRawEnergy_(subClusRawEnergy(clusNr)); }
float divideBySCRawEnergy_(float numer) const
const std::vector< float > & subClusRawEnergy() const

◆ subClusRawEnergyOverSCRawEnergy() [2/2]

float EcalRegressionData::subClusRawEnergyOverSCRawEnergy ( SubClusNr  clusNr) const
inline

Definition at line 74 of file EcalRegressionData.h.

References subClusRawEnergyOverSCRawEnergy().

74  {
75  return subClusRawEnergyOverSCRawEnergy(static_cast<int>(clusNr));
76  }
float subClusRawEnergyOverSCRawEnergy(size_t clusNr) const

Member Data Documentation

◆ e2nd_

float EcalRegressionData::e2nd_
private

Definition at line 123 of file EcalRegressionData.h.

Referenced by clear(), e2nd(), and fill().

◆ e3x3_

float EcalRegressionData::e3x3_
private

Definition at line 124 of file EcalRegressionData.h.

Referenced by clear(), e3x3(), and fill().

◆ eBottom_

float EcalRegressionData::eBottom_
private

Definition at line 126 of file EcalRegressionData.h.

Referenced by clear(), eBottom(), and fill().

◆ eLeft_

float EcalRegressionData::eLeft_
private

Definition at line 127 of file EcalRegressionData.h.

Referenced by clear(), eLeft(), and fill().

◆ eMax_

float EcalRegressionData::eMax_
private

Definition at line 122 of file EcalRegressionData.h.

Referenced by clear(), eMax(), and fill().

◆ eRight_

float EcalRegressionData::eRight_
private

Definition at line 128 of file EcalRegressionData.h.

Referenced by clear(), eRight(), and fill().

◆ eTop_

float EcalRegressionData::eTop_
private

Definition at line 125 of file EcalRegressionData.h.

Referenced by clear(), eTop(), and fill().

◆ isEB_

bool EcalRegressionData::isEB_
private

Definition at line 108 of file EcalRegressionData.h.

Referenced by clear(), fill(), and isEB().

◆ maxSubClusDR2_

float EcalRegressionData::maxSubClusDR2_
private

Definition at line 140 of file EcalRegressionData.h.

Referenced by clear(), fill(), and maxSubClusDR().

◆ maxSubClusDRDEta_

float EcalRegressionData::maxSubClusDRDEta_
private

Definition at line 142 of file EcalRegressionData.h.

Referenced by clear(), fill(), and maxSubClusDRDEta().

◆ maxSubClusDRDPhi_

float EcalRegressionData::maxSubClusDRDPhi_
private

Definition at line 141 of file EcalRegressionData.h.

Referenced by clear(), fill(), and maxSubClusDRDPhi().

◆ maxSubClusDRRawEnergy_

float EcalRegressionData::maxSubClusDRRawEnergy_
private

Definition at line 143 of file EcalRegressionData.h.

Referenced by clear(), fill(), and maxSubClusDRRawEnergy().

◆ nrVtx_

int EcalRegressionData::nrVtx_
private

Definition at line 149 of file EcalRegressionData.h.

Referenced by clear(), fill(), and nrVtx().

◆ scCalibEnergy_

float EcalRegressionData::scCalibEnergy_
private

Definition at line 112 of file EcalRegressionData.h.

Referenced by clear(), fill(), and scCalibEnergy().

◆ scEta_

float EcalRegressionData::scEta_
private

Definition at line 114 of file EcalRegressionData.h.

Referenced by clear(), fill(), and scEta().

◆ scEtaWidth_

float EcalRegressionData::scEtaWidth_
private

Definition at line 116 of file EcalRegressionData.h.

Referenced by clear(), fill(), and scEtaWidth().

◆ scNrAdditionalClusters_

int EcalRegressionData::scNrAdditionalClusters_
private

Definition at line 118 of file EcalRegressionData.h.

Referenced by clear(), fill(), and scNrAdditionalClusters().

◆ scPhi_

float EcalRegressionData::scPhi_
private

Definition at line 115 of file EcalRegressionData.h.

Referenced by clear(), fill(), and scPhi().

◆ scPhiWidth_

float EcalRegressionData::scPhiWidth_
private

Definition at line 117 of file EcalRegressionData.h.

Referenced by clear(), fill(), and scPhiWidth().

◆ scPreShowerEnergy_

float EcalRegressionData::scPreShowerEnergy_
private

Definition at line 113 of file EcalRegressionData.h.

Referenced by clear(), fill(), and scPreShowerEnergy().

◆ scRawEnergy_

float EcalRegressionData::scRawEnergy_
private

Definition at line 111 of file EcalRegressionData.h.

Referenced by clear(), fill(), and scRawEnergy().

◆ seedClusEnergy_

float EcalRegressionData::seedClusEnergy_
private

Definition at line 121 of file EcalRegressionData.h.

Referenced by clear(), fill(), and seedClusEnergy().

◆ seedCrysEtaOrX_

float EcalRegressionData::seedCrysEtaOrX_
private

Definition at line 135 of file EcalRegressionData.h.

Referenced by clear(), fill(), and seedCrysEtaOrX().

◆ seedCrysIEtaOrIX_

int EcalRegressionData::seedCrysIEtaOrIX_
private

Definition at line 136 of file EcalRegressionData.h.

Referenced by clear(), fill(), and seedCrysIEtaOrIX().

◆ seedCrysIPhiOrIY_

int EcalRegressionData::seedCrysIPhiOrIY_
private

Definition at line 137 of file EcalRegressionData.h.

Referenced by clear(), fill(), and seedCrysIPhiOrIY().

◆ seedCrysPhiOrY_

float EcalRegressionData::seedCrysPhiOrY_
private

Definition at line 134 of file EcalRegressionData.h.

Referenced by clear(), fill(), and seedCrysPhiOrY().

◆ sigmaIEtaIEta_

float EcalRegressionData::sigmaIEtaIEta_
private

Definition at line 129 of file EcalRegressionData.h.

Referenced by clear(), fill(), and sigmaIEtaIEta().

◆ sigmaIEtaIPhi_

float EcalRegressionData::sigmaIEtaIPhi_
private

Definition at line 130 of file EcalRegressionData.h.

Referenced by clear(), fill(), and sigmaIEtaIPhi().

◆ sigmaIPhiIPhi_

float EcalRegressionData::sigmaIPhiIPhi_
private

Definition at line 131 of file EcalRegressionData.h.

Referenced by clear(), fill(), and sigmaIPhiIPhi().

◆ subClusDEta_

std::vector<float> EcalRegressionData::subClusDEta_
private

Definition at line 146 of file EcalRegressionData.h.

Referenced by clear(), fill(), and subClusDEta().

◆ subClusDPhi_

std::vector<float> EcalRegressionData::subClusDPhi_
private

Definition at line 145 of file EcalRegressionData.h.

Referenced by clear(), fill(), and subClusDPhi().

◆ subClusRawEnergy_

std::vector<float> EcalRegressionData::subClusRawEnergy_
private

Definition at line 144 of file EcalRegressionData.h.

Referenced by clear(), fill(), and subClusRawEnergy().