]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSresponseSDD.h
PMD new raw data writer
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSDD.h
1 #ifndef ALIITSRESPONSESDD_H
2 #define ALIITSRESPONSESDD_H
3  
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6  
7
8 #include <AliITSresponse.h>
9 #include <TArrayF.h>
10
11 /////////////////////////////////////////////////////////////
12 //  Base settings for the ITS response classes.            //  
13 //  The data member of this class are static and set once  //
14 //  for all the modules.                                   //    
15 ///////////////////////////////////////////////////////////// 
16
17 class AliITSresponseSDD : public AliITSresponse {
18   public:
19
20     AliITSresponseSDD();
21     virtual ~AliITSresponseSDD();
22
23     virtual void SetElectronics(Int_t p1=1) 
24       {fElectronics=p1;  /* Electronics: Pascal (1) or OLA (2) */ }
25     virtual Int_t Electronics()  const {// Electronics: 1 = Pascal; 2 = OLA
26         return fElectronics;}
27     virtual void    SetMaxAdc(Double_t p1) {// Adc-count saturation value
28         fMaxAdc=p1;}
29     virtual Double_t MaxAdc() const  {// Get maximum Adc-count value
30         return fMaxAdc;}
31     virtual void    SetChargeLoss(Double_t p1) {
32         // Set Linear Charge Loss Steepness  // 0.01 for 20%
33         fChargeLoss=p1;}
34     virtual Double_t ChargeLoss() const {// Get Charge Loss Coefficient
35         return fChargeLoss;}
36     virtual void    SetDynamicRange(Double_t p1) {// Set Dynamic Range
37         fDynamicRange = p1;}
38     virtual Double_t DynamicRange() const {// Get Dynamic Range
39         return fDynamicRange;}
40     virtual void    SetDriftSpeed(Double_t p1) {// Drift velocity
41         fDriftSpeed=p1;}
42     virtual Double_t DriftSpeed() const {// drift speed
43         return fDriftSpeed;}
44     virtual void SetParamOptions(const char *opt1,const char *opt2) {
45         // Parameters: "same" or read from "file" 
46         fParam1=opt1; fParam2=opt2;}
47     virtual void   ParamOptions(char *opt1,char *opt2) const {// options
48         strcpy(opt1,fParam1.Data()); strcpy(opt2,fParam2.Data());}
49  
50     virtual Bool_t Do10to8() const {// get 10 to 8 compression option
51         return fBitComp;}
52     void    SetZeroSupp (const char *opt) {
53         // Zero-suppression option - could be 1D, 2D or non-ZS 
54         fOption=opt;}
55     const char *ZeroSuppOption() const {// Get zero-suppression option
56         return fOption.Data();}
57     // Detector type response methods
58     virtual void    SetNSigmaIntegration(Double_t p1) {
59         // Set number of sigmas over which cluster disintegration is performed
60         fNsigmas=p1;}
61     virtual Double_t NSigmaIntegration() const {
62         // Get number of sigmas over which cluster disintegration is performed
63         return fNsigmas;}
64     virtual void SetNLookUp(Int_t p1);
65     // Get number of intervals in which the gaussian lookup table is divided
66     virtual Int_t GausNLookUp() const {return fNcomps;}
67     virtual Double_t GausLookUp(Int_t i) const  {
68         if(i<0 || i>=fNcomps) return 0.;return fGaus->At(i);}
69    
70     Int_t Convert8to10(Int_t signal) const; //undo 10 to 8 bit SDD compresion
71
72     void  SetJitterError(Double_t jitter=20) {
73         // set Jitter error (20 um for ALICE from beam test measurements 2001)
74         fJitterError=jitter;}
75     Double_t  JitterError() const {// set Jitter error
76         return fJitterError;}
77     void  SetDo10to8(Bool_t bitcomp=kTRUE) {
78         // set the option for 10 to 8 bit compression
79         fBitComp = bitcomp;}
80
81  protected:
82
83     static const Int_t fgkMaxAdcDefault; // default for fMaxAdc
84     static const Double_t fgkDynamicRangeDefault; // default for fDynamicRange
85     static const Double_t fgkfChargeLossDefault; // default for fChargeLoss
86     static const Float_t fgkDiffCoeffDefault; // default for fDiffCoeff
87     static const Float_t fgkDiffCoeff1Default; // default for fDiffCoeff1 
88     static const TString fgkParam1Default; // default for fParam1
89     static const TString fgkParam2Default; // default for fParam2
90     static const TString fgkOptionDefault; // default for fOption
91     static const Double_t fgkDriftSpeedDefault; // default for fDriftSpeed
92     static const Double_t fgkNsigmasDefault; //default for fNsigmas
93     static const Int_t fgkNcompsDefault; //default for fNcomps
94     
95
96     Double_t  fJitterError;    // jitter error
97     Double_t  fDynamicRange;   // Set Dynamic Range 
98     Double_t  fChargeLoss;     // Set Linear Coefficient for Charge Loss 
99     Double_t  fDriftSpeed;     // Drift velocity
100     Int_t     fElectronics;    // Electronics
101     Double_t  fMaxAdc;         // Adc saturation value
102     Double_t  fNsigmas;   // Number of sigmas over which charge disintegration
103                           // is performed
104     TArrayF   *fGaus;          // Gaussian lookup table for signal generation
105     Int_t      fNcomps;        // Number of samplings along the gaussian
106     Bool_t     fBitComp;       // 10 to 8 bit compression option
107     TString    fOption;        // Zero-suppresion option (1D, 2D or none)
108     TString    fParam1;        // Read baselines from file option
109     TString    fParam2;        // Read compression algo thresholds from file
110
111  private:
112
113    AliITSresponseSDD(const AliITSresponseSDD &ob); // copy constructor
114    AliITSresponseSDD& operator=(const AliITSresponseSDD & /* source */); // ass. op.
115
116     ClassDef(AliITSresponseSDD,6) // Base response class 
117     
118     };
119 #endif