Skip to content

Commit 5bfa716

Browse files
committed
Fix ZDC overlap problems
* some volumes where wrongly placed inside ZDCA whereas they should be in cave (electromagnetic calorimeter + support) * fixing sign of ZDCC coordinates
1 parent ce87218 commit 5bfa716

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

Detectors/ZDC/simulation/src/Detector.cxx

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,23 +1141,23 @@ void Detector::createCsideBeamLine()
11411141
Double_t tubspar[5] = { 0., 0., 0., 0., 0. };
11421142
Double_t conpar[15];
11431143

1144-
Float_t zC = -1947.2;
1144+
Float_t zC = 1947.2;
11451145
;
1146-
Float_t zCompensator = -1974.;
1146+
Float_t zCompensator = 1974.;
11471147

11481148
conpar[0] = 0.;
11491149
conpar[1] = 360.;
11501150
conpar[2] = 4.; // Num radius specifications: 4
11511151
conpar[3] = -13500.;
11521152
conpar[4] = 0.;
11531153
conpar[5] = 55.;
1154-
conpar[6] = zCompensator;
1154+
conpar[6] = -zCompensator;
11551155
conpar[7] = 0.;
11561156
conpar[8] = 55.;
1157-
conpar[9] = zCompensator;
1157+
conpar[9] = -zCompensator;
11581158
conpar[10] = 0.;
11591159
conpar[11] = 6.7 / 2.;
1160-
conpar[12] = zC; // (4) Beginning of ZDCC mother volume
1160+
conpar[12] = -zC; // (4) Beginning of ZDCC mother volume
11611161
conpar[13] = 0.;
11621162
conpar[14] = 6.7 / 2.;
11631163
TVirtualMC::GetMC()->Gsvolu("ZDCC", "PCON", getMediumID(kVoidNoField), conpar, 15);
@@ -2079,14 +2079,14 @@ void Detector::createDetectors()
20792079

20802080
// --- Positioning the ZEM into the ZDC - rotation for 90 degrees
20812081
// NB -> ZEM is positioned in cave volume
2082-
TVirtualMC::GetMC()->Gspos("ZEM ", 1, "ZDCA", -Geometry::ZEMPOSITION[0], Geometry::ZEMPOSITION[1], Geometry::ZEMPOSITION[2] + Geometry::ZEMDIMENSION[0], irotzem1, "ONLY");
2082+
TVirtualMC::GetMC()->Gspos("ZEM ", 1, "cave", -Geometry::ZEMPOSITION[0], Geometry::ZEMPOSITION[1], Geometry::ZEMPOSITION[2] + Geometry::ZEMDIMENSION[0], irotzem1, "ONLY");
20832083

20842084
// Second EM ZDC (same side w.r.t. IP, just on the other side w.r.t. beam pipe)
2085-
TVirtualMC::GetMC()->Gspos("ZEM ", 2, "ZDCA", Geometry::ZEMPOSITION[0], Geometry::ZEMPOSITION[1], Geometry::ZEMPOSITION[2] + Geometry::ZEMDIMENSION[0], irotzem1, "ONLY");
2085+
TVirtualMC::GetMC()->Gspos("ZEM ", 2, "cave", Geometry::ZEMPOSITION[0], Geometry::ZEMPOSITION[1], Geometry::ZEMPOSITION[2] + Geometry::ZEMDIMENSION[0], irotzem1, "ONLY");
20862086

20872087
// --- Adding last slice at the end of the EM calorimeter
20882088
Float_t zLastSlice = Geometry::ZEMPOSITION[2] + zemPbSlice[0] + 2 * Geometry::ZEMDIMENSION[0];
2089-
TVirtualMC::GetMC()->Gspos("ZEL2", 1, "ZDCA", Geometry::ZEMPOSITION[0], Geometry::ZEMPOSITION[1], zLastSlice, irotzem1, "ONLY");
2089+
TVirtualMC::GetMC()->Gspos("ZEL2", 1, "cave", Geometry::ZEMPOSITION[0], Geometry::ZEMPOSITION[1], zLastSlice, irotzem1, "ONLY");
20902090

