CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/SimTracker/SiStripDigitizer/interface/SiPileUpSignals.h

Go to the documentation of this file.
00001 #ifndef Tracker_SiPileUpSignals_h
00002 #define Tracker_SiPileUpSignals_h
00003 
00004 #include <map>
00005 #include <vector>
00006 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00007 
00008 class SimHit;
00013 class SiPileUpSignals{ 
00014  public:
00015   // type used to describe the amplitude on a strip
00016   typedef float Amplitude;
00017   // associates to each strip a vector of pairs {simhit,amplitude}. 
00018   // That allows later to comput the fraction of the contribution of each simhit to the ADC value
00019   typedef std::map< int , std::vector < std::pair < const PSimHit*, Amplitude > >, std::less<int> >  HitToDigisMapType;
00020   // associates to each strip a vector of pairs {simhit,index_in_the_allhit_collection}
00021   // That allows to build the links properly
00022   typedef std::map< int , std::vector < std::pair < const PSimHit*, int > >, std::less<int> >  HitCounterToDigisMapType;
00023   
00024   SiPileUpSignals() { reset(); }
00025 
00026   virtual ~SiPileUpSignals() { }
00027   
00028   virtual void add(const std::vector<double>& locAmpl,
00029                    const size_t& firstChannelWithSignal, const size_t& lastChannelWithSignal,
00030                    const PSimHit* hit,const int& counter);
00031                    
00032   void reset(){ resetLink(); }
00033   
00034   const HitToDigisMapType& dumpLink() const { return theMapLink; }
00035   
00036   const HitCounterToDigisMapType& dumpCounterLink() const { return theCounterMapLink; }
00037   
00038  private:
00039   void resetLink();
00040   HitToDigisMapType theMapLink;
00041   HitCounterToDigisMapType theCounterMapLink;
00042 };
00043 #endif