Moving to the new VMC naming convention
[u/mrichter/AliRoot.git] / VZERO / AliVZEROv0.cxx
CommitLineData
47890cd3 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
88cb7938 16/* $Id$ */
47890cd3 17
47890cd3 18//////////////////////////////////////////////////////////////////////
19// //
20// (V-zero) detector version 0 as designed by the Lyon group //
21// All comments should be sent to Brigitte CHEYNIS : //
22// b.cheynis@ipnl.in2p3.fr //
61874e87 23// Geometrie du 25/02/2002 //
47890cd3 24// //
25//////////////////////////////////////////////////////////////////////
26
88cb7938 27#include <stdlib.h>
28#include <string.h>
29#include <Riostream.h>
30
47890cd3 31#include <TBRIK.h>
32#include <TBox.h>
88cb7938 33#include <TCONE.h>
47890cd3 34#include <TClonesArray.h>
88cb7938 35#include <TGeometry.h>
47890cd3 36#include <TH1.h>
88cb7938 37#include <TLorentzVector.h>
38#include <TMath.h>
39#include <TNode.h>
40#include <TObjectTable.h>
41#include <TPCON.h>
42#include <TPGON.h>
43#include <TSPHE.h>
44#include <TShape.h>
45#include <TTRAP.h>
46#include <TTRD2.h>
47#include <TVirtualMC.h>
47890cd3 48
88cb7938 49#include "ABSOConst.h"
50#include "ABSOSHILConst.h"
61874e87 51#include "AliMagF.h"
88cb7938 52#include "AliRun.h"
47890cd3 53#include "AliVZEROdigit.h"
88cb7938 54#include "AliVZEROhit.h"
55#include "AliVZEROv0.h"
47890cd3 56
57ClassImp(AliVZEROv0)
58
59//--------------------------------------------------------------------
60AliVZEROv0:: AliVZEROv0():AliVZERO()
61{
61874e87 62
63
47890cd3 64}
65//--------------------------------------------------------------------
66AliVZEROv0::AliVZEROv0(const char *name, const char *title):
67 AliVZERO(name,title)
68{
69
70// Standard constructor for V-zeroR Detector (right part) version 0
71
72
73 Int_t i;
74
75 printf("\n");
61874e87 76 for(i=0;i<30;i++) printf("*");
77 printf(" Create VZERO object ");
78 for(i=0;i<30;i++) printf("*");
47890cd3 79 printf("\n");
80
81}
61874e87 82
47890cd3 83//-------------------------------------------------------------------------
84void AliVZEROv0::CreateGeometry()
85{
86
61874e87 87// Creates the Geant geometry of the V-zero Detector version 0
47890cd3 88
89
90 Int_t i;
91
92 printf("\n");
61874e87 93 for(i=0;i<30;i++) printf("*");
94 printf(" Create VZERO Geometry ");
95 for(i=0;i<30;i++) printf("*");
47890cd3 96 printf("\n");
97
98
99 Int_t *idtmed = fIdtmed->GetArray()-2999;
100
61874e87 101 Int_t n_detec_R = 1;
102 Int_t n_detec_L = 1;
103
104 Int_t n_cells_R = 1;
105 Int_t n_cells_L = 1;
106
47890cd3 107 Int_t idrotm[999];
108
109 Float_t height1, height2, height3, height4, height5;
110 Float_t height;
111 Float_t theta;
112 Float_t half_thick_alu;
113 Float_t half_thick_qua1,half_thick_qua2,half_thick_qua3;
114 Float_t half_thick_qua4,half_thick_qua5;
115 Float_t zdet;
116 Float_t r0, r5;
117 Float_t pi = TMath::Pi();
118 Float_t thick_alu;
119
61874e87 120 height1 = 2.0; // height of cell 1, in cm
121 height2 = 3.2; // height of cell 2, in cm
122 height3 = 4.9; // height of cell 3, in cm
123 height4 = 7.5; // height of cell 4, in cm
124 height5 = 12.0; // height of cell 5, in cm
47890cd3 125
61874e87 126 theta = pi/6.0/2.0; // half angular opening = 15 degrees
47890cd3 127 half_thick_alu = 0.0025; // half thickness of aluminum foil, in cm
128 thick_alu = 2.0 * half_thick_alu;
61874e87 129 fThickness1 = 2.5;
47890cd3 130 half_thick_qua1 = fThickness1/2.0; // half thickness of WRAPPED quartz cell (inner ring)
131 half_thick_qua2 = half_thick_qua1 - 0.25;
132 half_thick_qua3 = half_thick_qua2 - 0.25;
133 half_thick_qua4 = half_thick_qua3 - 0.25;
134 half_thick_qua5 = half_thick_qua4 - 0.25;
135
136 zdet = 86.9 +fThickness/2.0; // distance to vertex (along Z axis)
61874e87 137 r0 = 4.0; // closest distance to center of the beam pipe
47890cd3 138 height = height1 + height2 + height3 + height4 + height5;
139 r5 = r0 + height;
140
61874e87 141//............................................................................
142
143// Here I add the flange which is sitting on beam line
144// right in front of V0R detector, and which I found on CERN drawing
145// entitled : ALICE BEAM VACCUM CHAMBER - RB26 version III :
146
147// Float_t pflange[3];
148//
149// pflange[0] = 3.0;
150// pflange[1] = 5.675;
151// pflange[2] = 0.9;
152//
153// gMC->Gsvolu("QFA0","TUBE", idtmed[3003], pflange, 3);
a35deab8 154// gMC->Gspos("QFA0", 1 ,"ALIC", 0.0, 0.0, 85.0+0.9, 0, "ONLY");
61874e87 155
156//............................................................................
157
47890cd3 158
61874e87 159// Creation of mother volume V0LE - left part - :
160// Face entree a -350.0 cm ...
161
162 Float_t partube[3];
163
164 partube[0] = 4.3;
165 partube[1] = 45.0;
166 partube[2] = fThickness1/2.0;
167
168 gMC->Gsvolu("V0LE","TUBE",idtmed[3002],partube,3);
169
170
171// Creation of five rings - left part - :
172// Face entree a -350.0 cm ...
173
174// Mother volume V0L0 in which will be set 5 quartz cells
175
176
177 Float_t par[11];
178
179 Float_t dist0_left;
180 Float_t r0_left = 4.3;
181 Float_t height1_left = 2.6;
182 Float_t height2_left = 4.1;
183 Float_t height3_left = 6.4;
184 Float_t height4_left = 10.2;
185 Float_t height5_left = 16.9;
186 Float_t height_left = height1_left + height2_left + height3_left
187 + height4_left + height5_left;
188 Float_t r5_left = r0_left + height_left;
189
190
191 dist0_left = r0_left + height_left / 2.0;
192 thick_alu = 2.0*half_thick_alu;
193
194 par[0] = half_thick_qua1;
195 par[1] = 0.0;
196 par[2] = 0.0;
197 par[3] = height_left / 2.0 ;
198 par[4] = TMath::Tan(theta) * r0_left;
199 par[5] = TMath::Tan(theta) * r5_left;
200 par[6] = 0.0;
201 par[7] = height_left / 2.0 ;
202 par[8] = TMath::Tan(theta) * r0_left;
203 par[9] = TMath::Tan(theta) * r5_left;
204 par[10] = 0.0;
205
206
207 gMC->Gsvolu("V0L0","TRAP",idtmed[3010],par,11); // air volume
208
209 Float_t dist1_left;
210 Float_t r1_left;
211 Float_t offset_left;
212
213 dist1_left = (- height_left + height1_left) /2.0;
214 r1_left = r0_left + height1_left;
215 offset_left = - fThickness1/2.0 + 0.1;
216
217 par[0] = half_thick_qua1 - thick_alu;
218 par[3] = height1_left / 2.0 - thick_alu;
219 par[4] = TMath::Tan(theta) * r0_left - thick_alu;
220 par[5] = TMath::Tan(theta) * r1_left- thick_alu;
221 par[7] = height1_left / 2.0 - thick_alu;
222 par[8] = TMath::Tan(theta) * r0_left - thick_alu;
223 par[9] = TMath::Tan(theta) * r1_left - thick_alu;
224
225
226 gMC->Gsvolu("V0L1","TRAP",idtmed[3002],par,11); // quartz volume
227 gMC->Gspos("V0L1",1,"V0L0", 0.0, dist1_left , 0.0, 0,"ONLY");
228
229 Float_t dist2_left;
230 Float_t r2_left;
231
232 dist2_left = (- height_left + height2_left) /2.0 + height1_left;
233 r2_left = r1_left + height2_left;
234
235 par[0] = half_thick_qua1 - thick_alu;
236 par[3] = height2_left / 2.0 - thick_alu;
237 par[4] = TMath::Tan(theta) * r1_left - thick_alu;
238 par[5] = TMath::Tan(theta) * r2_left - thick_alu;
239 par[7] = height2_left / 2.0 - thick_alu;
240 par[8] = TMath::Tan(theta) * r1_left - thick_alu;
241 par[9] = TMath::Tan(theta) * r2_left - thick_alu;
242
243 gMC->Gsvolu("V0L2","TRAP",idtmed[3002],par,11); // quartz volume
244 gMC->Gspos("V0L2",1,"V0L0", 0.0, dist2_left , 0.0, 0,"ONLY");
245
246
247 Float_t dist3_left;
248 Float_t r3_left;
249
250 dist3_left = (- height_left + height3_left) /2.0 + height1_left + height2_left;
251 r3_left = r2_left + height3_left;
252
253 par[0] = half_thick_qua1 - thick_alu;
254 par[3] = height3_left / 2.0 - thick_alu;
255 par[4] = TMath::Tan(theta) * r2_left - thick_alu;
256 par[5] = TMath::Tan(theta) * r3_left - thick_alu;
257 par[7] = height3_left / 2.0 - thick_alu;
258 par[8] = TMath::Tan(theta) * r2_left - thick_alu;
259 par[9] = TMath::Tan(theta) * r3_left - thick_alu;
260
261 gMC->Gsvolu("V0L3","TRAP",idtmed[3002],par,11); // quartz volume
262 gMC->Gspos("V0L3",1,"V0L0", 0.0, dist3_left , 0.0, 0,"ONLY");
263
264 Float_t dist4_left;
265 Float_t r4_left;
266
267 dist4_left = (- height_left + height4_left) /2.0 + height1_left
268 + height2_left + height3_left;
269 r4_left = r3_left + height4_left;
270
271 par[0] = half_thick_qua1 - thick_alu;
272 par[3] = height4_left / 2.0 - thick_alu;
273 par[4] = TMath::Tan(theta) * r3_left - thick_alu;
274 par[5] = TMath::Tan(theta) * r4_left - thick_alu;
275 par[7] = height4_left / 2.0 - thick_alu;
276 par[8] = TMath::Tan(theta) * r3_left - thick_alu;
277 par[9] = TMath::Tan(theta) * r4_left - thick_alu;
278
279 gMC->Gsvolu("V0L4","TRAP",idtmed[3002],par,11); // quartz volume
280 gMC->Gspos("V0L4",1,"V0L0", 0.0, dist4_left , 0.0, 0,"ONLY");
281
282
283 Float_t dist5_left;
284
285
286 dist5_left = (- height_left + height5_left) /2.0 + height1_left
287 + height2_left + height3_left + height4_left;
288
289
290 par[0] = half_thick_qua1 - thick_alu;
291 par[3] = height5_left / 2.0 - thick_alu;
292 par[4] = TMath::Tan(theta) * r4_left - thick_alu;
293 par[5] = TMath::Tan(theta) * r5_left - thick_alu;
294 par[7] = height5_left / 2.0 - thick_alu;
295 par[8] = TMath::Tan(theta) * r4_left - thick_alu;
296 par[9] = TMath::Tan(theta) * r5_left - thick_alu;
297
298 gMC->Gsvolu("V0L5","TRAP",idtmed[3002],par,11); // quartz volume
299 gMC->Gspos("V0L5",1,"V0L0", 0.0, dist5_left , 0.0, 0,"ONLY");
300
301
302//............................................................................
303
304// Creation of mother volume V0RI - right part - :
47890cd3 305
47890cd3 306
307 partube[0] = r0 - 0.2;
308 partube[1] = (r5 + 1.0) / TMath::Cos(theta);
309 partube[2] = fThickness/2.0;
310
311
312 gMC->Gsvolu("V0RI","TUBE",idtmed[3010],partube,3);
313
314// Creation of carbon lids (1 mm thick) to keep V0RI box shut...
315
316 Float_t parbox[10];
317
318 parbox[0] = 0.;
319 parbox[1] = 360.;
61874e87 320 parbox[2] = 12;
47890cd3 321 parbox[3] = 2;
322 parbox[4] = -0.1/2.0;
323 parbox[5] = r0;
324 parbox[6] = r5;
325 parbox[7] = +0.1/2.0;
326 parbox[8] = r0;
327 parbox[9] = r5;
328
329
330 gMC->Gsvolu("V0CA","PGON",idtmed[3001],parbox,10);
331 gMC->Gspos("V0CA",1,"V0RI",0.0,0.0, fThickness/2.0-parbox[7],0,"ONLY");
332 gMC->Gspos("V0CA",2,"V0RI",0.0,0.0,-fThickness/2.0+parbox[7],0,"ONLY");
333
334// Creation of aluminum rings to maintain the V0RI pieces ...
335
336 parbox[4] = -fThickness/2.0;
337 parbox[5] = r0 -0.2;
338 parbox[6] = r0;
339 parbox[7] = +fThickness/2.0;
340 parbox[8] = r0 -0.2;
341 parbox[9] = r0;
342
343 gMC->Gsvolu("V0IR","PGON",idtmed[3003],parbox,10);
344 gMC->Gspos("V0IR",1,"V0RI",0.0,0.0,0.0,0,"ONLY");
345
346 parbox[4] = -fThickness/2.0;
347 parbox[5] = r5;
348 parbox[6] = r5 + 1.0;
349 parbox[7] = +fThickness/2.0;
350 parbox[8] = r5;
351 parbox[9] = r5 + 1.0;
352
353 gMC->Gsvolu("V0ER","PGON",idtmed[3003],parbox,10);
354 gMC->Gspos("V0ER",1,"V0RI",0.0,0.0,0.0,0,"ONLY");
355
356// Mother volume V0R0 in which will be set 5 quartz cells
357// each one WRAPPED in reflecting aluminum :
358
61874e87 359 Float_t dist0;
47890cd3 360
361 dist0 = r0 + height / 2.0;
362 thick_alu = 2.0*half_thick_alu;
363
364 par[0] = half_thick_qua1;
365 par[1] = 0.0;
366 par[2] = 0.0;
367 par[3] = height / 2.0 ;
368 par[4] = TMath::Tan(theta) * r0;
369 par[5] = TMath::Tan(theta) * r5;
370 par[6] = 0.0;
371 par[7] = height / 2.0 ;
372 par[8] = TMath::Tan(theta) * r0;
373 par[9] = TMath::Tan(theta) * r5;
374 par[10] = 0.0;
375
376
377 gMC->Gsvolu("V0R0","TRAP",idtmed[3010],par,11); // air volume
378
379// Elementary cell of ring 1 :
380
381 Float_t dist1;
382 Float_t r1;
383 Float_t offset;
384
385 dist1 = (- height + height1) /2.0;
386 r1 = r0 + height1;
387 offset = - fThickness/2.0 + 0.1;
388
389 par[0] = half_thick_qua1 - thick_alu;
390 par[3] = height1 / 2.0 - thick_alu;
391 par[4] = TMath::Tan(theta) * r0 - thick_alu;
392 par[5] = TMath::Tan(theta) * r1- thick_alu;
393 par[7] = height1 / 2.0 - thick_alu;
394 par[8] = TMath::Tan(theta) * r0 - thick_alu;
395 par[9] = TMath::Tan(theta) * r1 - thick_alu;
396
397
398 gMC->Gsvolu("V0R1","TRAP",idtmed[3002],par,11); // quartz volume
399 gMC->Gspos("V0R1",1,"V0R0", 0.0, dist1 , 0.0, 0,"ONLY");
400
401 par[0] = half_thick_alu;
402
403 gMC->Gsvolu("V0A1","TRAP",idtmed[3004],par,11); // aluminum trap-shaped foil
404 gMC->Gspos("V0A1",1,"V0R1",0.0,0.0, - half_thick_qua1 + half_thick_alu,0,"ONLY");
405 gMC->Gspos("V0A1",2,"V0R1",0.0,0.0, + half_thick_qua1 - half_thick_alu,0,"ONLY");
406
407 parbox[0] = half_thick_alu;
408 parbox[1] = height1 / TMath::Cos(theta)/ 2.0;
409 parbox[2] = half_thick_qua1;
410
411 gMC->Gsvolu("V0A2","BOX",idtmed[3004],parbox,3); // aluminum rectangular foil
61874e87 412 Float_t theta_deg = 180./6./2.0;
47890cd3 413 Float_t h1;
414 h1 = TMath::Tan(theta) * (r0 + height1/2.0);
415 AliMatrix(idrotm[911],90.0,+theta_deg,90.0,90.+theta_deg,0.0,0.);
416 gMC->Gspos("V0A2",1,"V0R1",-h1 + half_thick_alu,0.0,0.0,idrotm[911],"ONLY");
417 AliMatrix(idrotm[912],90.0,-theta_deg,90.0,90.-theta_deg,0.0,0.);
418 gMC->Gspos("V0A2",2,"V0R1",+h1 - half_thick_alu,0.0,0.0,idrotm[912],"ONLY");
419
420 parbox[0] = TMath::Tan(theta) * r0;
421 parbox[1] = half_thick_alu;
422 parbox[2] = half_thick_qua1;
423 gMC->Gsvolu("V0A3","BOX",idtmed[3004],parbox,3);
424 gMC->Gspos("V0A3",1,"V0R1",0.0, - (height1/2.0) + half_thick_alu ,0.0,0,"ONLY");
425
426
427 parbox[0] = TMath::Tan(theta) * (r0 + height1);
428 parbox[1] = half_thick_alu;
429 parbox[2] = half_thick_qua1;
430 gMC->Gsvolu("V0A4","BOX",idtmed[3004],parbox,3);
431 gMC->Gspos("V0A4",1,"V0R1",0.0, (height1/2.0) - half_thick_alu,0.0,0,"ONLY");
432
433
434// Elementary cell of ring 2 :
435
436 Float_t dist2;
437 Float_t r2;
438
439 dist2 = (- height + height2) /2.0 + height1;
440 r2 = r1 + height2;
441
442 par[0] = half_thick_qua2 - thick_alu;
443 par[3] = height2 / 2.0 - thick_alu;
444 par[4] = TMath::Tan(theta) * r1 - thick_alu;
445 par[5] = TMath::Tan(theta) * r2 - thick_alu;
446 par[7] = height2 / 2.0 - thick_alu;
447 par[8] = TMath::Tan(theta) * r1 - thick_alu;
448 par[9] = TMath::Tan(theta) * r2 - thick_alu;
449
450 gMC->Gsvolu("V0R2","TRAP",idtmed[3002],par,11); // quartz volume
451 gMC->Gspos("V0R2",1,"V0R0", 0.0, dist2 , - half_thick_qua1 + half_thick_qua2, 0,"ONLY");
452
453 par[0] = half_thick_alu;
454
455 gMC->Gsvolu("V0B1","TRAP",idtmed[3004],par,11); // aluminum trap-shaped foil
456 gMC->Gspos("V0B1",1,"V0R2",0.0,0.0, - half_thick_qua2 + half_thick_alu,0,"ONLY");
457 gMC->Gspos("V0B1",2,"V0R2",0.0,0.0, + half_thick_qua2 - half_thick_alu,0,"ONLY");
458
459 parbox[0] = half_thick_alu;
460 parbox[1] = height2 / TMath::Cos(theta)/ 2.0;
461 parbox[2] = half_thick_qua2;
462
463 gMC->Gsvolu("V0B2","BOX",idtmed[3004],parbox,3); // aluminum rectangular foil
464 Float_t h2;
465 h2 = TMath::Tan(theta) * (r0 + height1 + height2/2.0);
466 gMC->Gspos("V0B2",1,"V0R2",-h2 + half_thick_alu,0.0,0.0,idrotm[911],"ONLY");
467 gMC->Gspos("V0B2",2,"V0R2",+h2 - half_thick_alu,0.0,0.0,idrotm[912],"ONLY");
468
469 parbox[0] = TMath::Tan(theta) * (r0 + height1);
470 parbox[1] = half_thick_alu;
471 parbox[2] = half_thick_qua2;
472 gMC->Gsvolu("V0B3","BOX",idtmed[3004],parbox,3);
473 gMC->Gspos("V0B3",1,"V0R2",0.0, - (height2/2.0) + half_thick_alu ,0.0,0,"ONLY");
474
475
476 parbox[0] = TMath::Tan(theta) * (r0 + height1 + height2);
477 parbox[1] = half_thick_alu;
478 parbox[2] = half_thick_qua2;
479 gMC->Gsvolu("V0B4","BOX",idtmed[3004],parbox,3);
480 gMC->Gspos("V0B4",1,"V0R2",0.0, (height2/2.0) - half_thick_alu,0.0,0,"ONLY");
481
482
483// Elementary cell ring 3 :
484
485 Float_t dist3;
486 Float_t r3;
487
488 dist3 = (- height + height3) /2.0 + height1 + height2;
489 r3 = r2 + height3;
490
491 par[0] = half_thick_qua3 - thick_alu;
492 par[3] = height3 / 2.0 - thick_alu;
493 par[4] = TMath::Tan(theta) * r2 - thick_alu;
494 par[5] = TMath::Tan(theta) * r3 - thick_alu;
495 par[7] = height3 / 2.0 - thick_alu;
496 par[8] = TMath::Tan(theta) * r2 - thick_alu;
497 par[9] = TMath::Tan(theta) * r3 - thick_alu;
498
499 gMC->Gsvolu("V0R3","TRAP",idtmed[3002],par,11); // quartz volume
500 gMC->Gspos("V0R3",1,"V0R0", 0.0, dist3 , - half_thick_qua1 + half_thick_qua3, 0,"ONLY");
501
502
503 par[0] = half_thick_alu;
504
505 gMC->Gsvolu("V0C1","TRAP",idtmed[3004],par,11); // aluminum trap-shaped foil
506 gMC->Gspos("V0C1",1,"V0R3",0.0,0.0, - half_thick_qua3 + half_thick_alu,0,"ONLY");
507 gMC->Gspos("V0C1",2,"V0R3",0.0,0.0, + half_thick_qua3 - half_thick_alu,0,"ONLY");
508
509 parbox[0] = half_thick_alu;
510 parbox[1] = height3 / TMath::Cos(theta)/ 2.0;
511 parbox[2] = half_thick_qua3;
512
513 gMC->Gsvolu("V0C2","BOX",idtmed[3004],parbox,3); // aluminum rectangular foil
514 Float_t h3;
515 h3 = TMath::Tan(theta) * (r0 + height1 + height2 + height3/2.0);
516 gMC->Gspos("V0C2",1,"V0R3",-h3 + half_thick_alu,0.0,0.0,idrotm[911],"ONLY");
517 gMC->Gspos("V0C2",2,"V0R3",+h3 - half_thick_alu,0.0,0.0,idrotm[912],"ONLY");
518
519 parbox[0] = TMath::Tan(theta) * (r0 + height1 + height2);
520 parbox[1] = half_thick_alu;
521 parbox[2] = half_thick_qua3;
522 gMC->Gsvolu("V0C3","BOX",idtmed[3004],parbox,3);
523 gMC->Gspos("V0C3",1,"V0R3",0.0, - (height3/2.0) + half_thick_alu ,0.0,0,"ONLY");
524
525
526 parbox[0] = TMath::Tan(theta) * (r0 + height1 + height2 + height3);
527 parbox[1] = half_thick_alu;
528 parbox[2] = half_thick_qua3;
529 gMC->Gsvolu("V0C4","BOX",idtmed[3004],parbox,3);
530 gMC->Gspos("V0C4",1,"V0R3",0.0, (height3/2.0) - half_thick_alu,0.0,0,"ONLY");
531
532
533// Elementary cell ring 4 :
534
535 Float_t dist4;
536 Float_t r4;
537
538 dist4 = (- height + height4) /2.0 + height1 + height2 + height3;
539 r4 = r3 + height4;
540
541 par[0] = half_thick_qua4 - thick_alu;
542 par[3] = height4 / 2.0 - thick_alu;
543 par[4] = TMath::Tan(theta) * r3 - thick_alu;
544 par[5] = TMath::Tan(theta) * r4 - thick_alu;
545 par[7] = height4 / 2.0 - thick_alu;
546 par[8] = TMath::Tan(theta) * r3 - thick_alu;
547 par[9] = TMath::Tan(theta) * r4 - thick_alu;
548
549 gMC->Gsvolu("V0R4","TRAP",idtmed[3002],par,11); // quartz volume
550 gMC->Gspos("V0R4",1,"V0R0", 0.0, dist4 , - half_thick_qua1 + half_thick_qua4, 0,"ONLY");
551
552
553 par[0] = half_thick_alu;
554
555 gMC->Gsvolu("V0D1","TRAP",idtmed[3004],par,11); // aluminum trap-shaped foil
556 gMC->Gspos("V0D1",1,"V0R4",0.0,0.0, - half_thick_qua4 + half_thick_alu,0,"ONLY");
557 gMC->Gspos("V0D1",2,"V0R4",0.0,0.0, + half_thick_qua4 - half_thick_alu,0,"ONLY");
558
559 parbox[0] = half_thick_alu;
560 parbox[1] = height4 / TMath::Cos(theta)/ 2.0;
561 parbox[2] = half_thick_qua4;
562
563 gMC->Gsvolu("V0D2","BOX",idtmed[3004],parbox,3); // aluminum rectangular foil
564 Float_t h4;
565 h4 = TMath::Tan(theta) * (r0 + height1 + height2 + height3 + height4/2.0);
566 gMC->Gspos("V0D2",1,"V0R4",-h4 + half_thick_alu,0.0,0.0,idrotm[911],"ONLY");
567 gMC->Gspos("V0D2",2,"V0R4",+h4 - half_thick_alu,0.0,0.0,idrotm[912],"ONLY");
568
569 parbox[0] = TMath::Tan(theta) * (r0 + height1 + height2 + height3);
570 parbox[1] = half_thick_alu;
571 parbox[2] = half_thick_qua4;
572 gMC->Gsvolu("V0D3","BOX",idtmed[3004],parbox,3);
573 gMC->Gspos("V0D3",1,"V0R4",0.0, - (height4/2.0) + half_thick_alu ,0.0,0,"ONLY");
574
575
576 parbox[0] = TMath::Tan(theta) * (r0 + height1 + height2 + height3 + height4);
577 parbox[1] = half_thick_alu;
578 parbox[2] = half_thick_qua4;
579 gMC->Gsvolu("V0D4","BOX",idtmed[3004],parbox,3);
580 gMC->Gspos("V0D4",1,"V0R4",0.0, (height4/2.0) - half_thick_alu,0.0,0,"ONLY");
581
582
583// Elementary cell ring 5 :
584
585 Float_t dist5;
586
587 dist5 = (- height + height5) /2.0 + height1 + height2 + height3 + height4;
588
589 par[0] = half_thick_qua5 - thick_alu;
590 par[3] = height5 / 2.0 - thick_alu;
591 par[4] = TMath::Tan(theta) * r4 - thick_alu;
592 par[5] = TMath::Tan(theta) * r5 - thick_alu;
593 par[7] = height5 / 2.0 - thick_alu;
594 par[8] = TMath::Tan(theta) * r4 - thick_alu;
595 par[9] = TMath::Tan(theta) * r5 - thick_alu;
596
597 gMC->Gsvolu("V0R5","TRAP",idtmed[3002],par,11); // quartz volume
598 gMC->Gspos("V0R5",1,"V0R0", 0.0, dist5 , - half_thick_qua1 + half_thick_qua5, 0,"ONLY");
599
600
601 par[0] = half_thick_alu;
602
603 gMC->Gsvolu("V0E1","TRAP",idtmed[3004],par,11); // aluminum trap-shaped foil
604 gMC->Gspos("V0E1",1,"V0R5",0.0,0.0, - half_thick_qua5 + half_thick_alu,0,"ONLY");
605 gMC->Gspos("V0E1",2,"V0R5",0.0,0.0, + half_thick_qua5 - half_thick_alu,0,"ONLY");
606
607 parbox[0] = half_thick_alu;
608 parbox[1] = height5 / TMath::Cos(theta)/ 2.0;
609 parbox[2] = half_thick_qua5;
610
611 gMC->Gsvolu("V0E2","BOX",idtmed[3004],parbox,3); // aluminum rectangular foil
612 Float_t h5;
613 h5 = TMath::Tan(theta) * (r0 + height1 + height2 + height3 + height4 + height5/2.0);
614 gMC->Gspos("V0E2",1,"V0R5",-h5 + half_thick_alu,0.0,0.0,idrotm[911],"ONLY");
615 gMC->Gspos("V0E2",2,"V0R5",+h5 - half_thick_alu,0.0,0.0,idrotm[912],"ONLY");
616
617 parbox[0] = TMath::Tan(theta) * (r0 + height1 + height2 + height3 + height4);
618 parbox[1] = half_thick_alu;
619 parbox[2] = half_thick_qua5;
620 gMC->Gsvolu("V0E3","BOX",idtmed[3004],parbox,3);
621 gMC->Gspos("V0E3",1,"V0R5",0.0, - (height5/2.0) + half_thick_alu ,0.0,0,"ONLY");
622
623
624 parbox[0] = TMath::Tan(theta) * r5;
625 parbox[1] = half_thick_alu;
626 parbox[2] = half_thick_qua5;
627 gMC->Gsvolu("V0E4","BOX",idtmed[3004],parbox,3);
628 gMC->Gspos("V0E4",1,"V0R5",0.0, (height5/2.0) - half_thick_alu,0.0,0,"ONLY");
629
630
631 Float_t phi_rad ;
61874e87 632 Float_t phi_deg = 180./6.;
47890cd3 633
61874e87 634 // Partie de droite :
635
636 for(Float_t phi = 15.0; phi < 360.0; phi = phi + phi_deg)
47890cd3 637 {
638 phi_rad = phi*pi/180.;
639 AliMatrix(idrotm[902], 90.0, phi, 90.0, 90.0 +phi, 0.0 , 0.0);
61874e87 640 gMC->Gspos("V0R0",n_detec_R,"V0RI",-dist0*TMath::Sin(phi_rad),
47890cd3 641 dist0*TMath::Cos(phi_rad),offset + half_thick_qua1,idrotm[902],"ONLY");
61874e87 642 n_detec_R++;
47890cd3 643 }
644
a35deab8 645 gMC->Gspos("V0RI",1,"ALIC",0.0,0.0,zdet,0,"ONLY");
47890cd3 646
61874e87 647 n_cells_R = (n_detec_R - 1) * 5;
47890cd3 648 printf(" \n\n\n");
61874e87 649 printf(" Number of cells on Right side = %d\n", n_cells_R);
650
651// Partie de gauche :
652
653 for(Float_t phi = 15.0; phi < 360.0; phi = phi + phi_deg)
654 {
655 phi_rad = phi*pi/180.;
656 AliMatrix(idrotm[902], 90.0, phi, 90.0, 90.0 +phi, 0.0 , 0.0);
657 gMC->Gspos("V0L0",n_detec_L,"V0LE",-dist0_left*TMath::Sin(phi_rad),
658 dist0_left*TMath::Cos(phi_rad),offset_left + half_thick_qua1,idrotm[902],"ONLY");
659 n_detec_L++;
660 }
661
662
a35deab8 663 gMC->Gspos("V0LE",1,"ALIC",0.0,0.0,-350.0-fThickness1/2.0,0,"ONLY");
61874e87 664
665 n_cells_L = (n_detec_L - 1) * 5;
666 printf(" \n\n\n");
667 printf(" Number of cells on Left side = %d\n\n", n_cells_L);
668
47890cd3 669
670}
671
672
61874e87 673
47890cd3 674//_____________________________________________________________________________
675void AliVZEROv0::BuildGeometry()
676{
677
678 // Builds simple ROOT TNode geometry for event display
61874e87 679
47890cd3 680
681 Int_t i;
682
683 printf("\n");
61874e87 684 for(i=0;i<30;i++) printf("*");
47890cd3 685 printf(" VZERO BuildGeometry ");
61874e87 686 for(i=0;i<30;i++) printf("*");
47890cd3 687 printf("\n");
688
61874e87 689 TNode *Top;
690
47890cd3 691 TNode *V0Rnode, *V0Rnode0, *V0Rnode6 , *V0Rnode7, *V0Rnode8, *V0Rnode9;
692 TNode *V0Rnode1, *V0Rnode2, *V0Rnode3, *V0Rnode4, *V0Rnode5;
61874e87 693 TNode *V0Lnode, *V0Lnode0;
694 TNode *V0Lnode1, *V0Lnode2, *V0Lnode3, *V0Lnode4, *V0Lnode5;
695
47890cd3 696 const int kColorVZERO = kGreen;
61874e87 697
47890cd3 698 Top = gAlice->GetGeometry()->GetNode("alice");
699
700 Float_t height1, height2, height3, height4, height5;
701 Float_t height;
702 Float_t theta;
703 Float_t half_thick_alu;
704 Float_t half_thick_qua1,half_thick_qua2,half_thick_qua3;
705 Float_t half_thick_qua4,half_thick_qua5;
706 Float_t zdet;
707 Float_t r0, r5;
708 Float_t pi = TMath::Pi();
709 Float_t thick_alu;
710
61874e87 711// height1 = 1.9;
712// height2 = 3.7;
713// height3 = 6.2;
714// height4 = 10.5;
715// height5 = 10.5;
716
717 height1 = 2.0; // height of cell 1, in cm
718 height2 = 3.2; // height of cell 2, in cm
719 height3 = 4.9; // height of cell 3, in cm
720 height4 = 7.5; // height of cell 4, in cm
721 height5 = 12.0; // height of cell 5, in cm
47890cd3 722
61874e87 723 theta = pi/6.0/2.0;
47890cd3 724 half_thick_alu = 0.0025;
725 thick_alu = 2.0 * half_thick_alu;
726 half_thick_qua1 = fThickness1/2.0;
727 half_thick_qua2 = half_thick_qua1 - 0.25;
728 half_thick_qua3 = half_thick_qua2 - 0.25;
729 half_thick_qua4 = half_thick_qua3 - 0.25;
730 half_thick_qua5 = half_thick_qua4 - 0.25;
731
732 zdet = 86.9 +fThickness/2.0;
61874e87 733 r0 = 4.0;
47890cd3 734 height = height1 + height2 + height3 + height4 + height5;
735 r5 = r0 + height;
736
737 Float_t partube[3];
738
739 partube[0] = r0 - 0.2;
740 partube[1] = (r5 + 1.0) / TMath::Cos(theta);
741 partube[2] = fThickness/2.0;
742
743 TTUBE *V0RI = new TTUBE("V0RI", "V0RI", "void", partube[0], partube[1], partube[2]);
744
745 Top->cd();
746
747 V0Rnode = new TNode("V0RI","V0RI",V0RI,0.0,0.0,+zdet,0);
748
749 V0Rnode->SetLineColor(kBlue);
750 fNodes->Add(V0Rnode);
751
752 V0Rnode->SetVisibility(2);
61874e87 753
47890cd3 754
755// Rondelles de carbone (epaisseur 1 mm) de maintien des cellules ...
756
757
758 Float_t parbox[10];
759
760 parbox[0] = 0.;
761 parbox[1] = 360.;
c288a388 762 parbox[2] = 12.;
763 parbox[3] = 2.;
47890cd3 764 parbox[4] = -0.1/2.0;
765 parbox[5] = r0;
766 parbox[6] = r5;
767 parbox[7] = +0.1/2.0;
768 parbox[8] = r0;
769 parbox[9] = r5;
770
771
772 TPGON *V0CA = new TPGON("V0CA", "V0CA", "void",parbox[0], parbox[1],
88cb7938 773 static_cast<Int_t>(parbox[2]),
774 static_cast<Int_t>(parbox[3]));
47890cd3 775
776 V0CA->DefineSection( 0, parbox[4], parbox[5], parbox[6] );
777 V0CA->DefineSection( 1, parbox[7], parbox[8], parbox[9] );
778
779 V0Rnode->cd();
780 V0Rnode6 = new TNode("V0CA", "V0CA",V0CA,0.0,0.0, fThickness/2.0-parbox[7],0);
781 V0Rnode6->SetLineColor(kYellow);
782 fNodes->Add(V0Rnode6);
783 V0Rnode->cd();
784 V0Rnode7 = new TNode("V0CA", "V0CA",V0CA,0.0,0.0,-fThickness/2.0+parbox[7],0);
785 V0Rnode7->SetLineColor(kYellow);
786 fNodes->Add(V0Rnode7);
787
788 parbox[4] = -fThickness/2.0;
789 parbox[5] = r0 - 0.2;
790 parbox[6] = r0;
791 parbox[7] = +fThickness/2.0;
792 parbox[8] = r0 - 0.2;
793 parbox[9] = r0;
794
795 TPGON *V0IR = new TPGON("V0IR","V0IR","void", parbox[0], parbox[1],
88cb7938 796 static_cast<Int_t>(parbox[2]),
797 static_cast<Int_t>(parbox[3]));
47890cd3 798 V0IR->DefineSection( 0, parbox[4], parbox[5], parbox[6] );
799 V0IR->DefineSection( 1, parbox[7], parbox[8], parbox[9] );
800
801 V0Rnode->cd();
802 V0Rnode8 = new TNode("V0IR", "V0IR",V0IR,0.0,0.0,0.0,0);
803 V0Rnode8->SetLineColor(kYellow);
804 fNodes->Add(V0Rnode8);
805
806 parbox[4] = -fThickness/2.0;
807 parbox[5] = r5;
808 parbox[6] = r5 + 1.0;
809 parbox[7] = +fThickness/2.0;
810 parbox[8] = r5;
811 parbox[9] = r5 + 1.0;
812
813 TPGON *V0ER = new TPGON("V0ER","V0ER","void", parbox[0], parbox[1],
88cb7938 814 static_cast<Int_t>(parbox[2]),
815 static_cast<Int_t>(parbox[3]));
816
47890cd3 817 V0ER->DefineSection( 0, parbox[4], parbox[5], parbox[6] );
818 V0ER->DefineSection( 1, parbox[7], parbox[8], parbox[9] );
819
820 V0Rnode->cd();
821 V0Rnode9 = new TNode("V0ER", "V0ER",V0ER,0.0,0.0,0.0,0);
822 V0Rnode9->SetLineColor(kYellow);
823 fNodes->Add(V0Rnode9);
824
825 Float_t dist0;
826 Float_t par[11];
827
828 dist0 = r0 + height / 2.0;
829 thick_alu = 2.0*half_thick_alu;
830
831 par[0] = half_thick_qua1;
832 par[1] = 0.0;
833 par[2] = 0.0;
834 par[3] = height / 2.0 ;
835 par[4] = TMath::Tan(theta) * r0;
836 par[5] = TMath::Tan(theta) * r5;
837 par[6] = 0.0;
838 par[7] = height / 2.0 ;
839 par[8] = TMath::Tan(theta) * r0;
840 par[9] = TMath::Tan(theta) * r5;
841 par[10] = 0.0;
842
843 TTRAP *V0R0 = new TTRAP("V0R0", "V0R0", "void", par[0], par[1], par[2], par[3],
844 par[4], par[5], par[6], par[7], par[8], par[9], par[10]);
845
846 Float_t dist1;
847 Float_t r1;
848 Float_t offset;
849
850 dist1 = (- height + height1) /2.0;
851 r1 = r0 + height1;
852 offset = - fThickness/2.0 + 0.1;
853
854 par[0] = half_thick_qua1 - thick_alu;
855 par[3] = height1 / 2.0 - thick_alu;
856 par[4] = TMath::Tan(theta) * r0 - thick_alu;
857 par[5] = TMath::Tan(theta) * r1- thick_alu;
858 par[7] = height1 / 2.0 - thick_alu;
859 par[8] = TMath::Tan(theta) * r0 - thick_alu;
860 par[9] = TMath::Tan(theta) * r1 - thick_alu;
861
862 TTRAP *V0R1 = new TTRAP("V0R1", "V0R1", "void", par[0], par[1], par[2], par[3],
863 par[4], par[5], par[6], par[7], par[8], par[9], par[10]);
864
865
866 Float_t dist2;
867 Float_t r2;
868
869 dist2 = (- height + height2) /2.0 + height1;
870 r2 = r1 + height2;
871
872 par[0] = half_thick_qua2 - thick_alu;
873 par[3] = height2 / 2.0 - thick_alu;
874 par[4] = TMath::Tan(theta) * r1 - thick_alu;
875 par[5] = TMath::Tan(theta) * r2 - thick_alu;
876 par[7] = height2 / 2.0 - thick_alu;
877 par[8] = TMath::Tan(theta) * r1 - thick_alu;
878 par[9] = TMath::Tan(theta) * r2 - thick_alu;
879
880
881 TTRAP *V0R2 = new TTRAP("V0R2", "V0R2", "void", par[0], par[1], par[2], par[3],
882 par[4], par[5], par[6], par[7], par[8], par[9], par[10]);
883
884
885 Float_t dist3;
886 Float_t r3;
887
888 dist3 = (- height + height3) /2.0 + height1 + height2;
889 r3 = r2 + height3;
890
891 par[0] = half_thick_qua3 - thick_alu;
892 par[3] = height3 / 2.0 - thick_alu;
893 par[4] = TMath::Tan(theta) * r2 - thick_alu;
894 par[5] = TMath::Tan(theta) * r3 - thick_alu;
895 par[7] = height3 / 2.0 - thick_alu;
896 par[8] = TMath::Tan(theta) * r2 - thick_alu;
897 par[9] = TMath::Tan(theta) * r3 - thick_alu;
898
899
900 TTRAP *V0R3 = new TTRAP("V0R3", "V0R3", "void", par[0], par[1], par[2], par[3],
901 par[4], par[5], par[6], par[7], par[8], par[9], par[10]);
902
903
904 Float_t dist4;
905 Float_t r4;
906
907 dist4 = (- height + height4) /2.0 + height1 + height2 + height3;
908 r4 = r3 + height4;
909
910 par[0] = half_thick_qua4 - thick_alu;
911 par[3] = height4 / 2.0 - thick_alu;
912 par[4] = TMath::Tan(theta) * r3 - thick_alu;
913 par[5] = TMath::Tan(theta) * r4 - thick_alu;
914 par[7] = height4 / 2.0 - thick_alu;
915 par[8] = TMath::Tan(theta) * r3 - thick_alu;
916 par[9] = TMath::Tan(theta) * r4 - thick_alu;
917
918
919 TTRAP *V0R4 = new TTRAP("V0R4", "V0R4", "void", par[0], par[1], par[2], par[3],
920 par[4], par[5], par[6], par[7], par[8], par[9], par[10]);
921
922
923 Float_t dist5;
924
925 dist5 = (- height + height5) /2.0 + height1 + height2 + height3 + height4;
926
927 par[0] = half_thick_qua5 - thick_alu;
928 par[3] = height5 / 2.0 - thick_alu;
929 par[4] = TMath::Tan(theta) * r4 - thick_alu;
930 par[5] = TMath::Tan(theta) * r5 - thick_alu;
931 par[7] = height5 / 2.0 - thick_alu;
932 par[8] = TMath::Tan(theta) * r4 - thick_alu;
933 par[9] = TMath::Tan(theta) * r5 - thick_alu;
934
935
936 TTRAP *V0R5 = new TTRAP("V0R5", "V0R5", "void", par[0], par[1], par[2], par[3],
937 par[4], par[5], par[6], par[7], par[8], par[9], par[10]);
938
939
940 Float_t phi;
61874e87 941 Float_t phi_deg= 180./6.;
47890cd3 942 Float_t phi_rad;
943 Float_t xdet,ydet;
61874e87 944 Int_t n_detec_R = 1;
945
47890cd3 946 char NameNode[12];
947
948
61874e87 949 for (phi = 15.0; phi < 360.0; phi = phi + phi_deg)
47890cd3 950 {
951
952 TRotMatrix* mat920 = new TRotMatrix("rot920","rot920", 90.0, +phi, 90., 90.+phi, 0.0, 0.0 );
953
954 phi_rad = phi*pi/180.;
955 xdet = dist0*TMath::Sin(phi_rad);
956 ydet = dist0*TMath::Cos(phi_rad);
957
958
61874e87 959 sprintf(NameNode,"SUBDER%d",n_detec_R);
47890cd3 960
961 V0Rnode->cd();
962 V0Rnode0 = new TNode(NameNode,NameNode,V0R0,-xdet,ydet, offset + half_thick_qua1,mat920);
963 V0Rnode0->SetLineColor(kColorVZERO);
964 fNodes->Add(V0Rnode0);
61874e87 965 n_detec_R++;
47890cd3 966
61874e87 967 sprintf(NameNode,"SUBDER%d",n_detec_R);
47890cd3 968 V0Rnode0->cd();
969 V0Rnode1 = new TNode(NameNode,NameNode,V0R1,0.0,dist1, 0.0,0);
970 V0Rnode1->SetLineColor(kColorVZERO);
971 fNodes->Add(V0Rnode1);
61874e87 972 n_detec_R++;
47890cd3 973
61874e87 974 sprintf(NameNode,"SUBDER%d",n_detec_R);
47890cd3 975 V0Rnode0->cd();
976 V0Rnode2 = new TNode(NameNode,NameNode,V0R2,0.0,dist2, - half_thick_qua1 + half_thick_qua2,0);
977 V0Rnode2->SetLineColor(kColorVZERO);
978 fNodes->Add(V0Rnode2);
61874e87 979 n_detec_R++;
47890cd3 980
981
61874e87 982 sprintf(NameNode,"SUBDER%d",n_detec_R);
47890cd3 983 V0Rnode0->cd();
984 V0Rnode3 = new TNode(NameNode,NameNode,V0R3,0.0,dist3, - half_thick_qua1 + half_thick_qua3,0);
985 V0Rnode3->SetLineColor(kColorVZERO);
986 fNodes->Add(V0Rnode3);
61874e87 987 n_detec_R++;
47890cd3 988
61874e87 989 sprintf(NameNode,"SUBDER%d",n_detec_R);
47890cd3 990 V0Rnode0->cd();
991 V0Rnode4 = new TNode(NameNode,NameNode,V0R4,0.0,dist4, - half_thick_qua1 + half_thick_qua4,0);
992 V0Rnode4->SetLineColor(kColorVZERO);
993 fNodes->Add(V0Rnode4);
61874e87 994 n_detec_R++;
47890cd3 995
61874e87 996 sprintf(NameNode,"SUBDER%d",n_detec_R);
47890cd3 997 V0Rnode0->cd();
998 V0Rnode5 = new TNode(NameNode,NameNode,V0R5,0.0,dist5, - half_thick_qua1 + half_thick_qua5,0);
999 V0Rnode5->SetLineColor(kColorVZERO);
1000 fNodes->Add(V0Rnode5);
61874e87 1001 n_detec_R++;
47890cd3 1002
1003 V0Rnode0->SetVisibility(2);
1004
1005 }
47890cd3 1006
47890cd3 1007
61874e87 1008// Left side of VZERO :
47890cd3 1009
47890cd3 1010
61874e87 1011 Float_t dist0_left;
1012 Float_t r0_left = 4.3;
1013 Float_t height1_left = 2.6;
1014 Float_t height2_left = 4.1;
1015 Float_t height3_left = 6.4;
1016 Float_t height4_left = 10.2;
1017 Float_t height5_left = 16.9;
1018 Float_t height_left = height1_left + height2_left + height3_left
1019 + height4_left + height5_left;
1020 Float_t r5_left = r0_left + height_left;
47890cd3 1021
61874e87 1022 partube[0] = r0_left;
1023 partube[1] = (r5_left) / TMath::Cos(theta);
1024 partube[2] = fThickness1/2.0;
47890cd3 1025
61874e87 1026 TTUBE *V0LE = new TTUBE("V0LE", "V0LE", "void", partube[0], partube[1], partube[2]);
1027
1028 Top->cd();
1029
1030 V0Lnode = new TNode("V0LE","V0LE",V0LE,0.0,0.0,-350.0-fThickness1/2.0,0);
1031
1032 V0Lnode->SetLineColor(kBlue);
1033 fNodes->Add(V0Lnode);
1034
1035 V0Lnode->SetVisibility(2);
1036
1037 dist0_left = r0_left + height_left / 2.0;
1038 thick_alu = 2.0*half_thick_alu;
1039
1040 par[0] = half_thick_qua1;
1041 par[1] = 0.0;
1042 par[2] = 0.0;
1043 par[3] = height_left / 2.0 ;
1044 par[4] = TMath::Tan(theta) * r0_left;
1045 par[5] = TMath::Tan(theta) * r5_left;
1046 par[6] = 0.0;
1047 par[7] = height_left / 2.0 ;
1048 par[8] = TMath::Tan(theta) * r0_left;
1049 par[9] = TMath::Tan(theta) * r5_left;
1050 par[10] = 0.0;
1051
1052 TTRAP *V0L0 = new TTRAP("V0L0", "V0L0", "void", par[0], par[1], par[2], par[3],
1053 par[4], par[5], par[6], par[7], par[8], par[9], par[10]);
1054
1055
1056 Float_t dist1_left;
1057 Float_t r1_left;
1058 Float_t offset_left;
1059
1060 dist1_left = (- height_left + height1_left) /2.0;
1061 r1_left = r0_left + height1_left;
1062 offset_left = - fThickness1/2.0 + 0.1;
1063
1064 par[0] = half_thick_qua1 - thick_alu;
1065 par[3] = height1_left / 2.0 - thick_alu;
1066 par[4] = TMath::Tan(theta) * r0_left - thick_alu;
1067 par[5] = TMath::Tan(theta) * r1_left- thick_alu;
1068 par[7] = height1_left / 2.0 - thick_alu;
1069 par[8] = TMath::Tan(theta) * r0_left - thick_alu;
1070 par[9] = TMath::Tan(theta) * r1_left - thick_alu;
1071
1072 TTRAP *V0L1 = new TTRAP("V0L1", "V0L1", "void", par[0], par[1], par[2], par[3],
1073 par[4], par[5], par[6], par[7], par[8], par[9], par[10]);
47890cd3 1074
61874e87 1075 Float_t dist2_left;
1076 Float_t r2_left;
47890cd3 1077
61874e87 1078 dist2_left = (- height_left + height2_left) /2.0 + height1_left;
1079 r2_left = r1_left + height2_left;
1080
1081 par[0] = half_thick_qua1 - thick_alu;
1082 par[3] = height2_left / 2.0 - thick_alu;
1083 par[4] = TMath::Tan(theta) * r1_left - thick_alu;
1084 par[5] = TMath::Tan(theta) * r2_left - thick_alu;
1085 par[7] = height2_left / 2.0 - thick_alu;
1086 par[8] = TMath::Tan(theta) * r1_left - thick_alu;
1087 par[9] = TMath::Tan(theta) * r2_left - thick_alu;
47890cd3 1088
61874e87 1089 TTRAP *V0L2 = new TTRAP("V0L2", "V0L2", "void", par[0], par[1], par[2], par[3],
1090 par[4], par[5], par[6], par[7], par[8], par[9], par[10]);
47890cd3 1091
47890cd3 1092
61874e87 1093
1094 Float_t dist3_left;
1095 Float_t r3_left;
1096
1097 dist3_left = (- height_left + height3_left) /2.0 + height1_left + height2_left;
1098 r3_left = r2_left + height3_left;
1099
1100 par[0] = half_thick_qua1 - thick_alu;
1101 par[3] = height3_left / 2.0 - thick_alu;
1102 par[4] = TMath::Tan(theta) * r2_left - thick_alu;
1103 par[5] = TMath::Tan(theta) * r3_left - thick_alu;
1104 par[7] = height3_left / 2.0 - thick_alu;
1105 par[8] = TMath::Tan(theta) * r2_left - thick_alu;
1106 par[9] = TMath::Tan(theta) * r3_left - thick_alu;
1107
1108 TTRAP *V0L3 = new TTRAP("V0L3", "V0L3", "void", par[0], par[1], par[2], par[3],
1109 par[4], par[5], par[6], par[7], par[8], par[9], par[10]);
1110
1111
1112 Float_t dist4_left;
1113 Float_t r4_left;
1114
1115 dist4_left = (- height_left + height4_left) /2.0 + height1_left
1116 + height2_left + height3_left;
1117 r4_left = r3_left + height4_left;
1118
1119 par[0] = half_thick_qua1 - thick_alu;
1120 par[3] = height4_left / 2.0 - thick_alu;
1121 par[4] = TMath::Tan(theta) * r3_left - thick_alu;
1122 par[5] = TMath::Tan(theta) * r4_left - thick_alu;
1123 par[7] = height4_left / 2.0 - thick_alu;
1124 par[8] = TMath::Tan(theta) * r3_left - thick_alu;
1125 par[9] = TMath::Tan(theta) * r4_left - thick_alu;
1126
1127 TTRAP *V0L4 = new TTRAP("V0L4", "V0L4", "void", par[0], par[1], par[2], par[3],
1128 par[4], par[5], par[6], par[7], par[8], par[9], par[10]);
1129
47890cd3 1130
61874e87 1131 Float_t dist5_left;
47890cd3 1132
61874e87 1133
1134 dist5_left = (- height_left + height5_left) /2.0 + height1_left
1135 + height2_left + height3_left + height4_left;
47890cd3 1136
61874e87 1137
1138 par[0] = half_thick_qua1 - thick_alu;
1139 par[3] = height5_left / 2.0 - thick_alu;
1140 par[4] = TMath::Tan(theta) * r4_left - thick_alu;
1141 par[5] = TMath::Tan(theta) * r5_left - thick_alu;
1142 par[7] = height5_left / 2.0 - thick_alu;
1143 par[8] = TMath::Tan(theta) * r4_left - thick_alu;
1144 par[9] = TMath::Tan(theta) * r5_left - thick_alu;
1145
1146 TTRAP *V0L5 = new TTRAP("V0L5", "V0L5", "void", par[0], par[1], par[2], par[3],
1147 par[4], par[5], par[6], par[7], par[8], par[9], par[10]);
47890cd3 1148
47890cd3 1149
61874e87 1150 Int_t n_detec_L = 1;
1151
1152 for (phi = 15.0; phi < 360.0; phi = phi + phi_deg)
1153 {
47890cd3 1154
61874e87 1155 TRotMatrix* mat920 = new TRotMatrix("rot920","rot920", 90.0, +phi, 90., 90.+phi, 0.0, 0.0 );
47890cd3 1156
61874e87 1157 phi_rad = phi*pi/180.;
1158 xdet = dist0_left*TMath::Sin(phi_rad);
1159 ydet = dist0_left*TMath::Cos(phi_rad);
1160
1161
1162 sprintf(NameNode,"SUBDEL%d",n_detec_L);
1163
1164 V0Lnode->cd();
1165 V0Lnode0 = new TNode(NameNode,NameNode,V0L0,-xdet,ydet, offset_left + half_thick_qua1,mat920);
1166 V0Lnode0->SetLineColor(kColorVZERO);
1167 fNodes->Add(V0Lnode0);
1168 n_detec_L++;
1169
1170 sprintf(NameNode,"SUBDEL%d",n_detec_L);
1171 V0Lnode0->cd();
1172 V0Lnode1 = new TNode(NameNode,NameNode,V0L1,0.0,dist1_left, 0.0,0);
1173 V0Lnode1->SetLineColor(kColorVZERO);
1174 fNodes->Add(V0Lnode1);
1175 n_detec_L++;
1176
1177 sprintf(NameNode,"SUBDEL%d",n_detec_L);
1178 V0Lnode0->cd();
1179 V0Lnode2 = new TNode(NameNode,NameNode,V0L2,0.0,dist2_left, 0.0,0);
1180 V0Lnode2->SetLineColor(kColorVZERO);
1181 fNodes->Add(V0Lnode2);
1182 n_detec_L++;
1183
1184
1185 sprintf(NameNode,"SUBDEL%d",n_detec_L);
1186 V0Lnode0->cd();
1187 V0Lnode3 = new TNode(NameNode,NameNode,V0L3,0.0,dist3_left, 0.0,0);
1188 V0Lnode3->SetLineColor(kColorVZERO);
1189 fNodes->Add(V0Lnode3);
1190 n_detec_L++;
1191
1192 sprintf(NameNode,"SUBDEL%d",n_detec_L);
1193 V0Lnode0->cd();
1194 V0Lnode4 = new TNode(NameNode,NameNode,V0L4,0.0,dist4_left, 0.0,0);
1195 V0Lnode4->SetLineColor(kColorVZERO);
1196 fNodes->Add(V0Lnode4);
1197 n_detec_L++;
47890cd3 1198
61874e87 1199 sprintf(NameNode,"SUBDEL%d",n_detec_L);
1200 V0Lnode0->cd();
1201 V0Lnode5 = new TNode(NameNode,NameNode,V0L5,0.0,dist5_left, 0.0,0);
1202 V0Lnode5->SetLineColor(kColorVZERO);
1203 fNodes->Add(V0Lnode5);
1204 n_detec_L++;
47890cd3 1205
61874e87 1206 V0Lnode0->SetVisibility(2);
47890cd3 1207
61874e87 1208 }
47890cd3 1209
61874e87 1210
1211}
47890cd3 1212
1213
1214//------------------------------------------------------------------------
1215void AliVZEROv0::CreateMaterials()
1216{
61874e87 1217 Int_t i;
47890cd3 1218
61874e87 1219 printf("\n");
1220 for(i=0;i<30;i++) printf("*");
1221 printf(" VZERO create materials ");
1222 for(i=0;i<30;i++) printf("*");
1223 printf("\n");
1224
47890cd3 1225
47890cd3 1226 Float_t ppckov[14] = { 5.5e-9, 5.7e-9, 5.9e-9, 6.1e-9, 6.3e-9, 6.5e-9, 6.7e-9,
1227 6.9e-9, 7.1e-9, 7.3e-9, 7.5e-9, 7.7e-9, 7.9e-9, 8.1e-9 };
61874e87 1228
1229
1230 Float_t ppckov_alu[14] = { 5.5e-9, 5.7e-9, 5.9e-9, 6.1e-9, 6.3e-9, 6.5e-9, 6.7e-9,
1231 6.9e-9, 7.1e-9, 7.3e-9, 7.5e-9, 7.7e-9, 7.9e-9, 8.1e-9 };
47890cd3 1232
1233 Float_t rindex_quarz[14] = { 1.52398, 1.53090, 1.53835, 1.54641, 1.55513, 1.56458,
1234 1.57488, 1.58611, 1.59842, 1.61197, 1.62696, 1.64362,
61874e87 1235 1.662295, 1.68337 };
47890cd3 1236
1237 Float_t absco_quarz[14] = { 105.8, 45.656, 35.665, 28.598, 25.007, 21.04, 17.525,
1238 14.177, 9.282, 4.0925, 1.149, 0.3627, 0.1497, 0.05 };
1239
1240 Float_t effic_all[14] = { 1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1. };
1241
1242
1243 Float_t rindex_alu[14] = { 1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1. };
61874e87 1244
1245
47890cd3 1246 Float_t absco_alu[14] = { 1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,1e-4,
1247 1e-4,1e-4,1e-4,1e-4 };
1248 Float_t effic_alu[14] = { 1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1. };
61874e87 1249
47890cd3 1250
1251 Int_t *idtmed = fIdtmed->GetArray()-2999;
1252
47890cd3 1253
1254// Parameters related to Quarz (SiO2) :
1255
1256 Float_t aqua[2], zqua[2], densqua, wmatqua[2];
1257 Int_t nlmatqua;
1258
1259 aqua[0] = 28.09;
1260 aqua[1] = 16.;
1261 zqua[0] = 14.;
1262 zqua[1] = 8.;
1263 densqua = 2.64;
1264 nlmatqua = -2;
1265 wmatqua[0] = 1.;
1266 wmatqua[1] = 2.;
1267
1268// Parameters related to aluminum sheets :
1269
1270 Float_t aal = 26.98;
1271 Float_t zal = 13.00;
1272 Float_t densal= 2.7;
1273 Float_t radlal= 8.9;
1274
1275// Parameters related to scintillator CH :
1276
1277 Float_t ascin[2] = {1.01,12.01};
1278 Float_t zscin[2] = {1,6};
1279 Float_t wscin[2] = {1,1};
1280 Float_t denscin = 1.03;
1281
1282// Definition of materials :
1283
61874e87 1284 AliMaterial( 1, "AIR A$", 14.61, 7.3, .001205, 30420., 67500, 0, 0);
1285 AliMaterial(11, "AIR I$", 14.61, 7.3, .001205, 30420., 67500, 0, 0);
1286 AliMaterial( 2, "CARBON$" , 12.01, 6.0, 2.265, 18.8, 49.9, 0, 0);
47890cd3 1287 AliMixture( 3, "QUA", aqua, zqua, densqua, nlmatqua, wmatqua);
61874e87 1288 AliMaterial( 4, "ALUMINIUM1$", 26.98, 13., 2.7, 8.9, 37.2, 0, 0);
1289 AliMaterial( 5, "ALUMINIUM2$", aal, zal, densal, radlal, 0, 0, 0);
47890cd3 1290
1291
1292 AliMixture( 6, "Scintillator$",ascin,zscin,denscin,-2,wscin);
1293
1294
1295 Int_t ISXFLD = gAlice->Field()->Integ();
1296 Float_t SXMGMX = gAlice->Field()->Max();
1297
1298 Float_t tmaxfd, stemax, deemax, epsil, stmin;
1299
61874e87 1300 tmaxfd = 10.;
1301 stemax = 0.1;
1302 deemax = 0.1;
1303 epsil = 0.001;
1304 stmin = 0.001;
1305
1306 printf(" \n");
1307 printf(" StepQua, StepAlu = %f %f \n",fMaxStepQua,fMaxStepAlu);
1308 printf(" DeStepQua, DeStepAlu = %f %f \n",fMaxDestepQua,fMaxDestepAlu);
1309 printf(" \n");
1310
47890cd3 1311
1312// Active Air :
61874e87 1313 AliMedium(1, "ACTIVE AIR$", 1, 1, ISXFLD, SXMGMX,
1314 10.0, 1.0, 0.1, 0.1, 10.0, 0, 0) ;
47890cd3 1315
1316// Inactive air :
1317
61874e87 1318 AliMedium(11, "INACTIVE AIR$", 11, 0, ISXFLD, SXMGMX,
1319 10.0, 1.0, 0.1, 0.1, 10.0, 0, 0) ;
47890cd3 1320
61874e87 1321 AliMedium(2, "CARBON$ ", 2, 1, ISXFLD, SXMGMX,
1322 tmaxfd, stemax, deemax, epsil, stmin, 0, 0);
47890cd3 1323
61874e87 1324 AliMedium(3, "QUARZ$", 3, 1, ISXFLD, SXMGMX,
1325 tmaxfd, fMaxStepQua, fMaxDestepQua, epsil, stmin, 0, 0);
47890cd3 1326
61874e87 1327 AliMedium(4,"ALUMINUM1$",4, 1, ISXFLD, SXMGMX,
1328 tmaxfd, fMaxStepAlu, fMaxDestepAlu, epsil, stmin, 0, 0);
1329
1330
1331 AliMedium(5,"ALUMINUM2$",5, 1, ISXFLD, SXMGMX,
1332 tmaxfd, fMaxStepAlu, fMaxDestepAlu, epsil, stmin, 0, 0);
1333
1334 AliMedium(6,"SCINTILLATOR$",6, 1, ISXFLD, SXMGMX, 10., .01, 1., .003, .003, 0, 0);
47890cd3 1335
1336 gMC->Gstpar(idtmed[3000], "LOSS", 1.); // [3000] = air ACTIF [3010] = air INACTIF
1337 gMC->Gstpar(idtmed[3000], "HADR", 1.);
1338 gMC->Gstpar(idtmed[3000], "DCAY", 1.);
1339 gMC->Gstpar(idtmed[3000], "DRAY", 1.);
1340
1341 gMC->Gstpar(idtmed[3001], "LOSS", 1.); // [3001] = carbon
1342 gMC->Gstpar(idtmed[3001], "HADR", 1.);
1343 gMC->Gstpar(idtmed[3001], "DCAY", 1.);
1344 gMC->Gstpar(idtmed[3001], "DRAY", 1.);
1345
1346 gMC->Gstpar(idtmed[3002], "LOSS", 1.); // [3002] = quartz
1347 gMC->Gstpar(idtmed[3002], "HADR", 1.);
1348 gMC->Gstpar(idtmed[3002], "DCAY", 1.);
61874e87 1349 gMC->Gstpar(idtmed[3002], "DRAY", 1.);
1350 gMC->Gstpar(idtmed[3002], "CUTGAM",0.5E-4) ;
1351 gMC->Gstpar(idtmed[3002], "CUTELE",1.0E-4) ;
47890cd3 1352
1353 gMC->Gstpar(idtmed[3003], "LOSS", 1.); // [3003] = normal aluminum
1354 gMC->Gstpar(idtmed[3003], "HADR", 1.);
1355 gMC->Gstpar(idtmed[3003], "DCAY", 1.);
1356 gMC->Gstpar(idtmed[3003], "DRAY", 1.);
1357
1358 gMC->Gstpar(idtmed[3004], "LOSS", 1.); // [3004] = reflecting aluminum
1359 gMC->Gstpar(idtmed[3004], "HADR", 1.);
1360 gMC->Gstpar(idtmed[3004], "DCAY", 1.);
1361 gMC->Gstpar(idtmed[3004], "DRAY", 1.);
61874e87 1362 gMC->Gstpar(idtmed[3004], "CUTGAM",0.5E-4) ;
1363 gMC->Gstpar(idtmed[3004], "CUTELE",1.0E-4) ;
47890cd3 1364
1365 gMC->Gstpar(idtmed[3005], "LOSS", 1.); // [3005] = scintillator
1366 gMC->Gstpar(idtmed[3005], "HADR", 1.);
1367 gMC->Gstpar(idtmed[3005], "DCAY", 1.);
1368 gMC->Gstpar(idtmed[3005], "DRAY", 1.);
1369
7f40b0b2 1370 gMC->SetCerenkov(idtmed[3002], 14, ppckov, absco_quarz, effic_all,rindex_quarz);
1371 gMC->SetCerenkov(idtmed[3004], 14, ppckov_alu, absco_alu, effic_alu, rindex_alu);
47890cd3 1372
61874e87 1373
47890cd3 1374}
1375//---------------------------------------------------------------------
1376void AliVZEROv0::DrawModule()
1377{
1378
1379// Drawing is done in DrawVZERO.C
1380
1381 Int_t i;
1382
1383 printf("\n");
61874e87 1384 for(i=0;i<30;i++) printf("*");
47890cd3 1385 printf(" VZERO DrawModule ");
61874e87 1386 for(i=0;i<30;i++) printf("*");
47890cd3 1387 printf("\n");
1388
1389
1390}
1391
1392//-------------------------------------------------------------------
1393void AliVZEROv0::Init()
1394{
1395// Initialises version 0 of the VZERO Detector
1396// Just prints an information message
1397
61874e87 1398 printf(" VZERO version %d initialized \n",IsVersion());
47890cd3 1399
61874e87 1400// gMC->SetMaxStep(fMaxStepAlu);
1401// gMC->SetMaxStep(fMaxStepQua);
1402
1403// AliVZERO::Init();
1404
47890cd3 1405}
1406
1407//-------------------------------------------------------------------
1408
1409void AliVZEROv0::StepManager()
1410{
1411
61874e87 1412// (Very)Minimal version of StepManager
1413
1414
1415 Int_t copy;
1416 static Int_t vol[4];
1417 static Float_t hits[15];
47890cd3 1418
1419 TLorentzVector pos;
47890cd3 1420
61874e87 1421 TLorentzVector mom;
47890cd3 1422 Float_t theta;
1423 Float_t phi;
47890cd3 1424 Float_t kRaddeg = 180/TMath::Pi();
61874e87 1425 Float_t RingNumber;
1426
1427 Int_t ipart;
47890cd3 1428
61874e87 1429
1430// TGeant3 *geant3 = (TGeant3*) gMC;
1431// Int_t Nphot = geant3->Gckin2()->ngphot;
47890cd3 1432
61874e87 1433
1434// Only charged tracks :
47890cd3 1435
61874e87 1436 if ( !gMC->TrackCharge() || !gMC->IsTrackAlive() ) return;
1437
1438
47890cd3 1439 vol[0] = gMC->CurrentVolOffID(1, vol[1]);
1440 vol[2] = gMC->CurrentVolID(copy);
1441 vol[3] = copy;
1442
61874e87 1443 if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R1") ||
1444 gMC->CurrentVolID(copy) == gMC->VolId("V0L1") )
1445 RingNumber = 1.0;
1446 else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R2") ||
1447 gMC->CurrentVolID(copy) == gMC->VolId("V0L2") )
1448 RingNumber = 2.0;
1449 else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R3") ||
1450 gMC->CurrentVolID(copy) == gMC->VolId("V0L3") )
1451 RingNumber = 3.0;
1452 else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R4") ||
1453 gMC->CurrentVolID(copy) == gMC->VolId("V0L4") )
1454 RingNumber = 4.0;
1455 else if ( gMC->CurrentVolID(copy) == gMC->VolId("V0R5") ||
1456 gMC->CurrentVolID(copy) == gMC->VolId("V0L5") )
1457 RingNumber = 5.0;
1458 else
1459 RingNumber = 0.0;
1460
1461 if (gMC->IsTrackEntering() && RingNumber > 0.5) {
1462
1463 gMC->TrackPosition(pos);
1464
1465 gMC->TrackMomentum(mom);
1466 Double_t tc = mom[0]*mom[0]+mom[1]*mom[1];
1467 Double_t Pt = TMath::Sqrt(tc);
1468 Double_t Pmom = TMath::Sqrt(tc+mom[2]*mom[2]);
47890cd3 1469
61874e87 1470 theta = Float_t(TMath::ATan2(Pt,Double_t(mom[2])))*kRaddeg;
1471 phi = Float_t(TMath::ATan2(Double_t(mom[1]),Double_t(mom[0])))*kRaddeg;
1472
1473 ipart = gMC->TrackPid();
1474
1475 hits[0] = pos[0];
1476 hits[1] = pos[1];
1477 hits[2] = pos[2];
1478 hits[3] = ipart;
1479
1480// Float_t ttime = gMC->TrackTime();
1481// hits[4] = ttime*1e9;
1482
1483 hits[4] = gMC->TrackTime();
1484 hits[5] = gMC->TrackCharge();
1485 hits[6] = theta;
1486 hits[7] = phi;
1487 hits[8] = RingNumber;
1488
1489 hits[9] = Pt;
1490 hits[10] = Pmom;
1491 hits[11] = mom[0];
1492 hits[12] = mom[1];
1493 hits[13] = mom[2];
1494
1495
642f15cf 1496 AddHit(gAlice->GetCurrentTrackNumber(), vol, hits);
61874e87 1497
1498 }
1499
47890cd3 1500}
1501
61874e87 1502//_____________________________________________________________________________
1503void AliVZEROv0::AddHit(Int_t track, Int_t *vol, Float_t *hits)
47890cd3 1504{
61874e87 1505 //
1506 // Add a VZERO hit
1507 //
47890cd3 1508
61874e87 1509 TClonesArray &lhits = *fHits;
1510 new(lhits[fNhits++]) AliVZEROhit(fIshunt,track,vol,hits);
47890cd3 1511}
1512
1513//---------------------------------------------------------------------
61874e87 1514void AliVZEROv0::AddDigits(Int_t *tracks, Int_t* digits)
47890cd3 1515{
1516
1517 TClonesArray &ldigits = *fDigits;
47890cd3 1518 new(ldigits[fNdigits++]) AliVZEROdigit(tracks, digits);
47890cd3 1519}
1520
47890cd3 1521//---------------------------------------------------------------------
1522void AliVZEROv0::MakeBranch(Option_t *option)
1523{
1524
1525 // Creates new branches in the current Root Tree
1526
1527
1528 char branchname[10];
1529 sprintf(branchname,"%s",GetName());
61874e87 1530 printf(" fBufferSize = %d \n",fBufferSize);
47890cd3 1531
660318ca 1532 const char *H = strstr(option,"H");
47890cd3 1533
88cb7938 1534 if (fHits && TreeH() && H) {
1535 TreeH()->Branch(branchname,&fHits, fBufferSize);
47890cd3 1536 printf("* AliDetector::MakeBranch * Making Branch %s for hits\n",branchname);
1537 }
1538
660318ca 1539 const char *D = strstr(option,"D");
47890cd3 1540 //
1541 if (fDigits && gAlice->TreeD() && D) {
1542 gAlice->TreeD()->Branch(branchname,&fDigits, fBufferSize);
1543 printf("* AliDetector::MakeBranch * Making Branch %s for digits\n",branchname);
61874e87 1544 }
1545
47890cd3 1546}