20912091
// -------------------------------------------------------------------------------
20922092
// -> ZEM supports
@@ -2099,31 +2099,31 @@ void Detector::createDetectors()
20992099
// Bridge
21002100
TVirtualMC::GetMC()->Gsvolu("ZESH", "BOX ", getMediumID(kAl), const_cast<double*>(zemSupport1), 3);
21012101
Float_t ybridge = Geometry::ZEMPOSITION[1] - Geometry::ZEMDIMENSION[1] - 2. * 2. * zemSupportBox[3 + 1] - 5. - zemSupport1[1];
2102-
TVirtualMC::GetMC()->Gspos("ZESH", 1, "ZDCA", Geometry::ZEMPOSITION[0], ybridge, zbox, 0, "ONLY");
2103-
TVirtualMC::GetMC()->Gspos("ZESH", 2, "ZDCA", -Geometry::ZEMPOSITION[0], ybridge, zbox, 0, "ONLY");
2102+
TVirtualMC::GetMC()->Gspos("ZESH", 1, "cave", Geometry::ZEMPOSITION[0], ybridge, zbox, 0, "ONLY");
2103+
TVirtualMC::GetMC()->Gspos("ZESH", 2, "cave", -Geometry::ZEMPOSITION[0], ybridge, zbox, 0, "ONLY");
21042104
//
21052105
TVirtualMC::GetMC()->Gsvolu("ZESV", "BOX ", getMediumID(kAl), const_cast<double*>(zemSupport2), 3);
2106-
TVirtualMC::GetMC()->Gspos("ZESV", 1, "ZDCA", Geometry::ZEMPOSITION[0] - zemSupportBox[0] + zemSupport2[0], ybox - zemSupportBox[1] - zemSupport2[1], zbox, 0, "ONLY");
2107-
TVirtualMC::GetMC()->Gspos("ZESV", 2, "ZDCA", Geometry::ZEMPOSITION[0] + zemSupportBox[0] - zemSupport2[0], ybox - zemSupportBox[1] - zemSupport2[1], zbox, 0, "ONLY");
2108-
TVirtualMC::GetMC()->Gspos("ZESV", 3, "ZDCA", -(Geometry::ZEMPOSITION[0] - zemSupportBox[0] + zemSupport2[0]), ybox - zemSupportBox[1] - zemSupport2[1], zbox, 0, "ONLY");
2109-
TVirtualMC::GetMC()->Gspos("ZESV", 4, "ZDCA", -(Geometry::ZEMPOSITION[0] + zemSupportBox[0] - zemSupport2[0]), ybox - zemSupportBox[1] - zemSupport2[1], zbox, 0, "ONLY");
2106+
TVirtualMC::GetMC()->Gspos("ZESV", 1, "cave", Geometry::ZEMPOSITION[0] - zemSupportBox[0] + zemSupport2[0], ybox - zemSupportBox[1] - zemSupport2[1], zbox, 0, "ONLY");
2107+
TVirtualMC::GetMC()->Gspos("ZESV", 2, "cave", Geometry::ZEMPOSITION[0] + zemSupportBox[0] - zemSupport2[0], ybox - zemSupportBox[1] - zemSupport2[1], zbox, 0, "ONLY");
2108+
TVirtualMC::GetMC()->Gspos("ZESV", 3, "cave", -(Geometry::ZEMPOSITION[0] - zemSupportBox[0] + zemSupport2[0]), ybox - zemSupportBox[1] - zemSupport2[1], zbox, 0, "ONLY");
2109+
TVirtualMC::GetMC()->Gspos("ZESV", 4, "cave", -(Geometry::ZEMPOSITION[0] + zemSupportBox[0] - zemSupport2[0]), ybox - zemSupportBox[1] - zemSupport2[1], zbox, 0, "ONLY");
21102110

21112111
// Table
21122112
TVirtualMC::GetMC()->Gsvolu("ZETA", "BOX ", getMediumID(kAl), const_cast<double*>(zemSupportTable), 3);
21132113
Float_t ytable = ybridge - zemSupport1[1] - zemSupportTable[1];
2114-
TVirtualMC::GetMC()->Gspos("ZETA", 1, "ZDCA", 0.0, ytable, zbox, 0, "ONLY");
2115-
TVirtualMC::GetMC()->Gspos("ZETA", 2, "ZDCA", 0.0, ytable - 13. + 2. * zemSupportTable[1], zbox, 0, "ONLY");
2114+
TVirtualMC::GetMC()->Gspos("ZETA", 1, "cave", 0.0, ytable, zbox, 0, "ONLY");
2115+
TVirtualMC::GetMC()->Gspos("ZETA", 2, "cave", 0.0, ytable - 13. + 2. * zemSupportTable[1], zbox, 0, "ONLY");
21162116

21172117
//Screens around ZEM
21182118
TVirtualMC::GetMC()->Gsvolu("ZEFL", "BOX ", getMediumID(kAl), const_cast<double*>(zemSupport3), 3);
2119-
TVirtualMC::GetMC()->Gspos("ZEFL", 1, "ZDCA", Geometry::ZEMPOSITION[0], -Geometry::ZEMDIMENSION[1] - zemSupport3[1], zSupport + zemSupport3[2], 0, "ONLY");
2120-
TVirtualMC::GetMC()->Gspos("ZEFL", 2, "ZDCA", -Geometry::ZEMPOSITION[0], -Geometry::ZEMDIMENSION[1] - zemSupport3[1], zSupport + zemSupport3[2], 0, "ONLY");
2119+
TVirtualMC::GetMC()->Gspos("ZEFL", 1, "cave", Geometry::ZEMPOSITION[0], -Geometry::ZEMDIMENSION[1] - zemSupport3[1], zSupport + zemSupport3[2], 0, "ONLY");
2120+
TVirtualMC::GetMC()->Gspos("ZEFL", 2, "cave", -Geometry::ZEMPOSITION[0], -Geometry::ZEMDIMENSION[1] - zemSupport3[1], zSupport + zemSupport3[2], 0, "ONLY");
21212121

