AliITSv11Hybrid is replaced by AliITSv11
[u/mrichter/AliRoot.git] / ITS / UPGRADE / Config.C
CommitLineData
fabd12c1 1/// One can use the configuration macro in compiled mode by
2// root [0] gSystem->Load("libgeant321");
3// root [0] gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include\
4// -I$ALICE_ROOT -I$ALICE/geant3/TGeant3");
5// root [0] .x grun.C(1,"Config.C++"
6
7#if !defined(__CINT__) || defined(__MAKECINT__)
8#include <Riostream.h>
9#include <TPDGCode.h>
10#include <TRandom.h>
11#include <TSystem.h>
12#include <TVirtualMC.h>
13#include <TGeant3TGeo.h>
14#include "STEER/AliRunLoader.h"
15#include "STEER/AliRun.h"
16#include "STEER/AliConfig.h"
17#include "PYTHIA6/AliDecayerPythia.h"
18#include "EVGEN/AliGenCocktail.h"
19#include "EVGEN/AliGenHIJINGpara.h"
20#include "EVGEN/AliGenFixed.h"
21#include "EVGEN/AliGenBox.h"
22#include "STEER/AliMagWrapCheb.h"
23#include "STRUCT/AliBODY.h"
24#include "STRUCT/AliMAG.h"
25#include "STRUCT/AliABSOv3.h"
26#include "STRUCT/AliDIPOv3.h"
27#include "STRUCT/AliHALLv3.h"
28#include "STRUCT/AliFRAMEv2.h"
29#include "STRUCT/AliSHILv3.h"
30#include "STRUCT/AliPIPEv3.h"
07787d1d 31#include "ITS/AliITSv11.h"
fabd12c1 32#include "TPC/AliTPCv2.h"
33#include "TOF/AliTOFv6T0.h"
34#include "HMPID/AliHMPIDv3.h"
35#include "ZDC/AliZDCv3.h"
36#include "TRD/AliTRDv1.h"
37#include "TRD/AliTRDgeometry.h"
38#include "FMD/AliFMDv1.h"
39#include "MUON/AliMUONv1.h"
40#include "PHOS/AliPHOSv1.h"
41#include "PMD/AliPMDv1.h"
42#include "T0/AliT0v1.h"
43#include "EMCAL/AliEMCALv2.h"
44#include "ACORDE/AliACORDEv1.h"
45#include "VZERO/AliVZEROv7.h"
46#include <TVirtualMagField.h>
47#endif
48
d4945a3b 49
50Int_t generatorFlag = 2;
51Int_t ITSflag = 3;
52
53
54
fabd12c1 55/* $Id$ */
56enum PprTrigConf_t
57{
58 kDefaultPPTrig, kDefaultPbPbTrig
59};
60
61const char * pprTrigConfName[] = {
62 "p-p","Pb-Pb"
63};
64
65Float_t EtaToTheta(Float_t arg);
d4945a3b 66AliGenerator *Hijing();
fabd12c1 67
68static PprTrigConf_t strig = kDefaultPPTrig;// default PP trigger configuration
69
70void Config()
71{
72 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
73 // Theta range given through pseudorapidity limits 22/6/2001
74
75 // Set Random Number seed
76 gRandom->SetSeed(0); // Set 0 to use the currecnt time
77
78
79 // libraries required by geant321
80#if defined(__CINT__)
81 gSystem->Load("liblhapdf");
82 gSystem->Load("libEGPythia6");
83 gSystem->Load("libpythia6");
84 gSystem->Load("libAliPythia6");
85 gSystem->Load("libgeant321");
d4945a3b 86 gSystem->Load("libhijing");
87 gSystem->Load("libTHijing");
88
fabd12c1 89#endif
90
91 new TGeant3TGeo("C++ Interface to Geant3");
92
93 AliRunLoader* rl=0x0;
94
95
96 rl = AliRunLoader::Open("galice.root",
97 AliConfig::GetDefaultEventFolderName(),
98 "recreate");
99 if (rl == 0x0)
100 {
101 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
102 return;
103 }
104 rl->SetCompressionLevel(2);
105 rl->SetNumberOfEventsPerFile(2000);
106 gAlice->SetRunLoader(rl);
107
108 // Set the trigger configuration
109 // gAlice->SetTriggerDescriptor(pprTrigConfName[strig]);
110 //cout<<"Trigger configuration is set to "<<pprTrigConfName[strig]<<endl;
111 AliSimulation::Instance()->SetTriggerConfig(pprTrigConfName[strig]);
112 cout<<"Trigger configuration is set to pprTrigConfName[strig] "<<endl;
113
114 //
115 // Set External decayer
116 TVirtualMCDecayer *decayer = new AliDecayerPythia();
117
118 decayer->SetForceDecay(kAll);
119 decayer->Init();
120 gMC->SetExternalDecayer(decayer);
121 //=======================================================================
122 // ************* STEERING parameters FOR ALICE SIMULATION **************
123 // --- Specify event type to be tracked through the ALICE setup
124 // --- All positions are in cm, angles in degrees, and P and E in GeV
125
126
127 gMC->SetProcess("DCAY",1);
128 gMC->SetProcess("PAIR",1);
129 gMC->SetProcess("COMP",1);
130 gMC->SetProcess("PHOT",1);
131 gMC->SetProcess("PFIS",0);
132 gMC->SetProcess("DRAY",0);
133 gMC->SetProcess("ANNI",1);
134 gMC->SetProcess("BREM",1);
135 gMC->SetProcess("MUNU",1);
136 gMC->SetProcess("CKOV",1);
137 gMC->SetProcess("HADR",0);
138 gMC->SetProcess("LOSS",2);
139 gMC->SetProcess("MULS",1);
140 gMC->SetProcess("RAYL",1);
141
142 Float_t cut = 1.e-3; // 1MeV cut by default
143 Float_t tofmax = 1.e10;
144
145 gMC->SetCut("CUTGAM", cut);
146 gMC->SetCut("CUTELE", cut);
147 gMC->SetCut("CUTNEU", cut);
148 gMC->SetCut("CUTHAD", cut);
149 gMC->SetCut("CUTMUO", cut);
150 gMC->SetCut("BCUTE", cut);
151 gMC->SetCut("BCUTM", cut);
152 gMC->SetCut("DCUTE", cut);
153 gMC->SetCut("DCUTM", cut);
154 gMC->SetCut("PPCUTM", cut);
155 gMC->SetCut("TOFMAX", tofmax);
156
157 // Special generation for Valgrind tests
158 // Each detector is fired by few particles selected
159 // to cover specific cases
160
161
162 // The cocktail itself
163
d4945a3b 164 if (generatorFlag==0) {
165
166 AliGenCocktail *gener = new AliGenCocktail();
167 gener->SetPhiRange(0, 360);
168 // Set pseudorapidity range from -8 to 8.
169 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
170 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
171 gener->SetThetaRange(thmin,thmax);
172 gener->SetOrigin(0., 0., 0); //vertex position
173 gener->SetSigma(0., 0., 0); //Sigma in (X,Y,Z) (cm) on IP position
fabd12c1 174
d4945a3b 175 /*
176 AliGenBox *gbox2 = new AliGenBox(2300*1.8);
177 gbox2->SetPtRange(0.1,2.0); //
178 gbox2->SetPhiRange(0,360);
179 gbox2->SetThetaRange(44.,135.); // +/- 0.9 eta
180 //gbox2->SetPhiRange(250,250.5);
181 // gbox2->SetThetaRange(50.,50.1);
182 gbox2->SetPart(kPiMinus);
183 gener->AddGenerator(gbox2,"GENBOX PIONS for ITS",1);
184 */
185
186
187
188 AliGenHIJINGpara *gbox2=new AliGenHIJINGpara(2300*1.8); // 2300 dNdy in 2*0.9eta
189 gbox2->SetPtRange(0.06,9999999);
190 gbox2->SetPhiRange(0,360.);
191 gbox2->SetThetaRange(44.,135.); // +/- 0.9 eta
192 gener->AddGenerator(gbox2,"GenHIJINGpara PIONS for ITS",1);
fabd12c1 193
d4945a3b 194 gener->Init();
195
196
197 } else if (generatorFlag==1) {
198
199
200 AliGenHijing *generHijing = new AliGenHijing(-1);
201 // centre of mass energy
202 generHijing->SetEnergyCMS(5500.);
203 generHijing->SetImpactParameterRange(0,1);
204 // reference frame
205 generHijing->SetReferenceFrame("CMS");
206 // projectile
207 generHijing->SetProjectile("A", 208, 82);
208 generHijing->SetTarget ("A", 208, 82);
209 // tell hijing to keep the full parent child chain
210 generHijing->KeepFullEvent();
211 // enable jet quenching
212 generHijing->SetJetQuenching(1);
213 // enable shadowing
214 generHijing->SetShadowing(1);
215 // neutral pion and heavy particle decays switched off
216 // generHijing->SetDecaysOff(3); // 3 requested by Ana Marin
217 // Don't track spectators
218 generHijing->SetSpectators(0);
219 // kinematic selection
220 generHijing->SetSelectAll(0);
221
222 AliGenerator* gener = generHijing;
223 gener->SetSigma(0, 0, 0); // Sigma in (X,Y,Z) (cm) on IP position
224 gener->SetVertexSmear(kPerEvent);
225 gener->Init();
226
227
228 } else if (generatorFlag==2) {
229
230
231 // Francesco ...
232 int nParticles = 14022;
233 AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles);
234 gener->SetMomentumRange(0.1, 10.);
235 gener->SetPhiRange(0., 360.);
236 Float_t thmin = EtaToTheta(2.5); // theta min. <---> eta max
237 Float_t thmax = EtaToTheta(-2.5); // theta max. <---> eta min
238 gener->SetThetaRange(thmin,thmax);
239 gener->SetOrigin(0, 0, 0); //vertex position
240 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
241 gener->Init();
242
243
244 } else if (generatorFlag==3) {
245
246 // Annalisa ...
247 AliGenHijing *generHijing = new AliGenHijing(-1);
248 generHijing->SetEnergyCMS(5500.);
249 generHijing->SetImpactParameterRange(0,5);
250 generHijing->SetReferenceFrame("CMS");
251 generHijing->SetProjectile("A", 208, 82);
252 generHijing->SetTarget ("A", 208, 82);
253 generHijing->KeepFullEvent();
254 generHijing->SetJetQuenching(1);
255 generHijing->SetShadowing(1);
256 generHijing->SetSpectators(0);
257 generHijing->SetSelectAll(0);
258 generHijing->SetPtHardMin(4.5);
259
260 AliGenerator* gener = generHijing;
261 gener->SetSigma(0, 0, 0); // Sigma in (X,Y,Z) (cm) on IP position
262 gener->SetVertexSmear(kPerEvent);
263 gener->Init();
264
265
266 }
fabd12c1 267
268
269 //
270 // Activate this line if you want the vertex smearing to happen
271 // track by track
272 //
273 //VertexSmear_t perTrack;
274 //gener->SetVertexSmear(perTrack);
275 // Field (L3 0.5 T)
276 //AliMagF* field = new AliMagF("map","map",2, -1.,1., 15, AliMagF::k5kGUniform);
277 //TGeoGlobalMagField::Instance()->SetField(field);
278 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG));
279
280 Int_t iABSO = 0;
281 Int_t iDIPO = 0;
282 Int_t iFMD = 0;
283 Int_t iFRAME = 0;
284 Int_t iHALL = 0;
285 Int_t iITS = 1;
d4945a3b 286 Int_t isUpgrade = ITSflag;
fabd12c1 287 Int_t iMAG = 0;
288 Int_t iMUON = 0;
289 Int_t iPHOS = 0;
d4945a3b 290 Int_t iPIPE = 0;
fabd12c1 291 Int_t iPMD = 0;
d4945a3b 292 Int_t iHMPID = 0;
fabd12c1 293 Int_t iSHIL = 0;
d4945a3b 294 Int_t iT0 = 0;
fabd12c1 295 Int_t iTOF = 0;
296 Int_t iTPC = 0;
297 Int_t iTRD = 0;
298 Int_t iZDC = 0;
299 Int_t iEMCAL = 0;
300 Int_t iACORDE = 0;
301 Int_t iVZERO = 0;
302 rl->CdGAFile();
303 //=================== Alice BODY parameters =============================
304 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
305
306 if (iMAG)
307 {
308 //=================== MAG parameters ============================
309 // --- Start with Magnet since detector layouts may be depending ---
310 // --- on the selected Magnet dimensions ---
311 AliMAG *MAG = new AliMAG("MAG", "Magnet");
312 }
313
314
315 if (iABSO)
316 {
317 //=================== ABSO parameters ============================
318 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
319 }
320
321 if (iDIPO)
322 {
323 //=================== DIPO parameters ============================
324
325 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
326 }
327
328 if (iHALL)
329 {
330 //=================== HALL parameters ============================
331
332 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
333 }
334
335
336 if (iFRAME)
337 {
338 //=================== FRAME parameters ============================
339
340 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
341 FRAME->SetHoles(1);
342 }
343
344 if (iSHIL)
345 {
346 //=================== SHIL parameters ============================
347
348 AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");
349 }
350
351
352 if (iPIPE)
353 {
354 //=================== PIPE parameters ============================
355
356 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
357 }
358
359 if (iITS)
360 {
361 //=================== ITS parameters ============================
fabd12c1 362
d4945a3b 363
364 if (isUpgrade==1) { // current ITS geometry ...
365
366
367 AliITSupgrade *ITSu = new AliITSupgrade("ITS","ITS upgrade",kTRUE);
368
369
370 } else if(isUpgrade==2) { // "New SPDs" Configuration
371
372 // BeamPipe
373 Bool_t bp=kTRUE;
374 Double_t widthBP = 0.08;
375 Double_t radiusBP = 2.0-widthBP;
376 Double_t halflengthBP = 200.;
377
378
379 // BeamPipe
380 Int_t nlayers =7;
381 TArrayD xsize(nlayers); TArrayD zsize(nlayers);
382 TArrayD width(nlayers); TArrayD radii(nlayers);
383
384 TArrayD widthCu(nlayers); TArrayD radiiCu(nlayers);
385 TArrayS copper(nlayers);
386 TArrayD halfLengths(nlayers);
387
388
389 for(Int_t i=0; i<nlayers; i++){
390
391 Double_t xsz[7]={14*1e-04, 14*1e-04, 14*1e-04, 121.2e-04,121.4*1e-04,69.3*1e-04,69.3*1e-04};
392 Double_t zsz[7]={14*1e-04, 14*1e-04, 14*1e-04, 97*1e-04,97*1e-04,2875*1e-04,2875*1e-04};
393
394 Double_t halfL[7]={21./2, 25./2., 32./2., 22.2,29.7,43.1,48.9};
395
396
397 Double_t r[7]={2.2,3.8,6.8,14.9,23.8,39.1,43.6};
398 radii.AddAt(r[i],i);
399
400 Double_t thick[7]={50.*1e-04,50.*1e-04,50.*1e-04,150.*1e-04,150.*1e-04,150.*1e-04,150.*1e-04};
401 width.AddAt(thick[i],i);
402
403 // Copper radius & thickness
404 radiiCu.AddAt(r[i]+thick[i],i);
405 if (i<3)
406 widthCu.AddAt(0.0036,i);
407 else
408 widthCu.AddAt(0.0150,i);//micron
409
410 // no idea ????????
411 Int_t c[7]={1,1,1,1,1,1,1};
412 copper.AddAt(c[i],i);
413
414
415 // Silicon pixel sizes and length in Z
416
417 Int_t npixHalf[7];
418 npixHalf[i]=(Int_t)(halfL[i]/zsz[i]);
419 Double_t HalfL[7];
420 HalfL[i]=npixHalf[i]*zsz[i];
421
422 Int_t npixR[7];
423 npixR[i] = (Int_t)(2*TMath::Pi()*r[i]/xsz[i]);
424 Double_t xszInt[7];
425 xszInt[i]= 2*TMath::Pi()*r[i]/npixR[i];
426 xsize.AddAt(xszInt[i],i);
427 zsize.AddAt(zsz[i],i);
428
429 halfLengths.AddAt(HalfL[i],i);
430
431
432 }
433 AliITSupgrade *ITSu =
434 new AliITSupgrade("ITS","ITS upgrade",
435 width,radii,halfLengths,
436 radiiCu,widthCu,copper,
437 bp,radiusBP, widthBP, halflengthBP );
438
439
440 ITSu->SetFullSegmentation(xsize,zsize);
441
442 } else if (isUpgrade==3) { // "All New" Configuration
443
444 // BeamPipe
445 Bool_t bp=kTRUE;
446 Double_t widthBP = 0.08;
447 Double_t radiusBP = 2.0-widthBP;
448 Double_t halflengthBP = 200.;
449
450
451 // BeamPipe
452 Int_t nlayers =7;
453 TArrayD xsize(nlayers); TArrayD zsize(nlayers);
454 TArrayD width(nlayers); TArrayD radii(nlayers);
455
456 TArrayD widthCu(nlayers); TArrayD radiiCu(nlayers);
457 TArrayS copper(nlayers);
458 TArrayD halfLengths(nlayers);
459
460
461 for(Int_t i=0; i<nlayers; i++){
462
463 Double_t xsz[7]={14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04};
464 Double_t zsz[7]={14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04};
465
466 Double_t halfL[7]={21./2, 25./2., 32./2., 45./2, 67./2, 107./2, 114./2};
467
468
469 Double_t r[7]={2.2,3.8,6.8,12.4,23.5,39.6,43.0};
470 radii.AddAt(r[i],i);
471
472 Double_t thick[7]={50.*1e-04,50.*1e-04,50.*1e-04,50.*1e-04,50.*1e-04,50.*1e-04,50.*1e-04};
473 width.AddAt(thick[i],i);
474
475 // Copper radius & thickness
476 radiiCu.AddAt(r[i]+thick[i],i);
477 widthCu.AddAt(0.0036,i);
478
479 // no idea ????????
480 Int_t c[7]={1,1,1,1,1,1,1};
481 copper.AddAt(c[i],i);
482
483
484 // Silicon pixel sizes and length in Z
485
486 Int_t npixHalf[7];
487 npixHalf[i]=(Int_t)(halfL[i]/zsz[i]);
488 Double_t HalfL[7];
489 HalfL[i]=npixHalf[i]*zsz[i];
490
491 Int_t npixR[7];
492 npixR[i] = (Int_t)(2*TMath::Pi()*r[i]/xsz[i]);
493 Double_t xszInt[7];
494 xszInt[i]= 2*TMath::Pi()*r[i]/npixR[i];
495 xsize.AddAt(xszInt[i],i);
496 zsize.AddAt(zsz[i],i);
497
498 halfLengths.AddAt(HalfL[i],i);
fabd12c1 499
d4945a3b 500
501 }
502 AliITSupgrade *ITSu =
503 new AliITSupgrade("ITS","ITS upgrade",
504 width,radii,halfLengths,
505 radiiCu,widthCu,copper,
506 bp,radiusBP, widthBP, halflengthBP );
507
508
509 ITSu->SetFullSegmentation(xsize,zsize);
510
511 } else if (isUpgrade==4) { // "All New" Configuration with 8 layers
512
513 // BeamPipe
514 Bool_t bp=kTRUE;
515 Double_t widthBP = 0.08;
516 Double_t radiusBP = 2.0-widthBP;
517 Double_t halflengthBP = 200.;
518
519
520 // BeamPipe
521 Int_t nlayers =8;
522 TArrayD xsize(nlayers); TArrayD zsize(nlayers);
523 TArrayD width(nlayers); TArrayD radii(nlayers);
524
525 TArrayD widthCu(nlayers); TArrayD radiiCu(nlayers);
526 TArrayS copper(nlayers);
527 TArrayD halfLengths(nlayers);
528
529
530 for(Int_t i=0; i<nlayers; i++){
531
532 Double_t xsz[8]={14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04};
533 Double_t zsz[8]={14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04};
534
535 Double_t halfL[8]={21./2, 25./2., 32./2., 45./2, 67./2, 114./2, 114./2, 114./2};
536
537
538 Double_t r[8]={2.2,3.8,6.8,12.4,23.5, 42.6,43.0,43.4};
539 radii.AddAt(r[i],i);
540
541 Double_t thick[8]={50.*1e-04,50.*1e-04,50.*1e-04,50.*1e-04,50.*1e-04,50.*1e-04,50.*1e-04,50.*1e-04};
542 width.AddAt(thick[i],i);
543
544 // Copper radius & thickness
545 radiiCu.AddAt(r[i]+thick[i],i);
546 widthCu.AddAt(0.0036,i);
547
548 // no idea ????????
549 Int_t c[8]={1,1,1,1,1,1,1};
550 copper.AddAt(c[i],i);
551
552
553 // Silicon pixel sizes and length in Z
554
555 Int_t npixHalf[8];
556 npixHalf[i]=(Int_t)(halfL[i]/zsz[i]);
557 Double_t HalfL[8];
558 HalfL[i]=npixHalf[i]*zsz[i];
559
560 Int_t npixR[8];
561 npixR[i] = (Int_t)(2*TMath::Pi()*r[i]/xsz[i]);
562 Double_t xszInt[8];
563 xszInt[i]= 2*TMath::Pi()*r[i]/npixR[i];
564 xsize.AddAt(xszInt[i],i);
565 zsize.AddAt(zsz[i],i);
566
567 halfLengths.AddAt(HalfL[i],i);
568
569
570 }
571 AliITSupgrade *ITSu =
572 new AliITSupgrade("ITS","ITS upgrade",
573 width,radii,halfLengths,
574 radiiCu,widthCu,copper,
575 bp,radiusBP, widthBP, halflengthBP );
576
577
578 ITSu->SetFullSegmentation(xsize,zsize);
579
580 } else if (isUpgrade==5) { // "All New" Configuration with 8 layers
581
582 // BeamPipe
583 Bool_t bp=kTRUE;
584 Double_t widthBP = 0.08;
585 Double_t radiusBP = 2.0-widthBP;
586 Double_t halflengthBP = 200.;
587
588
589 // BeamPipe
590 Int_t nlayers =9;
591 TArrayD xsize(nlayers); TArrayD zsize(nlayers);
592 TArrayD width(nlayers); TArrayD radii(nlayers);
593
594 TArrayD widthCu(nlayers); TArrayD radiiCu(nlayers);
595 TArrayS copper(nlayers);
596 TArrayD halfLengths(nlayers);
597
598
599 for(Int_t i=0; i<nlayers; i++){
600
601 Double_t xsz[9]={14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04};
602 Double_t zsz[9]={14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04, 14*1e-04};
603
604 Double_t halfL[9]={21./2, 25./2., 32./2., 45./2, 67./2, 107./2, 107./2, 114./2, 114./2};
605
606
607 Double_t r[9]={2.2,3.8,6.8,12.4,23.5, 39.6,40.0,43.0,43.4};
608 radii.AddAt(r[i],i);
609
610 Double_t thick[9]={50.*1e-04,50.*1e-04,50.*1e-04,50.*1e-04,50.*1e-04,50.*1e-04,50.*1e-04,50.*1e-04,50.*1e-04};
611 width.AddAt(thick[i],i);
612
613 // Copper radius & thickness
614 radiiCu.AddAt(r[i]+thick[i],i);
615 widthCu.AddAt(0.0036,i);
616
617 // no idea ????????
618 Int_t c[9]={1,1,1,1,1,1,1};
619 copper.AddAt(c[i],i);
620
621
622 // Silicon pixel sizes and length in Z
623
624 Int_t npixHalf[9];
625 npixHalf[i]=(Int_t)(halfL[i]/zsz[i]);
626 Double_t HalfL[9];
627 HalfL[i]=npixHalf[i]*zsz[i];
628
629 Int_t npixR[9];
630 npixR[i] = (Int_t)(2*TMath::Pi()*r[i]/xsz[i]);
631 Double_t xszInt[9];
632 xszInt[i]= 2*TMath::Pi()*r[i]/npixR[i];
633 xsize.AddAt(xszInt[i],i);
634 zsize.AddAt(zsz[i],i);
635
636 halfLengths.AddAt(HalfL[i],i);
637
638
639 }
640 AliITSupgrade *ITSu =
641 new AliITSupgrade("ITS","ITS upgrade",
642 width,radii,halfLengths,
643 radiiCu,widthCu,copper,
644 bp,radiusBP, widthBP, halflengthBP );
645
646
647 ITSu->SetFullSegmentation(xsize,zsize);
648
649
650 } else {
651
652 } else {
07787d1d 653 AliITS *ITS = new AliITSv11("ITS","ITS v11");
d4945a3b 654 }
655 }
656
657
fabd12c1 658 if (iTPC)
659 {
660 //============================ TPC parameters ===================
661 AliTPC *TPC = new AliTPCv2("TPC", "Default");
662 }
663
664
665 if (iTOF) {
666 //=================== TOF parameters ============================
667 AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
668 }
669
670
671 if (iHMPID)
672 {
673 //=================== HMPID parameters ===========================
674 AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");
675
676 }
677
678
679 if (iZDC)
680 {
681 //=================== ZDC parameters ============================
682
683 AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");
684 }
685
686 if (iTRD)
687 {
688 //=================== TRD parameters ============================
689
690 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
691 AliTRDgeometry *geoTRD = TRD->GetGeometry();
692 // Partial geometry: modules at 2,3,4,6,11,12,14,15
693 // starting at 6h in positive direction
694 geoTRD->SetSMstatus(0,0);
695 geoTRD->SetSMstatus(1,0);
696 geoTRD->SetSMstatus(5,0);
697 geoTRD->SetSMstatus(7,0);
698 geoTRD->SetSMstatus(8,0);
699 geoTRD->SetSMstatus(9,0);
700 geoTRD->SetSMstatus(10,0);
701 geoTRD->SetSMstatus(13,0);
702 geoTRD->SetSMstatus(16,0);
703 geoTRD->SetSMstatus(17,0);
704 }
705
706 if (iFMD)
707 {
708 //=================== FMD parameters ============================
709 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
710 }
711
712 if (iMUON)
713 {
714 //=================== MUON parameters ===========================
715 // New MUONv1 version (geometry defined via builders)
716 AliMUON *MUON = new AliMUONv1("MUON","default");
717 }
718 //=================== PHOS parameters ===========================
719
720 if (iPHOS)
721 {
722 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
723 }
724
725
726 if (iPMD)
727 {
728 //=================== PMD parameters ============================
729 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
730 }
731
732 if (iT0)
733 {
734 //=================== T0 parameters ============================
735 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
736 }
737
738 if (iEMCAL)
739 {
740 //=================== EMCAL parameters ============================
c76b9217 741 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETEV1");
fabd12c1 742 }
743
744 if (iACORDE)
745 {
746 //=================== ACORDE parameters ============================
747 AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
748 }
749
750 if (iVZERO)
751 {
752 //=================== VZERO parameters ============================
753 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
754 }
755
756
757}
758
759Float_t EtaToTheta(Float_t arg){
760 return (180./TMath::Pi())*2.*atan(exp(-arg));
761}
d4945a3b 762
763
764AliGenerator* Hijing()
765{
766 return gener;
767}
768