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