CMS 3D CMS Logo

LongDeps.cc
Go to the documentation of this file.
2 
3 using namespace hgcal;
4 
6  const std::vector<float>& energyPerLayer,
7  float energyEE,
8  float energyFH,
9  float energyBH,
10  const std::set<int>& layers)
11  : energyPerLayer_(energyPerLayer),
12  radius_(radius),
13  energyEE_(energyEE),
14  energyFH_(energyFH),
15  energyBH_(energyBH),
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
float energyEE_
Definition: LongDeps.h:40
LongDeps(float radius, const std::vector< float > &energyPerLayer, float energyEE, float energyFH, float energyBH, const std::set< int > &layers)
Definition: LongDeps.cc:5
float energyFH_
Definition: LongDeps.h:41
int lay_Efrac10_
Definition: LongDeps.h:44
std::vector< float > energyPerLayer_
Definition: LongDeps.h:38
float e4oEtot_
Definition: LongDeps.h:46
float energyBH_
Definition: LongDeps.h:42