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 
39 
40 private:
41  void resetLink();
44 };
45 #endif
counter
Definition: counter.py:1
DigiSimLinkPileUpSignals::reset
void reset()
Definition: DigiSimLinkPileUpSignals.h:34
DigiSimLinkPileUpSignals::theCounterMapLink
HitCounterToDigisMapType theCounterMapLink
Definition: DigiSimLinkPileUpSignals.h:43
DigiSimLinkPileUpSignals::resetLink
void resetLink()
Definition: DigiSimLinkPileUpSignals.cc:4
DigiSimLinkPileUpSignals::Amplitude
float Amplitude
Definition: DigiSimLinkPileUpSignals.h:16
DigiSimLinkPileUpSignals::HitCounterToDigisMapType
std::map< int, std::vector< std::pair< const PSimHit *, int > >, std::less< int > > HitCounterToDigisMapType
Definition: DigiSimLinkPileUpSignals.h:22
PSimHit.h
DigiSimLinkPileUpSignals
Definition: DigiSimLinkPileUpSignals.h:13
DigiSimLinkPileUpSignals::dumpCounterLink
const HitCounterToDigisMapType & dumpCounterLink() const
Definition: DigiSimLinkPileUpSignals.h:38
DigiSimLinkPileUpSignals::dumpLink
const HitToDigisMapType & dumpLink() const
Definition: DigiSimLinkPileUpSignals.h:36
DigiSimLinkPileUpSignals::DigiSimLinkPileUpSignals
DigiSimLinkPileUpSignals()
Definition: DigiSimLinkPileUpSignals.h:24
DigiSimLinkPileUpSignals::~DigiSimLinkPileUpSignals
virtual ~DigiSimLinkPileUpSignals()
Definition: DigiSimLinkPileUpSignals.h:26
DigiSimLinkPileUpSignals::theMapLink
HitToDigisMapType theMapLink
Definition: DigiSimLinkPileUpSignals.h:42
DigiSimLinkPileUpSignals::HitToDigisMapType
std::map< int, std::vector< std::pair< const PSimHit *, Amplitude > >, std::less< int > > HitToDigisMapType
Definition: DigiSimLinkPileUpSignals.h:19
DigiSimLinkPileUpSignals::add
virtual void add(const std::vector< float > &locAmpl, const size_t &firstChannelWithSignal, const size_t &lastChannelWithSignal, const PSimHit *hit, const int &counter)
Definition: DigiSimLinkPileUpSignals.cc:9
PSimHit
Definition: PSimHit.h:15
hit
Definition: SiStripHitEffFromCalibTree.cc:88