]>
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 | // // | |
20 | // class for ITS reconstruction // | |
21 | // // | |
22 | /////////////////////////////////////////////////////////////////////////////// | |
23 | ||
e62c1aea | 24 | #include "Riostream.h" |
121a60bd | 25 | #include "AliITSReconstructor.h" |
00a7cc50 | 26 | #include "AliRun.h" |
113c12f1 | 27 | #include "AliRawReader.h" |
00a7cc50 | 28 | #include "AliITSDetTypeRec.h" |
6cae184e | 29 | #include "AliITSgeom.h" |
7d62fb64 | 30 | #include "AliITSLoader.h" |
e43c066c | 31 | #include "AliITStrackerMI.h" |
c0342e67 | 32 | #include "AliITStrackerV2.h" |
121a60bd | 33 | #include "AliITStrackerSA.h" |
34 | #include "AliITSVertexerIons.h" | |
35 | #include "AliITSVertexerFast.h" | |
3acc14d5 | 36 | #include "AliITSVertexer3D.h" |
121a60bd | 37 | #include "AliITSVertexerZ.h" |
3acc14d5 | 38 | #include "AliITSVertexerCosmics.h" |
af885e0f | 39 | #include "AliESDEvent.h" |
121a60bd | 40 | #include "AliITSpidESD.h" |
e62c1aea | 41 | #include "AliITSpidESD1.h" |
42 | #include "AliITSpidESD2.h" | |
023ae34b | 43 | #include "AliITSInitGeometry.h" |
121a60bd | 44 | |
44347160 | 45 | |
121a60bd | 46 | ClassImp(AliITSReconstructor) |
5c47990a | 47 | AliITSRecoParam *AliITSReconstructor::fgRecoParamDefault = AliITSRecoParam::GetHighFluxParam(); |
48 | AliITSRecoParam *AliITSReconstructor::fgRecoParam =0; // reconstruction parameters | |
44347160 | 49 | |
e62c1aea | 50 | //___________________________________________________________________________ |
94631b2f | 51 | AliITSReconstructor::AliITSReconstructor() : AliReconstructor(), |
6cae184e | 52 | fItsPID(0), |
53 | fDetTypeRec(0) | |
94631b2f | 54 | { |
e62c1aea | 55 | // Default constructor |
5c47990a | 56 | if (!fgRecoParam) { |
57 | AliWarning("Using default reconstruction parameters"); | |
58 | fgRecoParam = fgRecoParamDefault; | |
44347160 | 59 | } |
e62c1aea | 60 | } |
61 | //___________________________________________________________________________ | |
62 | AliITSReconstructor::~AliITSReconstructor(){ | |
63 | // destructor | |
64 | delete fItsPID; | |
5c47990a | 65 | if(!fgRecoParam && (fgRecoParam != fgRecoParamDefault)) delete fgRecoParam; |
6cae184e | 66 | if(fDetTypeRec) delete fDetTypeRec; |
e62c1aea | 67 | } |
68 | //______________________________________________________________________ | |
94631b2f | 69 | AliITSReconstructor::AliITSReconstructor(const AliITSReconstructor &ob) :AliReconstructor(ob), |
5c47990a | 70 | fItsPID(ob.fItsPID), |
71 | fDetTypeRec(ob.fDetTypeRec) | |
6cae184e | 72 | |
94631b2f | 73 | { |
e62c1aea | 74 | // Copy constructor |
e62c1aea | 75 | } |
76 | ||
77 | //______________________________________________________________________ | |
94631b2f | 78 | AliITSReconstructor& AliITSReconstructor::operator=(const AliITSReconstructor& ob ){ |
e62c1aea | 79 | // Assignment operator |
94631b2f | 80 | this->~AliITSReconstructor(); |
81 | new(this) AliITSReconstructor(ob); | |
e62c1aea | 82 | return *this; |
83 | } | |
6cae184e | 84 | |
023ae34b | 85 | //______________________________________________________________________ |
d76c31f4 | 86 | void AliITSReconstructor::Init() { |
023ae34b | 87 | // Initalize this constructor bet getting/creating the objects |
88 | // nesseary for a proper ITS reconstruction. | |
89 | // Inputs: | |
d76c31f4 | 90 | // none. |
023ae34b | 91 | // Output: |
92 | // none. | |
93 | // Return: | |
94 | // none. | |
00a7cc50 | 95 | |
108bd0fe | 96 | AliITSInitGeometry initgeom; |
97 | AliITSgeom *geom = initgeom.CreateAliITSgeom(); | |
98 | AliInfo(Form("Geometry name: %s",(initgeom.GetGeometryName()).Data())); | |
6cae184e | 99 | |
100 | fDetTypeRec = new AliITSDetTypeRec(); | |
101 | fDetTypeRec->SetITSgeom(geom); | |
102 | fDetTypeRec->SetDefaults(); | |
103 | ||
023ae34b | 104 | return; |
105 | } | |
6cae184e | 106 | |
121a60bd | 107 | //_____________________________________________________________________________ |
6cae184e | 108 | void AliITSReconstructor::Reconstruct(TTree *digitsTree, TTree *clustersTree) const |
121a60bd | 109 | { |
110 | // reconstruct clusters | |
111 | ||
00a7cc50 | 112 | TString option = GetOption(); |
113 | Bool_t clusfinder=kTRUE; // Default: V2 cluster finder | |
114 | if(option.Contains("OrigCF"))clusfinder=kFALSE; | |
121a60bd | 115 | |
6cae184e | 116 | fDetTypeRec->SetTreeAddressD(digitsTree); |
117 | fDetTypeRec->MakeBranch(clustersTree,"R"); | |
118 | fDetTypeRec->SetTreeAddressR(clustersTree); | |
119 | fDetTypeRec->DigitsToRecPoints(digitsTree,clustersTree,0,"All",clusfinder); | |
121a60bd | 120 | } |
121 | ||
00a7cc50 | 122 | //_________________________________________________________________ |
6cae184e | 123 | void AliITSReconstructor::Reconstruct(AliRawReader* rawReader, TTree *clustersTree) const |
113c12f1 | 124 | { |
6cae184e | 125 | // reconstruct clusters from raw data |
00a7cc50 | 126 | |
6cae184e | 127 | fDetTypeRec->SetDefaultClusterFindersV2(kTRUE); |
128 | fDetTypeRec->DigitsToRecPoints(rawReader,clustersTree); | |
113c12f1 | 129 | } |
130 | ||
121a60bd | 131 | //_____________________________________________________________________________ |
d76c31f4 | 132 | AliTracker* AliITSReconstructor::CreateTracker() const |
121a60bd | 133 | { |
134 | // create a ITS tracker | |
135 | ||
7d62fb64 | 136 | |
e43c066c | 137 | TString selectedTracker = GetOption(); |
e62c1aea | 138 | AliTracker* tracker; |
139 | if (selectedTracker.Contains("MI")) { | |
e341247d | 140 | tracker = new AliITStrackerMI(0); |
c0342e67 | 141 | } |
142 | else if (selectedTracker.Contains("V2")) { | |
143 | tracker = new AliITStrackerV2(0); | |
e62c1aea | 144 | } |
145 | else { | |
cc088660 | 146 | tracker = new AliITStrackerSA(0); // inherits from AliITStrackerMI |
1966f03c | 147 | AliITStrackerSA *sat=(AliITStrackerSA*)tracker; |
148 | if(selectedTracker.Contains("onlyITS"))sat->SetSAFlag(kTRUE); | |
149 | if(sat->GetSAFlag())AliDebug(1,"Tracking Performed in ITS only\n"); | |
b8ed1a92 | 150 | if(selectedTracker.Contains("cosmics")||selectedTracker.Contains("COSMICS")) |
151 | sat->SetOuterStartLayer(AliITSgeomTGeo::GetNLayers()-2); | |
e62c1aea | 152 | } |
7d62fb64 | 153 | |
e62c1aea | 154 | TString selectedPIDmethod = GetOption(); |
d76c31f4 | 155 | AliITSReconstructor* nc = const_cast<AliITSReconstructor*>(this); |
e62c1aea | 156 | if(selectedPIDmethod.Contains("LandauFitPID")){ |
d76c31f4 | 157 | Info("FillESD","ITS LandauFitPID option has been selected\n"); |
158 | nc->fItsPID = new AliITSpidESD2((AliITStrackerMI*)tracker); | |
e62c1aea | 159 | } |
160 | else{ | |
d76c31f4 | 161 | Info("FillESD","ITS default PID\n"); |
7a8614f3 | 162 | Double_t parITS[] = {79.,0.13, 5.}; //IB: this is "pp tuning" |
d76c31f4 | 163 | nc->fItsPID = new AliITSpidESD1(parITS); |
e62c1aea | 164 | } |
38013a1a | 165 | |
e62c1aea | 166 | return tracker; |
7d62fb64 | 167 | |
121a60bd | 168 | } |
169 | ||
170 | //_____________________________________________________________________________ | |
d76c31f4 | 171 | AliVertexer* AliITSReconstructor::CreateVertexer() const |
121a60bd | 172 | { |
173 | // create a ITS vertexer | |
174 | ||
f4d5a8d1 | 175 | TString selectedVertexer = GetOption(); |
121a60bd | 176 | if(selectedVertexer.Contains("ions") || selectedVertexer.Contains("IONS")){ |
177 | Info("CreateVertexer","a AliITSVertexerIons object has been selected\n"); | |
178 | return new AliITSVertexerIons("null"); | |
179 | } | |
180 | if(selectedVertexer.Contains("smear") || selectedVertexer.Contains("SMEAR")){ | |
181 | Double_t smear[3]={0.005,0.005,0.01}; | |
182 | Info("CreateVertexer","a AliITSVertexerFast object has been selected\n"); | |
183 | return new AliITSVertexerFast(smear); | |
184 | } | |
3acc14d5 | 185 | if(selectedVertexer.Contains("3d") || selectedVertexer.Contains("3D")){ |
186 | Info("CreateVertexer","a AliITSVertexer3D object has been selected\n"); | |
187 | return new AliITSVertexer3D("null"); | |
188 | } | |
189 | if(selectedVertexer.Contains("cosmics") || selectedVertexer.Contains("COSMICS")){ | |
190 | Info("CreateVertexer","a AliITSVertexerCosmics object has been selected\n"); | |
191 | return new AliITSVertexerCosmics(); | |
121a60bd | 192 | } |
193 | // by default an AliITSVertexerZ object is instatiated | |
194 | Info("CreateVertexer","a AliITSVertexerZ object has been selected\n"); | |
195 | return new AliITSVertexerZ("null"); | |
196 | } | |
197 | ||
198 | //_____________________________________________________________________________ | |
d76c31f4 | 199 | void AliITSReconstructor::FillESD(TTree * /*digitsTree*/, TTree *clustersTree, |
af885e0f | 200 | AliESDEvent* esd) const |
121a60bd | 201 | { |
e62c1aea | 202 | // make PID, find V0s and cascade |
d76c31f4 | 203 | if(fItsPID!=0) { |
204 | TString selectedPIDmethod = GetOption(); | |
205 | if(selectedPIDmethod.Contains("LandauFitPID")){ | |
206 | fItsPID->MakePID(clustersTree,esd); | |
207 | } | |
208 | else{ | |
209 | fItsPID->MakePID(esd); | |
210 | } | |
e62c1aea | 211 | } |
212 | else { | |
213 | Error("FillESD","!! cannot do the PID !!\n"); | |
214 | } | |
121a60bd | 215 | } |