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.

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

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 }
int lay_Efrac90_
Definition: LongDeps.h:45
const std::set< int > & layers() const
Definition: LongDeps.h:29
float energyEE_
Definition: LongDeps.h:40
float radius() const
Definition: LongDeps.h:24
const std::vector< float > & energyPerLayer() const
Definition: LongDeps.h:28
float energyFH_
Definition: LongDeps.h:41
int lay_Efrac10_
Definition: LongDeps.h:44
std::set< int > layers_
Definition: LongDeps.h:43
float energyBH() const
Definition: LongDeps.h:27
std::vector< float > energyPerLayer_
Definition: LongDeps.h:38
float radius_
Definition: LongDeps.h:39
float e4oEtot_
Definition: LongDeps.h:46
float energyBH_
Definition: LongDeps.h:42
float energyFH() const
Definition: LongDeps.h:26
float energyEE() const
Definition: LongDeps.h:25

◆ ~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.

References e4oEtot_.

35 { return e4oEtot_; }
float e4oEtot_
Definition: LongDeps.h:46

◆ energyBH()

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

Definition at line 27 of file LongDeps.h.

References energyBH_.

27 { return energyBH_; }
float energyBH_
Definition: LongDeps.h:42

◆ energyEE()

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

Definition at line 25 of file LongDeps.h.

References energyEE_.

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

25 { return energyEE_; }
float energyEE_
Definition: LongDeps.h:40

◆ energyFH()

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

Definition at line 26 of file LongDeps.h.

References energyFH_.

26 { return energyFH_; }
float energyFH_
Definition: LongDeps.h:41

◆ energyPerLayer()

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

Definition at line 28 of file LongDeps.h.

References energyPerLayer_.

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

28 { return energyPerLayer_; }
std::vector< float > energyPerLayer_
Definition: LongDeps.h:38

◆ firstLayer()

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

Definition at line 31 of file LongDeps.h.

References layers_, and nLayers().

31 { return (nLayers() > 0 ? *layers_.begin() : -1); }
unsigned nLayers() const
Definition: LongDeps.h:30
std::set< int > layers_
Definition: LongDeps.h:43

◆ lastLayer()

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

Definition at line 32 of file LongDeps.h.

References layers_, and nLayers().

32 { return (nLayers() > 0 ? *layers_.rbegin() : -1); }
unsigned nLayers() const
Definition: LongDeps.h:30
std::set< int > layers_
Definition: LongDeps.h:43

◆ layerEfrac10()

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

Definition at line 33 of file LongDeps.h.

References lay_Efrac10_.

33 { return lay_Efrac10_; }
int lay_Efrac10_
Definition: LongDeps.h:44

◆ layerEfrac90()

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

Definition at line 34 of file LongDeps.h.

References lay_Efrac90_.

34 { return lay_Efrac90_; }
int lay_Efrac90_
Definition: LongDeps.h:45

◆ layers()

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

Definition at line 29 of file LongDeps.h.

References layers_.

29 { return layers_; }
std::set< int > layers_
Definition: LongDeps.h:43

◆ nLayers()

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

Definition at line 30 of file LongDeps.h.

References layers_.

Referenced by firstLayer(), and lastLayer().

30 { return layers_.size(); }
std::set< int > layers_
Definition: LongDeps.h:43

◆ radius()

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

Definition at line 24 of file LongDeps.h.

References radius_.

24 { return radius_; };
float radius_
Definition: LongDeps.h:39

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