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