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