CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Spot.h
Go to the documentation of this file.
1 #ifndef RecoEgamma_EgammaTools_Spot_h
2 #define RecoEgamma_EgammaTools_Spot_h
3 
5 #include <vector>
6 
7 namespace hgcal {
8 
9  class Spot {
10  public:
11  Spot(DetId detid, double energy, const std::vector<double>& row, unsigned int layer, float fraction, double mip)
12  : detId_(detid),
13  energy_(energy),
14  row_(row),
15  layer_(layer),
16  fraction_(fraction),
17  mip_(mip),
18  multiplicity_(int(energy / mip)),
19  subdet_(detid.subdetId()),
20  isCore_(fraction > 0.) {}
21  ~Spot() {}
22  inline DetId detId() const { return detId_; }
23  inline float energy() const { return energy_; }
24  inline const double* row() const { return &row_[0]; }
25  inline float fraction() const { return fraction_; }
26  inline float mip() const { return mip_; }
27  inline int multiplicity() const { return multiplicity_; }
28  inline unsigned int layer() const { return layer_; }
29  inline int subdet() const { return subdet_; }
30  inline bool isCore() const { return isCore_; }
31 
32  private:
34  float energy_;
35  std::vector<double> row_;
36  unsigned int layer_;
37  float fraction_;
38  float mip_;
40  int subdet_;
41  bool isCore_;
42  };
43 
44 } // namespace hgcal
45 
46 #endif
unsigned int layer_
Definition: Spot.h:36
bool isCore_
Definition: Spot.h:41
~Spot()
Definition: Spot.h:21
int subdet_
Definition: Spot.h:40
float mip_
Definition: Spot.h:38
DetId detId_
Definition: Spot.h:33
float energy() const
Definition: Spot.h:23
int subdet() const
Definition: Spot.h:29
Spot(DetId detid, double energy, const std::vector< double > &row, unsigned int layer, float fraction, double mip)
Definition: Spot.h:11
DetId detId() const
Definition: Spot.h:22
Definition: DetId.h:17
unsigned int layer() const
Definition: Spot.h:28
std::vector< double > row_
Definition: Spot.h:35
int multiplicity() const
Definition: Spot.h:27
float fraction() const
Definition: Spot.h:25
float energy_
Definition: Spot.h:34
float mip() const
Definition: Spot.h:26
const double * row() const
Definition: Spot.h:24
bool isCore() const
Definition: Spot.h:30
float fraction_
Definition: Spot.h:37
int multiplicity_
Definition: Spot.h:39