]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/Calib/AliTPCcalibCalib.cxx
Implement AliTPCtracker::Clusters2Tracks() for all clusters in given time frame:
[u/mrichter/AliRoot.git] / TPC / Calib / AliTPCcalibCalib.cxx
CommitLineData
9dcfce73 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// Component for redoing the reconstruction from the clusters and tracks
20//
21// The new calibration data used
22//
23// In reality it overwrites the content of the ESD
24//
25
3bf5c7a6 26/*
27
28 gSystem->Load("libANALYSIS");
29 gSystem->Load("libTPCcalib");
30 //
31 gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros");
32 gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+")
33 AliXRDPROOFtoolkit tool;
11c7a854 34 TChain * chainCl = tool.MakeChain("calib.txt","Clusters",0,1);
35 chainCl->Lookup();
36 TChain * chainTr = tool.MakeChain("calib.txt","Tracks",0,1);
37 chainTr->Lookup();
3bf5c7a6 38
39
40
41*/
42
43
44
9dcfce73 45// marian.ivanov@cern.ch
46//
47#include "AliTPCcalibCalib.h"
48#include "TSystem.h"
49#include "TFile.h"
50#include "TTreeStream.h"
51#include "AliLog.h"
52#include "TTimeStamp.h"
53#include "AliESDEvent.h"
54#include "AliESDfriend.h"
55#include "AliESDtrack.h"
56#include "AliTracker.h"
11c7a854 57#include "AliTPCClusterParam.h"
b5738316 58#include "AliTPCParam.h"
9dcfce73 59
60#include "AliTPCcalibDB.h"
61#include "AliTPCTransform.h"
7af539c6 62#include "AliTPCRecoParam.h"
9dcfce73 63#include "AliTPCclusterMI.h"
64#include "AliTPCseed.h"
b5738316 65#include <TGeoManager.h>
66#include <TGeoPhysicalNode.h>
be67055b 67#include "TDatabasePDG.h"
9dcfce73 68ClassImp(AliTPCcalibCalib)
69
70AliTPCcalibCalib::AliTPCcalibCalib():
7af539c6 71AliTPCcalibBase(),
72 fApplyExBCorrection(1), // apply ExB correction
73 fApplyTOFCorrection(1), // apply TOF correction
74 fApplyPositionCorrection(1), // apply position correction
75 fApplySectorAlignment(1), // apply sector alignment
76 fApplyRPhiCorrection(1), // apply R-Phi correction
77 fApplyRCorrection(1) // apply Radial correction
78
9dcfce73 79{
80 //
81 // Constructor
82 //
83}
84
85
86AliTPCcalibCalib::AliTPCcalibCalib(const Text_t *name, const Text_t *title)
7af539c6 87 :AliTPCcalibBase(),
88 fApplyExBCorrection(1), // apply ExB correction
89 fApplyTOFCorrection(1), // apply TOF correction
90 fApplyPositionCorrection(1), // apply position correction
91 fApplySectorAlignment(1), // apply sector alignment
92 fApplyRPhiCorrection(1), // apply R-Phi correction
93 fApplyRCorrection(1) // apply Radial correction
9dcfce73 94{
95 SetName(name);
96 SetTitle(title);
97}
98
99
100AliTPCcalibCalib::AliTPCcalibCalib(const AliTPCcalibCalib&calib):
7af539c6 101 AliTPCcalibBase(calib),
102 fApplyExBCorrection(calib.GetApplyExBCorrection()),
103 fApplyTOFCorrection(calib.GetApplyTOFCorrection()),
104 fApplyPositionCorrection(calib.GetApplyPositionCorrection()),
105 fApplySectorAlignment(calib.GetApplySectorAlignment()),
106 fApplyRPhiCorrection(calib.GetApplyRPhiCorrection()),
107 fApplyRCorrection(calib.GetApplyRCorrection())
108
9dcfce73 109{
110 //
111 // copy constructor
112 //
113}
114
115AliTPCcalibCalib &AliTPCcalibCalib::operator=(const AliTPCcalibCalib&calib){
116 //
117 //
118 //
119 ((AliTPCcalibBase *)this)->operator=(calib);
120 return *this;
121}
122
123
124AliTPCcalibCalib::~AliTPCcalibCalib() {
125 //
126 // destructor
127 //
128}
129
130
131void AliTPCcalibCalib::Process(AliESDEvent *event){
132 //
133 //
134 //
135 if (!event) {
136 return;
137 }
138 AliESDfriend *ESDfriend=static_cast<AliESDfriend*>(event->FindListObject("AliESDfriend"));
139 if (!ESDfriend) {
140 return;
141 }
d0c09227 142 if (ESDfriend->TestSkipBit()) return;
9dcfce73 143 if (GetDebugLevel()>20) printf("Hallo world: Im here\n");
19d6a12a 144 Int_t ntracks=ESDfriend->GetNumberOfTracks();
91350f5b 145 //AliTPCcalibDB::Instance()->SetExBField(fMagF);
5c3e0d17 146
9dcfce73 147 //
148 //
149 //
150
151 for (Int_t i=0;i<ntracks;++i) {
3e55050f 152 AliESDtrack *track = event->GetTrack(i);
e527a1b9 153 AliESDfriendTrack *friendTrack = (AliESDfriendTrack*) ESDfriend->GetTrack(i);
154 if (!friendTrack) continue;
4486a91f 155 //track->SetFriendTrack(friendTrack);
156 fCurrentFriendTrack=friendTrack;
3e55050f 157 const AliExternalTrackParam * trackIn = track->GetInnerParam();
9dcfce73 158 const AliExternalTrackParam * trackOut = track->GetOuterParam();
3e55050f 159 AliExternalTrackParam * tpcOut = (AliExternalTrackParam *)friendTrack->GetTPCOut();
9dcfce73 160 if (!trackIn) continue;
161 if (!trackOut) continue;
3e55050f 162 if (!tpcOut) continue;
9dcfce73 163 TObject *calibObject;
164 AliTPCseed *seed = 0;
165 for (Int_t l=0;(calibObject=friendTrack->GetCalibObject(l));++l) {
166 if ((seed=dynamic_cast<AliTPCseed*>(calibObject))) break;
167 }
168 if (!seed) continue;
e527a1b9 169 RefitTrack(track, seed, event->GetMagneticField());
3e55050f 170 (*tpcOut)=*(track->GetOuterParam());
9dcfce73 171 }
172 return;
173}
174
38b1a1ca 175Bool_t AliTPCcalibCalib::RefitTrack(AliESDtrack * track, AliTPCseed *seed, Float_t magesd){
9dcfce73 176 //
177 // Refit track
38b1a1ca 178 // if magesd==0 forget the curvature
9dcfce73 179
15e48021 180 //
181 // 0 - Setup transform object
182 //
76c58ee2 183 const Double_t kxIFC = 83.; // position of IFC
184 const Double_t kxOFC = 250.; // position of OFC
185 const Double_t kaFC = 1.; // amplitude
186 const Double_t ktFC = 5.0; // slope of error
187 //cov[0]+= kaFC*(TMath::Exp(-TMath::Abs(cl->GetX()-kxIFC)/ktFC)+TMath::Exp(-TMath::Abs(cl->GetX()-kxOFC)/ktFC));
188 //cov[2]+= kaFC*(TMath::Exp(-TMath::Abs(cl->GetX()-kxIFC)/ktFC)+TMath::Exp(-TMath::Abs(cl->GetX()-kxOFC)/ktFC));
189
4486a91f 190 static Int_t streamCounter=0;
191 streamCounter++;
192 AliESDfriendTrack *friendTrack = fCurrentFriendTrack;
e527a1b9 193
15e48021 194 AliTPCTransform *transform = AliTPCcalibDB::Instance()->GetTransform() ;
b96c3aef 195 AliTPCParam *param = AliTPCcalibDB::Instance()->GetParameters();
15e48021 196 transform->SetCurrentRun(fRun);
197 transform->SetCurrentTimeStamp((UInt_t)fTime);
7af539c6 198 if(!fApplyExBCorrection) { // disable ExB correction in transform
199 if(transform->GetCurrentRecoParam())
200 transform->GetCurrentRecoParamNonConst()->SetUseExBCorrection(0);
201 }
202 if(!fApplyTOFCorrection) { // disable TOF correction in transform
203 if(transform->GetCurrentRecoParam())
204 transform->GetCurrentRecoParamNonConst()->SetUseTOFCorrection(kFALSE);
205 }
206
9dcfce73 207 //
208 // First apply calibration
209 //
064244d8 210 // AliTPCPointCorrection * corr = AliTPCPointCorrection::Instance();
9dcfce73 211 for (Int_t irow=0;irow<159;irow++) {
212 AliTPCclusterMI *cluster=seed->GetClusterPointer(irow);
213 if (!cluster) continue;
214 AliTPCclusterMI cl0(*cluster);
215 Double_t x[3]={cluster->GetRow(),cluster->GetPad(),cluster->GetTimeBin()};
216 Int_t i[1]={cluster->GetDetector()};
7af539c6 217
9dcfce73 218 transform->Transform(x,i,0,1);
11c7a854 219 //
220 // get position correction
221 //
222 Int_t ipad=0;
223 if (cluster->GetDetector()>35) ipad=1;
f26def9e 224 Float_t dy =0;//AliTPCClusterParam::SPosCorrection(0,ipad,cluster->GetPad(),cluster->GetTimeBin(),cluster->GetZ(),cluster->GetSigmaY2(),cluster->GetSigmaZ2(),cluster->GetMax());
225 Float_t dz =0;//AliTPCClusterParam::SPosCorrection(1,ipad,cluster->GetPad(),cluster->GetTimeBin(),cluster->GetZ(),cluster->GetSigmaY2(),cluster->GetSigmaZ2(),cluster->GetMax());
9dcfce73 226 //
227 cluster->SetX(x[0]);
228 cluster->SetY(x[1]);
229 cluster->SetZ(x[2]);
b96c3aef 230
231 //
232 // Apply alignemnt
233 //
b322e06a 234 if (transform->GetCurrentRecoParam()->GetUseSectorAlignment()){
b5738316 235 if (!param->IsGeoRead()) param->ReadGeoMatrices();
236 TGeoHMatrix *mat = param->GetClusterMatrix(cluster->GetDetector());
237 //TGeoHMatrix mat;
238 Double_t pos[3]= {cluster->GetX(),cluster->GetY(),cluster->GetZ()};
239 Double_t posC[3]={cluster->GetX(),cluster->GetY(),cluster->GetZ()};
240 if (mat) mat->LocalToMaster(pos,posC);
241 else{
242 // chack Loading of Geo matrices from GeoManager - TEMPORARY FIX
243 }
244 cluster->SetX(posC[0]);
245 cluster->SetY(posC[1]);
246 cluster->SetZ(posC[2]);
247 }
b96c3aef 248
249
250
4486a91f 251 if (fStreamLevel>2 && streamCounter<20*fStreamLevel ){
252 // dump debug info if required
9dcfce73 253 TTreeSRedirector *cstream = GetDebugStreamer();
254 if (cstream){
255 (*cstream)<<"Clusters"<<
108953e9 256 "run="<<fRun<< // run number
257 "event="<<fEvent<< // event number
258 "time="<<fTime<< // time stamp of event
259 "trigger="<<fTrigger<< // trigger
15e48021 260 "triggerClass="<<&fTriggerClass<< // trigger
108953e9 261 "mag="<<fMagF<< // magnetic field
9dcfce73 262 "cl0.="<<&cl0<<
263 "cl.="<<cluster<<
11c7a854 264 "cy="<<dy<<
265 "cz="<<dz<<
9dcfce73 266 "\n";
267 }
268 }
269 }
15e48021 270 //
271 //
272 //
11c7a854 273 Int_t ncl = seed->GetNumberOfClusters();
b5738316 274 const Double_t kResetCov=4.;
275 const Double_t kSigma=5.;
11c7a854 276 Double_t covar[15];
277 for (Int_t i=0;i<15;i++) covar[i]=0;
b5738316 278 covar[0]=kSigma*kSigma;
279 covar[2]=kSigma*kSigma;
280 covar[5]=kSigma*kSigma/Float_t(ncl*ncl);
281 covar[9]=kSigma*kSigma/Float_t(ncl*ncl);
282 covar[14]=0.2*0.2;
38b1a1ca 283 if (TMath::Abs(magesd)<0.05) {
284 covar[14]=0.025*0.025;
285 }
9dcfce73 286 //
287 // And now do refit
288 //
11c7a854 289 AliExternalTrackParam * trackInOld = (AliExternalTrackParam*)track->GetInnerParam();
e527a1b9 290 AliExternalTrackParam * trackOuter = (AliExternalTrackParam*)track->GetOuterParam();
291 AliExternalTrackParam * trackOutOld = (AliExternalTrackParam *)friendTrack->GetTPCOut();
be67055b 292 Double_t mass = TDatabasePDG::Instance()->GetParticle("pi+")->Mass();
293
e527a1b9 294
3e55050f 295
9dcfce73 296 AliExternalTrackParam trackIn = *trackOutOld;
b5738316 297 trackIn.ResetCovariance(kResetCov);
298 trackIn.AddCovariance(covar);
38b1a1ca 299 if (TMath::Abs(magesd)<0.05) {
300 ((Double_t&)(trackIn.GetParameter()[4]))=0.000000001;
b5738316 301 ((Double_t&)(trackIn.GetCovariance()[14]))=covar[14]; // fix the line
38b1a1ca 302 }
b5738316 303
9dcfce73 304 Double_t xyz[3];
305 Int_t nclIn=0,nclOut=0;
306 //
15e48021 307 // Refit in
308 //
15e48021 309 for (Int_t irow=159; irow>0; irow--){
310 AliTPCclusterMI *cl=seed->GetClusterPointer(irow);
311 if (!cl) continue;
312 if (cl->GetX()<80) continue;
313 Int_t sector = cl->GetDetector();
314 Float_t dalpha = TMath::DegToRad()*(sector%18*20.+10.)-trackIn.GetAlpha();
91f8fa1d 315 if (TMath::Abs(dalpha)>0.01){
316 if (!trackIn.Rotate(TMath::DegToRad()*(sector%18*20.+10.))) break;
317 }
15e48021 318 Double_t r[3]={cl->GetX(),cl->GetY(),cl->GetZ()};
319 Double_t cov[3]={0.01,0.,0.01}; //TODO: correct error parametrisation
320 AliTPCseed::GetError(cl, &trackIn,cov[0],cov[2]);
321 cov[0]*=cov[0];
322 cov[2]*=cov[2];
76c58ee2 323 cov[0]+= kaFC*(TMath::Exp(-TMath::Abs(cl->GetX()-kxIFC)/ktFC)+TMath::Exp(-TMath::Abs(cl->GetX()-kxOFC)/ktFC));
324 cov[2]+= kaFC*(TMath::Exp(-TMath::Abs(cl->GetX()-kxIFC)/ktFC)+TMath::Exp(-TMath::Abs(cl->GetX()-kxOFC)/ktFC));
15e48021 325 trackIn.GetXYZ(xyz);
be67055b 326 // Double_t bz = AliTracker::GetBz(xyz);
327
328 // if (!trackIn.PropagateTo(r[0],bz)) continue;
b322e06a 329 if (!AliTracker::PropagateTrackToBxByBz(&trackIn, r[0],mass,1.,kFALSE)) continue;
15e48021 330
15e48021 331 if (RejectCluster(cl,&trackIn)) continue;
332 nclIn++;
333 trackIn.Update(&r[1],cov);
334 }
335 //
336 AliExternalTrackParam trackOut = trackIn;
b5738316 337 trackOut.ResetCovariance(kResetCov);
338 trackOut.AddCovariance(covar);
38b1a1ca 339 if (TMath::Abs(magesd)<0.05) {
340 ((Double_t&)(trackOut.GetParameter()[4]))=0.000000001;
b5738316 341 ((Double_t&)(trackOut.GetCovariance()[14]))=covar[14]; // fix the line
38b1a1ca 342 }
b5738316 343
15e48021 344 //
9dcfce73 345 // Refit out
346 //
15e48021 347 //Bool_t lastEdge=kFALSE;
9dcfce73 348 for (Int_t irow=0; irow<160; irow++){
349 AliTPCclusterMI *cl=seed->GetClusterPointer(irow);
350 if (!cl) continue;
351 if (cl->GetX()<80) continue;
352 Int_t sector = cl->GetDetector();
353 Float_t dalpha = TMath::DegToRad()*(sector%18*20.+10.)-trackOut.GetAlpha();
354
91f8fa1d 355 if (TMath::Abs(dalpha)>0.01){
356 if (!trackOut.Rotate(TMath::DegToRad()*(sector%18*20.+10.))) break;
357 }
9dcfce73 358 Double_t r[3]={cl->GetX(),cl->GetY(),cl->GetZ()};
91350f5b 359
360 Double_t cov[3]={0.01,0.,0.01}; //TODO: correct error parametrisation
361 AliTPCseed::GetError(cl, &trackOut,cov[0],cov[2]);
362 cov[0]*=cov[0];
363 cov[2]*=cov[2];
76c58ee2 364 cov[0]+= kaFC*(TMath::Exp(-TMath::Abs(cl->GetX()-kxIFC)/ktFC)+TMath::Exp(-TMath::Abs(cl->GetX()-kxOFC)/ktFC));
365 cov[2]+= kaFC*(TMath::Exp(-TMath::Abs(cl->GetX()-kxIFC)/ktFC)+TMath::Exp(-TMath::Abs(cl->GetX()-kxOFC)/ktFC));
9dcfce73 366 trackOut.GetXYZ(xyz);
be67055b 367 //Double_t bz = AliTracker::GetBz(xyz);
368 // if (!trackOut.PropagateTo(r[0],bz)) continue;
b322e06a 369 if (!AliTracker::PropagateTrackToBxByBz(&trackOut, r[0],mass,1.,kFALSE)) continue;
be67055b 370
42b40d07 371 if (RejectCluster(cl,&trackOut)) continue;
15e48021 372 nclOut++;
373 trackOut.Update(&r[1],cov);
374 //if (cl->GetType()<0) lastEdge=kTRUE;
375 //if (cl->GetType()>=0) lastEdge=kFALSE;
9dcfce73 376 }
377 //
9dcfce73 378 //
15e48021 379 //
380 nclIn=0;
381 trackIn = trackOut;
b5738316 382 trackIn.ResetCovariance(kResetCov);
383 if (TMath::Abs(magesd)<0.05) {
384 ((Double_t&)(trackIn.GetParameter()[4]))=0.000000001;
385 ((Double_t&)(trackIn.GetCovariance()[14]))=covar[14]; // fix the line
386 }
15e48021 387 //
388 // Refit in one more time
389 //
9dcfce73 390 for (Int_t irow=159; irow>0; irow--){
391 AliTPCclusterMI *cl=seed->GetClusterPointer(irow);
392 if (!cl) continue;
393 if (cl->GetX()<80) continue;
394 Int_t sector = cl->GetDetector();
395 Float_t dalpha = TMath::DegToRad()*(sector%18*20.+10.)-trackIn.GetAlpha();
91f8fa1d 396 if (TMath::Abs(dalpha)>0.01){
397 if (!trackIn.Rotate(TMath::DegToRad()*(sector%18*20.+10.))) break;
398 }
9dcfce73 399 Double_t r[3]={cl->GetX(),cl->GetY(),cl->GetZ()};
400 Double_t cov[3]={0.01,0.,0.01}; //TODO: correct error parametrisation
91350f5b 401 AliTPCseed::GetError(cl, &trackIn,cov[0],cov[2]);
402 cov[0]*=cov[0];
403 cov[2]*=cov[2];
76c58ee2 404 cov[0]+= kaFC*(TMath::Exp(-TMath::Abs(cl->GetX()-kxIFC)/ktFC)+TMath::Exp(-TMath::Abs(cl->GetX()-kxOFC)/ktFC));
405 cov[2]+= kaFC*(TMath::Exp(-TMath::Abs(cl->GetX()-kxIFC)/ktFC)+TMath::Exp(-TMath::Abs(cl->GetX()-kxOFC)/ktFC));
406
91350f5b 407 trackIn.GetXYZ(xyz);
be67055b 408 //Double_t bz = AliTracker::GetBz(xyz);
409
410 // if (!trackIn.PropagateTo(r[0],bz)) continue;
b322e06a 411 if (!AliTracker::PropagateTrackToBxByBz(&trackIn, r[0],mass,1,kFALSE)) continue;
9dcfce73 412
42b40d07 413 if (RejectCluster(cl,&trackIn)) continue;
15e48021 414 nclIn++;
9dcfce73 415 trackIn.Update(&r[1],cov);
416 }
15e48021 417
418
3bf5c7a6 419 trackIn.Rotate(trackInOld->GetAlpha());
420 trackOut.Rotate(trackOutOld->GetAlpha());
421 //
422 trackInOld->GetXYZ(xyz);
423 Double_t bz = AliTracker::GetBz(xyz);
424 trackIn.PropagateTo(trackInOld->GetX(),bz);
425 //
426 trackOutOld->GetXYZ(xyz);
427 bz = AliTracker::GetBz(xyz);
428 trackOut.PropagateTo(trackOutOld->GetX(),bz);
429
9dcfce73 430
4486a91f 431 if (fStreamLevel>0 && streamCounter<100*fStreamLevel){
9dcfce73 432 TTreeSRedirector *cstream = GetDebugStreamer();
433 if (cstream){
434 (*cstream)<<"Tracks"<<
108953e9 435 "run="<<fRun<< // run number
436 "event="<<fEvent<< // event number
437 "time="<<fTime<< // time stamp of event
438 "trigger="<<fTrigger<< // trigger
15e48021 439 "triggerClass="<<&fTriggerClass<< // trigger
108953e9 440 "mag="<<fMagF<< // magnetic field
9dcfce73 441 "nclIn="<<nclIn<<
442 "nclOut="<<nclOut<<
443 "ncl="<<ncl<<
444 "TrIn0.="<<trackInOld<<
445 "TrOut0.="<<trackOutOld<<
446 "TrIn1.="<<&trackIn<<
447 "TrOut1.="<<&trackOut<<
448 "\n";
449 }
450 }
3bf5c7a6 451 //
981e9de5 452 // And now rewrite ESDtrack and TPC seed
3bf5c7a6 453 //
454
455 (*trackInOld) = trackIn;
456 (*trackOutOld) = trackOut;
e527a1b9 457 (*trackOuter) = trackOut;
3bf5c7a6 458 AliExternalTrackParam *t = &trackIn;
b322e06a 459 //track->Set(t->GetX(),t->GetAlpha(),t->GetParameter(),t->GetCovariance());
981e9de5 460 seed->Set(t->GetX(),t->GetAlpha(),t->GetParameter(),t->GetCovariance());
fe8454d9 461 seed->SetNumberOfClusters((nclIn+nclOut)/2);
2cfb8d90 462 return kTRUE;
9dcfce73 463}
464
465
466
467Bool_t AliTPCcalibCalib::RejectCluster(AliTPCclusterMI* cl, AliExternalTrackParam * param){
468 //
469 // check the acceptance of cluster
470 // Cut on edge effects
471 //
768e46f1 472 if (!param) return kTRUE;
15e48021 473 Float_t kEdgeCut=2.5;
474 Float_t kSigmaCut=6;
475
9dcfce73 476 Bool_t isReject = kFALSE;
477 Float_t edgeY = cl->GetX()*TMath::Tan(TMath::Pi()/18);
478 Float_t dist = edgeY - TMath::Abs(cl->GetY());
768e46f1 479 dist = TMath::Abs(edgeY - TMath::Abs(param->GetY()));
15e48021 480 if (dist<kEdgeCut) isReject=kTRUE;
481
482 Double_t cov[3]={0.01,0.,0.01}; //TODO: correct error parametrisation
483 AliTPCseed::GetError(cl, param,cov[0],cov[2]);
91f8fa1d 484 if (param->GetSigmaY2()<0 || param->GetSigmaZ2()<0){
d3ce44cb 485 AliError("Wrong parameters");
486 return kFALSE;
487 }
15e48021 488 Double_t py = (cl->GetY()-param->GetY())/TMath::Sqrt(cov[0]*cov[0]+param->GetSigmaY2());
489 Double_t pz = (cl->GetZ()-param->GetZ())/TMath::Sqrt(cov[2]*cov[2]+param->GetSigmaZ2());
490 //
491 if ((py*py+pz*pz)>kSigmaCut*kSigmaCut) isReject=kTRUE;
492
9dcfce73 493 return isReject;
494}
495
496
91350f5b 497