source: tags/Mars-V0.6/manalysis/MCerPhotEvt.h

Last change on this file was 1083, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 1.3 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 MCerPhotPix;
12
13class MCerPhotEvt : public MParContainer
14{
15private:
16 UInt_t fNumPixels;
17 TClonesArray *fPixels;
18
19public:
20 MCerPhotEvt(const char *name=NULL, const char *title=NULL);
21 ~MCerPhotEvt() { delete fPixels; }
22
23 UInt_t GetNumPixels() const { return fNumPixels; }
24 void InitSize(UInt_t num) { fPixels->Expand(num); }
25
26 void AddPixel(Int_t id, Float_t nph, Float_t er)
27 {
28 new ((*fPixels)[fNumPixels++]) MCerPhotPix(id, nph, er);
29 }
30
31
32 Bool_t IsPixelExisting(Int_t id) const;
33 Bool_t IsPixelUsed (Int_t id) const;
34 Bool_t IsPixelCore (Int_t id) const;
35
36 Float_t GetNumPhotonsMin() const;
37 Float_t GetNumPhotonsMax() const;
38
39 MCerPhotPix &operator[](int i) { return *(MCerPhotPix*)(fPixels->UncheckedAt(i)); }
40 MCerPhotPix &operator[](int i) const { return *(MCerPhotPix*)(fPixels->UncheckedAt(i)); }
41
42 void Reset();
43
44 void Draw(Option_t* option = "");
45 void Print(Option_t *opt=NULL) const;
46 void Clear(Option_t *opt=NULL) { Reset(); }
47
48 ClassDef(MCerPhotEvt, 1) // class for an event containing cerenkov photons
49};
50
51#endif
52
Note: See TracBrowser for help on using the repository browser.