]>
Commit | Line | Data |
---|---|---|
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 | // // | |
4fad09c9 | 20 | // Class for TRD reconstruction // |
121a60bd | 21 | // // |
22 | /////////////////////////////////////////////////////////////////////////////// | |
23 | ||
e3b2b5e5 | 24 | #include <TFile.h> |
121a60bd | 25 | |
121a60bd | 26 | #include "AliRunLoader.h" |
3bc9d03e | 27 | #include "AliRawReader.h" |
28 | #include "AliLog.h" | |
3bc9d03e | 29 | #include "AliESDTrdTrack.h" |
af885e0f | 30 | #include "AliESDEvent.h" |
3bc9d03e | 31 | |
32 | #include "AliTRDReconstructor.h" | |
3fe61b77 | 33 | #include "AliTRDclusterizer.h" |
121a60bd | 34 | #include "AliTRDtracker.h" |
b0f03c34 | 35 | #include "AliTRDpidESD.h" |
e3b2b5e5 | 36 | #include "AliTRDgtuTrack.h" |
a8fbb161 | 37 | #include "AliTRDrawData.h" |
38 | #include "AliTRDdigitsManager.h" | |
e4f2f73d | 39 | #include "AliTRDtrackerV1.h" |
40 | #include "AliTRDrecoParam.h" | |
121a60bd | 41 | |
42 | ClassImp(AliTRDReconstructor) | |
43 | ||
3bc9d03e | 44 | Bool_t AliTRDReconstructor::fgkSeedingOn = kFALSE; |
45 | Int_t AliTRDReconstructor::fgStreamLevel = 0; // Stream (debug) level | |
eb38ed55 | 46 | AliTRDrecoParam* AliTRDReconstructor::fgRecoParam = 0x0; |
47 | ||
48 | ||
49 | //_____________________________________________________________________________ | |
50 | AliTRDReconstructor::~AliTRDReconstructor() { | |
51 | if(fgRecoParam) delete fgRecoParam; | |
52 | } | |
53 | ||
54 | ||
0397ce53 | 55 | |
121a60bd | 56 | //_____________________________________________________________________________ |
a8fbb161 | 57 | void AliTRDReconstructor::ConvertDigits(AliRawReader *rawReader |
58 | , TTree *digitsTree) const | |
121a60bd | 59 | { |
3bc9d03e | 60 | // |
25ca55ce | 61 | // Convert raw data digits into digit objects in a root tree |
3bc9d03e | 62 | // |
121a60bd | 63 | |
ca21baaa | 64 | AliInfo("Convert raw data digits into digit objects [RawReader -> Digit TTree]"); |
65 | ||
a8fbb161 | 66 | AliTRDrawData rawData; |
3a0f6479 | 67 | rawReader->Reset(); |
68 | rawReader->Select("TRD"); | |
a8fbb161 | 69 | AliTRDdigitsManager *manager = rawData.Raw2Digits(rawReader); |
70 | manager->MakeBranch(digitsTree); | |
71 | manager->WriteDigits(); | |
c0ab62ff | 72 | delete manager; |
0ee00e25 | 73 | |
121a60bd | 74 | } |
75 | ||
25ca55ce | 76 | //_____________________________________________________________________________ |
77 | void AliTRDReconstructor::Reconstruct(AliRawReader *rawReader | |
78 | , TTree *clusterTree) const | |
79 | { | |
80 | // | |
81 | // Reconstruct clusters | |
82 | // | |
83 | ||
ca21baaa | 84 | AliInfo("Reconstruct TRD clusters from RAW data [RawReader -> Cluster TTree]"); |
25ca55ce | 85 | |
3a0f6479 | 86 | rawReader->Reset(); |
87 | rawReader->Select("TRD"); | |
88 | ||
ca21baaa | 89 | // New (fast) cluster finder |
3fe61b77 | 90 | AliTRDclusterizer clusterer("clusterer","TRD clusterizer"); |
25ca55ce | 91 | clusterer.OpenOutput(clusterTree); |
ca21baaa | 92 | clusterer.SetAddLabels(kFALSE); |
93 | clusterer.Raw2ClustersChamber(rawReader); | |
d6e36038 | 94 | |
25ca55ce | 95 | } |
96 | ||
97 | //_____________________________________________________________________________ | |
a8fbb161 | 98 | void AliTRDReconstructor::Reconstruct(TTree *digitsTree |
99 | , TTree *clusterTree) const | |
25ca55ce | 100 | { |
101 | // | |
102 | // Reconstruct clusters | |
103 | // | |
e4f2f73d | 104 | |
ca21baaa | 105 | AliInfo("Reconstruct TRD clusters from Digits [Digit TTree -> Cluster TTree]"); |
25ca55ce | 106 | |
3fe61b77 | 107 | AliTRDclusterizer clusterer("clusterer","TRD clusterizer"); |
25ca55ce | 108 | clusterer.OpenOutput(clusterTree); |
109 | clusterer.ReadDigits(digitsTree); | |
110 | clusterer.MakeClusters(); | |
d6e36038 | 111 | |
25ca55ce | 112 | } |
113 | ||
114 | //_____________________________________________________________________________ | |
44dbae42 | 115 | AliTracker *AliTRDReconstructor::CreateTracker() const |
121a60bd | 116 | { |
3bc9d03e | 117 | // |
118 | // Create a TRD tracker | |
119 | // | |
121a60bd | 120 | |
e4f2f73d | 121 | //return new AliTRDtracker(NULL); |
122 | ||
eb38ed55 | 123 | // TODO move it to rec.C. check TPC |
124 | fgRecoParam = AliTRDrecoParam::GetLowFluxParam(); | |
125 | return new AliTRDtrackerV1(); | |
25ca55ce | 126 | |
25ca55ce | 127 | } |
128 | ||
129 | //_____________________________________________________________________________ | |
130 | void AliTRDReconstructor::FillESD(TTree* /*digitsTree*/ | |
131 | , TTree* /*clusterTree*/ | |
ca21baaa | 132 | , AliESDEvent* /*esd*/) const |
25ca55ce | 133 | { |
134 | // | |
af26ce80 | 135 | // Fill ESD |
25ca55ce | 136 | // |
137 | ||
25ca55ce | 138 | } |