3 static Int_t eventsPerRun = 100;
8 static PprGeo_t geo = kHoles;
13 // Switch on Transition Radiation simulation. 6/12/00 18:00
14 // iZDC=1 7/12/00 09:00
15 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
16 // Theta range given through pseudorapidity limits 22/6/2001
18 // Set Random Number seed
19 // AliLoader::SetDebug(5) ;
20 gRandom->SetSeed(12345);
23 // libraries required by geant321
24 gSystem->Load("libgeant321");
26 new TGeant3("C++ Interface to Geant3");
28 if (!gSystem->Getenv("CONFIG_FILE"))
30 cout<<"Config.C: Creating Run Loader ..."<<endl;
31 AliRunLoader* rl = AliRunLoader::Open("galice.root",AliConfig::GetDefaultEventFolderName(),
35 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
38 rl->SetCompressionLevel(2);
39 rl->SetNumberOfEventsPerFile(1000);
40 gAlice->SetRunLoader(rl);
43 TGeant3 *geant3 = (TGeant3 *) gMC;
46 // Set External decayer
47 TVirtualMCDecayer *decayer = new AliDecayerPythia();
49 decayer->SetForceDecay(kAll);
51 gMC->SetExternalDecayer(decayer);
54 //=======================================================================
55 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
56 geant3->SetTRIG(1); //Number of events to be processed
57 geant3->SetSWIT(4, 10);
58 geant3->SetDEBU(0, 0, 1);
59 //geant3->SetSWIT(2,2);
70 geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
74 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
75 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
76 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
77 geant3->SetERAN(5.e-7);
79 Float_t cut = 1.e-3; // 1MeV cut by default
80 Float_t tofmax = 1.e10;
82 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
83 geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut,
86 //=======================================================================
87 // ************* STEERING parameters FOR ALICE SIMULATION **************
88 // --- Specify event type to be tracked through the ALICE setup
89 // --- All positions are in cm, angles in degrees, and P and E in GeV
90 if (gSystem->Getenv("CONFIG_NPARTICLES"))
92 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
97 // AliGenCocktail *gener = new AliGenCocktail();
98 // gener->SetPhiRange(220, 320);
99 // // Set pseudorapidity range from -8 to 8.
100 // Float_t thmin = EtaToTheta(0.12); // theta min. <---> eta max
101 // Float_t thmax = EtaToTheta(-0.12); // theta max. <---> eta min
102 // gener->SetThetaRange(thmin,thmax);
103 // gener->SetOrigin(0, 0, 0); //vertex position
104 // gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
106 // AliGenHIJINGpara *hijingparam = new AliGenHIJINGpara(nParticles);
107 // hijingparam->SetMomentumRange(0.2, 999);
108 // gener->AddGenerator(hijingparam,"HIJING PARAM",1);
110 // AliGenBox *genbox = new AliGenBox(nParticles);
111 // genbox->SetPart(kGamma);
112 // genbox->SetPtRange(0.3, 10.00);
113 // gener->AddGenerator(genbox,"GENBOX GAMMA for PHOS",1);
116 AliGenBox *gener = new AliGenBox(1);
117 gener->SetMomentumRange(10,11.);
118 gener->SetPhiRange(270.5,270.7);
119 gener->SetThetaRange(90.5,90.7);
121 gener->SetOrigin(0,0,0); //vertex position
122 gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
123 gener->SetPart(kGamma);
127 // Activate this line if you want the vertex smearing to happen
130 //gener->SetVertexSmear(perTrack);
132 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 1., 1., AliMagF::k5kG));
156 //=================== Alice BODY parameters =============================
157 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
161 //=================== MAG parameters ============================
162 // --- Start with Magnet since detector layouts may be depending ---
163 // --- on the selected Magnet dimensions ---
164 AliMAG *MAG = new AliMAG("MAG", "Magnet");
170 //=================== ABSO parameters ============================
171 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
176 //=================== DIPO parameters ============================
178 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
183 //=================== HALL parameters ============================
185 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
191 //=================== FRAME parameters ============================
193 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
203 //=================== SHIL parameters ============================
205 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
211 //=================== PIPE parameters ============================
213 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
218 //=================== ITS parameters ============================
220 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
221 // almost all other detectors. This involves the fact that the ITS geometry
222 // still has several options to be followed in parallel in order to determine
223 // the best set-up which minimizes the induced background. All the geometries
224 // available to date are described in the following. Read carefully the comments
225 // and use the default version (the only one uncommented) unless you are making
226 // comparisons and you know what you are doing. In this case just uncomment the
227 // ITS geometry you want to use and run Aliroot.
229 // Detailed geometries:
232 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
234 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
236 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
237 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
238 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
239 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
240 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
241 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
242 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
243 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
244 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
245 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
247 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
248 //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
249 //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
250 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer
251 //ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
252 //ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
253 //ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
254 //ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
255 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
256 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
259 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
260 // for reconstruction !):
263 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
264 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
265 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
267 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
268 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
269 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
273 // Geant3 <-> EUCLID conversion
274 // ============================
276 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
277 // media to two ASCII files (called by default ITSgeometry.euc and
278 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
279 // The default (=0) means that you dont want to use this facility.
286 //============================ TPC parameters ================================
287 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
288 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
289 // --- sectors are specified, any value other than that requires at least one
290 // --- sector (lower or upper)to be specified!
291 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
292 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
293 // --- SecLows - number of lower sectors specified (up to 6)
294 // --- SecUps - number of upper sectors specified (up to 12)
295 // --- Sens - sensitive strips for the Slow Simulator !!!
296 // --- This does NOT work if all S or L-sectors are specified, i.e.
297 // --- if SecAL or SecAU < 0
300 //-----------------------------------------------------------------------------
302 // gROOT->LoadMacro("SetTPCParam.C");
303 // AliTPCParam *param = SetTPCParam();
304 AliTPC *TPC = new AliTPCv2("TPC", "Default");
306 // All sectors included
314 //=================== TOF parameters ============================
315 AliTOF *TOF = new AliTOFv2FHoles("TOF", "TOF with Holes");
317 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
324 //=================== HMPID parameters ===========================
325 AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");
332 //=================== ZDC parameters ============================
334 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
339 //=================== TRD parameters ============================
341 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
343 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
346 // With hole in front of PHOS
348 // With hole in front of HMPID
352 AliTRDsim *TRDsim = TRD->CreateTR();
357 //=================== FMD parameters ============================
358 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
359 FMD->SetRingsSi1(256);
360 FMD->SetRingsSi2(128);
361 FMD->SetSectorsSi1(20);
362 FMD->SetSectorsSi2(40);
367 //=================== MUON parameters ===========================
369 AliMUON *MUON = new AliMUONv1("MUON", "default");
371 //=================== PHOS parameters ===========================
375 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
381 //=================== PMD parameters ============================
382 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
387 //=================== T0 parameters ============================
388 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
393 //=================== EMCAL parameters ============================
394 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCALArch1a");
399 //=================== ACORDE parameters ============================
400 AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
405 //=================== ACORDE parameters ============================
406 AliVZERO *VZERO = new AliVZEROv2("VZERO", "normal VZERO");
411 Float_t EtaToTheta(Float_t arg){
412 return (180./TMath::Pi())*2.*atan(exp(-arg));