BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
SiliconConfigCalculate_Run8.C
Go to the documentation of this file.
1/*
2 * Description:
3 * Macro for calculating parameters of SILICON detector and writing them
4 * into the XML-file needed for simulation and reconstruction procedures.
5 *
6 * !!! IMPORTANT !!!
7 * The obtained XML-file SHOULD BE MOVED into the 'parameters/silicon/XMLConfigs' directory
8 *
9 * SILICON configuration: Run8_mods_6_10_14_18 (4 SI-stations (6-10-14-18 mods))
10 *
11 * Author: D. Baranov
12 * Created: 13.01.2022
13 * Updated: 09.02.2022 (all stations have been shifted 5 cm along the Z- axis)
14 * Updated: 12.12.2022 (new module type in the first station and
15 * positions have been corrected in accordance with
16 * the measurement scheme)
17 *
18 * 18.01.2023 (updated): shifts to z-positions of modules have been added to compensate
19 * for rotations of half-planes around the Y-axis
20
21 * 17.02.2023 (updated): new measurements
22 */
23
24#include "Rtypes.h"
25
26R__ADD_INCLUDE_PATH($VMCWORKDIR)
27
28#include "TString.h"
29
30#include <fstream>
31
32using namespace TMath;
33using namespace std;
34
35// Configuration of modules -----------------------------------------------------
36
38{
41}; // STANDARD_MODULE is (63x126)mm, LONG_MODULE is (63x186)mm
42const unsigned int NModuleSizes = 2;
43
44Double_t YGapBetweenPartsOfModule[NModuleSizes] = {0.0035 /*STANDARD_MODULE*/, 0.0035 /*LONG_MODULE*/};
45
46Double_t XModuleSize[NModuleSizes] = {6.3 /*STANDARD_MODULE*/, 6.3 /*LONG_MODULE*/};
47
48Double_t YModuleSizeUpperPart[NModuleSizes] = {6.3 /*STANDARD_MODULE*/, 9.3 /*LONG_MODULE*/};
49Double_t YModuleSizeLowerPart[NModuleSizes] = {6.3 /*STANDARD_MODULE*/, 9.3 /*LONG_MODULE*/};
50
57
58Double_t ZModuleSize[NModuleSizes] = {0.03 /*STANDARD_MODULE*/, 0.03 /*LONG_MODULE*/};
59
60Double_t XBevelSize[NModuleSizes] = {3.82 /*STANDARD_MODULE*/, 3.82 /*LONG_MODULE*/}; // x-bevel for a angled cut
61Double_t YBevelSize[NModuleSizes] = {3.82 /*STANDARD_MODULE*/, 3.82 /*LONG_MODULE*/}; // y-bevel for a angled cut
62
67
72
73// The next variables have two indices: the first one is a mod-size type, the second - a layer type
74// 0 - inclined strips (front side), 1 - straight strips (back side)
75
77 {0.1145, 0.10995}, /*STANDARD_MODULE*/
78 {0.1118, 0.11005} /*LONG_MODULE*/
79};
80
82 {0.1118, 0.11005}, /*STANDARD_MODULE*/
83 {0.1118, 0.11005} /*LONG_MODULE*/
84};
85
87 {0.1143, 0.1143}, /*STANDARD_MODULE*/
88 {0.1148, 0.1055} /*LONG_MODULE*/
89};
90
92 {0.1121, 0.1055}, /*STANDARD_MODULE*/
93 {0.1148, 0.1055} /*LONG_MODULE*/
94};
95
97 {0.1147, 0.1055}, /*STANDARD_MODULE*/
98 {0.1148, 0.1055} /*LONG_MODULE*/
99};
100
102 {0.1148, 0.1055}, /*STANDARD_MODULE*/
103 {0.1148, 0.1055} /*LONG_MODULE*/
104};
105
107 {0.1146, 0.1076}, /*STANDARD_MODULE*/
108 {0.1148, 0.1055} /*LONG_MODULE*/
109};
110//------------------------------------------------------------------------------
111
112// Parameters of layers ---------------------------------------------------------
113
115 {0.00795, 0.0}, /*STANDARD_MODULE*/
116 {0.00261, 0.0} /*LONG_MODULE*/
117};
118
120 {0.00780, 0.0}, /*STANDARD_MODULE*/
121 {0.00261, 0.0} /*LONG_MODULE*/
122};
123
125 {0.00675, 0.0}, /*STANDARD_MODULE*/
126 {0.00255, 0.0} /*LONG_MODULE*/
127};
128
130 {0.00675, 0.0}, /*STANDARD_MODULE*/
131 {0.00255, 0.0} /*LONG_MODULE*/
132};
133
135 {0.0, 0.0}, /*STANDARD_MODULE*/
136 {0.0, 0.0} /*LONG_MODULE*/
137};
138
140 {0.0, 0.0}, /*STANDARD_MODULE*/
141 {0.0, 0.0} /*LONG_MODULE*/
142};
143
145 {0.0, 0.0}, /*STANDARD_MODULE*/
146 {0.0, 0.0} /*LONG_MODULE*/
147};
148
150 {0.0, 0.0}, /*STANDARD_MODULE*/
151 {0.0, 0.0} /*LONG_MODULE*/
152};
153//------------------------------------------------------------------------------
154
161// Double_t XOrigUpLayer[2] = { XModuleSize - XLeftBorder[0], XModuleSize - XLeftBorder[1] };
162
169// Double_t XOrigLowLayer[2] = { XModuleSize - XLeftBorder[0], XModuleSize - XLeftBorder[1] };
170
179// Double_t YOrigUpLayer[2] = { YModuleSize - YModuleSizeUpperPart + YMiddleBorderUpperPart[0], YModuleSize -
180// YModuleSizeUpperPart + YMiddleBorderUpperPart[1] };
181
186// Double_t YOrigLowLayer[2] = { YBottomBorder[0], YBottomBorder[1] };
187
195// Double_t XSizeUpLayer[2] = { XModuleSize - (XLeftBorder[0] + XRightBorder[0]) , XModuleSize - (XLeftBorder[1] +
196// XRightBorder[1]) };
197
207// Double_t YSizeUpLayer[2] = { YModuleSizeUpperPart - (YTopBorder[0] + YMiddleBorderUpperPart[0]), YModuleSizeUpperPart
208// - (YTopBorder[1] + YMiddleBorderUpperPart[1]) };
209
217// Double_t XSizeLowLayer[2] = { XModuleSize - (XLeftBorder[0] + XRightBorder[0]) , XModuleSize - (XLeftBorder[1] +
218// XRightBorder[1]) };
219
229// Double_t YSizeLowLayer[2] = { YModuleSizeLowerPart - (YBottomBorder[0] + YMiddleBorderLowerPart[0]),
230// YModuleSizeLowerPart - (YBottomBorder[1] + YMiddleBorderLowerPart[1]) };
231
240// Double_t XLeftBorderUpperlayer[2] = { XOrigUpLayer[0] - XShiftFirstStripUpLayer[0], XOrigUpLayer[1] -
241// XShiftLastStripUpLayer[1] + XShiftLastStripUpLayer[1] };
242
251// Double_t XLeftBorderLowerlayer[2] = { XOrigUpLayer[0] - XShiftFirstStripLowLayer[0], XOrigUpLayer[1] -
252// XShiftLastStripLowLayer[1] + XShiftLastStripLowLayer[1] };
253
262// Double_t XRightBorderUpperlayer[2] = { XOrigUpLayer[0] - XSizeUpLayer[0] + XShiftLastStripUpLayer[0], XOrigUpLayer[1]
263// - XSizeUpLayer[1] + XShiftFirstStripUpLayer[1] };
264
274// Double_t XRightBorderLowerlayer[2] = { XOrigLowLayer[0] - XSizeLowLayer[0] + XShiftLastStripLowLayer[0],
275// XOrigLowLayer[1] - XSizeLowLayer[1] + XShiftFirstStripLowLayer[1] };
276
285// Double_t YLeftBorderUpperlayer[2] = { YOrigUpLayer[0] + YSizeUpLayer[0] - YShiftFirstStripUpLayer[0], YOrigUpLayer[1]
286// + YSizeUpLayer[1] - YShiftFirstStripUpLayer[1] };
287
297// Double_t YLeftBorderLowerlayer[2] = { YOrigLowLayer[0] + YSizeLowLayer[0] - YShiftFirstStripLowLayer[0],
298// YOrigLowLayer[1] + YSizeLowLayer[1] - YShiftFirstStripLowLayer[1] };
299
304// Double_t YRightBorderUpperlayer[2] = { YOrigUpLayer[0], YOrigUpLayer[1] };
305
310// Double_t YRightBorderLowerlayer[2] = { YOrigLowLayer[0], YOrigLowLayer[1] };
311//------------------------------------------------------------------------------
312
318
320 {LeftToRight, RightToLeft}, /*STANDARD_MODULE*/
321 {LeftToRight, RightToLeft} /*LONG_MODULE*/
322};
323// StripNumberingDirection StripDirection[2] = { LeftToRight, RightToLeft };
324
326 {0.01029019668, 0.0095}, /*STANDARD_MODULE*/
327 {0.0107150, 0.0095} /*LONG_MODULE*/
328};
329// Double_t PitchValue[2] = { 0.01029019668, 0.0095 };
330
332 {+2.5, +0.0}, /*STANDARD_MODULE*/
333 {+2.5, +0.0} /*LONG_MODULE*/
334};
335// Double_t StripAngle[2] = { +2.5, +0.0 }; // plus - clockwise, minus - anticlockwise
336
338 {0, 0}, /*STANDARD_MODULE*/
339 {0, 0} /*LONG_MODULE*/
340};
341// Int_t FirstStripNumberUpLayer[2] = { 0, 0 };
342
344 {26, 0}, /*STANDARD_MODULE*/
345 {37, 0} /*LONG_MODULE*/
346};
347// Int_t FirstStripNumberLowLayer[2] = { 26, 0 };
348
349// Dead zones (if you need) -----------------------------------------------------
350
351// find x and y projections of the bevel border thickness -----------------------
352
359// Double_t x_delta[2] = { XYBevelBorder[0]/TMath::Cos(BevelAngleRad), XYBevelBorder[1]/TMath::Cos(BevelAngleRad) };
360
367// Double_t y_delta[2] = { XYBevelBorder[0]/TMath::Sin(BevelAngleRad), XYBevelBorder[1]/TMath::Sin(BevelAngleRad) };
368//------------------------------------------------------------------------------
369
370// find shifts of the sensitive zone from module borders via the equation of a straight line for the inner bevel
371
373 {XLeftBorder[STANDARD_MODULE][0], XLeftBorder[STANDARD_MODULE][1]}, /*STANDARD_MODULE*/
374 {XLeftBorder[LONG_MODULE][0], XLeftBorder[LONG_MODULE][1]} /*LONG_MODULE*/
375};
376// Double_t x_delta_top_BP[2] = { XLeftBorder[0], XLeftBorder[1] };
377
388// Double_t y_delta_top_BP[2] = { TMath::Tan(TMath::PiOver2()+BevelAngleRad)*x_delta_top_BP[0] +
389// (YBevelSize+y_delta[0]), TMath::Tan(TMath::PiOver2()+BevelAngleRad)*x_delta_top_BP[1] + (YBevelSize+y_delta[1]) };
390
395// Double_t y_delta_bottom_BP[2] = { YBottomBorder[0], YBottomBorder[1] };
396
407// Double_t x_delta_bottom_BP[2] = { (y_delta_bottom_BP[0] - (YBevelSize +
408// y_delta[0]))/(TMath::Tan(TMath::PiOver2()+BevelAngleRad)), (y_delta_bottom_BP[1] - (YBevelSize +
409// y_delta[1]))/(TMath::Tan(TMath::PiOver2()+BevelAngleRad)) };
410
421// Double_t XDeadZone[2][3] = {
422// { XOrigLowLayer[0], XOrigLowLayer[0], XModuleSize - x_delta_bottom_BP[0] },
423// { XOrigLowLayer[1], XOrigLowLayer[1], XModuleSize - x_delta_bottom_BP[1] }
424// };
425
433// Double_t YDeadZone[2][3] = {
434// { YOrigLowLayer[0], y_delta_top_BP[0], YOrigLowLayer[0] },
435// { YOrigLowLayer[1], y_delta_top_BP[1], YOrigLowLayer[1] }
436// };
437//------------------------------------------------------------------------------
438
439// Configuration of SI-stations -------------------------------------------------
440
441// Set Parameters of SILICON detector -------------------------------------------
442const Int_t NStations = 4; // stations in the detector
443const Int_t NMaxModules = 22; // max. number of modules in a station
444
445const Int_t NModulesInStations[NStations] = {6, 10, 14, 18};
446
447//(X-Y-Z)Positions of stations (sensitive volumes)
448const Double_t XStationPositions[NStations] = {+0.622 /*0*/, +0.874 /*1*/, +0.981 /*2*/,
449 +1.0065 /*3*/}; // центр отверстия нижней п.плоскости
450const Double_t YStationPositions[NStations] = {-0.1495 /*0*/, -0.153 /*1*/, -0.1 /*2*/,
451 -0.0945 /*3*/}; // центр отверстия нижней п.плоскости
453 +14.123 /*0*/, +22.806 /*1*/, +31.367 /*2*/,
454 +40.1595 /*3*/}; // реперная точка (средняя измеренная позиция по нижним п.плоскостям (ближним к мишени))
455
456const Double_t z_shift_up = +2.68; // см, z-смещение от реперной точки (точки измерения) до локальной СК базовой точки
457 // для верхних полуплоскостей
458const Double_t z_shift_low = -0.61; // см, z-смещение от реперной точки (точки измерения) до локальной СК базовой
459 // точки для нижних полуплоскостей
460
461const Double_t z_mod_thick = 0.03; // см
462
463const Double_t x_dist_cent_base[NStations] = {21.7 /*0*/, 21.7 /*1*/, 27.7 /*2*/,
464 33.7 /*3*/}; // x-расcтояние от центра полуплоскости до базы
465const Double_t y_dist_cent_base[NStations] = {12.99 /*0*/, 16.29 /*1*/, 16.29 /*2*/,
466 16.29 /*3*/}; // y-расстояние от центра полуплоскости до базы
467
469 +5.003 /*0*/, +5.1265 /*1*/, +5.279 /*2*/,
470 +5.1125 /*3*/}; // см, z-сдвиг верхней полуплоскости относительно нижней для разных станций
472 +0.1295 /*0*/, -0.021 /*1*/, +0.006 /*2*/,
473 +0.2285 /*3*/}; // см, x-сдвиг центра отверстия верхней полуплоскости относительно нижней
475 +0.0695 /*0*/, -0.0035 /*1*/, -0.03 /*2*/,
476 +0.4585 /*3*/}; // см, y-сдвиг центра отверстия верхней полуплоскости относительно нижней
477
479 {-x_dist_cent_base[0] + x_shift_hp[0] + 30.850 /*0*/, -x_dist_cent_base[0] + x_shift_hp[0] + 24.852 /*1*/,
480 -x_dist_cent_base[0] + x_shift_hp[0] + 12.556 /*2*/,
481
482 -x_dist_cent_base[0] + 30.848 /*3*/, -x_dist_cent_base[0] + 24.845 /*4*/, -x_dist_cent_base[0] + 12.548 /*5*/},
483
484 {-x_dist_cent_base[1] + x_shift_hp[1] + 36.866 /*0*/, -x_dist_cent_base[1] + x_shift_hp[1] + 30.8505 /*1*/,
485 -x_dist_cent_base[1] + x_shift_hp[1] + 24.8645 /*2*/, -x_dist_cent_base[1] + x_shift_hp[1] + 12.5575 /*3*/,
486 -x_dist_cent_base[1] + x_shift_hp[1] + 6.5635 /*4*/,
487
488 -x_dist_cent_base[1] + 36.8425 /*5*/, -x_dist_cent_base[1] + 30.8505 /*6*/, -x_dist_cent_base[1] + 24.845 /*7*/,
489 -x_dist_cent_base[1] + 12.555 /*8*/, -x_dist_cent_base[1] + 6.585 /*9*/},
490
491 {-x_dist_cent_base[2] + x_shift_hp[2] + 48.8465 /*0*/, -x_dist_cent_base[2] + x_shift_hp[2] + 42.8315 /*1*/,
492 -x_dist_cent_base[2] + x_shift_hp[2] + 36.8485 /*2*/, -x_dist_cent_base[2] + x_shift_hp[2] + 30.8425 /*3*/,
493 -x_dist_cent_base[2] + x_shift_hp[2] + 18.5555 /*4*/, -x_dist_cent_base[2] + x_shift_hp[2] + 12.5395 /*5*/,
494 -x_dist_cent_base[2] + x_shift_hp[2] + 6.553 /*6*/,
495
496 -x_dist_cent_base[2] + 48.87 /*7*/, -x_dist_cent_base[2] + 42.859 /*8*/, -x_dist_cent_base[2] + 36.857 /*9*/,
497 -x_dist_cent_base[2] + 30.8515 /*10*/, -x_dist_cent_base[2] + 18.556 /*11*/, -x_dist_cent_base[2] + 12.555 /*12*/,
498 -x_dist_cent_base[2] + 6.5535 /*13*/},
499
500 {-x_dist_cent_base[3] + x_shift_hp[3] + 60.862 /*0*/, -x_dist_cent_base[3] + x_shift_hp[3] + 54.8545 /*1*/,
501 -x_dist_cent_base[3] + x_shift_hp[3] + 48.862 /*2*/, -x_dist_cent_base[3] + x_shift_hp[3] + 42.849 /*3*/,
502 -x_dist_cent_base[3] + x_shift_hp[3] + 36.851 /*4*/, -x_dist_cent_base[3] + x_shift_hp[3] + 24.5565 /*5*/,
503 -x_dist_cent_base[3] + x_shift_hp[3] + 18.549 /*6*/, -x_dist_cent_base[3] + x_shift_hp[3] + 12.5515 /*7*/,
504 -x_dist_cent_base[3] + x_shift_hp[3] + 6.651 /*8*/,
505
506 -x_dist_cent_base[3] + 60.8615 /*9*/, -x_dist_cent_base[3] + 54.85 /*10*/, -x_dist_cent_base[3] + 48.863 /*11*/,
507 -x_dist_cent_base[3] + 42.848 /*12*/, -x_dist_cent_base[3] + 36.849 /*13*/, -x_dist_cent_base[3] + 24.548 /*14*/,
508 -x_dist_cent_base[3] + 18.559 /*15*/, -x_dist_cent_base[3] + 12.5545 /*16*/, -x_dist_cent_base[3] + 6.553 /*17*/}};
510 {+y_dist_cent_base[0] + y_shift_hp[0] - 13.112 /*0*/, +y_dist_cent_base[0] + y_shift_hp[0] - 10.113 /*1*/,
511 +y_dist_cent_base[0] + y_shift_hp[0] - 13.086 /*2*/,
512
513 -y_dist_cent_base[0] + 13.100 /*3*/, -y_dist_cent_base[0] + 10.110 /*4*/, -y_dist_cent_base[0] + 13.098 /*5*/},
514
515 {+y_dist_cent_base[1] + y_shift_hp[1] - 16.427 /*0*/, +y_dist_cent_base[1] + y_shift_hp[1] - 16.425 /*1*/,
516 +y_dist_cent_base[1] + y_shift_hp[1] - 13.423 /*2*/, +y_dist_cent_base[1] + y_shift_hp[1] - 16.423 /*3*/,
517 +y_dist_cent_base[1] + y_shift_hp[1] - 16.425 /*4*/,
518
519 -y_dist_cent_base[1] + 16.432 /*5*/, -y_dist_cent_base[1] + 16.423 /*6*/, -y_dist_cent_base[1] + 13.428 /*7*/,
520 -y_dist_cent_base[1] + 16.425 /*8*/, -y_dist_cent_base[1] + 16.429 /*9*/},
521
522 {+y_dist_cent_base[2] + y_shift_hp[2] - 16.424 /*0*/, +y_dist_cent_base[2] + y_shift_hp[2] - 16.427 /*1*/,
523 +y_dist_cent_base[2] + y_shift_hp[2] - 16.427 /*2*/, +y_dist_cent_base[2] + y_shift_hp[2] - 13.411 /*3*/,
524 +y_dist_cent_base[2] + y_shift_hp[2] - 16.431 /*4*/, +y_dist_cent_base[2] + y_shift_hp[2] - 16.420 /*5*/,
525 +y_dist_cent_base[2] + y_shift_hp[2] - 16.430 /*6*/,
526
527 -y_dist_cent_base[2] + 16.420 /*7*/, -y_dist_cent_base[2] + 16.426 /*8*/, -y_dist_cent_base[2] + 16.427 /*9*/,
528 -y_dist_cent_base[2] + 13.428 /*10*/, -y_dist_cent_base[2] + 16.418 /*11*/, -y_dist_cent_base[2] + 16.426 /*12*/,
529 -y_dist_cent_base[2] + 16.417 /*13*/},
530
531 {+y_dist_cent_base[3] + y_shift_hp[3] - 16.414 /*0*/, +y_dist_cent_base[3] + y_shift_hp[3] - 16.414 /*1*/,
532 +y_dist_cent_base[3] + y_shift_hp[3] - 16.413 /*2*/, +y_dist_cent_base[3] + y_shift_hp[3] - 16.420 /*3*/,
533 +y_dist_cent_base[3] + y_shift_hp[3] - 13.417 /*4*/, +y_dist_cent_base[3] + y_shift_hp[3] - 16.426 /*5*/,
534 +y_dist_cent_base[3] + y_shift_hp[3] - 16.418 /*6*/, +y_dist_cent_base[3] + y_shift_hp[3] - 16.425 /*7*/,
535 +y_dist_cent_base[3] + y_shift_hp[3] - 16.427 /*8*/,
536
537 -y_dist_cent_base[3] + 16.430 /*9*/, -y_dist_cent_base[3] + 16.433 /*10*/, -y_dist_cent_base[3] + 16.433 /*11*/,
538 -y_dist_cent_base[3] + 16.430 /*12*/, -y_dist_cent_base[3] + 13.435 /*13*/, -y_dist_cent_base[3] + 16.430 /*14*/,
539 -y_dist_cent_base[3] + 16.434 /*15*/, -y_dist_cent_base[3] + 16.419 /*16*/, -y_dist_cent_base[3] + 16.426 /*17*/}};
541 {+z_shift_hp[0] + z_shift_up - 2.60 /*0*/, +z_shift_hp[0] + z_shift_up - 1.45 /*1*/,
542 +z_shift_hp[0] + z_shift_up - 2.70 /*2*/,
543
544 +z_shift_low - z_mod_thick + 2.61 /*3*/, +z_shift_low - z_mod_thick + 1.40 /*4*/,
545 +z_shift_low - z_mod_thick + 2.79 /*5*/},
546
547 {+z_shift_hp[1] + z_shift_up - 1.430 /*0*/, +z_shift_hp[1] + z_shift_up - 2.605 /*1*/,
548 +z_shift_hp[1] + z_shift_up - 1.435 /*2*/, +z_shift_hp[1] + z_shift_up - 2.750 /*3*/,
549 +z_shift_hp[1] + z_shift_up - 1.580 /*4*/,
550
551 +z_shift_low - z_mod_thick + 1.425 /*5*/, +z_shift_low - z_mod_thick + 2.595 /*6*/,
552 +z_shift_low - z_mod_thick + 1.445 /*7*/, +z_shift_low - z_mod_thick + 2.730 /*8*/,
553 +z_shift_low - z_mod_thick + 1.510 /*9*/},
554
555 {+z_shift_hp[2] + z_shift_up - 2.595 /*0*/, +z_shift_hp[2] + z_shift_up - 1.395 /*1*/,
556 +z_shift_hp[2] + z_shift_up - 2.665 /*2*/, +z_shift_hp[2] + z_shift_up - 1.425 /*3*/,
557 +z_shift_hp[2] + z_shift_up - 2.735 /*4*/, +z_shift_hp[2] + z_shift_up - 1.560 /*5*/,
558 +z_shift_hp[2] + z_shift_up - 2.705 /*6*/,
559
560 +z_shift_low - z_mod_thick + 2.580 /*7*/, +z_shift_low - z_mod_thick + 1.410 /*8*/,
561 +z_shift_low - z_mod_thick + 2.565 /*9*/, +z_shift_low - z_mod_thick + 1.390 /*10*/,
562 +z_shift_low - z_mod_thick + 2.755 /*11*/, +z_shift_low - z_mod_thick + 1.570 /*12*/,
563 +z_shift_low - z_mod_thick + 2.765 /*13*/},
564
565 {+z_shift_hp[3] + z_shift_up - 1.405 /*0*/, +z_shift_hp[3] + z_shift_up - 2.610 /*1*/,
566 +z_shift_hp[3] + z_shift_up - 1.460 /*2*/, +z_shift_hp[3] + z_shift_up - 2.605 /*3*/,
567 +z_shift_hp[3] + z_shift_up - 1.420 /*4*/, +z_shift_hp[3] + z_shift_up - 2.755 /*5*/,
568 +z_shift_hp[3] + z_shift_up - 1.580 /*6*/, +z_shift_hp[3] + z_shift_up - 2.760 /*7*/,
569 +z_shift_hp[3] + z_shift_up - 1.575 /*8*/,
570
571 +z_shift_low - z_mod_thick + 1.450 /*9*/, +z_shift_low - z_mod_thick + 2.575 /*10*/,
572 +z_shift_low - z_mod_thick + 1.445 /*11*/, +z_shift_low - z_mod_thick + 2.600 /*12*/,
573 +z_shift_low - z_mod_thick + 1.455 /*13*/, +z_shift_low - z_mod_thick + 2.745 /*14*/,
574 +z_shift_low - z_mod_thick + 1.575 /*15*/, +z_shift_low - z_mod_thick + 2.700 /*16*/,
575 +z_shift_low - z_mod_thick + 1.545 /*17*/}};
576// const Double_t ZModuleShifts[NStations][NMaxModules] = {
577// {+z_shift_hp[0]+z_shift_up - 2.60 + 0.105/*0*/, //the last value is a shift to compensate for a rotation of
578// half-plane around the Y-axis
579// +z_shift_hp[0]+z_shift_up - 1.45 + 0.084/*1*/,
580// +z_shift_hp[0]+z_shift_up - 2.70 + 0.063/*2*/,
581//
582// +z_shift_low - z_mod_thick + 2.61 + 0.121/*3*/,
583// +z_shift_low - z_mod_thick + 1.40 + 0.097/*4*/,
584// +z_shift_low - z_mod_thick + 2.79 + 0.072/*5*/},
585//
586// {+z_shift_hp[1]+z_shift_up - 1.430 + 0.247/*0*/,
587// +z_shift_hp[1]+z_shift_up - 2.605 + 0.206/*1*/,
588// +z_shift_hp[1]+z_shift_up - 1.435 + 0.164/*2*/,
589// +z_shift_hp[1]+z_shift_up - 2.750 + 0.122/*3*/,
590// +z_shift_hp[1]+z_shift_up - 1.580 + 0.081/*4*/,
591//
592// +z_shift_low - z_mod_thick + 1.425 + 0.107/*5*/,
593// +z_shift_low - z_mod_thick + 2.595 + 0.089/*6*/,
594// +z_shift_low - z_mod_thick + 1.445 + 0.071/*7*/,
595// +z_shift_low - z_mod_thick + 2.730 + 0.053/*8*/,
596// +z_shift_low - z_mod_thick + 1.510 + 0.035/*9*/},
597//
598// {+z_shift_hp[2]+z_shift_up - 2.595 + 0.128/*0*/,
599// +z_shift_hp[2]+z_shift_up - 1.395 + 0.112/*1*/,
600// +z_shift_hp[2]+z_shift_up - 2.665 + 0.096/*2*/,
601// +z_shift_hp[2]+z_shift_up - 1.425 + 0.080/*3*/,
602// +z_shift_hp[2]+z_shift_up - 2.735 + 0.063/*4*/,
603// +z_shift_hp[2]+z_shift_up - 1.560 + 0.043/*5*/,
604// +z_shift_hp[2]+z_shift_up - 2.705 + 0.031/*6*/,
605//
606// +z_shift_low - z_mod_thick + 2.580 + 0.484/*7*/,
607// +z_shift_low - z_mod_thick + 1.410 + 0.423/*8*/,
608// +z_shift_low - z_mod_thick + 2.565 + 0.362/*9*/,
609// +z_shift_low - z_mod_thick + 1.390 + 0.302/*10*/,
610// +z_shift_low - z_mod_thick + 2.755 + 0.241/*11*/,
611// +z_shift_low - z_mod_thick + 1.570 + 0.180/*12*/,
612// +z_shift_low - z_mod_thick + 2.765 + +0.119/*13*/},
613//
614// {+z_shift_hp[3]+z_shift_up - 1.405 + 0.112/*0*/,
615// +z_shift_hp[3]+z_shift_up - 2.610 + 0.101/*1*/,
616// +z_shift_hp[3]+z_shift_up - 1.460 + 0.090/*2*/,
617// +z_shift_hp[3]+z_shift_up - 2.605 + 0.078/*3*/,
618// +z_shift_hp[3]+z_shift_up - 1.420 + 0.067/*4*/,
619// +z_shift_hp[3]+z_shift_up - 2.755 + 0.056/*5*/,
620// +z_shift_hp[3]+z_shift_up - 1.580 + 0.044/*6*/,
621// +z_shift_hp[3]+z_shift_up - 2.760 + 0.033/*7*/,
622// +z_shift_hp[3]+z_shift_up - 1.575 + 0.022/*8*/,
623//
624// +z_shift_low - z_mod_thick + 1.450 - 0.381/*9*/,
625// +z_shift_low - z_mod_thick + 2.575 - 0.343/*10*/,
626// +z_shift_low - z_mod_thick + 1.445 - 0.305/*11*/,
627// +z_shift_low - z_mod_thick + 2.600 - 0.266/*12*/,
628// +z_shift_low - z_mod_thick + 1.455 - 0.228/*13*/,
629// +z_shift_low - z_mod_thick + 2.745 - 0.119/*14*/,
630// +z_shift_low - z_mod_thick + 1.575 - 0.151/*15*/,
631// +z_shift_low - z_mod_thick + 2.700 - 0.113/*16*/,
632// +z_shift_low - z_mod_thick + 1.545 - 0.075/*17*/}
633// };
634
635// Geometry parameters of modules
643
656
657// rotations of modules around y-axis by 180 deg.
659 {true /*0*/, true /*1*/, false /*2*/, true /*3*/, true /*4*/, false /*5*/},
660 {true /*0*/, true /*1*/, true /*2*/, false /*3*/, false /*4*/, true /*5*/, true /*6*/, true /*7*/, false /*8*/,
661 false /*9*/},
662 {true /*0*/, true /*1*/, true /*2*/, true /*3*/, false /*4*/, false /*5*/, false /*6*/, true /*7*/, true /*8*/,
663 true /*9*/, true /*10*/, false /*11*/, false /*12*/, false /*13*/},
664 {true /*0*/, true /*1*/, true /*2*/, true /*3*/, true /*4*/, false /*5*/, false /*6*/, false /*7*/, false /*8*/,
665 true /*9*/, true /*10*/, true /*11*/, true /*12*/, true /*13*/, false /*14*/, false /*15*/, false /*16*/,
666 false /*17*/}};
667
668// rotations of modules around x-axis by 180 deg.
670 {false /*0*/, false /*1*/, false /*2*/, true /*3*/, true /*4*/, true /*5*/},
671 {false /*0*/, false /*1*/, false /*2*/, false /*3*/, false /*4*/, true /*5*/, true /*6*/, true /*7*/, true /*8*/,
672 true /*9*/},
673 {false /*0*/, false /*1*/, false /*2*/, false /*3*/, false /*4*/, false /*5*/, false /*6*/, true /*7*/, true /*8*/,
674 true /*9*/, true /*10*/, true /*11*/, true /*12*/, true /*13*/},
675 {false /*0*/, false /*1*/, false /*2*/, false /*3*/, false /*4*/, false /*5*/, false /*6*/, false /*7*/,
676 false /*8*/, true /*9*/, true /*10*/, true /*11*/, true /*12*/, true /*13*/, true /*14*/, true /*15*/, true /*16*/,
677 true /*17*/}};
678
679// rotations of half-planes around y-axis (angles in degrees)
682 {+0.1209, +0.1257}, // st.0 (upper [0] and lower [1] half-planes)
683 {+0.1148, +0.3336}, // st.1
684 {+0.2566, -0.1563}, // st.2
685 {+0.2504, +0.7422} // st.3
686};
687//------------------------------------------------------------------------------
688
689// Function declarations
690void PrintInfo();
691void CalculateParameters(TString xml_file_name);
692//------------------------------------------------------------------------------
693
695{
696
697 PrintInfo();
698 CalculateParameters("SiliconRun8.xml");
699
700 cout << "It's the end"
701 << "\n";
702 // gApplication->Terminate();
703}
704
705//------------------------------------------------------------------------------
706
708{
709
710 cout << "----------------------------------------------------------------\n";
711 cout << "Parameters of the standard module 63x126 mm:\n";
712 cout << "\n";
713 cout << " Upper layer (inclined strips):\n";
714 cout << " orig(x:y) = ( " << XOrigUpLayer[STANDARD_MODULE][0] << " : " << YOrigUpLayer[STANDARD_MODULE][0]
715 << " )\n";
716 cout << " size(dx:dy) = ( " << XSizeUpLayer[STANDARD_MODULE][0] << " : " << YSizeUpLayer[STANDARD_MODULE][0]
717 << " )\n";
718 cout << " lborder(x:y) = ( " << XLeftBorderUpperlayer[STANDARD_MODULE][0] << " : "
719 << YLeftBorderUpperlayer[STANDARD_MODULE][0] << " )\n";
720 cout << " rborder(x:y) = ( " << XRightBorderUpperlayer[STANDARD_MODULE][0] << " : "
722 cout << " strip_direction = ";
724 cout << "LeftToRight\n";
725 else
726 cout << "RightToLeft\n";
727 cout << " pitch = " << PitchValue[STANDARD_MODULE][0] << "\n";
728 cout << " angle = " << StripAngle[STANDARD_MODULE][0] << " deg\n";
729 cout << " first_strip_number = " << FirstStripNumberUpLayer[STANDARD_MODULE][0] << "\n";
730 cout << "\n";
731
732 cout << " Lower layer (inclined strips):\n";
733 cout << " orig(x:y) = ( " << XOrigLowLayer[STANDARD_MODULE][0] << " : " << YOrigLowLayer[STANDARD_MODULE][0]
734 << " )\n";
735 cout << " size(dx:dy) = ( " << XSizeLowLayer[STANDARD_MODULE][0] << " : " << YSizeLowLayer[STANDARD_MODULE][0]
736 << " )\n";
737 cout << " lborder(x:y) = ( " << XLeftBorderLowerlayer[STANDARD_MODULE][0] << " : "
738 << YLeftBorderLowerlayer[STANDARD_MODULE][0] << " )\n";
739 cout << " rborder(x:y) = ( " << XRightBorderLowerlayer[STANDARD_MODULE][0] << " : "
741 cout << " strip_direction = ";
743 cout << "LeftToRight\n";
744 else
745 cout << "RightToLeft\n";
746 cout << " pitch = " << PitchValue[STANDARD_MODULE][0] << "\n";
747 cout << " angle = " << StripAngle[STANDARD_MODULE][0] << " deg\n";
748 cout << " first_strip_number = " << FirstStripNumberLowLayer[0] << "\n";
749 cout << " dead_zone(3 points):\n";
750 cout << " p0(x:y) = ( " << XDeadZone[STANDARD_MODULE][0][0] << " : " << YDeadZone[STANDARD_MODULE][0][0]
751 << " )\n";
752 cout << " p1(x:y) = ( " << XDeadZone[STANDARD_MODULE][0][1] << " : " << YDeadZone[STANDARD_MODULE][0][1]
753 << " )\n";
754 cout << " p2(x:y) = ( " << XDeadZone[STANDARD_MODULE][0][2] << " : " << YDeadZone[STANDARD_MODULE][0][2]
755 << " )\n";
756 cout << "\n";
757
758 cout << " Upper layer (straight strips):\n";
759 cout << " orig(x:y) = ( " << XOrigUpLayer[STANDARD_MODULE][1] << " : " << YOrigUpLayer[STANDARD_MODULE][1]
760 << " )\n";
761 cout << " size(dx:dy) = ( " << XSizeUpLayer[STANDARD_MODULE][1] << " : " << YSizeUpLayer[STANDARD_MODULE][1]
762 << " )\n";
763 cout << " lborder(x:y) = ( " << XLeftBorderUpperlayer[STANDARD_MODULE][1] << " : "
764 << YLeftBorderUpperlayer[STANDARD_MODULE][1] << " )\n";
765 cout << " rborder(x:y) = ( " << XRightBorderUpperlayer[STANDARD_MODULE][1] << " : "
767 cout << " strip_direction = ";
769 cout << "LeftToRight\n";
770 else
771 cout << "RightToLeft\n";
772 cout << " pitch = " << PitchValue[STANDARD_MODULE][1] << "\n";
773 cout << " angle = " << StripAngle[STANDARD_MODULE][1] << " deg\n";
774 cout << " first_strip_number = " << FirstStripNumberUpLayer[STANDARD_MODULE][1] << "\n";
775 cout << "\n";
776
777 cout << " Lower layer (straight strips):\n";
778 cout << " orig(x:y) = ( " << XOrigLowLayer[STANDARD_MODULE][1] << " : " << YOrigLowLayer[STANDARD_MODULE][1]
779 << " )\n";
780 cout << " size(dx:dy) = ( " << XSizeLowLayer[STANDARD_MODULE][1] << " : " << YSizeLowLayer[STANDARD_MODULE][1]
781 << " )\n";
782 cout << " lborder(x:y) = ( " << XLeftBorderLowerlayer[STANDARD_MODULE][1] << " : "
783 << YLeftBorderLowerlayer[STANDARD_MODULE][1] << " )\n";
784 cout << " rborder(x:y) = ( " << XRightBorderLowerlayer[STANDARD_MODULE][1] << " : "
786 cout << " strip_direction = ";
788 cout << "LeftToRight\n";
789 else
790 cout << "RightToLeft\n";
791 cout << " pitch = " << PitchValue[STANDARD_MODULE][1] << "\n";
792 cout << " angle = " << StripAngle[STANDARD_MODULE][1] << " deg\n";
793 cout << " first_strip_number = " << FirstStripNumberLowLayer[1] << "\n";
794 cout << " dead_zone(3 points):\n";
795 cout << " p0(x:y) = ( " << XDeadZone[STANDARD_MODULE][1][0] << " : " << YDeadZone[STANDARD_MODULE][1][0]
796 << " )\n";
797 cout << " p1(x:y) = ( " << XDeadZone[STANDARD_MODULE][1][1] << " : " << YDeadZone[STANDARD_MODULE][1][1]
798 << " )\n";
799 cout << " p2(x:y) = ( " << XDeadZone[STANDARD_MODULE][1][2] << " : " << YDeadZone[STANDARD_MODULE][1][2]
800 << " )\n";
801 cout << "\n";
802
803 cout << "----------------------------------------------------------------\n";
804
805 cout << "----------------------------------------------------------------\n";
806 cout << "Parameters of the long module 63x186 mm:\n";
807 cout << "\n";
808 cout << " Upper layer (inclined strips):\n";
809 cout << " orig(x:y) = ( " << XOrigUpLayer[LONG_MODULE][0] << " : " << YOrigUpLayer[LONG_MODULE][0] << " )\n";
810 cout << " size(dx:dy) = ( " << XSizeUpLayer[LONG_MODULE][0] << " : " << YSizeUpLayer[LONG_MODULE][0] << " )\n";
811 cout << " lborder(x:y) = ( " << XLeftBorderUpperlayer[LONG_MODULE][0] << " : "
812 << YLeftBorderUpperlayer[LONG_MODULE][0] << " )\n";
813 cout << " rborder(x:y) = ( " << XRightBorderUpperlayer[LONG_MODULE][0] << " : "
814 << YRightBorderUpperlayer[LONG_MODULE][0] << " )\n";
815 cout << " strip_direction = ";
817 cout << "LeftToRight\n";
818 else
819 cout << "RightToLeft\n";
820 cout << " pitch = " << PitchValue[LONG_MODULE][0] << "\n";
821 cout << " angle = " << StripAngle[LONG_MODULE][0] << " deg\n";
822 cout << " first_strip_number = " << FirstStripNumberUpLayer[LONG_MODULE][0] << "\n";
823 cout << "\n";
824
825 cout << " Lower layer (inclined strips):\n";
826 cout << " orig(x:y) = ( " << XOrigLowLayer[LONG_MODULE][0] << " : " << YOrigLowLayer[LONG_MODULE][0] << " )\n";
827 cout << " size(dx:dy) = ( " << XSizeLowLayer[LONG_MODULE][0] << " : " << YSizeLowLayer[LONG_MODULE][0] << " )\n";
828 cout << " lborder(x:y) = ( " << XLeftBorderLowerlayer[LONG_MODULE][0] << " : "
829 << YLeftBorderLowerlayer[LONG_MODULE][0] << " )\n";
830 cout << " rborder(x:y) = ( " << XRightBorderLowerlayer[LONG_MODULE][0] << " : "
831 << YRightBorderLowerlayer[LONG_MODULE][0] << " )\n";
832 cout << " strip_direction = ";
834 cout << "LeftToRight\n";
835 else
836 cout << "RightToLeft\n";
837 cout << " pitch = " << PitchValue[LONG_MODULE][0] << "\n";
838 cout << " angle = " << StripAngle[LONG_MODULE][0] << " deg\n";
839 cout << " first_strip_number = " << FirstStripNumberLowLayer[0] << "\n";
840 cout << " dead_zone(3 points):\n";
841 cout << " p0(x:y) = ( " << XDeadZone[LONG_MODULE][0][0] << " : " << YDeadZone[LONG_MODULE][0][0] << " )\n";
842 cout << " p1(x:y) = ( " << XDeadZone[LONG_MODULE][0][1] << " : " << YDeadZone[LONG_MODULE][0][1] << " )\n";
843 cout << " p2(x:y) = ( " << XDeadZone[LONG_MODULE][0][2] << " : " << YDeadZone[LONG_MODULE][0][2] << " )\n";
844 cout << "\n";
845
846 cout << " Upper layer (straight strips):\n";
847 cout << " orig(x:y) = ( " << XOrigUpLayer[LONG_MODULE][1] << " : " << YOrigUpLayer[LONG_MODULE][1] << " )\n";
848 cout << " size(dx:dy) = ( " << XSizeUpLayer[LONG_MODULE][1] << " : " << YSizeUpLayer[LONG_MODULE][1] << " )\n";
849 cout << " lborder(x:y) = ( " << XLeftBorderUpperlayer[LONG_MODULE][1] << " : "
850 << YLeftBorderUpperlayer[LONG_MODULE][1] << " )\n";
851 cout << " rborder(x:y) = ( " << XRightBorderUpperlayer[LONG_MODULE][1] << " : "
852 << YRightBorderUpperlayer[LONG_MODULE][1] << " )\n";
853 cout << " strip_direction = ";
855 cout << "LeftToRight\n";
856 else
857 cout << "RightToLeft\n";
858 cout << " pitch = " << PitchValue[LONG_MODULE][1] << "\n";
859 cout << " angle = " << StripAngle[LONG_MODULE][1] << " deg\n";
860 cout << " first_strip_number = " << FirstStripNumberUpLayer[LONG_MODULE][1] << "\n";
861 cout << "\n";
862
863 cout << " Lower layer (straight strips):\n";
864 cout << " orig(x:y) = ( " << XOrigLowLayer[LONG_MODULE][1] << " : " << YOrigLowLayer[LONG_MODULE][1] << " )\n";
865 cout << " size(dx:dy) = ( " << XSizeLowLayer[LONG_MODULE][1] << " : " << YSizeLowLayer[LONG_MODULE][1] << " )\n";
866 cout << " lborder(x:y) = ( " << XLeftBorderLowerlayer[LONG_MODULE][1] << " : "
867 << YLeftBorderLowerlayer[LONG_MODULE][1] << " )\n";
868 cout << " rborder(x:y) = ( " << XRightBorderLowerlayer[LONG_MODULE][1] << " : "
869 << YRightBorderLowerlayer[LONG_MODULE][1] << " )\n";
870 cout << " strip_direction = ";
872 cout << "LeftToRight\n";
873 else
874 cout << "RightToLeft\n";
875 cout << " pitch = " << PitchValue[LONG_MODULE][1] << "\n";
876 cout << " angle = " << StripAngle[LONG_MODULE][1] << " deg\n";
877 cout << " first_strip_number = " << FirstStripNumberLowLayer[1] << "\n";
878 cout << " dead_zone(3 points):\n";
879 cout << " p0(x:y) = ( " << XDeadZone[LONG_MODULE][1][0] << " : " << YDeadZone[LONG_MODULE][1][0] << " )\n";
880 cout << " p1(x:y) = ( " << XDeadZone[LONG_MODULE][1][1] << " : " << YDeadZone[LONG_MODULE][1][1] << " )\n";
881 cout << " p2(x:y) = ( " << XDeadZone[LONG_MODULE][1][2] << " : " << YDeadZone[LONG_MODULE][1][2] << " )\n";
882 cout << "\n";
883
884 cout << "----------------------------------------------------------------\n";
885}
886//------------------------------------------------------------------------------
887
888void CalculateParameters(TString xml_file_name)
889{
890
891 ofstream SiFileOut(xml_file_name.Data(), ios::out);
892
893 SiFileOut << "<StationSet>\n";
894 SiFileOut << "\n";
895
896 for (Int_t istation = 0; istation < NStations; ++istation) {
897
898 cout << "istation = " << istation << ": -----------------------------\n";
899
900 // module size in a station
901 ModuleSize module_size = STANDARD_MODULE;
902
903 //(!!!) Long modules (!!!)
904 if (istation == 0)
905 module_size = LONG_MODULE;
906
907 SiFileOut << "<!-- Station " << istation << " -->\n";
908
909 SiFileOut << "\t<Station";
910 SiFileOut << " xPosition=\"" << XStationPositions[istation] << "\"";
911 SiFileOut << " yPosition=\"" << YStationPositions[istation] << "\"";
912 SiFileOut << " zPosition=\"" << ZStationPositions[istation] << "\"";
913 SiFileOut << " rotAngleDeg=\""
914 << "0.0"
915 << "\"";
916 SiFileOut << " rotCenterX=\""
917 << "0.0"
918 << "\"";
919 SiFileOut << " rotCenterY=\""
920 << "0.0"
921 << "\"";
922 SiFileOut << ">\n";
923 SiFileOut << "\n";
924
925 for (Int_t imodule = 0; imodule < NModulesInStations[istation]; ++imodule) {
926
927 cout << " imodule = " << imodule << "\n";
928
929 SiFileOut << "\t\t<!-- module " << imodule << " -->\n";
930
931 SiFileOut << "\t\t<Module";
932 // SiFileOut << " xShift=\"" << XModuleShifts[istation][imodule] << "\"";
933 // SiFileOut << " yShift=\"" << YModuleShifts[istation][imodule] << "\"";
934 SiFileOut << " xShift=\"" << 0.0 << "\"";
935 SiFileOut << " yShift=\"" << 0.0 << "\"";
936 SiFileOut << " zShift=\"" << ZModuleShifts[istation][imodule] << "\"";
937 SiFileOut << ">\n";
938
939 // Transforms -------------------------------------------------------
940
941 // Translation: station: forward shifts
942 SiFileOut << "\t\t\t<Transform";
943 SiFileOut << " rotOrder=\""
944 << "XYZ"
945 << "\"";
946 SiFileOut << " xRotationDeg=\"" << 0.0 << "\"";
947 SiFileOut << " yRotationDeg=\"" << 0.0 << "\"";
948 SiFileOut << " zRotationDeg=\"" << 0.0 << "\"";
949 SiFileOut << " xTranslation=\"" << -XStationPositions[istation] << "\"";
950 SiFileOut << " yTranslation=\"" << -YStationPositions[istation] << "\"";
951 SiFileOut << " zTranslation=\"" << -ZStationPositions[istation] << "\"";
952 SiFileOut << " />\n";
953
954 // Translation: only for upper modules: forward shifts
955 if (imodule < NModulesInStations[istation] / 2) { // modules of upper half-plane
956 SiFileOut << "\t\t\t<Transform";
957 SiFileOut << " rotOrder=\""
958 << "XYZ"
959 << "\"";
960 SiFileOut << " xRotationDeg=\"" << 0.0 << "\"";
961 SiFileOut << " yRotationDeg=\"" << 0.0 << "\"";
962 SiFileOut << " zRotationDeg=\"" << 0.0 << "\"";
963 SiFileOut << " xTranslation=\"" << -x_shift_hp[istation] << "\"";
964 SiFileOut << " yTranslation=\"" << -y_shift_hp[istation] << "\"";
965 SiFileOut << " zTranslation=\"" << -z_shift_hp[istation] << "\"";
966 SiFileOut << " />\n";
967 }
968
969 // Rotation module (as a part of the whole half-plane) around Y-axis
970 SiFileOut << "\t\t\t<Transform";
971 SiFileOut << " rotOrder=\""
972 << "XYZ"
973 << "\"";
974 SiFileOut << " xRotationDeg=\"" << 0.0 << "\"";
975 if (imodule < NModulesInStations[istation] / 2)
976 SiFileOut << " yRotationDeg=\"" << HalfPlanesYRotations[istation][0]
977 << "\""; // modules of upper half-plane
978 else
979 SiFileOut << " yRotationDeg=\"" << HalfPlanesYRotations[istation][1]
980 << "\""; // modules of lower half-plane
981 SiFileOut << " zRotationDeg=\"" << 0.0 << "\"";
982 SiFileOut << " xTranslation=\"" << 0.0 << "\"";
983 SiFileOut << " yTranslation=\"" << 0.0 << "\"";
984 SiFileOut << " zTranslation=\"" << 0.0 << "\"";
985 SiFileOut << " />\n";
986
987 // Translation: only for upper modules: backward shifts
988 if (imodule < NModulesInStations[istation] / 2) { // modules of upper half-plane
989 SiFileOut << "\t\t\t<Transform";
990 SiFileOut << " rotOrder=\""
991 << "XYZ"
992 << "\"";
993 SiFileOut << " xRotationDeg=\"" << 0.0 << "\"";
994 SiFileOut << " yRotationDeg=\"" << 0.0 << "\"";
995 SiFileOut << " zRotationDeg=\"" << 0.0 << "\"";
996 SiFileOut << " xTranslation=\"" << +x_shift_hp[istation] << "\"";
997 SiFileOut << " yTranslation=\"" << +y_shift_hp[istation] << "\"";
998 SiFileOut << " zTranslation=\"" << +z_shift_hp[istation] << "\"";
999 SiFileOut << " />\n";
1000 }
1001
1002 // Translation: station: backward shifts
1003 SiFileOut << "\t\t\t<Transform";
1004 SiFileOut << " rotOrder=\""
1005 << "XYZ"
1006 << "\"";
1007 SiFileOut << " xRotationDeg=\"" << 0.0 << "\"";
1008 SiFileOut << " yRotationDeg=\"" << 0.0 << "\"";
1009 SiFileOut << " zRotationDeg=\"" << 0.0 << "\"";
1010 SiFileOut << " xTranslation=\"" << +XStationPositions[istation] << "\"";
1011 SiFileOut << " yTranslation=\"" << +YStationPositions[istation] << "\"";
1012 SiFileOut << " zTranslation=\"" << +ZStationPositions[istation] << "\"";
1013 SiFileOut << " />\n";
1014
1015 SiFileOut << "\n";
1016
1017 //------------------------------------------------------------------
1018
1019 // Notice!!!: here:
1020 // index "0" is a layer with inclined strips (the front side of the module)
1021 // index "1" is a layer with straight strips (the back side of the module)
1022 // "UpLayer" is the upper part of the module
1023 // "LowLayer" is the lower part of the module
1024
1025 Double_t xOrig_UpLayer[2];
1026 Double_t yOrig_UpLayer[2];
1027 Double_t xOrig_LowLayer[2];
1028 Double_t yOrig_LowLayer[2];
1029
1030 Double_t xSize_UpLayer[2];
1031 Double_t ySize_UpLayer[2];
1032 Double_t xSize_LowLayer[2];
1033 Double_t ySize_LowLayer[2];
1034
1035 Double_t xLBorder_UpLayer[2];
1036 Double_t yLBorder_UpLayer[2];
1037 Double_t xLBorder_LowLayer[2];
1038 Double_t yLBorder_LowLayer[2];
1039 Double_t xRBorder_UpLayer[2];
1040 Double_t yRBorder_UpLayer[2];
1041 Double_t xRBorder_LowLayer[2];
1042 Double_t yRBorder_LowLayer[2];
1043
1044 Double_t xDeadZone[2][3];
1045 Double_t yDeadZone[2][3];
1046
1047 Bool_t isDeadZone_UpLayer = false;
1048 Bool_t isDeadZone_LowLayer = false;
1049
1050 StripNumberingDirection stripDirection[2];
1051 Double_t pitchValue[2] = {PitchValue[module_size][0], PitchValue[module_size][1]};
1052 Double_t stripAngle[2];
1053 Int_t firstStripNumber_UpLayer[2];
1054 Int_t firstStripNumber_LowLayer[2];
1055
1056 if (ModulesYRotations[istation][imodule] == false && ModulesXRotations[istation][imodule] == false) {
1057
1058 xOrig_UpLayer[0] = XOrigUpLayer[module_size][0] + XModuleShifts[istation][imodule];
1059 yOrig_UpLayer[0] = YOrigUpLayer[module_size][0] + YModuleShifts[istation][imodule];
1060 xOrig_LowLayer[0] = XOrigLowLayer[module_size][0] + XModuleShifts[istation][imodule];
1061 yOrig_LowLayer[0] = YOrigLowLayer[module_size][0] + YModuleShifts[istation][imodule];
1062
1063 xOrig_UpLayer[1] = XOrigUpLayer[module_size][1] + XModuleShifts[istation][imodule];
1064 yOrig_UpLayer[1] = YOrigUpLayer[module_size][1] + YModuleShifts[istation][imodule];
1065 xOrig_LowLayer[1] = XOrigLowLayer[module_size][1] + XModuleShifts[istation][imodule];
1066 yOrig_LowLayer[1] = YOrigLowLayer[module_size][1] + YModuleShifts[istation][imodule];
1067
1068 xSize_UpLayer[0] = XSizeUpLayer[module_size][0];
1069 ySize_UpLayer[0] = YSizeUpLayer[module_size][0];
1070 xSize_LowLayer[0] = XSizeLowLayer[module_size][0];
1071 ySize_LowLayer[0] = YSizeLowLayer[module_size][0];
1072
1073 xSize_UpLayer[1] = XSizeUpLayer[module_size][1];
1074 ySize_UpLayer[1] = YSizeUpLayer[module_size][1];
1075 xSize_LowLayer[1] = XSizeLowLayer[module_size][1];
1076 ySize_LowLayer[1] = YSizeLowLayer[module_size][1];
1077
1078 xLBorder_UpLayer[0] = XLeftBorderUpperlayer[module_size][0] + XModuleShifts[istation][imodule];
1079 xLBorder_UpLayer[1] = XLeftBorderUpperlayer[module_size][1] + XModuleShifts[istation][imodule];
1080 yLBorder_UpLayer[0] = YLeftBorderUpperlayer[module_size][0] + YModuleShifts[istation][imodule];
1081 yLBorder_UpLayer[1] = YLeftBorderUpperlayer[module_size][1] + YModuleShifts[istation][imodule];
1082 xLBorder_LowLayer[0] = XLeftBorderLowerlayer[module_size][0] + XModuleShifts[istation][imodule];
1083 xLBorder_LowLayer[1] = XLeftBorderLowerlayer[module_size][1] + XModuleShifts[istation][imodule];
1084 yLBorder_LowLayer[0] = YLeftBorderLowerlayer[module_size][0] + YModuleShifts[istation][imodule];
1085 yLBorder_LowLayer[1] = YLeftBorderLowerlayer[module_size][1] + YModuleShifts[istation][imodule];
1086
1087 xRBorder_UpLayer[0] = XRightBorderUpperlayer[module_size][0] + XModuleShifts[istation][imodule];
1088 xRBorder_UpLayer[1] = XRightBorderUpperlayer[module_size][1] + XModuleShifts[istation][imodule];
1089 yRBorder_UpLayer[0] = YRightBorderUpperlayer[module_size][0] + YModuleShifts[istation][imodule];
1090 yRBorder_UpLayer[1] = YRightBorderUpperlayer[module_size][1] + YModuleShifts[istation][imodule];
1091 xRBorder_LowLayer[0] = XRightBorderLowerlayer[module_size][0] + XModuleShifts[istation][imodule];
1092 xRBorder_LowLayer[1] = XRightBorderLowerlayer[module_size][1] + XModuleShifts[istation][imodule];
1093 yRBorder_LowLayer[0] = YRightBorderLowerlayer[module_size][0] + YModuleShifts[istation][imodule];
1094 yRBorder_LowLayer[1] = YRightBorderLowerlayer[module_size][1] + YModuleShifts[istation][imodule];
1095
1096 for (Int_t ilayer = 0; ilayer < 2; ++ilayer) {
1097 for (Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1098 xDeadZone[ilayer][ipoint] =
1099 XDeadZone[module_size][ilayer][ipoint] + XModuleShifts[istation][imodule];
1100 yDeadZone[ilayer][ipoint] =
1101 YDeadZone[module_size][ilayer][ipoint] + YModuleShifts[istation][imodule];
1102 }
1103 }
1104
1105 if (ModulesTypes[istation][imodule] == ModuleType::BEVEL_MODULE
1106 || ModulesTypes[istation][imodule] == ModuleType::BEVEL_MODULE_HALF)
1107 {
1108 isDeadZone_UpLayer = false;
1109 isDeadZone_LowLayer = true;
1110 }
1111
1112 if (StripDirection[module_size][0] == LeftToRight)
1113 stripDirection[0] = LeftToRight;
1114 else
1115 stripDirection[0] = RightToLeft;
1116 if (StripDirection[module_size][1] == LeftToRight)
1117 stripDirection[1] = LeftToRight;
1118 else
1119 stripDirection[1] = RightToLeft;
1120
1121 stripAngle[0] = StripAngle[module_size][0];
1122 stripAngle[1] = StripAngle[module_size][1];
1123
1124 firstStripNumber_UpLayer[0] = FirstStripNumberUpLayer[module_size][0];
1125 firstStripNumber_UpLayer[1] = FirstStripNumberUpLayer[module_size][1];
1126 firstStripNumber_LowLayer[0] = FirstStripNumberLowLayer[module_size][0];
1127 firstStripNumber_LowLayer[1] = FirstStripNumberLowLayer[module_size][1];
1128 }
1129
1130 if (ModulesYRotations[istation][imodule] == true && ModulesXRotations[istation][imodule] == false) {
1131
1132 xOrig_UpLayer[0] =
1133 -XOrigUpLayer[module_size][0] + XSizeUpLayer[module_size][0] + XModuleShifts[istation][imodule];
1134 yOrig_UpLayer[0] = YOrigUpLayer[module_size][0] + YModuleShifts[istation][imodule];
1135 xOrig_LowLayer[0] =
1136 -XOrigLowLayer[module_size][0] + XSizeLowLayer[module_size][0] + XModuleShifts[istation][imodule];
1137 yOrig_LowLayer[0] = YOrigLowLayer[module_size][0] + YModuleShifts[istation][imodule];
1138
1139 xOrig_UpLayer[1] =
1140 -XOrigUpLayer[module_size][1] + XSizeUpLayer[module_size][1] + XModuleShifts[istation][imodule];
1141 yOrig_UpLayer[1] = YOrigUpLayer[module_size][1] + YModuleShifts[istation][imodule];
1142 xOrig_LowLayer[1] =
1143 -XOrigLowLayer[module_size][1] + XSizeLowLayer[module_size][1] + XModuleShifts[istation][imodule];
1144 yOrig_LowLayer[1] = YOrigLowLayer[module_size][1] + YModuleShifts[istation][imodule];
1145
1146 xSize_UpLayer[0] = XSizeUpLayer[module_size][0];
1147 ySize_UpLayer[0] = YSizeUpLayer[module_size][0];
1148 xSize_LowLayer[0] = XSizeLowLayer[module_size][0];
1149 ySize_LowLayer[0] = YSizeLowLayer[module_size][0];
1150
1151 xSize_UpLayer[1] = XSizeUpLayer[module_size][1];
1152 ySize_UpLayer[1] = YSizeUpLayer[module_size][1];
1153 xSize_LowLayer[1] = XSizeLowLayer[module_size][1];
1154 ySize_LowLayer[1] = YSizeLowLayer[module_size][1];
1155
1156 xLBorder_UpLayer[0] = -XRightBorderUpperlayer[module_size][0] + XModuleShifts[istation][imodule];
1157 xLBorder_UpLayer[1] = -XRightBorderUpperlayer[module_size][1] + XModuleShifts[istation][imodule];
1158 yLBorder_UpLayer[0] = YRightBorderUpperlayer[module_size][0] + YModuleShifts[istation][imodule];
1159 yLBorder_UpLayer[1] = YRightBorderUpperlayer[module_size][1] + YModuleShifts[istation][imodule];
1160 xLBorder_LowLayer[0] = -XRightBorderLowerlayer[module_size][0] + XModuleShifts[istation][imodule];
1161 xLBorder_LowLayer[1] = -XRightBorderLowerlayer[module_size][1] + XModuleShifts[istation][imodule];
1162 yLBorder_LowLayer[0] = YRightBorderLowerlayer[module_size][0] + YModuleShifts[istation][imodule];
1163 yLBorder_LowLayer[1] = YRightBorderLowerlayer[module_size][1] + YModuleShifts[istation][imodule];
1164
1165 xRBorder_UpLayer[0] = -XLeftBorderUpperlayer[module_size][0] + XModuleShifts[istation][imodule];
1166 xRBorder_UpLayer[1] = -XLeftBorderUpperlayer[module_size][1] + XModuleShifts[istation][imodule];
1167 yRBorder_UpLayer[0] = YLeftBorderUpperlayer[module_size][0] + YModuleShifts[istation][imodule];
1168 yRBorder_UpLayer[1] = YLeftBorderUpperlayer[module_size][1] + YModuleShifts[istation][imodule];
1169 xRBorder_LowLayer[0] = -XLeftBorderLowerlayer[module_size][0] + XModuleShifts[istation][imodule];
1170 xRBorder_LowLayer[1] = -XLeftBorderLowerlayer[module_size][1] + XModuleShifts[istation][imodule];
1171 yRBorder_LowLayer[0] = YLeftBorderLowerlayer[module_size][0] + YModuleShifts[istation][imodule];
1172 yRBorder_LowLayer[1] = YLeftBorderLowerlayer[module_size][1] + YModuleShifts[istation][imodule];
1173
1174 for (Int_t ilayer = 0; ilayer < 2; ++ilayer) {
1175 for (Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1176 xDeadZone[ilayer][ipoint] =
1177 -XDeadZone[module_size][ilayer][ipoint] + XModuleShifts[istation][imodule];
1178 yDeadZone[ilayer][ipoint] =
1179 YDeadZone[module_size][ilayer][ipoint] + YModuleShifts[istation][imodule];
1180 }
1181 }
1182
1183 if (ModulesTypes[istation][imodule] == ModuleType::BEVEL_MODULE
1184 || ModulesTypes[istation][imodule] == ModuleType::BEVEL_MODULE_HALF)
1185 {
1186 isDeadZone_UpLayer = false;
1187 isDeadZone_LowLayer = true;
1188 }
1189
1190 if (StripDirection[module_size][0] == LeftToRight)
1191 stripDirection[0] = RightToLeft;
1192 else
1193 stripDirection[0] = LeftToRight;
1194 if (StripDirection[module_size][1] == LeftToRight)
1195 stripDirection[1] = RightToLeft;
1196 else
1197 stripDirection[1] = LeftToRight;
1198
1199 stripAngle[0] = -StripAngle[module_size][0];
1200 stripAngle[1] = -StripAngle[module_size][1];
1201
1202 firstStripNumber_UpLayer[0] = FirstStripNumberUpLayer[module_size][0];
1203 firstStripNumber_UpLayer[1] = FirstStripNumberUpLayer[module_size][1];
1204 firstStripNumber_LowLayer[0] = FirstStripNumberLowLayer[module_size][0];
1205 firstStripNumber_LowLayer[1] = FirstStripNumberLowLayer[module_size][1];
1206 }
1207
1208 if (ModulesYRotations[istation][imodule] == false && ModulesXRotations[istation][imodule] == true) {
1209
1210 xOrig_UpLayer[0] = XOrigUpLayer[module_size][0] + XModuleShifts[istation][imodule];
1211 yOrig_UpLayer[0] = -YOrigUpLayer[module_size][0] + YMiddleBorderLowerPart[module_size][0]
1212 + YMiddleBorderUpperPart[module_size][0] + YGapBetweenPartsOfModule[module_size]
1213 + YModuleShifts[istation][imodule];
1214 xOrig_LowLayer[0] = XOrigLowLayer[module_size][0] + XModuleShifts[istation][imodule];
1215 yOrig_LowLayer[0] = -YOrigLowLayer[module_size][0] - YSizeLowLayer[module_size][0]
1216 - YMiddleBorderLowerPart[module_size][0] - YMiddleBorderUpperPart[module_size][0]
1217 - YGapBetweenPartsOfModule[module_size] - YSizeUpLayer[module_size][0]
1218 + YModuleShifts[istation][imodule];
1219
1220 xOrig_UpLayer[1] = XOrigUpLayer[module_size][1] + XModuleShifts[istation][imodule];
1221 yOrig_UpLayer[1] = -YOrigUpLayer[module_size][1] + YMiddleBorderLowerPart[module_size][1]
1222 + YMiddleBorderUpperPart[module_size][1] + YGapBetweenPartsOfModule[module_size]
1223 + YModuleShifts[istation][imodule];
1224 xOrig_LowLayer[1] = XOrigLowLayer[module_size][1] + XModuleShifts[istation][imodule];
1225 yOrig_LowLayer[1] = -YOrigLowLayer[module_size][1] - YSizeLowLayer[module_size][1]
1226 - YMiddleBorderLowerPart[module_size][1] - YMiddleBorderUpperPart[module_size][1]
1227 - YGapBetweenPartsOfModule[module_size] - YSizeUpLayer[module_size][1]
1228 + YModuleShifts[istation][imodule];
1229
1230 xSize_UpLayer[0] = XSizeLowLayer[module_size][0];
1231 ySize_UpLayer[0] = YSizeLowLayer[module_size][0];
1232 xSize_LowLayer[0] = XSizeUpLayer[module_size][0];
1233 ySize_LowLayer[0] = YSizeUpLayer[module_size][0];
1234
1235 xSize_UpLayer[1] = XSizeLowLayer[module_size][1];
1236 ySize_UpLayer[1] = YSizeLowLayer[module_size][1];
1237 xSize_LowLayer[1] = XSizeUpLayer[module_size][1];
1238 ySize_LowLayer[1] = YSizeUpLayer[module_size][1];
1239
1240 xLBorder_UpLayer[0] = XLeftBorderLowerlayer[module_size][0] + XModuleShifts[istation][imodule];
1241 xLBorder_UpLayer[1] = XLeftBorderLowerlayer[module_size][1] + XModuleShifts[istation][imodule];
1242 yLBorder_UpLayer[0] = -YLeftBorderLowerlayer[module_size][0] + YModuleShifts[istation][imodule];
1243 yLBorder_UpLayer[1] = -YLeftBorderLowerlayer[module_size][1] + YModuleShifts[istation][imodule];
1244 xLBorder_LowLayer[0] = XLeftBorderUpperlayer[module_size][0] + XModuleShifts[istation][imodule];
1245 xLBorder_LowLayer[1] = XLeftBorderUpperlayer[module_size][1] + XModuleShifts[istation][imodule];
1246 yLBorder_LowLayer[0] = -YLeftBorderUpperlayer[module_size][0] + YModuleShifts[istation][imodule];
1247 yLBorder_LowLayer[1] = -YLeftBorderUpperlayer[module_size][1] + YModuleShifts[istation][imodule];
1248
1249 xRBorder_UpLayer[0] = XRightBorderLowerlayer[module_size][0] + XModuleShifts[istation][imodule];
1250 xRBorder_UpLayer[1] = XRightBorderLowerlayer[module_size][1] + XModuleShifts[istation][imodule];
1251 yRBorder_UpLayer[0] = -YRightBorderLowerlayer[module_size][0] + YModuleShifts[istation][imodule];
1252 yRBorder_UpLayer[1] = -YRightBorderLowerlayer[module_size][1] + YModuleShifts[istation][imodule];
1253 xRBorder_LowLayer[0] = XRightBorderUpperlayer[module_size][0] + XModuleShifts[istation][imodule];
1254 xRBorder_LowLayer[1] = XRightBorderUpperlayer[module_size][1] + XModuleShifts[istation][imodule];
1255 yRBorder_LowLayer[0] = -YRightBorderUpperlayer[module_size][0] + YModuleShifts[istation][imodule];
1256 yRBorder_LowLayer[1] = -YRightBorderUpperlayer[module_size][1] + YModuleShifts[istation][imodule];
1257
1258 for (Int_t ilayer = 0; ilayer < 2; ++ilayer) {
1259 for (Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1260 xDeadZone[ilayer][ipoint] =
1261 XDeadZone[module_size][ilayer][ipoint] + XModuleShifts[istation][imodule];
1262 yDeadZone[ilayer][ipoint] =
1263 -YDeadZone[module_size][ilayer][ipoint] + YModuleShifts[istation][imodule];
1264 }
1265 }
1266
1267 if (ModulesTypes[istation][imodule] == ModuleType::BEVEL_MODULE
1268 || ModulesTypes[istation][imodule] == ModuleType::BEVEL_MODULE_HALF)
1269 {
1270 isDeadZone_UpLayer = true;
1271 isDeadZone_LowLayer = false;
1272 }
1273
1274 if (StripDirection[module_size][0] == LeftToRight)
1275 stripDirection[0] = LeftToRight;
1276 else
1277 stripDirection[0] = RightToLeft;
1278 if (StripDirection[module_size][1] == LeftToRight)
1279 stripDirection[1] = LeftToRight;
1280 else
1281 stripDirection[1] = RightToLeft;
1282
1283 stripAngle[0] = -StripAngle[module_size][0];
1284 stripAngle[1] = -StripAngle[module_size][1];
1285
1286 firstStripNumber_UpLayer[0] = FirstStripNumberLowLayer[module_size][0];
1287 firstStripNumber_UpLayer[1] = FirstStripNumberLowLayer[module_size][1];
1288 firstStripNumber_LowLayer[0] = FirstStripNumberUpLayer[module_size][0];
1289 firstStripNumber_LowLayer[1] = FirstStripNumberUpLayer[module_size][1];
1290 }
1291
1292 if (ModulesYRotations[istation][imodule] == true && ModulesXRotations[istation][imodule] == true) {
1293
1294 xOrig_UpLayer[0] =
1295 -XOrigUpLayer[module_size][0] + XSizeUpLayer[module_size][0] + XModuleShifts[istation][imodule];
1296 yOrig_UpLayer[0] = -YOrigUpLayer[module_size][0] + YMiddleBorderLowerPart[module_size][0]
1297 + YMiddleBorderUpperPart[module_size][0] + YGapBetweenPartsOfModule[module_size]
1298 + YModuleShifts[istation][imodule];
1299 xOrig_LowLayer[0] =
1300 -XOrigLowLayer[module_size][0] + XSizeLowLayer[module_size][0] + XModuleShifts[istation][imodule];
1301 yOrig_LowLayer[0] = -YOrigLowLayer[module_size][0] - YSizeLowLayer[module_size][0]
1302 - YMiddleBorderLowerPart[module_size][0] - YMiddleBorderUpperPart[module_size][0]
1303 - YGapBetweenPartsOfModule[module_size] - YSizeUpLayer[module_size][0]
1304 + YModuleShifts[istation][imodule];
1305
1306 xOrig_UpLayer[1] =
1307 -XOrigUpLayer[module_size][1] + XSizeUpLayer[module_size][1] + XModuleShifts[istation][imodule];
1308 yOrig_UpLayer[1] = -YOrigUpLayer[module_size][1] + YMiddleBorderLowerPart[module_size][1]
1309 + YMiddleBorderUpperPart[module_size][1] + YGapBetweenPartsOfModule[module_size]
1310 + YModuleShifts[istation][imodule];
1311 xOrig_LowLayer[1] =
1312 -XOrigLowLayer[module_size][1] + XSizeLowLayer[module_size][1] + XModuleShifts[istation][imodule];
1313 yOrig_LowLayer[1] = -YOrigLowLayer[module_size][1] - YSizeLowLayer[module_size][1]
1314 - YMiddleBorderLowerPart[module_size][1] - YMiddleBorderUpperPart[module_size][1]
1315 - YGapBetweenPartsOfModule[module_size] - YSizeUpLayer[module_size][1]
1316 + YModuleShifts[istation][imodule];
1317
1318 xSize_UpLayer[0] = XSizeLowLayer[module_size][0];
1319 ySize_UpLayer[0] = YSizeLowLayer[module_size][0];
1320 xSize_LowLayer[0] = XSizeUpLayer[module_size][0];
1321 ySize_LowLayer[0] = YSizeUpLayer[module_size][0];
1322
1323 xSize_UpLayer[1] = XSizeLowLayer[module_size][1];
1324 ySize_UpLayer[1] = YSizeLowLayer[module_size][1];
1325 xSize_LowLayer[1] = XSizeUpLayer[module_size][1];
1326 ySize_LowLayer[1] = YSizeUpLayer[module_size][1];
1327
1328 xLBorder_UpLayer[0] = -XRightBorderLowerlayer[module_size][0] + XModuleShifts[istation][imodule];
1329 xLBorder_UpLayer[1] = -XRightBorderLowerlayer[module_size][1] + XModuleShifts[istation][imodule];
1330 yLBorder_UpLayer[0] = -YRightBorderLowerlayer[module_size][0] + YModuleShifts[istation][imodule];
1331 yLBorder_UpLayer[1] = -YRightBorderLowerlayer[module_size][1] + YModuleShifts[istation][imodule];
1332 xLBorder_LowLayer[0] = -XRightBorderUpperlayer[module_size][0] + XModuleShifts[istation][imodule];
1333 xLBorder_LowLayer[1] = -XRightBorderUpperlayer[module_size][1] + XModuleShifts[istation][imodule];
1334 yLBorder_LowLayer[0] = -YRightBorderUpperlayer[module_size][0] + YModuleShifts[istation][imodule];
1335 yLBorder_LowLayer[1] = -YRightBorderUpperlayer[module_size][1] + YModuleShifts[istation][imodule];
1336
1337 xRBorder_UpLayer[0] = -XLeftBorderLowerlayer[module_size][0] + XModuleShifts[istation][imodule];
1338 xRBorder_UpLayer[1] = -XLeftBorderLowerlayer[module_size][1] + XModuleShifts[istation][imodule];
1339 yRBorder_UpLayer[0] = -YLeftBorderLowerlayer[module_size][0] + YModuleShifts[istation][imodule];
1340 yRBorder_UpLayer[1] = -YLeftBorderLowerlayer[module_size][1] + YModuleShifts[istation][imodule];
1341 xRBorder_LowLayer[0] = -XLeftBorderUpperlayer[module_size][0] + XModuleShifts[istation][imodule];
1342 xRBorder_LowLayer[1] = -XLeftBorderUpperlayer[module_size][1] + XModuleShifts[istation][imodule];
1343 yRBorder_LowLayer[0] = -YLeftBorderUpperlayer[module_size][0] + YModuleShifts[istation][imodule];
1344 yRBorder_LowLayer[1] = -YLeftBorderUpperlayer[module_size][1] + YModuleShifts[istation][imodule];
1345
1346 for (Int_t ilayer = 0; ilayer < 2; ++ilayer) {
1347 for (Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1348 xDeadZone[ilayer][ipoint] =
1349 -XDeadZone[module_size][ilayer][ipoint] + XModuleShifts[istation][imodule];
1350 yDeadZone[ilayer][ipoint] =
1351 -YDeadZone[module_size][ilayer][ipoint] + YModuleShifts[istation][imodule];
1352 }
1353 }
1354
1355 if (ModulesTypes[istation][imodule] == ModuleType::BEVEL_MODULE
1356 || ModulesTypes[istation][imodule] == ModuleType::BEVEL_MODULE_HALF)
1357 {
1358 isDeadZone_UpLayer = true;
1359 isDeadZone_LowLayer = false;
1360 }
1361
1362 if (StripDirection[module_size][0] == LeftToRight)
1363 stripDirection[0] = RightToLeft;
1364 else
1365 stripDirection[0] = LeftToRight;
1366 if (StripDirection[module_size][1] == LeftToRight)
1367 stripDirection[1] = RightToLeft;
1368 else
1369 stripDirection[1] = LeftToRight;
1370
1371 stripAngle[0] = StripAngle[module_size][0];
1372 stripAngle[1] = StripAngle[module_size][1];
1373
1374 firstStripNumber_UpLayer[0] = FirstStripNumberLowLayer[module_size][0];
1375 firstStripNumber_UpLayer[1] = FirstStripNumberLowLayer[module_size][1];
1376 firstStripNumber_LowLayer[0] = FirstStripNumberUpLayer[module_size][0];
1377 firstStripNumber_LowLayer[1] = FirstStripNumberUpLayer[module_size][1];
1378 }
1379
1380 cout << " ---\n";
1381 cout << " Orig_UpLayer[0](x:y) = ( " << xOrig_UpLayer[0] << " : " << yOrig_UpLayer[0] << " )\n";
1382 cout << " Orig_LowLayer[0](x:y) = ( " << xOrig_LowLayer[0] << " : " << yOrig_LowLayer[0] << " )\n";
1383 cout << " Orig_UpLayer[1](x:y) = ( " << xOrig_UpLayer[1] << " : " << yOrig_UpLayer[1] << " )\n";
1384 cout << " Orig_LowLayer[1](x:y) = ( " << xOrig_LowLayer[1] << " : " << yOrig_LowLayer[1] << " )\n";
1385 cout << "\n\n";
1386
1387 cout << " ---\n";
1388 cout << " Size_UpLayer[0](dx:dy) = ( " << xSize_UpLayer[0] << " : " << ySize_UpLayer[0] << " )\n";
1389 cout << " Size_LowLayer[0](dx:dy) = ( " << xSize_LowLayer[0] << " : " << ySize_LowLayer[0] << " )\n";
1390 cout << " Size_UpLayer[1](dx:dy) = ( " << xSize_UpLayer[1] << " : " << ySize_UpLayer[1] << " )\n";
1391 cout << " Size_LowLayer[1](dx:dy) = ( " << xSize_LowLayer[1] << " : " << ySize_LowLayer[1] << " )\n";
1392 cout << "\n\n";
1393
1394 cout << " ---\n";
1395 cout << " LBorder_UpLayer[0](x:y) = ( " << xLBorder_UpLayer[0] << " : " << yLBorder_UpLayer[0] << " )\n";
1396 cout << " RBorder_UpLayer[0](x:y) = ( " << xRBorder_UpLayer[0] << " : " << yRBorder_UpLayer[0] << " )\n";
1397 cout << "\n";
1398 cout << " LBorder_LowLayer[0](x:y) = ( " << xLBorder_LowLayer[0] << " : " << yLBorder_LowLayer[0]
1399 << " )\n";
1400 cout << " RBorder_LowLayer[0](x:y) = ( " << xRBorder_LowLayer[0] << " : " << yRBorder_LowLayer[0]
1401 << " )\n";
1402 cout << "\n";
1403
1404 cout << " LBorder_UpLayer[1](x:y) = ( " << xLBorder_UpLayer[1] << " : " << yLBorder_UpLayer[1] << " )\n";
1405 cout << " RBorder_UpLayer[1](x:y) = ( " << xRBorder_UpLayer[1] << " : " << yRBorder_UpLayer[1] << " )\n";
1406 cout << "\n";
1407 cout << " LBorder_LowLayer[1](x:y) = ( " << xLBorder_LowLayer[1] << " : " << yLBorder_LowLayer[1]
1408 << " )\n";
1409 cout << " RBorder_LowLayer[1](x:y) = ( " << xRBorder_LowLayer[1] << " : " << yRBorder_LowLayer[1]
1410 << " )\n";
1411 cout << "\n\n";
1412
1413 cout << " ---\n";
1414 cout << " DeadZone[0]:\n";
1415 cout << " p0(x:y) = ( " << xDeadZone[0][0] << " : " << yDeadZone[0][0] << " )\n";
1416 cout << " p1(x:y) = ( " << xDeadZone[0][1] << " : " << yDeadZone[0][1] << " )\n";
1417 cout << " p2(x:y) = ( " << xDeadZone[0][2] << " : " << yDeadZone[0][2] << " )\n";
1418 cout << "\n";
1419
1420 cout << " DeadZone[1]:\n";
1421 cout << " p0(x:y) = ( " << xDeadZone[1][0] << " : " << yDeadZone[1][0] << " )\n";
1422 cout << " p1(x:y) = ( " << xDeadZone[1][1] << " : " << yDeadZone[1][1] << " )\n";
1423 cout << " p2(x:y) = ( " << xDeadZone[1][2] << " : " << yDeadZone[1][2] << " )\n";
1424 cout << "\n";
1425
1426 cout << " ---\n";
1427 cout << " stripDirection[0] = ";
1428 if (stripDirection[0] == LeftToRight)
1429 cout << "LeftToRight\n";
1430 else
1431 cout << "RightToLeft\n";
1432 cout << " stripDirection[1] = ";
1433 if (stripDirection[1] == LeftToRight)
1434 cout << "LeftToRight\n";
1435 else
1436 cout << "RightToLeft\n";
1437 cout << "\n";
1438
1439 cout << " ---\n";
1440 cout << " pitchValue[0] = " << pitchValue[0] << "\n";
1441 cout << " pitchValue[1] = " << pitchValue[1] << "\n";
1442 cout << "\n";
1443
1444 cout << "---\n";
1445 cout << " stripAngle[0] = " << stripAngle[0] << "\n";
1446 cout << " stripAngle[1] = " << stripAngle[1] << "\n";
1447 cout << "\n";
1448
1449 cout << "---\n";
1450 cout << " firstStripNumber_UpLayer[0] = " << firstStripNumber_UpLayer[0] << "\n";
1451 cout << " firstStripNumber_LowLayer[0] = " << firstStripNumber_LowLayer[0] << "\n";
1452 cout << " firstStripNumber_UpLayer[1] = " << firstStripNumber_UpLayer[1] << "\n";
1453 cout << " firstStripNumber_LowLayer[1] = " << firstStripNumber_LowLayer[1] << "\n";
1454 cout << "\n";
1455
1456 if (ModulesTypes[istation][imodule] == ModuleType::BEVEL_MODULE
1457 || ModulesTypes[istation][imodule] == ModuleType::RIGHT_ANGLED_MODULE)
1458 {
1459
1460 // upper part of module: straight strips = back side ------------
1461 SiFileOut << "\t\t\t<Layer";
1462 SiFileOut << " zoneID=\""
1463 << "0"
1464 << "\"";
1465 SiFileOut << " type=\""
1466 << "lower"
1467 << "\"";
1468 SiFileOut << " firstStripNumber=\"" << firstStripNumber_UpLayer[1] << "\"";
1469 SiFileOut << " stripAngle=\"" << stripAngle[1] << "\"";
1470 SiFileOut << " pitch=\"" << pitchValue[1] << "\"";
1471 SiFileOut << " xorig=\"" << xOrig_UpLayer[1] << "\"";
1472 SiFileOut << " yorig=\"" << yOrig_UpLayer[1] << "\"";
1473 SiFileOut << " xsize=\"" << xSize_UpLayer[1] << "\"";
1474 SiFileOut << " ysize=\"" << ySize_UpLayer[1] << "\"";
1475 SiFileOut << " stripDirection=\"";
1476 if (stripDirection[1] == LeftToRight)
1477 SiFileOut << "LeftToRight\"";
1478 else
1479 SiFileOut << "RightToLeft\"";
1480 SiFileOut << " lxborder=\"" << xLBorder_UpLayer[1] << "\"";
1481 SiFileOut << " lyborder=\"" << yLBorder_UpLayer[1] << "\"";
1482 SiFileOut << " rxborder=\"" << xRBorder_UpLayer[1] << "\"";
1483 SiFileOut << " ryborder=\"" << yRBorder_UpLayer[1] << "\"";
1484 SiFileOut << ">";
1485
1486 if (isDeadZone_UpLayer == true) {
1487 SiFileOut << "\n";
1488 SiFileOut << "\t\t\t\t<DeadZone>\n";
1489 for (Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1490 SiFileOut << "\t\t\t\t\t<DeadPoint";
1491 SiFileOut << " x=\"" << xDeadZone[1][ipoint] << "\"";
1492 SiFileOut << " y=\"" << yDeadZone[1][ipoint] << "\"";
1493 SiFileOut << " />\n";
1494 }
1495 SiFileOut << "\t\t\t\t</DeadZone>\n\t\t\t";
1496 }
1497 SiFileOut << "</Layer>\n";
1498 //--------------------------------------------------------------
1499
1500 // lower part of module: straight strips = back side ------------
1501 SiFileOut << "\t\t\t<Layer";
1502 SiFileOut << " zoneID=\""
1503 << "0"
1504 << "\"";
1505 SiFileOut << " type=\""
1506 << "lower"
1507 << "\"";
1508 SiFileOut << " firstStripNumber=\"" << firstStripNumber_LowLayer[1] << "\"";
1509 SiFileOut << " stripAngle=\"" << stripAngle[1] << "\"";
1510 SiFileOut << " pitch=\"" << pitchValue[1] << "\"";
1511 SiFileOut << " xorig=\"" << xOrig_LowLayer[1] << "\"";
1512 SiFileOut << " yorig=\"" << yOrig_LowLayer[1] << "\"";
1513 SiFileOut << " xsize=\"" << xSize_LowLayer[1] << "\"";
1514 SiFileOut << " ysize=\"" << ySize_LowLayer[1] << "\"";
1515 SiFileOut << " stripDirection=\"";
1516 if (stripDirection[1] == LeftToRight)
1517 SiFileOut << "LeftToRight\"";
1518 else
1519 SiFileOut << "RightToLeft\"";
1520 SiFileOut << " lxborder=\"" << xLBorder_LowLayer[1] << "\"";
1521 SiFileOut << " lyborder=\"" << yLBorder_LowLayer[1] << "\"";
1522 SiFileOut << " rxborder=\"" << xRBorder_LowLayer[1] << "\"";
1523 SiFileOut << " ryborder=\"" << yRBorder_LowLayer[1] << "\"";
1524 SiFileOut << ">";
1525
1526 if (isDeadZone_LowLayer == true) {
1527 SiFileOut << "\n";
1528 SiFileOut << "\t\t\t\t<DeadZone>\n";
1529 for (Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1530 SiFileOut << "\t\t\t\t\t<DeadPoint";
1531 SiFileOut << " x=\"" << xDeadZone[1][ipoint] << "\"";
1532 SiFileOut << " y=\"" << yDeadZone[1][ipoint] << "\"";
1533 SiFileOut << " />\n";
1534 }
1535 SiFileOut << "\t\t\t\t</DeadZone>\n\t\t\t";
1536 }
1537 SiFileOut << "</Layer>\n";
1538 //--------------------------------------------------------------
1539
1540 // upper part of module: inclined strips = front side -----------
1541 SiFileOut << "\t\t\t<Layer";
1542 SiFileOut << " zoneID=\""
1543 << "1"
1544 << "\"";
1545 SiFileOut << " type=\""
1546 << "upper"
1547 << "\"";
1548 SiFileOut << " firstStripNumber=\"" << firstStripNumber_UpLayer[0] << "\"";
1549 SiFileOut << " stripAngle=\"" << stripAngle[0] << "\"";
1550 SiFileOut << " pitch=\"" << pitchValue[0] << "\"";
1551 SiFileOut << " xorig=\"" << xOrig_UpLayer[0] << "\"";
1552 SiFileOut << " yorig=\"" << yOrig_UpLayer[0] << "\"";
1553 SiFileOut << " xsize=\"" << xSize_UpLayer[0] << "\"";
1554 SiFileOut << " ysize=\"" << ySize_UpLayer[0] << "\"";
1555 SiFileOut << " stripDirection=\"";
1556 if (stripDirection[0] == LeftToRight)
1557 SiFileOut << "LeftToRight\"";
1558 else
1559 SiFileOut << "RightToLeft\"";
1560 SiFileOut << " lxborder=\"" << xLBorder_UpLayer[0] << "\"";
1561 SiFileOut << " lyborder=\"" << yLBorder_UpLayer[0] << "\"";
1562 SiFileOut << " rxborder=\"" << xRBorder_UpLayer[0] << "\"";
1563 SiFileOut << " ryborder=\"" << yRBorder_UpLayer[0] << "\"";
1564 SiFileOut << ">";
1565
1566 if (isDeadZone_UpLayer == true) {
1567 SiFileOut << "\n";
1568 SiFileOut << "\t\t\t\t<DeadZone>\n";
1569 for (Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1570 SiFileOut << "\t\t\t\t\t<DeadPoint";
1571 SiFileOut << " x=\"" << xDeadZone[0][ipoint] << "\"";
1572 SiFileOut << " y=\"" << yDeadZone[0][ipoint] << "\"";
1573 SiFileOut << " />\n";
1574 }
1575 SiFileOut << "\t\t\t\t</DeadZone>\n\t\t\t";
1576 }
1577 SiFileOut << "</Layer>\n";
1578 //--------------------------------------------------------------
1579
1580 // lower part of module: inclined strips = front side -----------
1581 SiFileOut << "\t\t\t<Layer";
1582 SiFileOut << " zoneID=\""
1583 << "1"
1584 << "\"";
1585 SiFileOut << " type=\""
1586 << "upper"
1587 << "\"";
1588 SiFileOut << " firstStripNumber=\"" << firstStripNumber_LowLayer[0] << "\"";
1589 SiFileOut << " stripAngle=\"" << stripAngle[0] << "\"";
1590 SiFileOut << " pitch=\"" << pitchValue[0] << "\"";
1591 SiFileOut << " xorig=\"" << xOrig_LowLayer[0] << "\"";
1592 SiFileOut << " yorig=\"" << yOrig_LowLayer[0] << "\"";
1593 SiFileOut << " xsize=\"" << xSize_LowLayer[0] << "\"";
1594 SiFileOut << " ysize=\"" << ySize_LowLayer[0] << "\"";
1595 SiFileOut << " stripDirection=\"";
1596 if (stripDirection[0] == LeftToRight)
1597 SiFileOut << "LeftToRight\"";
1598 else
1599 SiFileOut << "RightToLeft\"";
1600 SiFileOut << " lxborder=\"" << xLBorder_LowLayer[0] << "\"";
1601 SiFileOut << " lyborder=\"" << yLBorder_LowLayer[0] << "\"";
1602 SiFileOut << " rxborder=\"" << xRBorder_LowLayer[0] << "\"";
1603 SiFileOut << " ryborder=\"" << yRBorder_LowLayer[0] << "\"";
1604 SiFileOut << ">";
1605
1606 if (isDeadZone_LowLayer == true) {
1607 SiFileOut << "\n";
1608 SiFileOut << "\t\t\t\t<DeadZone>\n";
1609 for (Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1610 SiFileOut << "\t\t\t\t\t<DeadPoint";
1611 SiFileOut << " x=\"" << xDeadZone[0][ipoint] << "\"";
1612 SiFileOut << " y=\"" << yDeadZone[0][ipoint] << "\"";
1613 SiFileOut << " />\n";
1614 }
1615 SiFileOut << "\t\t\t\t</DeadZone>\n\t\t\t";
1616 }
1617 SiFileOut << "</Layer>\n";
1618 //--------------------------------------------------------------
1619
1620 SiFileOut << "\t\t</Module>\n";
1621 SiFileOut << "\n";
1622 }
1623
1624 if (ModulesTypes[istation][imodule] == ModuleType::BEVEL_MODULE_HALF
1625 || ModulesTypes[istation][imodule] == ModuleType::RIGHT_ANGLED_MODULE_HALF)
1626 {
1627
1628 Double_t xOrig[2];
1629 Double_t yOrig[2];
1630 Double_t xSize[2];
1631 Double_t ySize[2];
1632 Double_t xLBorder[2];
1633 Double_t yLBorder[2];
1634 Double_t xRBorder[2];
1635 Double_t yRBorder[2];
1636 Bool_t isDeadZone;
1637
1638 if (ModulesXRotations[istation][imodule] == false) {
1639 xOrig[0] = xOrig_LowLayer[0];
1640 xOrig[1] = xOrig_LowLayer[1];
1641 yOrig[0] = yOrig_LowLayer[0];
1642 yOrig[1] = yOrig_LowLayer[1];
1643 xSize[0] = xSize_LowLayer[0];
1644 xSize[1] = xSize_LowLayer[1];
1645 ySize[0] = ySize_LowLayer[0];
1646 ySize[1] = ySize_LowLayer[1];
1647 xLBorder[0] = xLBorder_LowLayer[0];
1648 xLBorder[1] = xLBorder_LowLayer[1];
1649 yLBorder[0] = yLBorder_LowLayer[0];
1650 yLBorder[1] = yLBorder_LowLayer[1];
1651 xRBorder[0] = xRBorder_LowLayer[0];
1652 xRBorder[1] = xRBorder_LowLayer[1];
1653 yRBorder[0] = yRBorder_LowLayer[0];
1654 yRBorder[1] = yRBorder_LowLayer[1];
1655 isDeadZone = isDeadZone_LowLayer;
1656 }
1657 if (ModulesXRotations[istation][imodule] == true) {
1658 xOrig[0] = xOrig_UpLayer[0];
1659 xOrig[1] = xOrig_UpLayer[1];
1660 yOrig[0] = yOrig_UpLayer[0];
1661 yOrig[1] = yOrig_UpLayer[1];
1662 xSize[0] = xSize_UpLayer[0];
1663 xSize[1] = xSize_UpLayer[1];
1664 ySize[0] = ySize_UpLayer[0];
1665 ySize[1] = ySize_UpLayer[1];
1666 xLBorder[0] = xLBorder_UpLayer[0];
1667 xLBorder[1] = xLBorder_UpLayer[1];
1668 yLBorder[0] = yLBorder_UpLayer[0];
1669 yLBorder[1] = yLBorder_UpLayer[1];
1670 xRBorder[0] = xRBorder_UpLayer[0];
1671 xRBorder[1] = xRBorder_UpLayer[1];
1672 yRBorder[0] = yRBorder_UpLayer[0];
1673 yRBorder[1] = yRBorder_UpLayer[1];
1674 isDeadZone = isDeadZone_UpLayer;
1675 }
1676
1677 // one part of module: straight strips = back side --------------
1678 SiFileOut << "\t\t\t<Layer";
1679 SiFileOut << " zoneID=\""
1680 << "0"
1681 << "\"";
1682 SiFileOut << " type=\""
1683 << "lower"
1684 << "\"";
1685 SiFileOut << " firstStripNumber=\"" << 0 << "\"";
1686 SiFileOut << " stripAngle=\"" << stripAngle[1] << "\"";
1687 SiFileOut << " pitch=\"" << pitchValue[1] << "\"";
1688 SiFileOut << " xorig=\"" << xOrig[1] << "\"";
1689 SiFileOut << " yorig=\"" << yOrig[1] << "\"";
1690 SiFileOut << " xsize=\"" << xSize[1] << "\"";
1691 SiFileOut << " ysize=\"" << ySize[1] << "\"";
1692 SiFileOut << " stripDirection=\"";
1693 if (stripDirection[1] == LeftToRight)
1694 SiFileOut << "LeftToRight\"";
1695 else
1696 SiFileOut << "RightToLeft\"";
1697 SiFileOut << " lxborder=\"" << xLBorder[1] << "\"";
1698 SiFileOut << " lyborder=\"" << yLBorder[1] << "\"";
1699 SiFileOut << " rxborder=\"" << xRBorder[1] << "\"";
1700 SiFileOut << " ryborder=\"" << yRBorder[1] << "\"";
1701 SiFileOut << ">";
1702
1703 if (isDeadZone == true) {
1704 SiFileOut << "\n";
1705 SiFileOut << "\t\t\t\t<DeadZone>\n";
1706 for (Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1707 SiFileOut << "\t\t\t\t\t<DeadPoint";
1708 SiFileOut << " x=\"" << xDeadZone[1][ipoint] << "\"";
1709 SiFileOut << " y=\"" << yDeadZone[1][ipoint] << "\"";
1710 SiFileOut << " />\n";
1711 }
1712 SiFileOut << "\t\t\t\t</DeadZone>\n\t\t\t";
1713 }
1714 SiFileOut << "</Layer>\n";
1715 //--------------------------------------------------------------
1716
1717 // one part of module: inclined strips = front side -------------
1718 SiFileOut << "\t\t\t<Layer";
1719 SiFileOut << " zoneID=\""
1720 << "1"
1721 << "\"";
1722 SiFileOut << " type=\""
1723 << "upper"
1724 << "\"";
1725 SiFileOut << " firstStripNumber=\"" << 0 << "\"";
1726 SiFileOut << " stripAngle=\"" << stripAngle[0] << "\"";
1727 SiFileOut << " pitch=\"" << pitchValue[0] << "\"";
1728 SiFileOut << " xorig=\"" << xOrig[0] << "\"";
1729 SiFileOut << " yorig=\"" << yOrig[0] << "\"";
1730 SiFileOut << " xsize=\"" << xSize[0] << "\"";
1731 SiFileOut << " ysize=\"" << ySize[0] << "\"";
1732 SiFileOut << " stripDirection=\"";
1733 if (stripDirection[0] == LeftToRight)
1734 SiFileOut << "LeftToRight\"";
1735 else
1736 SiFileOut << "RightToLeft\"";
1737 SiFileOut << " lxborder=\"" << xLBorder[0] << "\"";
1738 SiFileOut << " lyborder=\"" << yLBorder[0] << "\"";
1739 SiFileOut << " rxborder=\"" << xRBorder[0] << "\"";
1740 SiFileOut << " ryborder=\"" << yRBorder[0] << "\"";
1741 SiFileOut << ">";
1742
1743 if (isDeadZone == true) {
1744 SiFileOut << "\n";
1745 SiFileOut << "\t\t\t\t<DeadZone>\n";
1746 for (Int_t ipoint = 0; ipoint < 3; ++ipoint) {
1747 SiFileOut << "\t\t\t\t\t<DeadPoint";
1748 SiFileOut << " x=\"" << xDeadZone[0][ipoint] << "\"";
1749 SiFileOut << " y=\"" << yDeadZone[0][ipoint] << "\"";
1750 SiFileOut << " />\n";
1751 }
1752 SiFileOut << "\t\t\t\t</DeadZone>\n\t\t\t";
1753 }
1754 SiFileOut << "</Layer>\n";
1755 //--------------------------------------------------------------
1756
1757 SiFileOut << "\t\t</Module>\n";
1758 SiFileOut << "\n";
1759 }
1760 }
1761
1762 SiFileOut << "\t</Station>\n";
1763 SiFileOut << "\n";
1764
1765 cout << "------------------------------------------------------------\n";
1766 }
1767
1768 SiFileOut << "</StationSet>\n";
1769
1770 SiFileOut.close();
1771}
bool Bool_t
int Int_t
double Double_t
#define R__ADD_INCLUDE_PATH(PATH)
StripNumberingDirection
@ RightToLeft
@ LeftToRight
const char * Data() const
const Double_t YStationPositions[NStations]
const Int_t NMaxModules
const Double_t ZStationPositions[NStations]
const Int_t NStations
const Double_t XStationPositions[NStations]
const Int_t NModulesInStations[NStations]
Double_t ZModuleSize[NModuleSizes]
Double_t YMiddleBorderUpperPart[NModuleSizes][2]
Double_t XLeftBorder[NModuleSizes][2]
Double_t YSizeUpLayer[NModuleSizes][2]
const Double_t x_dist_cent_base[NStations]
Double_t BevelAngleRad[NModuleSizes]
const Double_t x_shift_hp[NStations]
Double_t YShiftLastStripLowLayer[NModuleSizes][2]
ModuleType
@ BEVEL_MODULE
@ RIGHT_ANGLED_MODULE_HALF
@ RIGHT_ANGLED_MODULE
Double_t YTopBorder[NModuleSizes][2]
const Double_t z_mod_thick
const Double_t z_shift_low
const Double_t y_dist_cent_base[NStations]
Double_t YShiftLastStripUpLayer[NModuleSizes][2]
Double_t XShiftFirstStripLowLayer[NModuleSizes][2]
Double_t YModuleSizeUpperPart[NModuleSizes]
Double_t YOrigLowLayer[NModuleSizes][2]
Double_t YOrigUpLayer[NModuleSizes][2]
Double_t FirstStripNumberLowLayer[NModuleSizes][2]
Double_t XShiftLastStripUpLayer[NModuleSizes][2]
Double_t YRightBorderLowerlayer[NModuleSizes][2]
Double_t XLeftBorderLowerlayer[NModuleSizes][2]
Double_t PitchValue[NModuleSizes][2]
Double_t YLeftBorderUpperlayer[NModuleSizes][2]
Double_t x_delta_bottom_BP[NModuleSizes][2]
Double_t YBevelSize[NModuleSizes]
Double_t YShiftFirstStripUpLayer[NModuleSizes][2]
Double_t XShiftLastStripLowLayer[NModuleSizes][2]
const Double_t y_shift_hp[NStations]
Double_t XRightBorder[NModuleSizes][2]
Double_t XLeftBorderUpperlayer[NModuleSizes][2]
ModuleSize
@ STANDARD_MODULE
Double_t XYBevelBorder[NModuleSizes][2]
const Bool_t ModulesYRotations[NStations][NMaxModules]
Double_t XOrigLowLayer[NModuleSizes][2]
Double_t YBottomBorder[NModuleSizes][2]
Double_t YModuleSize[NModuleSizes]
Double_t x_delta[NModuleSizes][2]
Double_t y_delta_bottom_BP[NModuleSizes][2]
Double_t StripAngle[NModuleSizes][2]
Double_t YModuleSizeLowerPart[NModuleSizes]
const Double_t z_shift_up
Double_t XDeadZone[NModuleSizes][2][3]
Double_t XOrigUpLayer[NModuleSizes][2]
Double_t x_delta_top_BP[NModuleSizes][2]
Double_t YMiddleBorderLowerPart[NModuleSizes][2]
Double_t YShiftFirstStripLowLayer[NModuleSizes][2]
Double_t y_delta[NModuleSizes][2]
Double_t BevelAngleDeg[NModuleSizes]
Double_t FirstStripNumberUpLayer[NModuleSizes][2]
Double_t YRightBorderUpperlayer[NModuleSizes][2]
Double_t YDeadZone[NModuleSizes][2][3]
Double_t YGapBetweenPartsOfModule[NModuleSizes]
Double_t XModuleSize[NModuleSizes]
Double_t YSizeLowLayer[NModuleSizes][2]
Double_t XRightBorderLowerlayer[NModuleSizes][2]
Double_t YLeftBorderLowerlayer[NModuleSizes][2]
const unsigned int NModuleSizes
const ModuleType ModulesTypes[NStations][NMaxModules]
const Double_t z_shift_hp[NStations]
Double_t y_delta_top_BP[NModuleSizes][2]
Double_t XSizeLowLayer[NModuleSizes][2]
Double_t XRightBorderUpperlayer[NModuleSizes][2]
Double_t XShiftFirstStripUpLayer[NModuleSizes][2]
const Bool_t ModulesXRotations[NStations][NMaxModules]
Double_t XBevelSize[NModuleSizes]
Double_t XSizeUpLayer[NModuleSizes][2]
const Double_t HalfPlanesYRotations[NStations][NMaxHalfPlanes]
void SiliconConfigCalculate_Run8()
const Int_t NMaxHalfPlanes
Double_t ATan(Double_t)
constexpr Double_t PiOver2()
Double_t Cos(Double_t)
Double_t Sin(Double_t)
Double_t Tan(Double_t)
constexpr Double_t RadToDeg()
Definition json.hpp:4446