update (alberto):
[u/mrichter/AliRoot.git] / ITS / AliITSCalibrationSSD.cxx
CommitLineData
fcf95fc7 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
17#include "AliITSCalibrationSSD.h"
18//////////////////////////////////////////////////////
19// Calibration class for set:ITS //
20// Specific subdetector implementation //
21// for silicon strips detectors //
22// //
23// //
24//////////////////////////////////////////////////////
25
26const Double_t AliITSCalibrationSSD::fgkNoiseNDefault = 625.;
27const Double_t AliITSCalibrationSSD::fgkNoisePDefault = 420.;
28const Int_t AliITSCalibrationSSD::fgkNParDefault = 6;
29const Double_t AliITSCalibrationSSD::fgkSigmaPDefault = 3.;
30const Double_t AliITSCalibrationSSD::fgkSigmaNDefault = 2.;
31
32ClassImp(AliITSCalibrationSSD)
33
34//______________________________________________________________________
35AliITSCalibrationSSD::AliITSCalibrationSSD(){
36 // Default Constructor
37
38 fDetPar = 0;
39 fNPar = 0;
14a74335 40 fNoiseP = 0;
fcf95fc7 41 fNoiseN = 0;
42 fSigmaP = 0;
43 fSigmaN = 0;
44 SetNoiseParam(fgkNoisePDefault,fgkNoiseNDefault);
45}
46//______________________________________________________________________
47AliITSCalibrationSSD::AliITSCalibrationSSD(const char *dataType){
48 // constructor
49
50 SetNoiseParam(fgkNoisePDefault,fgkNoiseNDefault);
51 SetDataType(dataType);
52 SetSigmaSpread(fgkSigmaPDefault,fgkSigmaNDefault);
53 SetNDetParam(fgkNParDefault); // Sets fNPar=6 by default.
54 fDetPar = new Double_t[fNPar];
55 if (fNPar==6) {
56 fDetPar[0]=10.;
57 fDetPar[1]=5.;
58 fDetPar[2]=0.02;
59 fDetPar[3]=0.02;
60 fDetPar[4]=0.02;
61 fDetPar[5]=0.03;
62 } // end if
63}
64//______________________________________________________________________
65AliITSCalibrationSSD::~AliITSCalibrationSSD(){
66 // destructor
67
68 delete [] fDetPar;
69}
70//______________________________________________________________________
71AliITSCalibrationSSD& AliITSCalibrationSSD::operator=(const AliITSCalibrationSSD &src) {
72 // = operator.
73
74 if(&src == this) return *this;
75
76 this->fNPar = src.fNPar;
77 for(Int_t i=0;i<this->fNPar;i++) this->fDetPar[i] = src.fDetPar[i];
78 this->fNoiseP = src.fNoiseP;
79 this->fNoiseN = src.fNoiseN;
80 this->fSigmaP = src.fSigmaP;
81 this->fSigmaN = src.fSigmaN;
82 this->fDataType = src.fDataType;
83
84 return *this;
85}
86//_________________________________________________________________________
87AliITSCalibrationSSD::AliITSCalibrationSSD(const AliITSCalibrationSSD &src) :
88 AliITSCalibration(src) {
89 // copy constructor
90
91 *this = src;
92}
93//______________________________________________________________________
94void AliITSCalibrationSSD::SetDetParam(Double_t *par){
95 // set det param
96 Int_t i;
97
98 for (i=0; i<fNPar; i++) {
99 fDetPar[i]=par[i];
100 //printf("\n CompressPar %d %d \n",i,fCPar[i]);
101 } // end for i
102}
103//______________________________________________________________________
104void AliITSCalibrationSSD::GetDetParam(Double_t *par) const {
105 // get det param
106 Int_t i;
107
108 for (i=0; i<fNPar; i++) {
109 par[i]=fDetPar[i];
110 } // end for i
111}