]>
Commit | Line | Data |
---|---|---|
b0f5e3fc | 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 <TMath.h> | |
1ca7869b | 17 | #include <TString.h> |
b0f5e3fc | 18 | |
19 | #include "AliITSresponseSSD.h" | |
20 | #include "AliITSgeom.h" | |
21 | ||
6a407881 | 22 | ClassImp(AliITSresponseSSD) |
23 | ||
24 | //______________________________________________________________________ | |
25 | AliITSresponseSSD::AliITSresponseSSD(){ | |
9de0700b | 26 | // Default Constructor |
27 | ||
28 | fDetPar = 0; | |
29 | fNPar = 0; | |
30 | fNoiseP = 0; | |
31 | fNoiseN = 0; | |
32 | fSigmaP = 0; | |
33 | fSigmaN = 0; | |
34 | fDiffCoeff = 0; | |
35 | fADCpereV = 0; | |
36 | } | |
37 | //______________________________________________________________________ | |
38 | AliITSresponseSSD::AliITSresponseSSD(const char *dataType){ | |
6a407881 | 39 | // constructor |
b0f5e3fc | 40 | |
6a407881 | 41 | SetDiffCoeff(); |
42 | SetNoiseParam(); | |
9de0700b | 43 | SetDataType(dataType); |
6a407881 | 44 | SetSigmaSpread(); |
45 | SetParamOptions(); | |
9de0700b | 46 | SetNDetParam(); // Sets fNPar=6 by default. |
6a407881 | 47 | SetADCpereV(); |
48 | fDetPar = new Float_t[fNPar]; | |
49 | if (fNPar==6) { | |
50 | fDetPar[0]=10.; | |
51 | fDetPar[1]=5.; | |
52 | fDetPar[2]=0.02; | |
53 | fDetPar[3]=0.02; | |
54 | fDetPar[4]=0.02; | |
55 | fDetPar[5]=0.03; | |
56 | } // end if | |
b0f5e3fc | 57 | } |
6a407881 | 58 | //______________________________________________________________________ |
59 | AliITSresponseSSD::~AliITSresponseSSD(){ | |
60 | // destructor | |
b0f5e3fc | 61 | |
6a407881 | 62 | delete [] fDetPar; |
b0f5e3fc | 63 | } |
6a407881 | 64 | //______________________________________________________________________ |
65 | AliITSresponseSSD& AliITSresponseSSD::operator=(const AliITSresponseSSD &src) { | |
66 | // = operator. | |
67 | ||
68 | if(&src == this) return *this; | |
69 | ||
70 | this->fNPar = src.fNPar; | |
71 | for(Int_t i=0;i<this->fNPar;i++) this->fDetPar[i] = src.fDetPar[i]; | |
72 | this->fNoiseP = src.fNoiseP; | |
73 | this->fNoiseN = src.fNoiseN; | |
74 | this->fSigmaP = src.fSigmaP; | |
75 | this->fSigmaN = src.fSigmaN; | |
76 | this->fDiffCoeff = src.fDiffCoeff; | |
77 | this->fADCpereV = src.fADCpereV; | |
78 | this->fOption1 = src.fOption1; | |
79 | this->fOption2 = src.fOption2; | |
80 | this->fDataType = src.fDataType; | |
b0f5e3fc | 81 | |
6a407881 | 82 | return *this; |
83 | } | |
b0f5e3fc | 84 | //_________________________________________________________________________ |
6a407881 | 85 | AliITSresponseSSD::AliITSresponseSSD(const AliITSresponseSSD &src) { |
86 | // copy constructor | |
87 | ||
88 | *this = src; | |
b0f5e3fc | 89 | } |
6a407881 | 90 | //______________________________________________________________________ |
91 | void AliITSresponseSSD::SetDetParam(Float_t *par){ | |
92 | // set det param | |
93 | Int_t i; | |
b0f5e3fc | 94 | |
6a407881 | 95 | for (i=0; i<fNPar; i++) { |
96 | fDetPar[i]=par[i]; | |
97 | //printf("\n CompressPar %d %d \n",i,fCPar[i]); | |
98 | } // end for i | |
b0f5e3fc | 99 | } |
6a407881 | 100 | //______________________________________________________________________ |
101 | void AliITSresponseSSD::GetDetParam(Float_t *par){ | |
102 | // get det param | |
103 | Int_t i; | |
104 | ||
105 | for (i=0; i<fNPar; i++) { | |
106 | par[i]=fDetPar[i]; | |
107 | } // end for i | |
b0f5e3fc | 108 | } |