Changeset 10115
- Timestamp:
- 01/24/11 09:52:27 (14 years ago)
- Location:
- trunk/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/Changelog
r10093 r10115 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2011/01/24 Thomas Bretz 22 23 * melectronics/MAvalanchePhotoDiode.h: 24 - shifted the Afterpulse class behind the APD class to make it 25 compile 26 27 20 28 21 29 2011/01/07 Thomas Bretz -
trunk/Mars/melectronics/MAvalanchePhotoDiode.h
r10111 r10115 9 9 #include <TSortedList.h> 10 10 #endif 11 12 class Afterpulse : public TObject13 {14 private:15 UInt_t fCellIndex; // Index of G-APD cell the afterpulse belongs to16 17 Float_t fTime; // Time at which the afterpulse avalanch broke through18 Float_t fAmplitude; // Amplitude (crosstalk!) the pulse produced19 20 Int_t Compare(const TObject *obj) const21 {22 return static_cast<const Afterpulse*>(obj)->fTime>fTime ? -1 : 1;23 }24 25 Bool_t IsSortable() const { return kTRUE; }26 27 public:28 Afterpulse(UInt_t idx, Float_t t) : fCellIndex(idx), fTime(t), fAmplitude(0) { }29 30 UInt_t GetCellIndex() const { return fCellIndex; }31 32 Float_t GetTime() const { return fTime; }33 Float_t GetAmplitude() const { return fAmplitude; }34 35 Float_t Process(APD &apd)36 {37 // Do not process afterpulses twice (e.g. HitRelative + IncreaseTime)38 // This should not happen anyway39 // if (fAmplitude>0)40 // return fAmplitude;41 42 const UInt_t nx = apd.GetNumCellsX()+2;43 44 const UInt_t x = fCellIndex%nx;45 const UInt_t y = fCellIndex/nx;46 47 fAmplitude = apd.HitCellImp(x, y, fTime);48 49 return fAmplitude;50 }51 };52 11 53 12 class APD : public TObject // FIXME: Derive from TH2? … … 163 122 }; 164 123 124 class Afterpulse : public TObject 125 { 126 private: 127 UInt_t fCellIndex; // Index of G-APD cell the afterpulse belongs to 128 129 Float_t fTime; // Time at which the afterpulse avalanch broke through 130 Float_t fAmplitude; // Amplitude (crosstalk!) the pulse produced 131 132 Int_t Compare(const TObject *obj) const 133 { 134 return static_cast<const Afterpulse*>(obj)->fTime>fTime ? -1 : 1; 135 } 136 137 Bool_t IsSortable() const { return kTRUE; } 138 139 public: 140 Afterpulse(UInt_t idx, Float_t t) : fCellIndex(idx), fTime(t), fAmplitude(0) { } 141 142 UInt_t GetCellIndex() const { return fCellIndex; } 143 144 Float_t GetTime() const { return fTime; } 145 Float_t GetAmplitude() const { return fAmplitude; } 146 147 Float_t Process(APD &apd) 148 { 149 // Do not process afterpulses twice (e.g. HitRelative + IncreaseTime) 150 // This should not happen anyway 151 // if (fAmplitude>0) 152 // return fAmplitude; 153 154 const UInt_t nx = apd.GetNumCellsX()+2; 155 156 const UInt_t x = fCellIndex%nx; 157 const UInt_t y = fCellIndex/nx; 158 159 fAmplitude = apd.HitCellImp(x, y, fTime); 160 161 return fAmplitude; 162 } 163 }; 164 165 165 #endif
Note:
See TracChangeset
for help on using the changeset viewer.