4 // Switch on Transition Radiation simulation. 6/12/00 18:00
5 // iZDC=1 7/12/00 09:00
6 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
7 // Theta range given through pseudorapidity limits 22/6/2001
9 // Set Random Number seed
10 // gRandom->SetSeed(12345);
12 new AliGeant3("C++ Interface to Geant3");
14 if (!gSystem->Getenv("CONFIG_FILE"))
16 TFile *rootfile = new TFile("galice.root", "recreate");
18 rootfile->SetCompressionLevel(2);
21 TGeant3 *geant3 = (TGeant3 *) gMC;
24 // Set External decayer
25 AliDecayer *decayer = new AliDecayerPythia();
27 decayer->SetForceDecay(kAll);
29 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;
60 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
61 geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut,
64 //=======================================================================
65 // ************* STEERING parameters FOR ALICE SIMULATION **************
66 // --- Specify event type to be tracked through the ALICE setup
67 // --- All positions are in cm, angles in degrees, and P and E in GeV
68 if (gSystem->Getenv("CONFIG_NPARTICLES"))
70 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
75 AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles);
77 gener->SetMomentumRange(0, 999);
78 gener->SetPhiRange(0, 360);
79 // Set pseudorapidity range from -8 to 8.
80 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
81 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
82 gener->SetThetaRange(thmin,thmax);
83 gener->SetOrigin(0, 0, 0); //vertex position
84 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
87 // Activate this line if you want the vertex smearing to happen
90 //gener->SetVertexSmear(perTrack);
92 gAlice->SetField(-999, 2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
114 //=================== Alice BODY parameters =============================
115 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
120 //=================== MAG parameters ============================
121 // --- Start with Magnet since detector layouts may be depending ---
122 // --- on the selected Magnet dimensions ---
123 AliMAG *MAG = new AliMAG("MAG", "Magnet");
129 //=================== ABSO parameters ============================
130 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
135 //=================== DIPO parameters ============================
137 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
142 //=================== HALL parameters ============================
144 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
150 //=================== FRAME parameters ============================
152 AliFRAME *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
158 //=================== SHIL parameters ============================
160 AliSHIL *SHIL = new AliSHILv0("SHIL", "Shielding");
166 //=================== PIPE parameters ============================
168 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
173 //=================== ITS parameters ============================
175 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
176 // almost all other detectors. This involves the fact that the ITS geometry
177 // still has several options to be followed in parallel in order to determine
178 // the best set-up which minimizes the induced background. All the geometries
179 // available to date are described in the following. Read carefully the comments
180 // and use the default version (the only one uncommented) unless you are making
181 // comparisons and you know what you are doing. In this case just uncomment the
182 // ITS geometry you want to use and run Aliroot.
184 // Detailed geometries:
187 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
189 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
191 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
192 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
193 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
194 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
195 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
196 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
197 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
198 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
199 ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
200 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
202 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
203 //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
204 //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
205 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer
206 //ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
207 //ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
208 //ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
209 //ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
210 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
211 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
214 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
215 // for reconstruction !):
218 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
219 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
220 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
222 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
223 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
224 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
228 // Geant3 <-> EUCLID conversion
229 // ============================
231 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
232 // media to two ASCII files (called by default ITSgeometry.euc and
233 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
234 // The default (=0) means that you dont want to use this facility.
242 //============================ TPC parameters ================================
243 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
244 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
245 // --- sectors are specified, any value other than that requires at least one
246 // --- sector (lower or upper)to be specified!
247 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
248 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
249 // --- SecLows - number of lower sectors specified (up to 6)
250 // --- SecUps - number of upper sectors specified (up to 12)
251 // --- Sens - sensitive strips for the Slow Simulator !!!
252 // --- This does NOT work if all S or L-sectors are specified, i.e.
253 // --- if SecAL or SecAU < 0
256 //-----------------------------------------------------------------------------
258 // gROOT->LoadMacro("SetTPCParam.C");
259 // AliTPCParam *param = SetTPCParam();
260 AliTPC *TPC = new AliTPCv2("TPC", "Default");
262 // All sectors included
270 //=================== TOF parameters ============================
271 AliTOF *TOF = new AliTOFv2("TOF", "normal TOF");
276 //=================== RICH parameters ===========================
277 AliRICH *RICH = new AliRICHv1("RICH", "normal RICH");
284 //=================== ZDC parameters ============================
286 AliZDC *ZDC = new AliZDCv1("ZDC", "normal ZDC");
291 //=================== CASTOR parameters ============================
293 AliCASTOR *CASTOR = new AliCASTORv1("CASTOR", "normal CASTOR");
298 //=================== TRD parameters ============================
300 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
302 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
305 // With hole in front of PHOS
307 // With hole in front of RICH
310 AliTRDsim *TRDsim = TRD->CreateTR();
315 //=================== FMD parameters ============================
317 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
322 //=================== MUON parameters ===========================
324 AliMUON *MUON = new AliMUONv1("MUON", "default");
326 //=================== PHOS parameters ===========================
330 AliPHOS *PHOS = new AliPHOSv1("PHOS", "GPS2");
336 //=================== PMD parameters ============================
338 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
340 PMD->SetPAR(1., 1., 0.8, 0.02);
341 PMD->SetIN(6., 18., -580., 27., 27.);
342 PMD->SetGEO(0.0, 0.2, 4.);
343 PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
349 //=================== START parameters ============================
350 AliSTART *START = new AliSTARTv1("START", "START Detector");
356 Float_t EtaToTheta(Float_t arg){
357 return (180./TMath::Pi())*2.*atan(exp(-arg));