CMS 3D CMS Logo

PixelSimHitExtraInfo.h
Go to the documentation of this file.
1 #ifndef PixelSimHitExtraInfo_h
2 #define PixelSimHitExtraInfo_h
3 
5 #include <vector>
6 #include <cstdint>
7 
9 public:
10  PixelSimHitExtraInfo(size_t Hindex, const Local3DPoint& entryP, const Local3DPoint& exitP, unsigned int ch) {
11  index_ = Hindex;
12  theEntryPoint_ = entryP;
13  theExitPoint_ = exitP;
14  chan_.push_back(ch);
15  };
16  PixelSimHitExtraInfo() = default;
17  ~PixelSimHitExtraInfo() = default;
18  size_t hitIndex() const { return index_; };
19  const Local3DPoint& entryPoint() const { return theEntryPoint_; };
20  const Local3DPoint& exitPoint() const { return theExitPoint_; }
21  const std::vector<unsigned int>& channel() const { return chan_; };
22 
23  inline bool operator<(const PixelSimHitExtraInfo& other) const { return hitIndex() < other.hitIndex(); }
24 
25  void addDigiInfo(unsigned int theDigiChannel) { chan_.push_back(theDigiChannel); }
26  bool isInTheList(unsigned int channelToCheck) {
27  bool result_in_the_list = false;
28  for (unsigned int icheck = 0; icheck < chan_.size(); icheck++) {
29  if (channelToCheck == chan_[icheck]) {
30  result_in_the_list = true;
31  break;
32  }
33  }
34  return result_in_the_list;
35  }
36 
37 private:
38  size_t index_;
41  std::vector<unsigned int> chan_;
42 };
43 #endif
std::vector< unsigned int > chan_
bool operator<(const PixelSimHitExtraInfo &other) const
void addDigiInfo(unsigned int theDigiChannel)
~PixelSimHitExtraInfo()=default
bool isInTheList(unsigned int channelToCheck)
const Local3DPoint & entryPoint() const
const std::vector< unsigned int > & channel() const
PixelSimHitExtraInfo(size_t Hindex, const Local3DPoint &entryP, const Local3DPoint &exitP, unsigned int ch)
PixelSimHitExtraInfo()=default
const Local3DPoint & exitPoint() const