]>
Commit | Line | Data |
---|---|---|
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 TPC reconstruction // | |
21 | // // | |
22 | /////////////////////////////////////////////////////////////////////////////// | |
23 | ||
24 | ||
25 | #include "AliTPCReconstructor.h" | |
26 | #include "AliRunLoader.h" | |
27 | #include "AliRun.h" | |
28 | #include "AliRawReader.h" | |
29 | #include "AliTPCclustererMI.h" | |
30 | #include "AliTPCtrackerMI.h" | |
31 | #include "AliTPCpidESD.h" | |
32 | #include "AliTPCParam.h" | |
33 | #include "AliTPCParamSR.h" | |
34 | #include "AliTPCcalibDB.h" | |
35 | #include "AliTracker.h" | |
36 | #include "AliMagF.h" | |
37 | ||
38 | ClassImp(AliTPCReconstructor) | |
39 | ||
40 | ||
41 | Int_t AliTPCReconstructor::fgStreamLevel = 0; // stream (debug) level | |
42 | ||
43 | ||
44 | AliTPCReconstructor::AliTPCReconstructor(): | |
45 | AliReconstructor(), | |
46 | fClusterer(NULL) | |
47 | { | |
48 | // | |
49 | // default constructor | |
50 | // | |
51 | // | |
52 | // | |
53 | AliTPCcalibDB * calib = AliTPCcalibDB::Instance(); | |
54 | const AliMagF * field = AliTracker::GetFieldMap(); | |
55 | if (field) { // Set correctly the magnetic field in the ExB calculation | |
56 | calib->SetExBField(field->SolenoidField()); | |
57 | } | |
58 | AliTPCParam* param = GetTPCParam(); | |
59 | if (!param) { | |
60 | AliWarning("Loading default TPC parameters !"); | |
61 | param = new AliTPCParamSR; | |
62 | } | |
63 | fClusterer = new AliTPCclustererMI(param); | |
64 | } | |
65 | ||
66 | AliTPCReconstructor::AliTPCReconstructor(const AliTPCReconstructor& /*rec*/): | |
67 | AliReconstructor(), | |
68 | fClusterer(NULL) | |
69 | { | |
70 | // | |
71 | // Dummy copu constructor | |
72 | // | |
73 | } | |
74 | ||
75 | AliTPCReconstructor& AliTPCReconstructor::operator=(const AliTPCReconstructor&){ | |
76 | // | |
77 | // dummy operator | |
78 | // | |
79 | return *this; | |
80 | } | |
81 | ||
82 | //_____________________________________________________________________________ | |
83 | AliTPCReconstructor::~AliTPCReconstructor() | |
84 | { | |
85 | if (fClusterer) delete fClusterer; | |
86 | } | |
87 | ||
88 | //_____________________________________________________________________________ | |
89 | void AliTPCReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree) const { | |
90 | // single event local reconstruction | |
91 | // of TPC data | |
92 | fClusterer->SetInput(digitsTree); | |
93 | fClusterer->SetOutput(clustersTree); | |
94 | fClusterer->Digits2Clusters(); | |
95 | } | |
96 | ||
97 | //_____________________________________________________________________________ | |
98 | void AliTPCReconstructor::Reconstruct(AliRawReader* rawReader, TTree* clustersTree) const { | |
99 | // single event local reconstruction | |
100 | // of TPC data starting from raw data | |
101 | ||
102 | fClusterer->SetOutput(clustersTree); | |
103 | fClusterer->Digits2Clusters(rawReader); | |
104 | } | |
105 | ||
106 | //_____________________________________________________________________________ | |
107 | AliTracker* AliTPCReconstructor::CreateTracker() const | |
108 | { | |
109 | // create a TPC tracker | |
110 | ||
111 | AliTPCParam* param = GetTPCParam(); | |
112 | if (!param) { | |
113 | AliWarning("Loading default TPC parameters !"); | |
114 | param = new AliTPCParamSR; | |
115 | } | |
116 | param->ReadGeoMatrices(); | |
117 | return new AliTPCtrackerMI(param); | |
118 | } | |
119 | ||
120 | //_____________________________________________________________________________ | |
121 | void AliTPCReconstructor::FillESD(TTree */*digitsTree*/, TTree */*clustersTree*/, | |
122 | AliESDEvent* esd) const | |
123 | { | |
124 | // make PID | |
125 | ||
126 | Double_t parTPC[] = {47., 0.07, 5.}; | |
127 | AliTPCpidESD tpcPID(parTPC); | |
128 | tpcPID.MakePID(esd); | |
129 | } | |
130 | ||
131 | ||
132 | //_____________________________________________________________________________ | |
133 | AliTPCParam* AliTPCReconstructor::GetTPCParam() const | |
134 | { | |
135 | // get the TPC parameters | |
136 | ||
137 | AliTPCParam* param = AliTPCcalibDB::Instance()->GetParameters(); | |
138 | ||
139 | return param; | |
140 | } |