File indexing completed on 2024-04-06 12:30:53
0001 #ifndef SimTracker_Common_SimHitInfoForLinks
0002 #define SimTracker_Common_SimHitInfoForLinks
0003
0004 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
0005 #include <vector>
0006
0007
0008
0009
0010
0011
0012 class SimHitInfoForLinks {
0013 public:
0014 explicit SimHitInfoForLinks(PSimHit const *hitp, size_t hitindex, unsigned int tofbin, size_t hitInd4CR, float amp)
0015 : eventId_(hitp->eventId()),
0016 trackIds_(1, hitp->trackId()),
0017 hitIndex_(hitindex),
0018 tofBin_(tofbin),
0019 hitInd4CR_(hitInd4CR),
0020 ampl_(amp) {}
0021
0022 const EncodedEventId &eventId() const { return eventId_; }
0023 const std::vector<unsigned int> &trackIds() const { return trackIds_; }
0024 std::vector<unsigned int> &trackIds() { return trackIds_; }
0025 const unsigned int trackId() const { return trackIds_[0]; }
0026 const size_t hitIndex() const { return hitIndex_; }
0027 const unsigned int tofBin() const { return tofBin_; }
0028 const size_t hitIndex4ChargeRew() const { return hitInd4CR_; }
0029 const float getAmpl() const { return ampl_; }
0030
0031 private:
0032 EncodedEventId eventId_;
0033 std::vector<unsigned int> trackIds_;
0034 size_t hitIndex_;
0035 unsigned int tofBin_;
0036 size_t hitInd4CR_;
0037 float ampl_;
0038 };
0039 #endif