1 | #ifndef MARS_MAvalanchePhotoDiode
|
---|
2 | #define MARS_MAvalanchePhotoDiode
|
---|
3 |
|
---|
4 | #ifndef ROOT_TH2
|
---|
5 | #include <TH2.h>
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class APD : public TObject // FIXME: Derive from TH2?
|
---|
9 | {
|
---|
10 | private:
|
---|
11 | TH2F fHist;
|
---|
12 |
|
---|
13 | Float_t fCrosstalkProb; // Probability that a converted photon creates another one in a neighboring cell
|
---|
14 | Float_t fDeadTime; // Deadtime of a single cell after a hit
|
---|
15 | Float_t fRecoveryTime; // Recoverytime after Deadtime (1-exp(-t/fRecoveryTime)
|
---|
16 |
|
---|
17 | Float_t HitCellImp(Int_t x, Int_t y, Float_t t=0);
|
---|
18 |
|
---|
19 | public:
|
---|
20 | APD(Int_t n, Float_t prob=0, Float_t dt=0, Float_t rt=0);
|
---|
21 |
|
---|
22 | Float_t HitCell(Int_t x, Int_t y, Float_t t=0);
|
---|
23 | Float_t HitRandomCell(Float_t t=0);
|
---|
24 |
|
---|
25 | void FillEmpty(Float_t t=0);
|
---|
26 | void FillRandom(Float_t rate, Float_t t=0);
|
---|
27 |
|
---|
28 | Int_t CountDeadCells(Float_t t=0) const;
|
---|
29 | Int_t CountRecoveringCells(Float_t t=0) const;
|
---|
30 |
|
---|
31 | Float_t GetCellContent(Int_t x, Int_t y) const { return fHist.GetBinContent(x, y); }
|
---|
32 | Int_t GetNumCellsX() const { return fHist.GetNbinsX(); }
|
---|
33 |
|
---|
34 | Float_t GetCrosstalkProb() const { return fCrosstalkProb; }
|
---|
35 | Float_t GetDeadTime() const { return fDeadTime; }
|
---|
36 | Float_t GetRecoveryTime() const { return fRecoveryTime; }
|
---|
37 |
|
---|
38 | void Draw(Option_t *o="") { fHist.Draw(o); }
|
---|
39 | void DrawCopy(Option_t *o="") { fHist.DrawCopy(o); }
|
---|
40 |
|
---|
41 | ClassDef(APD, 1) // An object representing a Geigermode APD
|
---|
42 | };
|
---|
43 |
|
---|
44 | #endif
|
---|