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 "AliTRDclusterizerV1.h"
28 #include "AliTRDtracker.h"
29 #include "AliTRDpidESD.h"
31 #include "AliRawReader.h"
34 ClassImp(AliTRDReconstructor)
37 Bool_t AliTRDReconstructor::fgkSeedingOn = kFALSE;
39 //_____________________________________________________________________________
40 void AliTRDReconstructor::Reconstruct(AliRunLoader* runLoader) const
42 // reconstruct clusters
44 AliLoader *loader=runLoader->GetLoader("TRDLoader");
45 loader->LoadRecPoints("recreate");
47 AliTRDclusterizerV1 clusterer("clusterer", "TRD clusterizer");
48 runLoader->CdGAFile();
49 Int_t nEvents = runLoader->GetNumberOfEvents();
51 for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
52 clusterer.Open(runLoader->GetFileName(), iEvent);
53 clusterer.ReadDigits();
54 clusterer.MakeClusters();
55 clusterer.WriteClusters(-1);
58 loader->UnloadRecPoints();
61 //_____________________________________________________________________________
62 void AliTRDReconstructor::Reconstruct(AliRunLoader* runLoader,
63 AliRawReader* rawReader) const
65 // reconstruct clusters
67 AliInfo("Reconstruct TRD clusters from RAW data");
69 AliLoader *loader=runLoader->GetLoader("TRDLoader");
70 loader->LoadRecPoints("recreate");
72 AliTRDclusterizerV1 clusterer("clusterer", "TRD clusterizer");
73 runLoader->CdGAFile();
74 Int_t nEvents = runLoader->GetNumberOfEvents();
76 for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
77 if (!rawReader->NextEvent()) break;
78 clusterer.Open(runLoader->GetFileName(), iEvent);
79 clusterer.ReadDigits(rawReader);
80 clusterer.MakeClusters();
81 clusterer.WriteClusters(-1);
84 loader->UnloadRecPoints();
87 //_____________________________________________________________________________
88 AliTracker* AliTRDReconstructor::CreateTracker(AliRunLoader* runLoader) const
90 // create a TRD tracker
92 runLoader->CdGAFile();
93 return new AliTRDtracker(gFile);
96 //_____________________________________________________________________________
97 void AliTRDReconstructor::FillESD(AliRunLoader* /*runLoader*/,
102 Double_t parTRD[] = {
103 280., // Min. Ionizing Particle signal. Check it !!!
104 0.23, // relative resolution Check it !!!
105 10. // PID range (in sigmas)
107 AliTRDpidESD trdPID(parTRD);