free arrays before of return in PropagateBack
[u/mrichter/AliRoot.git] / TOF / AliTOFRecoParam.cxx
CommitLineData
52ffea62 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 TOF reconstruction parameters //
90b234fe 20// //
52ffea62 21// //
22///////////////////////////////////////////////////////////////////////////////
23
24
90b234fe 25#include "AliLog.h"
26
52ffea62 27#include "AliTOFRecoParam.h"
28
29ClassImp(AliTOFRecoParam)
30
31//_____________________________________________________________________________
32AliTOFRecoParam::AliTOFRecoParam():
93ed261e 33 AliDetectorRecoParam(),
52ffea62 34 fTimeZero(kFALSE),
35 fTimeZerofromT0(kFALSE),
36 fTimeZerofromTOF(kFALSE),
37 fTimeWalkCorr(kFALSE),
38 fApplyPbPbCuts(kFALSE),
39 fWindowSizeMaxY(50.),
40 fWindowSizeMaxZ(35.),
15ed3d4f 41 fWindowScaleFact(5.),
52ffea62 42 fDistanceCut(3.),
8dacd1bb 43 fSensRadius(379.5),
52ffea62 44 fStepSize(0.1),
15ed3d4f 45 fMaxChi2(10.),
46 fMaxChi2TRD(150.),
52ffea62 47 fTimeResolution(80.),
45a69ca6 48 fTimeNSigma(5.),
d486a5ef 49 fMaxDeltaTime(2),
50 fStartTimeType(1)// 1 -> AliESDpid::kTOF_T0
52ffea62 51{
52 //
53 // constructor
54 //
93ed261e 55 SetNameTitle("TOF","TOF");
52ffea62 56}
15ed3d4f 57//_____________________________________________________________________________
58AliTOFRecoParam::AliTOFRecoParam(const AliTOFRecoParam &p):
8a190ba2 59 AliDetectorRecoParam(p),
60 fTimeZero(p.fTimeZero),
61 fTimeZerofromT0(p.fTimeZerofromT0),
62 fTimeZerofromTOF(p.fTimeZerofromTOF),
63 fTimeWalkCorr(p.fTimeWalkCorr),
64 fApplyPbPbCuts(p.fApplyPbPbCuts),
65 fWindowSizeMaxY(p.fWindowSizeMaxY),
66 fWindowSizeMaxZ(p.fWindowSizeMaxZ),
67 fWindowScaleFact(p.fWindowScaleFact),
68 fDistanceCut(p.fDistanceCut),
69 fSensRadius(p.fSensRadius),
70 fStepSize(p.fStepSize),
71 fMaxChi2(p.fMaxChi2),
72 fMaxChi2TRD(p.fMaxChi2TRD),
73 fTimeResolution(p.fTimeResolution),
45a69ca6 74 fTimeNSigma(p.fTimeNSigma),
d486a5ef 75 fMaxDeltaTime(p.fMaxDeltaTime),
76 fStartTimeType(p.fStartTimeType)
15ed3d4f 77 {
78 //copy Ctor
52ffea62 79
8a190ba2 80
81}
82//_____________________________________________________________________________
83AliTOFRecoParam& AliTOFRecoParam::operator=(const AliTOFRecoParam &p)
84{
85 //
86 // assign. operator
87 //
88
89 if (this == &p)
90 return *this;
91
92 AliDetectorRecoParam::operator=(p);
93 fTimeZero=p.fTimeZero;
45a69ca6 94 fTimeZerofromT0=p.fTimeZerofromT0;
95 fTimeZerofromTOF=p.fTimeZerofromTOF;
96 fTimeWalkCorr=p.fTimeWalkCorr;
97 fApplyPbPbCuts=p.fApplyPbPbCuts;
98 fWindowSizeMaxY=p.fWindowSizeMaxY;
99 fWindowSizeMaxZ=p.fWindowSizeMaxZ;
100 fDistanceCut=p.fDistanceCut;
101 fWindowScaleFact=p.fWindowScaleFact;
102 fStepSize=p.fStepSize;
103 fSensRadius=p.fSensRadius;
104 fMaxChi2=p.fMaxChi2;
105 fMaxChi2TRD=p.fMaxChi2TRD;
106 fTimeResolution=p.fTimeResolution;
107 fTimeNSigma=p.fTimeNSigma;
108 fMaxDeltaTime=p.fMaxDeltaTime;
d486a5ef 109 fStartTimeType=p.fStartTimeType;
45a69ca6 110 return *this;
15ed3d4f 111}
52ffea62 112//_____________________________________________________________________________
113AliTOFRecoParam::~AliTOFRecoParam()
114{
115 //
116 // destructor
117 //
118}
119
120//_____________________________________________________________________________
121AliTOFRecoParam *AliTOFRecoParam::GetPbPbparam(){
122 //
123 // set default reconstruction parameters for PbPb.
124 //
125 AliTOFRecoParam *param = new AliTOFRecoParam();
126 param->fApplyPbPbCuts = kTRUE;
15ed3d4f 127 param->fWindowScaleFact = 5.;
52ffea62 128 param->fDistanceCut = 3.;
45a69ca6 129 param->fMaxDeltaTime = 2;
52ffea62 130 return param;
131}
132
133//_____________________________________________________________________________
134AliTOFRecoParam *AliTOFRecoParam::GetPPparam(){
135 //
136 // set default reconstruction parameters for PP.
137 //
138 AliTOFRecoParam *param = new AliTOFRecoParam();
139 param->fApplyPbPbCuts = kFALSE;
140 param->fWindowScaleFact = 5.;
141 param->fDistanceCut = 10.;
45a69ca6 142 param->fMaxDeltaTime = 2;
90b234fe 143 return param;
144}
145
146//_____________________________________________________________________________
147void AliTOFRecoParam::PrintParameters() const
148{
149 //
150 // Printing of the used TOF reconstruction parameters
151 //
152
153 AliInfo(Form(" Use Time Zero info in Pid: %i", fTimeZero));
154 AliInfo(Form(" Use Time Zero as determined by T0: %i", fTimeZerofromT0));
155 AliInfo(Form(" Use Time Zero as determined from TOF: %i",
156 fTimeZerofromTOF));
157 AliInfo(Form(" Correct for signal time walk in z: %i", fTimeWalkCorr));
158 AliInfo(Form(" Apply high flux cuts: %i", fApplyPbPbCuts));
159
160 AliInfo(Form(" Cluster search window - size, Y: %f cm", fWindowSizeMaxY));
161 AliInfo(Form(" Cluster search window - size, Z: %f cm", fWindowSizeMaxZ));
162 AliInfo(Form(" Cluster search window - scale factor: %f",
163 fWindowScaleFact));
164
165 AliInfo(Form(" Cut on the closest approach distance: %f", fDistanceCut));
166 AliInfo(Form(" Average radius of sensitive volumes: %f cm", fSensRadius));
167 AliInfo(Form(" Propagation step size: %f cm", fStepSize));
168 AliInfo(Form(" Maximum X2 track-tof clusters: %f", fMaxChi2));
169
170 AliInfo(Form(" Maximum X2 track-tof clusters (TRD): %f", fMaxChi2TRD));
171 AliInfo(Form(" Time resolution for responce function in PID: %f ps",
172 fTimeResolution));
45a69ca6 173 AliInfo(Form(" N-Sigma Range used for responce function in PID: %f",
90b234fe 174 fTimeNSigma));
45a69ca6 175 AliInfo(Form(" Max time difference between two (or more) time measurements"
176 " coming from two (or more) neighbouring pads"
177 " to define if they are coming from the same ionization event"
178 " or not: %2d bins -> %f ps",
13242232 179 fMaxDeltaTime, fMaxDeltaTime*AliTOFGeometry::TdcBinWidth()));
90b234fe 180
181}