1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 // Functionality: find ESDtrack pairs according to some criteria to form one cosmic ray; AliTPCCosmicTrackfit then performs the combined track fit for the pair
20 // lu@physi.uni-heidelberg.de
24 #ifndef ALICOSMICTRACKER_H
25 #define ALICOSMICTRACKER_H
27 class TTreeSRedirector;
28 class AliTPCCosmicTrackfit;
30 class AliCosmicTracker
34 typedef Bool_t (*CutFunc)(AliESDtrack *trk);
36 AliCosmicTracker(const Int_t dlev=0, const TString tag="test");
39 void SetESDEvent(AliESDEvent *esd);
40 Int_t Process(const TString tag="", const Bool_t kprint=kFALSE);
41 TClonesArray * GetTrackStack() const {return fTrackStack;}
43 TTreeSRedirector * GetStreamer() const {return fStreamer;}
45 void SetCutPull( const Int_t ii, const Double_t cut){ fCutPull[ii] = cut;}
46 void SetCutDelta( const Int_t ii, const Double_t cut){ fCutDelta[ii] = cut;}
48 void SetCutdPhi(const Double_t cut){fCutdPhi = cut;}
49 void SetCutdTheta(const Double_t cut){fCutdTheta = cut;}
51 void SetUserESDtrackCut(CutFunc func){fUserCut = func;}
54 AliCosmicTracker(const AliCosmicTracker &p);
55 AliCosmicTracker & operator=(const AliCosmicTracker &p);
57 Bool_t ESDtrackCut(AliESDtrack * trk, Double_t &findabler);
59 Bool_t IsPair(AliESDtrack* trk0, AliESDtrack*trk1);
60 void WriteStreamer(Int_t ntrk);
62 CutFunc fUserCut; //user ESDtrack function
63 TTreeSRedirector *fStreamer; //debug streamer
64 Int_t fDebugLevel; //debug level
66 AliESDEvent *fESDEvent; //esd
67 AliTPCCosmicTrackfit *fCombinedTrackfit; //combinedtrackfit
68 TClonesArray *fTrackStack; //storing cosmic ray
70 AliExternalTrackParam fCombTrackUp; //upper track param from combined track fit
71 AliExternalTrackParam fCombTrackLow; //lower track param from combined track fit
72 AliExternalTrackParam fTrack0; //upper track param estimated at x=0 from IsPair
73 AliExternalTrackParam fTrack1; //lower track param estimated at x=0 from IsPair
75 Double_t fCombRefPt; //pt of the ray at lower-outer TPC by combined fit
76 Double_t fChi2PerCluster; //chi2/ncls of the fit
77 Double_t fImpactD; //2d impact parameter
78 Double_t fImpactZ; //z of impact parameter
79 Bool_t fIsReuse; //if one the the tracks in the pair is already used in previous pair
80 Double_t fFindableRatio; //min of TPC ncls/nfindablecls of the two tracks
82 Double_t fdPhi; //phi0-phi1-pi of the EDS tracks
83 Double_t fCutdPhi; //cut
85 Double_t fdTheta; //theta0+theta1-pi of the ESD tracks
86 Double_t fCutdTheta; //cut
88 Double_t fPull[5]; //pull of the two ESD tracks at x=0
89 Double_t fCutPull[5]; //pull
91 Double_t fDelta[5]; //delta of the two ESD tracks at x=0
92 Double_t fCutDelta[5]; //delta cut
94 Int_t fErrFlagIsPair; //error status in IsPair
96 static const Double_t fgkCutFindable = 0.5; //cut on findable ratio of TPC cluster