]>
Commit | Line | Data |
---|---|---|
5a30b198 | 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 | /* | |
17 | $Id$ | |
18 | */ | |
15efbab5 | 19 | ///////////////////////////////////////////////////////////////// |
20 | // Class for the SDD beam test August2004 // | |
21 | // // | |
22 | // // | |
23 | ///////////////////////////////////////////////////////////////// | |
7d62fb64 | 24 | |
5a30b198 | 25 | #include <TGeometry.h> |
012f0f4c | 26 | #include <TGeoManager.h> |
5a30b198 | 27 | #include <TNode.h> |
5a30b198 | 28 | #include <TBRIK.h> |
8119ddd8 | 29 | #include <TLorentzVector.h> |
867f3305 | 30 | #include <TVirtualMC.h> |
3be5c40b | 31 | #include <TGeoMatrix.h> |
5a30b198 | 32 | |
867f3305 | 33 | #include "AliMC.h" |
5a30b198 | 34 | #include "AliRun.h" |
35 | #include "AliMagF.h" | |
5a30b198 | 36 | #include "AliTrackReference.h" |
37 | #include "AliITShit.h" | |
5a30b198 | 38 | #include "AliITSgeom.h" |
5a30b198 | 39 | #include "AliITSgeomSDD.h" |
40 | #include "AliITSgeomSSD.h" | |
7d62fb64 | 41 | #include "AliITSDetTypeSim.h" |
fcf95fc7 | 42 | #include "AliITSCalibrationSPD.h" |
43 | #include "AliITSCalibrationSDD.h" | |
44 | #include "AliITSCalibrationSSD.h" | |
5a30b198 | 45 | #include "AliITSsegmentationSPD.h" |
46 | #include "AliITSsegmentationSDD.h" | |
47 | #include "AliITSsegmentationSSD.h" | |
5bfe44ce | 48 | #include "AliITSsimulationSPD.h" |
5a30b198 | 49 | #include "AliITSsimulationSDD.h" |
50 | #include "AliITSsimulationSSD.h" | |
5a30b198 | 51 | |
012f0f4c | 52 | #include "AliITSvSDD03.h" |
7d62fb64 | 53 | |
5a30b198 | 54 | ClassImp(AliITSvSDD03) |
55 | ||
56 | //______________________________________________________________________ | |
8119ddd8 | 57 | AliITSvSDD03::AliITSvSDD03() : |
aacedc3e | 58 | AliITS(), |
59 | fGeomDetOut(kFALSE), | |
60 | fGeomDetIn(kFALSE), | |
012f0f4c | 61 | fMajorVersion(IsVersion()), |
aacedc3e | 62 | fMinorVersion(2), |
63 | fEuclidGeomDet(), | |
64 | fRead(), | |
65 | fWrite(), | |
aacedc3e | 66 | fIDMother(0), |
012f0f4c | 67 | fYear(2003), |
68 | fTarg(kNoTarg), | |
69 | fTargThick(0.0), | |
70 | fIgm(kvSDD03){ | |
5a30b198 | 71 | //////////////////////////////////////////////////////////////////////// |
72 | // Standard default constructor for the ITS SDD test beam 2002 version 1. | |
73 | // Inputs: | |
74 | // none. | |
75 | // Outputs: | |
76 | // none. | |
77 | // Return: | |
78 | // A default created class. | |
79 | //////////////////////////////////////////////////////////////////////// | |
80 | Int_t i; | |
81 | ||
82 | fIdN = 0; | |
83 | fIdName = 0; | |
84 | fIdSens = 0; | |
85 | fEuclidOut = kFALSE; // Don't write Euclide file | |
5a30b198 | 86 | for(i=0;i<60;i++) fRead[i] = '\0'; |
87 | for(i=0;i<60;i++) fWrite[i] = '\0'; | |
88 | for(i=0;i<60;i++) fEuclidGeomDet[i] = '\0'; | |
89 | } | |
90 | //______________________________________________________________________ | |
8119ddd8 | 91 | AliITSvSDD03::AliITSvSDD03(const char *title,Int_t year): |
aacedc3e | 92 | AliITS("ITS", title), |
93 | fGeomDetOut(kFALSE), | |
94 | fGeomDetIn(kFALSE), | |
012f0f4c | 95 | fMajorVersion(IsVersion()), |
aacedc3e | 96 | fMinorVersion(2), |
97 | fEuclidGeomDet(), | |
98 | fRead(), | |
99 | fWrite(), | |
aacedc3e | 100 | fIDMother(0), |
012f0f4c | 101 | fYear(year), |
102 | fTarg(kNoTarg), | |
103 | fTargThick(0.0), | |
104 | fIgm(kvSDD03){ | |
5a30b198 | 105 | //////////////////////////////////////////////////////////////////////// |
106 | // Standard constructor for the ITS SDD testbeam 2002 version 1. | |
107 | // Inputs: | |
108 | // const char *title title for this ITS geometry. | |
109 | // Outputs: | |
110 | // none. | |
111 | // Return: | |
112 | // A standard created class. | |
113 | //////////////////////////////////////////////////////////////////////// | |
114 | Int_t i; | |
115 | ||
8119ddd8 | 116 | fIdN = 3; |
5a30b198 | 117 | fIdName = new TString[fIdN]; |
118 | fIdName[0] = "IMBS"; | |
119 | fIdName[1] = "ITST"; | |
8119ddd8 | 120 | fIdName[2] = "ISNT"; |
5a30b198 | 121 | fIdSens = new Int_t[fIdN]; |
122 | for(i=0;i<fIdN;i++) fIdSens[i] = 0; | |
5a30b198 | 123 | fEuclidOut = kFALSE; // Don't write Euclide file |
5a30b198 | 124 | |
125 | fEuclidGeometry="$ALICE_ROOT/ITS/ITSgeometry_vSDD032.euc"; | |
126 | strncpy(fEuclidGeomDet,"$ALICE_ROOT/ITS/ITSgeometry_vSDD032.det",60); | |
127 | strncpy(fRead,fEuclidGeomDet,60); | |
128 | strncpy(fWrite,fEuclidGeomDet,60); | |
129 | } | |
130 | //______________________________________________________________________ | |
5a30b198 | 131 | AliITSvSDD03::~AliITSvSDD03() { |
132 | //////////////////////////////////////////////////////////////////////// | |
133 | // Standard destructor for the ITS SDD test beam 2002 version 1. | |
134 | // Inputs: | |
135 | // none. | |
136 | // Outputs: | |
137 | // none. | |
138 | // Return: | |
139 | // none. | |
140 | //////////////////////////////////////////////////////////////////////// | |
141 | } | |
142 | //______________________________________________________________________ | |
143 | void AliITSvSDD03::BuildGeometry(){ | |
144 | //////////////////////////////////////////////////////////////////////// | |
145 | // Geometry builder for the ITS SDD test beam 2002 version 1. | |
146 | // ALIC ALICE Mother Volume | |
147 | // |- ITSV ITS Mother Volume | |
148 | // |- IDET Detector under Test | |
149 | // | |- ITS0 SDD Si Chip | |
150 | // | | |- ITST SDD Sensitivve Volume | |
151 | // | |- IPC0 *5 Readout chip | |
152 | // |- ITEL *4 SDD Telescope | |
153 | // |- IMB0 SDD Si Chip | |
154 | // | |- IMBS SDD Sensitive volume | |
155 | // |- ICMB Chip MiniBus. | |
156 | // Inputs: | |
157 | // none. | |
158 | // Outputs: | |
159 | // none. | |
160 | // Return: | |
161 | // none. | |
162 | //////////////////////////////////////////////////////////////////////// | |
163 | // Get the top alice volume. | |
8119ddd8 | 164 | TNode *nALIC = gAlice->GetGeometry()->GetNode("alice"); |
165 | nALIC->cd(); | |
5a30b198 | 166 | |
167 | // Define ITS Mother Volume | |
168 | Float_t data[3]; | |
169 | Float_t ddettest=200.0E-4,ddettelescope=300.0E-4; | |
5a30b198 | 170 | //Float_t yposition= 0.0; |
171 | TRotMatrix *r0 = new TRotMatrix("ITSidrotm0","ITSidrotm0", | |
172 | 90.0,0,0.0,0,90.0,270.0); | |
173 | data[0] = 10.0; | |
15efbab5 | 174 | data[1] = 10.0; |
5a30b198 | 175 | data[2] = 100.0; |
8119ddd8 | 176 | TBRIK *sITSVshape =new TBRIK("ITSVshape","ITS Logical Mother Volume","Air", |
5a30b198 | 177 | data[0],data[1],data[2]); |
8119ddd8 | 178 | TNode *sITSV = new TNode("ITSV","ITS Mother Volume",sITSVshape, |
5a30b198 | 179 | 0.0,0.0,0.0,0,0); |
8119ddd8 | 180 | sITSV->cd(); // set ourselve into ITSV subvolume of ALIC |
5a30b198 | 181 | |
15efbab5 | 182 | // SSD part of telescope (MiniBuS) |
183 | data[0] = 1.06; | |
5a30b198 | 184 | data[1] = 0.5*ddettelescope; |
15efbab5 | 185 | data[2] = 1.1; |
8119ddd8 | 186 | TBRIK *sIMB0shape = new TBRIK("IMB0shape","SDD wafer","Si", |
5a30b198 | 187 | data[0],data[1],data[2]); |
188 | Float_t detMiniBusX,detMiniBusY,detMiniBusZ; | |
15efbab5 | 189 | data[0] = detMiniBusX = 0.5*384*50.0E-4; |
5a30b198 | 190 | data[1] = detMiniBusY = 0.5*ddettelescope; |
15efbab5 | 191 | data[2] = detMiniBusZ = 1.0; |
8119ddd8 | 192 | TBRIK *sIMBSshape = new TBRIK("IMBSshape","SDD Sensitive volume","Si", |
5a30b198 | 193 | data[0],data[1],data[2]); |
15efbab5 | 194 | |
195 | data[0] = 1.36; | |
196 | data[1] = 0.47; | |
197 | data[2] = 1.36; | |
8119ddd8 | 198 | TBRIK *sITELshape = new TBRIK("ITELshape","ITELshape","Air", |
5a30b198 | 199 | data[0],data[1],data[2]); |
200 | ||
15efbab5 | 201 | |
5a30b198 | 202 | // SDD under test |
15efbab5 | 203 | Float_t spdX,spdY,spdZ; |
204 | data[0] = 3.62500; | |
205 | data[1] = 0.5*ddettest; | |
206 | data[2] = 4.37940; | |
8119ddd8 | 207 | TBRIK *sITS0shape = new TBRIK("ITS0shape","SDD wafer","Si", |
5a30b198 | 208 | data[0],data[1],data[2]); // contains detector |
15efbab5 | 209 | data[0] = spdX = 3.50860; |
210 | data[1] = spdY = 0.5*ddettest; | |
211 | data[2] = spdZ = 3.76320; | |
8119ddd8 | 212 | TBRIK *sITSTshape = new TBRIK("ITSTshape","SDD sensitive volume","Si", |
5a30b198 | 213 | data[0],data[1],data[2]); |
15efbab5 | 214 | |
215 | data[0] = 4.2; | |
216 | data[1] = 0.52; | |
217 | data[2] = 5.2; | |
8119ddd8 | 218 | TBRIK *sIDETshape = new TBRIK("IDETshape","Detector Under Test","Air", |
5a30b198 | 219 | data[0],data[1],data[2]); |
15efbab5 | 220 | |
221 | ||
5a30b198 | 222 | // Place volumes in geometry |
5a30b198 | 223 | char name[20],title[50]; |
15efbab5 | 224 | |
225 | //place SDD under test | |
226 | Double_t px=0.0,py=0.0; | |
227 | Double_t pz[2]={0.0,5.2}; | |
228 | TNode *nIDET[2],*nITS0[2],*nITST[2]; | |
229 | for(Int_t i=0;i<2;i++){ | |
230 | sITSV->cd(); | |
231 | sprintf(name,"IDET%d",i); | |
232 | sprintf(title,"SDD #%d under test",i+1); | |
233 | nIDET[i] = new TNode(name,title,sIDETshape,px,py,pz[i],r0,0); | |
234 | nIDET[i]->cd(); | |
235 | nITS0[i] = new TNode("ITS0","SDD wafer",sITS0shape,0.0,0.0,0.0,0,0); | |
236 | nITS0[i]->cd(); | |
237 | nITST[i] = new TNode("ITST","SDD sensitive volume",sITSTshape, | |
5a30b198 | 238 | 0.0,0.0,0.0,0,0); |
15efbab5 | 239 | nITST[i]->SetLineColor(kYellow); |
240 | fNodes->Add(nITST[i]); | |
241 | } // end for i | |
242 | ||
243 | //place SSD telescope planes | |
244 | Double_t qx=0.0,qy=0.0; | |
245 | Double_t qz[10]={-58.4,-57.4,-50.4,-49.4,60.1,61.1,68.4,69.4,87.7,88.7}; | |
246 | TNode *nITEL[10],*nIMB0[10],*nIMBS[10]; | |
247 | for(Int_t i=0;i<10;i++){ | |
8119ddd8 | 248 | sITSV->cd(); |
5a30b198 | 249 | sprintf(name,"ITEL%d",i); |
250 | sprintf(title,"Test beam telescope element #%d",i+1); | |
15efbab5 | 251 | nITEL[i] = new TNode(name,title,sITELshape,qx,qy,qz[i],r0,0); |
8119ddd8 | 252 | nITEL[i]->cd(); |
8119ddd8 | 253 | nIMB0[i] = new TNode("IMB0","Chip MiniBus",sIMB0shape, |
15efbab5 | 254 | 0.0, 0.0,0.0,0,0); |
8119ddd8 | 255 | nIMB0[i]->cd(); |
256 | nIMBS[i] = new TNode("IMBS","IMBS",sIMBSshape,0.0,0.0,0.0,0,0); | |
8119ddd8 | 257 | nIMBS[i]->SetLineColor(kGreen); |
258 | fNodes->Add(nIMBS[i]); | |
5a30b198 | 259 | } // end for i |
15efbab5 | 260 | nALIC->cd(); |
261 | sITSV->Draw(); | |
5a30b198 | 262 | } |
012f0f4c | 263 | /* |
5a30b198 | 264 | //______________________________________________________________________ |
8119ddd8 | 265 | Int_t AliITSvSDD03::DecodeDetector(Int_t id,Int_t cpy,Int_t &lay, |
15efbab5 | 266 | Int_t &det,Int_t &lad) const{ |
8119ddd8 | 267 | // Given the Geant id and copy volume number, returns the layer, ladder, |
268 | // and detector number, allong with the module number of the detector | |
269 | // involved. Returns -1 and lay=0, lad=0, and det=0 if not a sensitive | |
270 | // volume. | |
271 | // Inputs: | |
272 | // Int_t id Geometry volume id number | |
273 | // Int_t cpy Geometry copy number | |
274 | // Outputs: | |
275 | // Int_t lay ITS layer number | |
276 | // Int_t lad ITS ladder number | |
277 | // Int_t det ITS detector number | |
278 | // Return: | |
279 | // Int_t module number. | |
280 | Int_t mod; | |
281 | ||
282 | lay = 0; lad = 0; det = 0; mod = -1; | |
283 | if(id==fIdSens[0]){ // Volume name is IMBS (ITEL) | |
284 | lad = 1; det = 1; | |
285 | lay = cpy; | |
15efbab5 | 286 | if(cpy>4) lay+=2; |
8119ddd8 | 287 | mod = lay-1; |
288 | return mod; | |
289 | }// end if | |
290 | if(id==fIdSens[1]){ // Volume name is ITST (IDet) | |
15efbab5 | 291 | lad = 1; det = 1;lay = cpy+4; |
292 | mod = lay-1; | |
8119ddd8 | 293 | return mod; |
294 | }// end if | |
295 | return mod; | |
296 | } | |
012f0f4c | 297 | */ |
8119ddd8 | 298 | //______________________________________________________________________ |
5a30b198 | 299 | void AliITSvSDD03::CreateGeometry(){ |
300 | //////////////////////////////////////////////////////////////////////// | |
301 | // This routine defines and Creates the geometry for version 1 of the ITS. | |
302 | // ALIC ALICE Mother Volume | |
303 | // |- ITSV ITS Mother Volume | |
012f0f4c | 304 | // |- IDET *2 Detector under Test (boxcontaining SDD) |
5a30b198 | 305 | // | |-IDAI Air inside box |
306 | // | |- ITS0 SDD Si Chip | |
307 | // | |- ITST SDD Sensitivve Volume | |
308 | // |- ITEL *10 SSD Telescope (plastic box containting SSD's) | |
309 | // | |- ITAI Air inside box | |
310 | // | |- IMB0 SDD Si Chip | |
311 | // | |- IMBS SDD Sensitive volume | |
312 | // |-ISNT*4 Sintilator triggers | |
012f0f4c | 313 | // |
314 | // ITEL ITEL ITEL ITEL IDET IDET ITEL ITEL ITEL ITEL ITEL ITEL | |
315 | // Z-> -584 -574 -504 -494 000 +052 +601 +610 +684 +694 +877 +887 | |
316 | // | | | | | | | | | | | | | |
317 | // cpn1 1 2 3 4 1 2 5 6 7 8 9 10 | |
318 | // | |
5a30b198 | 319 | // Inputs: |
320 | // none. | |
321 | // Outputs: | |
322 | // none. | |
323 | // Return: | |
324 | // none. | |
325 | //////////////////////////////////////////////////////////////////////// | |
326 | Float_t data[49]; | |
327 | // Define media off-set | |
328 | Int_t *idtmed = fIdtmed->GetArray()+1; // array of media indexes | |
329 | Int_t idrotm[4]; // Array of rotation matrix indexes | |
330 | //Float_t ddettest=200.0E-4,ddettelescope=300.0E-4; | |
331 | //Float_t dchipMiniBus=750.0E-4,dchiptest=300.0E-4; | |
332 | //Float_t yposition= 0.0; | |
15efbab5 | 333 | const Float_t kmm=0.1,kcm=1.0,kmicm=kmm/1000.; |
012f0f4c | 334 | // These constant character strings are set by cvs during commit |
335 | // do not change them unless you know what you are doing! | |
336 | const Char_t *cvsDate="$Date$"; | |
337 | const Char_t *cvsRevision="$Revision$"; | |
5a30b198 | 338 | // Define Rotation-reflextion Matrixes needed |
339 | // 0 is the unit matrix | |
340 | AliMatrix(idrotm[0], 90.0,0.0, 0.0,0.0, 90.0,270.0); // SDD and SSD X | |
15efbab5 | 341 | AliMatrix(idrotm[1], 90.0,90.0, 0.0,180.0, 90.0,270.0); // SSD Y |
342 | AliMatrix(idrotm[2],90.0,90.0,90.0,180.0,0.0,0.0); //Rotate about Z 90 degree | |
012f0f4c | 343 | /* |
15efbab5 | 344 | data[0] = 150.0*kmm; |
345 | data[1] = 150.0*kmm; | |
346 | data[2] = 1100.0*kmm; | |
5a30b198 | 347 | gMC->Gsvolu("ITSV","BOX ",idtmed[0],data,3); |
348 | gMC->Gspos("ITSV",1,"ALIC",0.0,0.0,0.0,0,"ONLY"); | |
012f0f4c | 349 | */ |
350 | TGeoVolumeAssembly *itsV = gGeoManager->MakeVolumeAssembly("ITSV"); | |
4952f440 | 351 | const Int_t kLength=100; |
352 | Char_t vstrng[kLength]; | |
353 | if(fIgm.WriteVersionString(vstrng,kLength,(AliITSVersion_t)IsVersion(), | |
012f0f4c | 354 | fMinorVersion,cvsDate,cvsRevision)) |
355 | itsV->SetTitle(vstrng); | |
356 | else Error("CreateGeometry","Error writing/setting version string"); | |
357 | //printf("Title set to %s\n",vstrng); | |
358 | TGeoVolume *alic = gGeoManager->GetVolume("ALIC"); | |
359 | if(alic==0) { | |
360 | Error("CreateGeometry","alic=0"); | |
361 | return; | |
362 | } // end if | |
363 | alic->AddNode(itsV,1,0); | |
15efbab5 | 364 | |
5a30b198 | 365 | // Crossed sintilator triggers (2 in front 2 in back) |
5a30b198 | 366 | data[0] = 10.0*kcm; |
367 | data[1] = 2.0*kcm; | |
368 | data[2] = 2.0*kmm; | |
8119ddd8 | 369 | gMC->Gsvolu("ISNT","BOX ",idtmed[2],data,3); |
15efbab5 | 370 | gMC->Gspos("ISNT",1,"ITSV",0.0,0.0,-950.0*kmm,0,"ONLY"); |
371 | gMC->Gspos("ISNT",2,"ITSV",0.0,0.0,-950.0*kmm-data[2],idrotm[2],"ONLY"); | |
372 | gMC->Gspos("ISNT",3,"ITSV",0.0,0.0,950.0*kmm+data[2],0,"ONLY"); | |
373 | gMC->Gspos("ISNT",4,"ITSV",0.0,0.0,950.0*kmm,idrotm[2],"ONLY"); | |
374 | ||
375 | ||
376 | ////Create Volumes | |
377 | ||
5a30b198 | 378 | // SSD part of telescope (MiniBuS) |
15efbab5 | 379 | Float_t detMiniBusX,detMiniBusY,detMiniBusZ; |
5a30b198 | 380 | data[0] = detMiniBusX = 10600.0*kmicm; |
15efbab5 | 381 | data[1] = detMiniBusY = 0.150*kmm; |
5a30b198 | 382 | data[2] = detMiniBusZ = 1.1*kcm; |
383 | gMC->Gsvolu("IMB0", "BOX ", idtmed[1], data, 3); // contains detector | |
384 | data[0] = 0.5*384*50*kmicm; | |
15efbab5 | 385 | data[1] = 0.1499*kmm; |
5a30b198 | 386 | data[2] = 1.0*kcm; |
15efbab5 | 387 | gMC->Gsvolu("IMBS","BOX ",idtmed[1],data,3); // sensitive detector volume |
5a30b198 | 388 | gMC->Gspos("IMBS",1,"IMB0",0.0,0.0,0.0,0,"ONLY"); // place IMBS inside |
389 | // Box containing SSD's | |
15efbab5 | 390 | data[0] = 11600.0*kmicm; |
391 | data[1] = 0.450*kcm; | |
392 | data[2] = 1.16*kcm; | |
5a30b198 | 393 | gMC->Gsvolu("ITAI","BOX ",idtmed[0],data,3); |
394 | // Plastic box size = insize + thickness. | |
395 | data[0] = data[0] + 2.0*kmm; | |
396 | data[1] = data[1] + 200.0*kmicm; | |
397 | data[2] = data[2] + 2.0*kmm; | |
8119ddd8 | 398 | gMC->Gsvolu("ITEL","BOX ",idtmed[3],data,3); |
5a30b198 | 399 | gMC->Gspos("ITAI",1,"ITEL",0.0,0.0,0.0,0,"ONLY"); |
8119ddd8 | 400 | gMC->Gspos("IMB0",1,"ITAI",0.0,0.0,0.0,0,"ONLY"); |
5a30b198 | 401 | |
402 | // SDD under test | |
403 | Float_t sddX,sddY,sddZ; | |
404 | data[0] = sddX = 3.62500*kcm; | |
15efbab5 | 405 | data[1] = sddY = 0.1500*kmm; |
5a30b198 | 406 | data[2] = sddZ = 4.37940*kcm; |
407 | gMC->Gsvolu("ITS0", "BOX ", idtmed[1], data, 3); // contains detector | |
408 | data[0] = 3.50860*kcm; | |
15efbab5 | 409 | data[1] = 0.1499*kmm; |
5a30b198 | 410 | data[2] = 3.76320*kcm; |
411 | gMC->Gsvolu("ITST","BOX ",idtmed[1],data,3);// sensitive detecor volume | |
412 | gMC->Gspos("ITST",1,"ITS0",0.0,0.0,0.0,0,"ONLY"); // place ITST inside | |
413 | // Box containing SDD under test | |
414 | data[0] = 4.0*kcm; | |
415 | data[1] = 0.5*kcm; | |
416 | data[2] = 5.0*kcm; | |
417 | gMC->Gsvolu("IDAI","BOX ",idtmed[0],data,3); | |
418 | data[0] = data[0] + 2.0*kmm; | |
419 | data[1] = data[1] + 200.0*kmicm; | |
8119ddd8 | 420 | data[2] = data[2] + 2.0*kmm; |
421 | gMC->Gsvolu("IDET","BOX ",idtmed[3],data,3); | |
5a30b198 | 422 | gMC->Gspos("IDAI",1,"IDET",0.0,0.0,0.0,0,"ONLY"); |
423 | gMC->Gspos("ITS0",1,"IDAI",0.0,0.0,0.0,0,"ONLY"); | |
424 | ||
15efbab5 | 425 | |
426 | //// Position detectors, Beam Axis Z, X to the right, Y up to the sky. | |
427 | // Upsteram planes of the telescope | |
5a30b198 | 428 | Float_t p00X,p00Y,p00Z,p01X,p01Y,p01Z,p10X,p10Y,p10Z,p11X,p11Y,p11Z; |
429 | p00X = 0.0*kcm; | |
430 | p00Y = 0.0*kcm; | |
15efbab5 | 431 | p00Z = -584*kmm; |
5a30b198 | 432 | gMC->Gspos("ITEL",1,"ITSV",p00X,p00Y,p00Z,idrotm[0],"ONLY");//SSD X |
433 | p01X = 0.0*kcm; | |
434 | p01Y = 0.0*kcm; | |
15efbab5 | 435 | p01Z = -574*kmm; |
5a30b198 | 436 | gMC->Gspos("ITEL",2,"ITSV",p01X,p01Y,p01Z,idrotm[1],"ONLY");//SSD Y |
437 | p01X = 0.0*kcm; | |
438 | p01Y = 0.0*kcm; | |
15efbab5 | 439 | p01Z = -504*kmm; |
5a30b198 | 440 | gMC->Gspos("ITEL",3,"ITSV",p01X,p01Y,p01Z,idrotm[0],"ONLY");//SSD X |
441 | p01X = 0.0*kcm; | |
442 | p01Y = 0.0*kcm; | |
15efbab5 | 443 | p01Z = -494*kmm; |
5a30b198 | 444 | gMC->Gspos("ITEL",4,"ITSV",p01X,p01Y,p01Z,idrotm[1],"ONLY");//SSD Y |
15efbab5 | 445 | |
446 | // Downstream planes of the telescope | |
5a30b198 | 447 | p10X = 0.0*kcm; |
448 | p10Y = 0.0*kcm; | |
15efbab5 | 449 | p10Z = +601.0*kmm; |
5a30b198 | 450 | gMC->Gspos("ITEL",5,"ITSV",p10X,p10Y,p10Z,idrotm[0],"ONLY");//SSD X |
451 | p11X = 0.0*kcm; | |
452 | p11Y = 0.0*kcm; | |
15efbab5 | 453 | p11Z = +610.0*kmm; //611.0 |
5a30b198 | 454 | gMC->Gspos("ITEL",6,"ITSV",p11X,p11Y,p11Z,idrotm[1],"ONLY");//SSD Y |
455 | p11X = 0.0*kcm; | |
456 | p11Y = 0.0*kcm; | |
15efbab5 | 457 | p11Z = +684.0*kmm; |
5a30b198 | 458 | gMC->Gspos("ITEL",7,"ITSV",p11X,p11Y,p11Z,idrotm[0],"ONLY");//SSD X |
459 | p11X = 0.0*kcm; | |
460 | p11Y = 0.0*kcm; | |
15efbab5 | 461 | p11Z = +694.0*kmm; |
5a30b198 | 462 | gMC->Gspos("ITEL",8,"ITSV",p11X,p11Y,p11Z,idrotm[1],"ONLY");//SSD Y |
463 | p11X = 0.0*kcm; | |
464 | p11Y = 0.0*kcm; | |
15efbab5 | 465 | p11Z = +877.0*kmm; |
5a30b198 | 466 | gMC->Gspos("ITEL",9,"ITSV",p11X,p11Y,p11Z,idrotm[0],"ONLY");//SSD X |
467 | p11X = 0.0*kcm; | |
468 | p11Y = 0.0*kcm; | |
15efbab5 | 469 | p11Z = +887.0*kmm; |
5a30b198 | 470 | gMC->Gspos("ITEL",10,"ITSV",p11X,p11Y,p11Z,idrotm[1],"ONLY");//SSD Y |
15efbab5 | 471 | |
472 | // SDDs | |
473 | Float_t pdet1X,pdet1Y,pdet1Z; | |
474 | Float_t pdet2X,pdet2Y,pdet2Z; | |
475 | pdet1X = 0.0*kcm; | |
476 | pdet1Y = 0.0*kcm; | |
477 | pdet1Z = 0.0*kcm; | |
478 | gMC->Gspos("IDET",1,"ITSV",pdet1X,pdet1Y,pdet1Z,idrotm[0],"ONLY");// Detector1 | |
479 | pdet2X = 0.0*kcm; | |
480 | pdet2Y = 0.0*kcm; | |
481 | pdet2Z = 52*kmm; //52 | |
482 | gMC->Gspos("IDET",2,"ITSV",pdet2X,pdet2Y,pdet2Z,idrotm[0],"ONLY");// Detector2 | |
483 | ||
484 | // Target definition and placement | |
485 | if(fTarg){ | |
486 | data[0] = 30*kmm; | |
487 | data[1] = fTargThick*kmm; // Target thickness | |
488 | data[2] = 30*kmm; | |
489 | gMC->Gsvolu("ITGT","BOX ",idtmed[fTarg],data,3); | |
490 | ||
491 | Float_t a,z,dens,radl,absl; | |
492 | Float_t* ubuf=0; Int_t nbuf; | |
493 | char* ssss=""; | |
494 | gMC->Gfmate(idtmed[fTarg],ssss,a,z,dens,radl,absl,ubuf,nbuf); | |
495 | ||
496 | Info("CreateGeometry","Target A=%f, Z=%f, dens=%f",a,z,dens); | |
497 | Info("Creategeometry","Target thickness=%f mm",fTargThick); | |
498 | ||
499 | Float_t ptgtX,ptgtY,ptgtZ; | |
500 | ptgtX = 0.0*kcm; | |
501 | ptgtY = 0.0*kcm; | |
502 | ptgtZ = -50*kmm; | |
503 | gMC->Gspos("ITGT",1,"ITSV",ptgtX,ptgtY,ptgtZ,idrotm[0],"ONLY");// Target | |
504 | }else{ | |
505 | Info("CreateGeometry","No target defined"); | |
506 | } | |
5a30b198 | 507 | } |
508 | //______________________________________________________________________ | |
509 | void AliITSvSDD03::CreateMaterials(){ | |
510 | //////////////////////////////////////////////////////////////////////// | |
511 | // | |
512 | // Create ITS SDD test beam materials | |
513 | // This function defines the default materials used in the Geant | |
514 | // Monte Carlo simulations for the geometries AliITSv1, AliITSv3, | |
515 | // AliITSvSDD03. | |
516 | // In general it is automatically replaced by | |
023ae34b | 517 | // the CreateMaterials routine defined in AliITSv?. Should the function |
5a30b198 | 518 | // CreateMaterials not exist for the geometry version you are using this |
519 | // one is used. See the definition found in AliITSv5 or the other routine | |
520 | // for a complete definition. | |
521 | // | |
522 | // Inputs: | |
523 | // none. | |
524 | // Outputs: | |
525 | // none. | |
526 | // Return: | |
527 | // none. | |
528 | ///////////////////////////////////////////////////////////////////////// | |
529 | Float_t tmaxfdSi = 0.1; // Degree | |
15efbab5 | 530 | Float_t stemaxSi = 0.0075; // cm //0.0075 |
5a30b198 | 531 | Float_t deemaxSi = 0.1; // Fraction of particle's energy 0<deemax<=1 |
532 | Float_t epsilSi = 1.0E-4;// | |
533 | Float_t stminSi = 0.0; // cm "Default value used" | |
534 | ||
535 | Float_t tmaxfdAir = 0.1; // Degree | |
15efbab5 | 536 | Float_t stemaxAir = .10000E+01; // 1 cm //cm |
5a30b198 | 537 | Float_t deemaxAir = 0.1; // Fraction of particle's energy 0<deemax<=1 |
538 | Float_t epsilAir = 1.0E-4;// | |
539 | Float_t stminAir = 0.0; // cm "Default value used" | |
540 | Int_t ifield = gAlice->Field()->Integ(); | |
541 | Float_t fieldm = gAlice->Field()->Max(); | |
542 | // | |
5a30b198 | 543 | |
15efbab5 | 544 | // AIR |
545 | Float_t aAir[4]={12.0107,14.0067,15.9994,39.948}; | |
546 | Float_t zAir[4]={6.,7.,8.,18.}; | |
547 | Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827}; | |
548 | Float_t dAir = 1.20479E-3; | |
549 | // Lucite/Plexiglass | |
550 | Float_t aLuc[3] = {1.,12.,16.}; | |
551 | Float_t zLuc[3] = {1.,6.,8.}; | |
552 | Float_t wLuc[3] = {8.,5.,2.}; | |
553 | Float_t dLuc = 1.19; | |
554 | // stainless steel | |
555 | Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 }; | |
556 | Float_t zsteel[4] = { 26.,24.,28.,14. }; | |
557 | Float_t wsteel[4] = { .715,.18,.1,.005 }; | |
558 | Float_t dsteel = 7.88; | |
559 | ||
560 | AliMixture(1, "AIR$",aAir,zAir,dAir,4,wAir); | |
561 | AliMaterial(2,"SI$",28.086,14.0,2.3300,9.3600,999.00); | |
562 | AliMixture(3,"Sintilator$",aLuc,zLuc,dLuc,-3,wLuc); | |
563 | AliMixture(4,"PlasticBox$",aLuc,zLuc,dLuc,-3,wLuc); | |
564 | AliMaterial(5, "IRON$", 55.85, 26., 7.87, 1.76, 999.00); | |
565 | AliMaterial(6, "LEAD$", 207.19, 82., 11.35, .56, 999.00); | |
566 | AliMixture(7, "STAINLESS STEEL$", asteel, zsteel,dsteel, 4, wsteel); | |
567 | AliMaterial(9, "C$", 12.011, 6., 2.265, 18.8, 999.00); | |
568 | AliMaterial(10, "Al$", 26.98, 13., 2.70, 8.9, 999.00); | |
569 | AliMaterial(11, "Be$", 9.012, 4., 1.848, 35.3, 999.00); | |
570 | AliMaterial(12, "Ti$", 47.88, 22., 4.54, 3.56, 999.00); | |
571 | AliMaterial(13, "Sn$", 118.69, 50., 7.31, 1.21, 999.00); | |
572 | AliMaterial(14, "Cu$", 63.55, 29., 8.96, 1.43, 999.00); | |
573 | AliMaterial(15, "Ge$", 72.59, 32., 5.323, 2.30, 999.00); | |
574 | AliMaterial(20, "W$", 183.85, 74., 19.3, 0.35, 999.00); | |
575 | ||
5a30b198 | 576 | AliMedium(1,"AIR$",1,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir, |
577 | epsilAir,stminAir); | |
5a30b198 | 578 | AliMedium(2,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, |
579 | epsilSi,stminSi); | |
15efbab5 | 580 | AliMedium(3,"Scintillator$",3,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, |
581 | epsilSi,stminSi); | |
5a30b198 | 582 | AliMedium(4,"PlasticBox$",4,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, |
583 | epsilSi,stminSi); | |
15efbab5 | 584 | AliMedium(5,"IRON$",5,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, |
585 | epsilSi,stminSi); | |
586 | AliMedium(6,"LEAD$",6,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
587 | epsilSi,stminSi); | |
588 | AliMedium(7,"StainlessSteel$",7,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
589 | epsilSi,stminSi); | |
590 | ||
591 | AliMedium(9,"C$",9,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi); | |
592 | AliMedium(10,"Al$",10,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi); | |
593 | AliMedium(11,"Be$",11,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi); | |
594 | AliMedium(12,"Ti$",12,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi); | |
595 | AliMedium(13,"Sn$",13,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi); | |
596 | AliMedium(14,"Cu$",14,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi); | |
597 | AliMedium(15,"Ge$",15,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi); | |
598 | AliMedium(20,"W$",20,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi); | |
599 | //dummy materials to avoid warning during simulation (galice.cuts) | |
600 | ||
601 | AliMedium(21,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
602 | epsilSi,stminSi); | |
603 | AliMedium(25,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
604 | epsilSi,stminSi); | |
605 | AliMedium(26,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
606 | epsilSi,stminSi); | |
607 | AliMedium(27,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
608 | epsilSi,stminSi); | |
609 | AliMedium(51,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
610 | epsilSi,stminSi); | |
611 | AliMedium(52,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
612 | epsilSi,stminSi); | |
613 | AliMedium(53,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
614 | epsilSi,stminSi); | |
615 | AliMedium(54,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
616 | epsilSi,stminSi); | |
617 | AliMedium(55,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
618 | epsilSi,stminSi); | |
619 | AliMedium(56,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
620 | epsilSi,stminSi); | |
621 | AliMedium(61,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
622 | epsilSi,stminSi); | |
623 | AliMedium(62,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
624 | epsilSi,stminSi); | |
625 | AliMedium(63,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
626 | epsilSi,stminSi); | |
627 | AliMedium(64,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
628 | epsilSi,stminSi); | |
629 | AliMedium(65,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
630 | epsilSi,stminSi); | |
631 | AliMedium(68,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
632 | epsilSi,stminSi); | |
633 | AliMedium(69,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
634 | epsilSi,stminSi); | |
635 | AliMedium(70,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
636 | epsilSi,stminSi); | |
637 | AliMedium(71,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
638 | epsilSi,stminSi); | |
639 | AliMedium(72,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
640 | epsilSi,stminSi); | |
641 | AliMedium(73,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
642 | epsilSi,stminSi); | |
643 | AliMedium(74,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
644 | epsilSi,stminSi); | |
645 | AliMedium(75,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
646 | epsilSi,stminSi); | |
647 | AliMedium(76,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
648 | epsilSi,stminSi); | |
649 | AliMedium(77,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
650 | epsilSi,stminSi); | |
651 | AliMedium(78,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
652 | epsilSi,stminSi); | |
653 | AliMedium(79,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
654 | epsilSi,stminSi); | |
655 | AliMedium(80,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
656 | epsilSi,stminSi); | |
657 | AliMedium(81,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
658 | epsilSi,stminSi); | |
659 | AliMedium(82,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
660 | epsilSi,stminSi); | |
661 | AliMedium(83,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
662 | epsilSi,stminSi); | |
663 | AliMedium(84,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
664 | epsilSi,stminSi); | |
665 | AliMedium(85,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
666 | epsilSi,stminSi); | |
667 | AliMedium(90,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
668 | epsilSi,stminSi); | |
669 | AliMedium(91,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
670 | epsilSi,stminSi); | |
671 | AliMedium(92,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
672 | epsilSi,stminSi); | |
673 | AliMedium(93,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
674 | epsilSi,stminSi); | |
675 | AliMedium(94,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
676 | epsilSi,stminSi); | |
677 | AliMedium(95,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
678 | epsilSi,stminSi); | |
679 | AliMedium(96,"SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi, | |
680 | epsilSi,stminSi); | |
681 | ||
012f0f4c | 682 | }/* |
5a30b198 | 683 | //______________________________________________________________________ |
684 | void AliITSvSDD03::InitAliITSgeom(){ | |
685 | // Based on the geometry tree defined in Geant 3.21, this | |
686 | // routine initilizes the Class AliITSgeom from the Geant 3.21 ITS geometry | |
687 | // sturture. | |
688 | // Inputs: | |
689 | // none. | |
690 | // Outputs: | |
691 | // none. | |
692 | // Return: | |
693 | // none. | |
3be5c40b | 694 | const Int_t knlayers=12; |
695 | // const Int_t kndeep=6; | |
696 | const Int_t kltypess=2; | |
697 | const AliITSDetector kidet[knlayers]={kSSD,kSDD}; | |
698 | const TString knames[kltypess]={ | |
699 | "/ALIC_1/ITSV_1/ITEL_%d/ITAI_1/IMB0_1/IMBS_1", | |
700 | "/ALIC_1/ITSV_1/IDET_%d/IDAI_1/ITS0_1/ITST_1"}; | |
701 | const Int_t kitsGeomTreeCopys[kltypess]={10,2}; | |
702 | const Int_t knp=384; | |
012f0f4c | 703 | const Float_t kpitch=50.E-4;//cm |
3be5c40b | 704 | Float_t box[3]={0.5*kpitch*(Float_t)knp,150.E-4,1.0},p[knp+1],n[knp+1]; |
705 | Int_t nlad[knlayers]={knlayers*1}; | |
706 | Int_t ndet[knlayers]={knlayers*1}; | |
707 | Int_t mod=knlayers,lay=0,lad=0,det=0,i,j,cp0; | |
708 | TString path,shapeName; | |
709 | TGeoHMatrix matrix; | |
710 | Double_t trans[3]={3*0.0},rot[10]={10*0.0}; | |
711 | TArrayD shapePar; | |
712 | TArrayF shapeParF; | |
713 | Bool_t isShapeDefined[kltypess]={kltypess*kFALSE}; | |
714 | AliITSgeom *geom = new AliITSgeom(0,knlayers,nlad,ndet,mod); | |
715 | if(GetITSgeom()!=0) SetITSgeom(0x0);// delet existing if there. | |
716 | SetITSgeom(geom); | |
74d31ce3 | 717 | |
3be5c40b | 718 | p[0]=-box[0]; |
719 | n[0]=box[0]; | |
720 | // Fill in anode and cathode strip locations (lower edge) | |
721 | for(i=1;i<knp;i++){ | |
722 | p[i] =p[i-1]+kpitch; | |
723 | n[i] =n[i-1]-kpitch; | |
724 | } // end for i | |
725 | p[knp]=box[0]; | |
726 | n[knp]=-box[0]; | |
727 | for(i=0;i<kltypess;i++)for(cp0=1;cp0<=kitsGeomTreeCopys[i];cp0++){ | |
728 | mod = DecodeDetector(fIdSens[i],cp0,lay,lad,det); | |
729 | path.Form(knames[i].Data(),cp0); | |
730 | gMC->GetTransformation(path.Data(),matrix); | |
731 | gMC->GetShape(path.Data(),shapeName,shapePar); | |
732 | shapeParF.Set(shapePar.GetSize()); | |
733 | for(j=0;j<shapePar.GetSize();j++)shapeParF[j]=shapePar[j]; | |
734 | geom->CreateMatrix(mod,lay,lad,det,kidet[i],trans,rot); | |
735 | geom->SetTrans(mod,matrix.GetTranslation()); | |
736 | geom->SetRotMatrix(mod,matrix.GetRotationMatrix()); | |
737 | geom->GetGeomMatrix(mod)->SetPath(path.Data()); | |
738 | switch (kidet[i]){ | |
739 | case kSDD: if(!(GetITSgeom()->IsShapeDefined((Int_t)kSDD))){ | |
740 | geom->ReSetShape(kSDD,new AliITSgeomSDD256(shapeParF.GetSize(), | |
741 | shapeParF.GetArray())); | |
742 | isShapeDefined[i]=kTRUE; | |
743 | } break; | |
744 | case kSSD:if(!(GetITSgeom()->IsShapeDefined((Int_t)kSSD))){ | |
745 | geom->ReSetShape(kSSD,new AliITSgeomSSD(box,0.0,0.0, | |
746 | knp+1,p,knp+1,n)); | |
747 | isShapeDefined[i]=kTRUE; | |
748 | } break; | |
749 | default:{} break; | |
750 | } // end switch | |
751 | } // end for i,cp0 | |
5a30b198 | 752 | return; |
012f0f4c | 753 | }*/ |
5a30b198 | 754 | //______________________________________________________________________ |
755 | void AliITSvSDD03::Init(){ | |
756 | //////////////////////////////////////////////////////////////////////// | |
757 | // Initialise the ITS after it has been created. | |
758 | // Inputs: | |
759 | // none. | |
760 | // Outputs: | |
761 | // none. | |
762 | // Return: | |
763 | // none. | |
764 | //////////////////////////////////////////////////////////////////////// | |
5a30b198 | 765 | |
15efbab5 | 766 | |
767 | Info("Init","**********AliITSvSDD03 %d _Init *************",fMinorVersion); | |
aacedc3e | 768 | |
012f0f4c | 769 | AliDebug(1,Form("Init: Major version %d Minor version %d",fMajorVersion, |
770 | fMinorVersion)); | |
771 | // | |
772 | UpdateInternalGeometry(); | |
5a30b198 | 773 | AliITS::Init(); |
012f0f4c | 774 | if(fGeomDetOut) GetITSgeom()->WriteNewFile(fWrite); |
775 | ||
776 | // | |
8119ddd8 | 777 | fIDMother = gMC->VolId("ITSV"); // ITS Mother Volume ID. |
aacedc3e | 778 | |
012f0f4c | 779 | }/* |
5a30b198 | 780 | //______________________________________________________________________ |
781 | void AliITSvSDD03::SetDefaults(){ | |
782 | // sets the default segmentation, response, digit and raw cluster classes | |
783 | // Inputs: | |
784 | // none. | |
785 | // Outputs: | |
786 | // none. | |
787 | // Return: | |
788 | // none. | |
15efbab5 | 789 | |
023ae34b | 790 | // const Float_t kconv = 1.0e+04; // convert cm to microns |
5a30b198 | 791 | |
7d62fb64 | 792 | if(!fDetTypeSim) fDetTypeSim = new AliITSDetTypeSim(); |
793 | fDetTypeSim->SetITSgeom(GetITSgeom()); | |
fcf95fc7 | 794 | fDetTypeSim->ResetCalibrationArray(); |
7d62fb64 | 795 | fDetTypeSim->ResetSegmentation(); |
796 | ||
5a30b198 | 797 | AliITSgeomSDD *s1; |
798 | AliITSgeomSSD *s2; | |
fcf95fc7 | 799 | SetCalibrationModel(GetITSgeom()->GetStartSPD(),new AliITSCalibrationSPD()); |
023ae34b | 800 | SetSegmentationModel(kSPD,(AliITSsegmentationSPD*) |
801 | (GetITSgeom()->GetShape(kSPD))); | |
7d62fb64 | 802 | fDetTypeSim->SetDigitClassName(kSPD,"AliITSdigitSPD"); |
5a30b198 | 803 | |
804 | // SDD | |
7d62fb64 | 805 | s1 = (AliITSgeomSDD*) GetITSgeom()->GetShape(kSDD);// Get shape info. Do it this way for now. |
fcf95fc7 | 806 | AliITSCalibrationSDD *resp1=new AliITSCalibrationSDD("simulated"); |
807 | SetCalibrationModel(GetITSgeom()->GetStartSDD(),resp1); | |
7d62fb64 | 808 | |
023ae34b | 809 | AliITSsegmentationSDD *seg1 = (AliITSsegmentationSDD*) |
810 | (GetITSgeom()->GetShape(kSDD)); | |
4952f440 | 811 | seg1->SetDriftSpeed(AliITSresponseSDD::DefaultDriftSpeed()); |
5a30b198 | 812 | seg1->SetNPads(256,256);// Use AliITSgeomSDD for now |
813 | SetSegmentationModel(kSDD,seg1); | |
fcf95fc7 | 814 | const char *kData1=(fDetTypeSim->GetCalibrationModel(GetITSgeom()->GetStartSDD()))->DataType(); |
815 | const char *kopt=resp1->GetZeroSuppOption(); | |
20f3f947 | 816 | if((!strstr(kopt,"ZS")) || strstr(kData1,"real") ){ |
7d62fb64 | 817 | fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigit"); |
818 | } else fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigitSDD"); | |
5a30b198 | 819 | |
820 | // SSD Layer 5 | |
7d62fb64 | 821 | |
822 | s2 = (AliITSgeomSSD*) GetITSgeom()->GetShape(kSSD);// Get shape info. Do it this way for now. | |
823 | ||
fcf95fc7 | 824 | AliITSCalibration *resp2= new AliITSCalibrationSSD("simulated"); |
825 | SetCalibrationModel(GetITSgeom()->GetStartSSD(),resp2); | |
7d62fb64 | 826 | |
023ae34b | 827 | AliITSsegmentationSSD *seg2 = (AliITSsegmentationSSD*) |
828 | (GetITSgeom()->GetShape(kSSD)); | |
15efbab5 | 829 | seg2->SetPadSize(50.,0.); // strip x pitch in microns |
830 | seg2->SetNPads(384,0); // number of strips on each side. | |
831 | seg2->SetLayer(5); | |
832 | seg2->SetAngles(0.,0.); // strip angles rad P and N side. | |
833 | seg2->SetAnglesLay5(0.,0.); // strip angles rad P and N side. | |
834 | seg2->SetAnglesLay6(0.,0.); // strip angles rad P and N side. | |
835 | ||
5a30b198 | 836 | SetSegmentationModel(kSSD,seg2); |
fcf95fc7 | 837 | const char *kData2=(fDetTypeSim->GetCalibrationModel(GetITSgeom()->GetStartSSD()))->DataType(); |
7d62fb64 | 838 | if(strstr(kData2,"real") ) fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigit"); |
839 | else fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigitSSD"); | |
5a30b198 | 840 | |
7d62fb64 | 841 | if(fgkNTYPES>3){ |
5a30b198 | 842 | Warning("SetDefaults", |
843 | "Only the four basic detector types are initialised!"); | |
844 | }// end if | |
845 | return; | |
846 | } | |
847 | //______________________________________________________________________ | |
6fc43a8e | 848 | void AliITSvSDD03::SetDefaultSimulation(){ |
849 | // sets the default simulation. | |
850 | // Inputs: | |
851 | // none. | |
852 | // Outputs: | |
853 | // none. | |
854 | // Return: | |
855 | // none. | |
856 | ||
7d62fb64 | 857 | if(!fDetTypeSim) fDetTypeSim = new AliITSDetTypeSim(); |
858 | AliITSsimulation *sim; | |
8ba39da9 | 859 | //AliITSsegmentation *seg; |
fcf95fc7 | 860 | //AliITSCalibration *res; |
7d62fb64 | 861 | //SPD |
862 | if(fDetTypeSim){ | |
863 | sim = fDetTypeSim->GetSimulationModel(kSPD); | |
864 | if (!sim) { | |
8ba39da9 | 865 | //seg =(AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSPD); |
866 | //if(seg==0) seg = new AliITSsegmentationSPD(); | |
fcf95fc7 | 867 | //res = (AliITSCalibration*)fDetTypeSim->GetResponseModel(GetITSgeom()->GetStartSPD()); |
868 | //if(res==0) res = new AliITSCalibrationSPD(); | |
5bfe44ce | 869 | sim = new AliITSsimulationSPD(fDetTypeSim); |
7d62fb64 | 870 | SetSimulationModel(kSPD,sim); |
871 | }else{ // simulation exists, make sure it is set up properly. | |
8ba39da9 | 872 | sim->SetSegmentationModel(kSPD,(AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSPD)); |
fcf95fc7 | 873 | sim->SetCalibrationModel(GetITSgeom()->GetStartSPD(),(AliITSCalibration*)fDetTypeSim->GetCalibrationModel(GetITSgeom()->GetStartSPD())); |
7d62fb64 | 874 | sim->Init(); |
875 | } // end if | |
876 | } // end if iDetType | |
877 | //SDD | |
878 | if(fDetTypeSim){ | |
879 | sim = fDetTypeSim->GetSimulationModel(kSDD); | |
880 | if (!sim) { | |
8ba39da9 | 881 | // seg = (AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSDD); |
fcf95fc7 | 882 | //res = (AliITSCalibration*)fDetTypeSim->GetResponseModel(GetITSgeom()->GetStartSDD()); |
8ba39da9 | 883 | sim = new AliITSsimulationSDD(fDetTypeSim); |
7d62fb64 | 884 | SetSimulationModel(kSDD,sim); |
885 | }else{ // simulation exists, make sure it is set up properly. | |
8ba39da9 | 886 | sim->SetSegmentationModel(kSDD,(AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSDD)); |
fcf95fc7 | 887 | sim->SetCalibrationModel(GetITSgeom()->GetStartSDD(),(AliITSCalibration*)fDetTypeSim->GetCalibrationModel(GetITSgeom()->GetStartSDD())); |
7d62fb64 | 888 | |
889 | sim->Init(); | |
890 | } //end if | |
891 | } // end if iDetType | |
892 | //SSD | |
893 | if(fDetTypeSim){ | |
894 | sim = fDetTypeSim->GetSimulationModel(kSSD); | |
895 | if (!sim) { | |
8ba39da9 | 896 | // seg = (AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSSD); |
fcf95fc7 | 897 | // res = (AliITSCalibration*)fDetTypeSim->GetResponseModel(GetITSgeom()->GetStartSSD()); |
8ba39da9 | 898 | sim = new AliITSsimulationSSD(fDetTypeSim); |
7d62fb64 | 899 | SetSimulationModel(kSSD,sim); |
900 | }else{ // simulation exists, make sure it is set up properly. | |
8ba39da9 | 901 | sim->SetSegmentationModel(kSSD,(AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSSD)); |
fcf95fc7 | 902 | sim->SetCalibrationModel(GetITSgeom()->GetStartSSD(),(AliITSCalibration*)fDetTypeSim->GetCalibrationModel(GetITSgeom()->GetStartSSD())); |
7d62fb64 | 903 | sim->Init(); |
904 | } // end if | |
905 | } // end if iDetType | |
012f0f4c | 906 | }*/ |
6fc43a8e | 907 | //______________________________________________________________________ |
8119ddd8 | 908 | void AliITSvSDD03::DrawModule() const{ |
5a30b198 | 909 | //////////////////////////////////////////////////////////////////////// |
910 | // Draw a shaded view of the ITS SDD test beam version 1. | |
911 | // Inputs: | |
912 | // none. | |
913 | // Outputs: | |
914 | // none. | |
915 | // Return: | |
916 | // none. | |
917 | //////////////////////////////////////////////////////////////////////// | |
918 | // Set everything unseen | |
919 | gMC->Gsatt("*", "seen", -1); | |
920 | // Set ALIC mother visible | |
921 | gMC->Gsatt("ALIC","SEEN",0); | |
922 | // Set ALIC ITS visible | |
15efbab5 | 923 | gMC->Gsatt("ITSV","SEEN",1); |
5a30b198 | 924 | // Set ALIC Telescopes visible |
15efbab5 | 925 | gMC->Gsatt("ITEL","SEEN",1); |
926 | gMC->Gsatt("ITEL","colo",2); | |
5a30b198 | 927 | // Set ALIC detetcor visible |
15efbab5 | 928 | gMC->Gsatt("IDET","SEEN",1); |
929 | gMC->Gsatt("IDET","colo",4); | |
930 | // Set ALIC Scintillator visible | |
931 | gMC->Gsatt("ISNT","SEEN",1); | |
932 | gMC->Gsatt("ISNT","colo",3); | |
5a30b198 | 933 | // Set Detector mother visible and drawn |
15efbab5 | 934 | // gMC->Gsatt("ITS0","SEEN",1); |
5a30b198 | 935 | // Set minibus mother visible and drawn |
15efbab5 | 936 | // gMC->Gsatt("IMB0","SEEN",1); |
937 | ||
938 | // Draw | |
939 | gMC->Gdraw("alic", 60, 30, 180, 10,10, .12, .12); | |
5a30b198 | 940 | } |
941 | //______________________________________________________________________ | |
942 | void AliITSvSDD03::StepManager(){ | |
943 | //////////////////////////////////////////////////////////////////////// | |
944 | // Called for every step in the ITS SDD test beam, then calles the | |
945 | // AliITShit class creator with the information to be recoreded about | |
946 | // that hit. | |
947 | // The value of the macro ALIITSPRINTGEOM if set to 1 will allow the | |
948 | // printing of information to a file which can be used to create a .det | |
949 | // file read in by the routine CreateGeometry(). If set to 0 or any other | |
950 | // value except 1, the default behavior, then no such file is created nor | |
951 | // it the extra variables and the like used in the printing allocated. | |
952 | // Inputs: | |
953 | // none. | |
954 | // Outputs: | |
955 | // none. | |
956 | // Return: | |
957 | // none. | |
958 | //////////////////////////////////////////////////////////////////////// | |
012f0f4c | 959 | if(!(this->IsActive())) return; |
8119ddd8 | 960 | if(!(gMC->TrackCharge())) return; |
012f0f4c | 961 | |
962 | Int_t cpy0,cpy1,ncpys=0,status,id,mod; | |
8119ddd8 | 963 | TLorentzVector position, momentum; |
012f0f4c | 964 | static AliITShit hit;// Saves on calls to construtors |
965 | //TClonesArray &lhits = *(GetDetTypeSim()->GetHits()); | |
966 | TClonesArray &lhits = *(Hits()); | |
967 | // | |
968 | // Track status | |
969 | // Track status | |
970 | status = 0; | |
971 | if(gMC->IsTrackInside()) status += 1; | |
972 | if(gMC->IsTrackEntering()) status += 2; | |
973 | if(gMC->IsTrackExiting()) status += 4; | |
974 | if(gMC->IsTrackOut()) status += 8; | |
975 | if(gMC->IsTrackDisappeared()) status += 16; | |
976 | if(gMC->IsTrackStop()) status += 32; | |
977 | if(gMC->IsTrackAlive()) status += 64; | |
5a30b198 | 978 | // |
8119ddd8 | 979 | // Fill hit structure. |
980 | gMC->TrackPosition(position); | |
981 | gMC->TrackMomentum(momentum); | |
012f0f4c | 982 | id = gMC->CurrentVolID(cpy0); |
983 | gMC->CurrentVolOffID(3,cpy1); | |
984 | if(id==fIdSens[0])ncpys=10; | |
985 | if(id==fIdSens[1])ncpys=2; | |
986 | fIgm.DecodeDetector(mod,ncpys,cpy0,cpy1,1); | |
8119ddd8 | 987 | // |
012f0f4c | 988 | // Fill hit structure. |
5a30b198 | 989 | // |
012f0f4c | 990 | hit.SetModule(mod); |
991 | hit.SetTrack(gAlice->GetMCApp()->GetCurrentTrackNumber()); | |
992 | gMC->TrackPosition(position); | |
993 | gMC->TrackMomentum(momentum); | |
994 | hit.SetPosition(position); | |
995 | hit.SetTime(gMC->TrackTime()); | |
996 | hit.SetMomentum(momentum); | |
997 | hit.SetStatus(status); | |
998 | hit.SetEdep(gMC->Edep()); | |
999 | hit.SetShunt(GetIshunt()); | |
5a30b198 | 1000 | if(gMC->IsTrackEntering()){ |
012f0f4c | 1001 | hit.SetStartPosition(position); |
1002 | hit.SetStartTime(gMC->TrackTime()); | |
1003 | hit.SetStartStatus(status); | |
1004 | return; // don't save entering hit. | |
1005 | } // end if IsEntering | |
1006 | // Fill hit structure with this new hit. | |
1007 | //Info("StepManager","Calling Copy Constructor"); | |
1008 | new(lhits[fNhits++]) AliITShit(hit); // Use Copy Construtor. | |
1009 | // Save old position... for next hit. | |
1010 | hit.SetStartPosition(position); | |
1011 | hit.SetStartTime(gMC->TrackTime()); | |
1012 | hit.SetStartStatus(status); | |
5a30b198 | 1013 | return; |
1014 | } | |
1015 |