1 // One can use the configuration macro in compiled mode by
2 // root [0] gSystem->Load("libgeant321");
3 // root [0] gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include\
4 // -I$ALICE_ROOT -I$ALICE/geant3/TGeant3");
5 // root [0] .x grun.C(1,"ConfigHBT.C++")
7 #if !defined(__CINT__) || defined(__MAKECINT__)
12 #include <TVirtualMC.h>
14 #include "STEER/AliRunLoader.h"
15 #include "STEER/AliRun.h"
16 #include "STEER/AliConfig.h"
17 #include "PYTHIA6/AliDecayerPythia.h"
18 #include "EVGEN/AliGenCocktailAfterBurner.h"
19 #include "TMEVSIM/AliMevSimConfig.h"
20 #include "TMEVSIM/AliMevSimParticle.h"
21 #include "TMEVSIM/AliGenMevSim.h"
22 #include "THbtp/AliGenHBTprocessor.h"
23 #include "STRUCT/AliBODY.h"
24 #include "STRUCT/AliMAG.h"
25 #include "STRUCT/AliABSOv3.h"
26 #include "STRUCT/AliDIPOv3.h"
27 #include "STRUCT/AliHALLv3.h"
28 #include "STRUCT/AliFRAMEv2.h"
29 #include "STRUCT/AliSHILv3.h"
30 #include "STRUCT/AliPIPEv3.h"
31 #include "ITS/AliITSv11Hybrid.h"
32 #include "TPC/AliTPCv2.h"
33 #include "TOF/AliTOFv6T0.h"
34 #include "HMPID/AliHMPIDv3.h"
35 #include "ZDC/AliZDCv3.h"
36 #include "TRD/AliTRDv1.h"
37 #include "FMD/AliFMDv1.h"
38 #include "MUON/AliMUONv1.h"
39 #include "PHOS/AliPHOSv1.h"
40 #include "PMD/AliPMDv1.h"
41 #include "T0/AliT0v1.h"
42 #include "EMCAL/AliEMCALv2.h"
43 #include "ACORDE/AliACORDEv1.h"
51 static PprGeo_t geo = kHoles;
55 // Set Random Number seed
56 // gRandom->SetSeed(12345);
58 // libraries required by geant321
60 gSystem->Load("libgeant321");
63 new TGeant3TGeo("C++ Interface to Geant3");
65 if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
66 AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
67 AliCDBManager::Instance()->SetRun(0);
70 cout<<"Config.C: Creating Run Loader ..."<<endl;
71 AliRunLoader* rl = AliRunLoader::Open("galice.root",AliConfig::GetDefaultEventFolderName(),
75 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
78 rl->SetCompressionLevel(2);
79 rl->SetNumberOfEventsPerFile(6);
80 gAlice->SetRunLoader(rl);
81 // gAlice->SetGeometryFromFile("geometry.root");
82 // gAlice->SetGeometryFromCDB();
84 // Set the trigger configuration
85 gAlice->SetTriggerDescriptor("Pb-Pb");
86 cout<<"Trigger configuration is set to Pb-Pb"<<endl;
89 // Set External decayer
90 AliDecayer *decayer = new AliDecayerPythia();
92 decayer->SetForceDecay(kAll);
94 gMC->SetExternalDecayer(decayer);
96 //=======================================================================
97 // ************* STEERING parameters FOR ALICE SIMULATION **************
98 // --- Specify event type to be tracked through the ALICE setup
99 // --- All positions are in cm, angles in degrees, and P and E in GeV
103 gMC->SetProcess("DCAY",1);
104 gMC->SetProcess("PAIR",1);
105 gMC->SetProcess("COMP",1);
106 gMC->SetProcess("PHOT",1);
107 gMC->SetProcess("PFIS",0);
108 gMC->SetProcess("DRAY",0);
109 gMC->SetProcess("ANNI",1);
110 gMC->SetProcess("BREM",1);
111 gMC->SetProcess("MUNU",1);
112 gMC->SetProcess("CKOV",1);
113 gMC->SetProcess("HADR",1);
114 gMC->SetProcess("LOSS",2);
115 gMC->SetProcess("MULS",1);
116 gMC->SetProcess("RAYL",1);
118 Float_t cut = 1.e-3; // 1MeV cut by default
119 Float_t tofmax = 1.e10;
121 gMC->SetCut("CUTGAM", cut);
122 gMC->SetCut("CUTELE", cut);
123 gMC->SetCut("CUTNEU", cut);
124 gMC->SetCut("CUTHAD", cut);
125 gMC->SetCut("CUTMUO", cut);
126 gMC->SetCut("BCUTE", cut);
127 gMC->SetCut("BCUTM", cut);
128 gMC->SetCut("DCUTE", cut);
129 gMC->SetCut("DCUTM", cut);
130 gMC->SetCut("PPCUTM", cut);
131 gMC->SetCut("TOFMAX", tofmax);
134 if (gSystem->Getenv("CONFIG_NPARTICLES"))
136 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
139 int nParticles = 10000;
142 /*********************************************************************************/
143 /*********************************************************************************/
144 /***************** G E N E R A T O R S *********************************/
146 /** C O C K T A I L W I T H A F T E R B U R N E R S A F T E R W A R D S **/
147 /***************** (WRAPPER GENERATOR) *********************************/
151 AliGenCocktailAfterBurner* gener = new AliGenCocktailAfterBurner();
152 gener->SetPhiRange(0, 360);
153 gener->SetThetaRange(40., 140.);
154 gener->SetOrigin(0, 0, 0); //vertex position
155 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
157 /***************** HIJING PARAMETRIZATION ********************************/
159 //AliGenHIJINGpara *g2 = new AliGenHIJINGpara(5);
160 //g2->SetMomentumRange(0, 999);
162 /***************** G E N B O X ***********************************/
164 // AliGenBox *g1 = new AliGenBox(5);
165 // g1->SetMomentumRange(0, 3);
166 // g1->SetOrigin(0,0,0); //vertex position
167 // g1->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
168 // g1->SetPart(kK0Short); //K0short(310), Lambda(3122)
171 /***************** M E V S I M ********************************/
173 AliMevSimConfig *c = new AliMevSimConfig(1);
174 c->SetRectPlane(1); // reaction plane control, model 4
177 AliGenMevSim *g3 = new AliGenMevSim(c);
178 g3->SetPtRange(0.001, 3);
179 g3->SetMomentumRange(0.1, 3);
181 g3->SetTrackingFlag(1);
182 g3->SetOrigin(0.0, 0.0, 0.0);
183 g3->SetSigma(0.0, 0.0, 0.0);
184 //g3->SetEtaCutRange(-4,4);
186 AliMevSimParticle *piPlus = new AliMevSimParticle(kPiPlus, 100, 3, 0.2, 0.01, 3, 0.1, 0.0, 0.0);
187 AliMevSimParticle *piMinus = new AliMevSimParticle(kPiMinus, 100, 3, 0.2, 0.01, 3, 0.1, 0.0, 0.0);
188 //AliMevSimParticle *KPlus = new AliMevSimParticle(kKPlus, 10, 0, 0.25, 0.0, 2, 0.15, 0.0, 0.0 );
189 //AliMevSimParticle *KMinus = new AliMevSimParticle(kKMinus, 10, 0, 0.25, 0.0, 2, 0.15, 0.0, 0.0 );
190 //AliMevSimParticle *protonPlus = new AliMevSimParticle(kProton, 3, 0, 0.4, 0.0, 2, 0.15, 0.0, 0.0);
191 //AliMevSimParticle *protonMinus = new AliMevSimParticle(kProtonBar, 2, 0, 0.4, 0.0, 2, 0.15, 0.0, 0.0);
193 g3->AddParticleType(piPlus);
194 g3->AddParticleType(piMinus);
195 //g3->AddParticleType(KPlus);
196 //g3->AddParticleType(KMinus);
197 //g3->AddParticleType(protonPlus);
198 //g3->AddParticleType(protonMinus);
201 /***************** H B T P R O C E S S O R ********************************/
203 AliGenHBTprocessor *hbtp = new AliGenHBTprocessor();
204 hbtp->SetRefControl(2);
205 hbtp->SetSwitch1D(1);
206 hbtp->SetSwitch3D(1);
207 hbtp->SetSwitchCoulomb(1);
208 hbtp->SetSwitchCoherence(0);
209 hbtp->SetSwitchFermiBose(-1);
210 hbtp->SetDeltap(0.1);
211 hbtp->SetDelChi(0.1);
212 hbtp->SetLambda(0.5);
215 hbtp->SetRParallel(8.0);
220 hbtp->SetPtRange(0.1,0.98);
221 hbtp->SetPIDs(211,-211); //pi+ pi-
222 hbtp->SetSwitchType(3); // fit both the like and unlike pair correl
223 hbtp->SetMaxIterations(300);
224 /***********************************************************************************/
226 // gener->AddGenerator(g2,"HIJING PARAMETRIZATION",1);
227 // gener->AddGenerator(g1,"BOX (K0short)",1);
228 gener->AddGenerator(g3,"MEVSIM",1);
230 gener->AddAfterBurner(hbtp,"HBT PROCESSOR",1);
234 // Activate this line if you want the vertex smearing to happen
237 //gener->SetVertexSmear(perTrack);
239 gAlice->SetField(-999, 2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
240 // gAlice->SetField(-999, 2, 2.); //Specify maximum magnetic field in Tesla (neg. ==> default field)
241 //Last number indicates the scale factor
264 //=================== Alice BODY parameters =============================
265 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
270 //=================== MAG parameters ============================
271 // --- Start with Magnet since detector layouts may be depending ---
272 // --- on the selected Magnet dimensions ---
273 AliMAG *MAG = new AliMAG("MAG", "Magnet");
279 //=================== ABSO parameters ============================
280 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
285 //=================== DIPO parameters ============================
287 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
292 //=================== HALL parameters ============================
294 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
300 //=================== FRAME parameters ============================
302 AliFRAME *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
313 //=================== SHIL parameters ============================
315 AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding");
321 //=================== PIPE parameters ============================
323 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
328 //=================== ITS parameters ============================
330 AliITS *ITS = new AliITSv11Hybrid("ITS","ITS v11Hybrid");
336 //============================ TPC parameters ===================
337 AliTPC *TPC = new AliTPCv2("TPC", "Default");
342 //=================== TOF parameters ============================
343 AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
348 //=================== HMPID parameters ===========================
349 AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");
356 //=================== ZDC parameters ============================
358 AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");
363 //=================== ACORDE parameters ============================
365 AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
370 //=================== TRD parameters ============================
372 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
377 //=================== FMD parameters ============================
379 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
384 //=================== MUON parameters ===========================
386 AliMUON *MUON = new AliMUONv1("MUON", "default");
388 //=================== PHOS parameters ===========================
392 AliPHOS *PHOS = new AliPHOSv1("PHOS", "GPS2");
398 //=================== PMD parameters ============================
400 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
402 PMD->SetPAR(1., 1., 0.8, 0.02);
403 PMD->SetIN(6., 18., -580., 27., 27.);
404 PMD->SetGEO(0.0, 0.2, 4.);
405 PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
408 if (iEMCAL && !iHMPID)
410 //=================== EMCAL parameters ============================
411 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "SHISH_77_TRD1_2X2_FINAL_110DEG");
416 //=================== T0 parameters ============================
417 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");