]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSresponseSSD.cxx
AliMiniHeader moved to separate file
[u/mrichter/AliRoot.git] / ITS / AliITSresponseSSD.cxx
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     AliITSresponse(src) {
87     // copy constructor
88
89     *this = src;
90 }
91 //______________________________________________________________________
92 void AliITSresponseSSD::SetDetParam(Float_t  *par){
93     // set det param
94     Int_t i;
95
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
100 }
101 //______________________________________________________________________
102 void 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
109 }