TOF geometry updating (addition of AliTOFGeometry)
[u/mrichter/AliRoot.git] / TOF / AliTOFconfig.C
CommitLineData
32bd3eb5 1#if !defined(__CINT__) || defined(__MAKECINT__)
2#include <Riostream.h>
3#include <TRandom.h>
4#include <TSystem.h>
5#include <TVirtualMC.h>
6#include <TGeant3.h>
7#include "STEER/AliRunLoader.h"
8#include "STEER/AliRun.h"
9#include "STEER/AliConfig.h"
10#include "STEER/AliGenerator.h"
11#include "PYTHIA6/AliDecayerPythia.h"
12#include "EVGEN/AliGenHIJINGpara.h"
13#include "THijing/AliGenHijing.h"
14#include "EVGEN/AliGenCocktail.h"
15#include "EVGEN/AliGenSlowNucleons.h"
16#include "EVGEN/AliSlowNucleonModelExp.h"
17#include "PYTHIA6/AliGenPythia.h"
18#include "STEER/AliMagFMaps.h"
19#include "STRUCT/AliBODY.h"
20#include "STRUCT/AliMAG.h"
21#include "STRUCT/AliABSOv0.h"
22#include "STRUCT/AliDIPOv2.h"
23#include "STRUCT/AliHALL.h"
24#include "STRUCT/AliFRAMEv2.h"
25#include "STRUCT/AliSHILv2.h"
26#include "STRUCT/AliPIPEv0.h"
e615b5b5 27#include "ITS/AliITSvPPRasymmFMD.h"
32bd3eb5 28#include "TPC/AliTPCv2.h"
32bd3eb5 29#include "TOF/AliTOFv4T0.h"
30#include "RICH/AliRICHv3.h"
31#include "ZDC/AliZDCv2.h"
32#include "TRD/AliTRDv1.h"
33#include "FMD/AliFMDv1.h"
34#include "MUON/AliMUONv1.h"
35#include "PHOS/AliPHOSv1.h"
36#include "PMD/AliPMDv1.h"
37#include "START/AliSTARTv1.h"
38#include "EMCAL/AliEMCALv1.h"
39#include "CRT/AliCRTv0.h"
40#include "VZERO/AliVZEROv2.h"
41#endif
42
43enum PprRun_t
44{
45 test50,
46 kParam_8000, kParam_4000, kParam_2000,
47 kHijing_cent1, kHijing_cent2,
48 kHijing_per1, kHijing_per2, kHijing_per3, kHijing_per4, kHijing_per5,
49 kHijing_jj25, kHijing_jj50, kHijing_jj75, kHijing_jj100, kHijing_jj200,
50 kHijing_gj25, kHijing_gj50, kHijing_gj75, kHijing_gj100, kHijing_gj200,
e615b5b5 51 kHijing_pA, kPythia6, kPythia6Jets, kD0PbPb5500
32bd3eb5 52};
53
54enum PprGeo_t
55{
56 kHoles, kNoHoles
57};
58
59enum PprRad_t
60{
61 kGluonRadiation, kNoGluonRadiation
62};
63
64enum PprMag_t
65{
66 k2kG, k4kG, k5kG
67};
68
69
70// This part for configuration
e615b5b5 71static PprRun_t srun = test50;
0f4a7374 72static PprGeo_t sgeo = kHoles;
32bd3eb5 73static PprRad_t srad = kGluonRadiation;
e615b5b5 74static PprMag_t smag = k5kG;
32bd3eb5 75
76// Comment line
77static TString comment;
78
79// Functions
80Float_t EtaToTheta(Float_t arg);
81AliGenerator* GeneratorFactory(PprRun_t srun);
82AliGenHijing* HijingStandard();
83
42036c57 84void Config()
85{
42036c57 86 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
87 // Theta range given through pseudorapidity limits 22/6/2001
88
89 // Set Random Number seed
32bd3eb5 90 gRandom->SetSeed(12345); //Set 0 to use the current time
91 cout<<"Seed for random number generation= "<<gRandom->GetSeed()<<endl;
92
42036c57 93
95cd7d4c 94 // libraries required by geant321
32bd3eb5 95#if defined(__CINT__)
95cd7d4c 96 gSystem->Load("libgeant321");
32bd3eb5 97#endif
95cd7d4c 98
99 new TGeant3("C++ Interface to Geant3");
42036c57 100
32bd3eb5 101 AliRunLoader* rl=0x0;
102
103 cout<<"Config.C: Creating Run Loader ..."<<endl;
104 rl = AliRunLoader::Open("galice.root",
105 AliConfig::fgkDefaultEventFolderName,
106 "recreate");
107 if (rl == 0x0)
108 {
109 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
110 return;
111 }
112 rl->SetCompressionLevel(2);
113 rl->SetNumberOfEventsPerFile(3);
114 gAlice->SetRunLoader(rl);
42036c57 115
116 //
117 // Set External decayer
118 AliDecayer *decayer = new AliDecayerPythia();
119
120 decayer->SetForceDecay(kAll);
121 decayer->Init();
122 gMC->SetExternalDecayer(decayer);
123 //
124 //
125 //=======================================================================
32bd3eb5 126 //
127 //=======================================================================
128 // ************* STEERING parameters FOR ALICE SIMULATION **************
129 // --- Specify event type to be tracked through the ALICE setup
130 // --- All positions are in cm, angles in degrees, and P and E in GeV
131
132 gMC->SetProcess("DCAY",1);
133 gMC->SetProcess("PAIR",1);
134 gMC->SetProcess("COMP",1);
135 gMC->SetProcess("PHOT",1);
136 gMC->SetProcess("PFIS",0);
137 gMC->SetProcess("DRAY",0);
138 gMC->SetProcess("ANNI",1);
139 gMC->SetProcess("BREM",1);
140 gMC->SetProcess("MUNU",1);
141 gMC->SetProcess("CKOV",1);
142 gMC->SetProcess("HADR",1);
143 gMC->SetProcess("LOSS",2);
144 gMC->SetProcess("MULS",1);
145 gMC->SetProcess("RAYL",1);
42036c57 146
147 Float_t cut = 1.e-3; // 1MeV cut by default
148 Float_t tofmax = 1.e10;
149
32bd3eb5 150 gMC->SetCut("CUTGAM", cut);
151 gMC->SetCut("CUTELE", cut);
152 gMC->SetCut("CUTNEU", cut);
153 gMC->SetCut("CUTHAD", cut);
154 gMC->SetCut("CUTMUO", cut);
155 gMC->SetCut("BCUTE", cut);
156 gMC->SetCut("BCUTM", cut);
157 gMC->SetCut("DCUTE", cut);
158 gMC->SetCut("DCUTM", cut);
159 gMC->SetCut("PPCUTM", cut);
160 gMC->SetCut("TOFMAX", tofmax);
161
162
163// Generator Configuration
164 gAlice->SetDebug(1);
165 AliGenerator* gener = GeneratorFactory(srun);
166 gener->SetOrigin(0, 0, 0); // vertex position
e615b5b5 167 gener->SetSigma(0, 0, 5.3); // Sigma in (X,Y,Z) (cm) on IP position
168 gener->SetCutVertexZ(1.); // Truncate at 1 sigma
169 gener->SetVertexSmear(kPerEvent);
42036c57 170 gener->SetTrackingFlag(1);
171 gener->Init();
32bd3eb5 172
173 if (smag == k2kG) {
174 comment = comment.Append(" | L3 field 0.2 T");
175 } else if (smag == k4kG) {
176 comment = comment.Append(" | L3 field 0.4 T");
177 } else if (smag == k5kG) {
178 comment = comment.Append(" | L3 field 0.5 T");
179 }
180
181
182 if (srad == kGluonRadiation)
183 {
184 comment = comment.Append(" | Gluon Radiation On");
185
186 } else {
187 comment = comment.Append(" | Gluon Radiation Off");
188 }
42036c57 189
32bd3eb5 190 if (sgeo == kHoles)
191 {
192 comment = comment.Append(" | Holes for PHOS/RICH");
193
194 } else {
195 comment = comment.Append(" | No holes for PHOS/RICH");
196 }
197
198 printf("\n \n Comment: %s \n \n", comment.Data());
199
200
201// Field (L3 0.4 T)
202 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., smag);
e615b5b5 203 field->SetL3ConstField(0); //Using const. field in the barrel
32bd3eb5 204 rl->CdGAFile();
e615b5b5 205 gAlice->SetField(field);
32bd3eb5 206//
e615b5b5 207 Int_t iABSO = 0;
208 Int_t iDIPO = 0;
209 Int_t iFMD = 0;
32bd3eb5 210 Int_t iFRAME = 1;
e615b5b5 211 Int_t iHALL = 0;
32bd3eb5 212 Int_t iITS = 1;
213 Int_t iMAG = 1;
e615b5b5 214 Int_t iMUON = 0;
215 Int_t iPHOS = 0;
32bd3eb5 216 Int_t iPIPE = 1;
e615b5b5 217 Int_t iPMD = 0;
218 Int_t iRICH = 0;
219 Int_t iSHIL = 0;
220 Int_t iSTART = 0;
32bd3eb5 221 Int_t iTOF = 1;
222 Int_t iTPC = 1;
223 Int_t iTRD = 1;
e615b5b5 224 Int_t iZDC = 0;
225 Int_t iEMCAL = 0;
226 Int_t iVZERO = 0;
32bd3eb5 227 Int_t iCRT = 0;
42036c57 228
229 //=================== Alice BODY parameters =============================
230 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
231
232
233 if (iMAG)
234 {
235 //=================== MAG parameters ============================
236 // --- Start with Magnet since detector layouts may be depending ---
237 // --- on the selected Magnet dimensions ---
238 AliMAG *MAG = new AliMAG("MAG", "Magnet");
239 }
240
241
242 if (iABSO)
243 {
244 //=================== ABSO parameters ============================
245 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
246 }
247
248 if (iDIPO)
249 {
250 //=================== DIPO parameters ============================
251
252 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
253 }
254
255 if (iHALL)
256 {
257 //=================== HALL parameters ============================
258
259 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
260 }
261
262
263 if (iFRAME)
264 {
265 //=================== FRAME parameters ============================
266
32bd3eb5 267 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
268 if (sgeo == kHoles) {
269 FRAME->SetHoles(1);
270 } else {
271 FRAME->SetHoles(0);
272 }
42036c57 273 }
274
275 if (iSHIL)
276 {
277 //=================== SHIL parameters ============================
278
32bd3eb5 279 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
42036c57 280 }
281
282
283 if (iPIPE)
284 {
285 //=================== PIPE parameters ============================
286
287 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
288 }
289
32bd3eb5 290 if(iITS) {
42036c57 291
32bd3eb5 292 //=================== ITS parameters ============================
42036c57 293 //
294 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
295 // almost all other detectors. This involves the fact that the ITS geometry
296 // still has several options to be followed in parallel in order to determine
297 // the best set-up which minimizes the induced background. All the geometries
298 // available to date are described in the following. Read carefully the comments
299 // and use the default version (the only one uncommented) unless you are making
300 // comparisons and you know what you are doing. In this case just uncomment the
301 // ITS geometry you want to use and run Aliroot.
302 //
303 // Detailed geometries:
304 //
305 //
306 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
307 //
308 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
309 //
e615b5b5 310 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version with asymmetric services");
311 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
312 ITS->SetReadDet(kTRUE); // don't touch this parameter if you're not an ITS developer
42036c57 313 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
32bd3eb5 314 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
315 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
316 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
317 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
318 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
319 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
e615b5b5 320
42036c57 321 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
322 // for reconstruction !):
323 //
324 //
325 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
32bd3eb5 326 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
42036c57 327 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
328 //
329 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
32bd3eb5 330 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
42036c57 331 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
332 //
333 //
334 //
335 // Geant3 <-> EUCLID conversion
336 // ============================
337 //
338 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
339 // media to two ASCII files (called by default ITSgeometry.euc and
340 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
341 // The default (=0) means that you dont want to use this facility.
342 //
32bd3eb5 343 ITS->SetEUCLID(0);
344 }
42036c57 345
346 if (iTPC)
347 {
348 //============================ TPC parameters ================================
349 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
350 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
351 // --- sectors are specified, any value other than that requires at least one
352 // --- sector (lower or upper)to be specified!
353 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
354 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
355 // --- SecLows - number of lower sectors specified (up to 6)
356 // --- SecUps - number of upper sectors specified (up to 12)
357 // --- Sens - sensitive strips for the Slow Simulator !!!
358 // --- This does NOT work if all S or L-sectors are specified, i.e.
359 // --- if SecAL or SecAU < 0
360 //
361 //
362 //-----------------------------------------------------------------------------
363
364 // gROOT->LoadMacro("SetTPCParam.C");
365 // AliTPCParam *param = SetTPCParam();
32bd3eb5 366 AliTPC *TPC = new AliTPCv2("TPC", "Default");
42036c57 367
368 // All sectors included
369 TPC->SetSecAL(-1);
370 TPC->SetSecAU(-1);
371
372 }
373
32bd3eb5 374
0f4a7374 375 if (iTOF) AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
42036c57 376
32bd3eb5 377
42036c57 378 if (iRICH)
379 {
380 //=================== RICH parameters ===========================
32bd3eb5 381 AliRICH *RICH = new AliRICHv3("RICH", "normal RICH");
42036c57 382
383 }
384
385
386 if (iZDC)
387 {
388 //=================== ZDC parameters ============================
389
390 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
391 }
392
42036c57 393 if (iTRD)
394 {
395 //=================== TRD parameters ============================
396
32bd3eb5 397 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
42036c57 398
399 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
400 TRD->SetGasMix(1);
32bd3eb5 401 if (sgeo == kHoles) {
402 // With hole in front of PHOS
403 TRD->SetPHOShole();
404 // With hole in front of RICH
405 TRD->SetRICHhole();
406 }
407 // Switch on TR
408 AliTRDsim *TRDsim = TRD->CreateTR();
42036c57 409 }
410
411 if (iFMD)
412 {
413 //=================== FMD parameters ============================
32bd3eb5 414 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
42036c57 415 }
416
417 if (iMUON)
418 {
419 //=================== MUON parameters ===========================
420
421 AliMUON *MUON = new AliMUONv1("MUON", "default");
422 }
423 //=================== PHOS parameters ===========================
424
425 if (iPHOS)
426 {
32bd3eb5 427 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
42036c57 428 }
429
430
431 if (iPMD)
432 {
433 //=================== PMD parameters ============================
42036c57 434 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
32bd3eb5 435 }
42036c57 436
32bd3eb5 437 if (iSTART)
438 {
439 //=================== START parameters ============================
440 AliSTART *START = new AliSTARTv1("START", "START Detector");
42036c57 441 }
442
32bd3eb5 443 if (iEMCAL)
42036c57 444 {
445 //=================== EMCAL parameters ============================
32bd3eb5 446 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "G56_2_55_19");
42036c57 447 }
448
32bd3eb5 449 if (iCRT)
42036c57 450 {
32bd3eb5 451 //=================== CRT parameters ============================
452 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
42036c57 453 }
454
32bd3eb5 455 if (iVZERO)
456 {
457 //=================== CRT parameters ============================
458 AliVZERO *VZERO = new AliVZEROv2("VZERO", "normal VZERO");
459 }
460
461
42036c57 462}
463
464Float_t EtaToTheta(Float_t arg){
465 return (180./TMath::Pi())*2.*atan(exp(-arg));
466}
32bd3eb5 467
468
469
470AliGenerator* GeneratorFactory(PprRun_t srun) {
471 Int_t isw = 3;
472 if (srad == kNoGluonRadiation) isw = 0;
473
474
475 AliGenerator * gGener = 0x0;
476 switch (srun) {
477 case test50:
478 {
479 comment = comment.Append(":HIJINGparam test 50 particles");
e615b5b5 480 AliGenHIJINGpara *gener = new AliGenHIJINGpara(50);
32bd3eb5 481 gener->SetMomentumRange(0, 999999.);
482 gener->SetPhiRange(0., 360.);
483 // Set pseudorapidity range from -8 to 8.
e615b5b5 484 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
485 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
32bd3eb5 486 gener->SetThetaRange(thmin,thmax);
487 gGener=gener;
488 }
e615b5b5 489 break;
32bd3eb5 490 case kParam_8000:
491 {
492 comment = comment.Append(":HIJINGparam N=8000");
493 AliGenHIJINGpara *gener = new AliGenHIJINGpara(86030);
494 gener->SetMomentumRange(0, 999999.);
495 gener->SetPhiRange(0., 360.);
496 // Set pseudorapidity range from -8 to 8.
497 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
498 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
499 gener->SetThetaRange(thmin,thmax);
500 gGener=gener;
501 }
e615b5b5 502 break;
32bd3eb5 503 case kParam_4000:
504 {
505 comment = comment.Append("HIJINGparam N=4000");
506 AliGenHIJINGpara *gener = new AliGenHIJINGpara(43015);
507 gener->SetMomentumRange(0, 999999.);
508 gener->SetPhiRange(0., 360.);
509 // Set pseudorapidity range from -8 to 8.
510 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
511 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
512 gener->SetThetaRange(thmin,thmax);
513 gGener=gener;
514 }
515 break;
516 case kParam_2000:
517 {
518 comment = comment.Append("HIJINGparam N=2000");
519 AliGenHIJINGpara *gener = new AliGenHIJINGpara(21507);
520 gener->SetMomentumRange(0, 999999.);
521 gener->SetPhiRange(0., 360.);
522 // Set pseudorapidity range from -8 to 8.
523 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
524 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
525 gener->SetThetaRange(thmin,thmax);
526 gGener=gener;
527 }
e615b5b5 528 break;
32bd3eb5 529//
530// Hijing Central
531//
532 case kHijing_cent1:
533 {
534 comment = comment.Append("HIJING cent1");
535 AliGenHijing *gener = HijingStandard();
536// impact parameter range
537 gener->SetImpactParameterRange(0., 5.);
538 gGener=gener;
539 }
e615b5b5 540 break;
32bd3eb5 541 case kHijing_cent2:
542 {
543 comment = comment.Append("HIJING cent2");
544 AliGenHijing *gener = HijingStandard();
545// impact parameter range
546 gener->SetImpactParameterRange(0., 2.);
547 gGener=gener;
32bd3eb5 548 }
e615b5b5 549 break;
32bd3eb5 550//
551// Hijing Peripheral
552//
553 case kHijing_per1:
554 {
555 comment = comment.Append("HIJING per1");
556 AliGenHijing *gener = HijingStandard();
557// impact parameter range
558 gener->SetImpactParameterRange(5., 8.6);
559 gGener=gener;
560 }
e615b5b5 561 break;
32bd3eb5 562 case kHijing_per2:
563 {
564 comment = comment.Append("HIJING per2");
565 AliGenHijing *gener = HijingStandard();
566// impact parameter range
567 gener->SetImpactParameterRange(8.6, 11.2);
568 gGener=gener;
569 }
e615b5b5 570 break;
32bd3eb5 571 case kHijing_per3:
572 {
573 comment = comment.Append("HIJING per3");
574 AliGenHijing *gener = HijingStandard();
575// impact parameter range
576 gener->SetImpactParameterRange(11.2, 13.2);
577 gGener=gener;
578 }
e615b5b5 579 break;
32bd3eb5 580 case kHijing_per4:
581 {
582 comment = comment.Append("HIJING per4");
583 AliGenHijing *gener = HijingStandard();
584// impact parameter range
585 gener->SetImpactParameterRange(13.2, 15.);
586 gGener=gener;
587 }
e615b5b5 588 break;
32bd3eb5 589 case kHijing_per5:
590 {
591 comment = comment.Append("HIJING per5");
592 AliGenHijing *gener = HijingStandard();
593// impact parameter range
594 gener->SetImpactParameterRange(15., 100.);
595 gGener=gener;
596 }
e615b5b5 597 break;
32bd3eb5 598//
599// Jet-Jet
600//
601 case kHijing_jj25:
602 {
603 comment = comment.Append("HIJING Jet 25 GeV");
604 AliGenHijing *gener = HijingStandard();
605// impact parameter range
606 gener->SetImpactParameterRange(0., 5.);
607 // trigger
608 gener->SetTrigger(1);
609 gener->SetPtJet(25.);
610 gener->SetRadiation(isw);
611 gener->SetSimpleJets(!isw);
612 gener->SetJetEtaRange(-0.3,0.3);
613 gener->SetJetPhiRange(75., 165.);
614 gGener=gener;
615 }
e615b5b5 616 break;
32bd3eb5 617
618 case kHijing_jj50:
619 {
620 comment = comment.Append("HIJING Jet 50 GeV");
621 AliGenHijing *gener = HijingStandard();
622// impact parameter range
623 gener->SetImpactParameterRange(0., 5.);
624 // trigger
625 gener->SetTrigger(1);
626 gener->SetPtJet(50.);
627 gener->SetRadiation(isw);
628 gener->SetSimpleJets(!isw);
629 gener->SetJetEtaRange(-0.3,0.3);
630 gener->SetJetPhiRange(75., 165.);
631 gGener=gener;
632 }
633 break;
634
635 case kHijing_jj75:
636 {
637 comment = comment.Append("HIJING Jet 75 GeV");
638 AliGenHijing *gener = HijingStandard();
639// impact parameter range
640 gener->SetImpactParameterRange(0., 5.);
641 // trigger
642 gener->SetTrigger(1);
643 gener->SetPtJet(75.);
644 gener->SetRadiation(isw);
645 gener->SetSimpleJets(!isw);
646 gener->SetJetEtaRange(-0.3,0.3);
647 gener->SetJetPhiRange(75., 165.);
648 gGener=gener;
649 }
e615b5b5 650 break;
32bd3eb5 651
652 case kHijing_jj100:
653 {
654 comment = comment.Append("HIJING Jet 100 GeV");
655 AliGenHijing *gener = HijingStandard();
656// impact parameter range
657 gener->SetImpactParameterRange(0., 5.);
658 // trigger
659 gener->SetTrigger(1);
660 gener->SetPtJet(100.);
661 gener->SetRadiation(isw);
662 gener->SetSimpleJets(!isw);
663 gener->SetJetEtaRange(-0.3,0.3);
664 gener->SetJetPhiRange(75., 165.);
665 gGener=gener;
666 }
e615b5b5 667 break;
32bd3eb5 668
669 case kHijing_jj200:
670 {
671 comment = comment.Append("HIJING Jet 200 GeV");
672 AliGenHijing *gener = HijingStandard();
673// impact parameter range
674 gener->SetImpactParameterRange(0., 5.);
675 // trigger
676 gener->SetTrigger(1);
677 gener->SetPtJet(200.);
678 gener->SetRadiation(isw);
679 gener->SetSimpleJets(!isw);
680 gener->SetJetEtaRange(-0.3,0.3);
681 gener->SetJetPhiRange(75., 165.);
682 gGener=gener;
683 }
e615b5b5 684 break;
32bd3eb5 685//
686// Gamma-Jet
687//
688 case kHijing_gj25:
689 {
690 comment = comment.Append("HIJING Gamma 25 GeV");
691 AliGenHijing *gener = HijingStandard();
692// impact parameter range
693 gener->SetImpactParameterRange(0., 5.);
694 // trigger
695 gener->SetTrigger(2);
696 gener->SetPtJet(25.);
697 gener->SetRadiation(isw);
698 gener->SetSimpleJets(!isw);
699 gener->SetJetEtaRange(-0.12, 0.12);
700 gener->SetJetPhiRange(220., 320.);
701 gGener=gener;
702 }
e615b5b5 703 break;
32bd3eb5 704
705 case kHijing_gj50:
706 {
707 comment = comment.Append("HIJING Gamma 50 GeV");
708 AliGenHijing *gener = HijingStandard();
709// impact parameter range
710 gener->SetImpactParameterRange(0., 5.);
711 // trigger
712 gener->SetTrigger(2);
713 gener->SetPtJet(50.);
714 gener->SetRadiation(isw);
715 gener->SetSimpleJets(!isw);
716 gener->SetJetEtaRange(-0.12, 0.12);
717 gener->SetJetPhiRange(220., 320.);
718 gGener=gener;
719 }
e615b5b5 720 break;
32bd3eb5 721
722 case kHijing_gj75:
723 {
724 comment = comment.Append("HIJING Gamma 75 GeV");
725 AliGenHijing *gener = HijingStandard();
726// impact parameter range
727 gener->SetImpactParameterRange(0., 5.);
728 // trigger
729 gener->SetTrigger(2);
730 gener->SetPtJet(75.);
731 gener->SetRadiation(isw);
732 gener->SetSimpleJets(!isw);
733 gener->SetJetEtaRange(-0.12, 0.12);
734 gener->SetJetPhiRange(220., 320.);
735 gGener=gener;
736 }
e615b5b5 737 break;
32bd3eb5 738
739 case kHijing_gj100:
740 {
741 comment = comment.Append("HIJING Gamma 100 GeV");
742 AliGenHijing *gener = HijingStandard();
743// impact parameter range
744 gener->SetImpactParameterRange(0., 5.);
745 // trigger
746 gener->SetTrigger(2);
747 gener->SetPtJet(100.);
748 gener->SetRadiation(isw);
749 gener->SetSimpleJets(!isw);
750 gener->SetJetEtaRange(-0.12, 0.12);
751 gener->SetJetPhiRange(220., 320.);
752 gGener=gener;
753 }
e615b5b5 754 break;
32bd3eb5 755
756 case kHijing_gj200:
757 {
758 comment = comment.Append("HIJING Gamma 200 GeV");
759 AliGenHijing *gener = HijingStandard();
760// impact parameter range
761 gener->SetImpactParameterRange(0., 5.);
762 // trigger
763 gener->SetTrigger(2);
764 gener->SetPtJet(200.);
765 gener->SetRadiation(isw);
766 gener->SetSimpleJets(!isw);
767 gener->SetJetEtaRange(-0.12, 0.12);
768 gener->SetJetPhiRange(220., 320.);
769 gGener=gener;
770 }
e615b5b5 771 break;
32bd3eb5 772 case kHijing_pA:
773 {
774 comment = comment.Append("HIJING pA");
775
776 AliGenCocktail *gener = new AliGenCocktail();
777// gener->SetTrackingFlag(0);
778 gener->SetOrigin(0, 0, 0); // vertex position
779 gener->SetSigma(0, 0, 5.3); // Sigma in (X,Y,Z) (cm) on IP position
780 gener->SetCutVertexZ(1.); // Truncate at 1 sigma
781 gener->SetVertexSmear(kPerEvent);
782 AliGenHijing *hijing = new AliGenHijing(-1);
783// centre of mass energy
784 hijing->SetEnergyCMS(TMath::Sqrt(82./208.) * 14000.);
785// impact parameter range
786 hijing->SetImpactParameterRange(0., 15.);
787// reference frame
788 hijing->SetReferenceFrame("CMS");
789 hijing->SetBoostLHC(1);
790// projectile
791 hijing->SetProjectile("P", 1, 1);
792 hijing->SetTarget ("A", 208, 82);
793// tell hijing to keep the full parent child chain
794 hijing->KeepFullEvent();
795// enable jet quenching
796 hijing->SetJetQuenching(0);
797// enable shadowing
798 hijing->SetShadowing(1);
799// Don't track spectators
800 hijing->SetSpectators(0);
801// kinematic selection
802 hijing->SetSelectAll(0);
803//
804 AliGenSlowNucleons* gray = new AliGenSlowNucleons(1);
805 AliSlowNucleonModel* model = new AliSlowNucleonModelExp();
806 gray->SetSlowNucleonModel(model);
807 gray->SetDebug(1);
808 gener->AddGenerator(hijing,"Hijing pPb", 1);
809 gener->AddGenerator(gray, "Gray Particles",1);
810 gGener=gener;
811 }
e615b5b5 812 break;
813 case kPythia6:
32bd3eb5 814 {
815 comment = comment.Append(":Pythia p-p @ 14 TeV");
816 AliGenPythia *gener = new AliGenPythia(-1);
817 gener->SetMomentumRange(0,999999);
818 gener->SetPhiRange(-180,180);
819 gener->SetThetaRange(0., 180.);
820 gener->SetYRange(-12,12);
821 gener->SetPtRange(0,1000);
822 gener->SetStrucFunc(kCTEQ4L);
823 gener->SetProcess(kPyMb);
824 gener->SetEnergyCMS(14000.);
825 gGener=gener;
826 }
e615b5b5 827 break;
828 case kPythia6Jets:
829 {
830 comment = comment.Append(":Pythia jets @ 5.5 TeV");
831 AliGenPythia * gener = new AliGenPythia(-1);
832 gener->SetEnergyCMS(5500.);// Centre of mass energy
833 gener->SetProcess(kPyJets);// Process type
834 gener->SetJetEtaRange(-0.5, 0.5);// Final state kinematic cuts
835 gener->SetJetPhiRange(0., 360.);
836 gener->SetJetEtRange(10., 1000.);
837 gener->SetGluonRadiation(1,1);
838 // gener->SetPtKick(0.);
839 // Structure function
840 gener->SetStrucFunc(kCTEQ4L);
841 gener->SetPtHard(86., 104.);// Pt transfer of the hard scattering
842 gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
843 gener->SetForceDecay(kAll);// Decay type (semielectronic, etc.)
844 gGener=gener;
845 }
846 break;
847 case kD0PbPb5500:
848 {
849 comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
850 AliGenPythia * gener = new AliGenPythia(10);
851 gener->SetProcess(kPyD0PbPbMNR);
852 gener->SetStrucFunc(kCTEQ4L);
853 gener->SetPtHard(2.1,-1.0);
854 gener->SetEnergyCMS(5500.);
855 gener->SetNuclei(208,208);
856 gGener=gener;
857 }
858 break;
32bd3eb5 859 }
860 return gGener;
861}
862
863AliGenHijing* HijingStandard()
864{
865 AliGenHijing *gener = new AliGenHijing(-1);
866// centre of mass energy
867 gener->SetEnergyCMS(5500.);
868// reference frame
869 gener->SetReferenceFrame("CMS");
870// projectile
871 gener->SetProjectile("A", 208, 82);
872 gener->SetTarget ("A", 208, 82);
873// tell hijing to keep the full parent child chain
874 gener->KeepFullEvent();
875// enable jet quenching
876 gener->SetJetQuenching(4);
877// enable shadowing
878 gener->SetShadowing(1);
879// neutral pion and heavy particle decays switched off
880 gener->SetDecaysOff(1);
881// Don't track spectators
882 gener->SetSpectators(0);
883// kinematic selection
884 gener->SetSelectAll(0);
885 return gener;
886}
887
888
889