5 // Set Random Number seed
7 UInt_t curtime=dt.Get();
8 UInt_t procid=gSystem->GetPid();
9 UInt_t seed=curtime-procid;
11 gRandom->SetSeed(seed);
12 cerr<<"Seed for random number generation= "<<seed<<endl;
14 new TGeant3("C++ Interface to Geant3");
16 //=======================================================================
17 // Create the output file
19 TFile *rootfile = new TFile("galice.root","recreate");
20 rootfile->SetCompressionLevel(2);
21 TGeant3 *geant3 = (TGeant3*)gMC;
24 // Set External decayer
25 AliDecayer* decayer = new AliDecayerPythia();
26 decayer->SetForceDecay(kAll);
28 gMC->SetExternalDecayer(decayer);
32 //=======================================================================
33 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
34 geant3->SetTRIG(1); //Number of events to be processed
35 geant3->SetSWIT(4,10);
36 geant3->SetDEBU(0,0,1);
37 //geant3->SetSWIT(2,2);
48 geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
52 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
53 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
54 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
55 geant3->SetERAN(5.e-7);
57 Float_t cut = 1.e-3; // 1MeV cut by default
58 Float_t tofmax = 1.e10;
59 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
60 geant3->SetCUTS(cut,cut, cut, cut, cut, cut, cut, cut, cut, cut, tofmax);
62 //=======================================================================
63 // ************* STEERING parameters FOR ALICE SIMULATION **************
64 // --- Specify event type to be tracked through the ALICE setup
65 // --- All positions are in cm, angles in degrees, and P and E in GeV
66 // AliGenPythia *gener = new AliGenPythia(ntracks);
67 AliGenPythia *gener = new AliGenPythia(-1);
69 gener->SetMomentumRange(0,999);
70 gener->SetPhiRange(-180.,180.);
71 gener->SetThetaRange(0,180);
72 gener->SetYRange(-999,999);
73 //gener->SetPtRange(0,100);
74 gener->SetOrigin(0,0,0); // vertex position
75 //gener->SetVertexSmear(kPerEvent);
76 gener->SetSigma(0,0,5.3); // Sigma in (X,Y,Z) (cm) on IP position
77 gener->SetTrackingFlag(0);
78 // gener->SetForceDecay(kHadronicD);
81 // The following settings select the Pythia parameters tuned to agree
82 // with charm NLO calculation for Pb-Pb @ 5.5 TeV with MNR code.
84 gener->SetProcess(kPyCharmPbMNR);
85 gener->SetStrucFunc(kCTEQ4L);
86 gener->SetPtHard(2.1,-1.0);
87 gener->SetEnergyCMS(5500.);
88 gener->SetNuclei(208,208); // Pb-Pb collisions
92 // Activate this line if you want the vertex smearing to happen
95 //gener->SetVertexSmear(perTrack);
98 AliMagFCM* field = new AliMagFCM(
99 "Map2","$(ALICE_ROOT)/data/field01.dat", 2, 1., 10.);
100 field->SetSolenoidField(4.);
101 gAlice->SetField(field);
123 //=================== Alice BODY parameters =============================
124 AliBODY *BODY = new AliBODY("BODY","Alice envelop");
127 //=================== MAG parameters ============================
128 // --- Start with Magnet since detector layouts may be depending ---
129 // --- on the selected Magnet dimensions ---
130 AliMAG *MAG = new AliMAG("MAG","Magnet");
135 //=================== ABSO parameters ============================
136 AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber");
140 //=================== DIPO parameters ============================
142 AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
146 //=================== HALL parameters ============================
148 AliHALL *HALL = new AliHALL("HALL","Alice Hall");
153 //=================== FRAME parameters ============================
155 AliFRAME *FRAME = new AliFRAMEv2("FRAME","Space Frame");
160 //=================== SHIL parameters ============================
162 AliSHIL *SHIL = new AliSHILv2("SHIL","Shielding");
167 //=================== PIPE parameters ============================
169 AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
175 //=================== ITS parameters ============================
177 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
178 // almost all other detectors. This involves the fact that the ITS geometry
179 // still has several options to be followed in parallel in order to determine
180 // the best set-up which minimizes the induced background. All the geometries
181 // available to date are described in the following. Read carefully the comments
182 // and use the default version (the only one uncommented) unless you are making
183 // comparisons and you know what you are doing. In this case just uncomment the
184 // ITS geometry you want to use and run Aliroot.
186 // Detailed geometries:
189 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
191 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
193 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
194 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
195 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
196 ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
197 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [150,300]
198 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [150,300]
199 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [100,300]
200 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [100,300]
201 ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
202 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
204 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
205 //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
206 //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
207 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer
208 //ITS->SetThicknessDet1(300.); // detector thickness on layer 1 must be in the range [150,300]
209 //ITS->SetThicknessDet2(300.); // detector thickness on layer 2 must be in the range [150,300]
210 //ITS->SetThicknessChip1(300.); // chip thickness on layer 1 must be in the range [100,300]
211 //ITS->SetThicknessChip2(300.); // chip thickness on layer 2 must be in the range [100,300]
212 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
213 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
216 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
217 // for reconstruction !):
220 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
221 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
222 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
224 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
225 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
226 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
230 // Geant3 <-> EUCLID conversion
231 // ============================
233 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
234 // media to two ASCII files (called by default ITSgeometry.euc and
235 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
236 // The default (=0) means that you dont want to use this facility.
243 //============================ TPC parameters ================================
244 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
245 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
246 // --- sectors are specified, any value other than that requires at least one
247 // --- sector (lower or upper)to be specified!
248 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
249 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
250 // --- SecLows - number of lower sectors specified (up to 6)
251 // --- SecUps - number of upper sectors specified (up to 12)
252 // --- Sens - sensitive strips for the Slow Simulator !!!
253 // --- This does NOT work if all S or L-sectors are specified, i.e.
254 // --- if SecAL or SecAU < 0
257 //-----------------------------------------------------------------------------
259 // gROOT->LoadMacro("SetTPCParam.C");
260 // AliTPCParam *param = SetTPCParam();
261 AliTPC *TPC = new AliTPCv2("TPC","Default");
262 // All sectors included
270 //=================== TOF parameters ============================
271 AliTOF *TOF = new AliTOFv2("TOF","normal TOF");
275 //=================== RICH parameters ===========================
276 AliRICH *RICH = new AliRICHv1("RICH","normal RICH");
282 //=================== ZDC parameters ============================
284 AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC");
288 //=================== CRT parameters ============================
290 AliCRT *CRT = new AliCRTv1("CRT","normal CRT");
294 //=================== TRD parameters ============================
296 AliTRD *TRD = new AliTRDv1("TRD","TRD slow simulator");
298 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
301 // With hole in front of PHOS
303 // With hole in front of RICH
306 AliTRDsim *TRDsim = TRD->CreateTR();
310 //=================== FMD parameters ============================
312 AliFMD *FMD = new AliFMDv0("FMD","normal FMD");
316 //=================== MUON parameters ===========================
317 AliMUON *MUON = new AliMUONv1("MUON","default");
320 //=================== PHOS parameters ===========================
323 AliPHOS *PHOS = new AliPHOSv1("PHOS","GPS2");
327 //=================== CRT parameters ===========================
330 AliCRT *CRT = new AliCRTv1("CRT","Normal CRTGPS2");
335 //=================== PMD parameters ============================
337 AliPMD *PMD = new AliPMDv1("PMD","normal PMD");
338 PMD->SetPAR(1., 1., 0.8, 0.02);
339 PMD->SetIN(6., 18., -580., 27., 27.);
340 PMD->SetGEO(0.0, 0.2, 4.);
341 PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
346 //=================== START parameters ============================
347 AliSTART *START = new AliSTARTv1("START","START Detector");