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