1 #ifndef ALIITSCHANNELDASSD_H
2 #define ALIITSCHANNELDASSD_H
4 /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 ///////////////////////////////////////////////////////////////////////////////
11 /// This class provides storage container ITS SSD channel callibration data
14 ///////////////////////////////////////////////////////////////////////////////
20 class AliITSChannelDaSSD : public TObject {
23 explicit AliITSChannelDaSSD(const UShort_t stripId);
24 AliITSChannelDaSSD(const UShort_t stripId, const Long_t eventsnumber);
25 AliITSChannelDaSSD(const AliITSChannelDaSSD& strip);
26 AliITSChannelDaSSD& operator = (const AliITSChannelDaSSD& strip);
27 virtual ~AliITSChannelDaSSD();
29 UShort_t GetStripId() const { return fStripId; }
30 Long_t GetEventsNumber() const { return fEventsNumber; }
31 Short_t* GetSignal() const { return fSignal; }
32 Short_t* GetSignal(const Long_t eventnumber) const
33 { return (eventnumber < fEventsNumber && fSignal) ? (fSignal+eventnumber) : NULL; }
35 Float_t GetPedestal() const { return fPedestal; }
36 Float_t GetNoise() const { return fNoise; }
37 Bool_t CheckNoise() const { return (fNoise < fgkUndefinedValue) ? kTRUE : kFALSE; }
39 UChar_t GetFeeOffset() const { return (fPedestal < fgkUndefinedValue) ? (static_cast<UChar_t>(TMath::Nint(fPedestal))) : 0; }
40 UChar_t GetFeeZs() const { return (fNoise < fgkUndefinedValue) ?
41 (static_cast<UChar_t>(fZsThresholdFactor * TMath::Nint(fNoise))) : 0; }
42 Bool_t SetEvenetsNumber(const Long_t eventsnumber);
43 Bool_t SetSignal(const Long_t eventnumber, const Short_t signal);
44 void SetStripId(const UShort_t stripId) { fStripId = stripId; }
46 void SetPedestal(Float_t pedestal) { fPedestal = pedestal; }
47 void SetNoise(Float_t noise) { fNoise = noise; }
48 void ClearNoise() { if (fNoise < fgkUndefinedValue) fNoise = fgkUndefinedValue; }
49 void ClearPedestal() { if (fPedestal < fgkUndefinedValue) fPedestal = fgkUndefinedValue; }
50 void ClearSignal() { if (fSignal) for (Int_t i = 0; i < fEventsNumber; i++)
51 fSignal[i] = 0x100 * fgkDefaultSignal + fgkDefaultSignal; }
52 void DeleteSignal() { if (fSignal) { delete [] fSignal; fSignal = NULL; fEventsNumber = 0;} }
54 static Short_t GetOverflowConst() { return fgkSignalOverflow; }
55 static Short_t GetUnderflowConst() { return fgkSignalUnderflow; }
56 static Float_t GetUndefinedValue() { return fgkUndefinedValue; }
59 static const UShort_t fgkMinStripId = 0; // minimum strip id
60 static const UShort_t fgkMaxStripId = 1535; // maximum strip id
62 static const Short_t fgkSignalOverflow = 2047; // ADC overflow value
63 static const Short_t fgkSignalUnderflow = 2048; // ADC underflow value
64 static const UShort_t fgkDefaultSignal = 0x7F; // initialization value for fNoise, fPedestal, fSignal[i]
65 static const Float_t fgkUndefinedValue; // constant value which indicates that fNoise, fPedestal is undefined
67 UShort_t fStripId; // channel = strip number within SSD module 0-1535
68 Long_t fEventsNumber; // number of events for fSignal memory allocation
71 Float_t fPedestal; // pedestal
72 Float_t fNoise; // noise
74 Float_t fZsThresholdFactor; // factor for zero suppression threshold
76 ClassDef(AliITSChannelDaSSD, 1)