]>
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) |
44347160 | 47 | |
e62c1aea | 48 | //___________________________________________________________________________ |
94631b2f | 49 | AliITSReconstructor::AliITSReconstructor() : AliReconstructor(), |
6cae184e | 50 | fItsPID(0), |
51 | fDetTypeRec(0) | |
94631b2f | 52 | { |
e62c1aea | 53 | // Default constructor |
e62c1aea | 54 | } |
55 | //___________________________________________________________________________ | |
56 | AliITSReconstructor::~AliITSReconstructor(){ | |
57 | // destructor | |
58 | delete fItsPID; | |
6cae184e | 59 | if(fDetTypeRec) delete fDetTypeRec; |
e62c1aea | 60 | } |
61 | //______________________________________________________________________ | |
94631b2f | 62 | AliITSReconstructor::AliITSReconstructor(const AliITSReconstructor &ob) :AliReconstructor(ob), |
5c47990a | 63 | fItsPID(ob.fItsPID), |
64 | fDetTypeRec(ob.fDetTypeRec) | |
6cae184e | 65 | |
94631b2f | 66 | { |
e62c1aea | 67 | // Copy constructor |
e62c1aea | 68 | } |
69 | ||
70 | //______________________________________________________________________ | |
94631b2f | 71 | AliITSReconstructor& AliITSReconstructor::operator=(const AliITSReconstructor& ob ){ |
e62c1aea | 72 | // Assignment operator |
94631b2f | 73 | this->~AliITSReconstructor(); |
74 | new(this) AliITSReconstructor(ob); | |
e62c1aea | 75 | return *this; |
76 | } | |
6cae184e | 77 | |
023ae34b | 78 | //______________________________________________________________________ |
d76c31f4 | 79 | void AliITSReconstructor::Init() { |
023ae34b | 80 | // Initalize this constructor bet getting/creating the objects |
81 | // nesseary for a proper ITS reconstruction. | |
82 | // Inputs: | |
d76c31f4 | 83 | // none. |
023ae34b | 84 | // Output: |
85 | // none. | |
86 | // Return: | |
87 | // none. | |
00a7cc50 | 88 | |
108bd0fe | 89 | AliITSInitGeometry initgeom; |
90 | AliITSgeom *geom = initgeom.CreateAliITSgeom(); | |
91 | AliInfo(Form("Geometry name: %s",(initgeom.GetGeometryName()).Data())); | |
6cae184e | 92 | |
93 | fDetTypeRec = new AliITSDetTypeRec(); | |
94 | fDetTypeRec->SetITSgeom(geom); | |
95 | fDetTypeRec->SetDefaults(); | |
ed446fa3 | 96 | |
023ae34b | 97 | return; |
98 | } | |
6cae184e | 99 | |
121a60bd | 100 | //_____________________________________________________________________________ |
6cae184e | 101 | void AliITSReconstructor::Reconstruct(TTree *digitsTree, TTree *clustersTree) const |
121a60bd | 102 | { |
103 | // reconstruct clusters | |
104 | ||
9f9cae94 | 105 | Int_t cluFindOpt = GetRecoParam()->GetClusterFinder(); |
106 | Bool_t useV2=kTRUE; // Default: V2 cluster finder | |
107 | if(cluFindOpt==1) useV2=kFALSE; | |
121a60bd | 108 | |
6cae184e | 109 | fDetTypeRec->SetTreeAddressD(digitsTree); |
110 | fDetTypeRec->MakeBranch(clustersTree,"R"); | |
111 | fDetTypeRec->SetTreeAddressR(clustersTree); | |
9f9cae94 | 112 | fDetTypeRec->DigitsToRecPoints(digitsTree,clustersTree,0,"All",useV2); |
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 | } |
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"); |
9f9cae94 | 145 | sat->SetOuterStartLayer(GetRecoParam()->GetOuterStartLayerSA()); |
e62c1aea | 146 | } |
7d62fb64 | 147 | |
9f9cae94 | 148 | Int_t pidOpt = GetRecoParam()->GetPID(); |
149 | ||
d76c31f4 | 150 | AliITSReconstructor* nc = const_cast<AliITSReconstructor*>(this); |
9f9cae94 | 151 | if(pidOpt==1){ |
d76c31f4 | 152 | Info("FillESD","ITS LandauFitPID option has been selected\n"); |
153 | nc->fItsPID = new AliITSpidESD2((AliITStrackerMI*)tracker); | |
e62c1aea | 154 | } |
155 | else{ | |
d76c31f4 | 156 | Info("FillESD","ITS default PID\n"); |
7a8614f3 | 157 | Double_t parITS[] = {79.,0.13, 5.}; //IB: this is "pp tuning" |
d76c31f4 | 158 | nc->fItsPID = new AliITSpidESD1(parITS); |
e62c1aea | 159 | } |
38013a1a | 160 | |
e62c1aea | 161 | return tracker; |
7d62fb64 | 162 | |
121a60bd | 163 | } |
164 | ||
165 | //_____________________________________________________________________________ | |
d76c31f4 | 166 | AliVertexer* AliITSReconstructor::CreateVertexer() const |
121a60bd | 167 | { |
168 | // create a ITS vertexer | |
169 | ||
9f9cae94 | 170 | Int_t vtxOpt = GetRecoParam()->GetVertexer(); |
171 | if(vtxOpt==3){ | |
121a60bd | 172 | Info("CreateVertexer","a AliITSVertexerIons object has been selected\n"); |
308c2f7c | 173 | return new AliITSVertexerIons(); |
121a60bd | 174 | } |
9f9cae94 | 175 | if(vtxOpt==4){ |
121a60bd | 176 | Double_t smear[3]={0.005,0.005,0.01}; |
177 | Info("CreateVertexer","a AliITSVertexerFast object has been selected\n"); | |
178 | return new AliITSVertexerFast(smear); | |
179 | } | |
9f9cae94 | 180 | if(vtxOpt==1){ |
99f38bf6 | 181 | Info("CreateVertexer","a AliITSVertexerZ object has been selected\n"); |
182 | return new AliITSVertexerZ(); | |
3acc14d5 | 183 | } |
9f9cae94 | 184 | if(vtxOpt==2){ |
3acc14d5 | 185 | Info("CreateVertexer","a AliITSVertexerCosmics object has been selected\n"); |
186 | return new AliITSVertexerCosmics(); | |
121a60bd | 187 | } |
99f38bf6 | 188 | // by default an AliITSVertexer3D object is instatiated |
189 | Info("CreateVertexer","a AliITSVertexer3D object has been selected\n"); | |
7203e11a | 190 | AliITSVertexer3D* vtxr = new AliITSVertexer3D(); |
191 | Float_t dzw=GetRecoParam()->GetVertexer3DWideFiducialRegionZ(); | |
192 | Float_t drw=GetRecoParam()->GetVertexer3DWideFiducialRegionR(); | |
193 | vtxr->SetWideFiducialRegion(dzw,drw); | |
194 | Float_t dzn=GetRecoParam()->GetVertexer3DNarrowFiducialRegionZ(); | |
195 | Float_t drn=GetRecoParam()->GetVertexer3DNarrowFiducialRegionR(); | |
196 | vtxr->SetNarrowFiducialRegion(dzn,drn); | |
197 | Float_t dphil=GetRecoParam()->GetVertexer3DLooseDeltaPhiCut(); | |
198 | Float_t dphit=GetRecoParam()->GetVertexer3DTightDeltaPhiCut(); | |
199 | vtxr->SetDeltaPhiCuts(dphil,dphit); | |
200 | Float_t dcacut=GetRecoParam()->GetVertexer3DDCACut(); | |
201 | vtxr->SetDCACut(dcacut); | |
202 | return vtxr; | |
121a60bd | 203 | } |
204 | ||
205 | //_____________________________________________________________________________ | |
d76c31f4 | 206 | void AliITSReconstructor::FillESD(TTree * /*digitsTree*/, TTree *clustersTree, |
af885e0f | 207 | AliESDEvent* esd) const |
121a60bd | 208 | { |
e62c1aea | 209 | // make PID, find V0s and cascade |
d76c31f4 | 210 | if(fItsPID!=0) { |
9f9cae94 | 211 | Int_t pidOpt = GetRecoParam()->GetPID(); |
212 | if(pidOpt==1){ | |
d76c31f4 | 213 | fItsPID->MakePID(clustersTree,esd); |
9f9cae94 | 214 | }else{ |
d76c31f4 | 215 | fItsPID->MakePID(esd); |
216 | } | |
e62c1aea | 217 | } |
218 | else { | |
219 | Error("FillESD","!! cannot do the PID !!\n"); | |
220 | } | |
121a60bd | 221 | } |