New TRD section
[u/mrichter/AliRoot.git] / macros / Config.C
CommitLineData
fe4da5cc 1void Config()
2{
3
4new TGeant3("C++ Interface to Geant3");
5
6//=======================================================================
7// Create the output file
8
9TFile *rootfile = new TFile("galice.root","recreate");
10rootfile->SetCompressionLevel(2);
11TGeant3 *geant3 = (TGeant3*)gMC;
12
13//=======================================================================
14// ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
15geant3->SetTRIG(1); //Number of events to be processed
16geant3->SetSWIT(4,10);
17geant3->SetDEBU(0,0,1);
18//geant3->SetSWIT(2,2);
19geant3->SetDCAY(1);
20geant3->SetPAIR(1);
21geant3->SetCOMP(1);
22geant3->SetPHOT(1);
23geant3->SetPFIS(0);
24geant3->SetDRAY(0);
25geant3->SetANNI(1);
26geant3->SetBREM(1);
27geant3->SetMUNU(1);
28geant3->SetCKOV(1);
29geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
30geant3->SetLOSS(2);
31geant3->SetMULS(1);
32geant3->SetRAYL(1);
33geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
34geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
35geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
36Float_t cut = 1.e-3; // 1MeV cut by default
37Float_t tofmax = 1.e10;
38// GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
39geant3->SetCUTS(cut,cut, cut, cut, cut, cut, cut, cut, cut, cut, tofmax);
40//
41//=======================================================================
42// ************* STEERING parameters FOR ALICE SIMULATION **************
43// --- Specify event type to be tracked through the ALICE setup
44// --- All positions are in cm, angles in degrees, and P and E in GeV
45AliGenHIJINGpara *gener = new AliGenHIJINGpara(50);
46gener->SetMomentumRange(0,999);
47gener->SetPhiRange(0,360);
48gener->SetThetaRange(10,170);
49gener->SetOrigin(0,0,0); //vertex position
50gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
51gener->Init();
52//
53// Activate this line if you want the vertex smearing to happen
54// track by track
55//
56//gener->SetVertexSmear(perTrack);
57
58gAlice->SetField(-999,2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
59
60Int_t iMAG=1;
61Int_t iITS=1;
62Int_t iTPC=1;
63Int_t iTOF=1;
64Int_t iRICH=1;
4048e88d 65Int_t iZDC=0;
fe4da5cc 66Int_t iCASTOR=1;
67Int_t iTRD=1;
68Int_t iABSO=1;
69Int_t iDIPO=1;
70Int_t iHALL=1;
43f0a169 71Int_t iFRAME=1;
fe4da5cc 72Int_t iSHIL=1;
73Int_t iPIPE=1;
74Int_t iFMD=1;
75Int_t iMUON=1;
76Int_t iPHOS=1;
77Int_t iPMD=1;
78
79//=================== Alice BODY parameters =============================
80AliBODY *BODY = new AliBODY("BODY","Alice envelop");
81
82
83if(iMAG) {
84//=================== MAG parameters ============================
85// --- Start with Magnet since detector layouts may be depending ---
86// --- on the selected Magnet dimensions ---
87AliMAG *MAG = new AliMAG("MAG","Magnet");
88}
89
4b11ac09 90
91if(iABSO) {
92//=================== ABSO parameters ============================
93AliABSO *ABSO = new AliABSO("ABSO","Muon Absorber");
94}
95
96if(iDIPO) {
97//=================== DIPO parameters ============================
98
99AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
100}
101
102if(iHALL) {
103//=================== HALL parameters ============================
104
105AliHALL *HALL = new AliHALL("HALL","Alice Hall");
106}
107
108
109if(iFRAME) {
110//=================== FRAME parameters ============================
111
112AliFRAME *FRAME = new AliFRAMEv0("FRAME","Space Frame");
113}
114
115if(iSHIL) {
116//=================== SHIL parameters ============================
117
118AliSHIL *SHIL = new AliSHIL("SHIL","Shielding");
119}
120
121
122if(iPIPE) {
123//=================== PIPE parameters ============================
124
125AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
126}
127
128
fe4da5cc 129if(iITS) {
130//=================== ITS parameters ============================
131//
132// EUCLID is a flag to output (=1) both geometry and media to two ASCII files
133// (called by default ITSgeometry.euc and ITSgeometry.tme) in a format
134// understandable to the CAD system EUCLID. The default (=0) means that you
135// dont want to use this facility.
136//
137AliITS *ITS = new AliITSv3("ITS","normal ITS");
138ITS->SetEUCLID(1);
139}
140
141if(iTPC) {
142//============================ TPC parameters ================================
143// --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
144// --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
145// --- sectors are specified, any value other than that requires at least one
146// --- sector (lower or upper)to be specified!
147// --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
148// --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
149// --- SecLows - number of lower sectors specified (up to 6)
150// --- SecUps - number of upper sectors specified (up to 12)
151// --- Sens - sensitive strips for the Slow Simulator !!!
152// --- This does NOT work if all S or L-sectors are specified, i.e.
153// --- if SecAL or SecAU < 0
154//
155//
156//-----------------------------------------------------------------------------
157
158AliTPC *TPC = new AliTPCv1("TPC","Normal TPC");
159TPC->SetSecAL(1);
160TPC->SetSecAU(1);
161TPC->SetSecLows(1, -1, -1, -1, -1, -1);
162TPC->SetSecUps(25, 26, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1);
163TPC->SetSens(1);
164}
165
166if(iTOF) {
167//=================== TOF parameters ============================
168AliTOF *TOF = new AliTOFv2("TOF","normal TOF");
169}
170
171if(iRICH) {
172//=================== RICH parameters ===========================
173
206e3707 174 AliRICH *RICH = new AliRICHv0("RICH","normal RICH");
fe4da5cc 175
206e3707 176 RICH->SetSMAXAR(0.03);
177 RICH->SetSMAXAL(-1);
178//
179// Version 0
180// Default Segmentation
181 AliRICHsegmentationV0* RsegV0 = new AliRICHsegmentationV0;
182 RsegV0->SetPADSIZ(.8, .8);
183 RsegV0->SetDAnod(0.8/3);
184// Default response
185 AliRICHresponseV0* Rresponse0 = new AliRICHresponseV0;
186 AliRICHresponseCkv* RresponseCkv = new AliRICHresponseCkv;
187
188//------------------------Chambers 0-6 ----------------------------
189 for (Int_t i=0; i<7; i++) {
190 RICH->SetSegmentationModel(i, 1, RsegV0);
191 RICH->SetResponseModel(i, mip , Rresponse0);
192 RICH->SetResponseModel(i, cerenkov, RresponseCkv);
193 RICH->Chamber(i).SetRSIGM(5.);
194 RICH->Chamber(i).SetMUCHSP(43.);
195 RICH->Chamber(i).SetMUSIGM(0.18, 0.18);
196 RICH->Chamber(i).SetMAXADC( 1024);
197 RICH->Chamber(i).SetSqrtKx3(0.77459667);
198 RICH->Chamber(i).SetKx2(0.962);
199 RICH->Chamber(i).SetKx4(0.379);
200 RICH->Chamber(i).SetSqrtKy3(0.77459667);
201 RICH->Chamber(i).SetKy2(0.962);
202 RICH->Chamber(i).SetKy4(0.379);
203 RICH->Chamber(i).SetPitch(0.25);
204 RICH->SetNsec(i,1);
205 }
fe4da5cc 206}
207
208if(iZDC) {
209//=================== ZDC parameters ============================
210
211AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC");
212}
213
214if(iCASTOR) {
215//=================== CASTOR parameters ============================
216
217AliCASTOR *CASTOR = new AliCASTORv1("CASTOR","normal CASTOR");
218}
219
220if(iTRD) {
221//=================== TRD parameters ============================
222
50772691 223AliTRD *TRD = new AliTRDv0("TRD","TRD version 0");
43f0a169 224// Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
225TRD->SetGasMix(0);
50772691 226TRD->SetHits(1);
fe4da5cc 227}
228
fe4da5cc 229if(iFMD) {
230//=================== FMD parameters ============================
231
232AliFMD *FMD = new AliFMDv1("FMD","normal FMD");
233}
234
235if(iMUON) {
236//=================== MUON parameters ===========================
237
238AliMUON *MUON = new AliMUONv0("MUON","normal MUON");
239
240MUON->SetSMAXAR(0.03);
241MUON->SetSMAXAL(-1);
242//
243// Version 0
244//
245// First define the number of planes that are segmented (1 or 2) by a call
246// to SetNsec.
247// Then chose for each chamber (chamber plane) the segmentation
248// and response model.
249// They should be equal for the two chambers of each station. In a future
250// version this will be enforced.
251//
252//
253 Int_t chamber;
254 Int_t station;
255// Default Segmentation
256 AliMUONsegmentationV0* segV0 = new AliMUONsegmentationV0;
257// Default response
258 AliMUONresponseV0* response0 = new AliMUONresponseV0;
259 response0->SetSqrtKx3(0.761577);
260 response0->SetKx2(0.972655);
261 response0->SetKx4(0.3841);
262 response0->SetSqrtKy3(0.714143);
263 response0->SetKy2(1.0099);
264 response0->SetKy4(0.403);
265 response0->SetPitch(0.25);
266 response0->SetRSIGM(10.);
267 response0->SetMUCHSP(5.);
268 response0->SetMUSIGM(0.18, 0.18);
269 response0->SetMAXADC( 1024);
270//--------------------------------------------------------
271// Configuration for Chamber TC1/2 (Station 1) ----------
272//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
273 Float_t rseg[4]={17.5, 55.2, 71.3, 95.5};
274 Int_t nseg[4]={4, 4, 2, 1};
275
276 chamber=1;
277//^^^^^^^^^
278 MUON->SetNsec(chamber-1,2);
279//
280 AliMUONsegmentationV01 *seg11=new AliMUONsegmentationV01;
281 seg11->SetSegRadii(rseg);
282 seg11->SetPADSIZ(3.048, 0.508);
283 seg11->SetPadDivision(nseg);
284 MUON->SetSegmentationModel(chamber-1, 1, seg11);
285//
286 AliMUONsegmentationV01 *seg12=new AliMUONsegmentationV01;
287 seg12->SetSegRadii(rseg);
288 seg12->SetPADSIZ(2.032, 0.762);
289 seg12->SetPadDivision(nseg);
290
291 MUON->SetSegmentationModel(chamber-1, 2, seg12);
292
293 chamber=2;
294//^^^^^^^^^
295 MUON->SetNsec(chamber-1,2);
296 MUON->SetSegmentationModel(chamber-1, 1, seg11);
297 MUON->SetSegmentationModel(chamber-1, 2, seg12);
298
299 station=1;
300//^^^^^^^^^
301 MUON->SetResponseModel(0, response0);
302 MUON->SetResponseModel(1, response0);
303//
304//--------------------------------------------------------
305// Configuration for Chamber TC3/4 -----------------------
306//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
307
308 chamber=3;
309 MUON->SetNsec(chamber-1,1);
310 AliMUONsegmentationV0 *seg34=new AliMUONsegmentationV0;
311 seg34->SetDAnod(0.51/3.);
312
313 MUON->SetSegmentationModel(chamber-1, 1, seg34);
314 MUON->SetResponseModel(chamber-1, response0);
315
316 chamber=4;
317 MUON->SetNsec(chamber-1,1);
318 MUON->SetSegmentationModel(chamber-1, 1, seg34);
319 MUON->SetResponseModel(chamber-1, response0);
320//
321// Station 2
322 station=2;
323 MUON->SetPADSIZ(station, 1, 0.75, 0.51);
324 MUON->SetMUCHSP(station, 5.);
325 MUON->SetMUSIGM(station, 0.18, 0.18);
326 MUON->SetRSIGM(station, 10.);
327 MUON->SetMAXADC(station, 1024);
328
329//
330//--------------------------------------------------------
331// Configuration for Chamber TC5/6 -----------------------
332//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
333
334 seg5 = new AliMUONsegmentationV1;
335 AliMUONresponseV0* response5 = new AliMUONresponseV0;
336 // K3 = 0.62
337 response5->SetSqrtKx3(0.78740079);
338 response5->SetKx2(0.95237319); // 0.5 * kPI * (1- 0.5*sqrtky3 )
339 response5->SetKx4(0.37480633); // 0.25/TMath::ATan(sqrtkx3)
340 // K3 = 0.55
341 response5->SetSqrtKy3(0.74161985);
342 response5->SetKy2(0.98832946);
343 response5->SetKy4(0.39177817);
344 response5->SetPitch(0.325);
345 response5->SetRSIGM(10.);
346 response5->SetMUCHSP(5.);
347 response5->SetMUSIGM( 0.4, 0.4);
348 response5->SetMAXADC( 1024);
349
350 chamber=5;
351 MUON->SetNsec(chamber-1,1);
352 MUON->SetSegmentationModel(chamber-1, 1, seg5);
353 MUON->SetResponseModel(chamber-1, response5);
354
355 chamber=6;
356 MUON->SetNsec(chamber-1,1);
357 MUON->SetSegmentationModel(chamber-1, 1, seg5);
358 MUON->SetResponseModel(chamber-1, response5);
359//
360// Station 3
361 station=3;
362 MUON->SetPADSIZ(station, 1, 0.975, 0.55);
363
364//
365//--------------------------------------------------------
366// Configuration for Chamber TC7/8/9/10-------------------
367//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
368
369 chamber=7;
370 MUON->SetNsec(chamber-1,1);
371 AliMUONsegmentationV0 *seg78=new AliMUONsegmentationV0;
372 seg78->SetDAnod(0.51/3.);
373
374 MUON->SetSegmentationModel(chamber-1, 1, seg78);
375 MUON->SetResponseModel(chamber-1, response0);
376
377 chamber=8;
378 MUON->SetNsec(chamber-1,1);
379 MUON->SetSegmentationModel(chamber-1, 1, seg78);
380 MUON->SetResponseModel(chamber-1, response0);
381//
382// Station 4
383 station=4;
384 MUON->SetPADSIZ(station, 1, 0.75, 0.5);
385
386 chamber=9;
387 MUON->SetNsec(chamber-1,1);
388 AliMUONsegmentationV0 *seg910=new AliMUONsegmentationV0;
389 seg910->SetDAnod(0.51/3.);
390
391 MUON->SetSegmentationModel(chamber-1, 1, seg910);
392 MUON->SetResponseModel(chamber-1, response0);
393
394 chamber=10;
395 MUON->SetNsec(chamber-1,1);
396 MUON->SetSegmentationModel(chamber-1, 1, seg910);
397 MUON->SetResponseModel(chamber-1, response0);
398//
399// Station 5
400 station=5;
401 MUON->SetPADSIZ(station, 1, 0.75, 0.5);
402
403 chamber=11;
404 MUON->SetNsec(chamber-1,1);
405 AliMUONsegmentationV0 *seg1112=new AliMUONsegmentationV0;
406 seg1112->SetDAnod(0.51/3.);
407
408 MUON->SetSegmentationModel(chamber-1, 1, seg1112);
409 MUON->SetResponseModel(chamber-1, response0);
410
411 chamber=12;
412 MUON->SetNsec(chamber-1,1);
413 MUON->SetSegmentationModel(chamber-1, 1, seg1112);
414 MUON->SetResponseModel(chamber-1, response0);
415//
416// Trigger Station 1
417 station=6;
418 MUON->SetPADSIZ(station, 1, 0.75, 0.5);
419
420 chamber=13;
421 MUON->SetNsec(chamber-1,1);
422 AliMUONsegmentationV0 *seg1314=new AliMUONsegmentationV0;
423 seg1314->SetDAnod(0.51/3.);
424
425 MUON->SetSegmentationModel(chamber-1, 1, seg1314);
426 MUON->SetResponseModel(chamber-1, response0);
427
428 chamber=14;
429 MUON->SetNsec(chamber-1,1);
430 MUON->SetSegmentationModel(chamber-1, 1, seg1314);
431 MUON->SetResponseModel(chamber-1, response0);
432//
433// Trigger Station 2
434 station=7;
435 MUON->SetPADSIZ(station, 1, 0.75, 0.5);
436}
437
438if(iPHOS) {
439//=================== PHOS parameters ===========================
440
441AliPHOS *PHOS = new AliPHOSv1("PHOS","normal PHOS");
442// * PHOSflags: YES: X<>0 NO: X=0
443// * PHOSflags(1) : -----X Create branch for TObjArray of AliPHOSCradle
444// * ----X- Create file (ftn03 on HP-UX) with list of SHAKER particles (7Mb/event)
445// *
446PHOS->SetFlags(000001);
447PHOS->SetRadius(460); //Distance from beam to PHOS crystals.
448// (crystal_side_size,crystal_length,wrap_thikness,air_thikness,PIN_size,PIN length)
449PHOS->SetCell(2.2, 18., 0.01, 0.01, 1., 0.1);
450PHOS->SetCradleSize(104, 88, 4); // Nz (along beam), Nphi, Ncradles
451PHOS->SetCradleA(0); //Angle between Cradles
452PHOS->SetCPV(1., 2.); //CPV thikness, CPV-PHOS distance
453// * ===============
454// * PHOS extra parameters (contact Maxim Volkov volkov@mail.cern.ch)
455// * 1. STE_THICK Steel cover thickness
456// * 2. SUP_Y Crystal support height
457// * 3. FTIU_THICK Thermo Insulating outer cover Upper plate thickness
458// * 4. UFP_Y Upper Polystyrene Foam plate thickness
459// * 5. TCB_THICK Thermo insulating Crystal Block wall thickness
460// * 6. UCP_Y Upper Cooling Plate thickness
461// * 7. ASP_Y Al Support Plate thickness
462// * 8. TIP_Y Lower Thermo Insulating Plate thickness
463// * 9. TXP_Y Lower Textolit Plate thickness
464PHOS->SetExtra(0.001, 6.95, 4., 5., 2., 0.06, 10., 3., 1.);
465PHOS->SetTextolitWall(209., 71., 250.); //Textolit Wall box dimentions
466PHOS->SetInnerAir(206., 66., 244.); //Inner AIR volume dimensions
467// * ===============================
468// * 1. FTI_X Foam Thermo Insulating outer cover dimensions
469// * 2. FTI_Y ==//==
470// * 3. FTI_Z ==//==
471// * 4. FTI_R Distance from IP to Foam Thermo Insulating top plate
472PHOS->SetFoam(214.6, 80., 260., 467.);
473// =================================
474// *******************************************************************************
475// * KINE 700 - SHAKER generator
476// * KINE 700 x y z NDNDY YLIM PTLIM ChargeFlag
477// * JWEAK=0
478// * JPI0=JETA=1
479// * JPIC=JPRO=JKAC=JKA0=JRHO=JOME=JPHI=JPSI=JDRY=ChargeFlag
480// * Int_t JWEI; // Unweighted generation
481// * Int_t NDNDY; // Density of charged particles
482// * Float_t YLIM; // Rapidity Limit
483// * Float_t PTLIM; // Pt limit in GeV/c
484// * Int_t JWEAK; // Disable weak decays
485// * Int_t JPI0; // pi0 generation
486// * Int_t JETA; // eta generation
487// * Int_t JPIC; // pi+/- generation
488// * Int_t JPRO; // proton generation
489// * Int_t JKAC; // K+/- generation
490// * Int_t JKA0; // K0 generation
491// * Int_t JRHO; // rho generation
492// * Int_t JOME; // omega generation
493// * Int_t JPHI; // phi generation
494// * Int_t JPSI; // J/psi generation
495// * Int_t JDRY; // Drell-Yan generation
496// * KINE 700 5. 175. 0. 800. 1.5 5. 1.
497// *******************************************************************************
498}
499
500if(iPMD) {
501//=================== PMD parameters ============================
502
ecd5c1f7 503AliPMD *PMD = new AliPMDv0("PMD","normal PMD");
fe4da5cc 504PMD->SetPAR(1., 1., 0.8, 0.02);
ecd5c1f7 505PMD->SetIN(6., 18., -580., 27., 27.);
fe4da5cc 506PMD->SetGEO(0.0, 0.2, 4.);
ecd5c1f7 507PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
508
fe4da5cc 509}
510
511}