4 // Set Random Number seed
5 gRandom->SetSeed(12345);
7 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
8 new AliGeant3("C++ Interface to Geant3");
10 //=======================================================================
11 // Create the output file
13 TFile *rootfile = new TFile("galice.root","recreate");
14 rootfile->SetCompressionLevel(2);
15 TGeant3 *geant3 = (TGeant3*)gMC;
18 // Set External decayer
19 AliDecayer* decayer = new AliDecayerPythia();
20 decayer->SetForceDecay(all);
22 gMC->SetExternalDecayer(decayer);
26 //=======================================================================
27 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
28 geant3->SetTRIG(1); //Number of events to be processed
29 geant3->SetSWIT(4,10);
30 geant3->SetDEBU(0,0,1);
31 //geant3->SetSWIT(2,2);
42 geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
46 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
47 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
48 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
49 geant3->SetERAN(5.e-7);
51 Float_t cut = 1.e-3; // 1MeV cut by default
52 Float_t tofmax = 1.e10;
53 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
54 geant3->SetCUTS(cut,cut, cut, cut, cut, cut, cut, cut, cut, cut, tofmax);
56 //=======================================================================
57 // ************* STEERING parameters FOR ALICE SIMULATION **************
58 // --- Specify event type to be tracked through the ALICE setup
59 // --- All positions are in cm, angles in degrees, and P and E in GeV
60 AliGenHIJINGpara *gener = new AliGenHIJINGpara(84210);
61 gener->SetMomentumRange(0,999);
62 gener->SetPhiRange(0,360);
63 // gener->SetThetaRange(0.28,179.72);
64 gener->SetThetaRange(0.,180.);
65 gener->SetOrigin(0,0,0); //vertex position
66 gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
69 // Activate this line if you want the vertex smearing to happen
72 //gener->SetVertexSmear(perTrack);
74 gAlice->SetField(-999,2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
96 //=================== Alice BODY parameters =============================
97 AliBODY *BODY = new AliBODY("BODY","Alice envelop");
100 //=================== MAG parameters ============================
101 // --- Start with Magnet since detector layouts may be depending ---
102 // --- on the selected Magnet dimensions ---
103 AliMAG *MAG = new AliMAG("MAG","Magnet");
108 //=================== ABSO parameters ============================
109 AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber");
113 //=================== DIPO parameters ============================
115 AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
119 //=================== HALL parameters ============================
121 AliHALL *HALL = new AliHALL("HALL","Alice Hall");
126 //=================== FRAME parameters ============================
128 AliFRAME *FRAME = new AliFRAMEv1("FRAME","Space Frame");
133 //=================== SHIL parameters ============================
135 AliSHIL *SHIL = new AliSHILv0("SHIL","Shielding");
140 //=================== PIPE parameters ============================
142 AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
147 //=================== ITS parameters ============================
149 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
150 // almost all other detectors. This involves the fact that the ITS geometry
151 // still has several options to be followed in parallel in order to determine
152 // the best set-up which minimizes the induced background. All the geometries
153 // available to date are described in the following. Read carefully the comments
154 // and use the default version (the only one uncommented) unless you are making
155 // comparisons and you know what you are doing. In this case just uncomment the
156 // ITS geometry you want to use and run Aliroot.
158 // Detailed geometries:
159 // ====================
162 //AliITS *ITS = new AliITSv3("ITS","Old ITS detailed version as of the ALICE TP");
164 //AliITS *ITS = new AliITSv5("ITS","Current ITS detailed version used for the ITS TDR");
166 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
168 AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
171 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful for reconstruction !):
172 // ======================================================================================================================
175 //AliITS *ITS = new AliITSv1("ITS","Old ITS coarse version as of the ALICE TP");
177 //AliITS *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS coarse version with asymmetric services");
179 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS coarse version with symmetric services");
182 // Geant3 <-> EUCLID conversion
183 // ============================
185 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
186 // media to two ASCII files (called by default ITSgeometry.euc and
187 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
188 // The default (=0) means that you dont want to use this facility.
196 //============================ TPC parameters ================================
197 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
198 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
199 // --- sectors are specified, any value other than that requires at least one
200 // --- sector (lower or upper)to be specified!
201 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
202 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
203 // --- SecLows - number of lower sectors specified (up to 6)
204 // --- SecUps - number of upper sectors specified (up to 12)
205 // --- Sens - sensitive strips for the Slow Simulator !!!
206 // --- This does NOT work if all S or L-sectors are specified, i.e.
207 // --- if SecAL or SecAU < 0
210 //-----------------------------------------------------------------------------
212 // gROOT->LoadMacro("SetTPCParam.C");
213 // AliTPCParam *param = SetTPCParam();
214 AliTPC *TPC = new AliTPCv2("TPC","Default");
215 // All sectors included
223 //=================== TOF parameters ============================
224 AliTOF *TOF = new AliTOFv2("TOF","normal TOF");
228 //=================== RICH parameters ===========================
229 AliRICH *RICH = new AliRICHv1("RICH","normal RICH");
235 //=================== ZDC parameters ============================
237 AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC");
241 //=================== CASTOR parameters ============================
243 AliCASTOR *CASTOR = new AliCASTORv1("CASTOR","normal CASTOR");
247 //=================== TRD parameters ============================
249 AliTRD *TRD = new AliTRDv1("TRD","TRD slow simulator");
251 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
254 // With hole in front of PHOS
256 // With hole in front of RICH
259 AliTRDsim *TRDsim = TRD->CreateTR();
263 //=================== FMD parameters ============================
265 AliFMD *FMD = new AliFMDv1("FMD","normal FMD");
269 //=================== MUON parameters ===========================
270 AliMUON *MUON = new AliMUONv0("MUON","normal MUON");
273 //=================== PHOS parameters ===========================
276 AliPHOS *PHOS = new AliPHOSv1("PHOS","GPS2");
281 //=================== PMD parameters ============================
283 AliPMD *PMD = new AliPMDv1("PMD","normal PMD");
284 PMD->SetPAR(1., 1., 0.8, 0.02);
285 PMD->SetIN(6., 18., -580., 27., 27.);
286 PMD->SetGEO(0.0, 0.2, 4.);
287 PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
292 //=================== START parameters ============================
293 AliSTART *START = new AliSTARTv1("START","START Detector");