CMS 3D CMS Logo

HGCalMulticluster_SA.h
Go to the documentation of this file.
1 #ifndef L1Trigger_L1THGCal_HGCalMulticluster_SA_h
2 #define L1Trigger_L1THGCal_HGCalMulticluster_SA_h
3 
5 
6 #include <vector>
7 
8 namespace l1thgcfirmware {
9 
11  public:
13  : centre_x_(0),
14  centre_y_(0),
15  centre_z_(0),
16  centreProj_x_(0),
17  centreProj_y_(0),
18  centreProj_z_(0),
19  mipPt_(0),
20  sumPt_() {}
21 
23 
24  void addConstituent(const l1thgcfirmware::HGCalCluster& tc, bool updateCentre = true, float fraction = 1.);
25 
26  ~HGCalMulticluster() = default;
27 
28  const std::vector<l1thgcfirmware::HGCalCluster>& constituents() const { return constituents_; }
29 
30  unsigned size() const { return constituents_.size(); }
31 
32  float sumPt() const { return sumPt_; }
33 
34  private:
35  // Could replace this with own simple implementation of GlobalPoint?
36  // Or just a struct?
37  float centre_x_;
38  float centre_y_;
39  float centre_z_;
40 
44 
45  float mipPt_;
46  float sumPt_;
47 
48  std::vector<l1thgcfirmware::HGCalCluster> constituents_;
49 
50  void updateP4AndPosition(const l1thgcfirmware::HGCalCluster& tc, bool updateCentre = true, float fraction = 1.);
51  };
52 
53  typedef std::vector<HGCalMulticluster> HGCalMulticlusterSACollection;
54 
55 } // namespace l1thgcfirmware
56 
57 #endif
void updateP4AndPosition(const l1thgcfirmware::HGCalCluster &tc, bool updateCentre=true, float fraction=1.)
const std::vector< l1thgcfirmware::HGCalCluster > & constituents() const
void addConstituent(const l1thgcfirmware::HGCalCluster &tc, bool updateCentre=true, float fraction=1.)
std::vector< HGCalMulticluster > HGCalMulticlusterSACollection
std::vector< l1thgcfirmware::HGCalCluster > constituents_