]>
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 = (AliMagF*)TGeoGlobalMagField::Instance(); | |
55 | calib->SetExBField(field->SolenoidField()); | |
56 | AliTPCParam* param = GetTPCParam(); | |
57 | if (!param) { | |
58 | AliWarning("Loading default TPC parameters !"); | |
59 | param = new AliTPCParamSR; | |
60 | } | |
61 | fClusterer = new AliTPCclustererMI(param); | |
62 | } | |
63 | ||
64 | AliTPCReconstructor::AliTPCReconstructor(const AliTPCReconstructor& /*rec*/): | |
65 | AliReconstructor(), | |
66 | fClusterer(NULL) | |
67 | { | |
68 | // | |
69 | // Dummy copu constructor | |
70 | // | |
71 | } | |
72 | ||
73 | AliTPCReconstructor& AliTPCReconstructor::operator=(const AliTPCReconstructor&){ | |
74 | // | |
75 | // dummy operator | |
76 | // | |
77 | return *this; | |
78 | } | |
79 | ||
80 | //_____________________________________________________________________________ | |
81 | AliTPCReconstructor::~AliTPCReconstructor() | |
82 | { | |
83 | if (fClusterer) delete fClusterer; | |
84 | } | |
85 | ||
86 | //_____________________________________________________________________________ | |
87 | void AliTPCReconstructor::Reconstruct(TTree* digitsTree, TTree* clustersTree) const { | |
88 | // single event local reconstruction | |
89 | // of TPC data | |
90 | fClusterer->SetInput(digitsTree); | |
91 | fClusterer->SetOutput(clustersTree); | |
92 | fClusterer->Digits2Clusters(); | |
93 | } | |
94 | ||
95 | //_____________________________________________________________________________ | |
96 | void AliTPCReconstructor::Reconstruct(AliRawReader* rawReader, TTree* clustersTree) const { | |
97 | // single event local reconstruction | |
98 | // of TPC data starting from raw data | |
99 | ||
100 | fClusterer->SetOutput(clustersTree); | |
101 | fClusterer->Digits2Clusters(rawReader); | |
102 | } | |
103 | ||
104 | //_____________________________________________________________________________ | |
105 | AliTracker* AliTPCReconstructor::CreateTracker() const | |
106 | { | |
107 | // create a TPC tracker | |
108 | ||
109 | AliTPCParam* param = GetTPCParam(); | |
110 | if (!param) { | |
111 | AliWarning("Loading default TPC parameters !"); | |
112 | param = new AliTPCParamSR; | |
113 | } | |
114 | param->ReadGeoMatrices(); | |
115 | return new AliTPCtrackerMI(param); | |
116 | } | |
117 | ||
118 | //_____________________________________________________________________________ | |
119 | void AliTPCReconstructor::FillESD(TTree */*digitsTree*/, TTree */*clustersTree*/, | |
120 | AliESDEvent* esd) const | |
121 | { | |
122 | // make PID | |
123 | ||
124 | Double_t parTPC[] = {47., 0.07, 5.}; | |
125 | AliTPCpidESD tpcPID(parTPC); | |
126 | tpcPID.MakePID(esd); | |
127 | } | |
128 | ||
129 | ||
130 | //_____________________________________________________________________________ | |
131 | AliTPCParam* AliTPCReconstructor::GetTPCParam() const | |
132 | { | |
133 | // get the TPC parameters | |
134 | ||
135 | AliTPCParam* param = AliTPCcalibDB::Instance()->GetParameters(); | |
136 | ||
137 | return param; | |
138 | } |