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
8 new AliGeant3("C++ Interface to Geant3");
10 if (!gSystem->Getenv("CONFIG_FILE")) {
11 TFile *rootfile = new TFile("galice.root","recreate");
12 rootfile->SetCompressionLevel(2);
15 TGeant3 *geant3 = (TGeant3*)gMC;
17 // Set External decayer
18 AliDecayer* decayer = new AliDecayerPythia();
19 decayer->SetForceDecay(kAll);
21 gMC->SetExternalDecayer(decayer);
24 //=======================================================================
25 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
26 geant3->SetTRIG(1); //Number of events to be processed
27 geant3->SetSWIT(4,10);
28 geant3->SetDEBU(0,0,1);
29 //geant3->SetSWIT(2,2);
40 geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
44 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
45 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
46 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
47 geant3->SetERAN(5.e-7);
49 Float_t cut = 1.e-3; // 1MeV cut by default
50 Float_t tofmax = 1.e10;
51 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
52 geant3->SetCUTS(cut,cut, cut, cut, cut, cut, cut, cut, cut, cut, tofmax);
54 //=======================================================================
55 // ************* STEERING parameters FOR ALICE SIMULATION **************
56 // --- Specify event type to be tracked through the ALICE setup
57 // --- All positions are in cm, angles in degrees, and P and E in GeV
58 if (gSystem->Getenv("CONFIG_NPARTICLES")) {
59 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
63 AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles);
65 gener->SetMomentumRange(0,999);
66 gener->SetPhiRange(0,360);
67 // gener->SetThetaRange(0.28,179.72);
68 gener->SetThetaRange(0.,180.);
69 gener->SetOrigin(0,0,0); //vertex position
70 gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
73 // Activate this line if you want the vertex smearing to happen
76 //gener->SetVertexSmear(perTrack);
78 gAlice->SetField(-999,2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
100 //=================== Alice BODY parameters =============================
101 AliBODY *BODY = new AliBODY("BODY","Alice envelop");
105 //=================== MAG parameters ============================
106 // --- Start with Magnet since detector layouts may be depending ---
107 // --- on the selected Magnet dimensions ---
108 AliMAG *MAG = new AliMAG("MAG","Magnet");
113 //=================== ABSO parameters ============================
114 AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber");
118 //=================== DIPO parameters ============================
120 AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
124 //=================== HALL parameters ============================
126 AliHALL *HALL = new AliHALL("HALL","Alice Hall");
131 //=================== FRAME parameters ============================
133 AliFRAME *FRAME = new AliFRAMEv1("FRAME","Space Frame");
138 //=================== SHIL parameters ============================
140 AliSHIL *SHIL = new AliSHILv0("SHIL","Shielding");
145 //=================== PIPE parameters ============================
147 AliPIPE *PIPE = new AliPIPEvTemp("PIPE","Beam Pipe");
153 //=================== ITS parameters ============================
155 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
156 // almost all other detectors. This involves the fact that the ITS geometry
157 // still has several options to be followed in parallel in order to determine
158 // the best set-up which minimizes the induced background. All the geometries
159 // available to date are described in the following. Read carefully the comments
160 // and use the default version (the only one uncommented) unless you are making
161 // comparisons and you know what you are doing. In this case just uncomment the
162 // ITS geometry you want to use and run Aliroot.
164 // Detailed geometries:
168 //AliITS *ITS = new AliITSv3("ITS","Old ITS detailed version as of the ALICE TP");
170 //AliITS *ITS = new AliITSv5("ITS","Current ITS detailed version used for the ITS TDR");
172 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
174 AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
176 //AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
177 //ITS->SetMinorVersion(2);
178 //ITS->SetReadDet(kFALSE);
179 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det");
180 //ITS->SetThicknessDet1(300.); // detector thickness on layer 1 must be in the range [100,300]
181 //ITS->SetThicknessDet2(300.); // detector thickness on layer 2 must be in the range [100,300]
182 //ITS->SetThicknessChip1(300.); // chip thickness on layer 1 must be in the range [150,300]
183 //ITS->SetThicknessChip2(300.); // chip thickness on layer 2 must be in the range [150,300]
184 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
185 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
187 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
188 //ITS->SetMinorVersion(2);
190 //ITS->SetReadDet(kFALSE);
191 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det");
192 //ITS->SetThicknessDet1(300.); // detector thickness on layer 1 must be in the range [100,300]
193 //ITS->SetThicknessDet2(300.); // detector thickness on layer 2 must be in the range [100,300]
194 //ITS->SetThicknessChip1(300.); // chip thickness on layer 1 must be in the range [150,300]
195 //ITS->SetThicknessChip2(300.); // chip thickness on layer 2 must be in the range [150,300]
196 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
197 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
200 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
201 // for reconstruction !):
205 //AliITS *ITS = new AliITSv1("ITS","Old ITS coarse version as of the ALICE TP");
207 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS coarse version with asymmetric services");
208 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
209 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
211 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS coarse version with symmetric services");
212 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
213 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
217 // Geant3 <-> EUCLID conversion
218 // ============================
220 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
221 // media to two ASCII files (called by default ITSgeometry.euc and
222 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
223 // The default (=0) means that you dont want to use this facility.
229 //============================ TPC parameters ================================
230 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
231 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
232 // --- sectors are specified, any value other than that requires at least one
233 // --- sector (lower or upper)to be specified!
234 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
235 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
236 // --- SecLows - number of lower sectors specified (up to 6)
237 // --- SecUps - number of upper sectors specified (up to 12)
238 // --- Sens - sensitive strips for the Slow Simulator !!!
239 // --- This does NOT work if all S or L-sectors are specified, i.e.
240 // --- if SecAL or SecAU < 0
243 //-----------------------------------------------------------------------------
245 // gROOT->LoadMacro("SetTPCParam.C");
246 // AliTPCParam *param = SetTPCParam();
247 AliTPC *TPC = new AliTPCv2("TPC","Default");
248 // All sectors included
255 //=================== TOF parameters ============================
256 AliTOF *TOF = new AliTOFv2("TOF","normal TOF");
260 //=================== RICH parameters ===========================
261 AliRICH *RICH = new AliRICHv1("RICH","normal RICH");
267 //=================== ZDC parameters ============================
269 AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC");
273 //=================== CASTOR parameters ============================
275 AliCASTOR *CASTOR = new AliCASTORv1("CASTOR","normal CASTOR");
279 //=================== TRD parameters ============================
281 AliTRD *TRD = new AliTRDv1("TRD","TRD slow simulator");
283 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
286 // With hole in front of PHOS
288 // With hole in front of RICH
291 AliTRDsim *TRDsim = TRD->CreateTR();
295 //=================== FMD parameters ============================
297 AliFMD *FMD = new AliFMDv0("FMD","normal FMD");
301 //=================== MUON parameters ===========================
303 AliMUON *MUON = new AliMUONv1("MUON","default");
306 //=================== PHOS parameters ===========================
309 AliPHOS *PHOS = new AliPHOSv1("PHOS","GPS2");
314 //=================== PMD parameters ============================
316 AliPMD *PMD = new AliPMDv1("PMD","normal PMD");
317 PMD->SetPAR(1., 1., 0.8, 0.02);
318 PMD->SetIN(6., 18., -580., 27., 27.);
319 PMD->SetGEO(0.0, 0.2, 4.);
320 PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
325 //=================== START parameters ============================
326 AliSTART *START = new AliSTARTv1("START","START Detector");