Fixed bug in parent assignment and implemented Birk's law in the Step Manager
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSDD.h
CommitLineData
b0f5e3fc 1#ifndef ALIITSRESPONSESDD_H
2#define ALIITSRESPONSESDD_H
48058160 3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/*
8 $Id$
9*/
88cb7938 10
7551c5b2 11#include "TArrayF.h"
b0f5e3fc 12#include "AliITSresponse.h"
13
14// response for SDD
15
48058160 16class AliITSresponseSDD : public AliITSresponse {
17 public:
50d05d7b 18 //
19 // Configuration methods
20 //
b0f5e3fc 21
48058160 22 AliITSresponseSDD();
23 AliITSresponseSDD(const char *dataType);
24 virtual ~AliITSresponseSDD();
7551c5b2 25
703a4e51 26// Implementation of virtual member functions declared in AliITSresponse
27 virtual void SetElectronics(Int_t p1=1)
28 {fElectronics=p1; /* Electronics: Pascal (1) or OLA (2) */ }
29 virtual Int_t Electronics() const {// Electronics: 1 = Pascal; 2 = OLA
48058160 30 return fElectronics;}
703a4e51 31 virtual void SetMaxAdc(Float_t p1) {// Adc-count saturation value
48058160 32 fMaxAdc=p1;}
703a4e51 33 virtual Float_t MaxAdc() const {// Get maximum Adc-count value
48058160 34 return fMaxAdc;}
703a4e51 35 virtual void SetChargeLoss(Float_t p1) {
48058160 36 // Set Linear Charge Loss Steepness // 0.01 for 20%
37 fChargeLoss=p1;}
bff7ba71 38 Float_t ChargeLoss() const {// Get Charge Loss Coefficient
48058160 39 return fChargeLoss;}
703a4e51 40 virtual void SetDynamicRange(Float_t p1) {// Set Dynamic Range
41 fDynamicRange = p1;}
42 virtual Float_t DynamicRange() const {// Get Dynamic Range
48058160 43 return fDynamicRange;}
703a4e51 44 // Diffusion coefficients
45 virtual void SetDiffCoeff(Float_t p1, Float_t p2)
46 {fDiffCoeff=p1;fDiffCoeff1=p2;}
47 // Get diffusion coefficients
48 virtual void DiffCoeff(Float_t&diff,Float_t&diff1) const
49 {diff = fDiffCoeff;diff1 = fDiffCoeff1;}
50 virtual void SetDriftSpeed(Float_t p1) {// Drift velocity
48058160 51 fDriftSpeed=p1;}
703a4e51 52 virtual Float_t DriftSpeed() const {// drift speed
48058160 53 return fDriftSpeed;}
703a4e51 54 virtual void SetParamOptions(const char *opt1,const char *opt2){
48058160 55 // Parameters: "same" or read from "file"
56 fParam1=opt1; fParam2=opt2;}
703a4e51 57 virtual void ParamOptions(char *opt1,char *opt2) const {// options
48058160 58 strcpy(opt1,fParam1.Data()); strcpy(opt2,fParam2.Data());}
703a4e51 59 virtual void SetNoiseParam(Float_t n, Float_t b){
48058160 60 // Noise and baseline // 10 for ALICE with beam test measurements 2001
61 fNoise=n; fBaseline=b;}
703a4e51 62 virtual void GetNoiseParam(Float_t &n, Float_t &b) const {// get noise param
63 n=fNoise; b=fBaseline;}
64 virtual Bool_t Do10to8() const {// get 10 to 8 compression option
65 return fBitComp;}
66 void SetZeroSupp (const char *opt) {
67 // Zero-suppression option - could be 1D, 2D or non-ZS
68 fOption=opt;}
69 const char *ZeroSuppOption() const {// Get zero-suppression option
70 return fOption.Data();}
71 virtual void SetThresholds(Float_t mv, Float_t /* b */){
72 // Min value used in 2D - could be used as a threshold setting
73 fMinVal = mv;}
74 virtual void Thresholds(Float_t & mv, Float_t & /* b */) const
75 {mv = fMinVal;}
76 virtual void GiveCompressParam(Int_t *x) const;
77 // Detector type response methods
78 virtual void SetNSigmaIntegration(Float_t p1) {
79 // Set number of sigmas over which cluster disintegration is performed
80 fNsigmas=p1;}
81 virtual Float_t NSigmaIntegration() const {
82 // Get number of sigmas over which cluster disintegration is performed
83 return fNsigmas;}
84 virtual void SetNLookUp(Int_t p1);
85 // Get number of intervals in which the gaussian lookup table is divided
86 virtual Int_t GausNLookUp() const {return fNcomps;}
87 virtual Float_t GausLookUp(Int_t i) const {
88 if(i<0 || i>=fNcomps) return 0.;return fGaus->At(i);}
89
90//Declaration of member functions peculiar to this class
7f1a504b 91 Int_t Convert8to10(Int_t signal) const; //undo 10 to 8 bit SDD compresion
48058160 92 void SetNoiseAfterElectronics(Float_t n=2.38){
93 // Noise after electronics (ADC units)
94 // 2.36 for ALICE from beam test measurements 2001
95 fNoiseAfterEl=n;}
703a4e51 96 Float_t GetNoiseAfterElectronics() const {
48058160 97 // Noise after electronics (ADC units)
98 return fNoiseAfterEl;}
99 void SetJitterError(Float_t jitter=20) {
100 // set Jitter error (20 um for ALICE from beam test measurements 2001)
101 fJitterError=jitter;}
703a4e51 102 Float_t JitterError() const {// set Jitter error
48058160 103 return fJitterError;}
104 void SetDo10to8(Bool_t bitcomp=kTRUE) {
105 // set the option for 10 to 8 bit compression
106 fBitComp = bitcomp;}
48058160 107 // Compression parameters
108 void SetCompressParam(Int_t cp[8]);
48058160 109 void SetDeadChannels(Int_t nmodules=0, Int_t nchips=0, Int_t nchannels=0);
703a4e51 110 Int_t GetDeadModules() const { return fDeadModules; }
111 Int_t GetDeadChips() const { return fDeadChips; }
112 Int_t GetDeadChannels() const { return fDeadChannels; }
113 Float_t Gain(Int_t mod,Int_t chip,Int_t ch)const {return fGain[mod][chip][ch]; }
48058160 114 // these functions should be move to AliITSsegmentationSDD
703a4e51 115 const Int_t Modules() const{return fgkModules;}// Total number of SDD modules
116 const Int_t Chips() const{return fgkChips;} // Number of chips/module
117 const Int_t Channels() const { return fgkChannels;}// Number of channels/chip
48058160 118 //********
119 void PrintGains();
120 void Print();
03898a57 121
703a4e51 122 // not implemented virtual methods (devlared in the mother class
123 virtual void SetDetParam(Float_t *)
124 {NotImplemented("SetDetParam");}
125 virtual void GetDetParam(Float_t *) const
126 {NotImplemented("GetDetParam");}
127 virtual void SetNDetParam(Int_t /* n */)
128 {NotImplemented("SetNDetParam");}
129 virtual Int_t NDetParam() const
130 {NotImplemented("NDetParam"); return 0;}
131 virtual void SetSigmaSpread(Float_t, Float_t)
132 {NotImplemented("SetSigmaSpread");}
133 virtual void SigmaSpread(Float_t & /* p1 */,Float_t & /* p2 */) const
134 {NotImplemented("SigmaSpread");}
2aea926d 135
48058160 136 protected:
137 // these statis const should be move to AliITSsegmentationSDD
703a4e51 138 static const Int_t fgkModules = 520; // Total number of SDD modules
139 static const Int_t fgkChips = 4; // Number of chips/module
140 static const Int_t fgkChannels = 64; // Number of channels/chip
48058160 141 //*******
703a4e51 142 static const Int_t fgkMaxAdcDefault; // default for fMaxAdc
143 static const Float_t fgkDynamicRangeDefault; // default for fDynamicRange
144 static const Float_t fgkfChargeLossDefault; // default for fChargeLoss
145 static const Float_t fgkDiffCoeffDefault; // default for fDiffCoeff
146 static const Float_t fgkDiffCoeff1Default; // default for fDiffCoeff1
147 static const Float_t fgkTemperatureDefault; // default for fT (Kelvin)
148 static const TString fgkParam1Default; // default for fParam1
149 static const TString fgkParam2Default; // default for fParam2
150 static const Float_t fgkNoiseDefault; // default for fNoise
151 static const Float_t fgkBaselineDefault; // default for fBaseline
152 static const TString fgkOptionDefault; // default for fOption
153 static const Float_t fgkMinValDefault; // default for fMinVal
154 static const Float_t fgkDriftSpeedDefault; // default for fDriftSpeed
155 static const Float_t fgkNsigmasDefault; //default for fNsigmas
156 static const Int_t fgkNcompsDefault; //default for fNcomps
157 //
158
48058160 159 Int_t fDeadModules; // Total number of dead SDD modules
160 Int_t fDeadChips; // Number of dead chips
161 Int_t fDeadChannels; // Number of dead channels
703a4e51 162 Float_t fGain[fgkModules][fgkChips][fgkChannels]; // Array for channel gains
48058160 163 Int_t fCPar[8]; // Hardware compression parameters
164 Float_t fNoise; // Noise
165 Float_t fBaseline; // Baseline
166 Float_t fNoiseAfterEl; // Noise after electronics
167 Float_t fJitterError; // jitter error
168 Float_t fDynamicRange; // Set Dynamic Range
169 Float_t fChargeLoss; // Set Linear Coefficient for Charge Loss
48058160 170 Float_t fDriftSpeed; // Drift velocity
171 Int_t fElectronics; // Electronics
703a4e51 172 Float_t fMaxAdc; // Adc saturation value
173 Float_t fDiffCoeff; // Diffusion Coefficient (scaling the time)
174 Float_t fDiffCoeff1; // Diffusion Coefficient (constant term)
175 Float_t fNsigmas; // Number of sigmas over which charge disintegration
48058160 176 // is performed
177 TArrayF *fGaus; // Gaussian lookup table for signal generation
178 Int_t fNcomps; // Number of samplings along the gaussian
703a4e51 179 Float_t fMinVal; // Min value used in 2D zero-suppression algo
48058160 180 Bool_t fBitComp; // 10 to 8 bit compression option
181 TString fOption; // Zero-suppresion option (1D, 2D or none)
182 TString fParam1; // Read baselines from file option
183 TString fParam2; // Read compression algo thresholds from file
703a4e51 184
185 private:
186 AliITSresponseSDD(const AliITSresponseSDD &ob); // copy constructor
187 AliITSresponseSDD& operator=(const AliITSresponseSDD & /* source */); // ass. op.
188
fa1750f9 189
800f9ca4 190 ClassDef(AliITSresponseSDD,3) // SDD response
50d05d7b 191
192 };
b0f5e3fc 193#endif