]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSresponseSSD.cxx
Using the recommended way of forward declarations for TVector and TMatrix (see v5...
[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
17 #include "AliITSresponseSSD.h"
18 //////////////////////////////////////////////////
19 //  Response class for set:ITS                      //
20 //  Specific subdetector implementation             //
21 //  for silicon strips detectors                    //
22 //                                                  //
23 //                                                  //
24 //////////////////////////////////////////////////////
25
26 const Double_t AliITSresponseSSD::fgkDiffCoeffDefault = 0.;
27 const TString AliITSresponseSSD::fgkOption1Default = "";
28 const TString AliITSresponseSSD::fgkOption2Default = "";
29 const Double_t AliITSresponseSSD::fgkNoiseNDefault = 625.;
30 const Double_t AliITSresponseSSD::fgkNoisePDefault = 420.;
31 const Int_t AliITSresponseSSD::fgkNParDefault = 6;
32 const Double_t AliITSresponseSSD::fgkSigmaPDefault = 3.;
33 const Double_t AliITSresponseSSD::fgkSigmaNDefault = 2.;
34
35 ClassImp(AliITSresponseSSD)
36
37 //______________________________________________________________________
38 AliITSresponseSSD::AliITSresponseSSD(){
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;
49     SetParamOptions(fgkOption1Default.Data(),fgkOption2Default.Data());
50     SetNoiseParam(fgkNoisePDefault,fgkNoiseNDefault);
51 }
52 //______________________________________________________________________
53 AliITSresponseSSD::AliITSresponseSSD(const char *dataType){
54     // constructor
55
56     SetDiffCoeff(fgkDiffCoeffDefault,0.);
57     SetNoiseParam(fgkNoisePDefault,fgkNoiseNDefault);
58     SetDataType(dataType);
59     SetSigmaSpread(fgkSigmaPDefault,fgkSigmaNDefault);
60     SetParamOptions(fgkOption1Default.Data(),fgkOption2Default.Data());
61     SetNDetParam(fgkNParDefault);   // Sets fNPar=6 by default.
62     SetADCpereV();
63     fDetPar = new Double_t[fNPar];
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
72 }
73 //______________________________________________________________________
74 AliITSresponseSSD::~AliITSresponseSSD(){
75     // destructor
76
77     delete [] fDetPar;
78 }
79 //______________________________________________________________________
80 AliITSresponseSSD& 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;
96
97     return *this;
98 }
99 //_________________________________________________________________________
100 AliITSresponseSSD::AliITSresponseSSD(const AliITSresponseSSD &src) :
101     AliITSresponse(src) {
102     // copy constructor
103
104     *this = src;
105 }
106 //______________________________________________________________________
107 void AliITSresponseSSD::SetDetParam(Double_t  *par){
108     // set det param
109     Int_t i;
110
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
115 }
116 //______________________________________________________________________
117 void AliITSresponseSSD::GetDetParam(Double_t  *par) const {
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
124 }