2 // Configuration for the Physics Data Challenge 2007
5 // Assuming inel = 70 mb (PPR v.1, p.64)
7 // 84.98% of MSEL=0 events (including diffractive) with
8 // QQbar switched off (these events will include injected J/psi) => kPyMbNoHvq
10 // 14.14% of MSEL=1 events with ccbar (in 4 subsamples) => kCharmpp14000wmi
11 // bin 1 25% (3.535%): 2.76 < pthard < 3 GeV/c
12 // bin 2 40% (5.656%): 3 < pthard < 4 GeV/c
13 // bin 3 29% (4.101%): 4 < pthard < 8 GeV/c
14 // bin 4 6% (0.848%): pthard > 8 GeV/c
16 // 0.73% of MSEL=1 events with bbbar (in 4 subsamples) => kBeautypp14000wmi
17 // bin 1 5% (0.037%): 2.76 < pthard < 4 GeV/c
18 // bin 2 31% (0.226%): 4 < pthard < 6 GeV/c
19 // bin 3 28% (0.204%): 6 < pthard < 8 GeV/c
20 // bin 4 36% (0.263%): pthard >8 GeV/c
22 // 0.075% of MSEL=0 events with QQbar switched off and 1 Omega- => kPyOmegaMinus
23 // 0.075% of MSEL=0 events with QQbar switched off and 1 OmegaBar+ => kPyOmegaPlus
25 // One can use the configuration macro in compiled mode by
26 // root [0] gSystem->Load("libgeant321");
27 // root [0] gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include\
28 // -I$ALICE_ROOT -I$ALICE/geant3/TGeant3");
29 // root [0] .x grun.C(1,"Config_PDC07.C++")
31 #if !defined(__CINT__) || defined(__MAKECINT__)
32 #include <Riostream.h>
36 #include <TVirtualMC.h>
37 #include <TGeant3TGeo.h>
38 #include "EVGEN/AliGenCocktail.h"
39 #include "EVGEN/AliGenParam.h"
40 #include "EVGEN/AliGenMUONlib.h"
41 #include "STEER/AliRunLoader.h"
42 #include "STEER/AliRun.h"
43 #include "STEER/AliConfig.h"
44 #include "PYTHIA6/AliDecayerPythia.h"
45 #include "PYTHIA6/AliGenPythia.h"
46 #include "STEER/AliMagFMaps.h"
47 #include "STRUCT/AliBODY.h"
48 #include "STRUCT/AliMAG.h"
49 #include "STRUCT/AliABSOv3.h"
50 #include "STRUCT/AliDIPOv3.h"
51 #include "STRUCT/AliHALLv3.h"
52 #include "STRUCT/AliFRAMEv2.h"
53 #include "STRUCT/AliSHILv3.h"
54 #include "STRUCT/AliPIPEv3.h"
55 #include "ITS/AliITSgeom.h"
56 #include "ITS/AliITSvPPRasymmFMD.h"
57 #include "TPC/AliTPCv2.h"
58 #include "TOF/AliTOFv6T0.h"
59 #include "HMPID/AliHMPIDv2.h"
60 #include "ZDC/AliZDCv3.h"
61 #include "TRD/AliTRDv1.h"
62 #include "FMD/AliFMDv1.h"
63 #include "MUON/AliMUONv1.h"
64 #include "PHOS/AliPHOSv1.h"
65 #include "PMD/AliPMDv1.h"
66 #include "T0/AliT0v1.h"
67 #include "EMCAL/AliEMCALv2.h"
68 #include "ACORDE/AliACORDEv0.h"
69 #include "VZERO/AliVZEROv7.h"
75 //--- Heavy Flavour Production ---
76 kCharmPbPb5500, kCharmpPb8800, kCharmpp14000, kCharmpp14000wmi,
77 kD0PbPb5500, kD0pPb8800, kD0pp14000,
78 kDPlusPbPb5500, kDPluspPb8800, kDPluspp14000,
79 kBeautyPbPb5500, kBeautypPb8800, kBeautypp14000, kBeautypp14000wmi,
81 kPyMbNoHvq, kPyOmegaPlus, kPyOmegaMinus, kPyJetJet,
82 kPyGammaJetPHOS, kPyJetJetPHOS, kPyJetJetPHOSv2, kPyGammaBremsPHOS,
83 kPyGammaJetEMCAL, kPyJetJetEMCAL, kPyGammaBremsEMCAL, kRunMax
86 const char * pprRunName[] = {
87 "kCharmPbPb5500", "kCharmpPb8800", "kCharmpp14000", "kCharmpp14000wmi",
88 "kD0PbPb5500", "kD0pPb8800", "kD0pp14000",
89 "kDPlusPbPb5500", "kDPluspPb8800", "kDPluspp14000",
90 "kBeautyPbPb5500", "kBeautypPb8800", "kBeautypp14000", "kBeautypp14000wmi",
91 "kPyMbNoHvq", "kPyOmegaPlus", "kPyOmegaMinus", "kPyJetJet",
92 "kPyGammaJetPHOS", "kPyJetJetPHOS", "kPyJetJetPHOSv2", "kPyGammaBremsPHOS",
93 "kPyGammaJetEMCAL", "kPyJetJetEMCAL", "kPyGammaBremsEMCAL"
100 kNature, kHadr, kSemiEl, kSemiMu
102 //--- Magnetic Field ---
108 //--- Trigger config ---
111 kDefaultPPTrig, kDefaultPbPbTrig
114 const char * TrigConfName[] = {
119 PDC07Proc_t proc = kPyJetJetEMCAL;
126 static PprGeo_t geo = kHoles;
129 AliGenPythia *PythiaHard(PDC07Proc_t );
130 AliGenPythia *PythiaHVQ(PDC07Proc_t );
131 AliGenerator *MbCocktail();
132 AliGenerator *PyMbTriggered(Int_t pdg);
133 void ProcessEnvironmentVars();
135 // This part for configuration
136 static DecayHvFl_t decHvFl = kNature;
137 static Mag_t mag = k5kG;
138 static TrigConf_t trig = kDefaultPPTrig; // default pp trigger configuration
139 static Int_t runNumber= 0;
140 static Int_t eventNumber= 0;
141 //========================//
142 // Set Random Number seed //
143 //========================//
145 static UInt_t seed = dt.Get();
147 // nEvts = -1 : you get 1 QQbar pair and all the fragmentation and
149 // nEvts = N>0 : you get N charm / beauty Hadrons
151 // stars = kTRUE : all heavy resonances and their decay stored
152 // = kFALSE: only final heavy hadrons and their decays stored
153 Bool_t stars = kTRUE;
155 // To be used only with kCharmpp14000wmi and kBeautypp14000wmi
156 // To get a "reasonable" agreement with MNR results, events have to be
157 // generated with the minimum ptHard set to 2.76 GeV.
158 // To get a "perfect" agreement with MNR results, events have to be
159 // generated in four ptHard bins with the following relative
172 Float_t ptHardMin = 10.;
173 Float_t ptHardMax = 20.;
174 Float_t ptGammaPi0Min = 1.;
175 Int_t iquenching = 0;
179 static TString comment;
185 // Get settings from environment variables
186 ProcessEnvironmentVars();
188 // libraries required by geant321
189 #if defined(__CINT__)
190 gSystem->Load("liblhapdf.so"); // Parton density functions
191 gSystem->Load("libEGPythia6.so"); // TGenerator interface
192 gSystem->Load("libpythia6.so"); // Pythia
193 gSystem->Load("libAliPythia6.so"); // ALICE specific implementations
194 gSystem->Load("libgeant321");
197 new TGeant3TGeo("C++ Interface to Geant3");
199 // Output every 100 tracks
200 ((TGeant3*)gMC)->SetSWIT(4,100);
202 //=======================================================================
204 AliRunLoader* rl=0x0;
205 rl = AliRunLoader::Open("galice.root",
206 AliConfig::GetDefaultEventFolderName(),
210 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
213 rl->SetCompressionLevel(2);
214 rl->SetNumberOfEventsPerFile(1000);
215 gAlice->SetRunLoader(rl);
218 //gAlice->SetRunNumber(runNumber);
220 // Set the trigger configuration
221 gAlice->SetTriggerDescriptor(TrigConfName[trig]);
222 cout<<"Trigger configuration is set to "<<TrigConfName[trig]<<endl;
225 //=======================================================================
226 // ************* STEERING parameters FOR ALICE SIMULATION **************
227 // --- Specify event type to be tracked through the ALICE setup
228 // --- All positions are in cm, angles in degrees, and P and E in GeV
231 gMC->SetProcess("DCAY",1);
232 gMC->SetProcess("PAIR",1);
233 gMC->SetProcess("COMP",1);
234 gMC->SetProcess("PHOT",1);
235 gMC->SetProcess("PFIS",0);
236 gMC->SetProcess("DRAY",0);
237 gMC->SetProcess("ANNI",1);
238 gMC->SetProcess("BREM",1);
239 gMC->SetProcess("MUNU",1);
240 gMC->SetProcess("CKOV",1);
241 gMC->SetProcess("HADR",1);
242 gMC->SetProcess("LOSS",2);
243 gMC->SetProcess("MULS",1);
244 gMC->SetProcess("RAYL",1);
246 Float_t cut = 1.e-3; // 1MeV cut by default
247 Float_t tofmax = 1.e10;
249 gMC->SetCut("CUTGAM", cut);
250 gMC->SetCut("CUTELE", cut);
251 gMC->SetCut("CUTNEU", cut);
252 gMC->SetCut("CUTHAD", cut);
253 gMC->SetCut("CUTMUO", cut);
254 gMC->SetCut("BCUTE", cut);
255 gMC->SetCut("BCUTM", cut);
256 gMC->SetCut("DCUTE", cut);
257 gMC->SetCut("DCUTM", cut);
258 gMC->SetCut("PPCUTM", cut);
259 gMC->SetCut("TOFMAX", tofmax);
261 //======================//
262 // Set External decayer //
263 //======================//
264 TVirtualMCDecayer* decayer = new AliDecayerPythia();
269 decayer->SetForceDecay(kAll);
272 decayer->SetForceDecay(kHadronicD);
275 decayer->SetForceDecay(kSemiElectronic);
278 decayer->SetForceDecay(kSemiMuonic);
282 gMC->SetExternalDecayer(decayer);
283 if(proc == kPyJetJetPHOSv2) // in this case we decay the pi0
284 decayer->SetForceDecay(kNeutralPion);
286 //=========================//
287 // Generator Configuration //
288 //=========================//
289 AliGenPythia* gener = 0x0;
291 if (proc <= kBeautypp14000wmi) {
292 AliGenPythia *pythia = PythiaHVQ(proc);
294 pythia->SetFeedDownHigherFamily(kFALSE);
295 // Stack filling option
296 if(!stars) pythia->SetStackFillOpt(AliGenPythia::kParentSelection);
298 if(nEvts>0) pythia->SetCountMode(AliGenPythia::kCountParents);
304 pythia->SetForceDecay(kAll);
307 pythia->SetForceDecay(kHadronicD);
310 pythia->SetForceDecay(kSemiElectronic);
313 pythia->SetForceDecay(kSemiMuonic);
319 pythia->SetMomentumRange(0,99999999);
320 pythia->SetPhiRange(0., 360.);
321 pythia->SetThetaRange(0,180);
324 pythia->SetYRange(-999,999);
327 pythia->SetYRange(-2,2);
330 pythia->SetYRange(1,6);
334 } else if (proc == kPyMbNoHvq) {
335 gener = MbCocktail();
336 } else if (proc == kPyOmegaMinus) {
337 gener = PyMbTriggered(3334);
338 } else if (proc == kPyOmegaPlus) {
339 gener = PyMbTriggered(-3334);
340 } else if (proc <= kPyGammaBremsEMCAL) {
341 AliGenPythia *pythia = PythiaHard(proc);
343 pythia->SetFeedDownHigherFamily(kFALSE);
345 if(nEvts>0) pythia->SetCountMode(AliGenPythia::kCountParents);
350 pythia->SetMomentumRange(0,99999999);
351 // pythia->SetJetEtaRange(-1.5, 1.5);// Final state kinematic cuts
352 // pythia->SetJetPhiRange(0., 360.);
353 // pythia->SetThetaRange(45,135);
355 if(proc == kPyJetJetPHOSv2)
356 pythia->SetForceDecay(kNeutralPion);
358 pythia->SetForceDecay(kAll);
360 pythia->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
361 pythia->SetPtKick(5); // set the intrinsic kt to 5 GeV/c
368 gener->SetOrigin(0., 0., 0.); // vertex position
370 // Size of the interaction diamond
372 Float_t sigmaz = 7.55 / TMath::Sqrt(2.); // [cm]
375 Float_t betast = 10; // beta* [m]
376 Float_t eps = 3.75e-6; // emittance [m]
377 Float_t gamma = 7000. / 0.938272; // relativistic gamma [1]
378 Float_t sigmaxy = TMath::Sqrt(eps * betast / gamma) / TMath::Sqrt(2.) * 100.; // [cm]
379 printf("\n \n Diamond size x-y: %10.3e z: %10.3e\n \n", sigmaxy, sigmaz);
381 gener->SetSigma(sigmaxy, sigmaxy, sigmaz); // Sigma in (X,Y,Z) (cm) on IP position
382 gener->SetCutVertexZ(3.); // Truncate at 3 sigma
383 gener->SetVertexSmear(kPerEvent);
388 gener->SetQuench(iquenching);
390 Float_t k = 6e5*(qhat/1.7) ; //qhat=1.7, k = 6e5, default value
391 AliPythia::Instance()->InitQuenching(0.,0.1,k,0,0.95,6);
397 comment = comment.Append(" | L3 field 0.2 T");
398 } else if (mag == k4kG) {
399 comment = comment.Append(" | L3 field 0.4 T");
400 } else if (mag == k5kG) {
401 comment = comment.Append(" | L3 field 0.5 T");
403 printf("\n \n Comment: %s \n \n", comment.Data());
405 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., mag);
406 field->SetL3ConstField(0); //Using const. field in the barrel
408 gAlice->SetField(field);
435 //=================== Alice BODY parameters =============================
436 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
441 //=================== MAG parameters ============================
442 // --- Start with Magnet since detector layouts may be depending ---
443 // --- on the selected Magnet dimensions ---
444 AliMAG *MAG = new AliMAG("MAG", "Magnet");
450 //=================== ABSO parameters ============================
451 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
456 //=================== DIPO parameters ============================
458 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
463 //=================== HALL parameters ============================
465 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
471 //=================== FRAME parameters ============================
473 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
474 if (geo == kHoles) FRAME->SetHoles(1);
475 else FRAME->SetHoles(0);
481 //=================== SHIL parameters ============================
483 AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");
489 //=================== PIPE parameters ============================
491 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
496 //=================== ITS parameters ============================
498 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version with asymmetric services");
503 //============================ TPC parameters =====================
504 AliTPC *TPC = new AliTPCv2("TPC", "Default");
509 //=================== TOF parameters ============================
510 AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
516 //=================== HMPID parameters ===========================
517 AliHMPID *HMPID = new AliHMPIDv2("HMPID", "normal HMPID");
524 //=================== ZDC parameters ============================
526 AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");
531 //=================== TRD parameters ============================
533 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
534 AliTRDgeometry *geoTRD = TRD->GetGeometry();
535 // Partial geometry: modules at 2,3,4,6,11,12,14,15
536 // starting at 6h in positive direction
537 //Hole on SM 13 and 14 for PHOS
538 geoTRD->SetSMstatus(13,0);
539 geoTRD->SetSMstatus(14,0);
540 geoTRD->SetSMstatus(15,0);
545 //=================== FMD parameters ============================
546 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
551 //=================== MUON parameters ===========================
552 // New MUONv1 version (geometry defined via builders)
553 AliMUON *MUON = new AliMUONv1("MUON", "default");
555 //=================== PHOS parameters ===========================
559 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
565 //=================== PMD parameters ============================
566 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
571 //=================== T0 parameters ============================
572 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
577 //=================== EMCAL parameters ============================
578 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "ESHISH_77_TRD1_2X2_FINAL_110DEG scTh=0.176 pbTh=0.144");
583 //=================== CRT parameters ============================
584 AliACORDE *ACORDE = new AliACORDEv0("CRT", "normal ACORDE");
589 //=================== CRT parameters ============================
590 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
596 AliGenPythia *PythiaHVQ(PDC07Proc_t proc) {
597 //*******************************************************************//
598 // Configuration file for charm / beauty generation with PYTHIA //
600 // The parameters have been tuned in order to reproduce the inclusive//
601 // heavy quark pt distribution given by the NLO pQCD calculation by //
602 // Mangano, Nason and Ridolfi. //
604 // For details and for the NORMALIZATION of the yields see: //
605 // N.Carrer and A.Dainese, //
606 // "Charm and beauty production at the LHC", //
607 // ALICE-INT-2003-019, [arXiv:hep-ph/0311225]; //
608 // PPR Chapter 6.6, CERN/LHCC 2005-030 (2005). //
609 //*******************************************************************//
610 AliGenPythia * gener = 0x0;
614 comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
615 gener = new AliGenPythia(nEvts);
616 gener->SetProcess(kPyCharmPbPbMNR);
617 gener->SetStrucFunc(kCTEQ4L);
618 gener->SetPtHard(2.1,-1.0);
619 gener->SetEnergyCMS(5500.);
620 gener->SetNuclei(208,208);
623 comment = comment.Append(" Charm in p-Pb at 8.8 TeV");
624 gener = new AliGenPythia(nEvts);
625 gener->SetProcess(kPyCharmpPbMNR);
626 gener->SetStrucFunc(kCTEQ4L);
627 gener->SetPtHard(2.1,-1.0);
628 gener->SetEnergyCMS(8800.);
629 gener->SetProjectile("P",1,1);
630 gener->SetTarget("Pb",208,82);
633 comment = comment.Append(" Charm in pp at 14 TeV");
634 gener = new AliGenPythia(nEvts);
635 gener->SetProcess(kPyCharmppMNR);
636 gener->SetStrucFunc(kCTEQ4L);
637 gener->SetPtHard(2.1,-1.0);
638 gener->SetEnergyCMS(14000.);
640 case kCharmpp14000wmi:
641 comment = comment.Append(" Charm in pp at 14 TeV with mult. interactions");
642 gener = new AliGenPythia(-1);
643 gener->SetProcess(kPyCharmppMNRwmi);
644 gener->SetStrucFunc(kCTEQ5L);
645 gener->SetPtHard(ptHardMin,ptHardMax);
646 gener->SetEnergyCMS(14000.);
649 comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
650 gener = new AliGenPythia(nEvts);
651 gener->SetProcess(kPyD0PbPbMNR);
652 gener->SetStrucFunc(kCTEQ4L);
653 gener->SetPtHard(2.1,-1.0);
654 gener->SetEnergyCMS(5500.);
655 gener->SetNuclei(208,208);
658 comment = comment.Append(" D0 in p-Pb at 8.8 TeV");
659 gener = new AliGenPythia(nEvts);
660 gener->SetProcess(kPyD0pPbMNR);
661 gener->SetStrucFunc(kCTEQ4L);
662 gener->SetPtHard(2.1,-1.0);
663 gener->SetEnergyCMS(8800.);
664 gener->SetProjectile("P",1,1);
665 gener->SetTarget("Pb",208,82);
668 comment = comment.Append(" D0 in pp at 14 TeV");
669 gener = new AliGenPythia(nEvts);
670 gener->SetProcess(kPyD0ppMNR);
671 gener->SetStrucFunc(kCTEQ4L);
672 gener->SetPtHard(2.1,-1.0);
673 gener->SetEnergyCMS(14000.);
676 comment = comment.Append(" DPlus in Pb-Pb at 5.5 TeV");
677 gener = new AliGenPythia(nEvts);
678 gener->SetProcess(kPyDPlusPbPbMNR);
679 gener->SetStrucFunc(kCTEQ4L);
680 gener->SetPtHard(2.1,-1.0);
681 gener->SetEnergyCMS(5500.);
682 gener->SetNuclei(208,208);
685 comment = comment.Append(" DPlus in p-Pb at 8.8 TeV");
686 gener = new AliGenPythia(nEvts);
687 gener->SetProcess(kPyDPluspPbMNR);
688 gener->SetStrucFunc(kCTEQ4L);
689 gener->SetPtHard(2.1,-1.0);
690 gener->SetEnergyCMS(8800.);
691 gener->SetProjectile("P",1,1);
692 gener->SetTarget("Pb",208,82);
695 comment = comment.Append(" DPlus in pp at 14 TeV");
696 gener = new AliGenPythia(nEvts);
697 gener->SetProcess(kPyDPlusppMNR);
698 gener->SetStrucFunc(kCTEQ4L);
699 gener->SetPtHard(2.1,-1.0);
700 gener->SetEnergyCMS(14000.);
702 case kBeautyPbPb5500:
703 comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
704 gener = new AliGenPythia(nEvts);
705 gener->SetProcess(kPyBeautyPbPbMNR);
706 gener->SetStrucFunc(kCTEQ4L);
707 gener->SetPtHard(2.75,-1.0);
708 gener->SetEnergyCMS(5500.);
709 gener->SetNuclei(208,208);
712 comment = comment.Append(" Beauty in p-Pb at 8.8 TeV");
713 gener = new AliGenPythia(nEvts);
714 gener->SetProcess(kPyBeautypPbMNR);
715 gener->SetStrucFunc(kCTEQ4L);
716 gener->SetPtHard(2.75,-1.0);
717 gener->SetEnergyCMS(8800.);
718 gener->SetProjectile("P",1,1);
719 gener->SetTarget("Pb",208,82);
722 comment = comment.Append(" Beauty in pp at 14 TeV");
723 gener = new AliGenPythia(nEvts);
724 gener->SetProcess(kPyBeautyppMNR);
725 gener->SetStrucFunc(kCTEQ4L);
726 gener->SetPtHard(2.75,-1.0);
727 gener->SetEnergyCMS(14000.);
729 case kBeautypp14000wmi:
730 comment = comment.Append(" Beauty in pp at 14 TeV with mult. interactions");
731 gener = new AliGenPythia(-1);
732 gener->SetProcess(kPyBeautyppMNRwmi);
733 gener->SetStrucFunc(kCTEQ5L);
734 gener->SetPtHard(ptHardMin,ptHardMax);
735 gener->SetEnergyCMS(14000.);
742 AliGenPythia *PythiaHard(PDC07Proc_t proc) {
743 //*******************************************************************//
744 // Configuration file for hard QCD processes generation with PYTHIA //
746 //*******************************************************************//
747 AliGenPythia * gener = 0x0;
752 comment = comment.Append(" pp->jet + jet over at 14 TeV, no restriction");
753 AliGenPythia * gener = new AliGenPythia(nEvts);
754 gener->SetEnergyCMS(eCMS);// Centre of mass energy
755 gener->SetProcess(kPyJets);// Process type
756 gener->SetJetEtaRange(-1.5, 1.5);// Final state kinematic cuts
757 gener->SetJetPhiRange(0., 360.);
758 gener->SetJetEtRange(10., 1000.);
759 gener->SetPtHard(ptHardMin, ptHardMax);// Pt transfer of the hard scattering
760 gener->SetStrucFunc(kCTEQ4L);
764 case kPyGammaJetPHOS:
765 comment = comment.Append(" pp->jet + gamma over PHOS");
766 gener = new AliGenPythia(nEvts);
767 gener->SetEnergyCMS(eCMS);
768 gener->SetProcess(kPyDirectGamma);
769 gener->SetStrucFunc(kCTEQ4L);
770 gener->SetPtHard(ptHardMin,ptHardMax);
771 //gener->SetYHard(-1.0,1.0);
772 gener->SetGammaEtaRange(-0.13,0.13);
773 gener->SetGammaPhiRange(218.,322.);//Over 5 modules +-2 deg
776 comment = comment.Append(" pp->jet + jet over PHOS");
777 gener = new AliGenPythia(nEvts);
778 gener->SetEnergyCMS(eCMS);
779 gener->SetProcess(kPyJets);
780 gener->SetStrucFunc(kCTEQ4L);
781 gener->SetPtHard(ptHardMin,ptHardMax);
782 //gener->SetYHard(-1.0,1.0);
783 gener->SetJetEtaRange(-1.,1.);
784 gener->SetJetPhiRange(200.,340.);
785 gener->SetPi0InPHOS(kTRUE);
786 gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min);
788 printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min);
790 case kPyGammaBremsPHOS:
791 comment = comment.Append(" pp->jet + jet+bremsphoton over PHOS at 14 TeV");
792 gener = new AliGenPythia(nEvts);
793 gener->SetEnergyCMS(eCMS);
794 gener->SetProcess(kPyJets);
795 gener->SetStrucFunc(kCTEQ4L);
796 gener->SetPtHard(ptHardMin,ptHardMax);
797 //gener->SetYHard(-1.0,1.0);
798 gener->SetJetEtaRange(-1.,1.);
799 gener->SetJetPhiRange(200.,340.);
800 gener->SetFragPhotonInPHOS(kTRUE);
801 gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min);
802 printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min);
804 case kPyJetJetPHOSv2:
805 comment = comment.Append(" pp->jet + jet over PHOS version2 ");
806 gener = new AliGenPythia(nEvts);
807 gener->SetEnergyCMS(eCMS);
808 gener->SetProcess(kPyJets);
809 gener->SetStrucFunc(kCTEQ4L);
810 gener->SetPtHard(ptHardMin,ptHardMax);
811 //gener->SetYHard(-1.0,1.0);
812 gener->SetJetEtaRange(-1.,1.);
813 gener->SetJetPhiRange(200.,340.);
814 //gener->SetPi0InPHOS(kTRUE);
815 gener->SetPhotonInPHOSeta(kTRUE);
816 gener->SetPhotonMinPt(ptGammaPi0Min);
817 gener->SetForceDecay(kAll);
819 case kPyGammaJetEMCAL:
820 comment = comment.Append(" pp->jet + gamma over EMCAL at 14 TeV");
821 gener = new AliGenPythia(nEvts);
822 gener->SetEnergyCMS(eCMS);
823 gener->SetProcess(kPyDirectGamma);
824 gener->SetStrucFunc(kCTEQ4L);
825 gener->SetPtHard(ptHardMin,ptHardMax);
826 //gener->SetYHard(-1.0,1.0);
827 gener->SetGammaEtaRange(-0.71,0.71);
828 gener->SetGammaPhiRange(78.,192.);//Over 6 supermodules +-2 deg
831 comment = comment.Append(" pp->jet + jet over EMCAL at 14 TeV");
832 gener = new AliGenPythia(nEvts);
833 gener->SetEnergyCMS(eCMS);
834 gener->SetProcess(kPyJets);
835 gener->SetStrucFunc(kCTEQ4L);
836 gener->SetPtHard(ptHardMin,ptHardMax);
837 //gener->SetYHard(-1.0,1.0);
838 gener->SetJetEtaRange(-1,1);
839 gener->SetJetPhiRange(60.,210.);
840 gener->SetPi0InEMCAL(kTRUE);
841 gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min);
842 printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min);
844 case kPyGammaBremsEMCAL:
845 comment = comment.Append(" pp->jet + jet+bremsphoton over EMCAL at 14 TeV");
846 gener = new AliGenPythia(nEvts);
847 gener->SetEnergyCMS(eCMS);
848 gener->SetProcess(kPyJets);
849 gener->SetStrucFunc(kCTEQ4L);
850 gener->SetPtHard(ptHardMin,ptHardMax);
851 //gener->SetYHard(-1.0,1.0);
852 gener->SetJetEtaRange(-1,1);
853 gener->SetJetPhiRange(60.,210.); //Over 2 uncovered PHOS modules
854 gener->SetFragPhotonInEMCAL(kTRUE);
855 gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min);
857 printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min);
865 AliGenerator* MbCocktail()
867 comment = comment.Append(" pp at 14 TeV: Pythia low-pt, no heavy quarks + J/Psi from parameterisation");
868 AliGenCocktail * gener = new AliGenCocktail();
869 gener->UsePerEventRates();
873 AliGenPythia* pythia = new AliGenPythia(-1);
874 pythia->SetMomentumRange(0, 999999.);
875 pythia->SetThetaRange(0., 180.);
876 pythia->SetYRange(-12.,12.);
877 pythia->SetPtRange(0,1000.);
878 pythia->SetProcess(kPyMb);
879 pythia->SetEnergyCMS(14000.);
880 pythia->SwitchHFOff();
882 // J/Psi parameterisation
884 AliGenParam* jpsi = new AliGenParam(1, AliGenMUONlib::kJpsi, "CDF scaled", "Jpsi");
885 jpsi->SetPtRange(0.,100.);
886 jpsi->SetYRange(-8., 8.);
887 jpsi->SetPhiRange(0., 360.);
888 jpsi->SetForceDecay(kAll);
890 gener->AddGenerator(pythia, "Pythia", 1.);
891 gener->AddGenerator(jpsi, "J/Psi", 8.e-4);
896 AliGenerator* PyMbTriggered(Int_t pdg)
898 AliGenPythia* pythia = new AliGenPythia(-1);
899 pythia->SetMomentumRange(0, 999999.);
900 pythia->SetThetaRange(0., 180.);
901 pythia->SetYRange(-12.,12.);
902 pythia->SetPtRange(0,1000.);
903 pythia->SetProcess(kPyMb);
904 pythia->SetEnergyCMS(14000.);
905 pythia->SetTriggerParticle(pdg, 0.9);
909 void ProcessEnvironmentVars()
911 cout << "######################################" << endl;
912 cout << "## Processing environment variables ##" << endl;
913 cout << "######################################" << endl;
916 if (gSystem->Getenv("DC_RUN")) {
917 runNumber = atoi(gSystem->Getenv("DC_RUN"));
919 //cout<<"Run number "<<runNumber<<endl;
922 if (gSystem->Getenv("DC_EVENT")) {
923 eventNumber = atoi(gSystem->Getenv("DC_EVENT"));
925 //cout<<"Event number "<<eventNumber<<endl;
927 // Random Number seed
928 if (gSystem->Getenv("CONFIG_SEED")) {
929 seed = atoi(gSystem->Getenv("CONFIG_SEED"));
931 else if(gSystem->Getenv("DC_EVENT") && gSystem->Getenv("DC_RUN")){
932 seed = runNumber * 100000 + eventNumber;
935 gRandom->SetSeed(seed);
937 cout<<"////////////////////////////////////////////////////////////////////////////////////"<<endl;
938 cout<<"Seed for random number generation= "<< seed<<" "<< gRandom->GetSeed()<<endl;
939 cout<<"////////////////////////////////////////////////////////////////////////////////////"<<endl;
942 if (gSystem->Getenv("DC_RUN_TYPE")) {
943 cout<<"run type "<<gSystem->Getenv("DC_RUN_TYPE")<<endl;
944 for (Int_t iRun = 0; iRun < kRunMax; iRun++) {
945 if (strcmp(gSystem->Getenv("DC_RUN_TYPE"), pprRunName[iRun])==0) {
946 proc = (PDC07Proc_t)iRun;
951 cout << "Environment variable DC_RUN_TYPE is not defined" << endl;
953 if (gSystem->Getenv("ECMS"))
954 eCMS = atof(gSystem->Getenv("ECMS"));
955 if (gSystem->Getenv("PTHARDMIN"))
956 ptHardMin = atof(gSystem->Getenv("PTHARDMIN"));
957 if (gSystem->Getenv("PTHARDMAX"))
958 ptHardMax = atof(gSystem->Getenv("PTHARDMAX"));
959 if (gSystem->Getenv("PTGAMMAPI0MIN"))
960 ptGammaPi0Min = atof(gSystem->Getenv("PTGAMMAPI0MIN"));
961 if (gSystem->Getenv("QUENCHING"))
962 iquenching = atof(gSystem->Getenv("QUENCHING"));
963 if (gSystem->Getenv("QHAT"))
964 qhat = atof(gSystem->Getenv("QHAT"));
966 cout<<">> Run type set to "<<pprRunName[proc]<<endl;
967 cout<<">> Collision energy set to "<<eCMS <<endl;
968 cout<<">> ptHard limits: "<<ptHardMin<<" to " <<ptHardMax<<" GeV"<<endl;
969 cout<<">> pt gamma/pi0 threshold "<< ptGammaPi0Min<<" GeV "<<endl;
970 cout<<">> quenching on? "<< iquenching<<" qhat "<<qhat<<endl;
972 cout << "######################################" << endl;
973 cout << "######################################" << endl;