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