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