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