Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:38

0001 #ifndef L1Trigger_L1THGCal_HGCalMulticluster_SA_h
0002 #define L1Trigger_L1THGCal_HGCalMulticluster_SA_h
0003 
0004 #include "L1Trigger/L1THGCal/interface/backend/HGCalCluster_SA.h"
0005 
0006 #include <vector>
0007 
0008 namespace l1thgcfirmware {
0009 
0010   class HGCalMulticluster {
0011   public:
0012     HGCalMulticluster()
0013         : centre_x_(0),
0014           centre_y_(0),
0015           centre_z_(0),
0016           centreProj_x_(0),
0017           centreProj_y_(0),
0018           centreProj_z_(0),
0019           mipPt_(0),
0020           sumPt_() {}
0021 
0022     HGCalMulticluster(const l1thgcfirmware::HGCalCluster& tc, float fraction = 1.);
0023 
0024     void addConstituent(const l1thgcfirmware::HGCalCluster& tc, bool updateCentre = true, float fraction = 1.);
0025 
0026     ~HGCalMulticluster() = default;
0027 
0028     const std::vector<l1thgcfirmware::HGCalCluster>& constituents() const { return constituents_; }
0029 
0030     unsigned size() const { return constituents_.size(); }
0031 
0032     float sumPt() const { return sumPt_; }
0033 
0034   private:
0035     // Could replace this with own simple implementation of GlobalPoint?
0036     // Or just a struct?
0037     float centre_x_;
0038     float centre_y_;
0039     float centre_z_;
0040 
0041     float centreProj_x_;
0042     float centreProj_y_;
0043     float centreProj_z_;
0044 
0045     float mipPt_;
0046     float sumPt_;
0047 
0048     std::vector<l1thgcfirmware::HGCalCluster> constituents_;
0049 
0050     void updateP4AndPosition(const l1thgcfirmware::HGCalCluster& tc, bool updateCentre = true, float fraction = 1.);
0051   };
0052 
0053   typedef std::vector<HGCalMulticluster> HGCalMulticlusterSACollection;
0054 
0055 }  // namespace l1thgcfirmware
0056 
0057 #endif