Line | |
---|
1 | #ifndef MARS_Afterpulse
|
---|
2 | #define MARS_Afterpulse
|
---|
3 |
|
---|
4 | #ifndef ROOT_TH2
|
---|
5 | #include <TH2.h>
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef ROOT_TSortedList
|
---|
9 | #include <TSortedList.h>
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | #ifndef MARS_MAvalanchePhotoDiode
|
---|
13 | #include <MAvalanchePhotoDiode.h>
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | class Afterpulse : public TObject
|
---|
17 | {
|
---|
18 | private:
|
---|
19 | UInt_t fCellIndex; // Index of G-APD cell the afterpulse belongs to
|
---|
20 |
|
---|
21 | Float_t fTime; // Time at which the afterpulse avalanch broke through
|
---|
22 | Float_t fAmplitude; // Amplitude (crosstalk!) the pulse produced
|
---|
23 |
|
---|
24 | Int_t Compare(const TObject *obj) const
|
---|
25 | {
|
---|
26 | return static_cast<const Afterpulse*>(obj)->fTime>fTime ? -1 : 1;
|
---|
27 | }
|
---|
28 |
|
---|
29 | Bool_t IsSortable() const { return kTRUE; }
|
---|
30 |
|
---|
31 | public:
|
---|
32 | Afterpulse(UInt_t idx, Float_t t) : fCellIndex(idx), fTime(t), fAmplitude(0) { }
|
---|
33 |
|
---|
34 | UInt_t GetCellIndex() const { return fCellIndex; }
|
---|
35 |
|
---|
36 | Float_t GetTime() const { return fTime; }
|
---|
37 | Float_t GetAmplitude() const { return fAmplitude; }
|
---|
38 |
|
---|
39 | Float_t Process(APD &apd);
|
---|
40 | //~ {
|
---|
41 | //~ // Do not process afterpulses twice (e.g. HitRelative + IncreaseTime)
|
---|
42 | //~ // This should not happen anyway
|
---|
43 | //~ // if (fAmplitude>0)
|
---|
44 | //~ // return fAmplitude;
|
---|
45 | //~
|
---|
46 | //~ const UInt_t nx = apd.GetNumCellsX()+2;
|
---|
47 | //~
|
---|
48 | //~ const UInt_t x = fCellIndex%nx;
|
---|
49 | //~ const UInt_t y = fCellIndex/nx;
|
---|
50 | //~
|
---|
51 | //~ fAmplitude = apd.HitCellImp(x, y, fTime);
|
---|
52 | //~
|
---|
53 | //~ return fAmplitude;
|
---|
54 | //~ }
|
---|
55 | ClassDef(Afterpulse, 1) // An object representing an Afterpulse
|
---|
56 | };
|
---|
57 |
|
---|
58 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.