]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSresponseSDD.h
New methods and data member added by M. Horner.
[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*/
7551c5b2 10#include "TArrayF.h"
11#include <TString.h>
4ae5bbc4 12#include <Riostream.h>
b0f5e3fc 13#include "AliITSresponse.h"
14
15// response for SDD
16
48058160 17class AliITSresponseSDD : public AliITSresponse {
18 public:
50d05d7b 19 //
20 // Configuration methods
21 //
b0f5e3fc 22
48058160 23 AliITSresponseSDD();
24 AliITSresponseSDD(const char *dataType);
25 virtual ~AliITSresponseSDD();
7551c5b2 26
48058160 27 void SetElectronics(Int_t p1=1) {// Electronics: Pascal (1) or OLA (2)
28 fElectronics=p1;}
29 Int_t Electronics() {// Electronics: 1 = Pascal; 2 = OLA
30 return fElectronics;}
31 void SetMaxAdc(Float_t p1=1024.) {// Adc-count saturation value
32 fMaxAdc=p1;}
33 Float_t MaxAdc() {// Get maximum Adc-count value
34 return fMaxAdc;}
35 void SetChargeLoss(Float_t p1=0.0) {
36 // Set Linear Charge Loss Steepness // 0.01 for 20%
37 fChargeLoss=p1;}
38 Float_t ChargeLoss(){// Get Charge Loss Coefficient
39 return fChargeLoss;}
40 void SetDynamicRange(Float_t p1=132.) {// Set Dynamic Range
41 fDynamicRange=p1;}
42 Float_t DynamicRange(){// Get Dynamic Range
43 return fDynamicRange;}
44 void SetDiffCoeff(Float_t p1=3.23,Float_t p2=30.) {
45 // Diffusion coefficients
46 fDiffCoeff=p1;fDiffCoeff1=p2;}
47 void DiffCoeff(Float_t&diff,Float_t&diff1) {// Get diffusion coefficients
48 diff = fDiffCoeff;diff1 = fDiffCoeff1;}
49 void SetDriftSpeed(Float_t p1=7.3) {// Drift velocity
50 fDriftSpeed=p1;}
51 Float_t DriftSpeed() {// drift speed
52 return fDriftSpeed;}
53 void SetTemperature(Float_t p1=23.) {// Temperature
54 fTemperature=p1;}
55 Float_t Temperature() {// Get temperature
56 return fTemperature;}
57 void SetDataType(const char *data="simulated") {
58 // Type of data - real or simulated
59 fDataType=data;}
60 const char *DataType() const {// Get data type
61 return fDataType.Data();}
62 void SetParamOptions(const char *opt1="same",const char *opt2="same"){
63 // Parameters: "same" or read from "file"
64 fParam1=opt1; fParam2=opt2;}
65 void ParamOptions(char *opt1,char *opt2) {// options
66 strcpy(opt1,fParam1.Data()); strcpy(opt2,fParam2.Data());}
67 void SetNoiseParam(Float_t n=10., Float_t b=20.){
68 // Noise and baseline // 10 for ALICE with beam test measurements 2001
69 fNoise=n; fBaseline=b;}
70 void SetNoiseAfterElectronics(Float_t n=2.38){
71 // Noise after electronics (ADC units)
72 // 2.36 for ALICE from beam test measurements 2001
73 fNoiseAfterEl=n;}
74 void GetNoiseParam(Float_t &n, Float_t &b) {// get noise param
75 n=fNoise; b=fBaseline;}
76 Float_t GetNoiseAfterElectronics(){
77 // Noise after electronics (ADC units)
78 return fNoiseAfterEl;}
79 void SetJitterError(Float_t jitter=20) {
80 // set Jitter error (20 um for ALICE from beam test measurements 2001)
81 fJitterError=jitter;}
82 Float_t JitterError() {// set Jitter error
83 return fJitterError;}
84 void SetDo10to8(Bool_t bitcomp=kTRUE) {
85 // set the option for 10 to 8 bit compression
86 fBitComp = bitcomp;}
87 Bool_t Do10to8() {// get 10 to 8 compression option
88 return fBitComp;}
89 void SetZeroSupp (const char *opt="1D") {
90 // Zero-suppression option - could be 1D, 2D or non-ZS
91 fOption=opt;}
92 const char *ZeroSuppOption() const {// Get zero-suppression option
93 return fOption.Data();}
94 void SetMinVal(Int_t mv=4) {
95 // Min value used in 2D - could be used as a threshold setting
96 fMinVal = mv;}
97 Int_t MinVal() {// min val
98 return fMinVal;}
99 void SetFilenames(const char *f1="",const char *f2="",const char *f3=""){
100 // Set filenames - input, output, parameters ....
101 fFileName1=f1; fFileName2=f2; fFileName3=f3;}
102 void Filenames(char *input,char *baseline,char *param) {// Filenames
103 strcpy(input,fFileName1.Data()); strcpy(baseline,fFileName2.Data());
104 strcpy(param,fFileName3.Data());}
105 void SetOutputOption(Bool_t write=kFALSE) {// set output option
106 fWrite = write;}
107 Bool_t OutputOption() {// output option
108 return fWrite;}
109 //
110 // Compression parameters
111 void SetCompressParam(Int_t cp[8]);
112 void GiveCompressParam(Int_t *x);
113 //
114 // Detector type response methods
115 void SetNSigmaIntegration(Float_t p1=3.) {
116 // Set number of sigmas over which cluster disintegration is performed
117 fNsigmas=p1;}
118 Float_t NSigmaIntegration() {
119 // Get number of sigmas over which cluster disintegration is performed
120 return fNsigmas;}
121 void SetNLookUp(Int_t p1=121) {
122 // Set number of sigmas over which cluster disintegration is performed
123 fNcomps=p1;
124 fGaus = new TArrayF(fNcomps+1);
125 for(Int_t i=0; i<=fNcomps; i++) {
126 Float_t x = -fNsigmas + (2.*i*fNsigmas)/(fNcomps-1);
127 (*fGaus)[i] = exp(-((x*x)/2));
128 // cout << "fGaus[" << i << "]: " << fGaus->At(i) << endl;
129 }
7551c5b2 130 }
7551c5b2 131 // Get number of intervals in which the gaussian lookup table is divided
48058160 132 Int_t GausNLookUp() {return fNcomps;}
133 Float_t IntPH(Float_t eloss) {// Pulse height from scored quantity (eloss)
134 return 0.;}
135 Float_t IntXZ(AliITSsegmentation *) {// Charge disintegration
136 return 0.;}
137 Float_t GausLookUp(Int_t i) {
138 if(i<0 || i>=fNcomps) return 0.;return fGaus->At(i);}
139 void SetDeadChannels(Int_t nmodules=0, Int_t nchips=0, Int_t nchannels=0);
140 Int_t GetDeadModules() { return fDeadModules; }
141 Int_t GetDeadChips() { return fDeadChips; }
142 Int_t GetDeadChannels() { return fDeadChannels; }
143 Float_t Gain(Int_t mod,Int_t chip,Int_t ch){return fGain[mod][chip][ch]; }
144 // these functions should be move to AliITSsegmentationSDD
145 const Int_t Modules() const{return fModules;}// Total number of SDD modules
146 const Int_t Chips() const{return fChips;} // Number of chips/module
147 const Int_t Channels() const { return fChannels;}// Number of channels/chip
148 //********
149 void PrintGains();
150 void Print();
03898a57 151
48058160 152 private:
153 AliITSresponseSDD(const AliITSresponseSDD &source); // copy constructor
154 AliITSresponseSDD& operator=(const AliITSresponseSDD &source); // ass. op.
2aea926d 155
48058160 156 protected:
157 // these statis const should be move to AliITSsegmentationSDD
158 static const Int_t fModules = 520; // Total number of SDD modules
159 static const Int_t fChips = 4; // Number of chips/module
160 static const Int_t fChannels = 64; // Number of channels/chip
161 //*******
162 Int_t fDeadModules; // Total number of dead SDD modules
163 Int_t fDeadChips; // Number of dead chips
164 Int_t fDeadChannels; // Number of dead channels
165 Float_t fGain[fModules][fChips][fChannels]; // Array for channel gains
166 Int_t fCPar[8]; // Hardware compression parameters
167 Float_t fNoise; // Noise
168 Float_t fBaseline; // Baseline
169 Float_t fNoiseAfterEl; // Noise after electronics
170 Float_t fJitterError; // jitter error
171 Float_t fDynamicRange; // Set Dynamic Range
172 Float_t fChargeLoss; // Set Linear Coefficient for Charge Loss
173 Float_t fTemperature; // Temperature
174 Float_t fDriftSpeed; // Drift velocity
175 Int_t fElectronics; // Electronics
176 Float_t fMaxAdc; // Adc saturation value
177 Float_t fDiffCoeff; // Diffusion Coefficient (scaling the time)
178 Float_t fDiffCoeff1; // Diffusion Coefficient (constant term)
179 Float_t fNsigmas; // Number of sigmas over which charge disintegration
180 // is performed
181 TArrayF *fGaus; // Gaussian lookup table for signal generation
182 Int_t fNcomps; // Number of samplings along the gaussian
183 Int_t fMinVal; // Min value used in 2D zero-suppression algo
184 Bool_t fWrite; // Write option for the compression algorithms
185 Bool_t fBitComp; // 10 to 8 bit compression option
186 TString fOption; // Zero-suppresion option (1D, 2D or none)
187 TString fParam1; // Read baselines from file option
188 TString fParam2; // Read compression algo thresholds from file
189 TString fDataType; // data type - real or simulated
190 TString fFileName1; // input keys : run, module #
191 TString fFileName2; // baseline & noise val or output code
192 // signal or monitored bgr.
193 TString fFileName3; // param values or output coded signal
fa1750f9 194
800f9ca4 195 ClassDef(AliITSresponseSDD,3) // SDD response
50d05d7b 196
197 };
b0f5e3fc 198#endif