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

Last change on this file since 8869 was 8528, checked in by tbretz, 17 years ago
*** empty log message ***
File size: 2.8 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 MSignalPix(const MSignalPix &pix)
25 : fIsCore(pix.fIsCore), fRing(pix.fRing), fIdxIsland(pix.fIdxIsland),
26 fPhot(pix.fPhot), fErrPhot(pix.fErrPhot), fArrivalTime(pix.fArrivalTime)
27 {
28 }
29
30 // TObject
31 void Clear(Option_t *o=0);
32 void Copy(TObject &obj) const
33 {
34 MSignalPix &pix = (MSignalPix&)obj;
35 pix.fIsCore = fIsCore;
36 pix.fRing = fRing;
37 pix.fIdxIsland = fIdxIsland;
38 pix.fPhot = fPhot;
39 pix.fErrPhot = fErrPhot;
40 pix.fArrivalTime = fArrivalTime;
41 }
42 void Print(Option_t *opt = NULL) const;
43
44 // MSignalPix
45 Float_t GetNumPhotons() const { return fPhot; }
46 Float_t GetErrorPhot() const { return fErrPhot; }
47 Float_t GetArrivalTime() const { return fArrivalTime; }
48
49 Bool_t IsPixelUsed() const { return fRing>0; }
50 Bool_t IsPixelUnmapped() const { return fRing==-1; }
51 void SetPixelUnused() { fRing=0; }
52 void SetPixelUsed() { fRing=1; }
53 void SetPixelUnmapped() { fRing=-1; }
54 void SetIdxIsland(Short_t num) { fIdxIsland=num; }
55 Short_t GetIdxIsland() const { return fIdxIsland; }
56
57 void SetRing(UShort_t r) { fRing = r; }
58 Short_t GetRing() const { return fRing;}
59
60 void SetPixelCore(Bool_t b=kTRUE) { fIsCore = b; }
61 Bool_t IsPixelCore() const { return fIsCore; }
62
63 void SetNumPhotons(Float_t f) { MMath::ReducePrecision(f); fPhot = f; }
64 void SetErrorPhot(Float_t f) { MMath::ReducePrecision(f); fErrPhot = f; }
65 void Set(Float_t np, Float_t ep) { MMath::ReducePrecision(np); MMath::ReducePrecision(ep); fPhot = np; fErrPhot = ep; }
66 void SetArrivalTime(Float_t tm) { fArrivalTime = tm; }
67
68 //void AddNumPhotons(Float_t f) { fPhot += f; }
69 //void Scale(Float_t f) { fPhot /= f; }
70
71 ClassDef(MSignalPix, 7) // class containing information about the Cerenkov Photons in a pixel
72};
73
74#endif
Note: See TracBrowser for help on using the repository browser.