1b446896 |
1 | #ifndef ALIHBTREADERPPPROD_H |
2 | #define ALIHBTREADERPPPROD_H |
3 | |
4 | #include "AliHBTReader.h" |
5 | #include "AliHBTReaderTPC.h" |
6 | |
7 | //This reader reads tracks AliTPCtracks.root |
8 | // particles form tpc_good_tracks |
9 | //I am aware that this file is temporary however we do not have any other PID yet |
10 | //Piotr.Skowronski@cern.ch |
11 | |
12 | #include <TString.h> |
13 | class TFile; |
14 | |
15 | class AliHBTReaderPPprod: public AliHBTReader |
16 | { |
17 | public: |
18 | AliHBTReaderPPprod(const Char_t* trackfilename = "AliTPCtracks.root", |
19 | const Char_t* clusterfilename = "AliTPCclusters.root", |
20 | const Char_t* goodtracksfilename = "good_tracks_tpc", |
21 | const Char_t* galicefilename = ""); |
22 | |
23 | virtual ~AliHBTReaderPPprod(); |
24 | |
25 | Int_t Read(AliHBTRun* particles, AliHBTRun *tracks); //reads tracks and particles and puts them in runs |
26 | |
27 | AliHBTEvent* GetParticleEvent(Int_t); //returns pointer to event with particles |
28 | AliHBTEvent* GetTrackEvent(Int_t);//returns pointer to event with particles |
29 | Int_t GetNumberOfPartEvents(); //returns number of particle events |
30 | Int_t GetNumberOfTrackEvents();//returns number of track events |
31 | |
32 | protected: |
33 | //in the future this class is will read global tracking |
34 | |
35 | |
36 | Int_t OpenFiles(); //opens files to be read |
37 | void CloseFiles(); //close files |
38 | |
39 | AliHBTRun* fParticles; //!simulated particles |
40 | AliHBTRun* fTracks; //!reconstructed tracks (particles) |
41 | |
42 | TString fTrackFileName; //name of the file with tracks |
43 | TString fClusterFileName;//name of the file with clusters |
44 | TString fGAliceFileName;//name of the file with galice.root |
45 | TString fGoodTPCTracksFileName; //name of text file with good tracks |
46 | |
47 | TFile *fTracksFile; //file with tracks |
48 | TFile *fClustersFile;//file with clusters |
49 | |
50 | Bool_t fIsRead; //flag indicating if the data are already read |
51 | |
52 | |
53 | private: |
54 | public: |
55 | ClassDef(AliHBTReaderPPprod,1) |
56 | }; |
57 | |
54584953 |
58 | struct GoodTrack //data of good tracks produced by AliTPCComparison.C |
59 | { |
60 | Int_t lab; |
61 | Int_t code; |
62 | Float_t px,py,pz; |
63 | Float_t x,y,z; |
64 | }; |
65 | |
1b446896 |
66 | |
67 | class AliGoodTracksPP |
68 | { |
69 | //container for good tracks |
70 | //this class is for internal use only |
71 | |
72 | friend class AliHBTReaderPPprod; |
73 | |
74 | private: |
75 | AliGoodTracksPP(const TString& infilename = TString("good_tracks_tpc")); //constructor |
4ca0f301 |
76 | virtual ~AliGoodTracksPP(); //dctor |
1b446896 |
77 | |
78 | const GoodTrack& GetTrack(Int_t event, Int_t n) const; //returns reference to the nth good track in event "event" |
79 | |
80 | Int_t fNevents; //Number of events |
81 | Int_t* fGoodInEvent; //Numbers of good track in event |
82 | struct GoodTrack **fData; |
83 | }; |
84 | |
85 | |
86 | #endif |