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

Last change on this file since 1465 was 1268, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 1.4 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
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 MCerPhotPix &operator[](int i) { return *(MCerPhotPix*)(fPixels->UncheckedAt(i)); }
41 MCerPhotPix &operator[](int i) const { return *(MCerPhotPix*)(fPixels->UncheckedAt(i)); }
42
43 void Reset();
44
45 void Draw(Option_t* option = "");
46 void Print(Option_t *opt=NULL) const;
47 void Clear(Option_t *opt=NULL) { Reset(); }
48
49 ClassDef(MCerPhotEvt, 1) // class for an event containing cerenkov photons
50};
51
52#endif
53
Note: See TracBrowser for help on using the repository browser.