1 | #ifndef MARS_MCerPhotEvt
|
---|
2 | #define MARS_MCerPhotEvt
|
---|
3 |
|
---|
4 | #ifndef ROOT_TClonesArray
|
---|
5 | #include <TClonesArray.h>
|
---|
6 | #endif
|
---|
7 | #ifndef MARS_MCamEvent
|
---|
8 | #include "MCamEvent.h"
|
---|
9 | #endif
|
---|
10 | #ifndef MARS_MCerPhotPix
|
---|
11 | #include "MCerPhotPix.h"
|
---|
12 | #endif
|
---|
13 |
|
---|
14 | class MGeomCam;
|
---|
15 | class MCerPhotPix;
|
---|
16 |
|
---|
17 | class MCerPhotEvt : public MCamEvent
|
---|
18 | {
|
---|
19 | private:
|
---|
20 | UInt_t fNumPixels;
|
---|
21 | TClonesArray *fPixels; //-> FIXME: Change TClonesArray away from a pointer?
|
---|
22 |
|
---|
23 | public:
|
---|
24 | MCerPhotEvt(const char *name=NULL, const char *title=NULL);
|
---|
25 | ~MCerPhotEvt() { delete fPixels; }
|
---|
26 |
|
---|
27 | UInt_t GetNumPixels() const { return fNumPixels; }
|
---|
28 | //void InitSize(UInt_t num) { fPixels->Expand(num); }
|
---|
29 |
|
---|
30 | void AddPixel(Int_t id, Float_t nph, Float_t er)
|
---|
31 | {
|
---|
32 | new ((*fPixels)[fNumPixels++]) MCerPhotPix(id, nph, er);
|
---|
33 | }
|
---|
34 |
|
---|
35 | void FixSize();
|
---|
36 |
|
---|
37 | //Bool_t AddEvent(const MCerPhotEvt &evt);
|
---|
38 |
|
---|
39 | Bool_t IsPixelExisting(Int_t id) const;
|
---|
40 | Bool_t IsPixelUsed (Int_t id) const;
|
---|
41 | Bool_t IsPixelCore (Int_t id) const;
|
---|
42 |
|
---|
43 | Float_t GetNumPhotonsMin(const MGeomCam *geom=NULL) const;
|
---|
44 | Float_t GetNumPhotonsMax(const MGeomCam *geom=NULL) const;
|
---|
45 |
|
---|
46 | Float_t GetRatioMin(const MGeomCam *geom=NULL) const;
|
---|
47 | Float_t GetRatioMax(const MGeomCam *geom=NULL) const;
|
---|
48 |
|
---|
49 | Float_t GetErrorPhotMin(const MGeomCam *geom=NULL) const;
|
---|
50 | Float_t GetErrorPhotMax(const MGeomCam *geom=NULL) const;
|
---|
51 |
|
---|
52 | MCerPhotPix &operator[](int i) { return *(MCerPhotPix*)(fPixels->UncheckedAt(i)); }
|
---|
53 | MCerPhotPix &operator[](int i) const { return *(MCerPhotPix*)(fPixels->UncheckedAt(i)); }
|
---|
54 |
|
---|
55 | void Scale(Double_t f);
|
---|
56 | void RemoveUnusedPixels();
|
---|
57 |
|
---|
58 | MCerPhotPix *GetPixById(int id) const;
|
---|
59 |
|
---|
60 | void Reset();
|
---|
61 |
|
---|
62 | void Draw(Option_t* option = "");
|
---|
63 | void Print(Option_t *opt=NULL) const;
|
---|
64 | void Clear(Option_t *opt=NULL) { Reset(); }
|
---|
65 |
|
---|
66 | Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
---|
67 | void DrawPixelContent(Int_t num) const
|
---|
68 | {
|
---|
69 | }
|
---|
70 |
|
---|
71 | ClassDef(MCerPhotEvt, 1) // class for an event containing cerenkov photons
|
---|
72 | };
|
---|
73 |
|
---|
74 | #endif
|
---|
75 |
|
---|