]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSresponseSSD.cxx
negative indexes allowed
[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
16#include <TMath.h>
1ca7869b 17#include <TString.h>
b0f5e3fc 18
19#include "AliITSresponseSSD.h"
20#include "AliITSgeom.h"
21
6a407881 22ClassImp(AliITSresponseSSD)
23
24//______________________________________________________________________
25AliITSresponseSSD::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//______________________________________________________________________
38AliITSresponseSSD::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//______________________________________________________________________
59AliITSresponseSSD::~AliITSresponseSSD(){
60 // destructor
b0f5e3fc 61
6a407881 62 delete [] fDetPar;
b0f5e3fc 63}
6a407881 64//______________________________________________________________________
65AliITSresponseSSD& 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//_________________________________________________________________________
ac74f489 85AliITSresponseSSD::AliITSresponseSSD(const AliITSresponseSSD &src) :
86 AliITSresponse(src) {
6a407881 87 // copy constructor
88
89 *this = src;
b0f5e3fc 90}
6a407881 91//______________________________________________________________________
92void AliITSresponseSSD::SetDetParam(Float_t *par){
93 // set det param
94 Int_t i;
b0f5e3fc 95
6a407881 96 for (i=0; i<fNPar; i++) {
97 fDetPar[i]=par[i];
98 //printf("\n CompressPar %d %d \n",i,fCPar[i]);
99 } // end for i
b0f5e3fc 100}
6a407881 101//______________________________________________________________________
102void AliITSresponseSSD::GetDetParam(Float_t *par){
103 // get det param
104 Int_t i;
105
106 for (i=0; i<fNPar; i++) {
107 par[i]=fDetPar[i];
108 } // end for i
b0f5e3fc 109}