]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HBTAN/AliHBTReaderITSv2.h
Setting arbitrary Magnetic field while track reading
[u/mrichter/AliRoot.git] / HBTAN / AliHBTReaderITSv2.h
1 #ifndef ALIHBTREADERITSV2_H
2 #define ALIHBTREADERITSV2_H
3
4 #include "AliHBTReader.h"
5
6 #include <TString.h>
7
8 class TFile;
9
10 class AliHBTReaderITSv2: public AliHBTReader
11 {
12   public:    
13     AliHBTReaderITSv2(const Char_t* trackfilename = "AliITStracksV2.root",
14                     const Char_t* clusterfilename = "AliITSclustersV2.root",
15         const Char_t* galicefilename = "galice.root");
16
17     AliHBTReaderITSv2(TObjArray* dirs,
18                     const Char_t* trackfilename = "AliITStracksV2.root",
19                     const Char_t* clusterfilename = "AliITSclustersV2.root",
20         const Char_t* galicefilename = "galice.root");
21     virtual ~AliHBTReaderITSv2();
22     
23     Int_t Read(AliHBTRun*, AliHBTRun*);//reads tracks and particles and puts them in runs
24     
25     AliHBTEvent* GetParticleEvent(Int_t);//returns pointer to event with particles
26     AliHBTEvent* GetTrackEvent(Int_t);//returns pointer to event with particles 
27     Int_t GetNumberOfPartEvents();//returns number of particle events
28     Int_t GetNumberOfTrackEvents();//returns number of track events
29
30     void SetMagneticField(Float_t mf){fMagneticField=mf;}
31     void UseMagneticFieldFromRun(Bool_t flag = kTRUE){fUseMagFFromRun=flag;}
32     
33   protected:
34  
35     Int_t OpenFiles(TFile*&,TFile*&,TFile*&,Int_t);//opens files to be read for given event
36     void CloseFiles(TFile*&,TFile*&,TFile*&);//close files
37     
38     AliHBTRun* fParticles; //!simulated particles
39     AliHBTRun* fTracks; //!reconstructed tracks (particles)
40     
41     TString fTrackFileName;//name of the file with tracks
42     TString fClusterFileName;//name of the file with clusters
43     TString fGAliceFileName;//name of the file with galice.root
44   
45     Bool_t fIsRead;//!flag indicating if the data are already read
46
47     Float_t    fMagneticField;//magnetic field value that was enforced while reading
48     Bool_t     fUseMagFFromRun;//flag indicating if using field specified in gAlice (kTRUE)
49                                // or enforece other defined by fMagneticField
50   private:
51     ClassDef(AliHBTReaderITSv2,1)
52 };
53
54 #endif