]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFconfig.C
Mostly minor style modifications to be ready for cloning with EMCAL
[u/mrichter/AliRoot.git] / TOF / AliTOFconfig.C
CommitLineData
42036c57 1static Int_t eventsPerRun = 100;
2void Config()
3{
4 // 7-DEC-2000 09:00
5 // Switch on Transition Radiation simulation. 6/12/00 18:00
6 // iZDC=1 7/12/00 09:00
7 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
8 // Theta range given through pseudorapidity limits 22/6/2001
9
10 // Set Random Number seed
11 // gRandom->SetSeed(12345);
12
13 new AliGeant3("C++ Interface to Geant3");
14
15 if (!gSystem->Getenv("CONFIG_FILE"))
16 {
17 TFile *rootfile = new TFile("TOF_test.root", "recreate");
18
19 rootfile->SetCompressionLevel(2);
20 }
21
22 TGeant3 *geant3 = (TGeant3 *) gMC;
23
24 //
25 // Set External decayer
26 AliDecayer *decayer = new AliDecayerPythia();
27
28 decayer->SetForceDecay(kAll);
29 decayer->Init();
30 gMC->SetExternalDecayer(decayer);
31 //
32 //
33 //=======================================================================
34 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
35 geant3->SetTRIG(1); //Number of events to be processed
36 geant3->SetSWIT(4, 10);
37 geant3->SetDEBU(0, 0, 1);
38 //geant3->SetSWIT(2,2);
39 geant3->SetDCAY(1);
40 geant3->SetPAIR(1);
41 geant3->SetCOMP(1);
42 geant3->SetPHOT(1);
43 geant3->SetPFIS(0);
44 geant3->SetDRAY(0);
45 geant3->SetANNI(1);
46 geant3->SetBREM(1);
47 geant3->SetMUNU(1);
48 geant3->SetCKOV(1);
49 geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
50 geant3->SetLOSS(2);
51 geant3->SetMULS(1);
52 geant3->SetRAYL(1);
53 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
54 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
55 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
56 geant3->SetERAN(5.e-7);
57
58 Float_t cut = 1.e-3; // 1MeV cut by default
59 Float_t tofmax = 1.e10;
60
61 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
62 geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut,
63 tofmax);
64
65 // #### AliGenHIJING generation######################################
66 //
67 AliGenHijing *gener = new AliGenHijing(1);
68 gener->SetEnergyCMS(5500);
69 gener->SetReferenceFrame("CMS");
70 gener->SetProjectile("A", 208,82);
71 gener->SetTarget("A", 208,82);
72 gener->SetImpactParameterRange(0.,3.);
73 gener->SetJetQuenching(1);
74 gener->SetShadowing(1);
75 gener->SetDecaysOff(0);
76 gener->SetSelectAll(0);
77 gener->SetOrigin(0.,0.,0.);
78 gener->SetSpectators(0);
79 gener->SetThetaRange(85.,95.);
80 gener->SetTrackingFlag(1);
81 gener->Init();
82
83 //
84 // Activate this line if you want the vertex smearing to happen
85 // track by track
86 //
87 //gener->SetVertexSmear(perTrack);
88
89 gAlice->SetField(-999, 2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
90 //gAlice->SetField(-999,2,2.);//Scale factor=2 ==> field=0.4T
91
92 Int_t iABSO = 1;
f1aa0bcf 93 Int_t iCRT = 0;
42036c57 94 Int_t iDIPO = 1;
95 Int_t iFMD = 1;
96 Int_t iFRAME = 1;
97 Int_t iHALL = 1;
98 Int_t iITS = 1;
99 Int_t iMAG = 1;
100 Int_t iMUON = 1;
101 Int_t iPHOS = 1;
102 Int_t iPIPE = 1;
103 Int_t iPMD = 1;
104 Int_t iRICH = 1;
105 Int_t iSHIL = 1;
106 Int_t iSTART = 1;
107 Int_t iTOF = 1;
108 Int_t iTPC = 1;
109 Int_t iTRD = 1;
110 Int_t iZDC = 1;
111 Int_t iEMCAL = 0;
112
113 //=================== Alice BODY parameters =============================
114 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
115
116
117 if (iMAG)
118 {
119 //=================== MAG parameters ============================
120 // --- Start with Magnet since detector layouts may be depending ---
121 // --- on the selected Magnet dimensions ---
122 AliMAG *MAG = new AliMAG("MAG", "Magnet");
123 }
124
125
126 if (iABSO)
127 {
128 //=================== ABSO parameters ============================
129 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
130 }
131
132 if (iDIPO)
133 {
134 //=================== DIPO parameters ============================
135
136 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
137 }
138
139 if (iHALL)
140 {
141 //=================== HALL parameters ============================
142
143 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
144 }
145
146
147 if (iFRAME)
148 {
149 //=================== FRAME parameters ============================
150
151 AliFRAME *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
152
153 }
154
155 if (iSHIL)
156 {
157 //=================== SHIL parameters ============================
158
159 AliSHIL *SHIL = new AliSHILvF("SHIL", "Shielding");
160 }
161
162
163 if (iPIPE)
164 {
165 //=================== PIPE parameters ============================
166
167 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
168 }
169
170 if(iITS) {
171
172//=================== ITS parameters ============================
173 //
174 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
175 // almost all other detectors. This involves the fact that the ITS geometry
176 // still has several options to be followed in parallel in order to determine
177 // the best set-up which minimizes the induced background. All the geometries
178 // available to date are described in the following. Read carefully the comments
179 // and use the default version (the only one uncommented) unless you are making
180 // comparisons and you know what you are doing. In this case just uncomment the
181 // ITS geometry you want to use and run Aliroot.
182 //
183 // Detailed geometries:
184 //
185 //
186 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
187 //
188 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
189 //
190 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
191 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
192 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
193 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
194 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
195 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
196 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
197 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
198 ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
199 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
200 //
201 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
202 //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
203 //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
204 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer
205 //ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
206 //ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
207 //ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
208 //ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
209 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
210 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
211 //
212 //
213 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
214 // for reconstruction !):
215 //
216 //
217 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
218 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
219 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
220 //
221 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
222 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
223 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
224 //
225 //
226 //
227 // Geant3 <-> EUCLID conversion
228 // ============================
229 //
230 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
231 // media to two ASCII files (called by default ITSgeometry.euc and
232 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
233 // The default (=0) means that you dont want to use this facility.
234 //
235 ITS->SetEUCLID(0);
236 }
237
238
239 if (iTPC)
240 {
241 //============================ TPC parameters ================================
242 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
243 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
244 // --- sectors are specified, any value other than that requires at least one
245 // --- sector (lower or upper)to be specified!
246 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
247 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
248 // --- SecLows - number of lower sectors specified (up to 6)
249 // --- SecUps - number of upper sectors specified (up to 12)
250 // --- Sens - sensitive strips for the Slow Simulator !!!
251 // --- This does NOT work if all S or L-sectors are specified, i.e.
252 // --- if SecAL or SecAU < 0
253 //
254 //
255 //-----------------------------------------------------------------------------
256
257 // gROOT->LoadMacro("SetTPCParam.C");
258 // AliTPCParam *param = SetTPCParam();
259 //AliTPC *TPC = new AliTPCv2("TPC", "Default");
260 AliTPC *TPC = new AliTPCv1("TPC","Default"); //fast simulation (Pierella)
261
262 // All sectors included
263 TPC->SetSecAL(-1);
264 TPC->SetSecAU(-1);
265
266 }
267
268 if (iTOF)
269 {
270 //=================== TOF parameters ============================
271 //AliTOF *TOF = new AliTOFv2("TOF", "normal TOF");
272 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF"); // default for time zero determination
273 }
274
275 if (iRICH)
276 {
277 //=================== RICH parameters ===========================
278 AliRICH *RICH = new AliRICHv1("RICH", "normal RICH");
279
280 }
281
282
283 if (iZDC)
284 {
285 //=================== ZDC parameters ============================
286
287 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
288 }
289
f1aa0bcf 290 if (iCRT)
42036c57 291 {
043a9e37 292 //=================== CRT parameters ============================
42036c57 293
043a9e37 294 AliCRT *CRT = new AliCRTv1("CRT", "normal CRT");
42036c57 295 }
296
297 if (iTRD)
298 {
299 //=================== TRD parameters ============================
300
301 //AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
302 AliTRD *TRD = new AliTRDv0("TRD","TRD fast simulator");// Pierella
303
304 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
305 TRD->SetGasMix(1);
306
307 // With hole in front of PHOS
308 TRD->SetPHOShole();
309 // With hole in front of RICH
310 TRD->SetRICHhole();
311 // Switch on TR
312 AliTRDsim *TRDsim = TRD->CreateTR();
313 }
314
315 if (iFMD)
316 {
317 //=================== FMD parameters ============================
318
319 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
320 FMD->SetRingsSi1(256);
321 FMD->SetRingsSi2(64);
322 FMD->SetSectorsSi1(20);
323 FMD->SetSectorsSi2(24);
324 }
325
326 if (iMUON)
327 {
328 //=================== MUON parameters ===========================
329
330 AliMUON *MUON = new AliMUONv1("MUON", "default");
331 }
332 //=================== PHOS parameters ===========================
333
334 if (iPHOS)
335 {
336 AliPHOS *PHOS = new AliPHOSv1("PHOS", "GPS2");
337 }
338
339
340 if (iPMD)
341 {
342 //=================== PMD parameters ============================
343
344 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
345
346 PMD->SetPAR(1., 1., 0.8, 0.02);
347 PMD->SetIN(6., 18., -580., 27., 27.);
348 PMD->SetGEO(0.0, 0.2, 4.);
349 PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
350
351 }
352
353 if (iEMCAL && !iRICH)
354 {
355 //=================== EMCAL parameters ============================
356 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCALArch1a");
357 }
358
359 if (iSTART)
360 {
361 //=================== START parameters ============================
362 AliSTART *START = new AliSTARTv1("START", "START Detector");
363 }
364
365
366}
367
368Float_t EtaToTheta(Float_t arg){
369 return (180./TMath::Pi())*2.*atan(exp(-arg));
370}