CMS 3D CMS Logo

LongDeps.cc
Go to the documentation of this file.
2 
3 using namespace hgcal;
4 
5 LongDeps::LongDeps(float radius, const std::vector<float>& energyPerLayer, float energyEE,float energyFH,float energyBH,const std::set<int>& layers):
6 energyPerLayer_(energyPerLayer),radius_(radius),energyEE_(energyEE),energyFH_(energyFH),
7 energyBH_(energyBH),layers_(layers) {
8  lay_Efrac10_ = 0;
9  lay_Efrac90_ = 0;
10  float lay_energy = 0;
11  float e4 = 0.;
12  // NB: energyPerLayer_ is 1-indexed
13  for (unsigned lay = 1; lay < energyPerLayer_.size(); ++lay) {
14  lay_energy += energyPerLayer_[lay];
15  if (lay<5) e4 += energyPerLayer_[lay];
16  if (lay_Efrac10_ == 0 && lay_energy > 0.1 * energyEE_){
17  lay_Efrac10_ = lay;
18  }
19  if (lay_Efrac90_ == 0 && lay_energy > 0.9 * energyEE_){
20  lay_Efrac90_ = lay;
21  }
22  }
23  float etot = energyEE_ + energyFH_ + energyBH_;
24  e4oEtot_ = (etot > 0.) ? e4/etot : -1. ;
25 }
int lay_Efrac90_
Definition: LongDeps.h:40
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
float energyEE_
Definition: LongDeps.h:35
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:36
int lay_Efrac10_
Definition: LongDeps.h:39
std::vector< float > energyPerLayer_
Definition: LongDeps.h:33
float e4oEtot_
Definition: LongDeps.h:41
float energyBH_
Definition: LongDeps.h:37