]>
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" | |
c8735dd3 | 36 | #include "AliITSVertexerFixed.h" |
3acc14d5 | 37 | #include "AliITSVertexer3D.h" |
121a60bd | 38 | #include "AliITSVertexerZ.h" |
3acc14d5 | 39 | #include "AliITSVertexerCosmics.h" |
af885e0f | 40 | #include "AliESDEvent.h" |
121a60bd | 41 | #include "AliITSpidESD.h" |
e62c1aea | 42 | #include "AliITSpidESD1.h" |
43 | #include "AliITSpidESD2.h" | |
023ae34b | 44 | #include "AliITSInitGeometry.h" |
58e8dc31 | 45 | #include "AliITSTrackleterSPDEff.h" |
121a60bd | 46 | |
44347160 | 47 | |
121a60bd | 48 | ClassImp(AliITSReconstructor) |
44347160 | 49 | |
e62c1aea | 50 | //___________________________________________________________________________ |
94631b2f | 51 | AliITSReconstructor::AliITSReconstructor() : AliReconstructor(), |
6cae184e | 52 | fItsPID(0), |
53 | fDetTypeRec(0) | |
94631b2f | 54 | { |
e62c1aea | 55 | // Default constructor |
e62c1aea | 56 | } |
57 | //___________________________________________________________________________ | |
58 | AliITSReconstructor::~AliITSReconstructor(){ | |
59 | // destructor | |
60 | delete fItsPID; | |
6cae184e | 61 | if(fDetTypeRec) delete fDetTypeRec; |
e62c1aea | 62 | } |
63 | //______________________________________________________________________ | |
94631b2f | 64 | AliITSReconstructor::AliITSReconstructor(const AliITSReconstructor &ob) :AliReconstructor(ob), |
5c47990a | 65 | fItsPID(ob.fItsPID), |
66 | fDetTypeRec(ob.fDetTypeRec) | |
6cae184e | 67 | |
94631b2f | 68 | { |
e62c1aea | 69 | // Copy constructor |
e62c1aea | 70 | } |
71 | ||
72 | //______________________________________________________________________ | |
94631b2f | 73 | AliITSReconstructor& AliITSReconstructor::operator=(const AliITSReconstructor& ob ){ |
e62c1aea | 74 | // Assignment operator |
94631b2f | 75 | this->~AliITSReconstructor(); |
76 | new(this) AliITSReconstructor(ob); | |
e62c1aea | 77 | return *this; |
78 | } | |
6cae184e | 79 | |
023ae34b | 80 | //______________________________________________________________________ |
d76c31f4 | 81 | void AliITSReconstructor::Init() { |
023ae34b | 82 | // Initalize this constructor bet getting/creating the objects |
83 | // nesseary for a proper ITS reconstruction. | |
84 | // Inputs: | |
d76c31f4 | 85 | // none. |
023ae34b | 86 | // Output: |
87 | // none. | |
88 | // Return: | |
89 | // none. | |
00a7cc50 | 90 | |
108bd0fe | 91 | AliITSInitGeometry initgeom; |
92 | AliITSgeom *geom = initgeom.CreateAliITSgeom(); | |
93 | AliInfo(Form("Geometry name: %s",(initgeom.GetGeometryName()).Data())); | |
6cae184e | 94 | |
95 | fDetTypeRec = new AliITSDetTypeRec(); | |
96 | fDetTypeRec->SetITSgeom(geom); | |
97 | fDetTypeRec->SetDefaults(); | |
ed446fa3 | 98 | |
023ae34b | 99 | return; |
100 | } | |
6cae184e | 101 | |
121a60bd | 102 | //_____________________________________________________________________________ |
6cae184e | 103 | void AliITSReconstructor::Reconstruct(TTree *digitsTree, TTree *clustersTree) const |
121a60bd | 104 | { |
105 | // reconstruct clusters | |
106 | ||
9f9cae94 | 107 | Int_t cluFindOpt = GetRecoParam()->GetClusterFinder(); |
121a60bd | 108 | |
6cae184e | 109 | fDetTypeRec->SetTreeAddressD(digitsTree); |
110 | fDetTypeRec->MakeBranch(clustersTree,"R"); | |
111 | fDetTypeRec->SetTreeAddressR(clustersTree); | |
5d2c2f86 | 112 | fDetTypeRec->DigitsToRecPoints(digitsTree,clustersTree,0,"All",cluFindOpt); |
121a60bd | 113 | } |
114 | ||
00a7cc50 | 115 | //_________________________________________________________________ |
6cae184e | 116 | void AliITSReconstructor::Reconstruct(AliRawReader* rawReader, TTree *clustersTree) const |
113c12f1 | 117 | { |
6cae184e | 118 | // reconstruct clusters from raw data |
00a7cc50 | 119 | |
6cae184e | 120 | fDetTypeRec->SetDefaultClusterFindersV2(kTRUE); |
121 | fDetTypeRec->DigitsToRecPoints(rawReader,clustersTree); | |
113c12f1 | 122 | } |
58e8dc31 | 123 | //_____________________________________________________________________________ |
124 | AliTracker* AliITSReconstructor::CreateTrackleter() const | |
125 | { | |
126 | // create the SPD trackeleter (for SPD PlaneEfficiency evaluation) | |
127 | if(!GetRecoParam()->GetComputePlaneEff() && !GetRecoParam()->GetUseTrackletsPlaneEff()) return NULL; | |
128 | //Int_t trackerOpt = GetRecoParam()->GetTracker(); | |
129 | AliTracker* trackleter; | |
130 | trackleter = new AliITSTrackleterSPDEff(); | |
131 | AliITSTrackleterSPDEff *spdtrackleter=(AliITSTrackleterSPDEff*)trackleter; | |
132 | // here set cuts (from RecoParam) | |
133 | if(GetRecoParam()->GetBkgTrackletsPlaneEff()) spdtrackleter->SetReflectClusterAroundZAxisForLayer(1,kTRUE); | |
134 | if(GetRecoParam()->GetMCTrackletsPlaneEff()) spdtrackleter->SetMC(); | |
135 | spdtrackleter->SetHistOn(); | |
136 | spdtrackleter->SetPhiWindow(GetRecoParam()->GetTrackleterPhiWindow()); | |
137 | spdtrackleter->SetZetaWindow(GetRecoParam()->GetTrackleterZetaWindow()); | |
138 | spdtrackleter->SetPhiWindowL1(GetRecoParam()->GetTrackleterPhiWindowL1()); | |
139 | spdtrackleter->SetZetaWindowL1(GetRecoParam()->GetTrackleterZetaWindowL1()); | |
140 | if(GetRecoParam()->GetUpdateOncePerEventPlaneEff()) spdtrackleter->SetUpdateOncePerEventPlaneEff(); | |
141 | //spdtrackleter->(GetRecoParam()->GetMinContVtxPlaneEff()); // to be implemented | |
142 | return trackleter; | |
143 | } | |
113c12f1 | 144 | |
121a60bd | 145 | //_____________________________________________________________________________ |
d76c31f4 | 146 | AliTracker* AliITSReconstructor::CreateTracker() const |
121a60bd | 147 | { |
148 | // create a ITS tracker | |
149 | ||
9f9cae94 | 150 | Int_t trackerOpt = GetRecoParam()->GetTracker(); |
e62c1aea | 151 | AliTracker* tracker; |
9f9cae94 | 152 | if (trackerOpt==1) { |
e341247d | 153 | tracker = new AliITStrackerMI(0); |
23197852 | 154 | AliITStrackerMI *mit=(AliITStrackerMI*)tracker; |
155 | mit->SetDetTypeRec(fDetTypeRec); | |
c0342e67 | 156 | } |
9f9cae94 | 157 | else if (trackerOpt==2) { |
c0342e67 | 158 | tracker = new AliITStrackerV2(0); |
e62c1aea | 159 | } |
160 | else { | |
cc088660 | 161 | tracker = new AliITStrackerSA(0); // inherits from AliITStrackerMI |
1966f03c | 162 | AliITStrackerSA *sat=(AliITStrackerSA*)tracker; |
23197852 | 163 | sat->SetDetTypeRec(fDetTypeRec); |
9f9cae94 | 164 | if(GetRecoParam()->GetTrackerSAOnly()) sat->SetSAFlag(kTRUE); |
1966f03c | 165 | if(sat->GetSAFlag())AliDebug(1,"Tracking Performed in ITS only\n"); |
58e8dc31 | 166 | if(GetRecoParam()->GetInwardFindingSA()){ |
167 | sat->SetInwardFinding(); | |
168 | sat->SetInnerStartLayer(GetRecoParam()->GetInnerStartLayerSA()); | |
169 | }else{ | |
12b1afb7 | 170 | sat->SetOutwardFinding(); |
171 | sat->SetOuterStartLayer(GetRecoParam()->GetOuterStartLayerSA()); | |
58e8dc31 | 172 | } |
12b1afb7 | 173 | sat->SetMinNPoints(GetRecoParam()->GetMinNPointsSA()); |
e62c1aea | 174 | } |
7d62fb64 | 175 | |
9f9cae94 | 176 | Int_t pidOpt = GetRecoParam()->GetPID(); |
177 | ||
d76c31f4 | 178 | AliITSReconstructor* nc = const_cast<AliITSReconstructor*>(this); |
9f9cae94 | 179 | if(pidOpt==1){ |
d76c31f4 | 180 | Info("FillESD","ITS LandauFitPID option has been selected\n"); |
181 | nc->fItsPID = new AliITSpidESD2((AliITStrackerMI*)tracker); | |
e62c1aea | 182 | } |
183 | else{ | |
d76c31f4 | 184 | Info("FillESD","ITS default PID\n"); |
7a8614f3 | 185 | Double_t parITS[] = {79.,0.13, 5.}; //IB: this is "pp tuning" |
d76c31f4 | 186 | nc->fItsPID = new AliITSpidESD1(parITS); |
e62c1aea | 187 | } |
38013a1a | 188 | |
e62c1aea | 189 | return tracker; |
7d62fb64 | 190 | |
121a60bd | 191 | } |
192 | ||
193 | //_____________________________________________________________________________ | |
d76c31f4 | 194 | AliVertexer* AliITSReconstructor::CreateVertexer() const |
121a60bd | 195 | { |
196 | // create a ITS vertexer | |
197 | ||
ff44c37c | 198 | AliITSVertexer *vptr; |
9f9cae94 | 199 | Int_t vtxOpt = GetRecoParam()->GetVertexer(); |
200 | if(vtxOpt==3){ | |
121a60bd | 201 | Info("CreateVertexer","a AliITSVertexerIons object has been selected\n"); |
ff44c37c | 202 | vptr = new AliITSVertexerIons(); |
121a60bd | 203 | } |
ff44c37c | 204 | else if(vtxOpt==4){ |
121a60bd | 205 | Double_t smear[3]={0.005,0.005,0.01}; |
206 | Info("CreateVertexer","a AliITSVertexerFast object has been selected\n"); | |
ff44c37c | 207 | vptr = new AliITSVertexerFast(smear); |
121a60bd | 208 | } |
ff44c37c | 209 | else if(vtxOpt==1){ |
99f38bf6 | 210 | Info("CreateVertexer","a AliITSVertexerZ object has been selected\n"); |
ff44c37c | 211 | vptr = new AliITSVertexerZ(); |
3acc14d5 | 212 | } |
ff44c37c | 213 | else if(vtxOpt==2){ |
3acc14d5 | 214 | Info("CreateVertexer","a AliITSVertexerCosmics object has been selected\n"); |
ff44c37c | 215 | vptr = new AliITSVertexerCosmics(); |
121a60bd | 216 | } |
ff44c37c | 217 | else if(vtxOpt==5){ |
c8735dd3 | 218 | Info("CreateVertexer","vertex is fixed in the position of the TDI\n"); |
ff44c37c | 219 | vptr = new AliITSVertexerFixed("TDI"); |
c8735dd3 | 220 | } |
ff44c37c | 221 | else if(vtxOpt==6){ |
c8735dd3 | 222 | Info("CreateVertexer","vertex is fixed in the position of the TED\n"); |
ff44c37c | 223 | vptr = new AliITSVertexerFixed("TED"); |
c8735dd3 | 224 | } |
ff44c37c | 225 | else { |
99f38bf6 | 226 | // by default an AliITSVertexer3D object is instatiated |
ff44c37c | 227 | Info("CreateVertexer","a AliITSVertexer3D object has been selected\n"); |
228 | AliITSVertexer3D* vtxr = new AliITSVertexer3D(); | |
229 | Float_t dzw=GetRecoParam()->GetVertexer3DWideFiducialRegionZ(); | |
230 | Float_t drw=GetRecoParam()->GetVertexer3DWideFiducialRegionR(); | |
231 | vtxr->SetWideFiducialRegion(dzw,drw); | |
232 | Float_t dzn=GetRecoParam()->GetVertexer3DNarrowFiducialRegionZ(); | |
233 | Float_t drn=GetRecoParam()->GetVertexer3DNarrowFiducialRegionR(); | |
234 | vtxr->SetNarrowFiducialRegion(dzn,drn); | |
235 | Float_t dphil=GetRecoParam()->GetVertexer3DLooseDeltaPhiCut(); | |
236 | Float_t dphit=GetRecoParam()->GetVertexer3DTightDeltaPhiCut(); | |
237 | vtxr->SetDeltaPhiCuts(dphil,dphit); | |
238 | Float_t dcacut=GetRecoParam()->GetVertexer3DDCACut(); | |
239 | vtxr->SetDCACut(dcacut); | |
240 | vptr = vtxr; | |
241 | } | |
242 | vptr->SetDetTypeRec(fDetTypeRec); | |
243 | return vptr; | |
121a60bd | 244 | } |
245 | ||
246 | //_____________________________________________________________________________ | |
d76c31f4 | 247 | void AliITSReconstructor::FillESD(TTree * /*digitsTree*/, TTree *clustersTree, |
af885e0f | 248 | AliESDEvent* esd) const |
121a60bd | 249 | { |
e62c1aea | 250 | // make PID, find V0s and cascade |
d76c31f4 | 251 | if(fItsPID!=0) { |
9f9cae94 | 252 | Int_t pidOpt = GetRecoParam()->GetPID(); |
253 | if(pidOpt==1){ | |
d76c31f4 | 254 | fItsPID->MakePID(clustersTree,esd); |
9f9cae94 | 255 | }else{ |
d76c31f4 | 256 | fItsPID->MakePID(esd); |
257 | } | |
e62c1aea | 258 | } |
259 | else { | |
260 | Error("FillESD","!! cannot do the PID !!\n"); | |
261 | } | |
121a60bd | 262 | } |