21222122
TVirtualMC::GetMC()->Gsvolu("ZELA", "PARA", getMediumID(kAl), const_cast<double*>(zemSupport4), 6);
2123-
TVirtualMC::GetMC()->Gspos("ZELA", 1, "ZDCA", Geometry::ZEMPOSITION[0] - Geometry::ZEMDIMENSION[2] - zemSupport4[2], Geometry::ZEMPOSITION[1], Geometry::ZEMPOSITION[2] + zemSupport4[0], irotzem1, "ONLY");
2124-
TVirtualMC::GetMC()->Gspos("ZELA", 2, "ZDCA", Geometry::ZEMPOSITION[0] + Geometry::ZEMDIMENSION[2] + zemSupport4[2], Geometry::ZEMPOSITION[1], Geometry::ZEMPOSITION[2] + zemSupport4[0], irotzem1, "ONLY");
2125-
TVirtualMC::GetMC()->Gspos("ZELA", 3, "ZDCA", -(Geometry::ZEMPOSITION[0] - Geometry::ZEMDIMENSION[2] - zemSupport4[2]), Geometry::ZEMPOSITION[1], Geometry::ZEMPOSITION[2] + zemSupport4[0], irotzem1, "ONLY");
2126-
TVirtualMC::GetMC()->Gspos("ZELA", 4, "ZDCA", -(Geometry::ZEMPOSITION[0] + Geometry::ZEMDIMENSION[2] + zemSupport4[2]), Geometry::ZEMPOSITION[1], Geometry::ZEMPOSITION[2] + zemSupport4[0], irotzem1, "ONLY");
2123+
TVirtualMC::GetMC()->Gspos("ZELA", 1, "cave", Geometry::ZEMPOSITION[0] - Geometry::ZEMDIMENSION[2] - zemSupport4[2], Geometry::ZEMPOSITION[1], Geometry::ZEMPOSITION[2] + zemSupport4[0], irotzem1, "ONLY");
2124+
TVirtualMC::GetMC()->Gspos("ZELA", 2, "cave", Geometry::ZEMPOSITION[0] + Geometry::ZEMDIMENSION[2] + zemSupport4[2], Geometry::ZEMPOSITION[1], Geometry::ZEMPOSITION[2] + zemSupport4[0], irotzem1, "ONLY");
2125+
TVirtualMC::GetMC()->Gspos("ZELA", 3, "cave", -(Geometry::ZEMPOSITION[0] - Geometry::ZEMDIMENSION[2] - zemSupport4[2]), Geometry::ZEMPOSITION[1], Geometry::ZEMPOSITION[2] + zemSupport4[0], irotzem1, "ONLY");
2126+
TVirtualMC::GetMC()->Gspos("ZELA", 4, "cave", -(Geometry::ZEMPOSITION[0] + Geometry::ZEMDIMENSION[2] + zemSupport4[2]), Geometry::ZEMPOSITION[1], Geometry::ZEMPOSITION[2] + zemSupport4[0], irotzem1, "ONLY");
21272127

