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 ///////////////////////////////////////////////////////////////////////////////
26 #include "AliRunLoader.h"
27 #include "AliRawReader.h"
29 #include "AliESDTrdTrack.h"
30 #include "AliESDEvent.h"
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"
42 ClassImp(AliTRDReconstructor)
44 Bool_t AliTRDReconstructor::fgkSeedingOn = kFALSE;
45 Int_t AliTRDReconstructor::fgStreamLevel = 0; // Stream (debug) level
46 AliTRDrecoParam* AliTRDReconstructor::fgRecoParam = 0x0;
49 //_____________________________________________________________________________
50 AliTRDReconstructor::~AliTRDReconstructor() {
51 if(fgRecoParam) delete fgRecoParam;
56 //_____________________________________________________________________________
57 void AliTRDReconstructor::ConvertDigits(AliRawReader *rawReader
58 , TTree *digitsTree) const
61 // Convert raw data digits into digit objects in a root tree
64 AliInfo("Convert raw data digits into digit objects [RawReader -> Digit TTree]");
66 AliTRDrawData rawData;
68 rawReader->Select("TRD");
69 AliTRDdigitsManager *manager = rawData.Raw2Digits(rawReader);
70 manager->MakeBranch(digitsTree);
71 manager->WriteDigits();
76 //_____________________________________________________________________________
77 void AliTRDReconstructor::Reconstruct(AliRawReader *rawReader
78 , TTree *clusterTree) const
81 // Reconstruct clusters
84 AliInfo("Reconstruct TRD clusters from RAW data [RawReader -> Cluster TTree]");
86 // TODO move it to rec.C. check TPC
87 if (!fgRecoParam) fgRecoParam = AliTRDrecoParam::GetLowFluxParam();
90 rawReader->Select("TRD");
92 // New (fast) cluster finder
93 AliTRDclusterizer clusterer("clusterer","TRD clusterizer");
94 clusterer.OpenOutput(clusterTree);
95 clusterer.SetAddLabels(kFALSE);
96 clusterer.Raw2ClustersChamber(rawReader);
100 //_____________________________________________________________________________
101 void AliTRDReconstructor::Reconstruct(TTree *digitsTree
102 , TTree *clusterTree) const
105 // Reconstruct clusters
108 AliInfo("Reconstruct TRD clusters from Digits [Digit TTree -> Cluster TTree]");
110 // TODO move it to rec.C. check TPC
111 if (!fgRecoParam) fgRecoParam = AliTRDrecoParam::GetLowFluxParam();
113 AliTRDclusterizer clusterer("clusterer","TRD clusterizer");
114 clusterer.OpenOutput(clusterTree);
115 clusterer.ReadDigits(digitsTree);
116 clusterer.MakeClusters();
120 //_____________________________________________________________________________
121 AliTracker *AliTRDReconstructor::CreateTracker() const
124 // Create a TRD tracker
127 //return new AliTRDtracker(NULL);
129 // TODO move it to rec.C. check TPC
130 if (!fgRecoParam) fgRecoParam = AliTRDrecoParam::GetLowFluxParam();
131 return new AliTRDtrackerV1();
135 //_____________________________________________________________________________
136 void AliTRDReconstructor::FillESD(TTree* /*digitsTree*/
137 , TTree* /*clusterTree*/
138 , AliESDEvent* /*esd*/) const