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