CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
hgcal::LongDeps Class Reference

#include <LongDeps.h>

Public Member Functions

float e4oEtot () const
 
float energyBH () const
 
float energyEE () const
 
float energyFH () const
 
const std::vector< float > & energyPerLayer () const
 
int firstLayer () const
 
int lastLayer () const
 
int layerEfrac10 () const
 
int layerEfrac90 () const
 
const std::set< int > & layers () const
 
 LongDeps (float radius, const std::vector< float > &energyPerLayer, float energyEE, float energyFH, float energyBH, const std::set< int > &layers)
 
unsigned nLayers () const
 
float radius () const
 
 ~LongDeps ()
 

Private Attributes

float e4oEtot_
 
float energyBH_
 
float energyEE_
 
float energyFH_
 
std::vector< float > energyPerLayer_
 
int lay_Efrac10_
 
int lay_Efrac90_
 
std::set< int > layers_
 
float radius_
 

Detailed Description

Definition at line 14 of file LongDeps.h.

Constructor & Destructor Documentation

◆ LongDeps()

LongDeps::LongDeps ( float  radius,
const std::vector< float > &  energyPerLayer,
float  energyEE,
float  energyFH,
float  energyBH,
const std::set< int > &  layers 
)

Definition at line 5 of file LongDeps.cc.

12  radius_(radius),
16  layers_(layers) {
17  lay_Efrac10_ = 0;
18  lay_Efrac90_ = 0;
19  float lay_energy = 0;
20  float e4 = 0.;
21  // NB: energyPerLayer_ is 1-indexed
22  for (unsigned lay = 1; lay < energyPerLayer_.size(); ++lay) {
23  lay_energy += energyPerLayer_[lay];
24  if (lay < 5)
25  e4 += energyPerLayer_[lay];
26  if (lay_Efrac10_ == 0 && lay_energy > 0.1 * energyEE_) {
27  lay_Efrac10_ = lay;
28  }
29  if (lay_Efrac90_ == 0 && lay_energy > 0.9 * energyEE_) {
30  lay_Efrac90_ = lay;
31  }
32  }
33  float etot = energyEE_ + energyFH_ + energyBH_;
34  e4oEtot_ = (etot > 0.) ? e4 / etot : -1.;
35 }

References vertexPlots::e4, e4oEtot_, energyBH_, energyEE_, energyFH_, energyPerLayer_, lay_Efrac10_, and lay_Efrac90_.

◆ ~LongDeps()

hgcal::LongDeps::~LongDeps ( )
inline

Definition at line 22 of file LongDeps.h.

22 {}

Member Function Documentation

◆ e4oEtot()

float hgcal::LongDeps::e4oEtot ( ) const
inline

Definition at line 35 of file LongDeps.h.

35 { return e4oEtot_; }

References e4oEtot_.

◆ energyBH()

float hgcal::LongDeps::energyBH ( ) const
inline

Definition at line 27 of file LongDeps.h.

27 { return energyBH_; }

References energyBH_.

◆ energyEE()

float hgcal::LongDeps::energyEE ( ) const
inline

Definition at line 25 of file LongDeps.h.

25 { return energyEE_; }

References energyEE_.

Referenced by hgcal::EGammaPCAHelper::clusterDepthCompatibility().

◆ energyFH()

float hgcal::LongDeps::energyFH ( ) const
inline

Definition at line 26 of file LongDeps.h.

26 { return energyFH_; }

References energyFH_.

◆ energyPerLayer()

const std::vector<float>& hgcal::LongDeps::energyPerLayer ( ) const
inline

Definition at line 28 of file LongDeps.h.

28 { return energyPerLayer_; }

References energyPerLayer_.

Referenced by hgcal::EGammaPCAHelper::findZFirstLayer().

◆ firstLayer()

int hgcal::LongDeps::firstLayer ( ) const
inline

Definition at line 31 of file LongDeps.h.

31 { return (nLayers() > 0 ? *layers_.begin() : -1); }

References layers_, and nLayers().

◆ lastLayer()

int hgcal::LongDeps::lastLayer ( ) const
inline

Definition at line 32 of file LongDeps.h.

32 { return (nLayers() > 0 ? *layers_.rbegin() : -1); }

References layers_, and nLayers().

◆ layerEfrac10()

int hgcal::LongDeps::layerEfrac10 ( ) const
inline

