source: trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h@ 1879

Last change on this file since 1879 was 1715, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 1.7 KB
Line 
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
11class MGeomCam;
12class MCerPhotPix;
13
14class MCerPhotEvt : public MParContainer
15{
16private:
17 UInt_t fNumPixels;
18 TClonesArray *fPixels; // FIXME: Change TClonesArray away from a pointer?
19
20public:
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 MCerPhotPix *GetPixById(int id) const;
51
52 void Reset();
53
54 void Draw(Option_t* option = "");
55 void Print(Option_t *opt=NULL) const;
56 void Clear(Option_t *opt=NULL) { Reset(); }
57
58 ClassDef(MCerPhotEvt, 1) // class for an event containing cerenkov photons
59};
60
61#endif
62
Note: See TracBrowser for help on using the repository browser.