1 #ifndef ALIITSRESPONSESDD_H
2 #define ALIITSRESPONSESDD_H
7 #include "AliITSresponse.h"
11 class AliITSresponseSDD :
12 public AliITSresponse {
15 // Configuration methods
19 virtual ~AliITSresponseSDD();
21 void SetElectronics(Int_t p1=1) {
22 // Electronics: Pascal or OLA
27 // Electronics: 1 = Pascal; 2 = OLA
31 void SetMaxAdc(Float_t p1=1024.) {
32 // Adc-count saturation value
36 // Get maximum Adc-count value
40 void SetChargeLoss(Float_t p1=0.01) {
41 // Set Linear Charge Loss Steepness
44 Float_t ChargeLoss() {
45 // Get Charge Loss Coefficient
49 void SetDynamicRange(Float_t p1=132.) {
53 Float_t DynamicRange() {
58 void SetDiffCoeff(Float_t p1=3.23,Float_t p2=30.) {
59 // Diffusion coefficients
63 void DiffCoeff(Float_t&diff,Float_t&diff1) {
64 // Get diffusion coefficients
69 void SetDriftSpeed(Float_t p1=7.3) {
73 Float_t DriftSpeed() {
78 void SetTemperature(Float_t p1=23.) {
82 Float_t Temperature() {
87 void SetDataType(const char *data="simulated") {
88 // Type of data - real or simulated
91 const char *DataType() const {
93 return fDataType.Data();
96 void SetParamOptions(const char *opt1="same",const char *opt2="same"){
97 // Parameters: "same" or read from "file"
98 fParam1=opt1; fParam2=opt2;
100 void ParamOptions(char *opt1,char *opt2) {
102 strcpy(opt1,fParam1.Data()); strcpy(opt2,fParam2.Data());
105 void SetNoiseParam(Float_t n=8.3, Float_t b=20.){
106 // Noise and baseline
107 fNoise=n; fBaseline=b;
109 void SetNoiseAfterElectronics(Float_t n=1.6){
110 // Noise after electronics (ADC units)
113 void GetNoiseParam(Float_t &n, Float_t &b) {
115 n=fNoise; b=fBaseline;
117 Float_t GetNoiseAfterElectronics(){
118 // Noise after electronics (ADC units)
119 return fNoiseAfterEl;
122 void SetDo10to8(Bool_t bitcomp=kTRUE) {
123 // set the option for 10 to 8 bit compression
128 // get 10 to 8 compression option
132 void SetZeroSupp (const char *opt="1D") {
133 // Zero-suppression option - could be 1D, 2D or non-ZS
136 const char *ZeroSuppOption() const {
137 // Get zero-suppression option
138 return fOption.Data();
140 void SetMinVal(Int_t mv=4) {
141 // Min value used in 2D - could be used as a threshold setting
149 void SetFilenames(const char *f1="",const char *f2="",const char *f3="") {
150 // Set filenames - input, output, parameters ....
151 fFileName1=f1; fFileName2=f2; fFileName3=f3;
153 void Filenames(char *input,char *baseline,char *param) {
155 strcpy(input,fFileName1.Data()); strcpy(baseline,fFileName2.Data());
156 strcpy(param,fFileName3.Data());
160 void SetOutputOption(Bool_t write=kFALSE) {
164 Bool_t OutputOption() {
169 // Compression parameters
170 void SetCompressParam(Int_t cp[8]);
171 void GiveCompressParam(Int_t *x);
174 // Detector type response methods
175 void SetNSigmaIntegration(Float_t p1=3.) {
176 // Set number of sigmas over which cluster disintegration is performed
179 Float_t NSigmaIntegration() {
180 // Get number of sigmas over which cluster disintegration is performed
183 void SetNLookUp(Int_t p1=121) {
184 // Set number of sigmas over which cluster disintegration is performed
186 fGaus = new TArrayF(fNcomps+1);
187 for(Int_t i=0; i<=fNcomps; i++) {
188 Float_t x = -fNsigmas + (2.*i*fNsigmas)/(fNcomps-1);
189 (*fGaus)[i] = exp(-((x*x)/2));
190 // cout << "fGaus[" << i << "]: " << fGaus->At(i) << endl;
193 // Get number of intervals in which the gaussian lookup table is divided
194 Int_t GausNLookUp() {return fNcomps;}
196 Float_t IntPH(Float_t eloss) {
197 // Pulse height from scored quantity (eloss)
200 Float_t IntXZ(AliITSsegmentation *) {
201 // Charge disintegration
204 Float_t GausLookUp(Int_t i) {
205 if(i<0 || i>=fNcomps) return 0.;
213 AliITSresponseSDD(const AliITSresponseSDD &source); // copy constructor
214 AliITSresponseSDD& operator=(const AliITSresponseSDD &source); // ass. op.
218 Int_t fCPar[8]; // Hardware compression parameters
219 Float_t fNoise; // Noise
220 Float_t fBaseline; // Baseline
221 Float_t fNoiseAfterEl; // Noise after electronics
222 Float_t fDynamicRange; // Set Dynamic Range
223 Float_t fChargeLoss; // Set Linear Coefficient for Charge Loss
224 Float_t fTemperature; // Temperature
225 Float_t fDriftSpeed; // Drift velocity
226 Int_t fElectronics; // Electronics
228 Float_t fMaxAdc; // Adc saturation value
229 Float_t fDiffCoeff; // Diffusion Coefficient (scaling the time)
230 Float_t fDiffCoeff1; // Diffusion Coefficient (constant term)
231 Float_t fNsigmas; // Number of sigmas over which charge disintegration
233 TArrayF *fGaus; // Gaussian lookup table for signal generation
234 Int_t fNcomps; // Number of samplings along the gaussian
236 Int_t fMinVal; // Min value used in 2D zero-suppression algo
238 Bool_t fWrite; // Write option for the compression algorithms
239 Bool_t fBitComp; // 10 to 8 bit compression option
241 TString fOption; // Zero-suppresion option (1D, 2D or none)
242 TString fParam1; // Read baselines from file option
243 TString fParam2; // Read compression algo thresholds from file
245 TString fDataType; // data type - real or simulated
246 TString fFileName1; // input keys : run, module #
247 TString fFileName2; // baseline & noise val or output coded // signal or monitored bgr.
248 TString fFileName3; // param values or output coded signal
250 ClassDef(AliITSresponseSDD,2) // SDD response