Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-04-15 22:41:36

0001 #ifndef L1Trigger_DTTriggerPhase2_ShowerCandidate_h
0002 #define L1Trigger_DTTriggerPhase2_ShowerCandidate_h
0003 #include <iostream>
0004 #include <memory>
0005 
0006 #include "L1Trigger/DTTriggerPhase2/interface/DTprimitive.h"
0007 #include "DataFormats/DTDigi/interface/DTDigiCollection.h"
0008 
0009 class ShowerCandidate {
0010 public:
0011   ShowerCandidate();
0012   ShowerCandidate& operator=(const ShowerCandidate& other);
0013 
0014   // setter methods
0015   void rawId(int rawId) { rawId_ = rawId; }
0016   void setBX(int bx) { bx_ = bx; }
0017   void setNhits(int nhits) { nhits_ = nhits; }
0018   void setMinWire(int wmin) { wmin_ = wmin; }
0019   void setMaxWire(int wmax) { wmax_ = wmax; }
0020   void setAvgPos(float avgPos) { avgPos_ = avgPos; }
0021   void setAvgTime(float avgTime) { avgTime_ = avgTime; }
0022   void flag() { shower_flag_ = true; }
0023 
0024   // getters methods
0025   int getRawId() { return rawId_; }
0026   int getBX() { return bx_; }
0027   int getNhits() { return nhits_; }
0028   int getMinWire() { return wmin_; }
0029   int getMaxWire() { return wmax_; }
0030   float getAvgPos() { return avgPos_; }
0031   float getAvgTime() { return avgTime_; }
0032   std::vector<int>& getWiresProfile() { return wires_profile_; }
0033   bool isFlagged() { return shower_flag_; }
0034 
0035   // Other methods
0036   void clear();
0037 
0038 private:
0039   //------------------------------------------------------------------
0040   //---  ShowerCandidate's data
0041   //------------------------------------------------------------------
0042   int nhits_;
0043   int rawId_;
0044   int bx_;
0045   int wmin_;
0046   int wmax_;
0047   bool shower_flag_;
0048   float avgPos_;
0049   float avgTime_;
0050   std::vector<int> wires_profile_;
0051 };
0052 
0053 typedef std::vector<ShowerCandidate> ShowerCandidates;
0054 typedef std::shared_ptr<ShowerCandidate> ShowerCandidatePtr;
0055 typedef std::vector<ShowerCandidatePtr> ShowerCandidatePtrs;
0056 
0057 #endif