source: trunk/MagicSoft/Mars/manalysis/MCerPhotPix.h@ 6572

Last change on this file since 6572 was 6265, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.7 KB
Line 
1#ifndef MARS_MCerPhotPix_H
2#define MARS_MCerPhotPix_H
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7#ifndef MARS_MMath
8#include "MMath.h"
9#endif
10
11class MCerPhotPix : public MParContainer
12{
13private:
14
15 Int_t fPixId; // the pixel Id
16
17 Bool_t fIsCore; // the pixel is a Core pixel -> kTRUE
18 Short_t fRing; // NT: number of analyzed rings around the core pixels, fRing>0 means: used, fRing= 0 means: unused, fRing= -1 means: unmapped (no possible to use in the calculation of the image parameters)
19 Short_t fIdxIsland; // the pixel is a Core pixel -> kTRUE
20
21 Float_t fPhot; // The number of Cerenkov photons
22 Float_t fErrPhot; // the error of fPhot
23
24 Bool_t fIsSaturated; // the pixel's low gain is saturated
25 Bool_t fIsHGSaturated; // the pixel's high gain is saturated
26
27 // FIXME: arrival time t, and it's error sigma t
28
29public:
30 MCerPhotPix(Int_t pix=-1, Float_t phot=0, Float_t errphot=0);
31
32 Int_t GetPixId() const { return fPixId; }
33 Float_t GetNumPhotons() const { return fPhot; }
34 Float_t GetErrorPhot() const { return fErrPhot; }
35
36 Bool_t IsPixelUsed() const { return fRing>0; }
37 Bool_t IsPixelUnmapped() const { return fRing==-1; }
38 void SetPixelUnused() { fRing=0; }
39 void SetPixelUsed() { fRing=1; }
40 void SetPixelUnmapped() { fRing=-1;}
41 void SetIdxIsland(Short_t num) { fIdxIsland=num; }
42 Short_t GetIdxIsland() const { return fIdxIsland; }
43
44 void SetRing(UShort_t r) { fRing = r; }
45 Short_t GetRing() const { return fRing;}
46
47 void SetPixelCore(Bool_t b=kTRUE){ fIsCore = b; }
48 Bool_t IsPixelCore() const { return fIsCore; }
49
50 void SetNumPhotons(Float_t f) { MMath::ReducePrecision(f); fPhot = f; }
51 void SetErrorPhot(Float_t f) { MMath::ReducePrecision(f); fErrPhot = f; }
52 void Set(Float_t np, Float_t ep) { MMath::ReducePrecision(np); MMath::ReducePrecision(ep); fPhot = np; fErrPhot = ep; }
53
54 void SetPixelSaturated() { fIsSaturated = kTRUE; }
55 Bool_t IsPixelSaturated() const { return fIsSaturated; }
56
57 void SetPixelHGSaturated() { fIsHGSaturated = kTRUE; }
58 Bool_t IsPixelHGSaturated() const { return fIsHGSaturated; }
59
60 void AddNumPhotons(Float_t f) { fPhot += f; }
61
62 void Scale(Float_t f) { fPhot/=f; }
63
64 void Print(Option_t *opt = NULL) const;
65 Int_t Compare(const TObject *obj) const;
66 Bool_t IsSortable() const { return kTRUE; }
67
68 ClassDef(MCerPhotPix, 6) // class containing information about the Cerenkov Photons in a pixel
69};
70
71#endif
Note: See TracBrowser for help on using the repository browser.