PAR: includes from previously enabled PARfiles
[u/mrichter/AliRoot.git] / macros / MUONConfig.C
CommitLineData
fe4da5cc 1void Config()
2{
3
4new TGeant3("C++ Interface to Geant3");
5
6//=======================================================================
7// Create the output file
8
9TFile *rootfile = new TFile("galice.root","recreate");
10rootfile->SetCompressionLevel(2);
11TGeant3 *geant3 = (TGeant3*)gMC;
12
13//=======================================================================
14// ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
15geant3->SetTRIG(1); //Number of events to be processed
16geant3->SetSWIT(4,10);
17geant3->SetDEBU(0,0,1);
18//geant3->SetSWIT(2,2);
19geant3->SetDCAY(0);
20geant3->SetPAIR(0);
21geant3->SetCOMP(0);
22geant3->SetPHOT(0);
23geant3->SetPFIS(0);
24geant3->SetDRAY(0);
25geant3->SetANNI(0);
26geant3->SetBREM(0);
27geant3->SetMUNU(1);
28geant3->SetCKOV(1);
29geant3->SetHADR(0); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
30geant3->SetLOSS(1);
31geant3->SetMULS(1);
32geant3->SetRAYL(1);
33geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
34geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
35geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
36Float_t cut = 1.e-3; // 1MeV cut by default
37Float_t tofmax = 1.e10;
38// GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
39geant3->SetCUTS(cut,cut, cut, cut, cut, cut, cut, cut, cut, cut, tofmax);
40//
41//=======================================================================
42// ************* STEERING parameters FOR ALICE SIMULATION **************
43// --- Specify event type to be tracked through the ALICE setup
44// --- All positions are in cm, angles in degrees, and P and E in GeV
45//
46//*********************************************
47// Example for Fixed Particle Gun *
48//*********************************************
49//AliGenFixed *gener = new AliGenFixed(200);
50//gener->SetMomentumRange(0,999);
51//gener->SetPhiRange(0,0);
52//gener->SetThetaRange(5., 5.);
53//gener->SetOrigin(0,0,0); //vertex position
9bb2665f 54//gener->SetPart(kProton);
fe4da5cc 55
56//*********************************************
57// Example for Moving Particle Gun *
58//*********************************************
59/*
60AliGenBox *gener = new AliGenBox(500);
61gener->SetMomentumRange(0,10);
62gener->SetPhiRange(0,360);
63gener->SetThetaRange(2., 10.);
64gener->SetOrigin(0,0,0);
65 //vertex position
66gener->SetSigma(0,0,5.6); //Sigma in (X,Y,Z) (cm) on IP position
9bb2665f 67gener->SetPart(kProton);
fe4da5cc 68 */
69//**************************************
70// Example for HIJING Parameterisation *
71//**************************************
72/*
73AliGenHIJINGpara *gener = new AliGenHIJINGpara(84210);
74gener->SetMomentumRange(0,999);
75gener->SetPhiRange(0,360);
76gener->SetThetaRange(0.28,179.72);
77gener->SetOrigin(0,0,0); //vertex position
78gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
79/*
80//********************************************
81// Example for Charm Production with Pythia *
82//********************************************
83*/
84/*
85AliGenPythia *gener = new AliGenPythia(200);
86gener->SetMomentumRange(0,999);
87gener->SetPhiRange(0,360);
88gener->SetThetaRange(0., 180.);
89gener->SetYRange(2,5);
90gener->SetOrigin(0,0,0); // vertex position
91gener->SetSigma(0,0,5.6); // Sigma in (X,Y,Z) (cm) on IP position
92gener->SetProcess(AliGenPythia::jpsi);
93gener->ForceDecay(AliGenPythia::dimuon);
94
95//*******************************************************
96// Example for J/psi Production from Parameterisation *
97//*******************************************************
98/*
99 AliGenParam *gener = new AliGenParam(1000, 443);
100 gener->SetMomentumRange(0,999);
101 gener->SetPhiRange(0,360);
102 gener->SetYRange(2,4);
103 gener->SetPtRange(1,10);
104 gener->SetOrigin(0,0,0); //vertex position
105 gener->SetSigma(0,0,5.6); //Sigma in (X,Y,Z) (cm) on IP position
106
107//*******************************************************
108// Example for a FLUKA Boundary Source *
109//*******************************************************
110/*
111AliGenFLUKAsource *gener = new AliGenFLUKAsource(1000);
112gener->SetPartFlag(9);
113gener->SetMomentumRange(0,999);
114gener->SetPhiRange(0,360);
115gener->SetThetaRange(0., 180.);
116 */
117//*******************************************************
118// Example for a Cocktail *
119//*******************************************************
120
121AliGenCocktail *gener = new AliGenCocktail();
122
123gener->SetMomentumRange(0,999);
124gener->SetPhiRange(0,360);
125gener->SetYRange(-4,4);
126gener->SetPtRange(0,10);
127gener->SetOrigin(0,0,0); //vertex position
128gener->SetSigma(0,0,5.6); //Sigma in (X,Y,Z) (cm) on IP position
129//
130 AliGenPythia *jpsi = new AliGenPythia(200);
131
132 jpsi->SetProcess(AliGenPythia::jpsi);
133 jpsi->ForceDecay(AliGenPythia::dimuon);
134
135 AliGenPythia *beauty = new AliGenPythia(200);
136 beauty->SetProcess(AliGenPythia::beauty_unforced);
137 beauty->ForceDecay(AliGenPythia::semielectronic);
138
139 AliGenPythia *charm = new AliGenPythia(200);
140 charm->SetProcess(AliGenPythia::charm_unforced);
141 charm->ForceDecay(AliGenPythia::semimuonic);
142 charm->SetPtHard(5,10);
143
144 AliGenParam *jpsi_to_muons = new AliGenParam(100,443);
145 jpsi_to_muons->ForceDecay(AliGenParam::dimuon);
146
147 AliGenParam *jpsi_to_electrons = new AliGenParam(100,443);
148 jpsi_to_electrons->ForceDecay(AliGenParam::dielectron);
149
150 AliGenParam *phi_to_electrons = new AliGenParam(100,333);
151 phi_to_electrons->ForceDecay(AliGenParam::dielectron);
152
153// gener->AddGenerator(jpsi,"Jpsi",1.);
154// gener->AddGenerator(beauty,"Beauty",1.);
155// gener->AddGenerator(charm,"Charm",1.);
156// gener->AddGenerator(jpsi_to_muons,"Jpsi_to_Muons",1.);
157 gener->AddGenerator(jpsi_to_electrons,"Jpsi_to_Electrons",1.);
158 // gener->AddGenerator(phi_to_electrons,"Phi_to_Electrons",1.);
159//
160gener->Init();
161//**************************************************************************
162// Specify maximum magnetic field in Tesla (neg. ==> default field)
163gAlice->SetField(-999,2);
164// gAlice->TrackingLimits(2000.,200);
165
166//=================== Alice BODY parameters =============================
167
168AliBODY *BODY = new AliBODY("BODY","Alice envelop");
169/*
170AliFRAME *FRAME = new AliFRAMEv0("FRAME", "Space Frame");
171
172/*
173//=================== ABSO parameters ============================
174
175AliABSO *ABSO = new AliABSO("ABSO","Muon Absorber");
176
177//=================== DIPO parameters ============================
178
179AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
180
181//=================== SHIL parameters ============================
182
183AliSHIL *SHIL = new AliSHIL("SHIL","Shielding");
184
185//=================== PIPE parameters ============================
186*/
187// AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
188/*
189*/
190//=================== MUON parameters ===========================
191
192
193AliMUON *MUON = new AliMUONv0("MUON","normal MUON");
194
195MUON->SetSMAXAR(0.03);
196MUON->SetSMAXAL(-1);
197//
198// Version 0
199//
200// First define the number of planes that are segmented (1 or 2) by a call
201// to SetNsec.
202// Then chose for each chamber (chamber plane) the segmentation
203// and response model.
204// They should be equal for the two chambers of each station. In a future
205// version this will be enforced.
206//
207//
208 Int_t chamber;
209 Int_t station;
210// Default Segmentation
211 AliMUONsegmentationV0* segV0 = new AliMUONsegmentationV0;
212// Default response
213 AliMUONresponseV0* response0 = new AliMUONresponseV0;
214 response0->SetSqrtKx3(0.761577);
215 response0->SetKx2(0.972655);
216 response0->SetKx4(0.3841);
217 response0->SetSqrtKy3(0.714143);
218 response0->SetKy2(1.0099);
219 response0->SetKy4(0.403);
220 response0->SetPitch(0.25);
221 response0->SetRSIGM(10.);
222 response0->SetMUCHSP(5.);
223 response0->SetMUSIGM(0.18, 0.18);
224 response0->SetMAXADC( 1024);
225//--------------------------------------------------------
226// Configuration for Chamber TC1/2 (Station 1) ----------
227//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
228 Float_t rseg[4]={17.5, 55.2, 71.3, 95.5};
229 Int_t nseg[4]={4, 4, 2, 1};
230
231 chamber=1;
232//^^^^^^^^^
233 MUON->SetNsec(chamber-1,2);
234//
235 AliMUONsegmentationV01 *seg11=new AliMUONsegmentationV01;
236 seg11->SetSegRadii(rseg);
237 seg11->SetPADSIZ(3.048, 0.508);
238 seg11->SetPadDivision(nseg);
239 MUON->SetSegmentationModel(chamber-1, 1, seg11);
240//
241 AliMUONsegmentationV01 *seg12=new AliMUONsegmentationV01;
242 seg12->SetSegRadii(rseg);
243 seg12->SetPADSIZ(2.032, 0.762);
244 seg12->SetPadDivision(nseg);
245
246 MUON->SetSegmentationModel(chamber-1, 2, seg12);
247
248 chamber=2;
249//^^^^^^^^^
250 MUON->SetNsec(chamber-1,2);
251 MUON->SetSegmentationModel(chamber-1, 1, seg11);
252 MUON->SetSegmentationModel(chamber-1, 2, seg12);
253
254 station=1;
255//^^^^^^^^^
256 MUON->SetResponseModel(0, response0);
257 MUON->SetResponseModel(1, response0);
258//
259//--------------------------------------------------------
260// Configuration for Chamber TC3/4 -----------------------
261//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
262
263 chamber=3;
264 MUON->SetNsec(chamber-1,1);
265 AliMUONsegmentationV0 *seg34=new AliMUONsegmentationV0;
266 seg34->SetDAnod(0.51/3.);
267
268 MUON->SetSegmentationModel(chamber-1, 1, seg34);
269 MUON->SetResponseModel(chamber-1, response0);
270
271 chamber=4;
272 MUON->SetNsec(chamber-1,1);
273 MUON->SetSegmentationModel(chamber-1, 1, seg34);
274 MUON->SetResponseModel(chamber-1, response0);
275//
276// Station 2
277 station=2;
278 MUON->SetPADSIZ(station, 1, 0.75, 0.51);
279 MUON->SetMUCHSP(station, 5.);
280 MUON->SetMUSIGM(station, 0.18, 0.18);
281 MUON->SetRSIGM(station, 10.);
282 MUON->SetMAXADC(station, 1024);
283
284//
285//--------------------------------------------------------
286// Configuration for Chamber TC5/6 -----------------------
287//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
288
289 seg5 = new AliMUONsegmentationV1;
290 AliMUONresponseV0* response5 = new AliMUONresponseV0;
291 // K3 = 0.62
292 response5->SetSqrtKx3(0.78740079);
293 response5->SetKx2(0.95237319); // 0.5 * kPI * (1- 0.5*sqrtky3 )
294 response5->SetKx4(0.37480633); // 0.25/TMath::ATan(sqrtkx3)
295 // K3 = 0.55
296 response5->SetSqrtKy3(0.74161985);
297 response5->SetKy2(0.98832946);
298 response5->SetKy4(0.39177817);
299 response5->SetPitch(0.325);
300 response5->SetRSIGM(10.);
301 response5->SetMUCHSP(5.);
302 response5->SetMUSIGM( 0.4, 0.4);
303 response5->SetMAXADC( 1024);
304
305 chamber=5;
306 MUON->SetNsec(chamber-1,1);
307 MUON->SetSegmentationModel(chamber-1, 1, seg5);
308 MUON->SetResponseModel(chamber-1, response5);
309
310 chamber=6;
311 MUON->SetNsec(chamber-1,1);
312 MUON->SetSegmentationModel(chamber-1, 1, seg5);
313 MUON->SetResponseModel(chamber-1, response5);
314//
315// Station 3
316 station=3;
317 MUON->SetPADSIZ(station, 1, 0.975, 0.55);
318
319//
320//--------------------------------------------------------
321// Configuration for Chamber TC7/8/9/10-------------------
322//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
323
324 chamber=7;
325 MUON->SetNsec(chamber-1,1);
326 AliMUONsegmentationV0 *seg78=new AliMUONsegmentationV0;
327 seg78->SetDAnod(0.51/3.);
328
329 MUON->SetSegmentationModel(chamber-1, 1, seg78);
330 MUON->SetResponseModel(chamber-1, response0);
331
332 chamber=8;
333 MUON->SetNsec(chamber-1,1);
334 MUON->SetSegmentationModel(chamber-1, 1, seg78);
335 MUON->SetResponseModel(chamber-1, response0);
336//
337// Station 4
338 station=4;
339 MUON->SetPADSIZ(station, 1, 0.75, 0.5);
340
341 chamber=9;
342 MUON->SetNsec(chamber-1,1);
343 AliMUONsegmentationV0 *seg910=new AliMUONsegmentationV0;
344 seg910->SetDAnod(0.51/3.);
345
346 MUON->SetSegmentationModel(chamber-1, 1, seg910);
347 MUON->SetResponseModel(chamber-1, response0);
348
349 chamber=10;
350 MUON->SetNsec(chamber-1,1);
351 MUON->SetSegmentationModel(chamber-1, 1, seg910);
352 MUON->SetResponseModel(chamber-1, response0);
353//
354// Station 5
355 station=5;
356 MUON->SetPADSIZ(station, 1, 0.75, 0.5);
357
358 chamber=11;
359 MUON->SetNsec(chamber-1,1);
360 AliMUONsegmentationV0 *seg1112=new AliMUONsegmentationV0;
361 seg1112->SetDAnod(0.51/3.);
362
363 MUON->SetSegmentationModel(chamber-1, 1, seg1112);
364 MUON->SetResponseModel(chamber-1, response0);
365
366 chamber=12;
367 MUON->SetNsec(chamber-1,1);
368 MUON->SetSegmentationModel(chamber-1, 1, seg1112);
369 MUON->SetResponseModel(chamber-1, response0);
370//
371// Trigger Station 1
372 station=6;
373 MUON->SetPADSIZ(station, 1, 0.75, 0.5);
374
375 chamber=13;
376 MUON->SetNsec(chamber-1,1);
377 AliMUONsegmentationV0 *seg1314=new AliMUONsegmentationV0;
378 seg1314->SetDAnod(0.51/3.);
379
380 MUON->SetSegmentationModel(chamber-1, 1, seg1314);
381 MUON->SetResponseModel(chamber-1, response0);
382
383 chamber=14;
384 MUON->SetNsec(chamber-1,1);
385 MUON->SetSegmentationModel(chamber-1, 1, seg1314);
386 MUON->SetResponseModel(chamber-1, response0);
387//
388// Trigger Station 2
389 station=7;
390 MUON->SetPADSIZ(station, 1, 0.75, 0.5);
391}
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412