3 // Set Random Number seed
4 // gRandom->SetSeed(12345);
6 new TGeant3("C++ Interface to Geant3");
8 if (!gSystem->Getenv("CONFIG_FILE"))
10 cout<<"Config.C: Creating Run Loader ..."<<endl;
11 AliRunLoader* rl = AliRunLoader::Open("galice.root",AliConfig::fgkDefaultEventFolderName,
15 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
18 rl->SetCompressionLevel(2);
19 rl->SetNumberOfEventsPerFile(6);
20 gAlice->SetRunLoader(rl);
25 // Set External decayer
26 AliDecayer *decayer = new AliDecayerPythia();
28 decayer->SetForceDecay(kAll);
30 gMC->SetExternalDecayer(decayer);
32 //=======================================================================
33 // ************* STEERING parameters FOR ALICE SIMULATION **************
34 // --- Specify event type to be tracked through the ALICE setup
35 // --- All positions are in cm, angles in degrees, and P and E in GeV
39 gMC->SetProcess("DCAY",1);
40 gMC->SetProcess("PAIR",1);
41 gMC->SetProcess("COMP",1);
42 gMC->SetProcess("PHOT",1);
43 gMC->SetProcess("PFIS",0);
44 gMC->SetProcess("DRAY",0);
45 gMC->SetProcess("ANNI",1);
46 gMC->SetProcess("BREM",1);
47 gMC->SetProcess("MUNU",1);
48 gMC->SetProcess("CKOV",1);
49 gMC->SetProcess("HADR",1);
50 gMC->SetProcess("LOSS",2);
51 gMC->SetProcess("MULS",1);
52 gMC->SetProcess("RAYL",1);
54 Float_t cut = 1.e-3; // 1MeV cut by default
55 Float_t tofmax = 1.e10;
57 gMC->SetCut("CUTGAM", cut);
58 gMC->SetCut("CUTELE", cut);
59 gMC->SetCut("CUTNEU", cut);
60 gMC->SetCut("CUTHAD", cut);
61 gMC->SetCut("CUTMUO", cut);
62 gMC->SetCut("BCUTE", cut);
63 gMC->SetCut("BCUTM", cut);
64 gMC->SetCut("DCUTE", cut);
65 gMC->SetCut("DCUTM", cut);
66 gMC->SetCut("PPCUTM", cut);
67 gMC->SetCut("TOFMAX", tofmax);
70 if (gSystem->Getenv("CONFIG_NPARTICLES"))
72 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
75 int nParticles = 10000;
78 /*********************************************************************************/
79 /*********************************************************************************/
80 /***************** G E N E R A T O R S *********************************/
82 /** 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 **/
83 /***************** (WRAPPER GENERATOR) *********************************/
87 AliGenCocktailAfterBurner* gener = new AliGenCocktailAfterBurner();
88 gener->SetPhiRange(0, 360);
89 gener->SetThetaRange(40., 140.);
90 gener->SetOrigin(0, 0, 0); //vertex position
91 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
93 /***************** HIJING PARAMETRIZATION ********************************/
95 //AliGenHIJINGpara *g2 = new AliGenHIJINGpara(5);
96 //g2->SetMomentumRange(0, 999);
98 /***************** G E N B O X ***********************************/
100 // AliGenBox *g1 = new AliGenBox(5);
101 // g1->SetMomentumRange(0, 3);
102 // g1->SetOrigin(0,0,0); //vertex position
103 // g1->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
104 // g1->SetPart(310); //K0short(310), Lambda(3122)
107 /***************** M E V S I M ********************************/
109 AliMevSimConfig *c = new AliMevSimConfig(1);
110 c->SetRectPlane(1); // reaction plane control, model 4
113 AliGenMevSim *g3 = new AliGenMevSim(c);
114 g3->SetPtRange(0.001, 3);
115 g3->SetMomentumRange(0.1, 3);
117 g3->SetTrackingFlag(1);
118 g3->SetOrigin(0.0, 0.0, 0.0);
119 g3->SetSigma(0.0, 0.0, 0.0);
120 //g3->SetEtaCutRange(-4,4);
122 AliMevSimParticle *piPlus = new AliMevSimParticle(kPiPlus, 100, 3, 0.2, 0.01, 3, 0.1, 0.0, 0.0);
123 AliMevSimParticle *piMinus = new AliMevSimParticle(kPiMinus, 100, 3, 0.2, 0.01, 3, 0.1, 0.0, 0.0);
124 //AliMevSimParticle *KPlus = new AliMevSimParticle(kKPlus, 10, 0, 0.25, 0.0, 2, 0.15, 0.0, 0.0 );
125 //AliMevSimParticle *KMinus = new AliMevSimParticle(kKMinus, 10, 0, 0.25, 0.0, 2, 0.15, 0.0, 0.0 );
126 //AliMevSimParticle *protonPlus = new AliMevSimParticle(kProton, 3, 0, 0.4, 0.0, 2, 0.15, 0.0, 0.0);
127 //AliMevSimParticle *protonMinus = new AliMevSimParticle(kProtonBar, 2, 0, 0.4, 0.0, 2, 0.15, 0.0, 0.0);
129 g3->AddParticleType(piPlus);
130 g3->AddParticleType(piMinus);
131 //g3->AddParticleType(KPlus);
132 //g3->AddParticleType(KMinus);
133 //g3->AddParticleType(protonPlus);
134 //g3->AddParticleType(protonMinus);
137 /***************** H B T P R O C E S S O R ********************************/
139 AliGenHBTprocessor *hbtp = new AliGenHBTprocessor();
140 hbtp->SetRefControl(2);
141 hbtp->SetSwitch1D(1);
142 hbtp->SetSwitch3D(1);
143 hbtp->SetSwitchCoulomb(1);
144 hbtp->SetSwitchCoherence(0);
145 hbtp->SetSwitchFermiBose(-1);
146 hbtp->SetDeltap(0.1);
147 hbtp->SetDelChi(0.1);
148 hbtp->SetLambda(0.5);
151 hbtp->SetRParallel(8.0);
156 hbtp->SetPtRange(0.1,0.98);
157 hbtp->SetPIDs(211,-211); //pi+ pi-
158 hbtp->SetSwitchType(3); // fit both the like and unlike pair correl
159 hbtp->SetMaxIterations(300);
160 /***********************************************************************************/
162 // gener->AddGenerator(g2,"HIJING PARAMETRIZATION",1);
163 // gener->AddGenerator(g1,"BOX (K0short)",1);
164 gener->AddGenerator(g3,"MEVSIM",1);
166 gener->AddAfterBurner(hbtp,"HBT PROCESSOR",1);
170 // Activate this line if you want the vertex smearing to happen
173 //gener->SetVertexSmear(perTrack);
175 gAlice->SetField(-999, 2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
176 // gAlice->SetField(-999, 2, 2.); //Specify maximum magnetic field in Tesla (neg. ==> default field)
177 //Last number indicates the scale factor
200 //=================== Alice BODY parameters =============================
201 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
206 //=================== MAG parameters ============================
207 // --- Start with Magnet since detector layouts may be depending ---
208 // --- on the selected Magnet dimensions ---
209 AliMAG *MAG = new AliMAG("MAG", "Magnet");
215 //=================== ABSO parameters ============================
216 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
221 //=================== DIPO parameters ============================
223 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
228 //=================== HALL parameters ============================
230 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
236 //=================== FRAME parameters ============================
238 AliFRAME *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
244 //=================== SHIL parameters ============================
246 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding");
252 //=================== PIPE parameters ============================
254 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
259 //=================== ITS parameters ============================
261 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
262 // almost all other detectors. This involves the fact that the ITS geometry
263 // still has several options to be followed in parallel in order to determine
264 // the best set-up which minimizes the induced background. All the geometries
265 // available to date are described in the following. Read carefully the comments
266 // and use the default version (the only one uncommented) unless you are making
267 // comparisons and you know what you are doing. In this case just uncomment the
268 // ITS geometry you want to use and run Aliroot.
270 // Detailed geometries:
273 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
275 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
277 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
278 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
279 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
280 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
281 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
282 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
283 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
284 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
285 ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
286 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
288 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
289 //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
290 //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
291 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer
292 //ITS->SetThicknessDet1(300.); // detector thickness on layer 1 must be in the range [100,300]
293 //ITS->SetThicknessDet2(300.); // detector thickness on layer 2 must be in the range [100,300]
294 //ITS->SetThicknessChip1(300.); // chip thickness on layer 1 must be in the range [150,300]
295 //ITS->SetThicknessChip2(300.); // chip thickness on layer 2 must be in the range [150,300]
296 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
297 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
300 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
301 // for reconstruction !):
304 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
305 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
306 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
308 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
309 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
310 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
314 // Geant3 <-> EUCLID conversion
315 // ============================
317 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
318 // media to two ASCII files (called by default ITSgeometry.euc and
319 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
320 // The default (=0) means that you dont want to use this facility.
328 //============================ TPC parameters ================================
329 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
330 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
331 // --- sectors are specified, any value other than that requires at least one
332 // --- sector (lower or upper)to be specified!
333 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
334 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
335 // --- SecLows - number of lower sectors specified (up to 6)
336 // --- SecUps - number of upper sectors specified (up to 12)
337 // --- Sens - sensitive strips for the Slow Simulator !!!
338 // --- This does NOT work if all S or L-sectors are specified, i.e.
339 // --- if SecAL or SecAU < 0
342 //-----------------------------------------------------------------------------
344 // gROOT->LoadMacro("SetTPCParam.C");
345 // AliTPCParam *param = SetTPCParam();
346 AliTPC *TPC = new AliTPCv2("TPC", "Default");
348 // All sectors included
356 //=================== TOF parameters ============================
357 AliTOF *TOF = new AliTOFv2("TOF", "normal TOF");
362 //=================== RICH parameters ===========================
363 AliRICH *RICH = new AliRICHv1("RICH", "normal RICH");
370 //=================== ZDC parameters ============================
372 AliZDC *ZDC = new AliZDCv1("ZDC", "normal ZDC");
377 //=================== CRT parameters ============================
379 AliCRT *CRT = new AliCRTv1("CRT", "normal CRT");
384 //=================== TRD parameters ============================
386 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
388 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
391 // With hole in front of PHOS
393 // With hole in front of RICH
396 AliTRDsim *TRDsim = TRD->CreateTR();
401 //=================== FMD parameters ============================
403 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
408 //=================== MUON parameters ===========================
410 AliMUON *MUON = new AliMUONv1("MUON", "default");
412 //=================== PHOS parameters ===========================
416 AliPHOS *PHOS = new AliPHOSv1("PHOS", "GPS2");
422 //=================== PMD parameters ============================
424 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
426 PMD->SetPAR(1., 1., 0.8, 0.02);
427 PMD->SetIN(6., 18., -580., 27., 27.);
428 PMD->SetGEO(0.0, 0.2, 4.);
429 PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
432 if (iEMCAL && !iRICH)
434 //=================== EMCAL parameters ============================
435 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCALArch1a");
440 //=================== START parameters ============================
441 AliSTART *START = new AliSTARTv1("START", "START Detector");