remove props
[u/mrichter/AliRoot.git] / ITS / AliITSChannelDaSSD.h
CommitLineData
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 "TMath.h"
17#include "TObject.h"
18
223dda26 19
f67db810 20class AliITSChannelDaSSD : public TObject {
21 public :
22 AliITSChannelDaSSD();
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();
28
29 UShort_t GetStripId() const { return fStripId; }
30 Long_t GetEventsNumber() const { return fEventsNumber; }
31 Short_t* GetSignal() const { return fSignal; }
61a57d07 32 Short_t GetSignal(const Long_t eventnumber) const
33 { return (eventnumber < fEventsNumber && fSignal) ? *(fSignal+eventnumber) : fgkDefaultSignal; }
f67db810 34
35 Float_t GetPedestal() const { return fPedestal; }
c4d90345 36 Float_t GetNoise() const { return fNoise; }
37 Float_t GetNoiseCM() const { return fNoiseCM; }
38 Long_t GetOverflowNumber() const { return fNOverflowEv; }
39 Bool_t CheckNoise() const { return (fNoise < fgkUndefinedValue) ? kTRUE : kFALSE; }
40 Bool_t CheckNoiseCM() const { return (fNoiseCM < fgkUndefinedValue) ? kTRUE : kFALSE; }
f67db810 41
f67db810 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; }
45
46 void SetPedestal(Float_t pedestal) { fPedestal = pedestal; }
c4d90345 47 void SetNoise(Float_t noise) { fNoise = noise; }
48 void SetNoiseCM(Float_t noise) { fNoiseCM = noise; }
49 void SetOverflowNumber(Long_t ovn) {fNOverflowEv = ovn; }
f67db810 50 void ClearNoise() { if (fNoise < fgkUndefinedValue) fNoise = fgkUndefinedValue; }
c4d90345 51 void ClearNoiseCM() { if (fNoiseCM < fgkUndefinedValue) fNoiseCM = fgkUndefinedValue; }
f67db810 52 void ClearPedestal() { if (fPedestal < fgkUndefinedValue) fPedestal = fgkUndefinedValue; }
53 void ClearSignal() { if (fSignal) for (Int_t i = 0; i < fEventsNumber; i++)
54 fSignal[i] = 0x100 * fgkDefaultSignal + fgkDefaultSignal; }
55 void DeleteSignal() { if (fSignal) { delete [] fSignal; fSignal = NULL; fEventsNumber = 0;} }
56
57 static Short_t GetOverflowConst() { return fgkSignalOverflow; }
58 static Short_t GetUnderflowConst() { return fgkSignalUnderflow; }
59 static Float_t GetUndefinedValue() { return fgkUndefinedValue; }
c4d90345 60 static Short_t GetMaxStripIdConst(){ return fgkMaxStripId; }
f67db810 61
62 protected :
c4d90345 63 static const Short_t fgkMinStripId; // minimum strip id
64 static const Short_t fgkMaxStripId; // maximum strip id
f67db810 65
c4d90345 66 static const Short_t fgkSignalOverflow; // ADC overflow value
67 static const Short_t fgkSignalUnderflow; // ADC underflow value
68 static const UShort_t fgkDefaultSignal; // initialization value for fNoise, fPedestal, fSignal[i]
69 static const Float_t fgkUndefinedValue; // constant value which indicates that fNoise, fPedestal is undefined
223dda26 70
f67db810 71 UShort_t fStripId; // channel = strip number within SSD module 0-1535
72 Long_t fEventsNumber; // number of events for fSignal memory allocation
c4d90345 73 Short_t *fSignal; //! array of signal data
f67db810 74
223dda26 75 Float_t fPedestal; // pedestal
76 Float_t fNoise; // noise
c4d90345 77 Float_t fNoiseCM; // noise with CM correction
78 Long_t fNOverflowEv; // Number of events which exceed the pedestal calculation threshold
79
61a57d07 80 ClassDef(AliITSChannelDaSSD, 3)
f67db810 81};
82
83#endif