Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:37:39

0001 #ifndef CSCRecHitD_CSCStripHitData_h
0002 #define CSCRecHitD_CSCStripHitData_h
0003 
0004 /** \class CSCStripHitData
0005  *
0006  * Hold strip hit data while building strip hit clusters.
0007  * Only 4 timebins of the SCA adc pulseheights are stored.
0008  *
0009  * tmax() returns the bin with max pulseheight, and we store
0010  * bins tmax-1 to tmax+2. Therefore the peak bin is the 2nd.
0011  *
0012  */
0013 
0014 #include <vector>
0015 
0016 class CSCStripHitData {
0017 public:
0018   CSCStripHitData() : istrip_(-1), tmax_(-1), phRaw_(nbins_), ph_(nbins_) {}
0019 
0020   CSCStripHitData(int istrip, int tmax, const std::vector<float>& phRaw, const std::vector<float>& ph)
0021       : istrip_(istrip), tmax_(tmax), phRaw_(phRaw), ph_(ph) {}
0022 
0023   int strip() const { return istrip_; }
0024   int tmax() const { return tmax_; }
0025   std::vector<float> const& ph() const { return ph_; }
0026   std::vector<float> const& phRaw() const { return phRaw_; }
0027 
0028   /// Order by 2nd ph bin
0029   bool operator<(const CSCStripHitData& data) const { return ph_[1] < data.ph_[1]; }
0030 
0031 private:
0032   static const int nbins_ = 4;  //@ Number of ph bins saved
0033   int istrip_;
0034   int tmax_;
0035   std::vector<float> phRaw_;
0036   std::vector<float> ph_;
0037 };
0038 
0039 #endif