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 AliESDCosmicTrack;
28 class AliTPCCosmicTrackfit;
32 class AliCosmicTracker
36 typedef Bool_t (*CutFunc)(const AliESDtrack *trk);
38 AliCosmicTracker(const Int_t dlev=0, const TString tag="test");
41 void SetESDEvent(AliESDEvent *esd);
42 Int_t Process(const TString tag="", const Bool_t kprint=kFALSE);
43 TClonesArray * GetTrackStack() const {return fTrackStack;}
45 TTreeSRedirector * GetStreamer() const {return fStreamer;}
46 Int_t GetDebugLevel() const {return fDebugLevel;}
47 Int_t GetErrFlag() const;
49 void SetCutPull( const Int_t ii, const Double_t cut){ fCutPull[ii] = cut;}
50 void SetCutDelta( const Int_t ii, const Double_t cut){ fCutDelta[ii] = cut;}
52 void SetCutdPhi(const Double_t cut){fCutdPhi = cut;}
53 void SetCutdTheta(const Double_t cut){fCutdTheta = cut;}
55 void SetUserESDtrackCut(CutFunc func){fUserCut = func;}
57 static TClonesArray *FindCosmic(AliESDEvent *event, const Bool_t kadd);
60 AliCosmicTracker(const AliCosmicTracker &p);
61 AliCosmicTracker & operator=(const AliCosmicTracker &p);
63 static Double_t CutFindable(){return 0.5;} //cut on findable ratio of TPC cluster; DCA-anormlay is caused by laser!! should check trigger!!
65 Bool_t ESDtrackCut(AliESDtrack * trk, Double_t &findabler);
67 Bool_t IsPair(AliESDtrack* trk0, AliESDtrack*trk1);
68 void WriteStreamer(Int_t ntrk, AliESDCosmicTrack *costrk);
70 CutFunc fUserCut; //user ESDtrack function
71 TTreeSRedirector *fStreamer; //debug streamer
72 Int_t fDebugLevel; //debug level
74 AliESDEvent *fESDEvent; //esd
75 AliTPCCosmicTrackfit *fCosmicTrackfit; //cosmictrackfit
76 TClonesArray *fTrackStack; //storing cosmic ray
78 AliExternalTrackParam fTrack0; //upper track param estimated at x=0 from IsPair
79 AliExternalTrackParam fTrack1; //lower track param estimated at x=0 from IsPair
81 TVector3 fRawVtx; //raw vertex position calculated only from upper and lower inner most TPC cluster
82 Double_t fRawDCA; //raw DCA (2d) calculated only from upper and lower inner most TPC cluster
83 Double_t fdPhi; //phi0-phi1-pi of the EDS tracks
84 Double_t fCutdPhi; //cut
86 Double_t fdTheta; //theta0+theta1-pi of the ESD tracks
87 Double_t fCutdTheta; //cut
89 Double_t fPull[5]; //pull of the two ESD tracks at x=0
90 Double_t fCutPull[5]; //pull
92 Double_t fDelta[5]; //delta of the two ESD tracks at x=0
93 Double_t fCutDelta[5]; //delta cut
95 Int_t fErrFlagESDtrackCut; //error status in ESDtrackCut()
96 Int_t fErrFlagIsPair; //error status in IsPair()
97 Int_t fErrFlagCosmicTrackfit; //error status in fCosmicTrackfit