]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - TRD/AliTRDReconstructor.cxx
Remove AliTRDclusterizerV1
[u/mrichter/AliRoot.git] / TRD / AliTRDReconstructor.cxx
... / ...
CommitLineData
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#include <TFile.h>
25
26#include "AliRunLoader.h"
27#include "AliRawReader.h"
28#include "AliLog.h"
29#include "AliESDTrdTrack.h"
30#include "AliESDEvent.h"
31
32#include "AliTRDReconstructor.h"
33#include "AliTRDclusterizerV2.h"
34#include "AliTRDtracker.h"
35#include "AliTRDpidESD.h"
36#include "AliTRDgtuTrack.h"
37#include "AliTRDrawData.h"
38#include "AliTRDdigitsManager.h"
39
40ClassImp(AliTRDReconstructor)
41
42Bool_t AliTRDReconstructor::fgkSeedingOn = kFALSE;
43Int_t AliTRDReconstructor::fgStreamLevel = 0; // Stream (debug) level
44
45//_____________________________________________________________________________
46void AliTRDReconstructor::ConvertDigits(AliRawReader *rawReader
47 , TTree *digitsTree) const
48{
49 //
50 // Convert raw data digits into digit objects in a root tree
51 //
52
53 AliInfo("Convert raw data digits into digit objects [RawReader -> Digit TTree]");
54
55 AliTRDrawData rawData;
56 rawReader->Reset();
57 rawReader->Select("TRD");
58 AliTRDdigitsManager *manager = rawData.Raw2Digits(rawReader);
59 manager->MakeBranch(digitsTree);
60 manager->WriteDigits();
61 delete manager;
62
63}
64
65//_____________________________________________________________________________
66void AliTRDReconstructor::Reconstruct(AliRunLoader *runLoader
67 , AliRawReader *rawReader) const
68{
69 //
70 // Reconstruct clusters
71 //
72
73 AliInfo("Reconstruct TRD clusters from RAW data [RunLoader, RawReader]");
74
75 AliLoader *loader = runLoader->GetLoader("TRDLoader");
76 loader->LoadRecPoints("recreate");
77
78 runLoader->CdGAFile();
79 Int_t nEvents = runLoader->GetNumberOfEvents();
80
81 rawReader->Reset();
82 rawReader->Select("TRD");
83
84 for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
85
86 if (!rawReader->NextEvent()) break;
87
88 // New (fast) cluster finder
89 AliTRDclusterizerV2 clusterer("clusterer","TRD clusterizer");
90 clusterer.Open(runLoader->GetFileName(),iEvent);
91 clusterer.Raw2ClustersChamber(rawReader);
92
93 clusterer.WriteClusters(-1);
94
95 }
96
97 loader->UnloadRecPoints();
98
99}
100
101//_____________________________________________________________________________
102void AliTRDReconstructor::Reconstruct(AliRawReader *rawReader
103 , TTree *clusterTree) const
104{
105 //
106 // Reconstruct clusters
107 //
108
109 AliInfo("Reconstruct TRD clusters from RAW data [RawReader -> Cluster TTree]");
110
111 rawReader->Reset();
112 rawReader->Select("TRD");
113
114 // New (fast) cluster finder
115 AliTRDclusterizerV2 clusterer("clusterer","TRD clusterizer");
116 clusterer.OpenOutput(clusterTree);
117 clusterer.SetAddLabels(kFALSE);
118 clusterer.Raw2ClustersChamber(rawReader);
119
120}
121
122//_____________________________________________________________________________
123void AliTRDReconstructor::Reconstruct(TTree *digitsTree
124 , TTree *clusterTree) const
125{
126 //
127 // Reconstruct clusters
128 //
129 AliInfo("Reconstruct TRD clusters from Digits [Digit TTree -> Cluster TTree]");
130
131 AliTRDclusterizerV2 clusterer("clusterer","TRD clusterizer");
132 clusterer.OpenOutput(clusterTree);
133 clusterer.ReadDigits(digitsTree);
134 clusterer.MakeClusters();
135
136}
137
138//_____________________________________________________________________________
139void AliTRDReconstructor::Reconstruct(AliRunLoader *runLoader) const
140{
141 //
142 // Reconstruct clusters
143 //
144
145 AliInfo("Reconstruct TRD clusters [AliRunLoader]");
146 AliLoader *loader = runLoader->GetLoader("TRDLoader");
147 loader->LoadRecPoints("recreate");
148
149 runLoader->CdGAFile();
150 Int_t nEvents = runLoader->GetNumberOfEvents();
151
152 for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
153 AliTRDclusterizerV2 clusterer("clusterer","TRD clusterizer");
154 clusterer.Open(runLoader->GetFileName(),iEvent);
155 clusterer.ReadDigits();
156 clusterer.MakeClusters();
157 clusterer.WriteClusters(-1);
158 }
159
160 loader->UnloadRecPoints();
161
162}
163
164//_____________________________________________________________________________
165AliTracker *AliTRDReconstructor::CreateTracker(AliRunLoader *runLoader) const
166{
167 //
168 // Create a TRD tracker
169 //
170
171 runLoader->CdGAFile();
172
173 return new AliTRDtracker(gFile);
174
175}
176
177//_____________________________________________________________________________
178void AliTRDReconstructor::FillESD(AliRunLoader* /*runLoader*/
179 , AliRawReader* /*rawReader*/
180 , AliESDEvent* /*esd*/) const
181{
182 //
183 // Fill ESD
184 //
185
186}
187
188//_____________________________________________________________________________
189void AliTRDReconstructor::FillESD(AliRawReader* /*rawReader*/
190 , TTree* /*clusterTree*/
191 , AliESDEvent* /*esd*/) const
192{
193 //
194 // Fill ESD
195 //
196
197}
198
199//_____________________________________________________________________________
200void AliTRDReconstructor::FillESD(TTree* /*digitsTree*/
201 , TTree* /*clusterTree*/
202 , AliESDEvent* /*esd*/) const
203{
204 //
205 // Fill ESD
206 //
207
208}
209
210//_____________________________________________________________________________
211void AliTRDReconstructor::FillESD(AliRunLoader* /*runLoader*/
212 , AliESDEvent* /*esd*/) const
213{
214 //
215 // Fill ESD
216 //
217
218}