3 // Switch on Transition Radiation simulation. 6/12/00 18:00
4 // iZDC=1 7/12/00 09:00
5 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
6 // Theta range given through pseudorapidity limits 22/6/2001
8 // Set Random Number seed
9 // gRandom->SetSeed(12345);
11 // libraries required by geant321
12 gSystem->Load("libgeant321");
14 new TGeant3("C++ Interface to Geant3");
16 if (!gSystem->Getenv("CONFIG_FILE"))
18 TFile *rootfile = new TFile("galice.root", "recreate");
20 rootfile->SetCompressionLevel(2);
23 TGeant3 *geant3 = (TGeant3 *) gMC;
26 // Set External decayer
27 AliDecayer *decayer = new AliDecayerPythia();
29 decayer->SetForceDecay(kAll);
31 gMC->SetExternalDecayer(decayer);
34 //=======================================================================
35 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
36 geant3->SetTRIG(1); //Number of events to be processed
37 geant3->SetSWIT(4, 10);
38 geant3->SetDEBU(0, 0, 1);
39 //geant3->SetSWIT(2,2);
50 geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
54 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
55 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
56 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
57 geant3->SetERAN(5.e-7);
59 Float_t cut = 1.e-3; // 1MeV cut by default
60 Float_t tofmax = 1.e10;
62 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
63 geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut,
66 //=======================================================================
67 // ************* STEERING parameters FOR ALICE SIMULATION **************
68 // --- Specify event type to be tracked through the ALICE setup
69 // --- All positions are in cm, angles in degrees, and P and E in GeV
70 if (gSystem->Getenv("CONFIG_NPARTICLES")){
71 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
75 //*********************************************
76 // Example for Fixed Particle Gun
77 //*********************************************
78 AliGenFixed *gener = new AliGenFixed(nParticles);
79 gener->SetMomentum(50);
82 gener->SetOrigin(0,0,0); //vertex position
83 gener->SetPart(13); //GEANT particle type
86 // Activate this line if you want the vertex smearing to happen
89 //gener->SetVertexSmear(perTrack);
91 gAlice->SetField(-999, 2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
113 //=================== Alice BODY parameters =============================
114 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
117 //=================== MAG parameters ============================
118 // --- Start with Magnet since detector layouts may be depending ---
119 // --- on the selected Magnet dimensions ---
120 AliMAG *MAG = new AliMAG("MAG", "Magnet");
123 //=================== ABSO parameters ============================
124 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
127 //=================== DIPO parameters ============================
128 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
131 //=================== HALL parameters ============================
132 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
135 //=================== FRAME parameters ============================
136 AliFRAME *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
139 //=================== SHIL parameters ============================
140 AliSHIL *SHIL = new AliSHILvF("SHIL", "Shielding");
143 //=================== PIPE parameters ============================
144 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
147 //=================== ITS parameters ============================
149 // As the innermost detector in ALICE, the Inner Tracking System
150 // "impacts" on almost all other detectors. This involves the fact
151 // that the ITS geometry still has several options to be followed
152 //in parallel in order to determine the best set-up which minimizes
153 // the induced background. All the geometries available to date are
154 // described in the following. Read carefully the comments and use
155 // the default version (the only one uncommented) unless you are making
156 // comparisons and you know what you are doing. In this case just
157 // uncomment the ITS geometry you want to use and run Aliroot.
158 // Detailed geometries:
159 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
160 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
161 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
162 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
163 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
164 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
165 ITS->SetThicknessChip2(200.);// chip thickness on layer 2 must be in the range [150,300]
166 ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
167 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
168 // Geant3 <-> EUCLID conversion
169 // ============================
170 // SetEUCLID is a flag to output (=1) or not to output (=0) both
171 // geometry and media to two ASCII files (called by default
172 // ITSgeometry.euc and ITSgeometry.tme) in a format understandable
173 // to the CAD system EUCLID. The default (=0) means that you dont
174 // want to use this facility.
178 //============================ TPC parameters =========================
179 // This allows the user to specify sectors for the SLOW (TPC geometry
180 // 2) Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
181 // sectors are specified, any value other than that requires at least
182 // one sector (lower or upper)to be specified!
183 // Reminder: sectors 1-24 are lower sectors ( 1-12->z>0,13-24->z<0)
184 // sectors 25-72 are the upper ones (25-48->z>0,49-72->z<0)
185 // SecLows - number of lower sectors specified (up to 6)
186 // SecUps - number of upper sectors specified (up to 12)
187 // Sens - sensitive strips for the Slow Simulator !!!
188 // This does NOT work if all S or L-sectors are specified, i.e.
189 // if SecAL or SecAU < 0
190 //---------------------------------------------------------------------
191 // gROOT->LoadMacro("SetTPCParam.C");
192 // AliTPCParam *param = SetTPCParam();
193 AliTPC *TPC = new AliTPCv2("TPC", "Default");
194 // All sectors included
199 //=================== TOF parameters ============================
200 AliTOF *TOF = new AliTOFv2("TOF", "normal TOF");
203 //=================== RICH parameters ===========================
204 AliRICH *RICH = new AliRICHv3("RICH", "normal RICH");
207 //=================== ZDC parameters ============================
208 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
211 //=================== TRD parameters ============================
212 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
213 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe +
216 // With hole in front of PHOS
218 // With hole in front of RICH
221 AliTRDsim *TRDsim = TRD->CreateTR();
224 //=================== FMD parameters ============================
225 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
226 FMD->SetRingsSi1(256);
227 FMD->SetRingsSi2(64);
228 FMD->SetSectorsSi1(20);
229 FMD->SetSectorsSi2(24);
232 //=================== MUON parameters ===========================
233 AliMUON *MUON = new AliMUONv1("MUON", "default");
236 //=================== PHOS parameters ===========================
237 AliPHOS *PHOS = new AliPHOSv1("PHOS", "GPS2");
240 //=================== PMD parameters ============================
241 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
242 PMD->SetPAR(1., 1., 0.8, 0.02);
243 PMD->SetIN(6., 18., -580., 27., 27.);
244 PMD->SetGEO(0.0, 0.2, 4.);
245 PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
248 //=================== EMCAL parameters ============================
249 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "G56_2_55_19_104_14");
252 //=================== START parameters ============================
253 AliSTART *START = new AliSTARTv1("START", "START Detector");
256 //----------------------------------------------------------------------
257 Float_t EtaToTheta(Float_t arg){
258 return (180./TMath::Pi())*2.*atan(exp(-arg));