]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDReconstructor.cxx
Updated LUT for the TOF alignable volumes
[u/mrichter/AliRoot.git] / TRD / AliTRDReconstructor.cxx
CommitLineData
121a60bd 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/* $Id$ */
17
18///////////////////////////////////////////////////////////////////////////////
19// //
20// class for TRD reconstruction //
21// //
22///////////////////////////////////////////////////////////////////////////////
23
24
25#include "AliTRDReconstructor.h"
26#include "AliRunLoader.h"
121a60bd 27#include "AliTRDclusterizerV1.h"
28#include "AliTRDtracker.h"
b0f03c34 29#include "AliTRDpidESD.h"
121a60bd 30#include <TFile.h>
6965c99b 31#include "AliRawReader.h"
928e9fae 32#include "AliLog.h"
121a60bd 33
34ClassImp(AliTRDReconstructor)
35
36
0397ce53 37Bool_t AliTRDReconstructor::fgkSeedingOn = kFALSE;
38
121a60bd 39//_____________________________________________________________________________
40void AliTRDReconstructor::Reconstruct(AliRunLoader* runLoader) const
41{
42// reconstruct clusters
43
2b217b01 44 AliLoader *loader=runLoader->GetLoader("TRDLoader");
45 loader->LoadRecPoints("recreate");
46
121a60bd 47 AliTRDclusterizerV1 clusterer("clusterer", "TRD clusterizer");
48 runLoader->CdGAFile();
121a60bd 49 Int_t nEvents = runLoader->GetNumberOfEvents();
50
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);
56 }
1a39153b 57
58 loader->UnloadRecPoints();
121a60bd 59}
60
61//_____________________________________________________________________________
928e9fae 62void AliTRDReconstructor::Reconstruct(AliRunLoader* runLoader,
63 AliRawReader* rawReader) const
64{
65// reconstruct clusters
66
67 AliInfo("Reconstruct TRD clusters from RAW data");
68
69 AliLoader *loader=runLoader->GetLoader("TRDLoader");
70 loader->LoadRecPoints("recreate");
71
72 AliTRDclusterizerV1 clusterer("clusterer", "TRD clusterizer");
73 runLoader->CdGAFile();
928e9fae 74 Int_t nEvents = runLoader->GetNumberOfEvents();
75
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);
82 }
83
84 loader->UnloadRecPoints();
85}
86
87//_____________________________________________________________________________
121a60bd 88AliTracker* AliTRDReconstructor::CreateTracker(AliRunLoader* runLoader) const
89{
90// create a TRD tracker
91
92 runLoader->CdGAFile();
93 return new AliTRDtracker(gFile);
94}
95
96//_____________________________________________________________________________
97void AliTRDReconstructor::FillESD(AliRunLoader* /*runLoader*/,
b0f03c34 98 AliESD* esd) const
121a60bd 99{
b0f03c34 100// make PID
101
102 Double_t parTRD[] = {
eab5961e 103 280., // Min. Ionizing Particle signal. Check it !!!
b0f03c34 104 0.23, // relative resolution Check it !!!
105 10. // PID range (in sigmas)
106 };
107 AliTRDpidESD trdPID(parTRD);
108 trdPID.MakePID(esd);
121a60bd 109}
110
111
121a60bd 112