]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFReconstructionerV2.h
AliTOFDigitMap, AliTOFReconstructionerV2 and AliTOFTrackV2 added.Fixed bug on AliTOFS...
[u/mrichter/AliRoot.git] / TOF / AliTOFReconstructionerV2.h
1 #ifndef ALITOFRECONSTRUCTIONERV2_H
2 #define ALITOFRECONSTRUCTIONERV2_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 //_________________________________________________________________________
7 //  Task Class for Reconstruction V2 in TOF      
8 //                  
9 //-- Author: F. Pierella
10
11
12 #include "TTask.h"
13
14 class AliTOFDigitMap;
15 class AliTOFHitMap;
16 class TClonesArray;
17 class TGeant3;
18 class TString;
19 class TTree;
20 class TBranch;
21
22 class AliTOFReconstructionerV2: public TTask {
23
24 public:
25   AliTOFReconstructionerV2() ;          // ctor
26   AliTOFReconstructionerV2(char* tpcBackTracks, char* tofDigits="digits.root");
27   AliTOFReconstructionerV2(const AliTOFReconstructionerV2 & rec);
28   virtual ~AliTOFReconstructionerV2() ; // dtor   
29   Bool_t        BackPropagation(){return kTRUE;};
30   void          CreateNTuple();
31   void          Comparison(Int_t* rtIndex); // for MC comparison
32   virtual void  Exec(Option_t* option); // do the main work
33   Int_t         GetDbgFlag()           const   {return fdbg;}
34   const char*   GetTOFDigitsFile()     const {return (char*)fTOFDigitsFile.Data();}
35   const char*   GetTPCBackTracksFile() const {return (char*)fTPCBackTracksFile.Data();}
36   void          Init(Option_t* opt);
37   Int_t         LoadTPCTracks();
38   Int_t         LoadTOFDigits();
39   Int_t         LoadTRDTracks();
40   Int_t         SaveTracks(const Char_t* outname="tofTracks.root", const Int_t split=0);
41   void          SetDbg(Int_t dbgflag)        {fdbg=dbgflag;}
42   void          SetTOFDigitsFile(char * tofDigitsFile ) {fTOFDigitsFile=tofDigitsFile;}
43   void          SetTPCBackTracksFile(char * tpcBackTracksFile ){fTPCBackTracksFile=tpcBackTracksFile;}
44   void          SetField(Float_t field)      {fField=field;}
45   void          SetNDummyTracks(Int_t nDummyTracks){fNDummyTracks=nDummyTracks;}
46   void          SetScaleSigmaFactor(Float_t factor){fScaleSigmaFactor=factor;}
47   void          SetStep(Float_t step)        {fStep=step;}
48   Bool_t   operator == (const AliTOFReconstructionerV2 & tofrecv2) const ;
49
50 private:
51
52   Int_t   fdbg;              //! Flag for debug, 0 no debug, 1 debug
53   AliTOFDigitMap* fDigitsMap;//! pointer to the map of TOF digits
54   //AliTOFHitMap* fDigitsMap;  //! pointer to the map of TOF digits
55   Float_t fField;            //! mag field value [Tesla]
56   TGeant3 *fG3Geom;          //! pointer to GEANT geometry
57   Int_t   fNDummyTracks;     //  number of test tracks used to search
58                              //  the signal on TOF
59   Float_t fScaleSigmaFactor; //  scale factor for sigma (common value for sigmaY and sigmaZ)
60   Float_t fStep;             //! step inside the TOF volumes during 
61                              //  back propagation 
62   TClonesArray* fTOFDigits;  //! pointer to the TClonesArray with TOF digits
63   TClonesArray* fTOFTracks;  //! pointer to the TClonesArray with TOF tracks
64   TString fTOFDigitsFile;    //! file with TOF digits 
65   TString fTPCBackTracksFile;//! seed TPC to TOF file name
66   TTree*  fKalmanTree       ;//! tree with reconstructed tracks in TPC
67   TBranch* fBranchWithTracks;//! branch with backpropagated tracks in TPC
68
69   virtual void  IsInsideThePad(Float_t x, Float_t y, Float_t z, Int_t *nGeom, Float_t& zPad, Float_t& xPad);
70   virtual void  GetGlobalXYZ(Double_t alpha, Double_t& x, Double_t& y, Double_t& z);
71   Bool_t        DigitFinder(TArrayI *secArray, TArrayI *plaArray, TArrayI *strArray, TArrayI *pdzArray, TArrayI *pdxArray, Int_t* assignedVol, Int_t* digitTrackArray, Float_t& tdc);
72
73  protected:
74   // the class is assumed to have a streamer
75   ClassDef(AliTOFReconstructionerV2,1)  // Task class for TOF reconstruction V2
76
77 };
78
79 #endif // AliTOFRECONSTRUCTIONERV2_H