]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSresponseSDD.cxx
stdlib.h included (for Alpha)
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSDD.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                         *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 #include <TString.h>
17
18 #include "AliITSresponseSDD.h"
19
20
21 //___________________________________________
22 ClassImp(AliITSresponseSDD)     
23
24 AliITSresponseSDD::AliITSresponseSDD()
25 {
26   // constructor
27    SetMaxAdc();
28    SetDiffCoeff();
29    SetDriftSpeed();
30    SetNSigmaIntegration();
31    SetNLookUp();
32    // SetClock();
33    SetNoiseParam();
34    SetNoiseAfterElectronics();
35    SetElectronics();
36    SetDynamicRange();
37    SetChargeLoss();
38    SetMinVal();
39    SetParamOptions();
40    SetZeroSupp();
41    SetDataType();
42    SetFilenames();
43    SetOutputOption();
44    SetDo10to8();
45 }
46
47 //__________________________________________________________________________
48 AliITSresponseSDD::AliITSresponseSDD(const AliITSresponseSDD &source){
49   //     Copy Constructor 
50   if(&source == this) return;
51   Int_t i;
52   for(i=0;i<8;i++){this->fCPar[i] = source.fCPar[i];}
53   this->fNoise = source.fNoise;
54   this->fBaseline = source.fBaseline;
55   this->fNoiseAfterEl = source.fNoiseAfterEl;
56   this->fDynamicRange = source.fDynamicRange;
57   this->fChargeLoss = source.fChargeLoss;
58   this->fTemperature = source.fTemperature;
59   this->fDriftSpeed = source.fDriftSpeed;
60   this->fNsigmas = source.fNsigmas;
61   this->fMaxAdc = source.fMaxAdc;
62   this->fDiffCoeff = source.fDiffCoeff;
63   this->fDiffCoeff1 = source.fDiffCoeff1;
64   this->fZeroSuppFlag = source.fZeroSuppFlag;
65   this->fMinVal = source.fMinVal;
66   this->fWrite = source.fWrite;
67   this->fBitComp = source.fBitComp;
68   this->fOption = source.fOption;
69   this->fParam1 = source.fParam1;
70   return;
71 }
72
73 //_________________________________________________________________________
74 AliITSresponseSDD& 
75   AliITSresponseSDD::operator=(const AliITSresponseSDD &source) {
76   //    Assignment operator
77   if(&source == this) return *this;
78   Int_t i;
79   for(i=0;i<8;i++){this->fCPar[i] = source.fCPar[i];}
80   this->fNoise = source.fNoise;
81   this->fBaseline = source.fBaseline;
82   this->fNoiseAfterEl = source.fNoiseAfterEl;
83   this->fDynamicRange = source.fDynamicRange;
84   this->fChargeLoss = source.fChargeLoss;
85   this->fTemperature = source.fTemperature;
86   this->fDriftSpeed = source.fDriftSpeed;
87   this->fNsigmas = source.fNsigmas;
88   this->fMaxAdc = source.fMaxAdc;
89   this->fDiffCoeff = source.fDiffCoeff;
90   this->fDiffCoeff1 = source.fDiffCoeff1;
91   this->fZeroSuppFlag = source.fZeroSuppFlag;
92   this->fMinVal = source.fMinVal;
93   this->fWrite = source.fWrite;
94   this->fBitComp = source.fBitComp;
95   this->fOption = source.fOption;
96   this->fParam1 = source.fParam1;
97   return *this;
98 }
99
100 void AliITSresponseSDD::SetCompressParam(Int_t  cp[8])
101 {
102   // set compression param
103
104     Int_t i;
105     for (i=0; i<8; i++) {
106         fCPar[i]=cp[i];
107         //printf("\n CompressPar %d %d \n",i,fCPar[i]);
108         
109     }
110 }
111 void AliITSresponseSDD::GiveCompressParam(Int_t  cp[8])
112 {
113   // give compression param
114
115     Int_t i;
116     for (i=0; i<8; i++) {
117         cp[i]=fCPar[i];
118     }
119 }
120
121 void AliITSresponseSDD::Print()
122 {
123   // Print SDD response Parameters
124
125    cout << "**************************************************" << endl;
126    cout << "   Silicon Drift Detector Response Parameters    " << endl;
127    cout << "**************************************************" << endl;
128    cout << "Diffusion Coefficients: " << fDiffCoeff << ", " << fDiffCoeff1 << endl;
129
130    cout << "Hardware compression parameters: " << endl; 
131    for(Int_t i=0; i<8; i++) cout << "fCPar[" << i << "] = " << fCPar[i] << endl;
132    cout << "Noise before electronics (arbitrary units): " << fNoise << endl;
133    cout << "Baseline (ADC units): " << fBaseline << endl;
134    cout << "Noise after electronics (ADC units): " << fNoiseAfterEl << endl;
135
136    cout << "Dynamic Range: " << fDynamicRange << endl;
137    cout << "Charge Loss: " << fChargeLoss << endl;
138    cout << "Temperature: " << fTemperature << endl;
139    cout << "Drift Speed: " << fDriftSpeed << endl;
140    cout << "Electronics (1=PASCAL, 2=OLA): " << fElectronics << endl;
141
142    cout << "N. of Sigma for signal integration: " << fNsigmas << endl;
143    cout << "N. of bins in lookup table: " << fNcomps << endl;
144
145    cout << "Max. ADC Value: " << fMaxAdc << endl;
146    cout << "Min. Value: " << fMinVal << endl;
147
148    cout << "Zero suppression flag: " << fZeroSuppFlag << endl; 
149    cout << "**************************************************" << endl;
150   
151
152
153 }
154
155
156