Fixing problems dscovered by test/gun
[u/mrichter/AliRoot.git] / prod / LHC09c1 / Config.C
CommitLineData
456aec39 1//\r
2// Configuration for the first physics production 2008\r
3//\r
4\r
5// One can use the configuration macro in compiled mode by\r
6// root [0] gSystem->Load("libgeant321");\r
7// root [0] gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include\\r
8// -I$ALICE_ROOT -I$ALICE/geant3/TGeant3");\r
9// root [0] .x grun.C(1,"Config.C++")\r
10\r
11#if !defined(__CINT__) || defined(__MAKECINT__)\r
12#include <Riostream.h>\r
13#include <TRandom.h>\r
14#include <TDatime.h>\r
15#include <TSystem.h>\r
16#include <TVirtualMC.h>\r
17#include <TGeant3TGeo.h>\r
18#include "STEER/AliRunLoader.h"\r
19#include "STEER/AliRun.h"\r
20#include "STEER/AliConfig.h"\r
21#include "PYTHIA6/AliDecayerPythia.h"\r
22#include "PYTHIA6/AliGenPythia.h"\r
23#include "TDPMjet/AliGenDPMjet.h"\r
24#include "STEER/AliMagFCheb.h"\r
25#include "STRUCT/AliBODY.h"\r
26#include "STRUCT/AliMAG.h"\r
27#include "STRUCT/AliABSOv3.h"\r
28#include "STRUCT/AliDIPOv3.h"\r
29#include "STRUCT/AliHALLv3.h"\r
30#include "STRUCT/AliFRAMEv2.h"\r
31#include "STRUCT/AliSHILv3.h"\r
32#include "STRUCT/AliPIPEv3.h"\r
33#include "ITS/AliITSv11Hybrid.h"\r
34#include "TPC/AliTPCv2.h"\r
35#include "TOF/AliTOFv6T0.h"\r
36#include "HMPID/AliHMPIDv3.h"\r
37#include "ZDC/AliZDCv3.h"\r
38#include "TRD/AliTRDv1.h"\r
39#include "TRD/AliTRDgeometry.h"\r
40#include "FMD/AliFMDv1.h"\r
41#include "MUON/AliMUONv1.h"\r
42#include "PHOS/AliPHOSv1.h"\r
43#include "PHOS/AliPHOSSimParam.h"\r
44#include "PMD/AliPMDv1.h"\r
45#include "T0/AliT0v1.h"\r
46#include "EMCAL/AliEMCALv2.h"\r
47#include "ACORDE/AliACORDEv1.h"\r
48#include "VZERO/AliVZEROv7.h"\r
49#endif\r
50\r
51\r
52enum PDC06Proc_t \r
53{\r
54 kPythia6, kPhojet, kRunMax\r
55};\r
56\r
57const char * pprRunName[] = {\r
58 "kPythia6", "kPhojet"\r
59};\r
60\r
61enum Mag_t\r
62{\r
63 kNoField, k5kG, kFieldMax\r
64};\r
65\r
66const char * pprField[] = {\r
67 "kNoField", "k5kG"\r
68};\r
69\r
70//--- Functions ---\r
71class AliGenPythia;\r
72AliGenerator *MbPythia();\r
73AliGenerator *MbPhojet();\r
74void ProcessEnvironmentVars();\r
75\r
76// Geterator, field, beam energy\r
77static PDC06Proc_t proc = kPythia6;\r
78static Mag_t mag = k5kG;\r
79static Float_t energy = 900; // energy in CMS\r
80//========================//\r
81// Set Random Number seed //\r
82//========================//\r
83TDatime dt;\r
84static UInt_t seed = dt.Get();\r
85\r
86// Comment line\r
87static TString comment;\r
88\r
89void Config()\r
90{\r
91 \r
92\r
93 // Get settings from environment variables\r
94 ProcessEnvironmentVars();\r
95\r
96 gRandom->SetSeed(seed);\r
97 cerr<<"Seed for random number generation= "<<seed<<endl; \r
98\r
99 // Libraries required by geant321\r
100#if defined(__CINT__)\r
101 gSystem->Load("liblhapdf"); // Parton density functions\r
102 gSystem->Load("libEGPythia6"); // TGenerator interface\r
103 gSystem->Load("libpythia6"); // Pythia\r
104 gSystem->Load("libAliPythia6"); // ALICE specific implementations\r
105 gSystem->Load("libgeant321");\r
106#endif\r
107\r
108 new TGeant3TGeo("C++ Interface to Geant3");\r
109\r
110 //=======================================================================\r
111 // Create the output file\r
112\r
113 \r
114 AliRunLoader* rl=0x0;\r
115\r
116 cout<<"Config.C: Creating Run Loader ..."<<endl;\r
117 rl = AliRunLoader::Open("galice.root",\r
118 AliConfig::GetDefaultEventFolderName(),\r
119 "recreate");\r
120 if (rl == 0x0)\r
121 {\r
122 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");\r
123 return;\r
124 }\r
125 rl->SetCompressionLevel(2);\r
126 rl->SetNumberOfEventsPerFile(1000);\r
127 gAlice->SetRunLoader(rl);\r
128 // gAlice->SetGeometryFromFile("geometry.root");\r
129 // gAlice->SetGeometryFromCDB();\r
130 \r
131 // Set the trigger configuration: proton-proton\r
28da60d3 132 AliSimulation::Instance()->SetTriggerConfig("p-p");\r
456aec39 133\r
134 //\r
135 //=======================================================================\r
136 // ************* STEERING parameters FOR ALICE SIMULATION **************\r
137 // --- Specify event type to be tracked through the ALICE setup\r
138 // --- All positions are in cm, angles in degrees, and P and E in GeV\r
139\r
140\r
141 gMC->SetProcess("DCAY",1);\r
142 gMC->SetProcess("PAIR",1);\r
143 gMC->SetProcess("COMP",1);\r
144 gMC->SetProcess("PHOT",1);\r
145 gMC->SetProcess("PFIS",0);\r
146 gMC->SetProcess("DRAY",0);\r
147 gMC->SetProcess("ANNI",1);\r
148 gMC->SetProcess("BREM",1);\r
149 gMC->SetProcess("MUNU",1);\r
150 gMC->SetProcess("CKOV",1);\r
151 gMC->SetProcess("HADR",1);\r
152 gMC->SetProcess("LOSS",2);\r
153 gMC->SetProcess("MULS",1);\r
154 gMC->SetProcess("RAYL",1);\r
155\r
156 Float_t cut = 1.e-3; // 1MeV cut by default\r
157 Float_t tofmax = 1.e10;\r
158\r
159 gMC->SetCut("CUTGAM", cut);\r
160 gMC->SetCut("CUTELE", cut);\r
161 gMC->SetCut("CUTNEU", cut);\r
162 gMC->SetCut("CUTHAD", cut);\r
163 gMC->SetCut("CUTMUO", cut);\r
164 gMC->SetCut("BCUTE", cut); \r
165 gMC->SetCut("BCUTM", cut); \r
166 gMC->SetCut("DCUTE", cut); \r
167 gMC->SetCut("DCUTM", cut); \r
168 gMC->SetCut("PPCUTM", cut);\r
169 gMC->SetCut("TOFMAX", tofmax); \r
170\r
171\r
172\r
173\r
174 //======================//\r
175 // Set External decayer //\r
176 //======================//\r
177 TVirtualMCDecayer* decayer = new AliDecayerPythia();\r
178 decayer->SetForceDecay(kAll);\r
179 decayer->Init();\r
180 gMC->SetExternalDecayer(decayer);\r
181\r
182 //=========================//\r
183 // Generator Configuration //\r
184 //=========================//\r
185 AliGenerator* gener = 0x0;\r
186 \r
187 if (proc == kPythia6) {\r
188 gener = MbPythia();\r
189 } else if (proc == kPhojet) {\r
190 gener = MbPhojet();\r
191 }\r
192 \r
193 \r
194\r
195 // PRIMARY VERTEX\r
196 //\r
197 gener->SetOrigin(0., 0., 0.); // vertex position\r
198 //\r
199 //\r
200 // Size of the interaction diamond\r
201 // Longitudinal\r
202 Float_t sigmaz = 5.4 / TMath::Sqrt(2.); // [cm]\r
203 if (energy == 900)\r
204 sigmaz = 10.5 / TMath::Sqrt(2.); // [cm]\r
205 if (energy == 7000)\r
206 sigmaz = 6.3 / TMath::Sqrt(2.); // [cm]\r
207 //\r
208 // Transverse\r
209 Float_t betast = 10; // beta* [m]\r
210 Float_t eps = 3.75e-6; // emittance [m]\r
211 Float_t gamma = energy / 2.0 / 0.938272; // relativistic gamma [1]\r
212 Float_t sigmaxy = TMath::Sqrt(eps * betast / gamma) / TMath::Sqrt(2.) * 100.; // [cm]\r
213 printf("\n \n Diamond size x-y: %10.3e z: %10.3e\n \n", sigmaxy, sigmaz);\r
214 \r
215 gener->SetSigma(sigmaxy, sigmaxy, sigmaz); // Sigma in (X,Y,Z) (cm) on IP position\r
216 gener->SetCutVertexZ(3.); // Truncate at 3 sigma\r
217 gener->SetVertexSmear(kPerEvent);\r
218\r
219 gener->Init();\r
220\r
221 // FIELD\r
222 //\r
223 AliMagF* field = 0x0;\r
224 if (mag == kNoField) {\r
225 comment = comment.Append(" | L3 field 0.0 T");\r
4642ac4b 226 field = new AliMagF("Maps","Maps", 0., 0., AliMagF::k2kG,AliMagF::kBeamTypepp, energy/2.0);\r
456aec39 227 } else if (mag == k5kG) {\r
228 comment = comment.Append(" | L3 field 0.5 T");\r
4642ac4b 229 field = new AliMagF("Maps","Maps", 1., 1., AliMagF::k5kG,AliMagF::kBeamTypepp, energy/2.0);\r
456aec39 230 }\r
231 printf("\n \n Comment: %s \n \n", comment.Data());\r
232\r
233 TGeoGlobalMagField::Instance()->SetField(field);\r
234 \r
235 rl->CdGAFile();\r
236 \r
237 Int_t iABSO = 1;\r
238 Int_t iACORDE= 0;\r
239 Int_t iDIPO = 1;\r
240 Int_t iEMCAL = 1;\r
241 Int_t iFMD = 1;\r
242 Int_t iFRAME = 1;\r
243 Int_t iHALL = 1;\r
244 Int_t iITS = 1;\r
245 Int_t iMAG = 1;\r
246 Int_t iMUON = 1;\r
247 Int_t iPHOS = 1;\r
248 Int_t iPIPE = 1;\r
249 Int_t iPMD = 1;\r
250 Int_t iHMPID = 1;\r
251 Int_t iSHIL = 1;\r
252 Int_t iT0 = 1;\r
253 Int_t iTOF = 1;\r
254 Int_t iTPC = 1;\r
255 Int_t iTRD = 1;\r
256 Int_t iVZERO = 1;\r
257 Int_t iZDC = 1;\r
258 \r
259\r
260 //=================== Alice BODY parameters =============================\r
261 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");\r
262\r
263\r
264 if (iMAG)\r
265 {\r
266 //=================== MAG parameters ============================\r
267 // --- Start with Magnet since detector layouts may be depending ---\r
268 // --- on the selected Magnet dimensions ---\r
269 AliMAG *MAG = new AliMAG("MAG", "Magnet");\r
270 }\r
271\r
272\r
273 if (iABSO)\r
274 {\r
275 //=================== ABSO parameters ============================\r
276 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");\r
277 }\r
278\r
279 if (iDIPO)\r
280 {\r
281 //=================== DIPO parameters ============================\r
282\r
283 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");\r
284 }\r
285\r
286 if (iHALL)\r
287 {\r
288 //=================== HALL parameters ============================\r
289\r
290 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");\r
291 }\r
292\r
293\r
294 if (iFRAME)\r
295 {\r
296 //=================== FRAME parameters ============================\r
297\r
298 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");\r
299 FRAME->SetHoles(1);\r
300 }\r
301\r
302 if (iSHIL)\r
303 {\r
304 //=================== SHIL parameters ============================\r
305\r
306 AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");\r
307 }\r
308\r
309\r
310 if (iPIPE)\r
311 {\r
312 //=================== PIPE parameters ============================\r
313\r
314 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");\r
315 }\r
316 \r
317 if (iITS)\r
318 {\r
319 //=================== ITS parameters ============================\r
320\r
321 AliITS *ITS = new AliITSv11Hybrid("ITS","ITS v11Hybrid");\r
322 }\r
323\r
324 if (iTPC)\r
325 {\r
326 //============================ TPC parameters =====================\r
327\r
328 AliTPC *TPC = new AliTPCv2("TPC", "Default");\r
329 }\r
330\r
331\r
332 if (iTOF) {\r
333 //=================== TOF parameters ============================\r
334\r
335 AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");\r
336 }\r
337\r
338\r
339 if (iHMPID)\r
340 {\r
341 //=================== HMPID parameters ===========================\r
342\r
343 AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");\r
344\r
345 }\r
346\r
347\r
348 if (iZDC)\r
349 {\r
350 //=================== ZDC parameters ============================\r
351\r
352 AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");\r
353 }\r
354\r
355 if (iTRD)\r
356 {\r
357 //=================== TRD parameters ============================\r
358\r
359 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");\r
360 AliTRDgeometry *geoTRD = TRD->GetGeometry();\r
361 // Partial geometry: modules at 0,1,7,8,9,16,17\r
362 // starting at 3h in positive direction\r
363 geoTRD->SetSMstatus(2,0);\r
364 geoTRD->SetSMstatus(3,0);\r
365 geoTRD->SetSMstatus(4,0);\r
366 geoTRD->SetSMstatus(5,0);\r
367 geoTRD->SetSMstatus(6,0);\r
368 geoTRD->SetSMstatus(10,0);\r
369 geoTRD->SetSMstatus(11,0);\r
370 geoTRD->SetSMstatus(12,0);\r
371 geoTRD->SetSMstatus(13,0);\r
372 geoTRD->SetSMstatus(14,0);\r
373 geoTRD->SetSMstatus(15,0);\r
374 }\r
375\r
376 if (iFMD)\r
377 {\r
378 //=================== FMD parameters ============================\r
379\r
380 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");\r
381 }\r
382\r
383 if (iMUON)\r
384 {\r
385 //=================== MUON parameters ===========================\r
386 // New MUONv1 version (geometry defined via builders)\r
387\r
388 AliMUON *MUON = new AliMUONv1("MUON", "default");\r
389 }\r
390\r
391 if (iPHOS)\r
392 {\r
393 //=================== PHOS parameters ===========================\r
394\r
395 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");\r
396 //Set simulation parameters different from the default ones.\r
397 AliPHOSSimParam* simEmc = AliPHOSSimParam::GetInstance() ;\r
398 \r
399 // APD noise of warm (+20C) PHOS:\r
400 // a2 = a1*(Y1/Y2)*(M1/M2), where a1 = 0.012 is APD noise at -25C,\r
401 // Y1 = 4.3 photo-electrons/MeV, Y2 = 1.7 p.e/MeV - light yields at -25C and +20C,\r
402 // M1 = 50, M2 = 50 - APD gain factors chosen for t1 = -25C and t2 = +20C,\r
403 // Y = MeanLightYield*APDEfficiency.\r
404\r
405 Float_t apdNoise = 0.012*2.5; \r
406 simEmc->SetAPDNoise(apdNoise);\r
407\r
408 //Raw Light Yield at +20C\r
409 simEmc->SetMeanLightYield(18800);\r
410\r
411 //ADC channel width at +18C.\r
412 simEmc->SetADCchannelW(0.0125);\r
413 }\r
414\r
415\r
416 if (iPMD)\r
417 {\r
418 //=================== PMD parameters ============================\r
419\r
420 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");\r
421 }\r
422\r
423 if (iT0)\r
424 {\r
425 //=================== T0 parameters ============================\r
426 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");\r
427 }\r
428\r
429 if (iEMCAL)\r
430 {\r
431 //=================== EMCAL parameters ============================\r
432\r
433 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE");\r
434 }\r
435\r
436 if (iACORDE)\r
437 {\r
438 //=================== ACORDE parameters ============================\r
439\r
440 AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");\r
441 }\r
442\r
443 if (iVZERO)\r
444 {\r
445 //=================== ACORDE parameters ============================\r
446\r
447 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");\r
448 }\r
449}\r
450//\r
451// PYTHIA\r
452//\r
453\r
454AliGenerator* MbPythia()\r
455{\r
456 comment = comment.Append(Form(" pp at %d GeV: Pythia low-pt", (Int_t) energy));\r
457//\r
458// Pythia\r
459 AliGenPythia* pythia = new AliGenPythia(-1); \r
460 pythia->SetMomentumRange(0, 999999.);\r
461 pythia->SetThetaRange(0., 180.);\r
462 pythia->SetYRange(-12.,12.);\r
463 pythia->SetPtRange(0,1000.);\r
464 pythia->SetProcess(kPyMb);\r
465 pythia->SetEnergyCMS(energy);\r
466 \r
467 // set high multiplicity trigger\r
468 \r
469 // this weight achieves a flat multiplicity distribution\r
470 TH1 *weight = new TH1D("weight","weight",201,-0.5,200.5);\r
471 weight->SetBinContent(1,5.557943);\r
472 weight->SetBinContent(2,8.987494);\r
473 weight->SetBinContent(5,0.2770979);\r
474 weight->SetBinContent(6,0.1434399);\r
475 weight->SetBinContent(7,0.8892316);\r
476 weight->SetBinContent(8,0.6610603);\r
477 weight->SetBinContent(9,0.5973895);\r
478 weight->SetBinContent(10,1.57095);\r
479 weight->SetBinContent(11,0.8407031);\r
480 weight->SetBinContent(12,1.676689);\r
481 weight->SetBinContent(13,1.381264);\r
482 weight->SetBinContent(14,1.209133);\r
483 weight->SetBinContent(15,1.326467);\r
484 weight->SetBinContent(16,1.248326);\r
485 weight->SetBinContent(17,1.396646);\r
486 weight->SetBinContent(18,0.7155231);\r
487 weight->SetBinContent(19,0.262448);\r
488 weight->SetBinContent(20,1.804454);\r
489 weight->SetBinContent(21,0.5723247);\r
490 weight->SetBinContent(22,1.279835);\r
491 weight->SetBinContent(23,0.285018);\r
492 weight->SetBinContent(24,1.239206);\r
493 weight->SetBinContent(25,0.628233);\r
494 weight->SetBinContent(26,1.91724);\r
495 weight->SetBinContent(28,1.130583);\r
496 weight->SetBinContent(29,0.9052101);\r
497 weight->SetBinContent(31,0.4293885);\r
498 weight->SetBinContent(32,1);\r
499 weight->SetBinContent(33,0.9999998);\r
500 weight->SetBinContent(34,0.9999998);\r
501 weight->SetBinContent(35,0.9999999);\r
502 weight->SetBinContent(36,1);\r
503 weight->SetBinContent(37,1);\r
504 weight->SetBinContent(38,1);\r
505 weight->SetBinContent(39,0.9999999);\r
506 weight->SetBinContent(40,0.9999998);\r
507 weight->SetBinContent(41,0.9999998);\r
508 weight->SetBinContent(42,0.9999998);\r
509 weight->SetBinContent(43,0.9999999);\r
510 weight->SetBinContent(44,0.9999999);\r
511 weight->SetBinContent(45,0.9999997);\r
512 weight->SetBinContent(46,0.9999997);\r
513 weight->SetBinContent(47,0.9999997);\r
514 weight->SetBinContent(48,0.9999997);\r
515 weight->SetBinContent(49,0.9999993);\r
516 weight->SetBinContent(50,0.9999997);\r
517 weight->SetBinContent(51,0.9999997);\r
518 weight->SetBinContent(52,0.9999996);\r
519 weight->SetBinContent(53,0.9999995);\r
520 weight->SetBinContent(54,1);\r
521 weight->SetBinContent(55,1);\r
522 weight->SetBinContent(56,1);\r
523 weight->SetBinContent(57,0.9999999);\r
524 weight->SetBinContent(58,0.9999997);\r
525 weight->SetBinContent(59,1);\r
526 weight->SetBinContent(60,1);\r
527 weight->SetBinContent(61,1);\r
528 weight->SetBinContent(62,1);\r
529 weight->SetBinContent(63,0.9999999);\r
530 weight->SetBinContent(64,0.9999999);\r
531 weight->SetBinContent(65,0.9999998);\r
532 weight->SetBinContent(66,0.9999997);\r
533 weight->SetBinContent(67,0.9999999);\r
534 weight->SetBinContent(68,0.9999997);\r
535 weight->SetBinContent(69,0.9999997);\r
536 weight->SetBinContent(70,0.9999997);\r
537 weight->SetBinContent(71,0.9999995);\r
538 weight->SetBinContent(72,0.9999997);\r
539 weight->SetBinContent(73,0.9999997);\r
540 weight->SetBinContent(74,0.9999997);\r
541 weight->SetBinContent(75,0.9999997);\r
542 weight->SetBinContent(76,0.9999997);\r
543 weight->SetBinContent(77,0.9999998);\r
544 weight->SetBinContent(78,0.9999998);\r
545 weight->SetBinContent(79,0.9999997);\r
546 weight->SetBinContent(80,0.9999998);\r
547 weight->SetBinContent(81,0.9999999);\r
548 weight->SetBinContent(82,0.9999999);\r
549 weight->SetBinContent(83,0.9999999);\r
550 weight->SetBinContent(84,0.9999998);\r
551 weight->SetBinContent(85,0.9999996);\r
552 weight->SetBinContent(86,0.9999998);\r
553 weight->SetBinContent(87,0.9999998);\r
554 weight->SetBinContent(88,0.9999999);\r
555 weight->SetBinContent(89,0.9999997);\r
556 weight->SetBinContent(90,0.9999997);\r
557 weight->SetBinContent(91,0.9999997);\r
558 weight->SetBinContent(92,0.9999996);\r
559 weight->SetBinContent(93,0.9999996);\r
560 weight->SetBinContent(94,0.9999995);\r
561 weight->SetBinContent(95,0.9999999);\r
562 weight->SetBinContent(96,0.9999999);\r
563 weight->SetBinContent(97,0.9999998);\r
564 weight->SetBinContent(98,0.9999998);\r
565 weight->SetBinContent(99,0.9999998);\r
566 weight->SetBinContent(100,0.9999998);\r
567 weight->SetEntries(507); \r
568 \r
569 Int_t limit = weight->GetRandom();\r
570 pythia->SetTriggerChargedMultiplicity(limit, 1.4);\r
571 \r
572 comment = comment.Append(Form(" multiplicity threshold set to %d in |eta| < 1.4", limit));\r
573 \r
574 return pythia;\r
575}\r
576\r
577AliGenerator* MbPhojet()\r
578{\r
579 comment = comment.Append(" pp at 14 TeV: Phojet low-pt");\r
580//\r
581// DPMJET\r
582#if defined(__CINT__)\r
583 gSystem->Load("libdpmjet"); // Parton density functions\r
584 gSystem->Load("libTDPMjet"); // Parton density functions\r
585#endif\r
586 AliGenDPMjet* dpmjet = new AliGenDPMjet(-1); \r
587 dpmjet->SetMomentumRange(0, 999999.);\r
588 dpmjet->SetThetaRange(0., 180.);\r
589 dpmjet->SetYRange(-12.,12.);\r
590 dpmjet->SetPtRange(0,1000.);\r
591 dpmjet->SetProcess(kDpmMb);\r
592 dpmjet->SetEnergyCMS(energy);\r
593\r
594 return dpmjet;\r
595}\r
596\r
597void ProcessEnvironmentVars()\r
598{\r
599 // Run type\r
600 if (gSystem->Getenv("CONFIG_RUN_TYPE")) {\r
601 for (Int_t iRun = 0; iRun < kRunMax; iRun++) {\r
602 if (strcmp(gSystem->Getenv("CONFIG_RUN_TYPE"), pprRunName[iRun])==0) {\r
603 proc = (PDC06Proc_t)iRun;\r
604 cout<<"Run type set to "<<pprRunName[iRun]<<endl;\r
605 }\r
606 }\r
607 }\r
608\r
609 // Field\r
610 if (gSystem->Getenv("CONFIG_FIELD")) {\r
611 for (Int_t iField = 0; iField < kFieldMax; iField++) {\r
612 if (strcmp(gSystem->Getenv("CONFIG_FIELD"), pprField[iField])==0) {\r
613 mag = (Mag_t)iField;\r
614 cout<<"Field set to "<<pprField[iField]<<endl;\r
615 }\r
616 }\r
617 }\r
618\r
619 // Energy\r
620 if (gSystem->Getenv("CONFIG_ENERGY")) {\r
621 energy = atoi(gSystem->Getenv("CONFIG_ENERGY"));\r
622 cout<<"Energy set to "<<energy<<" GeV"<<endl;\r
623 }\r
624\r
625 // Random Number seed\r
626 if (gSystem->Getenv("CONFIG_SEED")) {\r
627 seed = atoi(gSystem->Getenv("CONFIG_SEED"));\r
628 }\r
629}\r