Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:56

0001 #ifndef PixelDigiAddTempInfo_h
0002 #define PixelDigiAddTempInfo_h
0003 
0004 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0005 
0006 class PixelDigiAddTempInfo {
0007 public:
0008   PixelDigiAddTempInfo(unsigned int ch,
0009                        size_t Hindex,
0010                        const Local3DPoint& entryP,
0011                        const Local3DPoint& exitP,
0012                        int PType,
0013                        int PartID,
0014                        uint32_t detID,
0015                        float InitCharge) {
0016     chan_ = ch;
0017     index_ = Hindex;
0018     theEntryPoint_ = entryP;
0019     theExitPoint_ = exitP;
0020     theProcessType_ = PType;
0021     thePartID_ = PartID;
0022     detectorID_ = detID;
0023     charge_ = InitCharge;
0024   };
0025   PixelDigiAddTempInfo() = default;
0026   ~PixelDigiAddTempInfo() = default;
0027   const unsigned int channel() const { return chan_; };
0028   const size_t hitIndex() const { return index_; };
0029   const Local3DPoint& entryPoint() const { return theEntryPoint_; };
0030   const Local3DPoint& exitPoint() const { return theExitPoint_; }
0031   const int processType() const { return theProcessType_; };
0032   const int trackID() const { return thePartID_; };
0033   const uint32_t detID() const { return detectorID_; };
0034   const float getCharge() const { return charge_; };
0035   void addCharge(float charge_to_be_added) { charge_ += charge_to_be_added; };
0036 
0037   inline bool operator<(const PixelDigiAddTempInfo& other) const { return channel() < other.channel(); }
0038 
0039 private:
0040   unsigned int chan_;
0041   size_t index_;
0042   Local3DPoint theEntryPoint_;
0043   Local3DPoint theExitPoint_;
0044   int theProcessType_;
0045   int thePartID_;
0046   uint32_t detectorID_;
0047   float charge_;
0048 };
0049 #endif