CMS 3D CMS Logo

DigiSimLinkPileUpSignals.h
Go to the documentation of this file.
1 #ifndef SimTracker_SiStripDigitizer_DigiSimLinkPileUpSignals_h
2 #define SimTracker_SiStripDigitizer_DigiSimLinkPileUpSignals_h
3 
4 #include <map>
5 #include <vector>
7 
8 class SimHit;
14 public:
15  // type used to describe the amplitude on a strip
16  typedef float Amplitude;
17  // associates to each strip a vector of pairs {simhit,amplitude}.
18  // That allows later to comput the fraction of the contribution of each simhit to the ADC value
19  typedef std::map<int, std::vector<std::pair<const PSimHit*, Amplitude> >, std::less<int> > HitToDigisMapType;
20  // associates to each strip a vector of pairs {simhit,index_in_the_allhit_collection}
21  // That allows to build the links properly
22  typedef std::map<int, std::vector<std::pair<const PSimHit*, int> >, std::less<int> > HitCounterToDigisMapType;
23 
25 
27 
28  virtual void add(const std::vector<float>& locAmpl,
29  const size_t& firstChannelWithSignal,
30  const size_t& lastChannelWithSignal,
31  const PSimHit* hit,
32  const int& counter);
33 
34  void reset() { resetLink(); }
35 
36  const HitToDigisMapType& dumpLink() const { return theMapLink; }
37 
38  const HitCounterToDigisMapType& dumpCounterLink() const { return theCounterMapLink; }
39 
40 private:
41  void resetLink();
42  HitToDigisMapType theMapLink;
43  HitCounterToDigisMapType theCounterMapLink;
44 };
45 #endif
std::map< int, std::vector< std::pair< const PSimHit *, Amplitude > >, std::less< int > > HitToDigisMapType
virtual void add(const std::vector< float > &locAmpl, const size_t &firstChannelWithSignal, const size_t &lastChannelWithSignal, const PSimHit *hit, const int &counter)
const HitToDigisMapType & dumpLink() const
const HitCounterToDigisMapType & dumpCounterLink() const
HitCounterToDigisMapType theCounterMapLink
std::map< int, std::vector< std::pair< const PSimHit *, int > >, std::less< int > > HitCounterToDigisMapType