Calibration framework improved (E. Crescio)
[u/mrichter/AliRoot.git] / ITS / AliITSCalibrationSPD.h
CommitLineData
fcf95fc7 1#ifndef ALIITSCALIBRATIONSPD_H
2#define ALIITSCALIBRATIONSPD_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6
7#include "TRandom.h"
8#include "AliITSCalibration.h"
9#include "TArrayI.h"
10#include "AliITSresponseSPD.h"
11
12
13////////////////////////////////////////////////////
14// //
15// ITS response class for SPD //
16////////////////////////////////////////////////////
17class AliITSCalibrationSPD : public AliITSCalibration {
18 public:
19 AliITSCalibrationSPD(); // default constructor
20 virtual ~AliITSCalibrationSPD() {;} // destructror
21
22 // Set Threshold and noise + threshold fluctuations parameter values
23 virtual void SetThresholds(Double_t thresh, Double_t sigma)
24 {fThresh=thresh; fSigma=sigma;}
25 // Get Threshold and noise + threshold fluctuations parameter values
26 virtual void Thresholds(Double_t &thresh, Double_t &sigma) const
27 {thresh=fThresh; sigma=fSigma;}
28 //Returns just baseline value
29 Double_t GetBaseline() const {return fBaseline;}
30 // Set noise and baseline in one (abstract method of AliITSCalibration)
31 virtual void SetNoiseParam(Double_t n,Double_t b)
32 {fNoise = n;fBaseline = b;}
33 // Get noise and baseline in one (abstract method of AliITSCalibration)
34 virtual void GetNoiseParam(Double_t &n,Double_t &b) const
35 {n =fNoise;b = fBaseline;}
36 // Returns just noise value
37 Double_t GetNoise() const {return fNoise;}
38 //Declaration of member functions peculiar to this class
39 // Applies a random noise and addes the baseline
40 Double_t ApplyBaselineAndNoise() const {return fBaseline+
41 fNoise*gRandom->Gaus();}
42
43 //Declaration of member functions peculiar to this class
44 // Sets the fraction of Dead SPD Pixels
45 void SetFractionDead(Double_t d=0.01){ fDeadPixels = d;}
46 // Retruns the fraction of Dead SPD Pixels
47 Double_t GetFractionDead() const {return fDeadPixels;}
48 // Returns a logical if a pixels is dead or not
49 Bool_t IsPixelDead(Int_t mod,Int_t ix,Int_t iz) const ;
50
51 virtual void GiveCompressParam(Int_t *) const
52 {NotImplemented("GiveCompressParam");}
53 virtual void SetDetParam(Double_t *)
54 {NotImplemented("SetDetParam");}
55 virtual void GetDetParam(Double_t *) const
56 {NotImplemented("GetDetParam");}
57 virtual void SetNDetParam(Int_t /* n */)
58 {NotImplemented("SetNDetParam");}
59 virtual Int_t NDetParam() const
60 {NotImplemented("NDetParam"); return 0;}
61 virtual void SetSigmaSpread(Double_t, Double_t)
62 {NotImplemented("SetSigmaSpread");}
63 virtual void SigmaSpread(Double_t & /* p1 */,Double_t & /* p2 */) const
64 {NotImplemented("SigmaSpread");}
65
66 void SetNBadChannels(Int_t n) {fBadChannels.Set(n);}
67 void AddBadChannel(Int_t bad,Int_t i) {fBadChannels.AddAt(bad,i);}
68 TArrayI GetBadChannels() const {return fBadChannels;}
69 virtual void SetCouplingParam(Double_t col, Double_t row) {((AliITSresponseSPD*)fResponse)->SetCouplingParam(col,row);}
70 virtual void GetCouplingParam(Double_t &col, Double_t &row) const {((AliITSresponseSPD*)fResponse)->GetCouplingParam(col, row);}
71 virtual void SetParamOptions(const char* a,const char* b) {((AliITSresponseSPD*)fResponse)->SetParamOptions(a,b);}
72 virtual void GetParamOptions(char *a,char* b) const {((AliITSresponseSPD*)fResponse)->ParamOptions(a,b);}
73
74 protected:
75 // static const Double_t fgkDiffCoeffDefault; //default for fDiffCoeff
76 static const Double_t fgkThreshDefault; //default for fThresh
77 static const Double_t fgkSigmaDefault; //default for fSigma
78 Double_t fBaseline; // Base-line value
79 Double_t fNoise; // Gaussian noise scale
80 Double_t fThresh; // Threshold value
81 Double_t fSigma; // Noise + threshold fluctuations value
82 Double_t fDeadPixels; // the fraction of dead pixels
83 TArrayI fBadChannels; // Array with bad channels info (N, row0,col0,row1,col1...rowN,colN)
84
85 ClassDef(AliITSCalibrationSPD,2) // SPD response
86};
87
88#endif