diff --git a/Detectors/Base/include/DetectorsBase/Detector.h b/Detectors/Base/include/DetectorsBase/Detector.h index 5f7d9679537e2..b110112ba2c60 100644 --- a/Detectors/Base/include/DetectorsBase/Detector.h +++ b/Detectors/Base/include/DetectorsBase/Detector.h @@ -87,8 +87,8 @@ class Detector : public FairDetector /// \param phi1 azimuthal angle for axis I /// \param phi2 azimuthal angle for axis II /// \param phi3 azimuthal angle for axis III - void Matrix(Int_t& nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, Float_t theta3, - Float_t phi3) const; + void Matrix(Int_t& nmat, Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2, Double_t theta3, + Double_t phi3) const; static void setDensityFactor(Float_t density) { diff --git a/Detectors/Base/src/Detector.cxx b/Detectors/Base/src/Detector.cxx index 72c35e24bae3d..6a8967fff54e3 100644 --- a/Detectors/Base/src/Detector.cxx +++ b/Detectors/Base/src/Detector.cxx @@ -101,8 +101,8 @@ void Detector::SpecialProcess(Int_t numed, EProc parID, int val) mgr.SpecialProcess(GetName(), numed, parID, val); } -void Detector::Matrix(Int_t& nmat, Float_t theta1, Float_t phi1, Float_t theta2, Float_t phi2, Float_t theta3, - Float_t phi3) const +void Detector::Matrix(Int_t& nmat, Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2, Double_t theta3, + Double_t phi3) const { TVirtualMC::GetMC()->Matrix(nmat, theta1, phi1, theta2, phi2, theta3, phi3); } diff --git a/Detectors/CPV/simulation/include/CPVSimulation/GeometryParams.h b/Detectors/CPV/simulation/include/CPVSimulation/GeometryParams.h index 2c2d55b48cc72..12254d2544b9e 100644 --- a/Detectors/CPV/simulation/include/CPVSimulation/GeometryParams.h +++ b/Detectors/CPV/simulation/include/CPVSimulation/GeometryParams.h @@ -40,7 +40,7 @@ class GeometryParams final : public TNamed return sGeomParam; } - void GetModuleAngle(int module, float angle[3][2]) const + void GetModuleAngle(int module, double angle[3][2]) const { for (int i = 0; i < 3; i++) { for (int ian = 0; ian < 2; ian++) { @@ -49,9 +49,9 @@ class GeometryParams final : public TNamed } } - float GetCPVAngle(Int_t index) const { return mCPVAngle[index - 1]; } + double GetCPVAngle(Int_t index) const { return mCPVAngle[index - 1]; } - void GetModuleCenter(int module, float* pos) const + void GetModuleCenter(int module, double* pos) const { for (int i = 0; i < 3; i++) { pos[i] = mModuleCenter[module][i]; @@ -61,18 +61,18 @@ class GeometryParams final : public TNamed int GetNModules() const { return mNModules; } int GetNumberOfCPVPadsPhi() const { return mNumberOfCPVPadsPhi; } int GetNumberOfCPVPadsZ() const { return mNumberOfCPVPadsZ; } - float GetCPVPadSizePhi() const { return mCPVPadSizePhi; } - float GetCPVPadSizeZ() const { return mCPVPadSizeZ; } - float GetCPVBoxSize(int index) const { return mCPVBoxSize[index]; } - float GetCPVActiveSize(int index) const { return mCPVActiveSize[index]; } + double GetCPVPadSizePhi() const { return mCPVPadSizePhi; } + double GetCPVPadSizeZ() const { return mCPVPadSizeZ; } + double GetCPVBoxSize(int index) const { return mCPVBoxSize[index]; } + double GetCPVActiveSize(int index) const { return mCPVActiveSize[index]; } int GetNumberOfCPVChipsPhi() const { return mNumberOfCPVChipsPhi; } int GetNumberOfCPVChipsZ() const { return mNumberOfCPVChipsZ; } - float GetGassiplexChipSize(int index) const { return mGassiplexChipSize[index]; } - float GetCPVGasThickness() const { return mCPVGasThickness; } - float GetCPVTextoliteThickness() const { return mCPVTextoliteThickness; } - float GetCPVCuNiFoilThickness() const { return mCPVCuNiFoilThickness; } - float GetFTPosition(int index) const { return mFTPosition[index]; } - float GetCPVFrameSize(int index) const { return mCPVFrameSize[index]; } + double GetGassiplexChipSize(int index) const { return mGassiplexChipSize[index]; } + double GetCPVGasThickness() const { return mCPVGasThickness; } + double GetCPVTextoliteThickness() const { return mCPVTextoliteThickness; } + double GetCPVCuNiFoilThickness() const { return mCPVCuNiFoilThickness; } + double GetFTPosition(int index) const { return mFTPosition[index]; } + double GetCPVFrameSize(int index) const { return mCPVFrameSize[index]; } private: /// @@ -86,23 +86,23 @@ class GeometryParams final : public TNamed int mNModules; // Number of CPV modules int mNumberOfCPVPadsPhi; // Number of CPV pads in phi int mNumberOfCPVPadsZ; // Number of CPV pads in z - float mCPVPadSizePhi; // CPV pad size in phi - float mCPVPadSizeZ; // CPV pad size in z - float mCPVBoxSize[3]; // Outer size of CPV box - float mCPVActiveSize[2]; // Active size of CPV box (x,z) + double mCPVPadSizePhi; // CPV pad size in phi + double mCPVPadSizeZ; // CPV pad size in z + double mCPVBoxSize[3]; // Outer size of CPV box + double mCPVActiveSize[2]; // Active size of CPV box (x,z) int mNumberOfCPVChipsPhi; // Number of CPV Gassiplex chips in phi int mNumberOfCPVChipsZ; // Number of CPV Gassiplex chips in z - float mGassiplexChipSize[3]; // Size of a Gassiplex chip (0 - in z, 1 - in phi, 2 - thickness (in ALICE radius)) - float mCPVGasThickness; // Thickness of CPV gas volume - float mCPVTextoliteThickness; // Thickness of CPV textolite PCB (without moil) - float mCPVCuNiFoilThickness; // Thickness of CPV Copper-Nickel moil of PCB - float mFTPosition[4]; // Positions of the 4 PCB vs the CPV box center - float mCPVFrameSize[3]; // CPV frame size (0 - in phi, 1 - in z, 2 - thickness (along ALICE radius)) - float mIPtoCPVSurface; // Distance from IP to CPV front cover - float mModuleAngle[5][3][2]; // Orientation angles of CPV modules - float mCPVAngle[5]; // Direction to the center of CPV modules in phi - float mModuleCenter[5][3]; // Coordunates of modules centra in ALICE system - ClassDefOverride(GeometryParams, 1); + double mGassiplexChipSize[3]; // Size of a Gassiplex chip (0 - in z, 1 - in phi, 2 - thickness (in ALICE radius)) + double mCPVGasThickness; // Thickness of CPV gas volume + double mCPVTextoliteThickness; // Thickness of CPV textolite PCB (without moil) + double mCPVCuNiFoilThickness; // Thickness of CPV Copper-Nickel moil of PCB + double mFTPosition[4]; // Positions of the 4 PCB vs the CPV box center + double mCPVFrameSize[3]; // CPV frame size (0 - in phi, 1 - in z, 2 - thickness (along ALICE radius)) + double mIPtoCPVSurface; // Distance from IP to CPV front cover + double mModuleAngle[5][3][2]; // Orientation angles of CPV modules + double mCPVAngle[5]; // Direction to the center of CPV modules in phi + double mModuleCenter[5][3]; // Coordunates of modules centra in ALICE system + ClassDefOverride(GeometryParams, 2); }; } // namespace cpv } // namespace o2 diff --git a/Detectors/CPV/simulation/src/Detector.cxx b/Detectors/CPV/simulation/src/Detector.cxx index fda5751464f01..ee6ceef3de1e3 100644 --- a/Detectors/CPV/simulation/src/Detector.cxx +++ b/Detectors/CPV/simulation/src/Detector.cxx @@ -358,7 +358,7 @@ void Detector::ConstructGeometry() CreateMaterials(); // Create a CPV modules-containers which will be filled with the stuff later. - float par[3], x, y, z; + double par[3], x, y, z; // The box containing all CPV filled with air par[0] = geomParams->GetCPVBoxSize(0) / 2.0; @@ -372,11 +372,11 @@ void Detector::ConstructGeometry() if (!mActiveModule[iModule]) { continue; } - float angle[3][2] = {0}; + double angle[3][2] = {0}; geomParams->GetModuleAngle(iModule, angle); Matrix(idrotm[iModule], angle[0][0], angle[0][1], angle[1][0], angle[1][1], angle[2][0], angle[2][1]); - float pos[3] = {0}; + double pos[3] = {0}; geomParams->GetModuleCenter(iModule, pos); fMC->Gspos("CPV", iModule, "barrel", pos[0], pos[1] + 30., pos[2], idrotm[iModule], "ONLY"); @@ -396,8 +396,8 @@ void Detector::ConstructGeometry() fMC->Gspos("CPVC", 1, "CPVG", 0, y, 0, 0, "ONLY"); // Position of the chip inside CPV - float xStep = geomParams->GetCPVActiveSize(0) / (geomParams->GetNumberOfCPVChipsPhi() + 1); - float zStep = geomParams->GetCPVActiveSize(1) / (geomParams->GetNumberOfCPVChipsZ() + 1); + double xStep = geomParams->GetCPVActiveSize(0) / (geomParams->GetNumberOfCPVChipsPhi() + 1); + double zStep = geomParams->GetCPVActiveSize(1) / (geomParams->GetNumberOfCPVChipsZ() + 1); int copy = 0; y = geomParams->GetCPVFrameSize(1) / 2 - geomParams->GetFTPosition(0) + geomParams->GetCPVTextoliteThickness() / 2 + geomParams->GetGassiplexChipSize(1) / 2 + 0.1; @@ -451,10 +451,20 @@ void Detector::ConstructGeometry() par[2] = geomParams->GetCPVFrameSize(2) / 2; fMC->Gsvolu("CPVF2", "BOX ", getMediumID(ID_AL), par, 3); + // The frame's inner faces are the edges of the active plane. Deriving them from the box and + // frame sizes instead of from the active size left CPVF2 38 nm away from CPVF and CPVAr: + // algebraically the same plane, different float sums. TGeo relocates from a point pushed far + // past a boundary and never notices; VecGeom answers DistanceToOut = -1 and gives the volume + // back to its mother. Place the frame against the halves the active volumes were actually + // given, so the faces land on the same double. + const double activeHalfX = geomParams->GetCPVActiveSize(0) / 2; + const double activeHalfZ = geomParams->GetCPVActiveSize(1) / 2; + const double frameHalfX = geomParams->GetCPVFrameSize(0) / 2; + const double frameHalfZ = geomParams->GetCPVFrameSize(2) / 2; for (int j = 0; j <= 1; j++) { - x = TMath::Sign(1, 2 * j - 1) * (geomParams->GetCPVBoxSize(0) - geomParams->GetCPVFrameSize(0)) / 2; + x = TMath::Sign(1, 2 * j - 1) * (activeHalfX + frameHalfX); fMC->Gspos("CPVF1", j + 1, "CPV", x, 0, 0, 0, "ONLY"); - z = TMath::Sign(1, 2 * j - 1) * (geomParams->GetCPVBoxSize(2) - geomParams->GetCPVFrameSize(2)) / 2; + z = TMath::Sign(1, 2 * j - 1) * (activeHalfZ + frameHalfZ); fMC->Gspos("CPVF2", j + 1, "CPV", 0, 0, z, 0, "ONLY"); } @@ -590,7 +600,7 @@ void Detector::addAlignableVolumes() const LOG(debug) << "Got TGeoPNEntry " << alignableEntry; if (alignableEntry) { - Float_t angle = geom->GetCPVAngle(iModule); + double angle = geom->GetCPVAngle(iModule); TGeoHMatrix* globMatrix = alignableEntry->GetGlobalOrig(); TGeoHMatrix* matTtoL = new TGeoHMatrix; diff --git a/Detectors/FIT/FT0/simulation/src/Detector.cxx b/Detectors/FIT/FT0/simulation/src/Detector.cxx index 342da8df726a0..3b7bff8d51633 100644 --- a/Detectors/FIT/FT0/simulation/src/Detector.cxx +++ b/Detectors/FIT/FT0/simulation/src/Detector.cxx @@ -203,10 +203,17 @@ void Detector::SetOneMCP(TGeoVolume* ins) Double_t x, y, z; - Float_t ptop[3] = {1.324, 1.324, 1.}; // Cherenkov radiator - Float_t ptopref[3] = {1.3241, 1.3241, 1.}; // Cherenkov radiator wrapped with reflector - Double_t prfv[3] = {0.0002, 1.323, 1.}; // Vertical refracting layer bettwen radiators and between radiator and not optical Air - Double_t prfh[3] = {1.323, 0.0002, 1.}; // Horizontal refracting layer bettwen radiators and ... + Float_t ptop[3] = {1.324, 1.324, 1.}; // Cherenkov radiator + Double_t prfv[3] = {0.0002, 1.323, 1.}; // Vertical refracting layer bettwen radiators and between radiator and not optical Air + Double_t prfh[3] = {1.323, 0.0002, 1.}; // Horizontal refracting layer bettwen radiators and ... + // Cherenkov radiator wrapped with reflector. The container has to hold the radiator plus one + // reflector strip on each side, so its half-width is the radiator's plus the full strip + // thickness. It was written as the radiator plus 1 um while a strip is 4 um thick, which left + // each strip sticking 3 um out of its own mother. The clearance keeps the strips off the + // container wall, so no daughter face sits exactly on the mother's. + const double kWrapClearance = 1.e-4; // cm + Float_t ptopref[3] = {static_cast(ptop[0] + 2 * prfv[0] + kWrapClearance), + static_cast(ptop[1] + 2 * prfh[1] + kWrapClearance), 1.}; Float_t pmcp[3] = {2.949, 2.949, 0.66}; // MCP Float_t pmcpinner[3] = {2.749, 2.749, 0.1}; Float_t pmcpbase[3] = {2.949, 2.949, 0.675}; @@ -231,39 +238,52 @@ void Detector::SetOneMCP(TGeoVolume* ins) Int_t ntops = 0, nrfvs = 0, nrfhs = 0; x = y = z = 0; topref->AddNode(top, 1, new TGeoTranslation(0, 0, 0)); - float xinv = -ptop[0] - prfv[0]; + // Each reflector strip has to sit against the radiator with no gap: SetBorderSurface below + // makes 0TOP/0RFV and 0TOP/0RFH mirrors, and a border surface only acts where the two + // volumes actually touch. Rounding the offset to float left 0.33 nm of air between them, so + // the mirrors never applied and the light left through the side. + auto seat = [](Float_t half, Double_t strip) { return double(half) + strip; }; + double xinv = -seat(ptop[0], prfv[0]); topref->AddNode(rfv, 1, new TGeoTranslation(xinv, 0, 0)); - xinv = ptop[0] + prfv[0]; + xinv = seat(ptop[0], prfv[0]); topref->AddNode(rfv, 2, new TGeoTranslation(xinv, 0, 0)); - float yinv = -ptop[1] - prfh[1]; + double yinv = -seat(ptop[1], prfh[1]); topref->AddNode(rfh, 1, new TGeoTranslation(0, yinv, 0)); - yinv = ptop[1] + prfh[1]; + yinv = seat(ptop[1], prfh[1]); topref->AddNode(rfh, 2, new TGeoTranslation(0, yinv, 0)); + // The wrapped radiator, the MCP top glass, the photocathode and the MCP are stacked along z + // with no gap between them. Each layer's position is built here from the back face of the one + // before it, using the same double addition the box shape uses for its own half-length, so + // adjacent faces land on the same double. Summing the float thicknesses in a different order + // for each layer, as this code did, left the faces up to 0.24 nm apart. + const double zRadiatorCentre = -mInStart[2] + double(ptopref[2]); + const double zRadiatorBack = zRadiatorCentre + double(ptopref[2]); + const double zTopGlassCentre = zRadiatorBack + double(pmcptopglass[2]); + const double zTopGlassBack = zTopGlassCentre + double(pmcptopglass[2]); + const double zCathodeCentre = zTopGlassBack + double(preg[2]); + const double zCathodeBack = zCathodeCentre + double(preg[2]); + // container for radiator, cathode for (Int_t ix = 0; ix < 2; ix++) { float xin = -mInStart[0] + 0.3 + (ix + 0.5) * 2 * ptopref[0]; for (Int_t iy = 0; iy < 2; iy++) { float yin = -mInStart[1] + 0.3 + (iy + 0.5) * 2 * ptopref[1]; ntops++; - z = -mInStart[2] + ptopref[2]; - ins->AddNode(topref, ntops, new TGeoTranslation(xin, yin, z)); - LOG(debug) << " n " << ntops << " x " << xin << " y " << yin << " z radiator " << z; - z += ptopref[2] + 2. * pmcptopglass[2] + preg[2]; - ins->AddNode(cat, ntops, new TGeoTranslation(xin, yin, z)); - LOG(debug) << " n " << ntops << " x " << xin << " y " << yin << " z cathod " << z; + ins->AddNode(topref, ntops, new TGeoTranslation(xin, yin, zRadiatorCentre)); + LOG(debug) << " n " << ntops << " x " << xin << " y " << yin << " z radiator " << zRadiatorCentre; + ins->AddNode(cat, ntops, new TGeoTranslation(xin, yin, zCathodeCentre)); + LOG(debug) << " n " << ntops << " x " << xin << " y " << yin << " z cathod " << zCathodeCentre; } } // MCP TVirtualMC::GetMC()->Gsvolu("0MTO", "BOX", getMediumID(kOpGlass), pmcptopglass, 3); // Op Glass TGeoVolume* mcptop = gGeoManager->GetVolume("0MTO"); - z = -mInStart[2] + 2 * ptopref[2] + pmcptopglass[2]; - ins->AddNode(mcptop, 1, new TGeoTranslation(0, 0, z)); + ins->AddNode(mcptop, 1, new TGeoTranslation(0, 0, zTopGlassCentre)); TVirtualMC::GetMC()->Gsvolu("0MCP", "BOX", getMediumID(kAir), pmcp, 3); // glass TGeoVolume* mcp = gGeoManager->GetVolume("0MCP"); - z = -mInStart[2] + 2 * ptopref[2] + 2 * pmcptopglass[2] + 2 * preg[2] + pmcp[2]; - ins->AddNode(mcp, 1, new TGeoTranslation(0, 0, z)); + ins->AddNode(mcp, 1, new TGeoTranslation(0, 0, zCathodeBack + double(pmcp[2]))); TVirtualMC::GetMC()->Gsvolu("0MSI", "BOX", getMediumID(kMCPwalls), pmcpside, 3); // glass TGeoVolume* mcpside = gGeoManager->GetVolume("0MSI"); diff --git a/Detectors/MUON/MCH/Geometry/Creator/src/Station1Geometry.cxx b/Detectors/MUON/MCH/Geometry/Creator/src/Station1Geometry.cxx index f1289f72b3700..c87741f4aa511 100644 --- a/Detectors/MUON/MCH/Geometry/Creator/src/Station1Geometry.cxx +++ b/Detectors/MUON/MCH/Geometry/Creator/src/Station1Geometry.cxx @@ -38,78 +38,78 @@ namespace mch /// Constants // chamber z position (from AliMUONConstants) -const float kChamberZPos[2] = {-526.16, -545.24}; +const double kChamberZPos[2] = {-526.16, -545.24}; // quadrant z position w.r.t the chamber center -const float kQuadrantZPos = 7.5 / 2; +const double kQuadrantZPos = 7.5 / 2; // thickness -const float kHzPadPlane = 0.0148 / 2; // pad plane -const float kHzFoam = 2.503 / 2; // foam of mechanical plane -const float kHzFR4 = 0.062 / 2; // FR4 of mechanical plane -const float kTotalHzPlane = kHzFoam + kHzFR4; -const float kHzSnPb = 0.0091 / 2; // pad / kapton connection (66 pt) -const float kHzKapton = 0.0122 / 2; // kapton -const float kHzBergPlastic = 0.3062 / 2; // Berg connector -const float kHzBergCopper = 0.1882 / 2; // Berg connector -const float kHzDaughter = 0.0156 / 2; // daughter board -const float kHzGas = 0.42 / 2; // gas +const double kHzPadPlane = 0.0148 / 2; // pad plane +const double kHzFoam = 2.503 / 2; // foam of mechanical plane +const double kHzFR4 = 0.062 / 2; // FR4 of mechanical plane +const double kTotalHzPlane = kHzFoam + kHzFR4; +const double kHzSnPb = 0.0091 / 2; // pad / kapton connection (66 pt) +const double kHzKapton = 0.0122 / 2; // kapton +const double kHzBergPlastic = 0.3062 / 2; // Berg connector +const double kHzBergCopper = 0.1882 / 2; // Berg connector +const double kHzDaughter = 0.0156 / 2; // daughter board +const double kHzGas = 0.42 / 2; // gas // spacers -const float kHxBoxSpacer = 0.51; -const float kHySpacer5A = 0.17; -const float kHzSpacer5A = 1.1515; -const float kHySpacer6 = 1.5; -const float kHzSpacer6 = 0.1; -const float kRSpacer7A = 0.3; -const float kHzSpacer7A = 0.1; +const double kHxBoxSpacer = 0.51; +const double kHySpacer5A = 0.17; +const double kHzSpacer5A = 1.1515; +const double kHySpacer6 = 1.5; +const double kHzSpacer6 = 0.1; +const double kRSpacer7A = 0.3; +const double kHzSpacer7A = 0.1; // quadrant mother volume -const float kMotherPhiL = 0.; -const float kMotherPhiU = 90.; +const double kMotherPhiL = 0.; +const double kMotherPhiU = 90.; // TUBS1 - Middle layer of model -const float kMotherIR1 = 18.3; -const float kMotherOR1 = 105.673; -const float kMotherThick1 = 6.5 / 2; +const double kMotherIR1 = 18.3; +const double kMotherOR1 = 105.673; +const double kMotherThick1 = 6.5 / 2; // TUBS2 - near and far layers of model -const float kMotherIR2 = 20.7; -const float kMotherOR2 = 100.073; -const float kMotherThick2 = 1.5; +const double kMotherIR2 = 20.7; +const double kMotherOR2 = 100.073; +const double kMotherThick2 = 1.5; // sensitive copper pads, foam layer, PCB and electronics model parameters -const float kHxHole = 1.5 / 2; -const float kHyHole = 3.; -const float kHxBergPlastic = 0.74 / 2; -const float kHyBergPlastic = 5.09 / 2; -const float kHxBergCopper = 0.25 / 2; -const float kHyBergCopper = 3.6 / 2; -const float kHxKapton = 0.4; -const float kHyKapton = 5.7 / 2; -const float kHxDaughter = 2.3 / 2; -const float kHyDaughter = 6.3 / 2; -const float kOffsetX = 1.46; -const float kOffsetY = 0.71; -const float kDeltaFilleEtamX = 1.; -const float kDeltaFilleEtamY = 0.051; +const double kHxHole = 1.5 / 2; +const double kHyHole = 3.; +const double kHxBergPlastic = 0.74 / 2; +const double kHyBergPlastic = 5.09 / 2; +const double kHxBergCopper = 0.25 / 2; +const double kHyBergCopper = 3.6 / 2; +const double kHxKapton = 0.4; +const double kHyKapton = 5.7 / 2; +const double kHxDaughter = 2.3 / 2; +const double kHyDaughter = 6.3 / 2; +const double kOffsetX = 1.46; +const double kOffsetY = 0.71; +const double kDeltaFilleEtamX = 1.; +const double kDeltaFilleEtamY = 0.051; // lateral positionner parameters -const float kLateralXPosShift = 92.175; -const float kLateralYPosShift = 5.; +const double kLateralXPosShift = 92.175; +const double kLateralYPosShift = 5.; // trapezoid angles -const float kThetaTrap = 0.; -const float kPhiTrap = 0.; +const double kThetaTrap = 0.; +const double kPhiTrap = 0.; // parameters relative to the LHC beam pipe -const float kNearFarLHC = 2.4; // Near and Far TUBS Origin wrt LHC Origin -const float kDeltaQuadLHC = 2.6; // LHC Origin wrt Quadrant Origin -const float kFrameOffset = 5.2; +const double kNearFarLHC = 2.4; // Near and Far TUBS Origin wrt LHC Origin +const double kDeltaQuadLHC = 2.6; // LHC Origin wrt Quadrant Origin +const double kFrameOffset = 5.2; // pad plane offsets -const float kPadXOffsetBP = 0.50 - 0.63 / 2; // = 0.185 -const float kPadYOffsetBP = -0.31 - 0.42 / 2; // = -0.52 +const double kPadXOffsetBP = 0.50 - 0.63 / 2; // = 0.185 +const double kPadYOffsetBP = -0.31 - 0.42 / 2; // = -0.52 const int kFoamBoxNameOffset = 200; const int kFR4BoxNameOffset = 400; const int kDaughterCopyNoOffset = 1000; @@ -254,42 +254,42 @@ void createFrame(int chamber) /// Volume thicknesses - const float kHzFrameThickness = 1.59 / 2; - const float kHzOuterFrameEpoxy = 1.19 / 2; - const float kHzOuterFrameInox = 0.1 / 2; - const float kHzFoam2 = 2.083 / 2; + const double kHzFrameThickness = 1.59 / 2; + const double kHzOuterFrameEpoxy = 1.19 / 2; + const double kHzOuterFrameInox = 0.1 / 2; + const double kHzFoam2 = 2.083 / 2; // Pertaining to the top outer area - const float kHzTopAnodeSteel1 = 0.185 / 2; - const float kHzTopAnodeSteel2 = 0.51 / 2; - const float kHzAnodeFR4 = 0.08 / 2; - const float kHzTopEarthFaceCu = 0.364 / 2; - const float kHzTopEarthProfileCu = 1.1 / 2; - const float kHzTopPositionerSteel = 1.45 / 2; // should really be 2.125/2.; - const float kHzTopGasSupportAl = 0.85 / 2; + const double kHzTopAnodeSteel1 = 0.185 / 2; + const double kHzTopAnodeSteel2 = 0.51 / 2; + const double kHzAnodeFR4 = 0.08 / 2; + const double kHzTopEarthFaceCu = 0.364 / 2; + const double kHzTopEarthProfileCu = 1.1 / 2; + const double kHzTopPositionerSteel = 1.45 / 2; // should really be 2.125/2.; + const double kHzTopGasSupportAl = 0.85 / 2; // Pertaining to the vertical outer area - const float kHzVerticalCradleAl = 0.8 / 2; - const float kHzLateralSightAl = 0.975 / 2; - const float kHzLateralPosnInoxFace = 2.125 / 2; - const float kHzLatPosInoxProfM = 6.4 / 2; - const float kHzLatPosInoxProfNF = 1.45 / 2; - const float kHzLateralPosnAl = 0.5 / 2; - const float kHzVertEarthFaceCu = 0.367 / 2; - const float kHzVertBarSteel = 0.198 / 2; - const float kHzVertEarthProfCu = 1.1 / 2; + const double kHzVerticalCradleAl = 0.8 / 2; + const double kHzLateralSightAl = 0.975 / 2; + const double kHzLateralPosnInoxFace = 2.125 / 2; + const double kHzLatPosInoxProfM = 6.4 / 2; + const double kHzLatPosInoxProfNF = 1.45 / 2; + const double kHzLateralPosnAl = 0.5 / 2; + const double kHzVertEarthFaceCu = 0.367 / 2; + const double kHzVertBarSteel = 0.198 / 2; + const double kHzVertEarthProfCu = 1.1 / 2; // parameter definitions in sequence // InVFrame parameters - const float kHxInVFrame = 1.85 / 2; - const float kHyInVFrame = 73.95 / 2; - const float kHzInVFrame = kHzFrameThickness; + const double kHxInVFrame = 1.85 / 2; + const double kHyInVFrame = 73.95 / 2; + const double kHzInVFrame = kHzFrameThickness; // Flat 7.5mm vertical section - const float kHxV1mm = 0.75 / 2; - const float kHyV1mm = 1.85 / 2; - const float kHzV1mm = kHzFrameThickness; + const double kHxV1mm = 0.75 / 2; + const double kHyV1mm = 1.85 / 2; + const double kHzV1mm = kHzFrameThickness; // OuterTopFrame Structure // @@ -315,69 +315,69 @@ void createFrame(int chamber) // to a system of sights places on the cradles; // TopFrameAnode parameters - cuboid, 2 layers - const float kHxTFA = 34.1433 / 2; - const float kHyTFA = 7.75 / 2; - const float kHzTFAE = kHzOuterFrameEpoxy; // layer 1 thickness - const float kHzTFAI = kHzOuterFrameInox; // layer 3 thickness + const double kHxTFA = 34.1433 / 2; + const double kHyTFA = 7.75 / 2; + const double kHzTFAE = kHzOuterFrameEpoxy; // layer 1 thickness + const double kHzTFAI = kHzOuterFrameInox; // layer 3 thickness // TopFrameAnode parameters - 2 trapezoids, 2 layers (redefined with TGeoXtru shape) - const float kH1FAA = 8.7 / 2; - const float kTl1FAB = 4.35 / 2; - const float kTl1FAA = 7.75 / 2; + const double kH1FAA = 8.7 / 2; + const double kTl1FAB = 4.35 / 2; + const double kTl1FAA = 7.75 / 2; // TopAnode parameters - cuboid (part 1 of 3 parts) - const float kHxTA1 = 16.2 / 2; - const float kHyTA1 = 3.5 / 2; - const float kHzTA11 = kHzTopAnodeSteel1; // layer 1 - const float kHzTA12 = kHzAnodeFR4; // layer 2 + const double kHxTA1 = 16.2 / 2; + const double kHyTA1 = 3.5 / 2; + const double kHzTA11 = kHzTopAnodeSteel1; // layer 1 + const double kHzTA12 = kHzAnodeFR4; // layer 2 // TopAnode parameters - trapezoid 1 (part 2 of 3 parts) - const float kHzTA21 = kHzTopAnodeSteel2; // layer 1 - const float kHzTA22 = kHzAnodeFR4; // layer 2 - const float kHTA2 = 7.268 / 2; - const float kBlTA2 = 2.03 / 2; - const float kTlTA2 = 3.5 / 2; - const float kAlpTA2 = 5.78; + const double kHzTA21 = kHzTopAnodeSteel2; // layer 1 + const double kHzTA22 = kHzAnodeFR4; // layer 2 + const double kHTA2 = 7.268 / 2; + const double kBlTA2 = 2.03 / 2; + const double kTlTA2 = 3.5 / 2; + const double kAlpTA2 = 5.78; // TopAnode parameters - trapezoid 2 (part 3 of 3 parts) - const float kHzTA3 = kHzAnodeFR4; // layer 1 - const float kHTA3 = 7.268 / 2; - const float kBlTA3 = 0.; - const float kTlTA3 = 2.03 / 2; - const float kAlpTA3 = 7.95; + const double kHzTA3 = kHzAnodeFR4; // layer 1 + const double kHTA3 = 7.268 / 2; + const double kBlTA3 = 0.; + const double kTlTA3 = 2.03 / 2; + const double kAlpTA3 = 7.95; // TopEarthFace parameters - single trapezoid - const float kHzTEF = kHzTopEarthFaceCu; - const float kHTEF = 1.2 / 2; - const float kBlTEF = 21.323 / 2; - const float kTlTEF = 17.963 / 2; - const float kAlpTEF = -54.46; + const double kHzTEF = kHzTopEarthFaceCu; + const double kHTEF = 1.2 / 2; + const double kBlTEF = 21.323 / 2; + const double kTlTEF = 17.963 / 2; + const double kAlpTEF = -54.46; // TopEarthProfile parameters - single trapezoid - const float kHzTEP = kHzTopEarthProfileCu; - const float kHTEP = 0.2; - const float kBlTEP = 31.766 / 2; - const float kTlTEP = 30.535 / 2; - const float kAlpTEP = -56.98; + const double kHzTEP = kHzTopEarthProfileCu; + const double kHTEP = 0.2; + const double kBlTEP = 31.766 / 2; + const double kTlTEP = 30.535 / 2; + const double kAlpTEP = -56.98; // TopPositioner parameters - single Stainless Steel trapezoid - const float kHzTP = kHzTopPositionerSteel; - const float kHTP = 1.5; - const float kBlTP = 7.023 / 2; - const float kTlTP = 7.314 / 2; - const float kAlpTP = 2.78; + const double kHzTP = kHzTopPositionerSteel; + const double kHTP = 1.5; + const double kBlTP = 7.023 / 2; + const double kTlTP = 7.314 / 2; + const double kAlpTP = 2.78; // TopGasSupport parameters - single cuboid - const float kHxTGS = 8.5 / 2; - const float kHyTGS = 1.5; - const float kHzTGS = kHzTopGasSupportAl; + const double kHxTGS = 8.5 / 2; + const double kHyTGS = 1.5; + const double kHzTGS = kHzTopGasSupportAl; // OutEdgeFrame parameters - 4 trapezoidal sections, 2 layers of material (redefined with TGeoXtru shape) - const float kH1OETF = 7.196 / 2; // common to all 4 trapezoids - const float kTl1OETF1 = 3.996 / 2; // Trapezoid 1 - const float kTl1OETF2 = 3.75 / 2; // Trapezoid 2 - const float kTl1OETF3 = 3.01 / 2; // Trapezoid 3 - const float kTl1OETF4 = 1.77 / 2; // Trapezoid 4 + const double kH1OETF = 7.196 / 2; // common to all 4 trapezoids + const double kTl1OETF1 = 3.996 / 2; // Trapezoid 1 + const double kTl1OETF2 = 3.75 / 2; // Trapezoid 2 + const double kTl1OETF3 = 3.01 / 2; // Trapezoid 3 + const double kTl1OETF4 = 1.77 / 2; // Trapezoid 4 /// Frame Structure (OutVFrame): @@ -388,111 +388,111 @@ void createFrame(int chamber) // ALIGNMENT (LateralSightSupport, LateralSight) // OutVFrame parameters - cuboid - const float kHxOutVFrame = 1.85 / 2; - const float kHyOutVFrame = 46.23 / 2; - const float kHzOutVFrame = kHzFrameThickness; + const double kHxOutVFrame = 1.85 / 2; + const double kHyOutVFrame = 46.23 / 2; + const double kHzOutVFrame = kHzFrameThickness; // OutVFrame corner parameters - trapezoid - const float kHzOCTF = kHzFrameThickness; - const float kHOCTF = 1.85 / 2; - const float kBlOCTF = 0.; - const float kTlOCTF = 3.66 / 2; - const float kAlpOCTF = 44.67; + const double kHzOCTF = kHzFrameThickness; + const double kHOCTF = 1.85 / 2; + const double kBlOCTF = 0.; + const double kTlOCTF = 3.66 / 2; + const double kAlpOCTF = 44.67; // VertEarthFaceCu parameters - single trapezoid - const float kHzVFC = kHzVertEarthFaceCu; - const float kHVFC = 0.6; - const float kBlVFC = 46.11 / 2; - const float kTlVFC = 48.236 / 2; - const float kAlpVFC = 41.54; + const double kHzVFC = kHzVertEarthFaceCu; + const double kHVFC = 0.6; + const double kBlVFC = 46.11 / 2; + const double kTlVFC = 48.236 / 2; + const double kAlpVFC = 41.54; // VertEarthSteel parameters - single trapezoid - const float kHzVES = kHzVertBarSteel; - const float kHVES = 0.6; - const float kBlVES = 30.486 / 2; - const float kTlVES = 32.777 / 2; - const float kAlpVES = 43.67; + const double kHzVES = kHzVertBarSteel; + const double kHVES = 0.6; + const double kBlVES = 30.486 / 2; + const double kTlVES = 32.777 / 2; + const double kAlpVES = 43.67; // VertEarthProfCu parameters - single trapezoid - const float kHzVPC = kHzVertEarthProfCu; - const float kHVPC = 0.2; - const float kBlVPC = 29.287 / 2; - const float kTlVPC = 30.091 / 2; - const float kAlpVPC = 45.14; + const double kHzVPC = kHzVertEarthProfCu; + const double kHVPC = 0.2; + const double kBlVPC = 29.287 / 2; + const double kTlVPC = 30.091 / 2; + const double kAlpVPC = 45.14; // SuppLateralPositionner - single cuboid - const float kHxSLP = 1.4; - const float kHySLP = 2.5; - const float kHzSLP = kHzLateralPosnAl; + const double kHxSLP = 1.4; + const double kHySLP = 2.5; + const double kHzSLP = kHzLateralPosnAl; // LateralPositionner - squared off U bend, face view - const float kHxLPF = 2.6; - const float kHyLPF = 1.5; - const float kHzLPF = kHzLateralPosnInoxFace; + const double kHxLPF = 2.6; + const double kHyLPF = 1.5; + const double kHzLPF = kHzLateralPosnInoxFace; // LateralPositionner - squared off U bend, profile view - const float kHxLPP = 0.425 / 2; - const float kHyLPP = 1.5; - const float kHzLPP = kHzLatPosInoxProfM; // middle layer - const float kHzLPNF = kHzLatPosInoxProfNF; // near and far layers + const double kHxLPP = 0.425 / 2; + const double kHyLPP = 1.5; + const double kHzLPP = kHzLatPosInoxProfM; // middle layer + const double kHzLPNF = kHzLatPosInoxProfNF; // near and far layers // VertCradle, 3 layers (copies), each composed of 4 trapezoids (redefined with TGeoXtru shape) - const float kH1VC1 = 10.25 / 2; // all cradles - const float kBl1VC1 = 3.7 / 2; // VertCradleA - const float kBl1VC2 = 6.266 / 2; // VertCradleB - const float kBl1VC3 = 7.75 / 2; // VertCradleC + const double kH1VC1 = 10.25 / 2; // all cradles + const double kBl1VC1 = 3.7 / 2; // VertCradleA + const double kBl1VC2 = 6.266 / 2; // VertCradleB + const double kBl1VC3 = 7.75 / 2; // VertCradleC // VertCradleD - const float kHzVC4 = kHzVerticalCradleAl; - const float kHVC4 = 10.27 / 2; - const float kBlVC4 = 8.273 / 2; - const float kTlVC4 = 7.75 / 2; - const float kAlpVC4 = -1.46; + const double kHzVC4 = kHzVerticalCradleAl; + const double kHVC4 = 10.27 / 2; + const double kBlVC4 = 8.273 / 2; + const double kTlVC4 = 7.75 / 2; + const double kAlpVC4 = -1.46; // LateralSightSupport - single trapezoid - const float kHzVSS = kHzLateralSightAl; - const float kHVSS = 2.5; - const float kBlVSS = 7.747 / 2; - const float kTlVSS = 7.188 / 2; - const float kAlpVSS = -3.2; + const double kHzVSS = kHzLateralSightAl; + const double kHVSS = 2.5; + const double kBlVSS = 7.747 / 2; + const double kTlVSS = 7.188 / 2; + const double kAlpVSS = -3.2; // LateralSight (reference point) - 3 per quadrant, only 1 programmed for now - const float kVSInRad = 0.6; - const float kVSOutRad = 1.3; - const float kVSLen = kHzFrameThickness; + const double kVSInRad = 0.6; + const double kVSOutRad = 1.3; + const double kVSLen = kHzFrameThickness; // InHFrame parameters - const float kHxInHFrame = 75.8 / 2; - const float kHyInHFrame = 1.85 / 2; - const float kHzInHFrame = kHzFrameThickness; + const double kHxInHFrame = 75.8 / 2; + const double kHyInHFrame = 1.85 / 2; + const double kHzInHFrame = kHzFrameThickness; // Flat 7.5mm horizontal section - const float kHxH1mm = 1.85 / 2; - const float kHyH1mm = 0.75 / 2; - const float kHzH1mm = kHzFrameThickness; + const double kHxH1mm = 1.85 / 2; + const double kHyH1mm = 0.75 / 2; + const double kHzH1mm = kHzFrameThickness; // InArcFrame parameters - const float kIAF = 15.7; - const float kOAF = 17.55; - const float kHzAF = kHzFrameThickness; - const float kAFphi1 = 0.; - const float kAFphi2 = 90.; + const double kIAF = 15.7; + const double kOAF = 17.55; + const double kHzAF = kHzFrameThickness; + const double kAFphi1 = 0.; + const double kAFphi2 = 90.; // ScrewsInFrame parameters HEAD - const float kSCRUHMI = 0.; - const float kSCRUHMA = 0.69 / 2; - const float kSCRUHLE = 0.2; + const double kSCRUHMI = 0.; + const double kSCRUHMA = 0.69 / 2; + const double kSCRUHLE = 0.2; // ScrewsInFrame parameters MIDDLE - const float kSCRUMMI = 0.; - const float kSCRUMMA = 0.39 / 2; - const float kSCRUMLE = kHzFrameThickness; + const double kSCRUMMI = 0.; + const double kSCRUMMA = 0.39 / 2; + const double kSCRUMLE = kHzFrameThickness; // ScrewsInFrame parameters NUT - const float kSCRUNMI = 0.; - const float kSCRUNMA = 0.78 / 2; - const float kSCRUNLE = 0.4; + const double kSCRUNMI = 0.; + const double kSCRUNMA = 0.78 / 2; + const double kSCRUNLE = 0.4; const int npar = 11; - float par[npar]; + double par[npar]; if (chamber == 1) { // materials @@ -877,15 +877,15 @@ void createFrame(int chamber) /// Place volumes in the quadrant // InVFrame - float x = kHxInVFrame; - float y = 2 * (kHyInHFrame + kHyH1mm) + kIAF + kHyInVFrame; - float z = 0.; + double x = kHxInVFrame; + double y = 2 * (kHyInHFrame + kHyH1mm) + kIAF + kHyInVFrame; + double z = 0.; Mlayer->AddNode(gGeoManager->GetVolume("SQ00"), 1, new TGeoTranslation(x, y, z)); // keep memory of the mid position (to place screws) - const float kMidVXPos = x; - const float kMidVYPos = y; - const float kMidVZPos = z; + const double kMidVXPos = x; + const double kMidVYPos = y; + const double kMidVZPos = z; // Flat 7.5mm vertical section x = 2 * kHxInVFrame + kHxV1mm; @@ -959,7 +959,7 @@ void createFrame(int chamber) // OutEdgeFrame z = -kHzOuterFrameInox; - float xCenterAll = 70.5, yCenterAll = 70.35; + double xCenterAll = 70.5, yCenterAll = 70.35; Mlayer->AddNode(gGeoManager->GetVolume("SQ17to23"), 1, new TGeoCombiTrans(xCenterAll, yCenterAll, z, rot4)); z = kHzOuterFrameEpoxy; @@ -972,9 +972,9 @@ void createFrame(int chamber) Mlayer->AddNode(gGeoManager->GetVolume("SQ25"), 1, new TGeoTranslation(x, y, z)); // keep memory of the mid position (to place screws) - const float kMidOVXPos = x; - const float kMidOVYPos = y; - const float kMidOVZPos = z; + const double kMidOVXPos = x; + const double kMidOVYPos = y; + const double kMidOVZPos = z; // OutVFrame corner y += kHyOutVFrame + (kBlOCTF + kTlOCTF) / 2; @@ -1032,9 +1032,9 @@ void createFrame(int chamber) Flayer->AddNode(gGeoManager->GetVolume("SQ33"), 2, new TGeoTranslation(x, y, -z)); // VertCradle - 3 (or 4 ) trapezoids redefined with TGeoXtru shape - const float kVertCradleX = 97.29; - const float kVertCradleXshift = 1.39311; - const float kVertCradleY = 23.02; + const double kVertCradleX = 97.29; + const double kVertCradleXshift = 1.39311; + const double kVertCradleY = 23.02; x = kVertCradleX + kDeltaQuadLHC + kVertCradleXshift; y = kVertCradleY + kDeltaQuadLHC; @@ -1074,9 +1074,9 @@ void createFrame(int chamber) Mlayer->AddNode(gGeoManager->GetVolume("SQ40"), 1, new TGeoTranslation(x, y, z)); // keep memory of the mid position (to place screws) - const float kMidHXPos = x; - const float kMidHYPos = y; - const float kMidHZPos = z; + const double kMidHXPos = x; + const double kMidHYPos = y; + const double kMidHZPos = z; // flat 7.5 mm horizontal section x = 2 * (kHxInVFrame + kHxV1mm) + kIAF + kHxH1mm; @@ -1089,22 +1089,22 @@ void createFrame(int chamber) Mlayer->AddNode(gGeoManager->GetVolume("SQ42"), 1, new TGeoTranslation(x, y, z)); // keep memory of the mid position (to place screws) - const float kMidArcXPos = x; - const float kMidArcYPos = y; - const float kMidArcZPos = z; + const double kMidArcXPos = x; + const double kMidArcYPos = y; + const double kMidArcZPos = z; // ScrewsInFrame - in sensitive volume const int kNScrews = 64; - float scruX[kNScrews], scruY[kNScrews]; + double scruX[kNScrews], scruY[kNScrews]; // screw volumes auto vol43 = gGeoManager->GetVolume("SQ43"), vol44 = gGeoManager->GetVolume("SQ44"), vol45 = gGeoManager->GetVolume("SQ45"); - const float kSpecScrewPos = -2.23; + const double kSpecScrewPos = -2.23; // screws on IHEpoxyFrame const int kNScrewsIH = 14; // number of screws on the IHEpoxyFrame - const float kOffX = 5.; // inter-screw distance + const double kOffX = 5.; // inter-screw distance // first screw coordinates scruX[0] = 21.07; @@ -1144,7 +1144,7 @@ void createFrame(int chamber) Mlayer->AddNode(vol45, kNScrews, new TGeoTranslation(x, y, z + kHzInHFrame + kSCRUNLE)); // screws on the IVEpoxyFrame - const float kOffY = 5.; // inter-screw distance + const double kOffY = 5.; // inter-screw distance int firstScrew = 58, lastScrew = 44; // first (special) screw coordinates @@ -1239,14 +1239,14 @@ void createFrame(int chamber) } //______________________________________________________________________________ -TGeoVolume* createPlaneSegment(int iSegment, float halfLength, float halfHeight, int nHoles) +TGeoVolume* createPlaneSegment(int iSegment, double halfLength, double halfHeight, int nHoles) { /// create a plane segment (this includes a foam layer, holes in the foam to feed the kaptons through, kapton connectors and the mother board) auto segment = new TGeoVolumeAssembly(Form("S%d", iSegment)); // variables - float x = 0., y = 0., z = 0.; + double x = 0., y = 0., z = 0.; // foam layer const int kFoamNumber = iSegment + kFoamBoxNameOffset; @@ -1435,7 +1435,7 @@ void placeInnerLayers(int chamber) { /// place the gas and the copper layers for the specified chamber. - float x = kDeltaQuadLHC, y = kDeltaQuadLHC, zc = kHzGas + kHzPadPlane; + double x = kDeltaQuadLHC, y = kDeltaQuadLHC, zc = kHzGas + kHzPadPlane; int dpos = 2 * (chamber - 1); auto layer = gGeoManager->GetVolume(Form("%s%d", kQuadrantMLayerName, chamber)); @@ -1517,7 +1517,7 @@ TGeoVolumeAssembly* createQuadrant(int chamber) placeInnerLayers(chamber); // middle layers - float x = -(kDeltaQuadLHC + kPadXOffsetBP), y = -(kDeltaQuadLHC + kPadYOffsetBP), z = 0.; + double x = -(kDeltaQuadLHC + kPadXOffsetBP), y = -(kDeltaQuadLHC + kPadYOffsetBP), z = 0.; quadrant->AddNode(gGeoManager->GetVolume(Form("%s%d", kQuadrantMLayerName, chamber)), 1, new TGeoTranslation(x, y, z)); quadrant->AddNode(gGeoManager->GetVolume(Form("%s%d", kQuadrantMFLayerName, chamber)), 1, new TGeoTranslation(x, y, z)); @@ -1551,8 +1551,8 @@ void createStation1Geometry(TGeoVolume& topVolume) std::array rot = {rot0, rot1, rot2, rot3}; // initialize the quadrant positions - float x[kNQuadrants] = {1, -1, -1, 1}; - float y[kNQuadrants] = {1, 1, -1, -1}; + double x[kNQuadrants] = {1, -1, -1, 1}; + double y[kNQuadrants] = {1, 1, -1, -1}; for (int i = 0; i < kNQuadrants; i++) { x[i] *= kPadXOffsetBP; @@ -1561,7 +1561,7 @@ void createStation1Geometry(TGeoVolume& topVolume) // build the two chambers int detElemID = 0; - float z = kQuadrantZPos; + double z = kQuadrantZPos; for (int ich = 1; ich < 3; ich++) { diff --git a/Detectors/PHOS/simulation/include/PHOSSimulation/GeometryParams.h b/Detectors/PHOS/simulation/include/PHOSSimulation/GeometryParams.h index 891acb725b0b4..2e604135050d2 100644 --- a/Detectors/PHOS/simulation/include/PHOSSimulation/GeometryParams.h +++ b/Detectors/PHOS/simulation/include/PHOSSimulation/GeometryParams.h @@ -41,26 +41,26 @@ class GeometryParams final : public TNamed } // Return general PHOS parameters - float getIPtoCrystalSurface() const { return mIPtoCrystalSurface; } - float getIPtoOuterCoverDistance() const { return mIPtoOuterCoverDistance; } - float getCrystalSize(int index) const { return 2. * mCrystalHalfSize[index]; } + double getIPtoCrystalSurface() const { return mIPtoCrystalSurface; } + double getIPtoOuterCoverDistance() const { return mIPtoOuterCoverDistance; } + double getCrystalSize(int index) const { return 2. * mCrystalHalfSize[index]; } int getNPhi() const { return mNPhi; } int getNZ() const { return mNz; } int getNCristalsInModule() const { return mNPhi * mNz; } int getNModules() const { return mNModules; } - float getPHOSAngle(int index) const { return mPHOSAngle[index]; } - float* getPHOSParams() { return mPHOSParams; } // Half-sizes of PHOS trapecoid - float* getPHOSATBParams() { return mPHOSATBParams; } // Half-sizes of PHOS trapecoid - float getOuterBoxSize(int index) const { return 2. * mPHOSParams[index]; } - float getCellStep() const { return 2. * mAirCellHalfSize[0]; } + double getPHOSAngle(int index) const { return mPHOSAngle[index]; } + double* getPHOSParams() { return mPHOSParams; } // Half-sizes of PHOS trapecoid + double* getPHOSATBParams() { return mPHOSATBParams; } // Half-sizes of PHOS trapecoid + double getOuterBoxSize(int index) const { return 2. * mPHOSParams[index]; } + double getCellStep() const { return 2. * mAirCellHalfSize[0]; } - void getModuleCenter(int module, float* pos) const + void getModuleCenter(int module, double* pos) const { for (int i = 0; i < 3; i++) { pos[i] = mModuleCenter[module][i]; } } - void getModuleAngle(int module, float angle[3][2]) const + void getModuleAngle(int module, double angle[3][2]) const { for (int i = 0; i < 3; i++) { for (int ian = 0; ian < 2; ian++) { @@ -69,63 +69,63 @@ class GeometryParams final : public TNamed } } // Return PHOS support geometry parameters - float getRailOuterSize(int index) const { return mRailOuterSize[index]; } - float getRailPart1(int index) const { return mRailPart1[index]; } - float getRailPart2(int index) const { return mRailPart2[index]; } - float getRailPart3(int index) const { return mRailPart3[index]; } - float getRailPos(int index) const { return mRailPos[index]; } - float getRailLength() const { return mRailLength; } - float getDistanceBetwRails() const { return mDistanceBetwRails; } - float getRailsDistanceFromIP() const { return mRailsDistanceFromIP; } - float getRailRoadSize(int index) const { return mRailRoadSize[index]; } - float getModuleCraddleGap() const { return mModuleCraddleGap; } - float getCradleWallThickness() const { return mCradleWallThickness; } - float getCradleWall(int index) const { return mCradleWall[index]; } - float getCradleWheel(int index) const { return mCradleWheel[index]; } + double getRailOuterSize(int index) const { return mRailOuterSize[index]; } + double getRailPart1(int index) const { return mRailPart1[index]; } + double getRailPart2(int index) const { return mRailPart2[index]; } + double getRailPart3(int index) const { return mRailPart3[index]; } + double getRailPos(int index) const { return mRailPos[index]; } + double getRailLength() const { return mRailLength; } + double getDistanceBetwRails() const { return mDistanceBetwRails; } + double getRailsDistanceFromIP() const { return mRailsDistanceFromIP; } + double getRailRoadSize(int index) const { return mRailRoadSize[index]; } + double getModuleCraddleGap() const { return mModuleCraddleGap; } + double getCradleWallThickness() const { return mCradleWallThickness; } + double getCradleWall(int index) const { return mCradleWall[index]; } + double getCradleWheel(int index) const { return mCradleWheel[index]; } // Return ideal EMC geometry parameters - const float* getStripHalfSize() const { return mStripHalfSize; } - float getStripWallWidthOut() const { return mStripWallWidthOut; } - const float* getAirCellHalfSize() const { return mAirCellHalfSize; } - const float* getWrappedHalfSize() const { return mWrappedHalfSize; } - float getAirGapLed() const { return mAirGapLed; } - const float* getCrystalHalfSize() const { return mCrystalHalfSize; } - const float* getSupportPlateHalfSize() const { return mSupportPlateHalfSize; } - const float* getSupportPlateInHalfSize() const { return mSupportPlateInHalfSize; } - float getSupportPlateThickness() const { return mSupportPlateThickness; } + const double* getStripHalfSize() const { return mStripHalfSize; } + double getStripWallWidthOut() const { return mStripWallWidthOut; } + const double* getAirCellHalfSize() const { return mAirCellHalfSize; } + const double* getWrappedHalfSize() const { return mWrappedHalfSize; } + double getAirGapLed() const { return mAirGapLed; } + const double* getCrystalHalfSize() const { return mCrystalHalfSize; } + const double* getSupportPlateHalfSize() const { return mSupportPlateHalfSize; } + const double* getSupportPlateInHalfSize() const { return mSupportPlateInHalfSize; } + double getSupportPlateThickness() const { return mSupportPlateThickness; } - const float* getPreampHalfSize() const { return mPreampHalfSize; } - const float* getAPDHalfSize() const { return mPinDiodeHalfSize; } - const float* getOuterThermoParams() const { return mOuterThermoParams; } - const float* getCoolerHalfSize() const { return mCoolerHalfSize; } - const float* getAirGapHalfSize() const { return mAirGapHalfSize; } - const float* getInnerThermoHalfSize() const { return mInnerThermoHalfSize; } - const float* getAlCoverParams() const { return mAlCoverParams; } - const float* getFiberGlassHalfSize() const { return mFiberGlassHalfSize; } - const float* getWarmAlCoverHalfSize() const { return mWarmAlCoverHalfSize; } - const float* getWarmThermoHalfSize() const { return mWarmThermoHalfSize; } - const float* getTSupport1HalfSize() const { return mTSupport1HalfSize; } - const float* getTSupport2HalfSize() const { return mTSupport2HalfSize; } - const float* getTCables1HalfSize() const { return mTCables1HalfSize; } - const float* getTCables2HalfSize() const { return mTCables2HalfSize; } - float getTSupportDist() const { return mTSupportDist; } - const float* getFrameXHalfSize() const { return mFrameXHalfSize; } - const float* getFrameZHalfSize() const { return mFrameZHalfSize; } - const float* getFrameXPosition() const { return mFrameXPosition; } - const float* getFrameZPosition() const { return mFrameZPosition; } - const float* getFGupXHalfSize() const { return mFGupXHalfSize; } - const float* getFGupXPosition() const { return mFGupXPosition; } - const float* getFGupZHalfSize() const { return mFGupZHalfSize; } - const float* getFGupZPosition() const { return mFGupZPosition; } - const float* getFGlowXHalfSize() const { return mFGlowXHalfSize; } - const float* getFGlowXPosition() const { return mFGlowXPosition; } - const float* getFGlowZHalfSize() const { return mFGlowZHalfSize; } - const float* getFGlowZPosition() const { return mFGlowZPosition; } - const float* getFEEAirHalfSize() const { return mFEEAirHalfSize; } - const float* getFEEAirPosition() const { return mFEEAirPosition; } - const float* getEMCParams() const { return mEMCParams; } - float getDistATBtoModule() const { return mzAirTightBoxToTopModuleDist; } - float getATBWallWidth() const { return mATBoxWall; } + const double* getPreampHalfSize() const { return mPreampHalfSize; } + const double* getAPDHalfSize() const { return mPinDiodeHalfSize; } + const double* getOuterThermoParams() const { return mOuterThermoParams; } + const double* getCoolerHalfSize() const { return mCoolerHalfSize; } + const double* getAirGapHalfSize() const { return mAirGapHalfSize; } + const double* getInnerThermoHalfSize() const { return mInnerThermoHalfSize; } + const double* getAlCoverParams() const { return mAlCoverParams; } + const double* getFiberGlassHalfSize() const { return mFiberGlassHalfSize; } + const double* getWarmAlCoverHalfSize() const { return mWarmAlCoverHalfSize; } + const double* getWarmThermoHalfSize() const { return mWarmThermoHalfSize; } + const double* getTSupport1HalfSize() const { return mTSupport1HalfSize; } + const double* getTSupport2HalfSize() const { return mTSupport2HalfSize; } + const double* getTCables1HalfSize() const { return mTCables1HalfSize; } + const double* getTCables2HalfSize() const { return mTCables2HalfSize; } + double getTSupportDist() const { return mTSupportDist; } + const double* getFrameXHalfSize() const { return mFrameXHalfSize; } + const double* getFrameZHalfSize() const { return mFrameZHalfSize; } + const double* getFrameXPosition() const { return mFrameXPosition; } + const double* getFrameZPosition() const { return mFrameZPosition; } + const double* getFGupXHalfSize() const { return mFGupXHalfSize; } + const double* getFGupXPosition() const { return mFGupXPosition; } + const double* getFGupZHalfSize() const { return mFGupZHalfSize; } + const double* getFGupZPosition() const { return mFGupZPosition; } + const double* getFGlowXHalfSize() const { return mFGlowXHalfSize; } + const double* getFGlowXPosition() const { return mFGlowXPosition; } + const double* getFGlowZHalfSize() const { return mFGlowZHalfSize; } + const double* getFGlowZPosition() const { return mFGlowZPosition; } + const double* getFEEAirHalfSize() const { return mFEEAirHalfSize; } + const double* getFEEAirPosition() const { return mFEEAirPosition; } + const double* getEMCParams() const { return mEMCParams; } + double getDistATBtoModule() const { return mzAirTightBoxToTopModuleDist; } + double getATBWallWidth() const { return mATBoxWall; } int getNCellsXInStrip() const { return mNCellsXInStrip; } int getNCellsZInStrip() const { return mNCellsZInStrip; } @@ -144,99 +144,99 @@ class GeometryParams final : public TNamed // General PHOS modules parameters int mNModules; ///< Number of PHOS modules - float mAngle; ///< Position angles between modules - float mPHOSAngle[5]; ///< Position angles of modules - float mPHOSParams[4]; ///< Half-sizes of PHOS trapecoid - float mPHOSATBParams[4]; ///< Half-sizes of (air-filled) inner part of PHOS air tight box - float mCrystalShift; ///< Distance from crystal center to front surface - float mCryCellShift; ///< Distance from crystal center to front surface - float mModuleCenter[5][3]; ///< xyz-position of the module center - float mModuleAngle[5][3][2]; ///< polar and azymuth angles for 3 axes of modules + double mAngle; ///< Position angles between modules + double mPHOSAngle[5]; ///< Position angles of modules + double mPHOSParams[4]; ///< Half-sizes of PHOS trapecoid + double mPHOSATBParams[4]; ///< Half-sizes of (air-filled) inner part of PHOS air tight box + double mCrystalShift; ///< Distance from crystal center to front surface + double mCryCellShift; ///< Distance from crystal center to front surface + double mModuleCenter[5][3]; ///< xyz-position of the module center + double mModuleAngle[5][3][2]; ///< polar and azymuth angles for 3 axes of modules // EMC geometry parameters - float mStripHalfSize[3]; ///< Strip unit size/2 - float mAirCellHalfSize[3]; ///< geometry parameter - float mWrappedHalfSize[3]; ///< geometry parameter - float mSupportPlateHalfSize[3]; ///< geometry parameter - float mSupportPlateInHalfSize[3]; ///< geometry parameter - float mCrystalHalfSize[3]; ///< crystal size/2 - float mAirGapLed; ///< geometry parameter - float mStripWallWidthOut; ///< Side to another strip - float mStripWallWidthIn; ///< geometry parameter - float mTyvecThickness; ///< geometry parameter - float mTSupport1HalfSize[3]; ///< geometry parameter - float mTSupport2HalfSize[3]; ///< geometry parameter - float mPreampHalfSize[3]; ///< geometry parameter - float mPinDiodeHalfSize[3]; ///< Size of the PIN Diode + double mStripHalfSize[3]; ///< Strip unit size/2 + double mAirCellHalfSize[3]; ///< geometry parameter + double mWrappedHalfSize[3]; ///< geometry parameter + double mSupportPlateHalfSize[3]; ///< geometry parameter + double mSupportPlateInHalfSize[3]; ///< geometry parameter + double mCrystalHalfSize[3]; ///< crystal size/2 + double mAirGapLed; ///< geometry parameter + double mStripWallWidthOut; ///< Side to another strip + double mStripWallWidthIn; ///< geometry parameter + double mTyvecThickness; ///< geometry parameter + double mTSupport1HalfSize[3]; ///< geometry parameter + double mTSupport2HalfSize[3]; ///< geometry parameter + double mPreampHalfSize[3]; ///< geometry parameter + double mPinDiodeHalfSize[3]; ///< Size of the PIN Diode - float mOuterThermoParams[4]; // geometry parameter - float mCoolerHalfSize[3]; // geometry parameter - float mAirGapHalfSize[3]; // geometry parameter - float mInnerThermoHalfSize[3]; // geometry parameter - float mAlCoverParams[4]; // geometry parameter - float mFiberGlassHalfSize[3]; // geometry parameter + double mOuterThermoParams[4]; // geometry parameter + double mCoolerHalfSize[3]; // geometry parameter + double mAirGapHalfSize[3]; // geometry parameter + double mInnerThermoHalfSize[3]; // geometry parameter + double mAlCoverParams[4]; // geometry parameter + double mFiberGlassHalfSize[3]; // geometry parameter - float mInnerThermoWidthX; // geometry parameter - float mInnerThermoWidthY; // geometry parameter - float mInnerThermoWidthZ; // geometry parameter - float mAirGapWidthX; // geometry parameter - float mAirGapWidthY; // geometry parameter - float mAirGapWidthZ; // geometry parameter - float mCoolerWidthX; // geometry parameter - float mCoolerWidthY; // geometry parameter - float mCoolerWidthZ; // geometry parameter - float mAlCoverThickness; // geometry parameter - float mOuterThermoWidthXUp; // geometry parameter - float mOuterThermoWidthXLow; // geometry parameter - float mOuterThermoWidthY; // geometry parameter - float mOuterThermoWidthZ; // geometry parameter - float mAlFrontCoverX; // geometry parameter - float mAlFrontCoverZ; // geometry parameter - float mFiberGlassSup2X; // geometry parameter - float mFiberGlassSup1X; // geometry parameter - float mFrameHeight; // geometry parameter - float mFrameThickness; // geometry parameter - float mAirSpaceFeeX; // geometry parameter - float mAirSpaceFeeZ; // geometry parameter - float mAirSpaceFeeY; // geometry parameter - float mTCables2HalfSize[3]; // geometry parameter - float mTCables1HalfSize[3]; // geometry parameter - float mWarmUpperThickness; // geometry parameter - float mWarmBottomThickness; // geometry parameter - float mWarmAlCoverWidthX; // geometry parameter - float mWarmAlCoverWidthY; // geometry parameter - float mWarmAlCoverWidthZ; // geometry parameter - float mWarmAlCoverHalfSize[3]; // geometry parameter - float mWarmThermoHalfSize[3]; // geometry parameter - float mFiberGlassSup1Y; // geometry parameter - float mFiberGlassSup2Y; // geometry parameter - float mTSupportDist; // geometry parameter - float mTSupport1Thickness; // geometry parameter - float mTSupport2Thickness; // geometry parameter - float mTSupport1Width; // geometry parameter - float mTSupport2Width; // geometry parameter - float mFrameXHalfSize[3]; // geometry parameter - float mFrameZHalfSize[3]; // geometry parameter - float mFrameXPosition[3]; // geometry parameter - float mFrameZPosition[3]; // geometry parameter - float mFGupXHalfSize[3]; // geometry parameter - float mFGupXPosition[3]; // geometry parameter - float mFGupZHalfSize[3]; // geometry parameter - float mFGupZPosition[3]; // geometry parameter - float mFGlowXHalfSize[3]; // geometry parameter - float mFGlowXPosition[3]; // geometry parameter - float mFGlowZHalfSize[3]; // geometry parameter - float mFGlowZPosition[3]; // geometry parameter - float mFEEAirHalfSize[3]; // geometry parameter - float mFEEAirPosition[3]; // geometry parameter - float mEMCParams[4]; // geometry parameter - float mIPtoOuterCoverDistance; ///< Distances from interaction point to outer cover - float mIPtoCrystalSurface; ///< Distances from interaction point to Xtal surface + double mInnerThermoWidthX; // geometry parameter + double mInnerThermoWidthY; // geometry parameter + double mInnerThermoWidthZ; // geometry parameter + double mAirGapWidthX; // geometry parameter + double mAirGapWidthY; // geometry parameter + double mAirGapWidthZ; // geometry parameter + double mCoolerWidthX; // geometry parameter + double mCoolerWidthY; // geometry parameter + double mCoolerWidthZ; // geometry parameter + double mAlCoverThickness; // geometry parameter + double mOuterThermoWidthXUp; // geometry parameter + double mOuterThermoWidthXLow; // geometry parameter + double mOuterThermoWidthY; // geometry parameter + double mOuterThermoWidthZ; // geometry parameter + double mAlFrontCoverX; // geometry parameter + double mAlFrontCoverZ; // geometry parameter + double mFiberGlassSup2X; // geometry parameter + double mFiberGlassSup1X; // geometry parameter + double mFrameHeight; // geometry parameter + double mFrameThickness; // geometry parameter + double mAirSpaceFeeX; // geometry parameter + double mAirSpaceFeeZ; // geometry parameter + double mAirSpaceFeeY; // geometry parameter + double mTCables2HalfSize[3]; // geometry parameter + double mTCables1HalfSize[3]; // geometry parameter + double mWarmUpperThickness; // geometry parameter + double mWarmBottomThickness; // geometry parameter + double mWarmAlCoverWidthX; // geometry parameter + double mWarmAlCoverWidthY; // geometry parameter + double mWarmAlCoverWidthZ; // geometry parameter + double mWarmAlCoverHalfSize[3]; // geometry parameter + double mWarmThermoHalfSize[3]; // geometry parameter + double mFiberGlassSup1Y; // geometry parameter + double mFiberGlassSup2Y; // geometry parameter + double mTSupportDist; // geometry parameter + double mTSupport1Thickness; // geometry parameter + double mTSupport2Thickness; // geometry parameter + double mTSupport1Width; // geometry parameter + double mTSupport2Width; // geometry parameter + double mFrameXHalfSize[3]; // geometry parameter + double mFrameZHalfSize[3]; // geometry parameter + double mFrameXPosition[3]; // geometry parameter + double mFrameZPosition[3]; // geometry parameter + double mFGupXHalfSize[3]; // geometry parameter + double mFGupXPosition[3]; // geometry parameter + double mFGupZHalfSize[3]; // geometry parameter + double mFGupZPosition[3]; // geometry parameter + double mFGlowXHalfSize[3]; // geometry parameter + double mFGlowXPosition[3]; // geometry parameter + double mFGlowZHalfSize[3]; // geometry parameter + double mFGlowZPosition[3]; // geometry parameter + double mFEEAirHalfSize[3]; // geometry parameter + double mFEEAirPosition[3]; // geometry parameter + double mEMCParams[4]; // geometry parameter + double mIPtoOuterCoverDistance; ///< Distances from interaction point to outer cover + double mIPtoCrystalSurface; ///< Distances from interaction point to Xtal surface - float mSupportPlateThickness; ///< Thickness of the Aluminium support plate for Strip - float mzAirTightBoxToTopModuleDist; ///< Distance between PHOS upper surface and inner part of Air Tight Box - float mATBoxWall; ///< width of the wall of air tight box + double mSupportPlateThickness; ///< Thickness of the Aluminium support plate for Strip + double mzAirTightBoxToTopModuleDist; ///< Distance between PHOS upper surface and inner part of Air Tight Box + double mATBoxWall; ///< width of the wall of air tight box int mNCellsXInStrip; ///< Number of cells in a strip unit in X int mNCellsZInStrip; ///< Number of cells in a strip unit in Z @@ -247,21 +247,21 @@ class GeometryParams final : public TNamed int mNz; ///< Number of crystal units in Z direction // Support geometry parameters - float mRailOuterSize[3]; ///< Outer size of a rail +-------+ - float mRailPart1[3]; ///< Upper & bottom parts of the rail |--+ +--| - float mRailPart2[3]; ///< Vertical middle parts of the rail | | - float mRailPart3[3]; ///< Vertical upper parts of the rail | | - float mRailPos[3]; ///< Rail position vs. the ALICE center |--+ +--| - float mRailLength; ///< Length of the rail under the support +-------+ - float mDistanceBetwRails; ///< Distance between rails - float mRailsDistanceFromIP; ///< Distance of rails from IP - float mRailRoadSize[3]; ///< Outer size of the dummy box with rails - float mCradleWallThickness; ///< PHOS cradle wall thickness - float mModuleCraddleGap; ///< gap between PHOS module and craddle inner wall - float mCradleWall[5]; ///< Size of the wall of the PHOS cradle (shape TUBS) - float mCradleWheel[3]; ///< "Wheels" by which the cradle rolls over the rails + double mRailOuterSize[3]; ///< Outer size of a rail +-------+ + double mRailPart1[3]; ///< Upper & bottom parts of the rail |--+ +--| + double mRailPart2[3]; ///< Vertical middle parts of the rail | | + double mRailPart3[3]; ///< Vertical upper parts of the rail | | + double mRailPos[3]; ///< Rail position vs. the ALICE center |--+ +--| + double mRailLength; ///< Length of the rail under the support +-------+ + double mDistanceBetwRails; ///< Distance between rails + double mRailsDistanceFromIP; ///< Distance of rails from IP + double mRailRoadSize[3]; ///< Outer size of the dummy box with rails + double mCradleWallThickness; ///< PHOS cradle wall thickness + double mModuleCraddleGap; ///< gap between PHOS module and craddle inner wall + double mCradleWall[5]; ///< Size of the wall of the PHOS cradle (shape TUBS) + double mCradleWheel[3]; ///< "Wheels" by which the cradle rolls over the rails - ClassDefOverride(GeometryParams, 1); + ClassDefOverride(GeometryParams, 2); }; } // namespace phos } // namespace o2 diff --git a/Detectors/PHOS/simulation/src/Detector.cxx b/Detectors/PHOS/simulation/src/Detector.cxx index 449e05b70cc75..a8ff99b3805f1 100644 --- a/Detectors/PHOS/simulation/src/Detector.cxx +++ b/Detectors/PHOS/simulation/src/Detector.cxx @@ -280,10 +280,10 @@ void Detector::ConstructGeometry() if (!mActiveModule[iModule]) { continue; } - Float_t angle[3][2] = {0}; + Double_t angle[3][2] = {0}; geom->getModuleAngle(iModule, angle); Matrix(idrotm[iModule], angle[0][0], angle[0][1], angle[1][0], angle[1][1], angle[2][0], angle[2][1]); - Float_t pos[3] = {0}; + Double_t pos[3] = {0}; geom->getModuleCenter(iModule, pos); if (iModule == 1) { // special 1/2 module @@ -445,7 +445,7 @@ void Detector::ConstructEMCGeometry() phos::GeometryParams* geom = phos::GeometryParams::GetInstance(); - Float_t par[4] = {0}; + Double_t par[4] = {0}; Int_t ipar; // ======= Define the strip =============== @@ -466,9 +466,9 @@ void Detector::ConstructEMCGeometry() par[ipar] = *(geom->getWrappedHalfSize() + ipar); } fMC->Gsvolu("PWRA", "BOX ", getMediumID(ID_TYVEK), par, 3); - const Float_t* pin = geom->getAPDHalfSize(); - const Float_t* preamp = geom->getPreampHalfSize(); - Float_t y = (geom->getAirGapLed() - 2 * pin[1] - 2 * preamp[1]) / 2; + const Double_t* pin = geom->getAPDHalfSize(); + const Double_t* preamp = geom->getPreampHalfSize(); + Double_t y = (geom->getAirGapLed() - 2 * pin[1] - 2 * preamp[1]) / 2; fMC->Gspos("PWRA", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY"); // --- Define crystal and put it into wrapped crystall --- @@ -485,7 +485,7 @@ void Detector::ConstructEMCGeometry() par[ipar] = *(geom->getAPDHalfSize() + ipar); } fMC->Gsvolu("PPIN", "BOX ", getMediumID(ID_APD), par, 3); - const Float_t* crystal = geom->getCrystalHalfSize(); + const Double_t* crystal = geom->getCrystalHalfSize(); y = crystal[1] + geom->getAirGapLed() / 2 - preamp[1]; fMC->Gspos("PPIN", 1, "PCEL", 0.0, y, 0.0, 0, "ONLY"); for (ipar = 0; ipar < 3; ipar++) { @@ -497,13 +497,13 @@ void Detector::ConstructEMCGeometry() // --- Fill strip with wrapped cristals in cells - const Float_t* splate = geom->getSupportPlateHalfSize(); + const Double_t* splate = geom->getSupportPlateHalfSize(); y = -splate[1]; - const Float_t* acel = geom->getAirCellHalfSize(); + const Double_t* acel = geom->getAirCellHalfSize(); for (Int_t lev = 2, icel = 1; icel <= geom->getNCellsXInStrip() * geom->getNCellsZInStrip(); icel += 2, lev += 2) { - Float_t x = (2 * (lev / 2) - 1 - geom->getNCellsXInStrip()) * acel[0]; - Float_t z = acel[2]; + Double_t x = (2 * (lev / 2) - 1 - geom->getNCellsXInStrip()) * acel[0]; + Double_t z = acel[2]; fMC->Gspos("PCEL", icel, "PSTR", x, y, +z, 0, "ONLY"); fMC->Gspos("PCEL", icel + 1, "PSTR", x, y, -z, 0, "ONLY"); @@ -519,7 +519,7 @@ void Detector::ConstructEMCGeometry() par[ipar] = *(geom->getSupportPlateInHalfSize() + ipar); } fMC->Gsvolu("PSHO", "BOX ", getMediumID(ID_AIR), par, 3); - Float_t z = geom->getSupportPlateThickness() / 2; + Double_t z = geom->getSupportPlateThickness() / 2; fMC->Gspos("PSHO", 1, "PSUP", 0.0, 0.0, z, 0, "ONLY"); y = acel[1]; @@ -535,15 +535,15 @@ void Detector::ConstructEMCGeometry() fMC->Gsvolu("PTIH", "BOX ", getMediumID(ID_THERMOINS), par, 3); } - const Float_t* inthermo = geom->getInnerThermoHalfSize(); - const Float_t* strip = geom->getStripHalfSize(); + const Double_t* inthermo = geom->getInnerThermoHalfSize(); + const Double_t* strip = geom->getStripHalfSize(); y = inthermo[1] - strip[1]; Int_t irow; Int_t nr = 1; Int_t icol; for (irow = 0; irow < geom->getNStripX(); irow++) { - Float_t x = (2 * irow + 1 - geom->getNStripX()) * strip[0]; + Double_t x = (2 * irow + 1 - geom->getNStripX()) * strip[0]; for (icol = 0; icol < geom->getNStripZ(); icol++) { z = (2 * icol + 1 - geom->getNStripZ()) * strip[2]; fMC->Gspos("PSTR", nr, "PTII", x, y, z, 0, "ONLY"); @@ -553,7 +553,7 @@ void Detector::ConstructEMCGeometry() if (mCreateHalfMod) { nr = 1; for (irow = 0; irow < geom->getNStripX(); irow++) { - Float_t x = (2 * irow + 1 - geom->getNStripX()) * strip[0]; + Double_t x = (2 * irow + 1 - geom->getNStripX()) * strip[0]; for (icol = 0; icol < geom->getNStripZ(); icol++) { z = (2 * icol + 1 - geom->getNStripZ()) * strip[2]; if (irow >= geom->getNStripX() / 2) { @@ -572,7 +572,7 @@ void Detector::ConstructEMCGeometry() if (mCreateHalfMod) { fMC->Gsvolu("PAGH", "BOX ", getMediumID(ID_AIR), par, 3); } - const Float_t* agap = geom->getAirGapHalfSize(); + const Double_t* agap = geom->getAirGapHalfSize(); y = agap[1] - inthermo[1]; fMC->Gspos("PTII", 1, "PAGA", 0.0, y, 0.0, 0, "ONLY"); @@ -589,7 +589,7 @@ void Detector::ConstructEMCGeometry() fMC->Gsvolu("PCOH", "BOX ", getMediumID(ID_AL), par, 3); } - const Float_t* cooler = geom->getCoolerHalfSize(); + const Double_t* cooler = geom->getCoolerHalfSize(); y = cooler[1] - agap[1]; fMC->Gspos("PAGA", 1, "PCOR", 0.0, y, 0.0, 0, "ONLY"); @@ -605,7 +605,7 @@ void Detector::ConstructEMCGeometry() if (mCreateHalfMod) { fMC->Gsvolu("PIOH", "TRD1", getMediumID(ID_THERMOINS), par, 4); } - const Float_t* outparams = geom->getOuterThermoParams(); + const Double_t* outparams = geom->getOuterThermoParams(); Int_t idrotm = -1; Matrix(idrotm, 90.0, 0.0, 0.0, 0.0, 90.0, 270.0); @@ -626,7 +626,7 @@ void Detector::ConstructEMCGeometry() fMC->Gsvolu("PCLH", "TRD1", getMediumID(ID_AL), par, 4); } - const Float_t* covparams = geom->getAlCoverParams(); + const Double_t* covparams = geom->getAlCoverParams(); z = covparams[3] - outparams[3]; fMC->Gspos("PTIO", 1, "PCOL", 0., 0.0, z, 0, "ONLY"); if (mCreateHalfMod) { @@ -651,14 +651,14 @@ void Detector::ConstructEMCGeometry() par[ipar] = *(geom->getWarmAlCoverHalfSize() + ipar); } fMC->Gsvolu("PWAR", "BOX ", getMediumID(ID_AL), par, 3); - const Float_t* warmcov = geom->getWarmAlCoverHalfSize(); + const Double_t* warmcov = geom->getWarmAlCoverHalfSize(); // --- Define the outer thermoinsulation --- for (ipar = 0; ipar < 3; ipar++) { par[ipar] = *(geom->getWarmThermoHalfSize() + ipar); } fMC->Gsvolu("PWTI", "BOX ", getMediumID(ID_THERMOINS), par, 3); - const Float_t* warmthermo = geom->getWarmThermoHalfSize(); + const Double_t* warmthermo = geom->getWarmThermoHalfSize(); z = -warmcov[2] + warmthermo[2]; fMC->Gspos("PWTI", 1, "PWAR", 0., 0.0, z, 0, "ONLY"); @@ -668,16 +668,16 @@ void Detector::ConstructEMCGeometry() par[ipar] = *(geom->getTCables1HalfSize() + ipar); } fMC->Gsvolu("PCA1", "BOX ", getMediumID(ID_CABLES), par, 3); - const Float_t* cbox = geom->getTCables1HalfSize(); + const Double_t* cbox = geom->getTCables1HalfSize(); for (ipar = 0; ipar < 3; ipar++) { par[ipar] = *(geom->getTSupport1HalfSize() + ipar); } fMC->Gsvolu("PBE1", "BOX ", getMediumID(ID_AL), par, 3); - const Float_t* beams = geom->getTSupport1HalfSize(); + const Double_t* beams = geom->getTSupport1HalfSize(); Int_t isup; for (isup = 0; isup < geom->getNTSuppots(); isup++) { - Float_t x = -cbox[0] + beams[0] + (2 * beams[0] + geom->getTSupportDist()) * isup; + Double_t x = -cbox[0] + beams[0] + (2 * beams[0] + geom->getTSupportDist()) * isup; fMC->Gspos("PBE1", isup, "PCA1", x, 0.0, 0.0, 0, "ONLY"); } @@ -688,14 +688,14 @@ void Detector::ConstructEMCGeometry() par[ipar] = *(geom->getTCables2HalfSize() + ipar); } fMC->Gsvolu("PCA2", "BOX ", getMediumID(ID_CABLES), par, 3); - const Float_t* cbox2 = geom->getTCables2HalfSize(); + const Double_t* cbox2 = geom->getTCables2HalfSize(); for (ipar = 0; ipar < 3; ipar++) { par[ipar] = *(geom->getTSupport2HalfSize() + ipar); } fMC->Gsvolu("PBE2", "BOX ", getMediumID(ID_AL), par, 3); for (isup = 0; isup < geom->getNTSuppots(); isup++) { - Float_t x = -cbox[0] + beams[0] + (2 * beams[0] + geom->getTSupportDist()) * isup; + Double_t x = -cbox[0] + beams[0] + (2 * beams[0] + geom->getTSupportDist()) * isup; fMC->Gspos("PBE2", isup, "PCA2", x, 0.0, 0.0, 0, "ONLY"); } @@ -707,7 +707,7 @@ void Detector::ConstructEMCGeometry() par[ipar] = *(geom->getFrameXHalfSize() + ipar); } fMC->Gsvolu("PFRX", "BOX ", getMediumID(ID_FE), par, 3); - const Float_t* posit1 = geom->getFrameXPosition(); + const Double_t* posit1 = geom->getFrameXPosition(); fMC->Gspos("PFRX", 1, "PWTI", posit1[0], posit1[1], posit1[2], 0, "ONLY"); fMC->Gspos("PFRX", 2, "PWTI", posit1[0], -posit1[1], posit1[2], 0, "ONLY"); @@ -715,7 +715,7 @@ void Detector::ConstructEMCGeometry() par[ipar] = *(geom->getFrameZHalfSize() + ipar); } fMC->Gsvolu("PFRZ", "BOX ", getMediumID(ID_FE), par, 3); - const Float_t* posit2 = geom->getFrameZPosition(); + const Double_t* posit2 = geom->getFrameZPosition(); fMC->Gspos("PFRZ", 1, "PWTI", posit2[0], posit2[1], posit2[2], 0, "ONLY"); fMC->Gspos("PFRZ", 2, "PWTI", -posit2[0], posit2[1], posit2[2], 0, "ONLY"); @@ -724,7 +724,7 @@ void Detector::ConstructEMCGeometry() par[ipar] = *(geom->getFGupXHalfSize() + ipar); } fMC->Gsvolu("PFG1", "BOX ", getMediumID(ID_FIBERGLASS), par, 3); - const Float_t* posit3 = geom->getFGupXPosition(); + const Double_t* posit3 = geom->getFGupXPosition(); fMC->Gspos("PFG1", 1, "PWTI", posit3[0], posit3[1], posit3[2], 0, "ONLY"); fMC->Gspos("PFG1", 2, "PWTI", posit3[0], -posit3[1], posit3[2], 0, "ONLY"); @@ -732,14 +732,14 @@ void Detector::ConstructEMCGeometry() par[ipar] = *(geom->getFGupZHalfSize() + ipar); } fMC->Gsvolu("PFG2", "BOX ", getMediumID(ID_FIBERGLASS), par, 3); - const Float_t* posit4 = geom->getFGupZPosition(); + const Double_t* posit4 = geom->getFGupZPosition(); fMC->Gspos("PFG2", 1, "PWTI", posit4[0], posit4[1], posit4[2], 0, "ONLY"); fMC->Gspos("PFG2", 2, "PWTI", -posit4[0], posit4[1], posit4[2], 0, "ONLY"); for (ipar = 0; ipar < 3; ipar++) { par[ipar] = *(geom->getFGlowXHalfSize() + ipar); } fMC->Gsvolu("PFG3", "BOX ", getMediumID(ID_FIBERGLASS), par, 3); - const Float_t* posit5 = geom->getFGlowXPosition(); + const Double_t* posit5 = geom->getFGlowXPosition(); fMC->Gspos("PFG3", 1, "PWTI", posit5[0], posit5[1], posit5[2], 0, "ONLY"); fMC->Gspos("PFG3", 2, "PWTI", posit5[0], -posit5[1], posit5[2], 0, "ONLY"); @@ -747,7 +747,7 @@ void Detector::ConstructEMCGeometry() par[ipar] = *(geom->getFGlowZHalfSize() + ipar); } fMC->Gsvolu("PFG4", "BOX ", getMediumID(ID_FIBERGLASS), par, 3); - const Float_t* posit6 = geom->getFGlowZPosition(); + const Double_t* posit6 = geom->getFGlowZPosition(); fMC->Gspos("PFG4", 1, "PWTI", posit6[0], posit6[1], posit6[2], 0, "ONLY"); fMC->Gspos("PFG4", 2, "PWTI", -posit6[0], posit6[1], posit6[2], 0, "ONLY"); @@ -756,7 +756,7 @@ void Detector::ConstructEMCGeometry() par[ipar] = *(geom->getFEEAirHalfSize() + ipar); } fMC->Gsvolu("PAFE", "BOX ", getMediumID(ID_AIR), par, 3); - const Float_t* posit7 = geom->getFEEAirPosition(); + const Double_t* posit7 = geom->getFEEAirPosition(); fMC->Gspos("PAFE", 1, "PWTI", posit7[0], posit7[1], posit7[2], 0, "ONLY"); // Define the EMC module volume and combine Cool and Warm sections @@ -805,7 +805,7 @@ void Detector::ConstructSupportGeometry() // Create the PHOS support geometry for GEANT phos::GeometryParams* geom = phos::GeometryParams::GetInstance(); - Float_t par[5] = {0}, x0 = 0., y0 = 0., z0 = 0.; + Double_t par[5] = {0}, x0 = 0., y0 = 0., z0 = 0.; Int_t i, j, copy; // --- Dummy box containing two rails on which PHOS support moves diff --git a/Detectors/PHOS/simulation/src/GeometryParams.cxx b/Detectors/PHOS/simulation/src/GeometryParams.cxx index 51942b0af686c..56e66cd75eae2 100644 --- a/Detectors/PHOS/simulation/src/GeometryParams.cxx +++ b/Detectors/PHOS/simulation/src/GeometryParams.cxx @@ -138,11 +138,11 @@ GeometryParams::GeometryParams(const std::string_view name) mAirCellHalfSize[2] = mWrappedHalfSize[2] + 0.01; // fSupportPlateHalfSize[0] = ( (fNCellsXInStrip-1)*fStripWallWidthIn + 2*fStripWallWidthOut + - // fNCellsXInStrip * (2*fTyvecThickness + 2*fCrystalHalfSize[0]) )/2 ; + // fNCellsXInStrip * (2*fTyvecThickness + 2*fCrystalHalfSize[0]) )/2 ; mSupportPlateHalfSize[0] = 18.04 / 2; mSupportPlateHalfSize[1] = 6.0 / 2; // fSupportPlateHalfSize[2] = ( (fNCellsZInStrip-1)*fStripWallWidthIn + 2*fStripWallWidthOut + - // fNCellsZInStrip * (2*fTyvecThickness + 2*fCrystalHalfSize[2]) )/2; + // fNCellsZInStrip * (2*fTyvecThickness + 2*fCrystalHalfSize[2]) )/2; mSupportPlateHalfSize[2] = 4.51 / 2; mSupportPlateThickness = 0.3; mSupportPlateInHalfSize[0] = mSupportPlateHalfSize[0]; // Half-sizes of the air @@ -202,7 +202,7 @@ GeometryParams::GeometryParams(const std::string_view name) mIPtoOuterCoverDistance = mIPtoCrystalSurface - mAirGapLed - mInnerThermoWidthY - mAirGapWidthY - mCoolerWidthY - mOuterThermoWidthY - mAlCoverThickness - mzAirTightBoxToTopModuleDist - mATBoxWall; - Float_t tanA = mOuterThermoWidthXUp / (2. * mIPtoOuterCoverDistance); + Double_t tanA = mOuterThermoWidthXUp / (2. * mIPtoOuterCoverDistance); // tan(a) where A = angle between IP to center and IP to side across beam mOuterThermoWidthXLow = @@ -380,11 +380,11 @@ GeometryParams::GeometryParams(const std::string_view name) Double_t const kRADDEG = 180.0 / TMath::Pi(); mAngle = 20; for (Int_t i = 1; i <= mNModules; i++) { - Float_t angle = mAngle * (i - 2); + Double_t angle = mAngle * (i - 2); mPHOSAngle[i] = angle; } - Float_t r = mIPtoOuterCoverDistance + mPHOSParams[3]; + Double_t r = mIPtoOuterCoverDistance + mPHOSParams[3]; for (Int_t iModule = 1; iModule <= mNModules; iModule++) { mModuleCenter[iModule][0] = r * TMath::Sin(mPHOSAngle[iModule] / kRADDEG); mModuleCenter[iModule][1] = -r * TMath::Cos(mPHOSAngle[iModule] / kRADDEG); diff --git a/Detectors/Passive/include/DetectorsPassive/FrameStructure.h b/Detectors/Passive/include/DetectorsPassive/FrameStructure.h index 451d15612cf72..5d4ccae7a6880 100644 --- a/Detectors/Passive/include/DetectorsPassive/FrameStructure.h +++ b/Detectors/Passive/include/DetectorsPassive/FrameStructure.h @@ -53,10 +53,10 @@ class FrameStructure : public PassiveBase /** copy constructor (used in MT mode only) */ FrameStructure(const FrameStructure& rhs); - void makeHeatScreen(const char* name, float dyP, int rot1, int rot2); - void createWebFrame(const char* name, float dHz, float theta0, float phi0); + void makeHeatScreen(const char* name, double dyP, int rot1, int rot2); + void createWebFrame(const char* name, double dHz, double theta0, double phi0); void createMaterials(); - TGeoCompositeShape* createTOFRail(float y); + TGeoCompositeShape* createTOFRail(double y); bool mCaveIsAvailable = false; ///! if the mother volume is available (to hook the frame) diff --git a/Detectors/Passive/src/FrameStructure.cxx b/Detectors/Passive/src/FrameStructure.cxx index 47ba9a588ef54..bfe0a8678ed67 100644 --- a/Detectors/Passive/src/FrameStructure.cxx +++ b/Detectors/Passive/src/FrameStructure.cxx @@ -57,7 +57,7 @@ FairModule* FrameStructure::CloneModule() const return new FrameStructure(*this); } -void FrameStructure::makeHeatScreen(const char* name, float dyP, int rot1, int rot2) +void FrameStructure::makeHeatScreen(const char* name, double dyP, int rot1, int rot2) { // Heat screen panel // @@ -65,7 +65,7 @@ void FrameStructure::makeHeatScreen(const char* name, float dyP, int rot1, int r const int kAir = mAirMedID; const int kAlu = mAluMedID; - float dx, dy; + double dx, dy; char mname[16]; char cname[16]; char t1name[16]; @@ -75,11 +75,11 @@ void FrameStructure::makeHeatScreen(const char* name, float dyP, int rot1, int r char t5name[16]; // - float dxP = 2. * (287. * TMath::Sin(10. * TMath::Pi() / 180.) - 2.); - float dzP = 1.05; + double dxP = 2. * (287. * TMath::Sin(10. * TMath::Pi() / 180.) - 2.); + double dzP = 1.05; // // Mother volume - float thshM[3]; + Double_t thshM[3]; thshM[0] = dxP / 2.; thshM[1] = dyP / 2.; thshM[2] = dzP / 2.; @@ -93,7 +93,7 @@ void FrameStructure::makeHeatScreen(const char* name, float dyP, int rot1, int r vmc->Gspos(cname, 1, mname, 0., 0., -0.5, 0); // // Tubes - float thshT[3]; + Double_t thshT[3]; thshT[0] = 0.4; thshT[1] = 0.5; thshT[2] = (dyP / 2. - 8.); @@ -120,8 +120,8 @@ void FrameStructure::makeHeatScreen(const char* name, float dyP, int rot1, int r sig *= -1; dx += 8.00; dy = 4. * sig; - float dy1 = -(thshM[1] - 15.5) * sig; - float dy2 = -(thshM[1] - 7.5) * sig; + double dy1 = -(thshM[1] - 15.5) * sig; + double dy2 = -(thshM[1] - 7.5) * sig; vmc->Gspos(t2name, ipo++, mname, dx, dy, 0.025, rot1); dx += 6.9; @@ -135,7 +135,7 @@ void FrameStructure::makeHeatScreen(const char* name, float dyP, int rot1, int r vmc->Gspos(t3name, 6, mname, dx - 3.45, -(thshM[1] - 7.5), 0.025, rot2); } -void FrameStructure::createWebFrame(const char* name, float dHz, float theta0, float phi0) +void FrameStructure::createWebFrame(const char* name, double dHz, double theta0, double phi0) { // // Create a web frame element @@ -143,12 +143,12 @@ void FrameStructure::createWebFrame(const char* name, float dHz, float theta0, f auto vmc = TVirtualMC::GetMC(); phi0 = 0.; - const float krad2deg = 180. / TMath::Pi(); - const float kdeg2rad = 1. / krad2deg; + const double krad2deg = 180. / TMath::Pi(); + const double kdeg2rad = 1. / krad2deg; const int kAir = mAirMedID; const int kSteel = mSteelMedID; - float ptrap[11]; + Double_t ptrap[11]; char nameA[16]; snprintf(nameA, 16, "%sA", name); @@ -157,8 +157,8 @@ void FrameStructure::createWebFrame(const char* name, float dHz, float theta0, f theta0 *= kdeg2rad; phi0 *= kdeg2rad; - float theta = TMath::Pi() / 2.; - float phi = TMath::ACos(TMath::Cos(theta0) * TMath::Cos(phi0)); + double theta = TMath::Pi() / 2.; + double phi = TMath::ACos(TMath::Cos(theta0) * TMath::Cos(phi0)); if (phi0 < 0) { phi = -phi; @@ -194,7 +194,7 @@ void FrameStructure::createWebFrame(const char* name, float dHz, float theta0, f gGeoManager->GetVolume(nameI)->SetVisContainers(); } -TGeoCompositeShape* FrameStructure::createTOFRail(float y) +TGeoCompositeShape* FrameStructure::createTOFRail(double y) { char nameSostA1[16]; snprintf(nameSostA1, 16, "SostA1"); @@ -366,8 +366,8 @@ void FrameStructure::ConstructGeometry() // ALIP2A__0007 // ALIP2A__0008 // - float pbox[3], ptrap[11], ptrd1[4], ppgon[10]; - float dx, dy, dz; + Double_t pbox[3], ptrap[11], ptrd1[4], ppgon[10]; + double dx, dy, dz; int i, j; int jmod = 0; // @@ -382,50 +382,50 @@ void FrameStructure::ConstructGeometry() const int kAlu = mAluMedID; const int kG10 = mG10MedID; // Angles - const float kEps = 0.01; - const float krad2deg = 180. / TMath::Pi(); - const float kdeg2rad = 1. / krad2deg; - const float sin10 = TMath::Sin(10. * kdeg2rad); - const float tan10 = TMath::Tan(10. * kdeg2rad); - const float cos10 = TMath::Cos(10. * kdeg2rad); + const double kEps = 0.01; + const double krad2deg = 180. / TMath::Pi(); + const double kdeg2rad = 1. / krad2deg; + const double sin10 = TMath::Sin(10. * kdeg2rad); + const double tan10 = TMath::Tan(10. * kdeg2rad); + const double cos10 = TMath::Cos(10. * kdeg2rad); // Dimensions // vertical distance of frame wrt to origin (center of inner rings) - const float hR = 286.00; + const double hR = 286.00; // Height of inner frame from lower edge to outer ring (sectors for detectors) - const float iFrH = 119.00; + const double iFrH = 119.00; // // radial length of web frame elements - const float dHz = 113. / cos10 - 0.3; // 114.74 (114.5 on drawing) + const double dHz = 113. / cos10 - 0.3; // 114.74 (114.5 on drawing) // Positions of ring bars (ALIP2A_0008) // outer - const float dymodU[3] = {71.5, 228.5, 339.5}; + const double dymodU[3] = {71.5, 228.5, 339.5}; // inner - const float dymodL[3] = {50.0, 175.0, 297.5}; + const double dymodL[3] = {50.0, 175.0, 297.5}; // // orientation of web frame elements - const float dymodO[5] = {10., -40., 20., -27.1, 18.4}; + const double dymodO[5] = {10., -40., 20., -27.1, 18.4}; // Position of web frame elements - float dymodW[5] = {70., 73.6, 224.5, 231.4, 340.2}; + double dymodW[5] = {70., 73.6, 224.5, 231.4, 340.2}; for (int ii = 0; ii < 5; ii++) { dymodW[ii] = dymodW[ii] - 3. * TMath::Tan(dymodO[ii] * kdeg2rad); } // Inner ring bars (Pos 6) - const float ringH = 6.00; // Hight - const float ringW = 10.00; // Width of the ring bars in z - const float ringT = 1.00; // Thickness of bars + const double ringH = 6.00; // Hight + const double ringW = 10.00; // Width of the ring bars in z + const double ringT = 1.00; // Thickness of bars // inner longitudinal bars 4 x 6 - const float longH = 6.00; // Height - const float longW = 4.00; // Width + const double longH = 6.00; // Height + const double longW = 4.00; // Width // outer longitudianl bars 8 x 8 - // const float longOD = 8.0; + // const double longOD = 8.0; // some extra space for mother volume - const float dext = sin10 * longW / 2. + 0.01; + const double dext = sin10 * longW / 2. + 0.01; // sector hight with extra space - const float iFrH0 = iFrH + dext; + const double iFrH0 = iFrH + dext; // length of inner longitudinal bars // inner - const float longLI = 615.; - const float zE = 376.5; + const double longLI = 615.; + const double zE = 376.5; // // Frame mother volume // @@ -461,15 +461,15 @@ void FrameStructure::ConstructGeometry() // The outer Frame // - float dol = 4.; - float doh = 4.; - float ds = 0.63; + double dol = 4.; + double doh = 4.; + double ds = 0.63; // // Rings // dz = 2. * 410.2 * sin10 - 2. * dol * cos10 - 2. * doh * tan10; - float l1 = dz / 2.; - float l2 = dz / 2. + 2. * doh * tan10; + double l1 = dz / 2.; + double l2 = dz / 2. + 2. * doh * tan10; TGeoVolumeAssembly* asBI42 = new TGeoVolumeAssembly("BI42"); // Horizontal @@ -534,7 +534,7 @@ void FrameStructure::ConstructGeometry() // // Diagonal bars (1) // - float h, d, dq, x, theta; + double h, d, dq, x, theta; h = (dymodU[1] - dymodU[0] - 2. * dol) * .999; d = 2. * dol; @@ -608,9 +608,9 @@ void FrameStructure::ConstructGeometry() vmc->Gspos("B050", 1, "B049", 0.0, 0.0, 0., 0, "ONLY"); vmc->Gspos("B049", 1, "BM49", 0.0, 0.0, 0., 0, "ONLY"); - float dd1 = d * TMath::Tan(theta * kdeg2rad); - float dd2 = d / TMath::Tan(2. * theta * kdeg2rad); - float theta2 = TMath::ATan(TMath::Abs(dd2 - dd1) / d / 2.); + double dd1 = d * TMath::Tan(theta * kdeg2rad); + double dd2 = d / TMath::Tan(2. * theta * kdeg2rad); + double theta2 = TMath::ATan(TMath::Abs(dd2 - dd1) / d / 2.); ptrap[0] = dol; ptrap[1] = theta2 * krad2deg; @@ -624,11 +624,11 @@ void FrameStructure::ConstructGeometry() ptrap[9] = ptrap[8]; vmc->Gsvolu("B051", "TRAP", kSteel, ptrap, 11); - float ddx0 = ptrap[8]; + double ddx0 = ptrap[8]; - float dd1s = dd1 * (1. - 2. * ds / d); - float dd2s = dd2 * (1. - 2. * ds / d); - float theta2s = TMath::ATan(TMath::Abs(dd2s - dd1s) / (d - 2. * ds) / 2.); + double dd1s = dd1 * (1. - 2. * ds / d); + double dd2s = dd2 * (1. - 2. * ds / d); + double theta2s = TMath::ATan(TMath::Abs(dd2s - dd1s) / (d - 2. * ds) / 2.); ptrap[0] = dol - ds; ptrap[1] = theta2s * krad2deg; @@ -644,7 +644,7 @@ void FrameStructure::ConstructGeometry() vmc->Gsvolu("B052", "TRAP", kAir, ptrap, 11); vmc->Gspos("B052", 1, "B051", 0.0, 0.0, 0., 0, "ONLY"); - float ddx, ddz, drx, drz, rtheta; + double ddx, ddz, drx, drz, rtheta; AliMatrix(idrotm[2001], -theta + 180, 0.0, 90.0, 90.0, 90. - theta, 0.0); rtheta = (90. - theta) * kdeg2rad; @@ -709,15 +709,15 @@ void FrameStructure::ConstructGeometry() // // Positioning of diagonal bars - float rd = 405.5 + 0.51; + double rd = 405.5 + 0.51; dz = (dymodU[1] + dymodU[0]) / 2.; - float dz2 = (dymodU[1] + dymodU[2]) / 2.; + double dz2 = (dymodU[1] + dymodU[2]) / 2.; // // phi = 60 // - float phi = 60; + double phi = 60; dx = rd * TMath::Sin(phi * kdeg2rad); dy = rd * TMath::Cos(phi * kdeg2rad); @@ -776,13 +776,13 @@ void FrameStructure::ConstructGeometry() ptrd1[1] = (hR - longH / 2. + iFrH0) * tan10; ptrd1[2] = zE; ptrd1[3] = iFrH0 / 2.; - float dd = longW / 2. * cos10 + 0.1; + double dd = longW / 2. * cos10 + 0.1; TGeoTrd1* shTRD1 = new TGeoTrd1("shTRD1", ptrd1[0], ptrd1[1], ptrd1[2], ptrd1[3]); TGeoBBox* shBox = new TGeoBBox("shBox", 50., zE + 10., 1.); TGeoRotation* rot1 = new TGeoRotation("urot1", 100., 0., 90., 90., 10., 0.); TGeoRotation* rot2 = new TGeoRotation("urot2", 80., 0., 90., 90., -10., 0.); - float trotDz = iFrH0 / 2. + 1.; - float trotDx = 402. * tan10; + double trotDz = iFrH0 / 2. + 1.; + double trotDx = 402. * tan10; TGeoCombiTrans* trot1 = new TGeoCombiTrans(-trotDx, 0., trotDz, rot2); TGeoCombiTrans* trot2 = new TGeoCombiTrans(+trotDx, 0., trotDz, rot1); TGeoUnion* uni = new TGeoUnion(shBox, shBox, trot1, trot2); @@ -790,12 +790,12 @@ void FrameStructure::ConstructGeometry() TGeoSubtraction* sub = new TGeoSubtraction(shTRD1, shU, nullptr, nullptr); TGeoCompositeShape* shCS = new TGeoCompositeShape("shCS", sub); // center of segments - float r = (hR - longH / 2. + iFrH0 / 2.) - dext; + double r = (hR - longH / 2. + iFrH0 / 2.) - dext; // center of outer frame // vertical - float rout1 = 406.0; + double rout1 = 406.0; // radial - float rout2 = 412.3 - 2. * sin10 + 0.25; + double rout2 = 412.3 - 2. * sin10 + 0.25; // TString module[18]; for (i = 0; i < 18; i++) { @@ -811,8 +811,8 @@ void FrameStructure::ConstructGeometry() TGeoVolume* voTRD1 = new TGeoVolume(name, shCS, kMedAir); module[i] = name; // Place volume i - float phi1 = i * 20.; - float phi2 = 270. + phi1; + double phi1 = i * 20.; + double phi2 = 270. + phi1; if (phi2 >= 360.) { phi2 -= 360.; } @@ -875,8 +875,8 @@ void FrameStructure::ConstructGeometry() // Mother volume TGeoVolumeAssembly* asBI72 = new TGeoVolumeAssembly("BI72"); // Horizontal - float rIB1 = hR + ringH / 2.; - float rIB2 = hR - ringH / 2.; + double rIB1 = hR + ringH / 2.; + double rIB2 = hR - ringH / 2.; ptrd1[0] = (rIB1 - ringT / 2.) * tan10 - dd; ptrd1[1] = (rIB1)*tan10 - dd; ptrd1[2] = ringH / 2.; @@ -913,8 +913,8 @@ void FrameStructure::ConstructGeometry() dz = -iFrH0 / 2. + ringH / 2. + dext; - float dz0 = -iFrH0 / 2. + longH + 113. / 2. + dext - 0.1; - float dx0 = (hR + iFrH / 2.) * tan10 - longW / 4. * cos10 - 0.065; + double dz0 = -iFrH0 / 2. + longH + 113. / 2. + dext - 0.1; + double dx0 = (hR + iFrH / 2.) * tan10 - longW / 4. * cos10 - 0.065; for (jmod = 0; jmod < 18; jmod++) { // // ring bars @@ -1038,12 +1038,12 @@ void FrameStructure::ConstructGeometry() lbox[1] = longLI / 2.; vmc->Gsvolu("BTRDR_14", "BOX", kG10, lbox, 3); dz = -iFrH0 / 2. + longH / 2. + dext; - float zpos = 80.; + double zpos = 80.; int isec_1[11] = {0, 1, 2, 3, 4, 5, 13, 14, 15, 16, 17}; for (int index = 0; index < 11; index++) { jmod = isec_1[index]; - float dz1 = dz + 3. + (zpos - 4.); + double dz1 = dz + 3. + (zpos - 4.); dx0 = (hR + dz0 + zpos - 4.) * tan10 - (longW / 2. + 0.2) / cos10 - 0.05; if (jmod != 5) { vmc->Gspos("BTRDR_10", 2 * jmod + 1, module[jmod], dx0, 0.0, dz1, idrotm[2096], "ONLY"); @@ -1139,17 +1139,17 @@ void FrameStructure::ConstructGeometry() // Fixation Blocks with tie anchors // // inner - float thetFB1 = 10. / 180. * TMath::Pi(); - float thetFB2 = 40. / 180. * TMath::Pi(); + double thetFB1 = 10. / 180. * TMath::Pi(); + double thetFB2 = 40. / 180. * TMath::Pi(); // half height of the block double dzFB = 6.; // half width of the block - float dyFB = 3.9 / 2.; + double dyFB = 3.9 / 2.; // lenth upper face - float dxFB = 46.; + double dxFB = 46.; // lower face - float dx1FB = dxFB / 2. - 2. * dzFB * TMath::Tan(thetFB1); - float dx2FB = dxFB / 2. - 2. * dzFB * TMath::Tan(thetFB2); + double dx1FB = dxFB / 2. - 2. * dzFB * TMath::Tan(thetFB1); + double dx2FB = dxFB / 2. - 2. * dzFB * TMath::Tan(thetFB2); TGeoArb8* shFB1 = new TGeoArb8(dzFB); shFB1->SetVertex(0, -dyFB / 2., -dxFB / 2.); @@ -1241,9 +1241,9 @@ void FrameStructure::ConstructGeometry() asFB4->AddNode(volTAR142, 3, new TGeoTranslation(0., dxFB - 2. + 0.5, -dzFB - 3.)); asFB4->AddNode(volTAR142, 4, new TGeoTranslation(0., -dxFB + 2. + 0.5, -dzFB - 3.)); - float zTA1 = 21.1; - float yFB1 = 87.6; - float yFB2 = 231.4; + double zTA1 = 21.1; + double yFB1 = 87.6; + double yFB2 = 231.4; dx = ((hR - longH / 2. + iFrH0 / 2.) - dext + zTA1) * tan10 - 3.9 / 4.; for (int index = 0; index < 11; index++) { @@ -1403,8 +1403,8 @@ void FrameStructure::ConstructGeometry() if (i >= 4 && i <= 8) { continue; } - float phi1 = i * 20.; - float phi2 = 270. + phi1; + double phi1 = i * 20.; + double phi2 = 270. + phi1; rot1 = new TGeoRotation(Form("TOFS_R1_%d", i), 90.0, phi1, 90., phi2, 0., 0.); dx = TMath::Sin((phi1 + 8.95) * kdeg2rad) * (rout2 + 12.); dy = -TMath::Cos((phi1 + 8.95) * kdeg2rad) * (rout2 + 12.); @@ -1426,11 +1426,11 @@ void FrameStructure::ConstructGeometry() // Thermal shield // - float dyM = 99.0; + double dyM = 99.0; makeHeatScreen("M", dyM, idrotm[2090], idrotm[2091]); - float dyAM = 119.5; + double dyAM = 119.5; makeHeatScreen("AM", dyAM, idrotm[2090], idrotm[2091]); - float dyA = 122.5 - 5.5; + double dyA = 122.5 - 5.5; makeHeatScreen("A", dyA, idrotm[2090], idrotm[2091]); // @@ -1461,7 +1461,7 @@ void FrameStructure::ConstructGeometry() // // shift wrt v2 // - const float zsh = -0.326; + const double zsh = -0.326; // ptrd1[0] = 47.4405; // CBL 28/6/2006 ptrd1[1] = 61.1765; // CBL @@ -1574,7 +1574,7 @@ void FrameStructure::ConstructGeometry() // // Rails for space-frame // - float rbox[3]; + Double_t rbox[3]; rbox[0] = 25.00; rbox[1] = 27.50; @@ -1607,25 +1607,25 @@ void FrameStructure::ConstructGeometry() // The Backframe // // Inner radius - float kBFMRin = 270.0; + double kBFMRin = 270.0; // Outer Radius - float kBFMRou = 417.5; + double kBFMRou = 417.5; // Width - float kBFMdz = 118.0; + double kBFMdz = 118.0; // // // Rings - float kBFRdr = 7.5; - float kBFRdz = 8.0; + double kBFRdr = 7.5; + double kBFRdz = 8.0; // // // Bars and Spokes // - float kBFBd = 8.0; - float kBFBdd = 0.6; + double kBFBd = 8.0; + double kBFBdd = 0.6; // The Mother volume - float tpar[3]; + Double_t tpar[3]; tpar[0] = kBFMRin; tpar[1] = kBFMRou; tpar[2] = kBFMdz / 2.; @@ -1644,7 +1644,7 @@ void FrameStructure::ConstructGeometry() gGeoManager->GetVolume("BFTRD")->SetVisibility(false); for (i = 0; i < 18; i++) { - float phiBF = i * 20.0; + double phiBF = i * 20.0; dx = TMath::Sin(phiBF * kdeg2rad) * (342.0 - 12.62); dy = -TMath::Cos(phiBF * kdeg2rad) * (342.0 - 12.62); vmc->Gspos("BFTRD", i, "BFMO", dx, dy, 0.0, idrotm[2034 + i], "ONLY"); @@ -1692,7 +1692,7 @@ void FrameStructure::ConstructGeometry() // // Longitudinal Bars // - float bpar[3]; + Double_t bpar[3]; bpar[0] = kBFBd / 2; bpar[1] = bpar[0]; @@ -1706,13 +1706,13 @@ void FrameStructure::ConstructGeometry() vmc->Gspos("BFLL", 1, "BFLB", 0., 0., 0., 0, "ONLY"); for (i = 0; i < 18; i++) { - float ro = kBFMRou - kBFBd / 2. - 0.02; - float ri = kBFMRin + kBFBd / 2.; + double ro = kBFMRou - kBFBd / 2. - 0.02; + double ri = kBFMRin + kBFBd / 2.; - float phi0 = float(i) * 20.; + double phi0 = double(i) * 20.; - float xb = ri * TMath::Cos(phi0 * kDegrad); - float yb = ri * TMath::Sin(phi0 * kDegrad); + double xb = ri * TMath::Cos(phi0 * kDegrad); + double yb = ri * TMath::Sin(phi0 * kDegrad); AliMatrix(idrotm[2090 + i], 90.0, phi0, 90.0, phi0 + 270., 0., 0.); vmc->Gspos("BFLB", i + 1, "BFMO", xb, yb, 0., idrotm[2090 + i], "ONLY"); @@ -1731,8 +1731,8 @@ void FrameStructure::ConstructGeometry() bpar[2] = bpar[1]; // // Avoid overlap with circle - float rr = kBFMRou - kBFRdr; - float delta = rr - TMath::Sqrt(rr * rr - kBFBd * kBFBd / 4.) + 0.01; + double rr = kBFMRou - kBFRdr; + double delta = rr - TMath::Sqrt(rr * rr - kBFBd * kBFBd / 4.) + 0.01; bpar[0] -= delta / 2.; vmc->Gsvolu("BFRB", "BOX ", kSteel, bpar, 3); @@ -1746,11 +1746,11 @@ void FrameStructure::ConstructGeometry() int iphi[10] = {0, 1, 3, 6, 8, 9, 10, 12, 15, 17}; for (i = 0; i < 10; i++) { - float rb = (kBFMRin + kBFMRou) / 2.; - float phib = float(iphi[i]) * 20.; + double rb = (kBFMRin + kBFMRou) / 2.; + double phib = double(iphi[i]) * 20.; - float xb = rb * TMath::Cos(phib * kDegrad); - float yb = rb * TMath::Sin(phib * kDegrad); + double xb = rb * TMath::Cos(phib * kDegrad); + double yb = rb * TMath::Sin(phib * kDegrad); vmc->Gspos("BFRB", i + 1, "BFMO", xb, yb, dz, idrotm[2034 + iphi[i]], "ONLY"); vmc->Gspos("BFRB", i + 11, "BFMO", xb, yb, -dz, idrotm[2034 + iphi[i]], "ONLY"); @@ -1765,13 +1765,13 @@ void FrameStructure::ConstructGeometry() // // // Inner radius - float kBBMRin = 278.0; + double kBBMRin = 278.0; // Outer Radius - float kBBMRou = 410.5; + double kBBMRou = 410.5; // Width - float kBBMdz = 223.0; - float kBBBdz = 6.0; - float kBBBdd = 0.6; + double kBBMdz = 223.0; + double kBBBdz = 6.0; + double kBBBdd = 0.6; // The Mother volume diff --git a/Detectors/TOF/base/include/TOFBase/Geo.h b/Detectors/TOF/base/include/TOFBase/Geo.h index 24e8fbdf51174..48c390125704e 100644 --- a/Detectors/TOF/base/include/TOFBase/Geo.h +++ b/Detectors/TOF/base/include/TOFBase/Geo.h @@ -78,12 +78,12 @@ class Geo static Int_t getStripNumberPerSM(Int_t iplate, Int_t istrip); static void getStripAndModule(Int_t iStripPerSM, Int_t& iplate, Int_t& istrip); // Return the module and strip per module corresponding to the strip number per SM - static Float_t getAngles(Int_t iplate, Int_t istrip) { return ANGLES[iplate][istrip]; } - static Float_t getHeights(Int_t iplate, Int_t istrip) { return HEIGHTS[iplate][istrip]; } - static Float_t getDistances(Int_t iplate, Int_t istrip) { return DISTANCES[iplate][istrip]; } - static Float_t getGeoHeights(Int_t isector, Int_t iplate, Int_t istrip) { return mGeoHeights[isector][iplate][istrip]; } - static Float_t getGeoX(Int_t isector, Int_t iplate, Int_t istrip) { return mGeoX[isector][iplate][istrip]; } - static Float_t getGeoDistances(Int_t isector, Int_t iplate, Int_t istrip) { return mGeoDistances[isector][iplate][istrip]; } + static double getAngles(Int_t iplate, Int_t istrip) { return ANGLES[iplate][istrip]; } + static double getHeights(Int_t iplate, Int_t istrip) { return HEIGHTS[iplate][istrip]; } + static double getDistances(Int_t iplate, Int_t istrip) { return DISTANCES[iplate][istrip]; } + static double getGeoHeights(Int_t isector, Int_t iplate, Int_t istrip) { return mGeoHeights[isector][iplate][istrip]; } + static double getGeoX(Int_t isector, Int_t iplate, Int_t istrip) { return mGeoX[isector][iplate][istrip]; } + static double getGeoDistances(Int_t isector, Int_t iplate, Int_t istrip) { return mGeoDistances[isector][iplate][istrip]; } static void getPadDxDyDz(const Float_t* pos, Int_t* det, Float_t* DeltaPos, int sector = -1); enum { @@ -107,16 +107,16 @@ class Geo static constexpr int BC_IN_ORBIT = o2::constants::lhc::LHCMaxBunches; // N. bunch crossing in 1 orbit static constexpr Int_t NPADX = 48; - static constexpr Float_t NPADX_INV_INT = 1. / NPADX; + static constexpr double NPADX_INV_INT = 1. / NPADX; static constexpr Int_t NPADZ = 2; static constexpr Int_t NPADS = NPADX * NPADZ; - static constexpr Float_t NPADS_INV_INT = 1. / NPADS; + static constexpr double NPADS_INV_INT = 1. / NPADS; static constexpr Int_t NSTRIPA = 15; static constexpr Int_t NSTRIPB = 19; static constexpr Int_t NSTRIPC = 19; static constexpr Int_t NMAXNSTRIP = 20; static constexpr Int_t NSTRIPXSECTOR = NSTRIPA + 2 * NSTRIPB + 2 * NSTRIPC; - static constexpr Float_t NSTRIPXSECTOR_INV_INT = 1. / NSTRIPXSECTOR; + static constexpr double NSTRIPXSECTOR_INV_INT = 1. / NSTRIPXSECTOR; static constexpr Int_t NPADSXSECTOR = NSTRIPXSECTOR * NPADS; static constexpr Int_t NSECTORS = 18; @@ -126,42 +126,42 @@ class Geo static constexpr int NCHANNELS = NSTRIPS * NPADS; static constexpr int N_ELECTRONIC_CHANNELS = 72 << 12; - static constexpr Float_t MAXHZTOF = 370.6; // Max half z-size of TOF (cm) - static constexpr Float_t ZLENA = MAXHZTOF * 2.; // length (cm) of the A module - static constexpr Float_t ZLENB = 146.5; // length (cm) of the B module - static constexpr Float_t ZLENC = 170.45; // length (cm) of the C module + static constexpr double MAXHZTOF = 370.6; // Max half z-size of TOF (cm) + static constexpr double ZLENA = MAXHZTOF * 2.; // length (cm) of the A module + static constexpr double ZLENB = 146.5; // length (cm) of the B module + static constexpr double ZLENC = 170.45; // length (cm) of the C module - static constexpr Float_t XTOF = 372.00; // Inner radius of the TOF for Reconstruction (cm) - static constexpr Float_t RMIN = 371; - static constexpr Float_t RMAX = 400.05; + static constexpr double XTOF = 372.00; // Inner radius of the TOF for Reconstruction (cm) + static constexpr double RMIN = 371; + static constexpr double RMAX = 400.05; - static constexpr Float_t RMIN2 = RMIN * RMIN; - static constexpr Float_t RMAX2 = RMAX * RMAX; + static constexpr double RMIN2 = RMIN * RMIN; + static constexpr double RMAX2 = RMAX * RMAX; - static constexpr Float_t XPAD = 2.5; - static constexpr Float_t XHALFSTRIP = XPAD * NPADX * 0.5; - static constexpr Float_t ZPAD = 3.5; - static constexpr Float_t STRIPLENGTH = 122; + static constexpr double XPAD = 2.5; + static constexpr double XHALFSTRIP = XPAD * NPADX * 0.5; + static constexpr double ZPAD = 3.5; + static constexpr double STRIPLENGTH = 122; - static constexpr Float_t SIGMAFORTAIL1 = 2.; // Sig1 for simulation of TDC tails - static constexpr Float_t SIGMAFORTAIL12 = 0.5; // Sig2 for simulation of TDC tails + static constexpr double SIGMAFORTAIL1 = 2.; // Sig1 for simulation of TDC tails + static constexpr double SIGMAFORTAIL12 = 0.5; // Sig2 for simulation of TDC tails - static constexpr Float_t PHISEC = 20; // sector Phi width (deg) - static constexpr Float_t PHISECINV = 1. / PHISEC; // sector Phi width (deg) + static constexpr double PHISEC = 20; // sector Phi width (deg) + static constexpr double PHISECINV = 1. / PHISEC; // sector Phi width (deg) - static constexpr Float_t TDCBIN = o2::constants::lhc::LHCBunchSpacingNS * 1E3 / 1024; ///< TDC bin width [ps] - static constexpr Float_t NTDCBIN_PER_PS = 1. / TDCBIN; ///< number of TDC bins in 1 ns + static constexpr double TDCBIN = o2::constants::lhc::LHCBunchSpacingNS * 1E3 / 1024; ///< TDC bin width [ps] + static constexpr double NTDCBIN_PER_PS = 1. / TDCBIN; ///< number of TDC bins in 1 ns static constexpr Int_t RATIO_TOT_TDC_BIN = 2; // ratio between TDC and TOT bin sizes - static constexpr Float_t TOTBIN = TDCBIN * RATIO_TOT_TDC_BIN; // time-over-threshold bin width [ps] - static constexpr Float_t TOTBIN_NS = TOTBIN * 1E-3; // time-over-threshold bin width [ns] - static constexpr Float_t NTOTBIN_PER_NS = 1000. / TOTBIN; // number of time-over-threshold bin in 1 ns - static constexpr Float_t BUNCHCROSSINGBIN = TDCBIN * 1024; // bunch-crossing bin width [ps] + static constexpr double TOTBIN = TDCBIN * RATIO_TOT_TDC_BIN; // time-over-threshold bin width [ps] + static constexpr double TOTBIN_NS = TOTBIN * 1E-3; // time-over-threshold bin width [ns] + static constexpr double NTOTBIN_PER_NS = 1000. / TOTBIN; // number of time-over-threshold bin in 1 ns + static constexpr double BUNCHCROSSINGBIN = TDCBIN * 1024; // bunch-crossing bin width [ps] - static constexpr Float_t SLEWTOTMIN = 10.; // min TOT for slewing correction [ns] - static constexpr Float_t SLEWTOTMAX = 16.; // max TOT for slewing correction [ns] + static constexpr double SLEWTOTMIN = 10.; // min TOT for slewing correction [ns] + static constexpr double SLEWTOTMAX = 16.; // max TOT for slewing correction [ns] - static constexpr Float_t DEADTIME = 25E+03; // Single channel dead time (ps) - static constexpr Float_t DEADTIMETDC = DEADTIME / TDCBIN; ///< Single channel TDC dead time (ps) + static constexpr double DEADTIME = 25E+03; // Single channel dead time (ps) + static constexpr double DEADTIMETDC = DEADTIME / TDCBIN; ///< Single channel TDC dead time (ps) static constexpr int NWINDOW_IN_ORBIT = 3; //< Number of tof window in 1 orbit static constexpr Double_t READOUTWINDOW = o2::constants::lhc::LHCOrbitNS / NWINDOW_IN_ORBIT; // Readout window (ns) - time between two consecutive triggers = 1/3 orbit static constexpr int BC_IN_WINDOW = BC_IN_ORBIT / NWINDOW_IN_ORBIT; // N. bunch crossing in 1 tof window @@ -208,7 +208,7 @@ class Geo 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1}; - static constexpr Float_t ANGLES[NPLATES][NMAXNSTRIP] = { // Strip Tilt Angles + static constexpr double ANGLES[NPLATES][NMAXNSTRIP] = { // Strip Tilt Angles {43.99, 43.20, 42.40, 41.59, 40.77, 39.94, 39.11, 38.25, 37.40, 36.53, 35.65, 34.76, 33.87, 32.96, 32.05, 31.13, 30.19, 29.24, 12.33, 0.00}, {27.26, 26.28, 25.30, 24.31, 23.31, 22.31, 21.30, 20.29, 19.26, 18.24, @@ -220,7 +220,7 @@ class Geo {-12.33, -29.24, -30.19, -31.13, -32.05, -32.96, -33.87, -34.76, -35.65, -36.53, -37.40, -38.25, -39.11, -39.94, -40.77, -41.59, -42.40, -43.20, -43.99, 0.00}}; - static constexpr Float_t HEIGHTS[NPLATES][NMAXNSTRIP] = { + static constexpr double HEIGHTS[NPLATES][NMAXNSTRIP] = { {-8.405, -7.725, -8.405, -7.765, -8.285, -7.745, -7.865, -7.905, -7.895, -7.885, -7.705, -7.395, -7.525, -7.645, -7.835, -7.965, -8.365, -9.385, -3.255, 0.000}, {-7.905, -8.235, -8.605, -9.045, -10.205, -3.975, -5.915, -7.765, -10.205, -3.635, @@ -232,7 +232,7 @@ class Geo {-3.255, -9.385, -8.365, -7.965, -7.835, -7.645, -7.525, -7.395, -7.705, -7.885, -7.895, -7.905, -7.865, -7.745, -8.285, -7.765, -8.405, -7.725, -8.405, 0.000}}; - static constexpr Float_t DISTANCES[NPLATES][NMAXNSTRIP] = { + static constexpr double DISTANCES[NPLATES][NMAXNSTRIP] = { {364.14, 354.88, 344.49, 335.31, 325.44, 316.51, 307.11, 297.91, 288.84, 279.89, 271.20, 262.62, 253.84, 245.20, 236.56, 228.06, 219.46, 210.63, 206.09, 0.00}, {194.57, 186.38, 178.25, 170.13, 161.78, 156.62, 148.10, 139.72, 131.23, 125.87, @@ -251,92 +251,92 @@ class Geo kTRUE, kTRUE, kFALSE, kFALSE, kFALSE, kFALSE, kFALSE, kTRUE, kFALSE}; ; // Selecting TOF sectors containing FEA cooling masks - static constexpr Float_t MODULEWALLTHICKNESS = 0.33; // wall thickness (cm) (nofe: 0.3 as in AliTOFGeometry?) - static constexpr Float_t INTERCENTRMODBORDER1 = 49.5; // 1st distance of + static constexpr double MODULEWALLTHICKNESS = 0.33; // wall thickness (cm) (nofe: 0.3 as in AliTOFGeometry?) + static constexpr double INTERCENTRMODBORDER1 = 49.5; // 1st distance of // border between // central and // intermediate // modules respect to // the central module // centre (cm) - static constexpr Float_t INTERCENTRMODBORDER2 = 57.5; // 2nd distance of + static constexpr double INTERCENTRMODBORDER2 = 57.5; // 2nd distance of // border between the // central and // intermediate // modules respect to // the central module // centre (cm) - static constexpr Float_t EXTERINTERMODBORDER1 = 196.0; // 1st distance of + static constexpr double EXTERINTERMODBORDER1 = 196.0; // 1st distance of // border between the // intermediate and // external modules // respect to the // central module // centre (cm) - static constexpr Float_t EXTERINTERMODBORDER2 = 203.5; // 2nd distance of + static constexpr double EXTERINTERMODBORDER2 = 203.5; // 2nd distance of // border between the // intermediate and // external // modules respect to // the central module // centre (cm) - static constexpr Float_t LENGTHINCEMODBORDERU = 5.0; // height of upper border + static constexpr double LENGTHINCEMODBORDERU = 5.0; // height of upper border // between the central // and intermediate // modules (cm) - static constexpr Float_t LENGTHINCEMODBORDERD = 7.0; // height of lower border + static constexpr double LENGTHINCEMODBORDERD = 7.0; // height of lower border // between the central // and intermediate // modules (cm) - static constexpr Float_t LENGTHEXINMODBORDER = 5.0; // height of border + static constexpr double LENGTHEXINMODBORDER = 5.0; // height of border // between the // intermediate and // external modules // (cm) - static constexpr Float_t MODULECOVERTHICKNESS = 2.0; // thickness of cover + static constexpr double MODULECOVERTHICKNESS = 2.0; // thickness of cover // modules zone (cm) - static constexpr Float_t FEAWIDTH1 = 19.0; // mother volume width of each of - // two external FEA in a - // supermodule (cm) - static constexpr Float_t FEAWIDTH2 = 39.5; // mother volume width of two - // internal FEA in a supermodule - // (cm) - static constexpr Float_t SAWTHICKNESS = 1.0; // services alluminium wall - // thickness (cm) - static constexpr Float_t CBLW = 13.5; // cables&tubes block width (cm) - static constexpr Float_t CBLH1 = 2.0; // min. height of cables&tubes block - // (cm) - static constexpr Float_t CBLH2 = 12.3; // max. height of cables&tubes block - // (cm) - static constexpr Float_t BETWEENLANDMASK = 0.1; // distance between the L + static constexpr double FEAWIDTH1 = 19.0; // mother volume width of each of + // two external FEA in a + // supermodule (cm) + static constexpr double FEAWIDTH2 = 39.5; // mother volume width of two + // internal FEA in a supermodule + // (cm) + static constexpr double SAWTHICKNESS = 1.0; // services alluminium wall + // thickness (cm) + static constexpr double CBLW = 13.5; // cables&tubes block width (cm) + static constexpr double CBLH1 = 2.0; // min. height of cables&tubes block + // (cm) + static constexpr double CBLH2 = 12.3; // max. height of cables&tubes block + // (cm) + static constexpr double BETWEENLANDMASK = 0.1; // distance between the L // element and the Nino // mask (cm) - static constexpr Float_t AL1PARAMETERS[3] = {static_cast(FEAWIDTH1 * 0.5), 0.4, 0.2}; // (cm) - static constexpr Float_t AL2PARAMETERS[3] = {7.25, 0.75, 0.25}; // (cm) - static constexpr Float_t AL3PARAMETERS[3] = {3., 4., 0.1}; // (cm) - static constexpr Float_t ROOF1PARAMETERS[3] = {AL1PARAMETERS[0], AL1PARAMETERS[2], 1.45}; // (cm) - static constexpr Float_t ROOF2PARAMETERS[3] = {AL3PARAMETERS[0], 0.1, 1.15}; // (cm) - static constexpr Float_t FEAPARAMETERS[3] = {static_cast(FEAWIDTH1 * 0.5), 5.6, 0.1}; // (cm) - static constexpr Float_t BAR[3] = {8.575, 0.6, 0.25}; // (cm) - static constexpr Float_t BAR1[3] = {BAR[0], BAR[1], 0.1}; // (cm) - static constexpr Float_t BAR2[3] = {BAR[0], 0.1, static_cast(BAR[1] - 2. * BAR1[2])}; // (cm) - static constexpr Float_t BARS[3] = {2., BAR[1], BAR[2]}; // (cm) - static constexpr Float_t BARS1[3] = {BARS[0], BAR1[1], BAR1[2]}; // (cm) - static constexpr Float_t BARS2[3] = {BARS[0], BAR2[1], BAR2[2]}; // (cm) - - static constexpr Float_t HHONY = 1.0; // height of HONY Layer - static constexpr Float_t HPCBY = 0.08; // height of PCB Layer - static constexpr Float_t HRGLY = 0.055; // height of RED GLASS Layer - static constexpr Float_t HFILIY = 0.125; // height of FISHLINE Layer - static constexpr Float_t HGLASSY = 0.160 * 0.5; // semi-height of GLASS Layer - static constexpr Float_t HCPCBY = 0.16; // height of PCB Central Layer - static constexpr Float_t WHONZ = 8.1; // z dimension of HONEY Layer - static constexpr Float_t WPCBZ1 = 10.64; // z dimension of PCB Lower Layer - static constexpr Float_t WPCBZ2 = 11.6; // z dimension of PCB Upper Layer - static constexpr Float_t WCPCBZ = 12.4; // z dimension of PCB Central Layer - static constexpr Float_t WRGLZ = 8.; // z dimension of RED GLASS Layer - static constexpr Float_t WGLFZ = 7.; // z dimension of GLASS Layer - static constexpr Float_t HSENSMY = 0.0105; // height of Sensitive Layer + static constexpr double AL1PARAMETERS[3] = {(FEAWIDTH1 * 0.5), 0.4, 0.2}; // (cm) + static constexpr double AL2PARAMETERS[3] = {7.25, 0.75, 0.25}; // (cm) + static constexpr double AL3PARAMETERS[3] = {3., 4., 0.1}; // (cm) + static constexpr double ROOF1PARAMETERS[3] = {AL1PARAMETERS[0], AL1PARAMETERS[2], 1.45}; // (cm) + static constexpr double ROOF2PARAMETERS[3] = {AL3PARAMETERS[0], 0.1, 1.15}; // (cm) + static constexpr double FEAPARAMETERS[3] = {(FEAWIDTH1 * 0.5), 5.6, 0.1}; // (cm) + static constexpr double BAR[3] = {8.575, 0.6, 0.25}; // (cm) + static constexpr double BAR1[3] = {BAR[0], BAR[1], 0.1}; // (cm) + static constexpr double BAR2[3] = {BAR[0], 0.1, (BAR[1] - 2. * BAR1[2])}; // (cm) + static constexpr double BARS[3] = {2., BAR[1], BAR[2]}; // (cm) + static constexpr double BARS1[3] = {BARS[0], BAR1[1], BAR1[2]}; // (cm) + static constexpr double BARS2[3] = {BARS[0], BAR2[1], BAR2[2]}; // (cm) + + static constexpr double HHONY = 1.0; // height of HONY Layer + static constexpr double HPCBY = 0.08; // height of PCB Layer + static constexpr double HRGLY = 0.055; // height of RED GLASS Layer + static constexpr double HFILIY = 0.125; // height of FISHLINE Layer + static constexpr double HGLASSY = 0.160 * 0.5; // semi-height of GLASS Layer + static constexpr double HCPCBY = 0.16; // height of PCB Central Layer + static constexpr double WHONZ = 8.1; // z dimension of HONEY Layer + static constexpr double WPCBZ1 = 10.64; // z dimension of PCB Lower Layer + static constexpr double WPCBZ2 = 11.6; // z dimension of PCB Upper Layer + static constexpr double WCPCBZ = 12.4; // z dimension of PCB Central Layer + static constexpr double WRGLZ = 8.; // z dimension of RED GLASS Layer + static constexpr double WGLFZ = 7.; // z dimension of GLASS Layer + static constexpr double HSENSMY = 0.0105; // height of Sensitive Layer static Float_t getCableLength(Int_t icrate, Int_t islot, Int_t ichain, Int_t itdc) { return CABLELENGTH[icrate][islot - 3][ichain][itdc / 3]; } static Float_t getCableTimeShift(Int_t icrate, Int_t islot, Int_t ichain, Int_t itdc) { return getCableLength(icrate, islot, ichain, itdc) * CABLEPROPAGATIONDELAY; } @@ -377,15 +377,15 @@ class Geo static Float_t mRotationMatrixSector[NSECTORS + 1][3][3]; // rotation matrixes static Float_t mRotationMatrixPlateStrip[NSECTORS][NPLATES][NMAXNSTRIP][3][3]; static Float_t mPadPosition[NSECTORS][NPLATES][NMAXNSTRIP][NPADZ][NPADX][3]; - static Float_t mGeoDistances[NSECTORS][NPLATES][NMAXNSTRIP]; - static Float_t mGeoHeights[NSECTORS][NPLATES][NMAXNSTRIP]; - static Float_t mGeoX[NSECTORS][NPLATES][NMAXNSTRIP]; + static double mGeoDistances[NSECTORS][NPLATES][NMAXNSTRIP]; + static double mGeoHeights[NSECTORS][NPLATES][NMAXNSTRIP]; + static double mGeoX[NSECTORS][NPLATES][NMAXNSTRIP]; static Int_t mPlate[NSTRIPXSECTOR]; static Int_t mStripInPlate[NSTRIPXSECTOR]; static std::array, 5> mDistances[NSECTORS]; // cable length map - static constexpr Float_t CABLEPROPAGATIONDELAY = 0.0513; // Propagation delay [ns/cm] + static constexpr double CABLEPROPAGATIONDELAY = 0.0513; // Propagation delay [ns/cm] static const Float_t CABLELENGTH[kNCrate][10][kNChain][kNTdc / 3]; // not constexpr as we initialize it in CableLength.cxx at run time static const Int_t CHAN_TO_ELCHAN[NCHANNELS]; static const Int_t ELCHAN_TO_CHAN[N_ELECTRONIC_CHANNELS]; diff --git a/Detectors/TOF/base/src/Geo.cxx b/Detectors/TOF/base/src/Geo.cxx index 7df4c3a3537e1..84c7e42602096 100644 --- a/Detectors/TOF/base/src/Geo.cxx +++ b/Detectors/TOF/base/src/Geo.cxx @@ -22,20 +22,20 @@ ClassImp(o2::tof::Geo); using namespace o2::tof; -constexpr Float_t Geo::ANGLES[NPLATES][NMAXNSTRIP]; -constexpr Float_t Geo::HEIGHTS[NPLATES][NMAXNSTRIP]; -constexpr Float_t Geo::DISTANCES[NPLATES][NMAXNSTRIP]; +constexpr double Geo::ANGLES[NPLATES][NMAXNSTRIP]; +constexpr double Geo::HEIGHTS[NPLATES][NMAXNSTRIP]; +constexpr double Geo::DISTANCES[NPLATES][NMAXNSTRIP]; constexpr Bool_t Geo::FEAWITHMASKS[NSECTORS]; -constexpr Float_t Geo::ROOF2PARAMETERS[3]; +constexpr double Geo::ROOF2PARAMETERS[3]; Bool_t Geo::mToBeInit = kTRUE; Bool_t Geo::mToBeInitIndexing = kTRUE; Float_t Geo::mRotationMatrixSector[NSECTORS + 1][3][3]; Float_t Geo::mRotationMatrixPlateStrip[NSECTORS][NPLATES][NMAXNSTRIP][3][3]; Float_t Geo::mPadPosition[NSECTORS][NPLATES][NMAXNSTRIP][NPADZ][NPADX][3]; -Float_t Geo::mGeoDistances[NSECTORS][NPLATES][NMAXNSTRIP]; -Float_t Geo::mGeoHeights[NSECTORS][NPLATES][NMAXNSTRIP]; -Float_t Geo::mGeoX[NSECTORS][NPLATES][NMAXNSTRIP]; +double Geo::mGeoDistances[NSECTORS][NPLATES][NMAXNSTRIP]; +double Geo::mGeoHeights[NSECTORS][NPLATES][NMAXNSTRIP]; +double Geo::mGeoX[NSECTORS][NPLATES][NMAXNSTRIP]; Int_t Geo::mPlate[NSTRIPXSECTOR]; Int_t Geo::mStripInPlate[NSTRIPXSECTOR]; std::array, 5> Geo::mDistances[NSECTORS]; @@ -741,8 +741,8 @@ Int_t Geo::fromPlateToStrip(Float_t* pos, Int_t iplate, Int_t isector) break; } - constexpr Float_t HGLFY = HFILIY + 2 * HGLASSY; // heigth of GLASS+FISHLINE Layer - constexpr Float_t HSTRIPY = 2. * HHONY + 2. * HPCBY + 4. * HRGLY + 2. * HGLFY + HCPCBY; // 3.11 + constexpr double HGLFY = HFILIY + 2 * HGLASSY; // heigth of GLASS+FISHLINE Layer + constexpr double HSTRIPY = 2. * HHONY + 2. * HPCBY + 4. * HRGLY + 2. * HGLFY + HCPCBY; // 3.11 Float_t step[3]; diff --git a/Detectors/TOF/simulation/include/TOFSimulation/Detector.h b/Detectors/TOF/simulation/include/TOFSimulation/Detector.h index 7ce944a1ed386..1aa0efb6ef61c 100644 --- a/Detectors/TOF/simulation/include/TOFSimulation/Detector.h +++ b/Detectors/TOF/simulation/include/TOFSimulation/Detector.h @@ -105,43 +105,43 @@ class Detector : public o2::base::DetImpl void setTOFholes(Bool_t flag = kTRUE) { mTOFHoles = flag; } protected: - virtual void DefineGeometry(Float_t xtof, Float_t ytof, Float_t zlenA) final; + virtual void DefineGeometry(Double_t xtof, Double_t ytof, Double_t zlenA) final; virtual void MaterialMixer(Float_t* p, const Float_t* const a, const Float_t* const m, Int_t n) const final; private: /// copy constructor (used in MT) Detector(const Detector& rhs); - void createModules(Float_t xtof, Float_t ytof, Float_t zlenA, Float_t xFLT, Float_t yFLT, Float_t zFLTA) const; - void makeStripsInModules(Float_t ytof, Float_t zlenA) const; - void createModuleCovers(Float_t xtof, Float_t zlenA) const; - void createBackZone(Float_t xtof, Float_t ytof, Float_t zlenA) const; - void makeFrontEndElectronics(Float_t xtof) const; - void makeFEACooling(Float_t xtof) const; - void makeNinoMask(Float_t xtof) const; - void makeSuperModuleCooling(Float_t xtof, Float_t ytof, Float_t zlenA) const; + void createModules(Double_t xtof, Double_t ytof, Double_t zlenA, Double_t xFLT, Double_t yFLT, Double_t zFLTA) const; + void makeStripsInModules(Double_t ytof, Double_t zlenA) const; + void createModuleCovers(Double_t xtof, Double_t zlenA) const; + void createBackZone(Double_t xtof, Double_t ytof, Double_t zlenA) const; + void makeFrontEndElectronics(Double_t xtof) const; + void makeFEACooling(Double_t xtof) const; + void makeNinoMask(Double_t xtof) const; + void makeSuperModuleCooling(Double_t xtof, Double_t ytof, Double_t zlenA) const; /// one FEA card container of a supermodule: where it sits along z and how it is placed struct FEAContainer { - Float_t z; + Double_t z; Int_t row; Bool_t rotated; }; /// returns the FEA card containers of one supermodule, in placement order; creates nothing - std::vector feaContainers(Float_t zlenA, Bool_t holes) const; + std::vector feaContainers(Double_t zlenA, Bool_t holes) const; /// creates the FCM1/FCM2 assemblies, the central FEA card container, and places them in FAIA/FAIC - void makeCentralFEAContainer(Float_t ytof) const; + void makeCentralFEAContainer(Double_t ytof) const; /// returns the volume for one piece of a cooling bar, creating it the first time a size is asked for TGeoVolume* coolingBarPiece(Double_t dx, Double_t dy, Double_t dz) const; /// places one longitudinal cooling bar as the pieces that survive between the FEA containers void placeCoolingBar(const char* mother, const std::vector& cont, Double_t crateDZ, Double_t crateY0, Double_t crateY1, Double_t xcoor, Double_t dx, Double_t ycoor, Double_t dy, Double_t zcoor, Double_t dz, Int_t& copy) const; - void makeSuperModuleServices(Float_t xtof, Float_t ytof, Float_t zlenA) const; - void makeReadoutCrates(Float_t ytof) const; + void makeSuperModuleServices(Double_t xtof, Double_t ytof, Double_t zlenA) const; + void makeReadoutCrates(Double_t ytof) const; - void makeModulesInBTOFvolumes(Float_t ytof, Float_t zlenA) const; + void makeModulesInBTOFvolumes(Double_t ytof, Double_t zlenA) const; void makeCoversInBTOFvolumes() const; - void makeBackInBTOFvolumes(Float_t ytof) const; + void makeBackInBTOFvolumes(Double_t ytof) const; bool isMergable(HitType hit1, HitType hit2) { diff --git a/Detectors/TOF/simulation/src/Detector.cxx b/Detectors/TOF/simulation/src/Detector.cxx index 365c1fc4b6ce0..a9af40e208d81 100644 --- a/Detectors/TOF/simulation/src/Detector.cxx +++ b/Detectors/TOF/simulation/src/Detector.cxx @@ -316,23 +316,23 @@ void Detector::ConstructGeometry() /* xTof = 124.5;//fTOFGeometry->StripLength()+2.*(0.3+0.03); // cm, x-dimension of FTOA volume yTof = fTOFGeometry->Rmax()-fTOFGeometry->Rmin(); // cm, y-dimension of FTOA volume - Float_t zTof = fTOFGeometry->ZlenA(); // cm, z-dimension of FTOA volume + Double_t zTof = fTOFGeometry->ZlenA(); // cm, z-dimension of FTOA volume */ - Float_t xTof = Geo::STRIPLENGTH + 2.5, yTof = Geo::RMAX - Geo::RMIN, zTof = Geo::ZLENA; + Double_t xTof = Geo::STRIPLENGTH + 2.5, yTof = Geo::RMAX - Geo::RMIN, zTof = Geo::ZLENA; DefineGeometry(xTof, yTof, zTof); LOG(info) << "Loaded TOF geometry"; } void Detector::EndOfEvent() { Reset(); } -void Detector::DefineGeometry(Float_t xtof, Float_t ytof, Float_t zlenA) +void Detector::DefineGeometry(Double_t xtof, Double_t ytof, Double_t zlenA) { // // Definition of the Time Of Fligh Resistive Plate Chambers // - Float_t xFLT, yFLT, zFLTA; + Double_t xFLT, yFLT, zFLTA; xFLT = xtof - 2. * Geo::MODULEWALLTHICKNESS; yFLT = ytof * 0.5 - Geo::MODULEWALLTHICKNESS; zFLTA = zlenA - 2. * Geo::MODULEWALLTHICKNESS; @@ -357,7 +357,7 @@ void Detector::DefineGeometry(Float_t xtof, Float_t ytof, Float_t zlenA) makeReadoutCrates(ytof); } -void Detector::createModules(Float_t xtof, Float_t ytof, Float_t zlenA, Float_t xFLT, Float_t yFLT, Float_t zFLTA) const +void Detector::createModules(Double_t xtof, Double_t ytof, Double_t zlenA, Double_t xFLT, Double_t yFLT, Double_t zFLTA) const { // // Create supermodule volume @@ -370,7 +370,7 @@ void Detector::createModules(Float_t xtof, Float_t ytof, Float_t zlenA, Float_t } // Definition of the of fibre glass modules (FTOA, FTOB and FTOC) - Float_t par[3]; + Double_t par[3]; par[0] = xtof * 0.5; par[1] = ytof * 0.25; par[2] = zlenA * 0.5; @@ -391,7 +391,7 @@ void Detector::createModules(Float_t xtof, Float_t ytof, Float_t zlenA, Float_t par[2] = zFLTA * 0.5; TVirtualMC::GetMC()->Gsvolu("FLTA", "BOX ", getMediumID(kFre), par, 3); // Freon mix - Float_t xcoor, ycoor, zcoor; + Double_t xcoor, ycoor, zcoor; xcoor = 0.; ycoor = Geo::MODULEWALLTHICKNESS * 0.5; zcoor = 0.; @@ -411,7 +411,7 @@ void Detector::createModules(Float_t xtof, Float_t ytof, Float_t zlenA, Float_t // Definition and positioning // of the fibre glass walls between central and intermediate modules (FWZ1 and FWZ2) - Float_t alpha, tgal, beta, tgbe, trpa[11]; + Double_t alpha, tgal, beta, tgbe, trpa[11]; // tgal = (yFLT - 2.*Geo::LENGTHINCEMODBORDER)/(Geo::INTERCENTRMODBORDER2 - Geo::INTERCENTRMODBORDER1); tgal = (yFLT - Geo::LENGTHINCEMODBORDERU - Geo::LENGTHINCEMODBORDERD) / (Geo::INTERCENTRMODBORDER2 - Geo::INTERCENTRMODBORDER1); @@ -447,7 +447,7 @@ void Detector::createModules(Float_t xtof, Float_t ytof, Float_t zlenA, Float_t TVirtualMC::GetMC()->Gspos("FWZ1D", 1, "FLTA", xcoor, ycoor, zcoor, idrotm[0], "ONLY"); TVirtualMC::GetMC()->Gspos("FWZ1D", 2, "FLTA", xcoor, ycoor, -zcoor, idrotm[1], "ONLY"); - Float_t y0B, ycoorB, zcoorB; + Double_t y0B, ycoorB, zcoorB; if (mTOFHoles) { // y0B = Geo::LENGTHINCEMODBORDER - Geo::MODULEWALLTHICKNESS*tgbe; @@ -645,39 +645,64 @@ void Detector::createModules(Float_t xtof, Float_t ytof, Float_t zlenA, Float_t } } -void Detector::makeStripsInModules(Float_t ytof, Float_t zlenA) const +void Detector::makeStripsInModules(Double_t ytof, Double_t zlenA) const { // // Define MRPC strip volume, called FSTR // Insert FSTR volume in FLTA/B/C volumes // - Float_t yFLT = ytof * 0.5 - Geo::MODULEWALLTHICKNESS; + Double_t yFLT = ytof * 0.5 - Geo::MODULEWALLTHICKNESS; ///////////////// Detector itself ////////////////////// // new description for strip volume -double stack strip- // -- all constants are expressed in cm // height of different layers - constexpr Float_t HGLFY = Geo::HFILIY + 2. * Geo::HGLASSY; // height of GLASS Layer + constexpr Double_t HGLFY = Geo::HFILIY + 2. * Geo::HGLASSY; // height of GLASS Layer - constexpr Float_t LSENSMX = Geo::NPADX * Geo::XPAD; // length of Sensitive Layer - constexpr Float_t HSENSMY = Geo::HSENSMY; // height of Sensitive Layer - constexpr Float_t WSENSMZ = Geo::NPADZ * Geo::ZPAD; // width of Sensitive Layer + constexpr Double_t LSENSMX = Geo::NPADX * Geo::XPAD; // length of Sensitive Layer + constexpr Double_t HSENSMY = Geo::HSENSMY; // height of Sensitive Layer + constexpr Double_t WSENSMZ = Geo::NPADZ * Geo::ZPAD; // width of Sensitive Layer // height of the FSTR Volume (the strip volume) - constexpr Float_t HSTRIPY = 2. * Geo::HHONY + 2. * Geo::HPCBY + 4. * Geo::HRGLY + 2. * HGLFY + Geo::HCPCBY; + constexpr Double_t HSTRIPY = 2. * Geo::HHONY + 2. * Geo::HPCBY + 4. * Geo::HRGLY + 2. * HGLFY + Geo::HCPCBY; // width of the FSTR Volume (the strip volume) - constexpr Float_t WSTRIPZ = Geo::WCPCBZ; + constexpr Double_t WSTRIPZ = Geo::WCPCBZ; // length of the FSTR Volume (the strip volume) - constexpr Float_t LSTRIPX = Geo::STRIPLENGTH; + constexpr Double_t LSTRIPX = Geo::STRIPLENGTH; // FSTR volume definition-filling this volume with non sensitive Gas Mixture - Float_t parfp[3] = {static_cast(LSTRIPX * 0.5), static_cast(HSTRIPY * 0.5), - static_cast(WSTRIPZ * 0.5)}; + Double_t parfp[3] = {(LSTRIPX * 0.5), (HSTRIPY * 0.5), + (WSTRIPZ * 0.5)}; TVirtualMC::GetMC()->Gsvolu("FSTR", "BOX", getMediumID(kFre), parfp, 3); // Freon mix - Float_t posfp[3] = {0., 0., 0.}; + Double_t posfp[3] = {0., 0., 0.}; + + // The strip is a stack of layers that fills FSTR symmetrically about y = 0. Every layer's + // centre used to be summed in its own order -- the outer ones from the strip's lower edge, + // the inner ones from the centre outwards -- so faces that are algebraically the same plane + // came out up to 0.34 nm apart. TGeo's navigator relocates from a point pushed far further + // than that and never notices; nothing else does. Build the stack from two running planes + // instead, one from the centre and one from the strip's edge, using the same double halves the + // box shapes are given, so every touching pair shares a face bit for bit. The two meet inside + // the glass slot, which carries a freon gap either side of the glass by design and is the one + // place with slack to absorb the rounding. + const double hStrip = (HSTRIPY * 0.5); + const double hHon = (Geo::HHONY * 0.5); + const double hPcb = (Geo::HPCBY * 0.5); + const double hRgl = (Geo::HRGLY * 0.5); + const double hCpcb = (Geo::HCPCBY * 0.5); + // outwards from the central PCB, which sits at y = 0 + const double yRglIn = hCpcb + hRgl; + const double yGlassSlotIn = yRglIn + hRgl; + // inwards from the strip's outer face + const double yHon = hStrip - hHon; + const double yPcbOut = (yHon - hHon) - hPcb; + const double yRglOut = (yPcbOut - hPcb) - hRgl; + const double yGlassSlotOut = yRglOut - hRgl; + // the glass is centred in what remains between them + const double yGlf = 0.5 * (yGlassSlotIn + yGlassSlotOut); // NOMEX (HONEYCOMB) Layer definition // parfp[0] = LSTRIPX*0.5; @@ -686,10 +711,8 @@ void Detector::makeStripsInModules(Float_t ytof, Float_t zlenA) const TVirtualMC::GetMC()->Gsvolu("FHON", "BOX", getMediumID(kNomex), parfp, 3); // Nomex (Honeycomb) // positioning 2 NOMEX Layers on FSTR volume // posfp[0] = 0.; - posfp[1] = -HSTRIPY * 0.5 + parfp[1]; - // posfp[2] = 0.; - TVirtualMC::GetMC()->Gspos("FHON", 1, "FSTR", 0., posfp[1], 0., 0, "ONLY"); - TVirtualMC::GetMC()->Gspos("FHON", 2, "FSTR", 0., -posfp[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FHON", 1, "FSTR", 0., -yHon, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FHON", 2, "FSTR", 0., yHon, 0., 0, "ONLY"); // Lower PCB Layer definition // parfp[0] = LSTRIPX*0.5; @@ -705,10 +728,8 @@ void Detector::makeStripsInModules(Float_t ytof, Float_t zlenA) const // positioning 2 external PCB Layers in FSTR volume // posfp[0] = 0.; - posfp[1] = -HSTRIPY * 0.5 + Geo::HHONY + parfp[1]; - // posfp[2] = 0.; - TVirtualMC::GetMC()->Gspos("FPC1", 1, "FSTR", 0., -posfp[1], 0., 0, "ONLY"); - TVirtualMC::GetMC()->Gspos("FPC2", 1, "FSTR", 0., posfp[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FPC1", 1, "FSTR", 0., yPcbOut, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FPC2", 1, "FSTR", 0., -yPcbOut, 0., 0, "ONLY"); // Central PCB layer definition // parfp[0] = LSTRIPX*0.5; @@ -721,8 +742,8 @@ void Detector::makeStripsInModules(Float_t ytof, Float_t zlenA) const TVirtualMC::GetMC()->Gspos("FPCB", 1, "FSTR", 0., 0., 0., 0, "ONLY"); // Sensitive volume definition - Float_t parfs[3] = {static_cast(LSENSMX * 0.5), static_cast(HSENSMY * 0.5), - static_cast(WSENSMZ * 0.5)}; + Double_t parfs[3] = {(LSENSMX * 0.5), (HSENSMY * 0.5), + (WSENSMZ * 0.5)}; TVirtualMC::GetMC()->Gsvolu("FSEN", "BOX", getMediumID(kCuS), parfs, 3); // Cu sensitive // printf("check material\n"); @@ -743,15 +764,10 @@ void Detector::makeStripsInModules(Float_t ytof, Float_t zlenA) const TVirtualMC::GetMC()->Gsvolu("FRGL", "BOX", getMediumID(kGlass), parfp, 3); // red glass // positioning 4 RED GLASS Layers in FSTR volume // posfp[0] = 0.; - posfp[1] = -HSTRIPY * 0.5 + Geo::HHONY + Geo::HPCBY + parfp[1]; - // posfp[2] = 0.; - TVirtualMC::GetMC()->Gspos("FRGL", 1, "FSTR", 0., posfp[1], 0., 0, "ONLY"); - TVirtualMC::GetMC()->Gspos("FRGL", 4, "FSTR", 0., -posfp[1], 0., 0, "ONLY"); - // posfp[0] = 0.; - posfp[1] = (Geo::HCPCBY + Geo::HRGLY) * 0.5; - // posfp[2] = 0.; - TVirtualMC::GetMC()->Gspos("FRGL", 2, "FSTR", 0., -posfp[1], 0., 0, "ONLY"); - TVirtualMC::GetMC()->Gspos("FRGL", 3, "FSTR", 0., posfp[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FRGL", 1, "FSTR", 0., -yRglOut, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FRGL", 4, "FSTR", 0., yRglOut, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FRGL", 2, "FSTR", 0., -yRglIn, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FRGL", 3, "FSTR", 0., yRglIn, 0., 0, "ONLY"); // GLASS Layer definition // parfp[0] = LSTRIPX*0.5; @@ -760,10 +776,8 @@ void Detector::makeStripsInModules(Float_t ytof, Float_t zlenA) const TVirtualMC::GetMC()->Gsvolu("FGLF", "BOX", getMediumID(kGlass), parfp, 3); // glass // positioning 2 GLASS Layers in FSTR volume // posfp[0] = 0.; - posfp[1] = (Geo::HCPCBY + HGLFY) * 0.5 + Geo::HRGLY; - // posfp[2] = 0.; - TVirtualMC::GetMC()->Gspos("FGLF", 1, "FSTR", 0., -posfp[1], 0., 0, "ONLY"); - TVirtualMC::GetMC()->Gspos("FGLF", 2, "FSTR", 0., posfp[1], 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FGLF", 1, "FSTR", 0., -yGlf, 0., 0, "ONLY"); + TVirtualMC::GetMC()->Gspos("FGLF", 2, "FSTR", 0., yGlf, 0., 0, "ONLY"); // Positioning the Strips (FSTR volumes) in the FLT volumes Int_t maxStripNumbers[5] = {Geo::NSTRIPC, Geo::NSTRIPB, Geo::NSTRIPA, Geo::NSTRIPB, Geo::NSTRIPC}; @@ -774,7 +788,7 @@ void Detector::makeStripsInModules(Float_t ytof, Float_t zlenA) const } Int_t totalStrip = 0; - Float_t xpos, zpos, ypos, ang; + Double_t xpos, zpos, ypos, ang; for (Int_t iplate = 0; iplate < Geo::NPLATES; iplate++) { if (iplate > 0) { totalStrip += maxStripNumbers[iplate - 1]; @@ -814,7 +828,7 @@ void Detector::makeStripsInModules(Float_t ytof, Float_t zlenA) const } } -void Detector::createModuleCovers(Float_t xtof, Float_t zlenA) const +void Detector::createModuleCovers(Double_t xtof, Double_t zlenA) const { // // Create covers for module: @@ -826,7 +840,7 @@ void Detector::createModuleCovers(Float_t xtof, Float_t zlenA) const // and plastic and Cu corresponding to the flat cables. // - Float_t par[3]; + Double_t par[3]; par[0] = xtof * 0.5 + 2.; par[1] = Geo::MODULECOVERTHICKNESS * 0.5; par[2] = zlenA * 0.5 + 2.; @@ -835,11 +849,11 @@ void Detector::createModuleCovers(Float_t xtof, Float_t zlenA) const TVirtualMC::GetMC()->Gsvolu("FPEB", "BOX ", getMediumID(kAir), par, 3); // Air } - constexpr Float_t ALCOVERTHICKNESS = 1.5; - constexpr Float_t INTERFACECARDTHICKNESS = 0.16; - constexpr Float_t ALSKINTHICKNESS = 0.1; - constexpr Float_t PLASTICFLATCABLETHICKNESS = 0.25; - constexpr Float_t COPPERFLATCABLETHICKNESS = 0.01; + constexpr Double_t ALCOVERTHICKNESS = 1.5; + constexpr Double_t INTERFACECARDTHICKNESS = 0.16; + constexpr Double_t ALSKINTHICKNESS = 0.1; + constexpr Double_t PLASTICFLATCABLETHICKNESS = 0.25; + constexpr Double_t COPPERFLATCABLETHICKNESS = 0.01; // par[0] = xtof*0.5 + 2.; par[1] = ALCOVERTHICKNESS * 0.5; @@ -848,7 +862,7 @@ void Detector::createModuleCovers(Float_t xtof, Float_t zlenA) const if (mTOFHoles) { TVirtualMC::GetMC()->Gsvolu("FALB", "BOX ", getMediumID(kAlFrame), par, 3); // Al } - Float_t xcoor, ycoor, zcoor; + Double_t xcoor, ycoor, zcoor; xcoor = 0.; ycoor = 0.; zcoor = 0.; @@ -1010,7 +1024,7 @@ void Detector::createModuleCovers(Float_t xtof, Float_t zlenA) const TVirtualMC::GetMC()->Gspos("FCC3", 0, "FFC3", 0., 0., 0., 0, "ONLY"); } -std::vector Detector::feaContainers(Float_t zlenA, Bool_t holes) const +std::vector Detector::feaContainers(Double_t zlenA, Bool_t holes) const { // // Returns the FEA card containers of one supermodule in placement order, each with the z it @@ -1019,15 +1033,15 @@ std::vector Detector::feaContainers(Float_t zlenA, Bool_ // the centre of the supermodule is not in the list: makeCentralFEAContainer builds that one. // - const Float_t rowstep = 6.66; - const Float_t rowgap[5] = {13.5, 22.9, 16.94, 23.8, 20.4}; + const Double_t rowstep = 6.66; + const Double_t rowgap[5] = {13.5, 22.9, 16.94, 23.8, 20.4}; const Int_t rowb[5] = {6, 7, 6, 19, 7}; const Int_t nblocks = holes ? 4 : 5; std::vector cont; Int_t row = 1; for (Int_t sg = -1; sg < 2; sg += 2) { - Float_t zcoor = sg * zlenA * 0.5 - 0.8; + Double_t zcoor = sg * zlenA * 0.5 - 0.8; for (Int_t nb = 0; nb < nblocks; ++nb) { zcoor = zcoor - sg * (rowgap[nb] - rowstep); const Int_t nrow = row + rowb[nb]; @@ -1040,7 +1054,7 @@ std::vector Detector::feaContainers(Float_t zlenA, Bool_ return cont; } -void Detector::makeCentralFEAContainer(Float_t ytof) const +void Detector::makeCentralFEAContainer(Double_t ytof) const { // // Creates FCM1 and FCM2, the FEA card container at the centre of a supermodule, as assemblies @@ -1050,8 +1064,8 @@ void Detector::makeCentralFEAContainer(Float_t ytof) const // same medium. // - const Float_t carY = Geo::FEAPARAMETERS[1] + Geo::ROOF1PARAMETERS[1] + Geo::ROOF2PARAMETERS[1] * 0.5; - const Float_t ycoor = -(ytof * 0.5 - Geo::MODULECOVERTHICKNESS) * 0.5 + carY; + const Double_t carY = Geo::FEAPARAMETERS[1] + Geo::ROOF1PARAMETERS[1] + Geo::ROOF2PARAMETERS[1] * 0.5; + const Double_t ycoor = -(ytof * 0.5 - Geo::MODULECOVERTHICKNESS) * 0.5 + carY; const char* source[2] = {"FCA1", "FCA2"}; const char* central[2] = {"FCM1", "FCM2"}; @@ -1142,7 +1156,7 @@ void Detector::placeCoolingBar(const char* mother, const std::vectorGsvolu("FAIC", "BOX ", getMediumID(kAir), par, 3); // Air - Float_t feaParam[3] = {Geo::FEAPARAMETERS[0], Geo::FEAPARAMETERS[1], Geo::FEAPARAMETERS[2]}; - Float_t feaRoof1[3] = {Geo::ROOF1PARAMETERS[0], Geo::ROOF1PARAMETERS[1], Geo::ROOF1PARAMETERS[2]}; - Float_t al3[3] = {Geo::AL3PARAMETERS[0], Geo::AL3PARAMETERS[1], Geo::AL3PARAMETERS[2]}; - // Float_t feaRoof2[3] = {Geo::ROOF2PARAMETERS[0], Geo::ROOF2PARAMETERS[1], Geo::ROOF2PARAMETERS[2]}; + Double_t feaParam[3] = {Geo::FEAPARAMETERS[0], Geo::FEAPARAMETERS[1], Geo::FEAPARAMETERS[2]}; + Double_t feaRoof1[3] = {Geo::ROOF1PARAMETERS[0], Geo::ROOF1PARAMETERS[1], Geo::ROOF1PARAMETERS[2]}; + Double_t al3[3] = {Geo::AL3PARAMETERS[0], Geo::AL3PARAMETERS[1], Geo::AL3PARAMETERS[2]}; + // Double_t feaRoof2[3] = {Geo::ROOF2PARAMETERS[0], Geo::ROOF2PARAMETERS[1], Geo::ROOF2PARAMETERS[2]}; // FEA card mother-volume definition - Float_t carpar[3] = {static_cast(xtof * 0.5 - Geo::CBLW - Geo::SAWTHICKNESS), - static_cast(feaParam[1] + feaRoof1[1] + Geo::ROOF2PARAMETERS[1] * 0.5), - static_cast(feaRoof1[2] + Geo::BETWEENLANDMASK * 0.5 + al3[2])}; + Double_t carpar[3] = {(xtof * 0.5 - Geo::CBLW - Geo::SAWTHICKNESS), + (feaParam[1] + feaRoof1[1] + Geo::ROOF2PARAMETERS[1] * 0.5), + (feaRoof1[2] + Geo::BETWEENLANDMASK * 0.5 + al3[2])}; TVirtualMC::GetMC()->Gsvolu("FCA1", "BOX ", getMediumID(kAir), carpar, 3); // Air TVirtualMC::GetMC()->Gsvolu("FCA2", "BOX ", getMediumID(kAir), carpar, 3); // Air @@ -1183,7 +1197,7 @@ void Detector::createBackZone(Float_t xtof, Float_t ytof, Float_t zlenA) const Matrix(idrotm[0], 90., 180., 90., 90., 180., 0.); // FEA card mother-volume positioning - Float_t carpos[3] = {0., static_cast(-(ytof * 0.5 - Geo::MODULECOVERTHICKNESS) * 0.5 + carpar[1]), -0.8}; + Double_t carpos[3] = {0., (-(ytof * 0.5 - Geo::MODULECOVERTHICKNESS) * 0.5 + carpar[1]), -0.8}; for (auto const& c : feaContainers(zlenA, kFALSE)) { TVirtualMC::GetMC()->Gspos("FCA1", c.row, "FAIA", carpos[0], carpos[1], c.z, c.rotated ? idrotm[0] : 0, "ONLY"); @@ -1197,29 +1211,29 @@ void Detector::createBackZone(Float_t xtof, Float_t ytof, Float_t zlenA) const } } -void Detector::makeFrontEndElectronics(Float_t xtof) const +void Detector::makeFrontEndElectronics(Double_t xtof) const { // // Fill FCA1/2 volumes with FEA cards (FFEA volumes). // // FEA card volume definition - Float_t feaParam[3] = {Geo::FEAPARAMETERS[0], Geo::FEAPARAMETERS[1], Geo::FEAPARAMETERS[2]}; + Double_t feaParam[3] = {Geo::FEAPARAMETERS[0], Geo::FEAPARAMETERS[1], Geo::FEAPARAMETERS[2]}; TVirtualMC::GetMC()->Gsvolu("FFEA", "BOX ", getMediumID(kG10), feaParam, 3); // G10 - Float_t al1[3] = {Geo::AL1PARAMETERS[0], Geo::AL1PARAMETERS[1], Geo::AL1PARAMETERS[2]}; - Float_t al3[3] = {Geo::AL3PARAMETERS[0], Geo::AL3PARAMETERS[1], Geo::AL3PARAMETERS[2]}; - Float_t feaRoof1[3] = {Geo::ROOF1PARAMETERS[0], Geo::ROOF1PARAMETERS[1], Geo::ROOF1PARAMETERS[2]}; - // Float_t feaRoof2[3] = {Geo::ROOF2PARAMETERS[0], Geo::ROOF2PARAMETERS[1], Geo::ROOF2PARAMETERS[2]}; + Double_t al1[3] = {Geo::AL1PARAMETERS[0], Geo::AL1PARAMETERS[1], Geo::AL1PARAMETERS[2]}; + Double_t al3[3] = {Geo::AL3PARAMETERS[0], Geo::AL3PARAMETERS[1], Geo::AL3PARAMETERS[2]}; + Double_t feaRoof1[3] = {Geo::ROOF1PARAMETERS[0], Geo::ROOF1PARAMETERS[1], Geo::ROOF1PARAMETERS[2]}; + // Double_t feaRoof2[3] = {Geo::ROOF2PARAMETERS[0], Geo::ROOF2PARAMETERS[1], Geo::ROOF2PARAMETERS[2]}; - Float_t carpar[3] = {static_cast(xtof * 0.5 - Geo::CBLW - Geo::SAWTHICKNESS), - static_cast(feaParam[1] + feaRoof1[1] + Geo::ROOF2PARAMETERS[1] * 0.5), - static_cast(feaRoof1[2] + Geo::BETWEENLANDMASK * 0.5 + al3[2])}; + Double_t carpar[3] = {(xtof * 0.5 - Geo::CBLW - Geo::SAWTHICKNESS), + (feaParam[1] + feaRoof1[1] + Geo::ROOF2PARAMETERS[1] * 0.5), + (feaRoof1[2] + Geo::BETWEENLANDMASK * 0.5 + al3[2])}; // FEA card volume positioning - Float_t xCoor = xtof * 0.5 - 25.; - Float_t yCoor = -carpar[1] + feaParam[1]; - Float_t zCoor = -carpar[2] + (2. * feaRoof1[2] - 2. * al1[2] - feaParam[2]); + Double_t xCoor = xtof * 0.5 - 25.; + Double_t yCoor = -carpar[1] + feaParam[1]; + Double_t zCoor = -carpar[2] + (2. * feaRoof1[2] - 2. * al1[2] - feaParam[2]); TVirtualMC::GetMC()->Gspos("FFEA", 1, "FCA1", -xCoor, yCoor, zCoor, 0, "ONLY"); TVirtualMC::GetMC()->Gspos("FFEA", 4, "FCA1", xCoor, yCoor, zCoor, 0, "ONLY"); TVirtualMC::GetMC()->Gspos("FFEA", 1, "FCA2", -xCoor, yCoor, zCoor, 0, "ONLY"); @@ -1231,7 +1245,7 @@ void Detector::makeFrontEndElectronics(Float_t xtof) const TVirtualMC::GetMC()->Gspos("FFEA", 3, "FCA2", xCoor, yCoor, zCoor, 0, "ONLY"); } -void Detector::makeFEACooling(Float_t xtof) const +void Detector::makeFEACooling(Double_t xtof) const { // // Make cooling system attached to each FEA card @@ -1240,14 +1254,14 @@ void Detector::makeFEACooling(Float_t xtof) const // // first FEA cooling element definition - Float_t al1[3] = {Geo::AL1PARAMETERS[0], Geo::AL1PARAMETERS[1], Geo::AL1PARAMETERS[2]}; + Double_t al1[3] = {Geo::AL1PARAMETERS[0], Geo::AL1PARAMETERS[1], Geo::AL1PARAMETERS[2]}; TVirtualMC::GetMC()->Gsvolu("FAL1", "BOX ", getMediumID(kAlFrame), al1, 3); // Al // second FEA cooling element definition: an Al roof with the FRO2 Nino-mask groove cut out of // its shape. The groove is oversized by kGrooveEps where it leaves the box, so that the two // solids share no face. - Float_t feaRoof1[3] = {Geo::ROOF1PARAMETERS[0], Geo::ROOF1PARAMETERS[1], Geo::ROOF1PARAMETERS[2]}; - Float_t airHole[3] = {Geo::ROOF2PARAMETERS[0], static_cast(Geo::ROOF2PARAMETERS[1] * 0.5), feaRoof1[2]}; + Double_t feaRoof1[3] = {Geo::ROOF1PARAMETERS[0], Geo::ROOF1PARAMETERS[1], Geo::ROOF1PARAMETERS[2]}; + Double_t airHole[3] = {Geo::ROOF2PARAMETERS[0], (Geo::ROOF2PARAMETERS[1] * 0.5), feaRoof1[2]}; const Double_t kGrooveEps = 1.e-3; // cm new TGeoBBox("FRO1box", feaRoof1[0], feaRoof1[1], feaRoof1[2]); new TGeoBBox("FRO1groove", airHole[0], airHole[1] + kGrooveEps, airHole[2] + kGrooveEps); @@ -1256,31 +1270,31 @@ void Detector::makeFEACooling(Float_t xtof) const auto* fro1Shape = new TGeoCompositeShape("FRO1shape", "FRO1box-(FRO1groove:FRO1grooveTr)"); new TGeoVolume("FRO1", fro1Shape, o2::base::MaterialManager::Instance().getTGeoMedium(GetName(), kAlFrame)); // Al - Float_t al3[3] = {Geo::AL3PARAMETERS[0], Geo::AL3PARAMETERS[1], Geo::AL3PARAMETERS[2]}; - // Float_t feaRoof2[3] = {Geo::ROOF2PARAMETERS[0], Geo::ROOF2PARAMETERS[1], Geo::ROOF2PARAMETERS[2]}; + Double_t al3[3] = {Geo::AL3PARAMETERS[0], Geo::AL3PARAMETERS[1], Geo::AL3PARAMETERS[2]}; + // Double_t feaRoof2[3] = {Geo::ROOF2PARAMETERS[0], Geo::ROOF2PARAMETERS[1], Geo::ROOF2PARAMETERS[2]}; // third FEA cooling element definition - Float_t bar[3] = {Geo::BAR[0], Geo::BAR[1], Geo::BAR[2]}; + Double_t bar[3] = {Geo::BAR[0], Geo::BAR[1], Geo::BAR[2]}; TVirtualMC::GetMC()->Gsvolu("FBAR", "BOX ", getMediumID(kAlFrame), bar, 3); // Al - Float_t feaParam[3] = {Geo::FEAPARAMETERS[0], Geo::FEAPARAMETERS[1], Geo::FEAPARAMETERS[2]}; + Double_t feaParam[3] = {Geo::FEAPARAMETERS[0], Geo::FEAPARAMETERS[1], Geo::FEAPARAMETERS[2]}; - Float_t carpar[3] = {static_cast(xtof * 0.5 - Geo::CBLW - Geo::SAWTHICKNESS), - static_cast(feaParam[1] + feaRoof1[1] + Geo::ROOF2PARAMETERS[1] * 0.5), - static_cast(feaRoof1[2] + Geo::BETWEENLANDMASK * 0.5 + al3[2])}; + Double_t carpar[3] = {(xtof * 0.5 - Geo::CBLW - Geo::SAWTHICKNESS), + (feaParam[1] + feaRoof1[1] + Geo::ROOF2PARAMETERS[1] * 0.5), + (feaRoof1[2] + Geo::BETWEENLANDMASK * 0.5 + al3[2])}; // fourth FEA cooling element definition - Float_t bar1[3] = {Geo::BAR1[0], Geo::BAR1[1], Geo::BAR1[2]}; + Double_t bar1[3] = {Geo::BAR1[0], Geo::BAR1[1], Geo::BAR1[2]}; TVirtualMC::GetMC()->Gsvolu("FBA1", "BOX ", getMediumID(kAlFrame), bar1, 3); // Al // fifth FEA cooling element definition - Float_t bar2[3] = {Geo::BAR2[0], Geo::BAR2[1], Geo::BAR2[2]}; + Double_t bar2[3] = {Geo::BAR2[0], Geo::BAR2[1], Geo::BAR2[2]}; TVirtualMC::GetMC()->Gsvolu("FBA2", "BOX ", getMediumID(kAlFrame), bar2, 3); // Al // first FEA cooling element positioning - Float_t xcoor = xtof * 0.5 - 25.; - Float_t ycoor = carpar[1] - 2. * Geo::ROOF2PARAMETERS[1] * 0.5 - 2. * feaRoof1[1] - al1[1]; - Float_t zcoor = -carpar[2] + 2. * feaRoof1[2] - al1[2]; + Double_t xcoor = xtof * 0.5 - 25.; + Double_t ycoor = carpar[1] - 2. * Geo::ROOF2PARAMETERS[1] * 0.5 - 2. * feaRoof1[1] - al1[1]; + Double_t zcoor = -carpar[2] + 2. * feaRoof1[2] - al1[2]; TVirtualMC::GetMC()->Gspos("FAL1", 1, "FCA1", -xcoor, ycoor, zcoor, 0, "ONLY"); TVirtualMC::GetMC()->Gspos("FAL1", 4, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); TVirtualMC::GetMC()->Gspos("FAL1", 1, "FCA2", -xcoor, ycoor, zcoor, 0, "ONLY"); @@ -1320,7 +1334,7 @@ void Detector::makeFEACooling(Float_t xtof) const TVirtualMC::GetMC()->Gspos("FBAR", 3, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); // fourth FEA cooling element positioning - Float_t tubepar[3] = {0., 0.4, static_cast(xtof * 0.5 - Geo::CBLW)}; + Double_t tubepar[3] = {0., 0.4, (xtof * 0.5 - Geo::CBLW)}; xcoor = xtof * 0.5 - 25.; ycoor = carpar[1] - 2. * Geo::ROOF2PARAMETERS[1] * 0.5 - 2. * feaRoof1[1] - bar[1]; zcoor = -carpar[2] + 2. * bar[2] + 2. * tubepar[1] + bar1[2]; @@ -1362,7 +1376,7 @@ void Detector::makeFEACooling(Float_t xtof) const TVirtualMC::GetMC()->Gspos("FBA2", 7, "FCA2", xcoor, ycoor, zcoor, 0, "ONLY"); } -void Detector::makeNinoMask(Float_t xtof) const +void Detector::makeNinoMask(Double_t xtof) const { // // Make cooling Nino mask @@ -1371,28 +1385,28 @@ void Detector::makeNinoMask(Float_t xtof) const // // first Nino ASIC mask volume definition - Float_t al2[3] = {Geo::AL2PARAMETERS[0], Geo::AL2PARAMETERS[1], Geo::AL2PARAMETERS[2]}; + Double_t al2[3] = {Geo::AL2PARAMETERS[0], Geo::AL2PARAMETERS[1], Geo::AL2PARAMETERS[2]}; TVirtualMC::GetMC()->Gsvolu("FAL2", "BOX ", getMediumID(kAlFrame), al2, 3); // Al // second Nino ASIC mask volume definition - Float_t al3[3] = {Geo::AL3PARAMETERS[0], Geo::AL3PARAMETERS[1], Geo::AL3PARAMETERS[2]}; + Double_t al3[3] = {Geo::AL3PARAMETERS[0], Geo::AL3PARAMETERS[1], Geo::AL3PARAMETERS[2]}; TVirtualMC::GetMC()->Gsvolu("FAL3", "BOX ", getMediumID(kAlFrame), al3, 3); // Al // third Nino ASIC mask volume definition - Float_t feaRoof2[3] = {Geo::ROOF2PARAMETERS[0], Geo::ROOF2PARAMETERS[1], Geo::ROOF2PARAMETERS[2]}; + Double_t feaRoof2[3] = {Geo::ROOF2PARAMETERS[0], Geo::ROOF2PARAMETERS[1], Geo::ROOF2PARAMETERS[2]}; TVirtualMC::GetMC()->Gsvolu("FRO2", "BOX ", getMediumID(kAlFrame), feaRoof2, 3); // Al - Float_t feaRoof1[3] = {Geo::ROOF1PARAMETERS[0], Geo::ROOF1PARAMETERS[1], Geo::ROOF1PARAMETERS[2]}; - Float_t feaParam[3] = {Geo::FEAPARAMETERS[0], Geo::FEAPARAMETERS[1], Geo::FEAPARAMETERS[2]}; + Double_t feaRoof1[3] = {Geo::ROOF1PARAMETERS[0], Geo::ROOF1PARAMETERS[1], Geo::ROOF1PARAMETERS[2]}; + Double_t feaParam[3] = {Geo::FEAPARAMETERS[0], Geo::FEAPARAMETERS[1], Geo::FEAPARAMETERS[2]}; - Float_t carpar[3] = {static_cast(xtof * 0.5 - Geo::CBLW - Geo::SAWTHICKNESS), - static_cast(feaParam[1] + feaRoof1[1] + Geo::ROOF2PARAMETERS[1] * 0.5), - static_cast(feaRoof1[2] + Geo::BETWEENLANDMASK * 0.5 + al3[2])}; + Double_t carpar[3] = {(xtof * 0.5 - Geo::CBLW - Geo::SAWTHICKNESS), + (feaParam[1] + feaRoof1[1] + Geo::ROOF2PARAMETERS[1] * 0.5), + (feaRoof1[2] + Geo::BETWEENLANDMASK * 0.5 + al3[2])}; // first Nino ASIC mask volume positioning - Float_t xcoor = xtof * 0.5 - 25.; - Float_t ycoor = carpar[1] - 2. * al3[1]; - Float_t zcoor = carpar[2] - 2. * al3[2] - al2[2]; + Double_t xcoor = xtof * 0.5 - 25.; + Double_t ycoor = carpar[1] - 2. * al3[1]; + Double_t zcoor = carpar[2] - 2. * al3[2] - al2[2]; TVirtualMC::GetMC()->Gspos("FAL2", 1, "FCA1", -xcoor, ycoor, zcoor, 0, "ONLY"); TVirtualMC::GetMC()->Gspos("FAL2", 4, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); xcoor = feaParam[0] + (Geo::FEAWIDTH2 * 0.5 - Geo::FEAWIDTH1); @@ -1420,7 +1434,7 @@ void Detector::makeNinoMask(Float_t xtof) const TVirtualMC::GetMC()->Gspos("FRO2", 3, "FCA1", xcoor, ycoor, zcoor, 0, "ONLY"); } -void Detector::makeSuperModuleCooling(Float_t xtof, Float_t ytof, Float_t zlenA) const +void Detector::makeSuperModuleCooling(Double_t xtof, Double_t ytof, Double_t zlenA) const { // // Make cooling tubes (FTUB volume) @@ -1431,45 +1445,45 @@ void Detector::makeSuperModuleCooling(Float_t xtof, Float_t ytof, Float_t zlenA) Int_t idrotm[1] = {0}; // cooling tube volume definition - Float_t tubepar[3] = {0., 0.4, static_cast(xtof * 0.5 - Geo::CBLW - Geo::SAWTHICKNESS)}; + Double_t tubepar[3] = {0., 0.4, (xtof * 0.5 - Geo::CBLW - Geo::SAWTHICKNESS)}; TVirtualMC::GetMC()->Gsvolu("FTUB", "TUBE", getMediumID(kCopper), tubepar, 3); // Cu // water cooling tube volume definition - Float_t tubeparW[3] = {0., 0.3, tubepar[2]}; + Double_t tubeparW[3] = {0., 0.3, tubepar[2]}; TVirtualMC::GetMC()->Gsvolu("FITU", "TUBE", getMediumID(kWater), tubeparW, 3); // H2O // Positioning of the water tube into the steel one TVirtualMC::GetMC()->Gspos("FITU", 1, "FTUB", 0., 0., 0., 0, "ONLY"); // definition of transverse components of SM cooling system - Float_t trapar[3] = {tubepar[2], 6.175 /*6.15*/, 0.7}; + Double_t trapar[3] = {tubepar[2], 6.175 /*6.15*/, 0.7}; TVirtualMC::GetMC()->Gsvolu("FTLN", "BOX ", getMediumID(kAlFrame), trapar, 3); // Al // rotation matrix Matrix(idrotm[0], 180., 90., 90., 90., 90., 0.); - Float_t feaParam[3] = {Geo::FEAPARAMETERS[0], Geo::FEAPARAMETERS[1], Geo::FEAPARAMETERS[2]}; - Float_t feaRoof1[3] = {Geo::ROOF1PARAMETERS[0], Geo::ROOF1PARAMETERS[1], Geo::ROOF1PARAMETERS[2]}; - Float_t bar[3] = {Geo::BAR[0], Geo::BAR[1], Geo::BAR[2]}; - Float_t bar2[3] = {Geo::BAR2[0], Geo::BAR2[1], Geo::BAR2[2]}; - Float_t al3[3] = {Geo::AL3PARAMETERS[0], Geo::AL3PARAMETERS[1], Geo::AL3PARAMETERS[2]}; - // Float_t feaRoof2[3] = {Geo::ROOF2PARAMETERS[0], Geo::ROOF2PARAMETERS[1], Geo::ROOF2PARAMETERS[2]}; + Double_t feaParam[3] = {Geo::FEAPARAMETERS[0], Geo::FEAPARAMETERS[1], Geo::FEAPARAMETERS[2]}; + Double_t feaRoof1[3] = {Geo::ROOF1PARAMETERS[0], Geo::ROOF1PARAMETERS[1], Geo::ROOF1PARAMETERS[2]}; + Double_t bar[3] = {Geo::BAR[0], Geo::BAR[1], Geo::BAR[2]}; + Double_t bar2[3] = {Geo::BAR2[0], Geo::BAR2[1], Geo::BAR2[2]}; + Double_t al3[3] = {Geo::AL3PARAMETERS[0], Geo::AL3PARAMETERS[1], Geo::AL3PARAMETERS[2]}; + // Double_t feaRoof2[3] = {Geo::ROOF2PARAMETERS[0], Geo::ROOF2PARAMETERS[1], Geo::ROOF2PARAMETERS[2]}; - Float_t carpar[3] = {static_cast(xtof * 0.5 - Geo::CBLW - Geo::SAWTHICKNESS), - static_cast(feaParam[1] + feaRoof1[1] + Geo::ROOF2PARAMETERS[1] * 0.5), - static_cast(feaRoof1[2] + Geo::BETWEENLANDMASK * 0.5 + al3[2])}; + Double_t carpar[3] = {(xtof * 0.5 - Geo::CBLW - Geo::SAWTHICKNESS), + (feaParam[1] + feaRoof1[1] + Geo::ROOF2PARAMETERS[1] * 0.5), + (feaRoof1[2] + Geo::BETWEENLANDMASK * 0.5 + al3[2])}; - Float_t ytub = -(ytof * 0.5 - Geo::MODULECOVERTHICKNESS) * 0.5 + carpar[1] + carpar[1] - - 2. * Geo::ROOF2PARAMETERS[1] * 0.5 - 2. * feaRoof1[1] - 2. * bar2[1] - tubepar[1]; + Double_t ytub = -(ytof * 0.5 - Geo::MODULECOVERTHICKNESS) * 0.5 + carpar[1] + carpar[1] - + 2. * Geo::ROOF2PARAMETERS[1] * 0.5 - 2. * feaRoof1[1] - 2. * bar2[1] - tubepar[1]; // Positioning of tubes for the SM cooling system - Float_t ycoor = carpar[1] - 2. * Geo::ROOF2PARAMETERS[1] * 0.5 - 2. * feaRoof1[1] - 2. * bar2[1] - tubepar[1]; - Float_t zcoor = -carpar[2] + 2. * bar[2] + tubepar[1]; + Double_t ycoor = carpar[1] - 2. * Geo::ROOF2PARAMETERS[1] * 0.5 - 2. * feaRoof1[1] - 2. * bar2[1] - tubepar[1]; + Double_t zcoor = -carpar[2] + 2. * bar[2] + tubepar[1]; TVirtualMC::GetMC()->Gspos("FTUB", 1, "FCA1", 0., ycoor, zcoor, idrotm[0], "ONLY"); TVirtualMC::GetMC()->Gspos("FTUB", 1, "FCA2", 0., ycoor, zcoor, idrotm[0], "ONLY"); gGeoManager->GetVolume("FTUB")->VisibleDaughters(kFALSE); - Float_t yFLTN = trapar[1] - (ytof * 0.5 - Geo::MODULECOVERTHICKNESS) * 0.5; + Double_t yFLTN = trapar[1] - (ytof * 0.5 - Geo::MODULECOVERTHICKNESS) * 0.5; for (Int_t sg = -1; sg < 2; sg += 2) { // Positioning of transverse components for the SM cooling system TVirtualMC::GetMC()->Gspos("FTLN", 5 + 4 * sg, "FAIA", 0., yFLTN, 369.9 * sg, 0, "ONLY"); @@ -1483,9 +1497,9 @@ void Detector::makeSuperModuleCooling(Float_t xtof, Float_t ytof, Float_t zlenA) } // definition of longitudinal components of SM cooling system - Float_t lonpar1[3] = {2., 0.5, static_cast(56.82 - trapar[2])}; - Float_t lonpar2[3] = {lonpar1[0], lonpar1[1], static_cast((198.8 - 56.82) * 0.5 - trapar[2])}; - Float_t lonpar3[3] = {lonpar1[0], lonpar1[1], static_cast((366.9 - 198.8) * 0.5 - trapar[2])}; + Double_t lonpar1[3] = {2., 0.5, 56.82 - trapar[2]}; + Double_t lonpar2[3] = {lonpar1[0], lonpar1[1], (198.8 - 56.82) * 0.5 - trapar[2]}; + Double_t lonpar3[3] = {lonpar1[0], lonpar1[1], (366.9 - 198.8) * 0.5 - trapar[2]}; // Positioning of the longitudinal components of the SM cooling system, segmented between the // FEA card containers rather than declared overlapping. mBarPieces.clear(); @@ -1493,8 +1507,8 @@ void Detector::makeSuperModuleCooling(Float_t xtof, Float_t ytof, Float_t zlenA) const std::vector contHoles = feaContainers(zlenA, kTRUE); const Double_t crateY = -(ytof * 0.5 - Geo::MODULECOVERTHICKNESS) * 0.5 + carpar[1]; const Double_t crateY0 = crateY - carpar[1], crateY1 = crateY + carpar[1]; - const Float_t zcoor2 = (198.8 + 56.82) * 0.5; - const Float_t zcoor3 = (366.9 + 198.8) * 0.5; + const Double_t zcoor2 = (198.8 + 56.82) * 0.5; + const Double_t zcoor3 = (366.9 + 198.8) * 0.5; Int_t copyA = 0, copyB = 0, copyC = 0; for (Int_t up = 0; up < 2; ++up) { @@ -1517,8 +1531,8 @@ void Detector::makeSuperModuleCooling(Float_t xtof, Float_t ytof, Float_t zlenA) } } - Float_t carpos[3] = {static_cast(25. - xtof * 0.5), - static_cast((11.5 - (ytof * 0.5 - Geo::MODULECOVERTHICKNESS)) * 0.5), 0.}; + Double_t carpos[3] = {(25. - xtof * 0.5), + ((11.5 - (ytof * 0.5 - Geo::MODULECOVERTHICKNESS)) * 0.5), 0.}; if (mTOFHoles) { for (Int_t sg = -1; sg < 2; sg += 2) { carpos[2] = sg * zlenA * 0.5; @@ -1541,16 +1555,16 @@ void Detector::makeSuperModuleCooling(Float_t xtof, Float_t ytof, Float_t zlenA) } } - Float_t barS[3] = {Geo::BARS[0], Geo::BARS[1], Geo::BARS[2]}; + Double_t barS[3] = {Geo::BARS[0], Geo::BARS[1], Geo::BARS[2]}; TVirtualMC::GetMC()->Gsvolu("FBAS", "BOX ", getMediumID(kAlFrame), barS, 3); // Al - Float_t barS1[3] = {Geo::BARS1[0], Geo::BARS1[1], Geo::BARS1[2]}; + Double_t barS1[3] = {Geo::BARS1[0], Geo::BARS1[1], Geo::BARS1[2]}; TVirtualMC::GetMC()->Gsvolu("FBS1", "BOX ", getMediumID(kAlFrame), barS1, 3); // Al - Float_t barS2[3] = {Geo::BARS2[0], Geo::BARS2[1], Geo::BARS2[2]}; + Double_t barS2[3] = {Geo::BARS2[0], Geo::BARS2[1], Geo::BARS2[2]}; TVirtualMC::GetMC()->Gsvolu("FBS2", "BOX ", getMediumID(kAlFrame), barS2, 3); // Al - Float_t ytubBis = carpar[1] - 2. * Geo::ROOF2PARAMETERS[1] * 0.5 - 2. * feaRoof1[1] - 2. * barS2[1] - tubepar[1]; + Double_t ytubBis = carpar[1] - 2. * Geo::ROOF2PARAMETERS[1] * 0.5 - 2. * feaRoof1[1] - 2. * barS2[1] - tubepar[1]; ycoor = ytubBis; zcoor = -carpar[2] + barS[2]; TVirtualMC::GetMC()->Gspos("FBAS", 1, "FCA1", -24., ycoor, zcoor, 0, "ONLY"); @@ -1580,7 +1594,7 @@ void Detector::makeSuperModuleCooling(Float_t xtof, Float_t ytof, Float_t zlenA) } //_____________________________________________________________________________ -void Detector::makeSuperModuleServices(Float_t xtof, Float_t ytof, Float_t zlenA) const +void Detector::makeSuperModuleServices(Double_t xtof, Double_t ytof, Double_t zlenA) const { // // Make signal cables (FCAB/L and FCBL/B volumes), @@ -1590,38 +1604,38 @@ void Detector::makeSuperModuleServices(Float_t xtof, Float_t ytof, Float_t zlenA Int_t idrotm[3] = {0, 0, 0}; - Float_t tubepar[3] = {0., 0.4, static_cast(xtof * 0.5 - Geo::CBLW - Geo::SAWTHICKNESS)}; - Float_t al1[3] = {Geo::AL1PARAMETERS[0], Geo::AL1PARAMETERS[1], Geo::AL1PARAMETERS[2]}; - Float_t al3[3] = {Geo::AL3PARAMETERS[0], Geo::AL3PARAMETERS[1], Geo::AL3PARAMETERS[2]}; - Float_t feaRoof1[3] = {Geo::ROOF1PARAMETERS[0], Geo::ROOF1PARAMETERS[1], Geo::ROOF1PARAMETERS[2]}; - // Float_t feaRoof2[3] = {Geo::ROOF2PARAMETERS[0], Geo::ROOF2PARAMETERS[1], Geo::ROOF2PARAMETERS[2]}; - Float_t feaParam[3] = {Geo::FEAPARAMETERS[0], Geo::FEAPARAMETERS[1], Geo::FEAPARAMETERS[2]}; + Double_t tubepar[3] = {0., 0.4, (xtof * 0.5 - Geo::CBLW - Geo::SAWTHICKNESS)}; + Double_t al1[3] = {Geo::AL1PARAMETERS[0], Geo::AL1PARAMETERS[1], Geo::AL1PARAMETERS[2]}; + Double_t al3[3] = {Geo::AL3PARAMETERS[0], Geo::AL3PARAMETERS[1], Geo::AL3PARAMETERS[2]}; + Double_t feaRoof1[3] = {Geo::ROOF1PARAMETERS[0], Geo::ROOF1PARAMETERS[1], Geo::ROOF1PARAMETERS[2]}; + // Double_t feaRoof2[3] = {Geo::ROOF2PARAMETERS[0], Geo::ROOF2PARAMETERS[1], Geo::ROOF2PARAMETERS[2]}; + Double_t feaParam[3] = {Geo::FEAPARAMETERS[0], Geo::FEAPARAMETERS[1], Geo::FEAPARAMETERS[2]}; // FEA cables definition - Float_t cbpar[3] = {0., 0.5, - static_cast((tubepar[2] - (Geo::FEAWIDTH2 - Geo::FEAWIDTH1 / 6.) * 0.5) * 0.5)}; + Double_t cbpar[3] = {0., 0.5, + ((tubepar[2] - (Geo::FEAWIDTH2 - Geo::FEAWIDTH1 / 6.) * 0.5) * 0.5)}; TVirtualMC::GetMC()->Gsvolu("FCAB", "TUBE", getMediumID(kCable), cbpar, 3); // copper+alu - Float_t cbparS[3] = {cbpar[0], cbpar[1], - static_cast( - (tubepar[2] - (xtof * 0.5 - 25. + (Geo::FEAWIDTH1 - Geo::FEAWIDTH1 / 6.) * 0.5)) * 0.5)}; + Double_t cbparS[3] = {cbpar[0], cbpar[1], + ( + (tubepar[2] - (xtof * 0.5 - 25. + (Geo::FEAWIDTH1 - Geo::FEAWIDTH1 / 6.) * 0.5)) * 0.5)}; TVirtualMC::GetMC()->Gsvolu("FCAL", "TUBE", getMediumID(kCable), cbparS, 3); // copper+alu // rotation matrix Matrix(idrotm[0], 180., 90., 90., 90., 90., 0.); - Float_t carpar[3] = {static_cast(xtof * 0.5 - Geo::CBLW - Geo::SAWTHICKNESS), - static_cast(feaParam[1] + feaRoof1[1] + Geo::ROOF2PARAMETERS[1] * 0.5), - static_cast(feaRoof1[2] + Geo::BETWEENLANDMASK * 0.5 + al3[2])}; + Double_t carpar[3] = {(xtof * 0.5 - Geo::CBLW - Geo::SAWTHICKNESS), + (feaParam[1] + feaRoof1[1] + Geo::ROOF2PARAMETERS[1] * 0.5), + (feaRoof1[2] + Geo::BETWEENLANDMASK * 0.5 + al3[2])}; - Float_t bar2[3] = {Geo::BAR2[0], Geo::BAR2[1], Geo::BAR2[2]}; - Float_t ytub = -(ytof * 0.5 - Geo::MODULECOVERTHICKNESS) * 0.5 + carpar[1] + carpar[1] - - 2. * Geo::ROOF2PARAMETERS[1] * 0.5 - 2. * feaRoof1[1] - 2. * bar2[1] - tubepar[1]; + Double_t bar2[3] = {Geo::BAR2[0], Geo::BAR2[1], Geo::BAR2[2]}; + Double_t ytub = -(ytof * 0.5 - Geo::MODULECOVERTHICKNESS) * 0.5 + carpar[1] + carpar[1] - + 2. * Geo::ROOF2PARAMETERS[1] * 0.5 - 2. * feaRoof1[1] - 2. * bar2[1] - tubepar[1]; // FEA cables positioning - Float_t xcoor = (tubepar[2] + (Geo::FEAWIDTH2 - Geo::FEAWIDTH1 / 6.) * 0.5) * 0.5; - Float_t ycoor = ytub - 3.; - Float_t zcoor = -carpar[2] + (2. * feaRoof1[2] - 2. * al1[2] - 2. * feaParam[2] - cbpar[1]); + Double_t xcoor = (tubepar[2] + (Geo::FEAWIDTH2 - Geo::FEAWIDTH1 / 6.) * 0.5) * 0.5; + Double_t ycoor = ytub - 3.; + Double_t zcoor = -carpar[2] + (2. * feaRoof1[2] - 2. * al1[2] - 2. * feaParam[2] - cbpar[1]); TVirtualMC::GetMC()->Gspos("FCAB", 1, "FCA1", -xcoor, ycoor, zcoor, idrotm[0], "ONLY"); TVirtualMC::GetMC()->Gspos("FCAB", 2, "FCA1", xcoor, ycoor, zcoor, idrotm[0], "ONLY"); TVirtualMC::GetMC()->Gspos("FCAB", 1, "FCA2", -xcoor, ycoor, zcoor, idrotm[0], "ONLY"); @@ -1635,16 +1649,16 @@ void Detector::makeSuperModuleServices(Float_t xtof, Float_t ytof, Float_t zlenA // Cables and tubes on the side blocks // constants definition - Float_t kCBLl = zlenA * 0.5; // length of block - Float_t kCBLlh = zlenA * 0.5 - Geo::INTERCENTRMODBORDER2; // length of block in case of holes - // constexpr Float_t Geo::CBLW = 13.5; // width of block - // constexpr Float_t Geo::CBLH1 = 2.; // min. height of block - // constexpr Float_t Geo::CBLH2 = 12.3; // max. height of block - // constexpr Float_t Geo::SAWTHICKNESS = 1.; // Al wall thickness + Double_t kCBLl = zlenA * 0.5; // length of block + Double_t kCBLlh = zlenA * 0.5 - Geo::INTERCENTRMODBORDER2; // length of block in case of holes + // constexpr Double_t Geo::CBLW = 13.5; // width of block + // constexpr Double_t Geo::CBLH1 = 2.; // min. height of block + // constexpr Double_t Geo::CBLH2 = 12.3; // max. height of block + // constexpr Double_t Geo::SAWTHICKNESS = 1.; // Al wall thickness // lateral cable and tube volume definition - Float_t tgal = (Geo::CBLH2 - Geo::CBLH1) / (2. * kCBLl); - Float_t cblpar[11]; + Double_t tgal = (Geo::CBLH2 - Geo::CBLH1) / (2. * kCBLl); + Double_t cblpar[11]; cblpar[0] = Geo::CBLW * 0.5; cblpar[1] = 0.; cblpar[2] = 0.; @@ -1659,7 +1673,7 @@ void Detector::makeSuperModuleServices(Float_t xtof, Float_t ytof, Float_t zlenA TVirtualMC::GetMC()->Gsvolu("FCBL", "TRAP", getMediumID(kCableTubes), cblpar, 11); // cables and tubes mix // Side Al Walls definition - Float_t sawpar[3] = {static_cast(Geo::SAWTHICKNESS * 0.5), static_cast(Geo::CBLH2 * 0.5), kCBLl}; + Double_t sawpar[3] = {(Geo::SAWTHICKNESS * 0.5), (Geo::CBLH2 * 0.5), kCBLl}; TVirtualMC::GetMC()->Gsvolu("FSAW", "BOX ", getMediumID(kAlFrame), sawpar, 3); // Al Matrix(idrotm[1], 90., 90., 180., 0., 90., 180.); @@ -1711,7 +1725,7 @@ void Detector::makeSuperModuleServices(Float_t xtof, Float_t ytof, Float_t zlenA } // TOF Supermodule cover definition and positioning - Float_t covpar[3] = {static_cast(xtof * 0.5), 0.075, static_cast(zlenA * 0.5)}; + Double_t covpar[3] = {(xtof * 0.5), 0.075, (zlenA * 0.5)}; TVirtualMC::GetMC()->Gsvolu("FCOV", "BOX ", getMediumID(kAlFrame), covpar, 3); // Al if (mTOFHoles) { covpar[2] = (zlenA * 0.5 - Geo::INTERCENTRMODBORDER2) * 0.5; @@ -1735,7 +1749,7 @@ void Detector::makeSuperModuleServices(Float_t xtof, Float_t ytof, Float_t zlenA } //_____________________________________________________________________________ -void Detector::makeReadoutCrates(Float_t ytof) const +void Detector::makeReadoutCrates(Double_t ytof) const { // Services Volumes @@ -1770,12 +1784,12 @@ void Detector::makeReadoutCrates(Float_t ytof) const } // volume definition - Float_t serpar[3] = {29. * 0.5, 121. * 0.5, 90. * 0.5}; + Double_t serpar[3] = {29. * 0.5, 121. * 0.5, 90. * 0.5}; TVirtualMC::GetMC()->Gsvolu("FTOS", "BOX ", getMediumID(kCrates), serpar, 3); // Al + Cu + steel - Float_t xcoor, ycoor, zcoor; + Double_t xcoor, ycoor, zcoor; zcoor = (118. - 90.) * 0.5; - Float_t phi = -10., ra = Geo::RMIN + ytof * 0.5; + Double_t phi = -10., ra = Geo::RMIN + ytof * 0.5; for (Int_t i = 0; i < Geo::NSECTORS; i++) { phi += Geo::PHISEC; xcoor = ra * TMath::Cos(phi * TMath::DegToRad()); @@ -1788,7 +1802,7 @@ void Detector::makeReadoutCrates(Float_t ytof) const TVirtualMC::GetMC()->Gspos("FTOS", 1, "BBCE", ra, -3., zcoor, 0, "ONLY"); } -void Detector::makeModulesInBTOFvolumes(Float_t ytof, Float_t zlenA) const +void Detector::makeModulesInBTOFvolumes(Double_t ytof, Double_t zlenA) const { // // Fill BTOF_%i (for i=0,...17) volumes @@ -1804,7 +1818,7 @@ void Detector::makeModulesInBTOFvolumes(Float_t ytof, Float_t zlenA) const // Matrix(idrotm[0], 90., 0., 0., 0., 90.,-90.); Matrix(idrotm[0], 90., 0., 0., 0., 90., 270.); - Float_t xcoor, ycoor, zcoor; + Double_t xcoor, ycoor, zcoor; xcoor = 0.; // Positioning of fibre glass modules (FTOA, FTOB and FTOC) @@ -1855,7 +1869,7 @@ void Detector::makeCoversInBTOFvolumes() const // Matrix(idrotm[0], 90., 0., 0., 0., 90.,-90.); Matrix(idrotm[0], 90., 0., 0., 0., 90., 270.); - Float_t xcoor, ycoor, zcoor; + Double_t xcoor, ycoor, zcoor; xcoor = 0.; ycoor = 0.; zcoor = Geo::MODULECOVERTHICKNESS * 0.5; @@ -1877,7 +1891,7 @@ void Detector::makeCoversInBTOFvolumes() const } //_____________________________________________________________________________ -void Detector::makeBackInBTOFvolumes(Float_t ytof) const +void Detector::makeBackInBTOFvolumes(Double_t ytof) const { // // Fill BTOF_%i (for i=0,...17) volumes with volumes called FAIA and @@ -1893,7 +1907,7 @@ void Detector::makeBackInBTOFvolumes(Float_t ytof) const // Matrix(idrotm[0], 90., 0., 0., 0., 90.,-90.); Matrix(idrotm[0], 90., 0., 0., 0., 90., 270.); - Float_t xcoor, ycoor, zcoor; + Double_t xcoor, ycoor, zcoor; xcoor = 0.; ycoor = 0.; zcoor = Geo::MODULECOVERTHICKNESS + (ytof * 0.5 - Geo::MODULECOVERTHICKNESS) * 0.5; diff --git a/Detectors/TRD/base/include/TRDBase/Geometry.h b/Detectors/TRD/base/include/TRDBase/Geometry.h index 33d5a80ecdfe4..f84c46173b382 100644 --- a/Detectors/TRD/base/include/TRDBase/Geometry.h +++ b/Detectors/TRD/base/include/TRDBase/Geometry.h @@ -64,7 +64,7 @@ class Geometry : public GeometryBase, public o2::detectors::DetMatrixCacheIndire static const o2::detectors::DetID sDetID; // helper function to create volumes and registering them automatically - void createVolume(const char* name, const char* shape, int nmed, float* upar, int np); + void createVolume(const char* name, const char* shape, int nmed, double* upar, int np); Geometry(); diff --git a/Detectors/TRD/base/include/TRDBase/GeometryBase.h b/Detectors/TRD/base/include/TRDBase/GeometryBase.h index bb19472c2fbde..cfee71abdafa1 100644 --- a/Detectors/TRD/base/include/TRDBase/GeometryBase.h +++ b/Detectors/TRD/base/include/TRDBase/GeometryBase.h @@ -59,29 +59,29 @@ class GeometryBase GPUd() float getRowEnd(int layer, int stack) { return mPadPlanes[getDetectorSec(layer, stack)].getRowEnd(); } static constexpr GPUd() int getSector(int det) { return (det / (constants::NLAYER * constants::NSTACK)); } - static constexpr GPUd() float getTime0(int layer) { return TIME0[layer]; } - static constexpr GPUd() float getXtrdBeg() { return XTRDBEG; } - static constexpr GPUd() float getXtrdEnd() { return XTRDEND; } - static constexpr GPUd() float getChamberWidth(int layer) { return CWIDTH[layer]; } - static constexpr GPUd() float getChamberLength(int layer, int stack) { return CLENGTH[layer][stack]; } - static constexpr GPUd() float getAlpha() { return 2.0 * 3.14159265358979324 / constants::NSECTOR; } - static constexpr GPUd() float cheight() { return CH; } - static constexpr GPUd() float cheightSV() { return CHSV; } - static constexpr GPUd() float cspace() { return VSPACE; } - static constexpr GPUd() float craHght() { return CRAH; } - static constexpr GPUd() float cdrHght() { return CDRH; } - static constexpr GPUd() float camHght() { return CAMH; } - static constexpr GPUd() float croHght() { return CROH; } - static constexpr GPUd() float csvHght() { return CSVH; } - static constexpr GPUd() float croWid() { return CROW; } - static constexpr GPUd() float anodePos() { return ANODEPOS; } - static constexpr GPUd() float myThick() { return RMYTHICK; } - static constexpr GPUd() float drThick() { return DRTHICK; } - static constexpr GPUd() float amThick() { return AMTHICK; } - static constexpr GPUd() float drZpos() { return DRZPOS; } - static constexpr GPUd() float rpadW() { return RPADW; } - static constexpr GPUd() float cpadW() { return CPADW; } - static constexpr GPUd() float cwidcha() { return (SWIDTH2 - SWIDTH1) / SHEIGHT * (CH + VSPACE); } + static constexpr GPUd() double getTime0(int layer) { return TIME0[layer]; } + static constexpr GPUd() double getXtrdBeg() { return XTRDBEG; } + static constexpr GPUd() double getXtrdEnd() { return XTRDEND; } + static constexpr GPUd() double getChamberWidth(int layer) { return CWIDTH[layer]; } + static constexpr GPUd() double getChamberLength(int layer, int stack) { return CLENGTH[layer][stack]; } + static constexpr GPUd() double getAlpha() { return 2.0 * 3.14159265358979324 / constants::NSECTOR; } + static constexpr GPUd() double cheight() { return CH; } + static constexpr GPUd() double cheightSV() { return CHSV; } + static constexpr GPUd() double cspace() { return VSPACE; } + static constexpr GPUd() double craHght() { return CRAH; } + static constexpr GPUd() double cdrHght() { return CDRH; } + static constexpr GPUd() double camHght() { return CAMH; } + static constexpr GPUd() double croHght() { return CROH; } + static constexpr GPUd() double csvHght() { return CSVH; } + static constexpr GPUd() double croWid() { return CROW; } + static constexpr GPUd() double anodePos() { return ANODEPOS; } + static constexpr GPUd() double myThick() { return RMYTHICK; } + static constexpr GPUd() double drThick() { return DRTHICK; } + static constexpr GPUd() double amThick() { return AMTHICK; } + static constexpr GPUd() double drZpos() { return DRZPOS; } + static constexpr GPUd() double rpadW() { return RPADW; } + static constexpr GPUd() double cpadW() { return CPADW; } + static constexpr GPUd() double cwidcha() { return (SWIDTH2 - SWIDTH1) / SHEIGHT * (CH + VSPACE); } static constexpr GPUd() int MCMmax() { return MCMMAX; } static constexpr GPUd() int MCMrow() { return MCMROW; } static constexpr GPUd() int ROBmaxC0() { return ROBMAXC0; } @@ -96,83 +96,83 @@ class GeometryBase protected: GeometryBase() = default; - static GPUglobalconstexpr() float TLENGTH = 751.0; ///< Total length of the TRD mother volume + static GPUglobalconstexpr() double TLENGTH = 751.0; ///< Total length of the TRD mother volume // Parameter of the super module mother volumes - static GPUglobalconstexpr() float SHEIGHT = 77.9; ///< Height of the supermodule - static GPUglobalconstexpr() float SWIDTH1 = 94.881; ///< Lower width of the supermodule - static GPUglobalconstexpr() float SWIDTH2 = 122.353; ///< Upper width of the supermodule - static GPUglobalconstexpr() float SLENGTH = 702.0; ///< Length of the supermodule + static GPUglobalconstexpr() double SHEIGHT = 77.9; ///< Height of the supermodule + static GPUglobalconstexpr() double SWIDTH1 = 94.881; ///< Lower width of the supermodule + static GPUglobalconstexpr() double SWIDTH2 = 122.353; ///< Upper width of the supermodule + static GPUglobalconstexpr() double SLENGTH = 702.0; ///< Length of the supermodule // Length of the additional space in front of the supermodule used for services - static GPUglobalconstexpr() float FLENGTH = (TLENGTH - SLENGTH) / 2.0; + static GPUglobalconstexpr() double FLENGTH = (TLENGTH - SLENGTH) / 2.0; - static GPUglobalconstexpr() float SMPLTT = 0.2; ///< Thickness of the super module side plates + static GPUglobalconstexpr() double SMPLTT = 0.2; ///< Thickness of the super module side plates - static GPUglobalconstexpr() float VSPACE = 1.784; ///< Vertical spacing of the chambers - static GPUglobalconstexpr() float HSPACE = 2.0; ///< Horizontal spacing of the chambers - static GPUglobalconstexpr() float VROCSM = 1.2; ///< Radial distance of the first ROC to the outer plates of the SM + static GPUglobalconstexpr() double VSPACE = 1.784; ///< Vertical spacing of the chambers + static GPUglobalconstexpr() double HSPACE = 2.0; ///< Horizontal spacing of the chambers + static GPUglobalconstexpr() double VROCSM = 1.2; ///< Radial distance of the first ROC to the outer plates of the SM - static GPUglobalconstexpr() float CRAH = 4.8; ///< Height of the radiator part of the chambers - static GPUglobalconstexpr() float CDRH = 3.0; ///< Height of the drift region of the chambers - static GPUglobalconstexpr() float CAMH = 0.7; ///< Height of the amplification region of the chambers - static GPUglobalconstexpr() float CROH = 2.316; ///< Height of the readout of the chambers - static GPUglobalconstexpr() float CROW = 0.9; ///< Additional width of the readout chamber frames - static GPUglobalconstexpr() float CSVH = VSPACE - 0.742; ///< Height of the services on top of the chambers - static GPUglobalconstexpr() float CH = CRAH + CDRH + CAMH + CROH; ///< Total height of the chambers (w/o services) - static GPUglobalconstexpr() float CHSV = CH + CSVH; ///< Total height of the chambers (with services) + static GPUglobalconstexpr() double CRAH = 4.8; ///< Height of the radiator part of the chambers + static GPUglobalconstexpr() double CDRH = 3.0; ///< Height of the drift region of the chambers + static GPUglobalconstexpr() double CAMH = 0.7; ///< Height of the amplification region of the chambers + static GPUglobalconstexpr() double CROH = 2.316; ///< Height of the readout of the chambers + static GPUglobalconstexpr() double CROW = 0.9; ///< Additional width of the readout chamber frames + static GPUglobalconstexpr() double CSVH = VSPACE - 0.742; ///< Height of the services on top of the chambers + static GPUglobalconstexpr() double CH = CRAH + CDRH + CAMH + CROH; ///< Total height of the chambers (w/o services) + static GPUglobalconstexpr() double CHSV = CH + CSVH; ///< Total height of the chambers (with services) // Distance of anode wire plane relative to middle of alignable volume - static GPUglobalconstexpr() float ANODEPOS = CRAH + CDRH + CAMH / 2.0 - CHSV / 2.0; - - static GPUglobalconstexpr() float CALT = 0.4; ///< Thicknesses of different parts of the chamber frame Lower aluminum frame - static GPUglobalconstexpr() float CCLST = 0.21; ///< Thickness of the lower Wacosit frame sides - static GPUglobalconstexpr() float CCLFT = 1.0; ///< Thickness of the lower Wacosit frame front - static GPUglobalconstexpr() float CGLT = 0.25; ///< Thichness of the glue around the radiator - static GPUglobalconstexpr() float CCUTA = 1.0; ///< Upper Wacosit frame around amplification region - static GPUglobalconstexpr() float CCUTB = 0.8; ///< Thickness of the upper Wacosit frame around amp. region - static GPUglobalconstexpr() float CAUT = 1.5; ///< Al frame of back panel - static GPUglobalconstexpr() float CALW = 2.5; ///< Width of additional aluminum ledge on lower frame - static GPUglobalconstexpr() float CALH = 0.4; ///< Height of additional aluminum ledge on lower frame - static GPUglobalconstexpr() float CALWMOD = 0.4; ///< Width of additional aluminum ledge on lower frame - static GPUglobalconstexpr() float CALHMOD = 2.5; ///< Height of additional aluminum ledge on lower frame - static GPUglobalconstexpr() float CWSW = 1.2; ///< Width of additional wacosit ledge on lower frame - static GPUglobalconstexpr() float CWSH = 0.3; ///< Height of additional wacosit ledge on lower frame - - static GPUglobalconstexpr() float CPADW = 0.0; ///>Difference of outer chamber width and pad plane width - static GPUglobalconstexpr() float RPADW = 1.0; ///< Difference of outer chamber width and pad plane width + static GPUglobalconstexpr() double ANODEPOS = CRAH + CDRH + CAMH / 2.0 - CHSV / 2.0; + + static GPUglobalconstexpr() double CALT = 0.4; ///< Thicknesses of different parts of the chamber frame Lower aluminum frame + static GPUglobalconstexpr() double CCLST = 0.21; ///< Thickness of the lower Wacosit frame sides + static GPUglobalconstexpr() double CCLFT = 1.0; ///< Thickness of the lower Wacosit frame front + static GPUglobalconstexpr() double CGLT = 0.25; ///< Thichness of the glue around the radiator + static GPUglobalconstexpr() double CCUTA = 1.0; ///< Upper Wacosit frame around amplification region + static GPUglobalconstexpr() double CCUTB = 0.8; ///< Thickness of the upper Wacosit frame around amp. region + static GPUglobalconstexpr() double CAUT = 1.5; ///< Al frame of back panel + static GPUglobalconstexpr() double CALW = 2.5; ///< Width of additional aluminum ledge on lower frame + static GPUglobalconstexpr() double CALH = 0.4; ///< Height of additional aluminum ledge on lower frame + static GPUglobalconstexpr() double CALWMOD = 0.4; ///< Width of additional aluminum ledge on lower frame + static GPUglobalconstexpr() double CALHMOD = 2.5; ///< Height of additional aluminum ledge on lower frame + static GPUglobalconstexpr() double CWSW = 1.2; ///< Width of additional wacosit ledge on lower frame + static GPUglobalconstexpr() double CWSH = 0.3; ///< Height of additional wacosit ledge on lower frame + + static GPUglobalconstexpr() double CPADW = 0.0; ///>Difference of outer chamber width and pad plane width + static GPUglobalconstexpr() double RPADW = 1.0; ///< Difference of outer chamber width and pad plane width // // Thickness of the the material layers // - static GPUglobalconstexpr() float DRTHICK = CDRH; ///< Thickness of the drift region - static GPUglobalconstexpr() float AMTHICK = CAMH; ///< Thickness of the amplification region - static GPUglobalconstexpr() float XETHICK = DRTHICK + AMTHICK; ///< Thickness of the gas volume - static GPUglobalconstexpr() float WRTHICK = 0.00011; ///< Thickness of the wire planes - - static GPUglobalconstexpr() float RMYTHICK = 0.0015; ///< Thickness of the mylar layers in the radiator - static GPUglobalconstexpr() float RCBTHICK = 0.0055; ///< Thickness of the carbon layers in the radiator - static GPUglobalconstexpr() float RGLTHICK = 0.0065; ///< Thickness of the glue layers in the radiator - static GPUglobalconstexpr() float RRHTHICK = 0.8; ///< Thickness of the rohacell layers in the radiator - static GPUglobalconstexpr() float RFBTHICK = CRAH - 2.0 * (RMYTHICK + RCBTHICK + RRHTHICK); ///< Thickness of the fiber layers in the radiator - - static GPUglobalconstexpr() float PPDTHICK = 0.0025; ///< Thickness of copper of the pad plane - static GPUglobalconstexpr() float PPPTHICK = 0.0356; ///< Thickness of PCB board of the pad plane - static GPUglobalconstexpr() float PGLTHICK = 0.1428; ///< Thickness of the glue layer - static GPUglobalconstexpr() float PCBTHICK = 0.019; ///< Thickness of the carbon layers - static GPUglobalconstexpr() float PPCTHICK = 0.0486; ///< Thickness of the PCB readout boards - static GPUglobalconstexpr() float PRBTHICK = 0.0057; ///< Thickness of the PCB copper layers - static GPUglobalconstexpr() float PELTHICK = 0.0029; ///< Thickness of all other electronics components (caps, etc.) - static GPUglobalconstexpr() float PHCTHICK = CROH - PPDTHICK - PPPTHICK - PGLTHICK - PCBTHICK * 2.0 - PPCTHICK - PRBTHICK - PELTHICK; ///< Thickness of the honeycomb support structure + static GPUglobalconstexpr() double DRTHICK = CDRH; ///< Thickness of the drift region + static GPUglobalconstexpr() double AMTHICK = CAMH; ///< Thickness of the amplification region + static GPUglobalconstexpr() double XETHICK = DRTHICK + AMTHICK; ///< Thickness of the gas volume + static GPUglobalconstexpr() double WRTHICK = 0.00011; ///< Thickness of the wire planes + + static GPUglobalconstexpr() double RMYTHICK = 0.0015; ///< Thickness of the mylar layers in the radiator + static GPUglobalconstexpr() double RCBTHICK = 0.0055; ///< Thickness of the carbon layers in the radiator + static GPUglobalconstexpr() double RGLTHICK = 0.0065; ///< Thickness of the glue layers in the radiator + static GPUglobalconstexpr() double RRHTHICK = 0.8; ///< Thickness of the rohacell layers in the radiator + static GPUglobalconstexpr() double RFBTHICK = CRAH - 2.0 * (RMYTHICK + RCBTHICK + RRHTHICK); ///< Thickness of the fiber layers in the radiator + + static GPUglobalconstexpr() double PPDTHICK = 0.0025; ///< Thickness of copper of the pad plane + static GPUglobalconstexpr() double PPPTHICK = 0.0356; ///< Thickness of PCB board of the pad plane + static GPUglobalconstexpr() double PGLTHICK = 0.1428; ///< Thickness of the glue layer + static GPUglobalconstexpr() double PCBTHICK = 0.019; ///< Thickness of the carbon layers + static GPUglobalconstexpr() double PPCTHICK = 0.0486; ///< Thickness of the PCB readout boards + static GPUglobalconstexpr() double PRBTHICK = 0.0057; ///< Thickness of the PCB copper layers + static GPUglobalconstexpr() double PELTHICK = 0.0029; ///< Thickness of all other electronics components (caps, etc.) + static GPUglobalconstexpr() double PHCTHICK = CROH - PPDTHICK - PPPTHICK - PGLTHICK - PCBTHICK * 2.0 - PPCTHICK - PRBTHICK - PELTHICK; ///< Thickness of the honeycomb support structure // // Position of the material layers // - static GPUglobalconstexpr() float DRZPOS = 2.4; ///< Position of the drift region - static GPUglobalconstexpr() float AMZPOS = 0.0; ///< Position of the amplification region - static GPUglobalconstexpr() float WRZPOSA = 0.0; ///< Position of the wire planes - static GPUglobalconstexpr() float WRZPOSB = -AMTHICK / 2.0 + 0.001; ///< Position of the wire planes - static GPUglobalconstexpr() float CALZPOS = 0.3; ///< Position of the additional aluminum ledges + static GPUglobalconstexpr() double DRZPOS = 2.4; ///< Position of the drift region + static GPUglobalconstexpr() double AMZPOS = 0.0; ///< Position of the amplification region + static GPUglobalconstexpr() double WRZPOSA = 0.0; ///< Position of the wire planes + static GPUglobalconstexpr() double WRZPOSB = -AMTHICK / 2.0 + 0.001; ///< Position of the wire planes + static GPUglobalconstexpr() double CALZPOS = 0.3; ///< Position of the additional aluminum ledges static GPUglobalconstexpr() int MCMMAX = 16; ///< Maximum number of MCMs per ROB static GPUglobalconstexpr() int MCMROW = 4; ///< Maximum number of MCMs per ROB Row @@ -185,24 +185,24 @@ class GeometryBase static GPUglobalconstexpr() int ROWMAXC0 = 12; ///< Maximum number of Rows per C0 chamber static GPUglobalconstexpr() int ROWMAXC1 = 16; ///< Maximum number of Rows per C1 chamber - static GPUglobalconstexpr() float TIME0BASE = 300.65; ///< Base value for calculation of Time-position of pad 0 + static GPUglobalconstexpr() double TIME0BASE = 300.65; ///< Base value for calculation of Time-position of pad 0 // Time-position of pad 0 - static GPUglobalconstexpr() float TIME0[6] = {TIME0BASE + 0 * (CH + VSPACE), - TIME0BASE + 1 * (CH + VSPACE), - TIME0BASE + 2 * (CH + VSPACE), - TIME0BASE + 3 * (CH + VSPACE), - TIME0BASE + 4 * (CH + VSPACE), - TIME0BASE + 5 * (CH + VSPACE)}; + static GPUglobalconstexpr() double TIME0[6] = {TIME0BASE + 0 * (CH + VSPACE), + TIME0BASE + 1 * (CH + VSPACE), + TIME0BASE + 2 * (CH + VSPACE), + TIME0BASE + 3 * (CH + VSPACE), + TIME0BASE + 4 * (CH + VSPACE), + TIME0BASE + 5 * (CH + VSPACE)}; - static GPUglobalconstexpr() float XTRDBEG = 288.43; ///< X-coordinate in tracking system of begin of TRD mother volume - static GPUglobalconstexpr() float XTRDEND = 366.33; ///< X-coordinate in tracking system of end of TRD mother volume + static GPUglobalconstexpr() double XTRDBEG = 288.43; ///< X-coordinate in tracking system of begin of TRD mother volume + static GPUglobalconstexpr() double XTRDEND = 366.33; ///< X-coordinate in tracking system of end of TRD mother volume // The outer width of the chambers - static GPUglobalconstexpr() float CWIDTH[constants::NLAYER] = {90.4, 94.8, 99.3, 103.7, 108.1, 112.6}; + static GPUglobalconstexpr() double CWIDTH[constants::NLAYER] = {90.4, 94.8, 99.3, 103.7, 108.1, 112.6}; // The outer lengths of the chambers // Includes the spacings between the chambers! - static GPUglobalconstexpr() float CLENGTH[constants::NLAYER][constants::NSTACK] = { + static GPUglobalconstexpr() double CLENGTH[constants::NLAYER][constants::NSTACK] = { {124.0, 124.0, 110.0, 124.0, 124.0}, {124.0, 124.0, 110.0, 124.0, 124.0}, {131.0, 131.0, 110.0, 131.0, 131.0}, diff --git a/Detectors/TRD/base/src/Geometry.cxx b/Detectors/TRD/base/src/Geometry.cxx index 85cbcb097d553..609a21d9365c8 100644 --- a/Detectors/TRD/base/src/Geometry.cxx +++ b/Detectors/TRD/base/src/Geometry.cxx @@ -243,7 +243,7 @@ void Geometry::createPadPlane(int ilayer, int istack) padPlane.setPadRowSMOffset(rowTmp - CLENGTH[ilayer][istack] / 2.0); } -void Geometry::createVolume(const char* name, const char* shape, int nmed, float* upar, int np) +void Geometry::createVolume(const char* name, const char* shape, int nmed, double* upar, int np) { TVirtualMC::GetMC()->Gsvolu(name, shape, nmed, upar, np); @@ -316,12 +316,12 @@ void Geometry::createVolumes(std::vector const& idtmed) const int kNparTrd = 4; const int kNparCha = 3; - float xpos; - float ypos; - float zpos; + double xpos; + double ypos; + double zpos; - float parTrd[kNparTrd]; - float parCha[kNparCha]; + double parTrd[kNparTrd]; + double parCha[kNparCha]; const int kTag = 100; char cTagV[kTag]; @@ -820,20 +820,20 @@ void Geometry::createFrame(std::vector const& idtmed) int ilayer = 0; - float xpos = 0.0; - float ypos = 0.0; - float zpos = 0.0; + double xpos = 0.0; + double ypos = 0.0; + double zpos = 0.0; const int kTag = 100; char cTagV[kTag]; char cTagM[kTag]; const int kNparTRD = 4; - float parTRD[kNparTRD]; + double parTRD[kNparTRD]; const int kNparBOX = 3; - float parBOX[kNparBOX]; + double parBOX[kNparBOX]; const int kNparTRP = 11; - float parTRP[kNparTRP]; + double parTRP[kNparTRP]; // The rotation matrices const int kNmatrix = 7; @@ -851,7 +851,7 @@ void Geometry::createFrame(std::vector const& idtmed) // const int kNparCrb = 3; - float parCrb[kNparCrb]; + double parCrb[kNparCrb]; parCrb[0] = 0.0; parCrb[1] = 0.0; parCrb[2] = 0.0; @@ -937,12 +937,12 @@ void Geometry::createFrame(std::vector const& idtmed) // The chamber support rails // - const float kSRLhgt = 2.00; - const float kSRLwidA = 2.3; - const float kSRLwidB = 1.947; - const float kSRLdst = 1.135; + const double kSRLhgt = 2.00; + const double kSRLwidA = 2.3; + const double kSRLwidB = 1.947; + const double kSRLdst = 1.135; const int kNparSRL = 11; - float parSRL[kNparSRL]; + double parSRL[kNparSRL]; // Trapezoidal shape parSRL[0] = SLENGTH / 2.0; parSRL[1] = 0.0; @@ -979,17 +979,17 @@ void Geometry::createFrame(std::vector const& idtmed) // The cross bars between the chambers // - const float kSCBwid = 1.0; - const float kSCBthk = 2.0; - const float kSCHhgt = 0.3; + const double kSCBwid = 1.0; + const double kSCBthk = 2.0; + const double kSCHhgt = 0.3; const int kNparSCB = 3; - float parSCB[kNparSCB]; + double parSCB[kNparSCB]; parSCB[1] = kSCBwid / 2.0; parSCB[2] = CH / 2.0 + VSPACE / 2.0 - kSCHhgt; const int kNparSCI = 3; - float parSCI[kNparSCI]; + double parSCI[kNparSCI]; parSCI[1] = -1; xpos = 0.0; @@ -1002,7 +1002,7 @@ void Geometry::createFrame(std::vector const& idtmed) createVolume(cTagV, "BOX ", idtmed[1], parSCB, kNparSCB); // The empty regions in the cross bars - float thkSCB = kSCBthk; + double thkSCB = kSCBthk; if (ilayer < 2) { thkSCB *= 1.5; } @@ -1046,7 +1046,7 @@ void Geometry::createFrame(std::vector const& idtmed) // const int kNparSCH = 3; - float parSCH[kNparSCH]; + double parSCH[kNparSCH]; for (ilayer = 1; ilayer < NLAYER - 1; ilayer++) { parSCH[0] = CWIDTH[ilayer] / 2.0; @@ -1372,22 +1372,22 @@ void Geometry::createFrame(std::vector const& idtmed) // const int kNparSCL = 3; - float parSCL[kNparSCL]; + double parSCL[kNparSCL]; const int kNparSCLb = 11; - float parSCLb[kNparSCLb]; + double parSCLb[kNparSCLb]; // Upper ledges // Thickness of the corner ledges - const float kSCLthkUa = 0.6; - const float kSCLthkUb = 0.6; + const double kSCLthkUa = 0.6; + const double kSCLthkUb = 0.6; // Width of the corner ledges - const float kSCLwidUa = 3.2; - const float kSCLwidUb = 4.8; + const double kSCLwidUa = 3.2; + const double kSCLwidUb = 4.8; // Position of the corner ledges - const float kSCLposxUa = 0.7; - const float kSCLposxUb = 3.3; - const float kSCLposzUa = 1.65; - const float kSCLposzUb = 0.3; + const double kSCLposxUa = 0.7; + const double kSCLposxUb = 3.3; + const double kSCLposzUa = 1.65; + const double kSCLposzUb = 0.3; // Vertical parSCL[0] = kSCLthkUa / 2.0; parSCL[1] = SLENGTH / 2.0; @@ -1421,16 +1421,16 @@ void Geometry::createFrame(std::vector const& idtmed) // Lower ledges // Thickness of the corner ledges - const float kSCLthkLa = 2.464; - const float kSCLthkLb = 1.0; + const double kSCLthkLa = 2.464; + const double kSCLthkLb = 1.0; // Width of the corner ledges - const float kSCLwidLa = 8.3; - const float kSCLwidLb = 4.0; + const double kSCLwidLa = 8.3; + const double kSCLwidLb = 4.0; // Position of the corner ledges - const float kSCLposxLa = (3.0 * kSCLthkLb - kSCLthkLa) / 4.0 + 0.05; - const float kSCLposxLb = kSCLthkLb + kSCLwidLb / 2.0 + 0.05; - const float kSCLposzLa = kSCLwidLa / 2.0; - const float kSCLposzLb = kSCLthkLb / 2.0; + const double kSCLposxLa = (3.0 * kSCLthkLb - kSCLthkLa) / 4.0 + 0.05; + const double kSCLposxLb = kSCLthkLb + kSCLwidLb / 2.0 + 0.05; + const double kSCLposzLa = kSCLwidLa / 2.0; + const double kSCLposzLb = kSCLthkLb / 2.0; // Vertical // Trapezoidal shape parSCLb[0] = SLENGTH / 2.0; @@ -1480,7 +1480,7 @@ void Geometry::createFrame(std::vector const& idtmed) // const int kNparTrd = 4; - float parTrd[kNparTrd]; + double parTrd[kNparTrd]; parTrd[0] = SWIDTH1 / 2.0 - 2.5; parTrd[1] = SWIDTH2 / 2.0 - 2.5; parTrd[2] = SMPLTT / 2.0; @@ -1493,7 +1493,7 @@ void Geometry::createFrame(std::vector const& idtmed) TVirtualMC::GetMC()->Gspos("UTA1", 2, "UTF2", xpos, -ypos, zpos, 0, "ONLY"); const int kNparPlt = 3; - float parPlt[kNparPlt]; + double parPlt[kNparPlt]; parPlt[0] = 0.0; parPlt[1] = 0.0; parPlt[2] = 0.0; @@ -1549,27 +1549,27 @@ void Geometry::createServices(std::vector const& idtmed) int ilayer = 0; int istack = 0; - float xpos = 0.0; - float ypos = 0.0; - float zpos = 0.0; + double xpos = 0.0; + double ypos = 0.0; + double zpos = 0.0; const int kTag = 100; char cTagV[kTag]; char cTagM[kTag]; const int kNparBox = 3; - float parBox[kNparBox]; + double parBox[kNparBox]; const int kNparTube = 3; - float parTube[kNparTube]; + double parTube[kNparTube]; // Services inside the baby frame - const float kBBMdz = 223.0; - const float kBBSdz = 8.5; + const double kBBMdz = 223.0; + const double kBBSdz = 8.5; // Services inside the back frame - const float kBFMdz = 118.0; - const float kBFSdz = 8.5; + const double kBFMdz = 118.0; + const double kBFSdz = 8.5; // The rotation matrices const int kNmatrix = 10; @@ -1590,16 +1590,16 @@ void Geometry::createServices(std::vector const& idtmed) // // Width of the cooling arterias - const float kCOLwid = 0.8; + const double kCOLwid = 0.8; // Height of the cooling arterias - const float kCOLhgt = 6.5; + const double kCOLhgt = 6.5; // Positioning of the cooling - const float kCOLposx = 1.0; - const float kCOLposz = -1.2; + const double kCOLposx = 1.0; + const double kCOLposz = -1.2; // Thickness of the walls of the cooling arterias - const float kCOLthk = 0.1; + const double kCOLthk = 0.1; const int kNparCOL = 3; - float parCOL[kNparCOL]; + double parCOL[kNparCOL]; parCOL[0] = 0.0; parCOL[1] = 0.0; parCOL[2] = 0.0; @@ -1740,15 +1740,15 @@ void Geometry::createServices(std::vector const& idtmed) // The power bus bars // - const float kPWRwid = 0.6; + const double kPWRwid = 0.6; // Increase the height of the power bus bars to take into // account the material of additional cables, etc. - const float kPWRhgtA = 5.0 + 0.2; - const float kPWRhgtB = 5.0; - const float kPWRposx = 2.0; - const float kPWRposz = 0.1; + const double kPWRhgtA = 5.0 + 0.2; + const double kPWRhgtB = 5.0; + const double kPWRposx = 2.0; + const double kPWRposz = 0.1; const int kNparPWR = 3; - float parPWR[kNparPWR]; + double parPWR[kNparPWR]; parPWR[0] = 0.0; parPWR[1] = 0.0; parPWR[2] = 0.0; @@ -1925,7 +1925,7 @@ void Geometry::createServices(std::vector const& idtmed) // const int kNparServ = 3; - float parServ[kNparServ]; + double parServ[kNparServ]; for (int istack : {0, 2}) { for (ilayer = 0; ilayer < NLAYER; ilayer++) { @@ -1966,7 +1966,7 @@ void Geometry::createServices(std::vector const& idtmed) int iDet = getDetectorSec(ilayer, istack); int iCopy = getDetector(ilayer, istack, 0) * 100; int nMCMrow = getRowMax(ilayer, istack, 0); - float ySize = (getChamberLength(ilayer, istack) - 2.0 * RPADW) / ((float)nMCMrow); + double ySize = (getChamberLength(ilayer, istack) - 2.0 * RPADW) / ((double)nMCMrow); snprintf(cTagV, kTag, "UU%02d", shapeClass(ilayer, istack)); snprintf(cTagM, kTag, "UCP%01d", ilayer); for (int iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) { @@ -1997,7 +1997,7 @@ void Geometry::createServices(std::vector const& idtmed) int iDet = getDetectorSec(ilayer, istack); int iCopy = getDetector(ilayer, istack, 0) * 100; int nMCMrow = getRowMax(ilayer, istack, 0); - float ySize = (getChamberLength(ilayer, istack) - 2.0 * RPADW) / ((float)nMCMrow); + double ySize = (getChamberLength(ilayer, istack) - 2.0 * RPADW) / ((double)nMCMrow); snprintf(cTagV, kTag, "UU%02d", shapeClass(ilayer, istack)); snprintf(cTagM, kTag, "UPL%01d", ilayer); for (int iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) { @@ -2013,18 +2013,18 @@ void Geometry::createServices(std::vector const& idtmed) // The MCMs // - const float kMCMx = 3.0; - const float kMCMy = 3.0; - const float kMCMz = 0.3; + const double kMCMx = 3.0; + const double kMCMy = 3.0; + const double kMCMz = 0.3; - const float kMCMpcTh = 0.1; - const float kMCMcuTh = 0.0025; - const float kMCMsiTh = 0.03; - const float kMCMcoTh = 0.04; + const double kMCMpcTh = 0.1; + const double kMCMcuTh = 0.0025; + const double kMCMsiTh = 0.03; + const double kMCMcoTh = 0.04; // The mother volume for the MCMs (air) const int kNparMCM = 3; - float parMCM[kNparMCM]; + double parMCM[kNparMCM]; parMCM[0] = kMCMx / 2.0; parMCM[1] = kMCMy / 2.0; parMCM[2] = kMCMz / 2.0; @@ -2082,9 +2082,9 @@ void Geometry::createServices(std::vector const& idtmed) int iDet = getDetectorSec(ilayer, istack); int iCopy = getDetector(ilayer, istack, 0) * 1000; int nMCMrow = getRowMax(ilayer, istack, 0); - float ySize = (getChamberLength(ilayer, istack) - 2.0 * RPADW) / ((float)nMCMrow); + double ySize = (getChamberLength(ilayer, istack) - 2.0 * RPADW) / ((double)nMCMrow); int nMCMcol = 8; - float xSize = (getChamberWidth(ilayer) - 2.0 * CPADW) / ((float)nMCMcol + 6); // Introduce 6 gaps + double xSize = (getChamberWidth(ilayer) - 2.0 * CPADW) / ((double)nMCMcol + 6); // Introduce 6 gaps int iMCM[8] = {1, 2, 3, 5, 8, 9, 10, 12}; // 0..7 MCM + 6 gap structure snprintf(cTagV, kTag, "UU%02d", shapeClass(ilayer, istack)); for (int iMCMrow = 0; iMCMrow < nMCMrow; iMCMrow++) { @@ -2111,17 +2111,17 @@ void Geometry::createServices(std::vector const& idtmed) // The DCS boards // - const float kDCSx = 9.0; - const float kDCSy = 14.5; - const float kDCSz = 0.3; + const double kDCSx = 9.0; + const double kDCSy = 14.5; + const double kDCSz = 0.3; - const float kDCSpcTh = 0.15; - const float kDCScuTh = 0.01; - const float kDCScoTh = 0.04; + const double kDCSpcTh = 0.15; + const double kDCScuTh = 0.01; + const double kDCScoTh = 0.04; // The mother volume for the DCSs (air) const int kNparDCS = 3; - float parDCS[kNparDCS]; + double parDCS[kNparDCS]; parDCS[0] = kDCSx / 2.0; parDCS[1] = kDCSy / 2.0; parDCS[2] = kDCSz / 2.0; @@ -2159,7 +2159,7 @@ void Geometry::createServices(std::vector const& idtmed) int iDet = getDetectorSec(ilayer, istack); int iCopy = iDet + 1; xpos = CWIDTH[ilayer] / 2.0 - - 1.9 * (getChamberLength(ilayer, istack) - 2.0 * RPADW) / ((float)getRowMax(ilayer, istack, 0)); + 1.9 * (getChamberLength(ilayer, istack) - 2.0 * RPADW) / ((double)getRowMax(ilayer, istack, 0)); ypos = 0.05 * CLENGTH[ilayer][istack]; zpos = kDCSz / 2.0 - CSVH / 2.0; snprintf(cTagV, kTag, "UU%02d", shapeClass(ilayer, istack)); @@ -2171,17 +2171,17 @@ void Geometry::createServices(std::vector const& idtmed) // The ORI boards // - const float kORIx = 4.2; - const float kORIy = 13.5; - const float kORIz = 0.3; + const double kORIx = 4.2; + const double kORIy = 13.5; + const double kORIz = 0.3; - const float kORIpcTh = 0.15; - const float kORIcuTh = 0.01; - const float kORIcoTh = 0.04; + const double kORIpcTh = 0.15; + const double kORIcuTh = 0.01; + const double kORIcoTh = 0.04; // The mother volume for the ORIs (air) const int kNparORI = 3; - float parORI[kNparORI]; + double parORI[kNparORI]; parORI[0] = kORIx / 2.0; parORI[1] = kORIy / 2.0; parORI[2] = kORIz / 2.0; @@ -2219,13 +2219,13 @@ void Geometry::createServices(std::vector const& idtmed) int iDet = getDetectorSec(ilayer, istack); int iCopy = iDet + 1; xpos = CWIDTH[ilayer] / 2.0 - - 1.92 * (getChamberLength(ilayer, istack) - 2.0 * RPADW) / ((float)getRowMax(ilayer, istack, 0)); + 1.92 * (getChamberLength(ilayer, istack) - 2.0 * RPADW) / ((double)getRowMax(ilayer, istack, 0)); ypos = -16.0; zpos = kORIz / 2.0 - CSVH / 2.0; snprintf(cTagV, kTag, "UU%02d", shapeClass(ilayer, istack)); TVirtualMC::GetMC()->Gspos("UORI", iCopy, cTagV, xpos, ypos, zpos, 0, "ONLY"); xpos = -CWIDTH[ilayer] / 2.0 + - 3.8 * (getChamberLength(ilayer, istack) - 2.0 * RPADW) / ((float)getRowMax(ilayer, istack, 0)); + 3.8 * (getChamberLength(ilayer, istack) - 2.0 * RPADW) / ((double)getRowMax(ilayer, istack, 0)); ypos = -16.0; zpos = kORIz / 2.0 - CSVH / 2.0; snprintf(cTagV, kTag, "UU%02d", shapeClass(ilayer, istack)); diff --git a/Detectors/ZDC/simulation/src/Detector.cxx b/Detectors/ZDC/simulation/src/Detector.cxx index 235ccf62cd73e..c4466092c17e0 100644 --- a/Detectors/ZDC/simulation/src/Detector.cxx +++ b/Detectors/ZDC/simulation/src/Detector.cxx @@ -749,7 +749,7 @@ void Detector::createAsideBeamLine() { double tubpar[3] = {0., 0., 0}; - float boxpar[3] = {0., 0., 0}; + double boxpar[3] = {0., 0., 0}; double tubspar[5] = {0., 0., 0., 0., 0.}; double conpar[15] = {0.}; // all elements will be 0 @@ -1401,7 +1401,7 @@ void Detector::createAsideBeamLine() void Detector::createCsideBeamLine() { double tubpar[3] = {0., 0., 0}; - float boxpar[3] = {0., 0., 0}; + double boxpar[3] = {0., 0., 0}; double tubspar[5] = {0., 0., 0., 0., 0.}; double conpar[15] = { 0.,