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

Last change on this file since 2147 was 2147, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 1.8 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 void FixSize();
33
34 //Bool_t AddEvent(const MCerPhotEvt &evt);
35
36 Bool_t IsPixelExisting(Int_t id) const;
37 Bool_t IsPixelUsed (Int_t id) const;
38 Bool_t IsPixelCore (Int_t id) const;
39
40 Float_t GetNumPhotonsMin(const MGeomCam *geom=NULL) const;
41 Float_t GetNumPhotonsMax(const MGeomCam *geom=NULL) const;
42
43 Float_t GetRatioMin(const MGeomCam *geom=NULL) const;
44 Float_t GetRatioMax(const MGeomCam *geom=NULL) const;
45
46 Float_t GetErrorPhotMin(const MGeomCam *geom=NULL) const;
47 Float_t GetErrorPhotMax(const MGeomCam *geom=NULL) const;
48
49 MCerPhotPix &operator[](int i) { return *(MCerPhotPix*)(fPixels->UncheckedAt(i)); }
50 MCerPhotPix &operator[](int i) const { return *(MCerPhotPix*)(fPixels->UncheckedAt(i)); }
51
52 void Scale(Double_t f);
53 void RemoveUnusedPixels();
54
55 MCerPhotPix *GetPixById(int id) const;
56
57 void Reset();
58
59 void Draw(Option_t* option = "");
60 void Print(Option_t *opt=NULL) const;
61 void Clear(Option_t *opt=NULL) { Reset(); }
62
63 ClassDef(MCerPhotEvt, 1) // class for an event containing cerenkov photons
64};
65
66#endif
67
Note: See TracBrowser for help on using the repository browser.