]> git.uio.no Git - u/mrichter/AliRoot.git/blame - T0/AliT0RecoParam.cxx
fixed: now preprocessor will not crash for 1st 17 amplitude calibration runs
[u/mrichter/AliRoot.git] / T0 / AliT0RecoParam.cxx
CommitLineData
0f786b96 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///////////////////////////////////////////////////////////////////////////////
18// //
19// Class with T0 reconstruction parameters //
20// fMeanAmplitude -
21// for low flux time-amplitude correction equalize time to amplitude 1 MIP;
22// for high flux - to 15MIP
23// To have nice time spectra after reconstruction we need to know
24// reference point to write t(i) - RefPoint.
25// It can be apparatus RefPoint or one of PMT //
26// fRefPoint - number of channel with RF
27//
28// Alla.Maevskaya@cern.ch
29/////////////////////////////////////////////////////////////////////////
30
31#include "AliLog.h"
32
33#include "AliT0RecoParam.h"
34#include "Riostream.h"
35
36ClassImp(AliT0RecoParam)
37
38
39
40
41//_____________________________________________________________________________
42AliT0RecoParam::AliT0RecoParam():
43 AliDetectorRecoParam(),
44 fRefAmp(7),
2b0a42ea 45 fRefPoint(0),
46 fLatencyL1(0),
e9626e76 47 fLatencyL1A(0),
48 fLatencyL1C(0),
2b0a42ea 49 fLatencyHPTDC(0),
50 fVertexShift(0)
0f786b96 51{
52 //
53 // constructor
54 //
55 SetName("T0");
56 SetTitle("T0");
57}
58
59//_____________________________________________________________________________
60AliT0RecoParam::~AliT0RecoParam()
61{
62 //
63 // destructor
64 //
65}
66
67//_____________________________________________________________________________
68
69AliT0RecoParam::AliT0RecoParam(const AliT0RecoParam &p):
70 AliDetectorRecoParam(p),
2b0a42ea 71 fRefAmp(p.fRefAmp),
72 fRefPoint(p.fRefPoint),
73 fLatencyL1(p.fLatencyL1),
e9626e76 74 fLatencyL1A(p.fLatencyL1A),
75 fLatencyL1C(p.fLatencyL1C),
76 fLatencyHPTDC(p.fLatencyHPTDC),
2b0a42ea 77 fVertexShift(p.fVertexShift)
0f786b96 78{
79
80 //copy constructor
81
82}
83//_____________________________________________________________________________
84
85AliT0RecoParam& AliT0RecoParam:: operator=(const AliT0RecoParam &p)
86{
87 //
88 // assign. operator
89 //
90
91 if (this == &p)
92 return *this;
93
94 AliDetectorRecoParam::operator=(p);
95 fRefAmp = p.fRefAmp;
96 fRefPoint = p.fRefPoint;
2b0a42ea 97 fLatencyL1 = p.fLatencyL1;
e9626e76 98 fLatencyL1A = p.fLatencyL1A;
99 fLatencyL1C = p.fLatencyL1C;
100
2b0a42ea 101 fLatencyHPTDC = p.fLatencyHPTDC;
102 fVertexShift = p.fVertexShift;
784e2251 103 return *this;
104
0f786b96 105}
106//_____________________________________________________________________________
107
108AliT0RecoParam *AliT0RecoParam::GetLowFluxParam()
109{
110 //
111 // make default reconstruction parameters for low flux env.
112 //
113 AliT0RecoParam *param = new AliT0RecoParam();
114 param->fRefAmp = 1;
115 param->fRefPoint = 0;
e9626e76 116 param->fLatencyL1 = 7782.05;
117 param->fLatencyL1A = 7781.90;
118 param->fLatencyL1C = 7782.19;
2b0a42ea 119 param->fLatencyHPTDC = 22000;
b5a9f753 120 param->fVertexShift = 0;
a46b18e9 121 for (Int_t i=0; i<500; i++)
122 {
123 param-> fLow[i]=0.;
124 param-> fHigh[i]=10000.;
125 }
0f786b96 126 param->SetName("Low Flux");
127 param->SetTitle("Low Flux");
128 return param;
129}
130
131//_____________________________________________________________________________
132
133AliT0RecoParam *AliT0RecoParam::GetHighFluxParam()
134{
135 //
136 // make reco parameters for high flux env.
137 //
138
139 AliT0RecoParam *param = new AliT0RecoParam();
e9626e76 140 param->fRefAmp = 10;
0f786b96 141 param->fRefPoint = 0;
e9626e76 142 param->fLatencyL1 = 7782.05;
143 param->fLatencyL1A = 7781.90;
144 param->fLatencyL1C = 7782.19;
b5a9f753 145 param->fVertexShift = 0;
2b0a42ea 146 param->fLatencyHPTDC = 22000;
a46b18e9 147 for (Int_t i=0; i<500; i++)
148 {
2b0a42ea 149 param-> fLow[i]=0.;
150 param-> fHigh[i]=20000.;
a46b18e9 151 }
0f786b96 152 //
153 param->SetName("High Flux");
154 param->SetTitle("High Flux");
155 return param;
156}
157
158
159//_____________________________________________________________________________
160
161AliT0RecoParam *AliT0RecoParam::GetLaserTestParam()
162{
163 //
164 // special setting for laser
165 //
166 AliT0RecoParam *param = new AliT0RecoParam();
167 param->fRefAmp = 1;
168 param->fRefPoint = 1;
e9626e76 169 param->fLatencyL1 = 7782.05;
170 param->fLatencyL1A = 7781.90;
171 param->fLatencyL1C = 7782.19;
2b0a42ea 172 param->fLatencyHPTDC = 22000;
173 param->fVertexShift = 0;
b5a9f753 174
a46b18e9 175 for (Int_t i=0; i<500; i++)
176 {
177 param-> fLow[i]=0.;
178 param-> fHigh[i]=12000.;
179 }
0f786b96 180 //
181 param->SetName("Laser Flux");
182 param->SetTitle("Laser Flux");
183 return param;
184}
185//_____________________________________________________________________________
a46b18e9 186
0f786b96 187void AliT0RecoParam::PrintParameters() const
188{
189 //
190 // Printing of the used T0 reconstruction parameters
191 //
192 AliInfo(Form(" Reference amplitude for walk corerection : %f", fRefAmp));
193 AliInfo(Form(" Reference point in channel : %i", fRefPoint));
b5a9f753 194 AliInfo(Form(" Current latency : %f ns", fLatencyL1));
195 AliInfo(Form(" HPTDC latency : %f ns", fLatencyHPTDC));
e9626e76 196 // cout<<" AliT0RecoParam::PrintParameters() "<<endl;
197 // for (Int_t i=0; i<500; i++) cout<<i<<" "<<fLow[i]<<" "<<fHigh[i]<<endl;
0f786b96 198}