]>
Commit | Line | Data |
---|---|---|
f67db810 | 1 | #ifndef ALIITSCHANNELDASSD_H |
2 | #define ALIITSCHANNELDASSD_H | |
3 | ||
223dda26 | 4 | /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. * |
5 | * See cxx source for full Copyright notice */ | |
6 | /* */ | |
7 | /* $Id$ */ | |
8 | ||
9 | /////////////////////////////////////////////////////////////////////////////// | |
10 | /// | |
11 | /// This class provides storage container ITS SSD channel callibration data | |
12 | /// used by DA. | |
13 | /// | |
14 | /////////////////////////////////////////////////////////////////////////////// | |
f67db810 | 15 | |
f67db810 | 16 | #include "TObject.h" |
17 | ||
223dda26 | 18 | |
f67db810 | 19 | class AliITSChannelDaSSD : public TObject { |
20 | public : | |
21 | AliITSChannelDaSSD(); | |
22 | explicit AliITSChannelDaSSD(const UShort_t stripId); | |
23 | AliITSChannelDaSSD(const UShort_t stripId, const Long_t eventsnumber); | |
24 | AliITSChannelDaSSD(const AliITSChannelDaSSD& strip); | |
25 | AliITSChannelDaSSD& operator = (const AliITSChannelDaSSD& strip); | |
26 | virtual ~AliITSChannelDaSSD(); | |
27 | ||
28 | UShort_t GetStripId() const { return fStripId; } | |
29 | Long_t GetEventsNumber() const { return fEventsNumber; } | |
30 | Short_t* GetSignal() const { return fSignal; } | |
61a57d07 | 31 | Short_t GetSignal(const Long_t eventnumber) const |
32 | { return (eventnumber < fEventsNumber && fSignal) ? *(fSignal+eventnumber) : fgkDefaultSignal; } | |
f67db810 | 33 | |
34 | Float_t GetPedestal() const { return fPedestal; } | |
c4d90345 | 35 | Float_t GetNoise() const { return fNoise; } |
36 | Float_t GetNoiseCM() const { return fNoiseCM; } | |
37 | Long_t GetOverflowNumber() const { return fNOverflowEv; } | |
38 | Bool_t CheckNoise() const { return (fNoise < fgkUndefinedValue) ? kTRUE : kFALSE; } | |
39 | Bool_t CheckNoiseCM() const { return (fNoiseCM < fgkUndefinedValue) ? kTRUE : kFALSE; } | |
f67db810 | 40 | |
f67db810 | 41 | Bool_t SetEvenetsNumber(const Long_t eventsnumber); |
42 | Bool_t SetSignal(const Long_t eventnumber, const Short_t signal); | |
43 | void SetStripId(const UShort_t stripId) { fStripId = stripId; } | |
44 | ||
45 | void SetPedestal(Float_t pedestal) { fPedestal = pedestal; } | |
c4d90345 | 46 | void SetNoise(Float_t noise) { fNoise = noise; } |
47 | void SetNoiseCM(Float_t noise) { fNoiseCM = noise; } | |
48 | void SetOverflowNumber(Long_t ovn) {fNOverflowEv = ovn; } | |
f67db810 | 49 | void ClearNoise() { if (fNoise < fgkUndefinedValue) fNoise = fgkUndefinedValue; } |
c4d90345 | 50 | void ClearNoiseCM() { if (fNoiseCM < fgkUndefinedValue) fNoiseCM = fgkUndefinedValue; } |
f67db810 | 51 | void ClearPedestal() { if (fPedestal < fgkUndefinedValue) fPedestal = fgkUndefinedValue; } |
52 | void ClearSignal() { if (fSignal) for (Int_t i = 0; i < fEventsNumber; i++) | |
53 | fSignal[i] = 0x100 * fgkDefaultSignal + fgkDefaultSignal; } | |
54 | void DeleteSignal() { if (fSignal) { delete [] fSignal; fSignal = NULL; fEventsNumber = 0;} } | |
55 | ||
56 | static Short_t GetOverflowConst() { return fgkSignalOverflow; } | |
57 | static Short_t GetUnderflowConst() { return fgkSignalUnderflow; } | |
58 | static Float_t GetUndefinedValue() { return fgkUndefinedValue; } | |
c4d90345 | 59 | static Short_t GetMaxStripIdConst(){ return fgkMaxStripId; } |
f67db810 | 60 | |
61 | protected : | |
c4d90345 | 62 | static const Short_t fgkMinStripId; // minimum strip id |
63 | static const Short_t fgkMaxStripId; // maximum strip id | |
f67db810 | 64 | |
c4d90345 | 65 | static const Short_t fgkSignalOverflow; // ADC overflow value |
66 | static const Short_t fgkSignalUnderflow; // ADC underflow value | |
67 | static const UShort_t fgkDefaultSignal; // initialization value for fNoise, fPedestal, fSignal[i] | |
68 | static const Float_t fgkUndefinedValue; // constant value which indicates that fNoise, fPedestal is undefined | |
223dda26 | 69 | |
f67db810 | 70 | UShort_t fStripId; // channel = strip number within SSD module 0-1535 |
71 | Long_t fEventsNumber; // number of events for fSignal memory allocation | |
c4d90345 | 72 | Short_t *fSignal; //! array of signal data |
f67db810 | 73 | |
223dda26 | 74 | Float_t fPedestal; // pedestal |
75 | Float_t fNoise; // noise | |
c4d90345 | 76 | Float_t fNoiseCM; // noise with CM correction |
77 | Long_t fNOverflowEv; // Number of events which exceed the pedestal calculation threshold | |
78 | ||
61a57d07 | 79 | ClassDef(AliITSChannelDaSSD, 3) |
f67db810 | 80 | }; |
81 | ||
82 | #endif |