source: trunk/MagicSoft/Mars/msignal/MSignalPix.h@ 8004

Last change on this file since 8004 was 7876, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 2.6 KB
Line 
1#ifndef MARS_MSignalPix
2#define MARS_MSignalPix
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7#ifndef MARS_MMath
8#include "MMath.h"
9#endif
10
11class MSignalPix : public MParContainer
12{
13private:
14 Bool_t fIsCore; //! the pixel is a Core pixel -> kTRUE
15 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)
16 Short_t fIdxIsland; //! the pixel is a Core pixel -> kTRUE
17
18 Float_t fPhot; // The number of Cerenkov photons
19 Float_t fErrPhot; // the error of fPhot
20 Float_t fArrivalTime; // Calibrated Arrival Time
21
22public:
23 MSignalPix(Float_t phot=0, Float_t errphot=0);
24
25 void Clear(Option_t *o=0);
26 void Copy(TObject &obj) const
27 {
28 MSignalPix &pix = (MSignalPix&)obj;
29 pix.fIsCore = fIsCore;
30 pix.fRing = fRing;
31 pix.fIdxIsland = fIdxIsland;
32 pix.fPhot = fPhot;
33 pix.fErrPhot = fErrPhot;
34 }
35
36 Float_t GetNumPhotons() const { return fPhot; }
37 Float_t GetErrorPhot() const { return fErrPhot; }
38 Float_t GetArrivalTime() const { return fArrivalTime; }
39
40 Bool_t IsPixelUsed() const { return fRing>0; }
41 Bool_t IsPixelUnmapped() const { return fRing==-1; }
42 void SetPixelUnused() { fRing=0; }
43 void SetPixelUsed() { fRing=1; }
44 void SetPixelUnmapped() { fRing=-1; }
45 void SetIdxIsland(Short_t num) { fIdxIsland=num; }
46 Short_t GetIdxIsland() const { return fIdxIsland; }
47
48 void SetRing(UShort_t r) { fRing = r; }
49 Short_t GetRing() const { return fRing;}
50
51 void SetPixelCore(Bool_t b=kTRUE) { fIsCore = b; }
52 Bool_t IsPixelCore() const { return fIsCore; }
53
54 void SetNumPhotons(Float_t f) { MMath::ReducePrecision(f); fPhot = f; }
55 void SetErrorPhot(Float_t f) { MMath::ReducePrecision(f); fErrPhot = f; }
56 void Set(Float_t np, Float_t ep) { MMath::ReducePrecision(np); MMath::ReducePrecision(ep); fPhot = np; fErrPhot = ep; }
57 void SetArrivalTime(Float_t tm) { MMath::ReducePrecision(tm); fArrivalTime = tm; }
58
59 void AddNumPhotons(Float_t f) { fPhot += f; }
60 void Scale(Float_t f) { fPhot /= f; }
61
62 void Print(Option_t *opt = NULL) const;
63
64 ClassDef(MSignalPix, 7) // class containing information about the Cerenkov Photons in a pixel
65};
66
67#endif
Note: See TracBrowser for help on using the repository browser.