source: trunk/Mars/msignal/MSignalPix.h@ 19713

Last change on this file since 19713 was 18243, checked in by Daniela Dorner, 9 years ago
added new parameter fTimeSlope to the output of the calibration
File size: 3.1 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 Float_t fTimeSlope; // Time between half rise time and position of maximum
22
23public:
24 MSignalPix(Float_t phot=0, Float_t errphot=0);
25 MSignalPix(const MSignalPix &pix)
26 : fIsCore(pix.fIsCore), fRing(pix.fRing), fIdxIsland(pix.fIdxIsland),
27 fPhot(pix.fPhot), fErrPhot(pix.fErrPhot), fArrivalTime(pix.fArrivalTime),
28 fTimeSlope(pix.fTimeSlope)
29 {
30 }
31
32 // TObject
33 void Clear(Option_t *o=0);
34 void Copy(TObject &obj) const
35 {
36 MSignalPix &pix = (MSignalPix&)obj;
37 pix.fIsCore = fIsCore;
38 pix.fRing = fRing;
39 pix.fIdxIsland = fIdxIsland;
40 pix.fPhot = fPhot;
41 pix.fErrPhot = fErrPhot;
42 pix.fArrivalTime = fArrivalTime;
43 pix.fTimeSlope = fTimeSlope;
44 }
45 void Print(Option_t *opt = NULL) const;
46
47 // MSignalPix
48 Float_t GetNumPhotons() const { return fPhot; }
49 Float_t GetErrorPhot() const { return fErrPhot; }
50 Float_t GetArrivalTime() const { return fArrivalTime; }
51 Float_t GetTimeSlope() const { return fTimeSlope; }
52
53 Bool_t IsPixelUsed() const { return fRing>0; }
54 Bool_t IsPixelUnmapped() const { return fRing==-1; }
55 void SetPixelUnused() { fRing=0; }
56 void SetPixelUsed() { fRing=1; }
57 void SetPixelUnmapped() { fRing=-1; }
58 void SetIdxIsland(Short_t num) { fIdxIsland=num; }
59 Short_t GetIdxIsland() const { return fIdxIsland; }
60
61 void SetRing(UShort_t r) { fRing = r; }
62 Short_t GetRing() const { return fRing;}
63
64 void SetPixelCore(Bool_t b=kTRUE) { fIsCore = b; }
65 Bool_t IsPixelCore() const { return fIsCore; }
66
67 void SetNumPhotons(Float_t f) { MMath::ReducePrecision(f); fPhot = f; }
68 void SetErrorPhot(Float_t f) { MMath::ReducePrecision(f); fErrPhot = f; }
69 void Set(Float_t np, Float_t ep) { MMath::ReducePrecision(np); MMath::ReducePrecision(ep); fPhot = np; fErrPhot = ep; }
70 void SetArrivalTime(Float_t tm) { fArrivalTime = tm; }
71 void SetTimeSlope(Float_t ts) { fTimeSlope = ts; }
72
73 //void AddNumPhotons(Float_t f) { fPhot += f; }
74 //void Scale(Float_t f) { fPhot /= f; }
75
76 ClassDef(MSignalPix, 8) // class containing information about the Cerenkov Photons in a pixel
77};
78
79#endif
Note: See TracBrowser for help on using the repository browser.