21282128
// Containers for ZEM calorimeters
21292129
TVirtualMC::GetMC()->Gsvolu("ZEW1", "BOX ", getMediumID(kAl), const_cast<double*>(zemWallH), 3);
@@ -2133,22 +2133,22 @@ void Detector::createDetectors()
21332133
//
21342134
Float_t yh1 = Geometry::ZEMPOSITION[1] - Geometry::ZEMDIMENSION[1] - 2 * zemSupport3[1] - zemWallH[1];
21352135
Float_t zh1 = zSupport + zemWallH[2];
2136-
TVirtualMC::GetMC()->Gspos("ZEW1", 1, "ZDCA", Geometry::ZEMPOSITION[0], yh1, zh1, 0, "ONLY");
2137-
TVirtualMC::GetMC()->Gspos("ZEW1", 2, "ZDCA", Geometry::ZEMPOSITION[0], yh1 + 2 * zemSupportBox[1], zh1, 0, "ONLY");
2138-
TVirtualMC::GetMC()->Gspos("ZEW1", 3, "ZDCA", -Geometry::ZEMPOSITION[0], yh1, zh1, 0, "ONLY");
2139-
TVirtualMC::GetMC()->Gspos("ZEW1", 4, "ZDCA", -Geometry::ZEMPOSITION[0], yh1 + 2 * zemSupportBox[1], zh1, 0, "ONLY");
2136+
TVirtualMC::GetMC()->Gspos("ZEW1", 1, "cave", Geometry::ZEMPOSITION[0], yh1, zh1, 0, "ONLY");
2137+
TVirtualMC::GetMC()->Gspos("ZEW1", 2, "cave", Geometry::ZEMPOSITION[0], yh1 + 2 * zemSupportBox[1], zh1, 0, "ONLY");
2138+
TVirtualMC::GetMC()->Gspos("ZEW1", 3, "cave", -Geometry::ZEMPOSITION[0], yh1, zh1, 0, "ONLY");
2139+
TVirtualMC::GetMC()->Gspos("ZEW1", 4, "cave", -Geometry::ZEMPOSITION[0], yh1 + 2 * zemSupportBox[1], zh1, 0, "ONLY");
21402140
//
2141-
TVirtualMC::GetMC()->Gspos("ZEW2", 1, "ZDCA", Geometry::ZEMPOSITION[0], yh1 + zemSupportBox[1], zSupport - zemWallVfwd[2], 0, "ONLY");
2142-
TVirtualMC::GetMC()->Gspos("ZEW3", 1, "ZDCA", Geometry::ZEMPOSITION[0], yh1 + zemSupportBox[1], zSupport + 2 * zemWallH[2], 0, "ONLY");
2143-
TVirtualMC::GetMC()->Gspos("ZEW2", 2, "ZDCA", -Geometry::ZEMPOSITION[0], yh1 + zemSupportBox[1], zSupport - zemWallVfwd[2], 0, "ONLY");
2144-
TVirtualMC::GetMC()->Gspos("ZEW3", 2, "ZDCA", -Geometry::ZEMPOSITION[0], yh1 + zemSupportBox[1], zSupport + 2 * zemWallH[2], 0, "ONLY");
2141+
TVirtualMC::GetMC()->Gspos("ZEW2", 1, "cave", Geometry::ZEMPOSITION[0], yh1 + zemSupportBox[1], zSupport - zemWallVfwd[2], 0, "ONLY");
2142+
TVirtualMC::GetMC()->Gspos("ZEW3", 1, "cave", Geometry::ZEMPOSITION[0], yh1 + zemSupportBox[1], zSupport + 2 * zemWallH[2], 0, "ONLY");
2143+
TVirtualMC::GetMC()->Gspos("ZEW2", 2, "cave", -Geometry::ZEMPOSITION[0], yh1 + zemSupportBox[1], zSupport - zemWallVfwd[2], 0, "ONLY");
2144+
TVirtualMC::GetMC()->Gspos("ZEW3", 2, "cave", -Geometry::ZEMPOSITION[0], yh1 + zemSupportBox[1], zSupport + 2 * zemWallH[2], 0, "ONLY");
21452145
//
21462146
Float_t xl1 = Geometry::ZEMPOSITION[0] - Geometry::ZEMDIMENSION[2] - 2. * zemSupport4[2] - zemWallVside[0];
21472147
Float_t xl2 = Geometry::ZEMPOSITION[0] + Geometry::ZEMDIMENSION[2] + 2. * zemSupport4[2] + zemWallVside[0];
2148-
TVirtualMC::GetMC()->Gspos("ZEW4", 1, "ZDCA", xl1, yh1 + zemSupportBox[1], zh1, 0, "ONLY");
2149-
TVirtualMC::GetMC()->Gspos("ZEW4", 2, "ZDCA", xl2, yh1 + zemSupportBox[1], zh1, 0, "ONLY");
2150-
TVirtualMC::GetMC()->Gspos("ZEW4", 3, "ZDCA", -xl1, yh1 + zemSupportBox[1], zh1, 0, "ONLY");
2151-
TVirtualMC::GetMC()->Gspos("ZEW4", 4, "ZDCA", -xl2, yh1 + zemSupportBox[1], zh1, 0, "ONLY");
2148+
TVirtualMC::GetMC()->Gspos("ZEW4", 1, "cave", xl1, yh1 + zemSupportBox[1], zh1, 0, "ONLY");
2149+
TVirtualMC::GetMC()->Gspos("ZEW4", 2, "cave", xl2, yh1 + zemSupportBox[1], zh1, 0, "ONLY");
2150+
TVirtualMC::GetMC()->Gspos("ZEW4", 3, "cave", -xl1, yh1 + zemSupportBox[1], zh1, 0, "ONLY");
2151+
TVirtualMC::GetMC()->Gspos("ZEW4", 4, "cave", -xl2, yh1 + zemSupportBox[1], zh1, 0, "ONLY");
21522152
}
21532153

21542154
//_____________________________________________________________________________

0 commit comments

Comments
 (0)