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, const size_t& lastChannelWithSignal,
30  const PSimHit* hit,const int& counter);
31 
32  void reset(){ resetLink(); }
33 
34  const HitToDigisMapType& dumpLink() const { return theMapLink; }
35 
36  const HitCounterToDigisMapType& dumpCounterLink() const { return theCounterMapLink; }
37 
38  private:
39  void resetLink();
40  HitToDigisMapType theMapLink;
41  HitCounterToDigisMapType theCounterMapLink;
42 };
43 #endif
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 *, Amplitude > >, std::less< int > > HitToDigisMapType
std::map< int, std::vector< std::pair< const PSimHit *, int > >, std::less< int > > HitCounterToDigisMapType