]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDReconstructor.cxx
d08cd08fd6e643b672f6139399d2f129266aa4c1
[u/mrichter/AliRoot.git] / TRD / AliTRDReconstructor.cxx
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 "AliTRDclusterizer.h"
34 #include "AliTRDtracker.h"
35 #include "AliTRDpidESD.h"
36 #include "AliTRDgtuTrack.h"
37 #include "AliTRDrawData.h"
38 #include "AliTRDdigitsManager.h"
39 #include "AliTRDtrackerV1.h"
40 #include "AliTRDrecoParam.h"
41
42 ClassImp(AliTRDReconstructor)
43
44 //_____________________________________________________________________________
45 AliTRDReconstructor::~AliTRDReconstructor()                  { 
46 }
47
48
49
50 //_____________________________________________________________________________
51 void AliTRDReconstructor::ConvertDigits(AliRawReader *rawReader
52                                       , TTree *digitsTree) const
53 {
54   //
55   // Convert raw data digits into digit objects in a root tree
56   //
57
58   AliInfo("Convert raw data digits into digit objects [RawReader -> Digit TTree]");
59
60   AliTRDrawData rawData;
61   rawReader->Reset();
62   rawReader->Select("TRD");
63   AliTRDdigitsManager *manager = rawData.Raw2Digits(rawReader);
64   manager->MakeBranch(digitsTree);
65   manager->WriteDigits();
66   delete manager;
67
68 }
69
70 //_____________________________________________________________________________
71 void AliTRDReconstructor::Reconstruct(AliRawReader *rawReader
72                                     , TTree *clusterTree) const
73 {
74   //
75   // Reconstruct clusters
76   //
77
78   AliInfo("Reconstruct TRD clusters from RAW data [RawReader -> Cluster TTree]");
79
80
81   rawReader->Reset();
82   rawReader->Select("TRD");
83
84   // New (fast) cluster finder
85   AliTRDclusterizer clusterer("clusterer","TRD clusterizer");
86   clusterer.OpenOutput(clusterTree);
87   clusterer.SetAddLabels(kFALSE);
88   clusterer.Raw2ClustersChamber(rawReader);
89
90 }
91
92 //_____________________________________________________________________________
93 void AliTRDReconstructor::Reconstruct(TTree *digitsTree
94                                     , TTree *clusterTree) const
95 {
96   //
97   // Reconstruct clusters
98   //
99
100   AliInfo("Reconstruct TRD clusters from Digits [Digit TTree -> Cluster TTree]");
101
102   AliTRDclusterizer clusterer("clusterer","TRD clusterizer");
103   clusterer.OpenOutput(clusterTree);
104   clusterer.ReadDigits(digitsTree);
105   clusterer.MakeClusters();
106
107 }
108
109 //_____________________________________________________________________________
110 AliTracker *AliTRDReconstructor::CreateTracker() const
111 {
112   //
113   // Create a TRD tracker
114   //
115
116   //return new AliTRDtracker(NULL);
117
118   return new AliTRDtrackerV1();
119
120 }
121
122 //_____________________________________________________________________________
123 void AliTRDReconstructor::FillESD(TTree* /*digitsTree*/
124                                 , TTree* /*clusterTree*/
125                                 , AliESDEvent* /*esd*/) const
126 {
127   //
128   // Fill ESD
129   //
130
131 }