Fixed bug in expansion routine of arrays (initialize buffers properly)
[u/mrichter/AliRoot.git] / MUON / Config_slat.C
CommitLineData
f5e13b7c 1enum gentype_t {hijing, gun, box, pythia, param, cocktail, fluka, halo, ntuple, scan, doublescan, hijing_g};
2
3gentype_t gentype=scan;
4// Int_t ntracks=6407;
5// Int_t ntracks=12000;
6// Int_t ntracks=28380;
7// Int_t ntracks=19900;
8Int_t ntracks=1;
9
10void Config()
11
12{
13new AliGeant3("C++ Interface to Geant3");
14
15//=======================================================================
16// Create the output file
17
18TFile *rootfile = new TFile("galice.root","recreate");
19rootfile->SetCompressionLevel(2);
20TGeant3 *geant3 = (TGeant3*)gMC;
21
22
23//=======================================================================
24// ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
25 geant3->fGctrak->maxnst=1000000;
26 geant3->fGcflag->nrndm[0]=10;
27 geant3->fGcflag->nrndm[1]=11;
28geant3->SetTRIG(1); //Number of events to be processed
29geant3->SetSWIT(4,100);
30geant3->SetDEBU(0,0,1);
31geant3->SetDCAY(1);
32geant3->SetPAIR(1);
33geant3->SetCOMP(1);
34geant3->SetPHOT(1);
35geant3->SetPFIS(0);
36geant3->SetDRAY(0);
37geant3->SetANNI(1);
38geant3->SetBREM(1);
39geant3->SetMUNU(1);
40geant3->SetCKOV(0);
41geant3->SetHADR(4); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
42geant3->SetLOSS(1);
43geant3->SetMULS(1);
44geant3->SetRAYL(0);
45geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
46geant3->SetABAN(1); //Restore 3.16 behaviour for abandoned tracks
47geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
48Float_t cut = 1.e-4; // 100MeV cut by default
49Float_t tofmax = 1.e10;
50// GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
51geant3->SetCUTS(1.e-4, 1.e-4, 1.e-3, 1.e-4, 1.e-3, cut, cut, cut, cut, cut, 1.e-5);
52
f9f7c205 53 gAlice->TrackingLimits( 700, 1500);
f5e13b7c 54
55//
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
61 switch(gentype)
62 {
63 case gun:
64//*********************************************
65// Example for Fixed Particle Gun *
66//*********************************************
67 AliGenFixed *gener = new AliGenFixed(ntracks);
68 gener->SetMomentum(10);
69 gener->SetPhiRange(0);
70 gener->SetThetaRange(0.);
71 gener->SetOrigin(30,30,1200); //vertex position
72 gener->SetPart(kProton); //GEANT particle type
73 break;
74 case box:
75//*********************************************
76// Example for Moving Particle Gun *
77//*********************************************
78 AliGenBox *gener = new AliGenBox(ntracks);
79 gener->SetMomentumRange(3,4);
80 gener->SetPhiRange(-360,360);
81 gener->SetThetaRange(2., 10.);
82 gener->SetOrigin(25,25,510.5);
83 gener->SetVertexSmear(kPerTrack);
84 //vertex position
85 gener->SetSigma(1.8, 1.8,0); //Sigma in (X,Y,Z) (cm) on IP position
86 gener->SetPart(kProton); //GEANT particle type
87 break;
88 case scan:
89//*********************************************
90// Scanning on a grid *
91//*********************************************
92 AliGenScan *gener = new AliGenScan(-1);
93 gener->SetMomentumRange(20,20);
94 gener->SetPhiRange(90,90);
95 gener->SetThetaRange(0,0);
96 //vertex position
97 gener->SetSigma(1,1,0); //Sigma in (X,Y,Z) (cm) on IP position
98 gener->SetPart(kMuonMinus);
f9f7c205 99 gener->SetRange(20, -200, 200, 20, -200., 200., 1, 900, 900);
f5e13b7c 100 break;
101 case doublescan:
102//*********************************************
103// Scanning on a grid *
104//*********************************************
105 AliGenDoubleScan *gener = new AliGenDoubleScan(-1);
106 gener->SetMomentumRange(4,4);
107 gener->SetPhiRange(0,360);
108 gener->SetThetaRange(0,0);
109 //vertex position
110 gener->SetSigma(3,3,0); //Sigma in (X,Y,Z) (cm) on IP position
111 gener->SetPart(8);
112 gener->SetRange(20, -100, 100, 20, -100, 100, 1, 500, 500);
113 gener->SetDistance(1);
114 break;
115
116 case hijing:
117 AliGenHIJINGpara *gener = new AliGenHIJINGpara(ntracks);
118 gener->SetMomentumRange(0,999);
119 gener->SetPtRange(0,999);
120 gener->SetPhiRange(0,360);
121// gener->SetThetaRange(0.104,33.52);
122 gener->SetThetaRange(0.104,90.0);
123// gener->SetThetaRange(2.,9.);
124 gener->SetOrigin(0., 0.0 ,0); // vertex position
125 gener->SetSigma(0,0,5.3); // Sigma in (X,Y,Z) (cm) on IP position
126 gener->SetVertexSmear(kPerTrack);
127 gener->SetTrackingFlag(0);
128 break;
129 case hijing_g:
130 AliGenHijing *gener = new AliGenHijing(-1);
131
132 gener->SetEnergyCMS(5600.);
133 gener->SetReferenceFrame("CMS");
134 gener->SetProjectile("A", 208, 82);
135 gener->SetTarget ("A", 208, 82);
136 gener->SetImpactParameterRange(0, 5.);
137 gener->SetEvaluate(0);
138 gener->KeepFullEvent();
139 gener->SetJetQuenching(1);
140 gener->SetShadowing(1);
141 gener->SetDecaysOff(1);
142 gener->SetTrigger(0);
143 gener->SetSelectAll(1);
144 gener->SetMomentumRange(0,9999);
145 gener->SetPhiRange(-180,180);
146 gener->SetThetaRange(0.104,90.0);
147// gener->SetFlavor(4);
148
149
150 gener->SetOrigin(0., 0.0 ,0);
151 gener->SetSigma(0,0,5.3);
152 gener->SetVertexSmear(kPerEvent);
153 gener->SetTrackingFlag(0);
154
155 break;
156
157 case pythia:
158//********************************************
159// Example for Charm Production with Pythia *
160//********************************************
161AliGenPythia *gener = new AliGenPythia(ntracks);
162 gener->SetMomentumRange(0,999);
163 gener->SetPhiRange(0,360);
164 gener->SetThetaRange(0., 180.);
165 gener->SetYRange(-10,10);
166 gener->SetPtRange(0,100);
167 //gener->SetOrigin(0,0,0); // vertex position
168 //gener->SetVertexSmear(kPerEvent);
169 //gener->SetSigma(0,0,5.6); // Sigma in (X,Y,Z) (cm) on IP
170position
171 gener->SetStrucFunc(DO_Set_1);
172 gener->SetProcess(charm);
173 gener->SetEnergyCMS(5500.);
174 break;
175/*
176 AliGenPythia *gener = new AliGenPythia(ntracks);
177 gener->SetMomentumRange(0,999);
178 gener->SetPhiRange(0,360);
179 gener->SetThetaRange(0., 180.);
180 gener->SetYRange(-10,10);
181 gener->SetPtRange(0,100);
182 gener->SetOrigin(0,0,0); // vertex position
183 gener->SetVertexSmear(kPerEvent);
184 gener->SetSigma(0,0,5.6); // Sigma in (X,Y,Z) (cm) on IP position
185 gener->SetStrucFunc(DO_Set_1);
186 gener->SetProcess(charm);
187 gener->SetForceDecay(dimuon);
188 gener->SetEnergyCMS(5500.);
189 gener->SetTrackingFlag(0);
190
191 break;
192 */
193 case param:
194//*******************************************************
195// Example for J/psi Production from Parameterisation *
196//*******************************************************
197 AliGenParam *gener =
198 new AliGenParam(ntracks,upsilon_p,
199 AliGenMUONlib::GetPt(upsilon_p),
200 AliGenMUONlib::GetY(upsilon_p),
201 AliGenMUONlib::GetIp(upsilon_p));
202 gener->SetMomentumRange(0,999);
203 gener->SetPhiRange(-180, 180);
204 gener->SetYRange(2.5,4);
205 gener->SetCutOnChild(1);
206 gener->SetChildThetaRange(2,9);
207 gener->SetOrigin(0,0,0); //vertex position
208 gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
209 gener->SetForceDecay(dimuon);
210 gener->SetTrackingFlag(0);
211
212 break;
213
214 case fluka:
215//*******************************************************
216// Example for a FLUKA Boundary Source *
217//*******************************************************
218 AliGenFLUKAsource *gener = new AliGenFLUKAsource(-1);
219 gener->AddFile("$(ALICE_ROOT)/data/alice.root");
220 rootfile->cd();
221 gener->SetPartFlag(7);
222 gener->SetMomentumRange(0,999);
223 gener->SetPhiRange(0,360);
224 gener->SetThetaRange(0., 180.);
225 gener->SetAgeMax(1.e-5);
226
227// 31.7 events
228 gener->SetFraction(1.);
229 break;
230
231 case ntuple:
232//*******************************************************
233// Example for reading from a external file *
234//*******************************************************
235 AliGenExtFileCH *gener = new AliGenExtFileCH(-1);
236 gener->SetFileName("$(ALICE_ROOT)/data/pbpb.root");
237 gener->SetThetaRange(0.104,90.);
238 gener->SetOrigin(0,0,0); //vertex position
239 gener->SetSigma(0,0,5.6); //Sigma in (X,Y,Z) (cm) on IP position
240 gener->SetVertexSmear(kPerTrack);
241 gener->SetTrackingFlag(1);
242 break;
243
244 case halo:
245//*******************************************************
246// Example for Tunnel Halo Source *
247//*******************************************************
248 AliGenHalo *gener = new AliGenHalo(ntracks);
249 gener->SetFileName("/h1/morsch/marsip/marsip5.mu");
250 break;
251
252 case cocktail:
253//*******************************************************
254// Example for a Cocktail *
255//*******************************************************
256 AliGenCocktail *gener = new AliGenCocktail();
257 gener->SetMomentumRange(0,10);
258 gener->SetPhiRange(0,360);
259 gener->SetThetaRange(2.,9.);
260 gener->SetTrackingFlag(0);
261 AliGenParam *Pi0 = new AliGenParam(100, new AliGenPMDlib(), Pion);
262 AliGenParam *Eta = new AliGenParam( 10, new AliGenPMDlib(), Eta);
263 gener->AddGenerator(Pi0, "neutral pions" , 1.);
264 gener->AddGenerator(Eta, "neutral etas" , 1.);
265 break;
266 }
267
268
269gener->Init();
de7e3024 270gAlice->SetField(0,1); //Specify maximum magnetic field in Tesla (neg. ==> default field)
f5e13b7c 271
272Int_t iFRAME =0;
273Int_t iMAG =0;
274Int_t iITS =0;
275Int_t iABSO =0;
276Int_t iDIPO =0;
277Int_t iHALL =0;
278Int_t iSHIL =0;
279Int_t iPIPE =0;
280Int_t iFMD =0;
281Int_t iMUON =1;
282
283//=================== Alice BODY parameters =============================
284AliBODY *BODY = new AliBODY("BODY","Alice envelop");
285
286if(iFRAME) {
287//=================== FRAME parameters ============================
288AliFRAME *FRAME = new AliFRAMEv0("FRAME","Space Frame");
289}
290
291if(iMAG) {
292//=================== MAG parameters ============================
293// --- Start with Magnet since detector layouts may be depending ---
294// --- on the selected Magnet dimensions ---
295AliMAG *MAG = new AliMAG("MAG","Magnet");
296}
297
298if(iABSO) {
299//=================== ABSO parameters ============================
300 AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber");
301}
302
303if(iDIPO) {
304//=================== DIPO parameters ============================
305
306 AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
307}
308
309if(iHALL) {
310//=================== HALL parameters ============================
311 AliHALL *HALL = new AliHALL("HALL","Alice Hall");
312}
313
314
315
316if(iSHIL) {
317//=================== SHIL parameters ============================
318// AliSHIL *SHIL = new AliSAROV("SHIL","Shielding");
319 AliSHILv0 *SHIL = new AliSHILv0("SHIL","Shielding");
320 SHIL->SetPbCone(1);
321// AliSAROV *SHIL = new AliSAROV("SHIL","Shielding");
322}
323
324
325if(iPIPE) {
326//=================== PIPE parameters ============================
327 AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
328}
329
330
331if(iFMD) {
332//=================== FMD parameters ============================
333 AliFMD *FMD = new AliFMDv1("FMD","normal FMD");
334}
335
336if(iMUON) {
337//=================== MUON parameters ===========================
338
339AliMUON *MUON = new AliMUONv1("MUON","normal MUON");
340 MUON->SetIshunt(1);
341 MUON->SetMaxStepGas(0.1);
342 MUON->SetMaxStepAlu(0.1);
343//
344// Version 0
345//
346// First define the number of planes that are segmented (1 or 2) by a call
347// to SetNsec.
348// Then chose for each chamber (chamber plane) the segmentation
349// and response model.
350// They should be equal for the two chambers of each station. In a future
351// version this will be enforced.
352//
353//
354 Int_t chamber;
355 Int_t station;
356// Default response
357 AliMUONResponseV0* response0 = new AliMUONResponseV0;
d5bfadcc 358 response0->SetSqrtKx3AndDeriveKx2Kx4(0.7131);
359 response0->SetSqrtKy3AndDeriveKy2Ky4(0.7642);
f5e13b7c 360 response0->SetPitch(0.25);
361 response0->SetSigmaIntegration(10.);
362 response0->SetChargeSlope(50);
363 response0->SetChargeSpread(0.18, 0.18);
364 response0->SetMaxAdc(4096);
365 response0->SetZeroSuppression(6);
366//--------------------------------------------------------
367// Configuration for Chamber TC1/2 (Station 1) ----------
368//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
369 Float_t rseg1[4]={17.5, 55.2, 71.3, 95.5};
370 Int_t nseg1[4]={4, 4, 2, 1};
371//
372 chamber=1;
373//^^^^^^^^^
374 MUON->SetNsec(chamber-1,2);
375//
376 AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01;
377
378 seg11->SetSegRadii(rseg1);
379 seg11->SetPadSize(3, 0.5);
380 seg11->SetDAnod(3.0/3./4);
381 seg11->SetPadDivision(nseg1);
382
383 MUON->SetSegmentationModel(chamber-1, 1, seg11);
384//
385 AliMUONSegmentationV02 *seg12=new AliMUONSegmentationV02;
386 seg12->SetSegRadii(rseg1);
387 seg12->SetPadSize(0.75, 2.0);
388 seg12->SetDAnod(3.0/3./4);
389 seg12->SetPadDivision(nseg1);
390
391 MUON->SetSegmentationModel(chamber-1, 2, seg12);
392
393 MUON->SetResponseModel(chamber-1, response0);
394
395 chamber=2;
396//^^^^^^^^^
397//
398 MUON->SetNsec(chamber-1,2);
399//
400 AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01;
401 seg21->SetSegRadii(rseg1);
402 seg21->SetPadSize(3, 0.5);
403 seg21->SetDAnod(3.0/3./4);
404 seg21->SetPadDivision(nseg1);
405 MUON->SetSegmentationModel(chamber-1, 1, seg21);
406//
407 AliMUONSegmentationV02 *seg22=new AliMUONSegmentationV02;
408 seg22->SetSegRadii(rseg1);
409 seg22->SetPadSize(0.75, 2.);
410 seg22->SetDAnod(3.0/3./4);
411 seg22->SetPadDivision(nseg1);
412 MUON->SetSegmentationModel(chamber-1, 2, seg22);
413
414 MUON->SetResponseModel(chamber-1, response0);
415//
416//--------------------------------------------------------
de7e3024 417// Configuration for Chamber TC3/4 (Station 2) -----------
418///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
f5e13b7c 419// Float_t rseg2[4]={23.5, 87.7, 122.4, 122.5};
420 Float_t rseg2[4]={23.5, 47.1, 87.7, 122.5};
421 Int_t nseg2[4]={4, 4, 2, 1};
422//
423 chamber=3;
424//^^^^^^^^^
425 MUON->SetNsec(chamber-1,2);
426//
427 AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01;
428 seg31->SetSegRadii(rseg2);
429 seg31->SetPadSize(6, 0.5);
430 seg31->SetDAnod(3.0/3./4);
431 seg31->SetPadDivision(nseg2);
432 MUON->SetSegmentationModel(chamber-1, 1, seg31);
433//
434 AliMUONSegmentationV02 *seg32=new AliMUONSegmentationV02;
435 seg32->SetSegRadii(rseg2);
436 seg32->SetPadSize(0.75, 4.);
437 seg32->SetPadDivision(nseg2);
438 seg32->SetDAnod(3.0/3./4);
439
440 MUON->SetSegmentationModel(chamber-1, 2, seg32);
441
442 MUON->SetResponseModel(chamber-1, response0);
443
444 chamber=4;
445//^^^^^^^^^
446//
447 MUON->SetNsec(chamber-1,2);
448//
449 AliMUONSegmentationV01 *seg41=new AliMUONSegmentationV01;
450 seg41->SetSegRadii(rseg2);
451 seg41->SetPadSize(6, 0.5);
452 seg41->SetDAnod(3.0/3./4);
453 seg41->SetPadDivision(nseg2);
454 MUON->SetSegmentationModel(chamber-1, 1, seg41);
455//
456 AliMUONSegmentationV02 *seg42=new AliMUONSegmentationV02;
457 seg42->SetSegRadii(rseg2);
458 seg42->SetPadSize(0.75, 4.);
459 seg42->SetPadDivision(nseg2);
460 seg42->SetDAnod(3.0/3./4);
461
462 MUON->SetSegmentationModel(chamber-1, 2, seg42);
463
464 MUON->SetResponseModel(chamber-1, response0);
465
466
467//--------------------------------------------------------
de7e3024 468// Configuration for Chamber TC5/6 (Station 3) ----------
f5e13b7c 469//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
f9f7c205 470 Int_t nseg3[4]={4, 4, 2, 1};
de7e3024 471/*
472 Int_t npcb5[32] = {0,0,2,0,
473 0,1,2,0,
f9f7c205 474 0,2,1,1,
475 0,2,1,0,
476 0,2,1,0,
477 0,2,1,1,
de7e3024 478 0,1,2,0,
479 0,0,2,0};
480 */
481 Int_t npcb5[32] = {0,0,1,1,
482 0,1,1,1,
483 0,2,1,1,
484 0,1,1,1,
485 0,1,1,1,
486 0,2,1,1,
487 0,1,1,1,
488 0,0,1,1};
489
f9f7c205 490 Float_t shift = 1.5/2.;
de7e3024 491 Float_t xpos5[8] = {2., 2., 2., 42., 42., 2., 2., 2.};
f9f7c205 492 Float_t ypos5 = -(4.*(40.-2.*shift)+shift);
f5e13b7c 493
494 chamber=5;
f9f7c205 495 MUON->SetNsec(chamber-1,2);
496 AliMUONSegmentationSlat *seg51=new AliMUONSegmentationSlat;
497 seg51->SetNSlats(8);
498 seg51->SetShift(shift);
499 seg51->SetNPCBperSector(npcb5);
500 seg51->SetSlatXPositions(xpos5);
501 seg51->SetSlatYPosition(ypos5);
502 seg51->SetPadSize(10.,0.5);
503 seg51->SetDAnod(0.25);
504 seg51->SetPadDivision(nseg3);
505 MUON->SetSegmentationModel(chamber-1, 1, seg51);
506
507 AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN;
508 seg52->SetNSlats(8);
509 seg52->SetShift(shift);
510 seg52->SetNPCBperSector(npcb5);
511 seg52->SetSlatXPositions(xpos5);
512 seg52->SetSlatYPosition(ypos5);
3f853d10 513 seg52->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
f9f7c205 514 seg52->SetDAnod(0.25);
515 seg52->SetPadDivision(nseg3);
516 MUON->SetSegmentationModel(chamber-1, 2, seg52);
517 MUON->SetResponseModel(chamber-1, response0);
f5e13b7c 518
519 chamber=6;
f9f7c205 520 MUON->SetNsec(chamber-1,2);
521 AliMUONSegmentationSlat *seg61=new AliMUONSegmentationSlat;
522 seg61->SetNSlats(8);
523 seg61->SetShift(shift);
524 seg61->SetNPCBperSector(npcb5);
525 seg61->SetSlatXPositions(xpos5);
526 seg61->SetSlatYPosition(ypos5);
527 seg61->SetPadSize(10.,0.5);
528 seg61->SetDAnod(0.25);
529 seg61->SetPadDivision(nseg3);
530 MUON->SetSegmentationModel(chamber-1, 1, seg61);
531
532 AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN;
533 seg62->SetNSlats(8);
534 seg62->SetShift(shift);
535 seg62->SetNPCBperSector(npcb5);
536 seg62->SetSlatXPositions(xpos5);
537 seg62->SetSlatYPosition(ypos5);
3f853d10 538 seg62->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
f9f7c205 539 seg62->SetDAnod(0.25);
540 seg62->SetPadDivision(nseg3);
541 MUON->SetSegmentationModel(chamber-1, 2, seg62);
542 MUON->SetResponseModel(chamber-1, response0);
f5e13b7c 543
544//--------------------------------------------------------
545// Configuration for Chamber TC7/8 (Station 4) ----------
546//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
547
548 Int_t nseg4[4]={4, 4, 2, 1};
549
550 chamber=7;
551//^^^^^^^^^
552
553 MUON->SetNsec(chamber-1,2);
554//
555 AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat;
f9f7c205 556 Int_t npcb7[44] = {0,0,0,2,
557 0,0,0,3,
558 0,0,2,2,
559 0,1,2,2,
560 0,2,1,2,
561 0,2,1,1,
562 0,2,1,2,
563 0,1,2,2,
564 0,0,2,2,
565 0,0,0,3,
566 0,0,0,2};
f9f7c205 567 Float_t xpos7[11] = {2., 2., 2., 2., 2., 39.5, 2., 2., 2., 2., 2.};
568 Float_t ypos7 = -(20.+5.*(40.-2.*shift));
f5e13b7c 569
f9f7c205 570 seg71->SetNSlats(11);
f5e13b7c 571 seg71->SetShift(shift);
572 seg71->SetNPCBperSector(npcb7);
f9f7c205 573 seg71->SetSlatXPositions(xpos7);
574 seg71->SetSlatYPosition(ypos7);
575
f5e13b7c 576 seg71->SetPadSize(10.,0.5);
577 seg71->SetDAnod(0.25);
578 seg71->SetPadDivision(nseg4);
579 MUON->SetSegmentationModel(chamber-1, 1, seg71);
580
581 AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN;
582
583 MUON->SetSegmentationModel(chamber-1, 2, seg72);
f9f7c205 584 seg72->SetNSlats(11);
585 seg72->SetShift(shift);
f5e13b7c 586 seg72->SetNPCBperSector(npcb7);
f9f7c205 587 seg72->SetSlatXPositions(xpos7);
588 seg72->SetSlatYPosition(ypos7);
3f853d10 589 seg72->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
f5e13b7c 590 seg72->SetDAnod(0.25);
591 seg72->SetPadDivision(nseg4);
592
593 MUON->SetResponseModel(chamber-1, response0);
594
595 chamber=8;
596//^^^^^^^^^
597 MUON->SetNsec(chamber-1,2);
598//
599 AliMUONSegmentationSlat *seg81=new AliMUONSegmentationSlat;
600
f9f7c205 601 seg81->SetNSlats(11);
f5e13b7c 602 seg81->SetShift(shift);
603 seg81->SetNPCBperSector(npcb7);
f9f7c205 604 seg81->SetSlatXPositions(xpos7);
605 seg81->SetSlatYPosition(ypos7);
f5e13b7c 606 seg81->SetPadSize(10.,0.5);
607 seg81->SetDAnod(0.25);
608 seg81->SetPadDivision(nseg4);
609 MUON->SetSegmentationModel(chamber-1, 1, seg81);
610
611 AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN;
612
613 MUON->SetSegmentationModel(chamber-1, 2, seg82);
f9f7c205 614 seg82->SetNSlats(11);
f5e13b7c 615 seg82->SetShift(shift);
616 seg82->SetNPCBperSector(npcb7);
f9f7c205 617 seg82->SetSlatXPositions(xpos7);
618 seg82->SetSlatYPosition(ypos7);
3f853d10 619 seg82->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
f5e13b7c 620 seg82->SetDAnod(0.25);
621 seg82->SetPadDivision(nseg4);
622
623 MUON->SetResponseModel(chamber-1, response0);
624
625
626//--------------------------------------------------------
627// Configuration for Chamber TC9/10 (Station 5) ---------
628//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
629 chamber=9;
630//^^^^^^^^^
f9f7c205 631
f5e13b7c 632 MUON->SetNsec(chamber-1,2);
633//
f9f7c205 634 AliMUONSegmentationSlat *seg91=new AliMUONSegmentationSlat;
635 Int_t npcb9[52] = {0,0,0,2,
636 0,0,0,4,
637 0,0,2,3,
638 0,0,3,3,
639 0,2,2,2,
640 0,3,2,2,
641 0,3,2,2,
642 0,3,2,2,
643 0,2,2,2,
644 0,0,3,3,
645 0,0,2,3,
646 0,0,0,4,
647 0,0,0,2 };
648
c0298ce5 649 Float_t xpos9[13] = {2., 2., 2., 2., 2., 2., 39.5 , 2., 2., 2., 2., 2., 2.};
f9f7c205 650
651 Float_t ypos9 = -(20.+6.*(40.-2.*shift));
652
653 seg91->SetNSlats(13);
654 seg91->SetShift(shift);
655 seg91->SetNPCBperSector(npcb9);
656 seg91->SetSlatXPositions(xpos9);
657 seg91->SetSlatYPosition(ypos9);
f5e13b7c 658 seg91->SetPadSize(10.,0.5);
659 seg91->SetDAnod(0.25);
660 seg91->SetPadDivision(nseg4);
661 MUON->SetSegmentationModel(chamber-1, 1, seg91);
662
f9f7c205 663 AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN;
f5e13b7c 664
665 MUON->SetSegmentationModel(chamber-1, 2, seg92);
f9f7c205 666 seg92->SetNSlats(13);
667 seg92->SetShift(shift);
668 seg92->SetNPCBperSector(npcb9);
669 seg92->SetSlatXPositions(xpos9);
670 seg92->SetSlatYPosition(ypos9);
3f853d10 671 seg92->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
f9f7c205 672 seg92->SetDAnod(0.25);
673 seg92->SetPadDivision(nseg4);
f5e13b7c 674
675 MUON->SetResponseModel(chamber-1, response0);
676
677 chamber=10;
678//^^^^^^^^^
679 MUON->SetNsec(chamber-1,2);
f9f7c205 680//
681 AliMUONSegmentationSlat *seg101=new AliMUONSegmentationSlat;
682
683 seg101->SetNSlats(13);
684 seg101->SetShift(shift);
685 seg101->SetNPCBperSector(npcb9);
686 seg101->SetSlatXPositions(xpos9);
687 seg101->SetSlatYPosition(ypos9);
688 seg101->SetPadSize(10.,0.5);
f5e13b7c 689 seg101->SetDAnod(0.25);
f9f7c205 690 seg101->SetPadDivision(nseg4);
f5e13b7c 691 MUON->SetSegmentationModel(chamber-1, 1, seg101);
692
f9f7c205 693 AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN;
694
f5e13b7c 695 MUON->SetSegmentationModel(chamber-1, 2, seg102);
f9f7c205 696 seg102->SetNSlats(13);
697 seg102->SetShift(shift);
698 seg102->SetNPCBperSector(npcb9);
699 seg102->SetSlatXPositions(xpos9);
700 seg102->SetSlatYPosition(ypos9);
3f853d10 701 seg102->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
f9f7c205 702 seg102->SetDAnod(0.25);
703 seg102->SetPadDivision(nseg4);
f5e13b7c 704
705 MUON->SetResponseModel(chamber-1, response0);
706
707//--------------------------------------------------------
de7e3024 708// Configuration for Trigger Stations --------------------
f5e13b7c 709//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9e8ff550 710// Cluster-size off
f5e13b7c 711 AliMUONResponseTrigger* responseTrigger0 = new AliMUONResponseTrigger;
9e8ff550 712// Cluster-size on
713// AliMUONResponseTriggerV1* responseTrigger0 = new AliMUONResponseTriggerV1;
f5e13b7c 714
715 chamber=11;
716 MUON->SetNsec(chamber-1,2);
717 AliMUONSegmentationTriggerX *seg111=new AliMUONSegmentationTriggerX;
718 MUON->SetSegmentationModel(chamber-1, 1, seg111);
719 AliMUONSegmentationTriggerY *seg112=new AliMUONSegmentationTriggerY;
720 MUON->SetSegmentationModel(chamber-1, 2, seg112);
721
722 MUON->SetResponseModel(chamber-1, responseTrigger0);
723
724
725 chamber=12;
726 MUON->SetNsec(chamber-1,2);
727 AliMUONSegmentationTriggerX *seg121=new AliMUONSegmentationTriggerX;
728 MUON->SetSegmentationModel(chamber-1, 1, seg121);
729 AliMUONSegmentationTriggerY *seg122=new AliMUONSegmentationTriggerY;
730 MUON->SetSegmentationModel(chamber-1, 2, seg122);
731
732 MUON->SetResponseModel(chamber-1, responseTrigger0);
733 printf("\n %p %p \n", seg121, seg122);
734 chamber=13;
735 MUON->SetNsec(chamber-1,2);
736 AliMUONSegmentationTriggerX *seg131=new AliMUONSegmentationTriggerX;
737 MUON->SetSegmentationModel(chamber-1, 1, seg131);
738 AliMUONSegmentationTriggerY *seg132=new AliMUONSegmentationTriggerY;
739 MUON->SetSegmentationModel(chamber-1, 2, seg132);
740 MUON->SetResponseModel(chamber-1, responseTrigger0);
741
742 chamber=14;
743 MUON->SetNsec(chamber-1,2);
744 AliMUONSegmentationTriggerX *seg141=new AliMUONSegmentationTriggerX;
745 MUON->SetSegmentationModel(chamber-1, 1, seg141);
746 AliMUONSegmentationTriggerY *seg142=new AliMUONSegmentationTriggerY;
747 MUON->SetSegmentationModel(chamber-1, 2, seg142);
748
749 MUON->SetResponseModel(chamber-1, responseTrigger0);
750
751}
752
753}
754
755
756
757
758