]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSTracker.cxx
add AliTPCcalibV0 class (Marian)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSTracker.cxx
1 #include "AliPHOSTracker.h"
2 #include "AliPHOSClusterizerv1.h"
3 #include "AliPHOSTrackSegmentMakerv1.h"
4 #include "AliPHOSTrackSegmentMakerv2.h"
5 #include "AliPHOSPIDv1.h"
6 #include "AliRunLoader.h"
7 #include "AliESD.h"
8
9 //-------------------------------------------------------------------------
10 //                          PHOS tracker.
11 // Matches ESD tracks with the PHOS and makes the PID.  
12 // Currently, has only one function implemented : PropagateBack(AliESD*)
13 //-------------------------------------------------------------------------
14
15 ClassImp(AliPHOSTracker)
16
17 Bool_t AliPHOSTracker::fgDebug = kFALSE ; 
18
19 Int_t AliPHOSTracker::PropagateBack(AliESD *esd) {
20   // Called by AliReconstruction 
21   // Creates the tracksegments and Recparticles
22   // Makes the PID
23   
24   Int_t eventNumber = fRunLoader->GetEventNumber() ;
25
26   TString headerFile(fRunLoader->GetFileName()) ; 
27   TString branchName(fRunLoader->GetEventFolder()->GetName()) ;  
28  
29   AliPHOSTrackSegmentMakerv1 tsm(headerFile, branchName);
30 //  AliPHOSTrackSegmentMakerv2 tsm(headerFile, branchName);
31   tsm.SetESD(esd) ; 
32   AliPHOSPIDv1 pid(headerFile, branchName);
33   pid.SetESD(esd) ; 
34
35   //PH  SetDebug() ;
36
37   // do current event; the loop over events is done by AliReconstruction::Run()
38   tsm.SetEventRange(eventNumber, eventNumber) ; 
39   pid.SetEventRange(eventNumber, eventNumber) ; 
40   if ( Debug() ) {
41    tsm.ExecuteTask("deb all") ;
42    pid.ExecuteTask("deb all") ;
43   }
44   else {
45     tsm.ExecuteTask("") ;
46     pid.ExecuteTask("") ;
47   }
48   
49   return 0;
50 }