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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////////
20 // class for TOF reconstruction //
22 ///////////////////////////////////////////////////////////////////////////////
25 #include "AliTOFReconstructor.h"
26 #include "AliRunLoader.h"
29 #include "AliTOFtracker.h"
32 ClassImp(AliTOFReconstructor)
35 //_____________________________________________________________________________
36 void AliTOFReconstructor::Reconstruct(AliRunLoader* /*runLoader*/) const
42 //_____________________________________________________________________________
43 AliTracker* AliTOFReconstructor::CreateTracker(AliRunLoader* runLoader) const
45 // create a TOF tracker
47 AliTOFGeometry* geom = GetTOFGeometry(runLoader);
48 if (!geom) return NULL;
49 Double_t parPID[] = {130., 5.};
50 return new AliTOFtracker(geom, parPID);
53 //_____________________________________________________________________________
54 void AliTOFReconstructor::FillESD(AliRunLoader* /*runLoader*/,
55 AliESD* /*esd*/) const
62 //_____________________________________________________________________________
63 AliTOFGeometry* AliTOFReconstructor::GetTOFGeometry(AliRunLoader* runLoader) const
65 // get the TOF parameters
67 if (!runLoader->GetAliRun()) runLoader->LoadgAlice();
68 if (!runLoader->GetAliRun()) {
69 Error("GetTOFGeometry", "couldn't get AliRun object");
72 AliTOF* tof = (AliTOF*) runLoader->GetAliRun()->GetDetector("TOF");
74 Error("GetTOFGeometry", "couldn't get TOF detector");
77 if (!tof->GetGeometry()) {
78 Error("GetTOFGeometry", "no TOF geometry available");
81 return tof->GetGeometry();