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 TRD reconstruction //
22 ///////////////////////////////////////////////////////////////////////////////
25 #include "AliTRDReconstructor.h"
26 #include "AliRunLoader.h"
27 #include "AliTRDparameter.h"
29 #include "AliTRDclusterizerV1.h"
30 #include "AliTRDtracker.h"
34 ClassImp(AliTRDReconstructor)
37 //_____________________________________________________________________________
38 void AliTRDReconstructor::Reconstruct(AliRunLoader* runLoader) const
40 // reconstruct clusters
42 AliLoader *loader=runLoader->GetLoader("TRDLoader");
43 loader->LoadRecPoints("recreate");
45 AliTRDclusterizerV1 clusterer("clusterer", "TRD clusterizer");
46 runLoader->CdGAFile();
47 AliTRDparameter* trdParam = GetTRDparameter(runLoader);
49 Error("Reconstruct", "no TRD parameters found");
53 clusterer.SetParameter(trdParam);
54 Int_t nEvents = runLoader->GetNumberOfEvents();
56 for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
57 clusterer.Open(runLoader->GetFileName(), iEvent);
58 clusterer.ReadDigits();
59 clusterer.MakeClusters();
60 clusterer.WriteClusters(-1);
64 //_____________________________________________________________________________
65 AliTracker* AliTRDReconstructor::CreateTracker(AliRunLoader* runLoader) const
67 // create a TRD tracker
69 runLoader->CdGAFile();
70 return new AliTRDtracker(gFile);
73 //_____________________________________________________________________________
74 void AliTRDReconstructor::FillESD(AliRunLoader* /*runLoader*/,
75 AliESD* /*esd*/) const
80 //_____________________________________________________________________________
81 AliTRDparameter* AliTRDReconstructor::GetTRDparameter(AliRunLoader* runLoader) const
83 // get the TRD parameters
85 runLoader->CdGAFile();
86 AliTRDparameter* trdParam = (AliTRDparameter*) gFile->Get("TRDparameter");
88 Error("GetTRDparameter", "no TRD parameters available");