Fix
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSDD.h
CommitLineData
b0f5e3fc 1#ifndef ALIITSRESPONSESDD_H
2#define ALIITSRESPONSESDD_H
48058160 3
c2bd28b6 4/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
48058160 5 * See cxx source for full Copyright notice */
6
88cb7938 7
fcf95fc7 8#include <AliITSresponse.h>
9#include <TArrayF.h>
b0f5e3fc 10
c2bd28b6 11/* $Id$ */
12
fcf95fc7 13/////////////////////////////////////////////////////////////
14// Base settings for the ITS response classes. //
15// The data member of this class are static and set once //
16// for all the modules. //
17/////////////////////////////////////////////////////////////
b0f5e3fc 18
48058160 19class AliITSresponseSDD : public AliITSresponse {
aacedc3e 20 public:
fcf95fc7 21
48058160 22 AliITSresponseSDD();
48058160 23 virtual ~AliITSresponseSDD();
7551c5b2 24
703a4e51 25 virtual void SetElectronics(Int_t p1=1)
26 {fElectronics=p1; /* Electronics: Pascal (1) or OLA (2) */ }
fcf95fc7 27 virtual Int_t Electronics() const {// Electronics: 1 = Pascal; 2 = OLA
48058160 28 return fElectronics;}
aacedc3e 29 virtual void SetMaxAdc(Double_t p1) {// Adc-count saturation value
48058160 30 fMaxAdc=p1;}
4bfbde86 31 virtual Float_t MaxAdc() const {// Get maximum Adc-count value
48058160 32 return fMaxAdc;}
aacedc3e 33 virtual void SetChargeLoss(Double_t p1) {
48058160 34 // Set Linear Charge Loss Steepness // 0.01 for 20%
35 fChargeLoss=p1;}
4bfbde86 36 virtual Float_t ChargeLoss() const {// Get Charge Loss Coefficient
48058160 37 return fChargeLoss;}
aacedc3e 38 virtual void SetDynamicRange(Double_t p1) {// Set Dynamic Range
703a4e51 39 fDynamicRange = p1;}
4bfbde86 40 virtual Float_t DynamicRange() const {// Get Dynamic Range
48058160 41 return fDynamicRange;}
a66a0eb6 42
c2bd28b6 43 static Float_t DefaultDriftSpeed() {return fgkDriftSpeedDefault;}
a66a0eb6 44
45 virtual void SetTimeOffset(Float_t to){fTimeOffset = to;}
46 virtual Float_t TimeOffset()const {return fTimeOffset;}
47 static Float_t DefaultTimeOffset() {return fgkTimeOffsetDefault;}
48
49 virtual void SetADC2keV(Float_t conv){fADC2keV=conv;}
50 virtual Float_t ADC2keV()const {return fADC2keV;}
51 static Float_t DefaulttADC2keV() {return fgkADC2keVDefault;}
52
8ba39da9 53
703a4e51 54 void SetZeroSupp (const char *opt) {
fa4f0f62 55 // Zero-suppression option - could be ZS or NOTSUPP
703a4e51 56 fOption=opt;}
57 const char *ZeroSuppOption() const {// Get zero-suppression option
58 return fOption.Data();}
703a4e51 59 // Detector type response methods
aacedc3e 60 virtual void SetNSigmaIntegration(Double_t p1) {
703a4e51 61 // Set number of sigmas over which cluster disintegration is performed
62 fNsigmas=p1;}
4bfbde86 63 virtual Float_t NSigmaIntegration() const {
703a4e51 64 // Get number of sigmas over which cluster disintegration is performed
65 return fNsigmas;}
66 virtual void SetNLookUp(Int_t p1);
67 // Get number of intervals in which the gaussian lookup table is divided
68 virtual Int_t GausNLookUp() const {return fNcomps;}
4bfbde86 69 virtual Float_t GausLookUp(Int_t i) {
fdef5715 70 if (!fGaus) SetNLookUp(fgkNcompsDefault);
71 if(i<0 || i>=fNcomps) return 0.;return fGaus->At(i);
72 }
703a4e51 73
4bfbde86 74 void SetJitterError(Float_t jitter=20) {
48058160 75 // set Jitter error (20 um for ALICE from beam test measurements 2001)
76 fJitterError=jitter;}
4bfbde86 77 Float_t JitterError() const {// set Jitter error
48058160 78 return fJitterError;}
8ba39da9 79
48058160 80 protected:
fcf95fc7 81
703a4e51 82 static const Int_t fgkMaxAdcDefault; // default for fMaxAdc
4bfbde86 83 static const Float_t fgkDynamicRangeDefault; // default for fDynamicRange
84 static const Float_t fgkfChargeLossDefault; // default for fChargeLoss
fcf95fc7 85 static const Float_t fgkDiffCoeffDefault; // default for fDiffCoeff
86 static const Float_t fgkDiffCoeff1Default; // default for fDiffCoeff1
703a4e51 87 static const TString fgkOptionDefault; // default for fOption
4952f440 88 static const Float_t fgkDriftSpeedDefault; // default for drift speed
a66a0eb6 89 static const Float_t fgkTimeOffsetDefault; // default for fTimeOffset
90 static const Float_t fgkADC2keVDefault; // default for fADC2keV
4bfbde86 91 static const Float_t fgkNsigmasDefault; //default for fNsigmas
703a4e51 92 static const Int_t fgkNcompsDefault; //default for fNcomps
fcf95fc7 93
703a4e51 94
4bfbde86 95 Float_t fJitterError; // jitter error
96 Float_t fDynamicRange; // Set Dynamic Range
97 Float_t fChargeLoss; // Set Linear Coefficient for Charge Loss
a66a0eb6 98 Float_t fTimeOffset; // Time offset due to electronic delays
99 Float_t fADC2keV; // Conversion factor from ADC to keV
100 Int_t fElectronics; // Electronics
4bfbde86 101 Float_t fMaxAdc; // Adc saturation value
102 Float_t fNsigmas; // Number of sigmas over which charge disintegration
fcf95fc7 103 // is performed
48058160 104 TArrayF *fGaus; // Gaussian lookup table for signal generation
105 Int_t fNcomps; // Number of samplings along the gaussian
fa4f0f62 106 TString fOption; // Zero-suppresion option (ZS or non-ZS)
703a4e51 107
108 private:
703a4e51 109
fcf95fc7 110 AliITSresponseSDD(const AliITSresponseSDD &ob); // copy constructor
111 AliITSresponseSDD& operator=(const AliITSresponseSDD & /* source */); // ass. op.
fa1750f9 112
10add0d4 113 ClassDef(AliITSresponseSDD,12) // Base response class
50d05d7b 114
115 };
b0f5e3fc 116#endif