Definition at line 33 of file LongDeps.h.

33 { return lay_Efrac10_; }

References lay_Efrac10_.

◆ layerEfrac90()

int hgcal::LongDeps::layerEfrac90 ( ) const
inline

Definition at line 34 of file LongDeps.h.

34 { return lay_Efrac90_; }

References lay_Efrac90_.

◆ layers()

const std::set<int>& hgcal::LongDeps::layers ( ) const
inline

Definition at line 29 of file LongDeps.h.

29 { return layers_; }

References layers_.

◆ nLayers()

unsigned hgcal::LongDeps::nLayers ( ) const
inline

Definition at line 30 of file LongDeps.h.

30 { return layers_.size(); }

References layers_.

Referenced by firstLayer(), and lastLayer().

◆ radius()

float hgcal::LongDeps::radius ( void  ) const
inline

Definition at line 24 of file LongDeps.h.

24 { return radius_; };

References radius_.

Member Data Documentation

◆ e4oEtot_

float hgcal::LongDeps::e4oEtot_
private

Definition at line 46 of file LongDeps.h.

Referenced by e4oEtot(), and LongDeps().

◆ energyBH_

float hgcal::LongDeps::energyBH_
private

Definition at line 42 of file LongDeps.h.

Referenced by energyBH(), and LongDeps().

◆ energyEE_

float hgcal::LongDeps::energyEE_
private

Definition at line 40 of file LongDeps.h.

Referenced by energyEE(), and LongDeps().

◆ energyFH_

float hgcal::LongDeps::energyFH_
private

Definition at line 41 of file LongDeps.h.

Referenced by energyFH(), and LongDeps().

◆ energyPerLayer_

std::vector<float> hgcal::LongDeps::energyPerLayer_
private

Definition at line 38 of file LongDeps.h.

Referenced by energyPerLayer(), and LongDeps().

◆ lay_Efrac10_

int hgcal::LongDeps::lay_Efrac10_
private

Definition at line 44 of file LongDeps.h.

Referenced by layerEfrac10(), and LongDeps().

◆ lay_Efrac90_

int hgcal::LongDeps::lay_Efrac90_
private

Definition at line 45 of file LongDeps.h.

Referenced by layerEfrac90(), and LongDeps().

◆ layers_

std::set<int> hgcal::LongDeps::layers_
private

Definition at line 43 of file LongDeps.h.

Referenced by firstLayer(), lastLayer(), layers(), and nLayers().

◆ radius_

float hgcal::LongDeps::radius_
private

Definition at line 39 of file LongDeps.h.

Referenced by radius().

hgcal::LongDeps::radius
float radius() const
Definition: LongDeps.h:24
hgcal::LongDeps::energyPerLayer
const std::vector< float > & energyPerLayer() const
Definition: LongDeps.h:28
hgcal::LongDeps::energyEE
float energyEE() const
Definition: LongDeps.h:25
hgcal::LongDeps::energyEE_
float energyEE_
Definition: LongDeps.h:40
hgcal::LongDeps::energyFH_
float energyFH_
Definition: LongDeps.h:41
hgcal::LongDeps::energyBH
float energyBH() const
Definition: LongDeps.h:27
hgcal::LongDeps::energyPerLayer_
std::vector< float > energyPerLayer_
Definition: LongDeps.h:38
hgcal::LongDeps::e4oEtot_
float e4oEtot_
Definition: LongDeps.h:46
hgcal::LongDeps::lay_Efrac10_
int lay_Efrac10_
Definition: LongDeps.h:44
hgcal::LongDeps::layers_
std::set< int > layers_
Definition: LongDeps.h:43
hgcal::LongDeps::energyBH_
float energyBH_
Definition: LongDeps.h:42
hgcal::LongDeps::radius_
float radius_
Definition: LongDeps.h:39
hgcal::LongDeps::energyFH
float energyFH() const
Definition: LongDeps.h:26
hgcal::LongDeps::lay_Efrac90_
int lay_Efrac90_
Definition: LongDeps.h:45
hgcal::LongDeps::nLayers
unsigned nLayers() const
Definition: LongDeps.h:30
vertexPlots.e4
e4
Definition: vertexPlots.py:64
hgcal::LongDeps::layers
const std::set< int > & layers() const
Definition: LongDeps.h:29