]>
Commit | Line | Data |
---|---|---|
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> | |
17 | #include <TString.h> | |
18 | ||
19 | #include "AliITSresponseSSD.h" | |
20 | #include "AliITSgeom.h" | |
21 | ||
22 | ClassImp(AliITSresponseSSD) | |
23 | ||
24 | //______________________________________________________________________ | |
25 | AliITSresponseSSD::AliITSresponseSSD(){ | |
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){ | |
39 | // constructor | |
40 | ||
41 | SetDiffCoeff(); | |
42 | SetNoiseParam(); | |
43 | SetDataType(dataType); | |
44 | SetSigmaSpread(); | |
45 | SetParamOptions(); | |
46 | SetNDetParam(); // Sets fNPar=6 by default. | |
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 | |
57 | } | |
58 | //______________________________________________________________________ | |
59 | AliITSresponseSSD::~AliITSresponseSSD(){ | |
60 | // destructor | |
61 | ||
62 | delete [] fDetPar; | |
63 | } | |
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; | |
81 | ||
82 | return *this; | |
83 | } | |
84 | //_________________________________________________________________________ | |
85 | AliITSresponseSSD::AliITSresponseSSD(const AliITSresponseSSD &src) { | |
86 | // copy constructor | |
87 | ||
88 | *this = src; | |
89 | } | |
90 | //______________________________________________________________________ | |
91 | void AliITSresponseSSD::SetDetParam(Float_t *par){ | |
92 | // set det param | |
93 | Int_t i; | |
94 | ||
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 | |
99 | } | |
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 | |
108 | } |