1 static Int_t eventsPerRun = 100;
6 static PprGeo_t geo = kHoles;
11 // Switch on Transition Radiation simulation. 6/12/00 18:00
12 // iZDC=1 7/12/00 09:00
13 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
14 // Theta range given through pseudorapidity limits 22/6/2001
19 // Set Random Number seed
20 // gRandom->SetSeed(12345);
22 UInt_t curtime=dt.Get();
23 UInt_t procid=gSystem->GetPid();
24 UInt_t seed=curtime-procid;
25 gRandom->SetSeed(seed);
26 cerr<<"Seed for random number generation= "<<seed<<endl;
27 cout<<"Seed for random number generation= "<<seed<<endl;
30 new AliGeant3("C++ Interface to Geant3");
32 if (!gSystem->Getenv("CONFIG_FILE"))
34 TFile *rootfile = new TFile("galice.root", "recreate");
36 rootfile->SetCompressionLevel(2);
39 TGeant3 *geant3 = (TGeant3 *) gMC;
42 // Set External decayer
43 AliDecayer *decayer = new AliDecayerPythia();
45 decayer->SetForceDecay(kAll);
47 gMC->SetExternalDecayer(decayer);
50 //=======================================================================
51 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
52 geant3->SetTRIG(1); //Number of events to be processed
53 geant3->SetSWIT(4, 10);
54 geant3->SetDEBU(0, 0, 1);
55 //geant3->SetSWIT(2,2);
66 geant3->SetHADR(4); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
70 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
71 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
72 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
73 geant3->SetERAN(5.e-7);
75 Float_t cut = 1.e-3; // 1MeV cut by default
76 Float_t tofmax = 1.e10;
78 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
79 geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut,
82 //=======================================================================
83 // ************* STEERING parameters FOR ALICE SIMULATION **************
84 // --- Specify event type to be tracked through the ALICE setup
85 // --- All positions are in cm, angles in degrees, and P and E in GeV
86 if (gSystem->Getenv("CONFIG_NPARTICLES"))
88 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
94 AliGenACORDE *gener = new AliGenACORDE(); // One generation per event
95 //TF1* zenithFunc = new TF1("zenith","1/cos(x)", 0. 65.);
96 //gener->SetZenithalDistributionFunction(zenithFunc);
97 //Float_t tend = 65.*TMath::Pi()/180.;
98 //TF1* momFunc = new TF1("momFunc", "x", 10., 1000.);
99 //gener->SetMomentumDistrubutionFunction(momFunc);
100 gener->SetZenithalAngleRange(0., 65.);
101 gener->SetAzimuthalAngleRange(0., 359.);
102 gener->SetMomentumResolution(1.); // GeVs
103 gener->SetSigma(0,0,0); // Sigma for smearing
104 gener->SetMomentumRange(10., 1000.); // in GeVs.
106 gener->SetPart(kMuonMinus);
111 //gener->SetMode(kSingleMuons);// Single muons
112 //gener->SetMode(kMuonBundle);
113 gener->SetMode(kMuonFlux);
117 // kMuonFlux <- Not available, yet
119 // If you choose kMuonBundle, you should set how many particles do you
120 // want and in wich region should the muons be generated, for instance
121 // if you want to generate n^2 muons, in a square of side 300 cm
122 //gener->SetRange(4, 300., 4, 300.);
124 //gener->SetVertexSmear(kPerEvent); // Set the smearing per Event
126 gener->Init(); // Intialize the generator.
128 // Set the tracking limits to include the Molasse
129 gAlice->TrackingLimits( 5000, 5000);
132 // Activate this line if you want the vertex smearing to happen
135 //gener->SetVertexSmear(perTrack);
137 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1);
139 gAlice->SetField(field);
164 //=================== Alice BODY parameters =============================
165 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
169 //=================== MAG parameters ============================
170 // --- Start with Magnet since detector layouts may be depending ---
171 // --- on the selected Magnet dimensions ---
172 AliMAG *MAG = new AliMAG("MAG", "Magnet");
178 //=================== ABSO parameters ============================
179 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
184 //=================== DIPO parameters ============================
186 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
191 //=================== HALL parameters ============================
193 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
199 //=================== FRAME parameters ============================
201 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
211 //=================== SHIL parameters ============================
213 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
219 //=================== PIPE parameters ============================
221 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
226 //=================== ITS parameters ============================
228 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
229 // almost all other detectors. This involves the fact that the ITS geometry
230 // still has several options to be followed in parallel in order to determine
231 // the best set-up which minimizes the induced background. All the geometries
232 // available to date are described in the following. Read carefully the comments
233 // and use the default version (the only one uncommented) unless you are making
234 // comparisons and you know what you are doing. In this case just uncomment the
235 // ITS geometry you want to use and run Aliroot.
237 // Detailed geometries:
240 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
242 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
244 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
245 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
246 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
247 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
248 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
249 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
250 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
251 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
252 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
253 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
255 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
256 //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
257 //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
258 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer
259 //ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
260 //ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
261 //ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
262 //ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
263 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
264 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
267 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
268 // for reconstruction !):
271 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
272 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
273 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
275 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
276 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
277 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
281 // Geant3 <-> EUCLID conversion
282 // ============================
284 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
285 // media to two ASCII files (called by default ITSgeometry.euc and
286 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
287 // The default (=0) means that you dont want to use this facility.
294 //============================ TPC parameters ================================
295 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
296 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
297 // --- sectors are specified, any value other than that requires at least one
298 // --- sector (lower or upper)to be specified!
299 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
300 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
301 // --- SecLows - number of lower sectors specified (up to 6)
302 // --- SecUps - number of upper sectors specified (up to 12)
303 // --- Sens - sensitive strips for the Slow Simulator !!!
304 // --- This does NOT work if all S or L-sectors are specified, i.e.
305 // --- if SecAL or SecAU < 0
308 //-----------------------------------------------------------------------------
310 // gROOT->LoadMacro("SetTPCParam.C");
311 // AliTPCParam *param = SetTPCParam();
312 AliTPC *TPC = new AliTPCv2("TPC", "Default");
314 // All sectors included
323 //=================== TOF parameters ============================
324 AliTOF *TOF = new AliTOFv2FHoles("TOF", "TOF with Holes");
326 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
333 //=================== HMPID parameters ===========================
334 AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");
341 //=================== ZDC parameters ============================
343 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
348 //=================== TRD parameters ============================
350 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
352 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
355 // With hole in front of PHOS
357 // With hole in front of HMPID
361 AliTRDsim *TRDsim = TRD->CreateTR();
366 //=================== FMD parameters ============================
367 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
368 FMD->SetRingsSi1(256);
369 FMD->SetRingsSi2(128);
370 FMD->SetSectorsSi1(20);
371 FMD->SetSectorsSi2(40);
376 //=================== MUON parameters ===========================
378 AliMUON *MUON = new AliMUONv1("MUON", "default");
380 //=================== PHOS parameters ===========================
384 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
390 //=================== PMD parameters ============================
391 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
396 //=================== T0 parameters ============================
397 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
402 //=================== EMCAL parameters ============================
403 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCALArch1a");
408 //=================== ACORDE parameters ============================
409 //AliACORDE *ACORDE = new AliACORDEv0("ACORDE", "normal ACORDE");
410 AliACORDE* ACORDE = new AliACORDEv1("ACORDE", "Special version Only with the ACORDE");
415 //=================== ACORDE parameters ============================
416 AliVZERO *VZERO = new AliVZEROv2("VZERO", "normal VZERO");
421 Float_t EtaToTheta(Float_t arg){
422 return (180./TMath::Pi())*2.*atan(exp(-arg));