]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSresponseSSD.cxx
New ITS code for new structure and simulations.
[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>
17
18#include "AliITSresponseSSD.h"
19#include "AliITSgeom.h"
20
21ClassImp(AliITSresponseSSD)
22//----------------------------------------------------------
23AliITSresponseSSD::AliITSresponseSSD()
24{
25 // constructor
26 SetDiffCoeff();
27 SetNoiseParam();
28 SetDataType();
29 SetSigmaSpread();
30 SetParamOptions();
31 SetNDetParam();
32 fDetPar = new Float_t[fNPar];
33 if (fNPar==6) {
34 fDetPar[0]=10.;
35 fDetPar[1]=5.;
36 fDetPar[2]=0.02;
37 fDetPar[3]=0.02;
38 fDetPar[4]=0.02;
39 fDetPar[5]=0.03;
40 }
41
42
43}
44
45//----------------------------------------------------------
46AliITSresponseSSD::~AliITSresponseSSD()
47{
48 // destructor
49 delete [] fDetPar;
50 delete fDetPar;
51
52}
53
54//__________________________________________________________________________
55AliITSresponseSSD::AliITSresponseSSD(const AliITSresponseSSD &source){
56 // Copy Constructor
57 if(&source == this) return;
58 this->fNPar = source.fNPar;
59 this->fDetPar = source.fDetPar;
60 this->fNoiseP = source.fNoiseP;
61 this->fNoiseN = source.fNoiseN;
62 this->fSigmaP = source.fSigmaP;
63 this->fSigmaN = source.fSigmaN;
64 this->fDiffCoeff = source.fDiffCoeff;
65 this->fOption1 = source.fOption1;
66 this->fOption2 = source.fOption2;
67 this->fDataType = source.fDataType;
68 return;
69}
70
71//_________________________________________________________________________
72AliITSresponseSSD&
73 AliITSresponseSSD::operator=(const AliITSresponseSSD &source) {
74 // Assignment operator
75 if(&source == this) return *this;
76 this->fNPar = source.fNPar;
77 this->fDetPar = source.fDetPar;
78 this->fNoiseP = source.fNoiseP;
79 this->fNoiseN = source.fNoiseN;
80 this->fSigmaP = source.fSigmaP;
81 this->fSigmaN = source.fSigmaN;
82 this->fDiffCoeff = source.fDiffCoeff;
83 this->fOption1 = source.fOption1;
84 this->fOption2 = source.fOption2;
85 this->fDataType = source.fDataType;
86 return *this;
87}
88
89//----------------------------------------------------------
90void AliITSresponseSSD::SetDetParam(Float_t *par)
91{
92 // set det param
93 Int_t i;
94 for(i=0; i<fNPar; i++) {
95 fDetPar[i]=par[i];
96 //printf("\n CompressPar %d %d \n",i,fCPar[i]);
97
98 }
99}
100void AliITSresponseSSD::GetDetParam(Float_t *par)
101{
102 // get det param
103 Int_t i;
104 for(i=0; i<fNPar; i++) {
105 par[i]=fDetPar[i];
106 }
107}
108
109//______________________________________________________________________________
110void AliITSresponseSSD::Streamer(TBuffer &R__b)
111{
112 // Stream an object of class AliITSresponseSSD.
113
114 if (R__b.IsReading()) {
115 Version_t R__v = R__b.ReadVersion(); if (R__v) { }
116 AliITSresponse::Streamer(R__b);
117 R__b >> fNPar;
118 //R__b.ReadArray(fDetPar); // Not to be printed out?
119 R__b >> fNoiseP;
120 R__b >> fNoiseN;
121 R__b >> fSigmaP;
122 R__b >> fSigmaN;
123 R__b >> fDiffCoeff;
124 //R__b.ReadArray(fOption1); // Not to be printed out?
125 //R__b.ReadArray(fOption2); // Not to be printed out?
126 fDataType.Streamer(R__b);
127 } else {
128 R__b.WriteVersion(AliITSresponseSSD::IsA());
129 AliITSresponse::Streamer(R__b);
130 R__b << fNPar;
131 //R__b.WriteArray(fDetPar, __COUNTER__); // Not to be printed out?
132 R__b << fNoiseP;
133 R__b << fNoiseN;
134 R__b << fSigmaP;
135 R__b << fSigmaN;
136 R__b << fDiffCoeff;
137 //R__b.WriteArray(fOption1, __COUNTER__); // Not to be printed out?
138 //R__b.WriteArray(fOption2, __COUNTER__); // Not to be printed out?
139 fDataType.Streamer(R__b);
140 }
141}