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 |
|
---|
33 | Bool_t IsPixelExisting(Int_t id) const;
|
---|
34 | Bool_t IsPixelUsed (Int_t id) const;
|
---|
35 | Bool_t IsPixelCore (Int_t id) const;
|
---|
36 |
|
---|
37 | Float_t GetNumPhotonsMin(const MGeomCam *geom=NULL) const;
|
---|
38 | Float_t GetNumPhotonsMax(const MGeomCam *geom=NULL) const;
|
---|
39 |
|
---|
40 | Float_t GetRatioMin() const;
|
---|
41 | Float_t GetRatioMax() const;
|
---|
42 |
|
---|
43 | Float_t GetErrorPhotMin(const MGeomCam *geom=NULL) const;
|
---|
44 | Float_t GetErrorPhotMax(const MGeomCam *geom=NULL) const;
|
---|
45 |
|
---|
46 | MCerPhotPix &operator[](int i) { return *(MCerPhotPix*)(fPixels->UncheckedAt(i)); }
|
---|
47 | MCerPhotPix &operator[](int i) const { return *(MCerPhotPix*)(fPixels->UncheckedAt(i)); }
|
---|
48 |
|
---|
49 | void Reset();
|
---|
50 |
|
---|
51 | void Draw(Option_t* option = "");
|
---|
52 | void Print(Option_t *opt=NULL) const;
|
---|
53 | void Clear(Option_t *opt=NULL) { Reset(); }
|
---|
54 |
|
---|
55 | ClassDef(MCerPhotEvt, 1) // class for an event containing cerenkov photons
|
---|
56 | };
|
---|
57 |
|
---|
58 | #endif
|
---|
59 |
|
---|