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