CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiPileUpSignals.h
Go to the documentation of this file.
1 #ifndef Tracker_SiPileUpSignals_h
2 #define Tracker_SiPileUpSignals_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 
26  virtual ~SiPileUpSignals() { }
27 
28  virtual void add(const std::vector<double>& 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 
37 
38  private:
39  void resetLink();
42 };
43 #endif
const HitCounterToDigisMapType & dumpCounterLink() const
std::map< int, std::vector< std::pair< const PSimHit *, int > >, std::less< int > > HitCounterToDigisMapType
std::map< int, std::vector< std::pair< const PSimHit *, Amplitude > >, std::less< int > > HitToDigisMapType
HitToDigisMapType theMapLink
virtual ~SiPileUpSignals()
virtual void add(const std::vector< double > &locAmpl, const size_t &firstChannelWithSignal, const size_t &lastChannelWithSignal, const PSimHit *hit, const int &counter)
const HitToDigisMapType & dumpLink() const
HitCounterToDigisMapType theCounterMapLink