From 385ee390f3c0484a9eefa809993453c16b40fce1 Mon Sep 17 00:00:00 2001 From: Jana Date: Wed, 25 Jan 2023 15:40:21 +0100 Subject: [PATCH 1/9] HCAL endcaps in IDEA-LAr --- Detector/DetFCCeeHCalTile/CMakeLists.txt | 13 + .../FCCee_HCalEndcaps_ThreeParts_TileCal.xml | 141 ++++++ .../src/HCalThreePartsEndcap_geo.cpp | 474 ++++++++++++++++++ .../compact/FCCee_DectMaster.xml | 1 + 4 files changed, 629 insertions(+) create mode 100644 Detector/DetFCCeeHCalTile/compact/FCCee_HCalEndcaps_ThreeParts_TileCal.xml create mode 100644 Detector/DetFCCeeHCalTile/src/HCalThreePartsEndcap_geo.cpp diff --git a/Detector/DetFCCeeHCalTile/CMakeLists.txt b/Detector/DetFCCeeHCalTile/CMakeLists.txt index 8f767983..44dd2706 100644 --- a/Detector/DetFCCeeHCalTile/CMakeLists.txt +++ b/Detector/DetFCCeeHCalTile/CMakeLists.txt @@ -5,3 +5,16 @@ install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/compact DESTINATION ${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}/Detector/DetFCCeeHCalTile) +file(GLOB sources src/*.cpp) +add_dd4hep_plugin(DetFCCeeHCalTile SHARED ${sources}) +target_link_libraries(DetFCCeeHCalTile DD4hep::DDCore) + + +set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) + + +#add_test(NAME ConstructDetFCCeeHCalTile +# COMMAND root -q -b ".github/scripts/load_detector.C(\"Detector/DetFCCeeHCalTile/compact/standalone.xml\")" +# WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} +# ) +#k4_set_test_env(ConstructDetFCCeeHCalTile) diff --git a/Detector/DetFCCeeHCalTile/compact/FCCee_HCalEndcaps_ThreeParts_TileCal.xml b/Detector/DetFCCeeHCalTile/compact/FCCee_HCalEndcaps_ThreeParts_TileCal.xml new file mode 100644 index 00000000..0ec8a639 --- /dev/null +++ b/Detector/DetFCCeeHCalTile/compact/FCCee_HCalEndcaps_ThreeParts_TileCal.xml @@ -0,0 +1,141 @@ + + + + HCal layout based on ATLAS HCal, with realistic longitudinal segmentation and steel support + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + system:4,type:2,layer:5,row:9,eta:11,phi:10 + + + + system:4,type:2,layer:4,eta:11,phi:10 + + + + + system:4,type:2,layer:5,row:9,eta:10,phi:10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Detector/DetFCCeeHCalTile/src/HCalThreePartsEndcap_geo.cpp b/Detector/DetFCCeeHCalTile/src/HCalThreePartsEndcap_geo.cpp new file mode 100644 index 00000000..9f698058 --- /dev/null +++ b/Detector/DetFCCeeHCalTile/src/HCalThreePartsEndcap_geo.cpp @@ -0,0 +1,474 @@ +// DD4hep +#include "DD4hep/DetFactoryHelper.h" + +// todo: remove gaudi logging and properly capture output +#define endmsg std::endl +#define lLog std::cout +namespace MSG { +const std::string ERROR = " Error: "; +const std::string DEBUG = " Debug: "; +const std::string INFO = " Info: "; +} + +using dd4hep::Volume; +using dd4hep::DetElement; +using dd4hep::xml::Dimension; +using dd4hep::PlacedVolume; + +namespace det { +void buildEC(dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet, dd4hep::Volume& aEnvelope, + dd4hep::DetElement& aHCal, xml_det_t aXmlElement, int sign) { + + dd4hep::SensitiveDetector sensDet = aSensDet; + Dimension sensDetType = aXmlElement.child(_Unicode(sensitive)); + sensDet.setType(sensDetType.typeStr()); + + Dimension dimensions(aXmlElement.child(_Unicode(dimensions))); + xml_comp_t xEndPlate = aXmlElement.child(_Unicode(end_plate)); + double dZEndPlate = xEndPlate.thickness() / 2.; + xml_comp_t xFacePlate = aXmlElement.child(_Unicode(face_plate)); + double dRhoFacePlate = xFacePlate.thickness() / 2.; + xml_comp_t xSpace = aXmlElement.child(_Unicode(plate_space)); // to avoid overlaps + double space = xSpace.thickness(); + xml_comp_t xSteelSupport = aXmlElement.child(_Unicode(steel_support)); + double dSteelSupport = xSteelSupport.thickness(); + lLog << MSG::DEBUG << "steel support thickness " << dSteelSupport << endmsg; + lLog << MSG::DEBUG << "steel support material " << xSteelSupport.materialStr() << endmsg; + + double sensitiveBarrel1Rmin = dimensions.rmin1() + 2 * dRhoFacePlate + space; + double sensitiveBarrel2Rmin = dimensions.rmin2() + 2 * dRhoFacePlate + space; + double sensitiveBarrel3Rmin = dimensions.rmin() + 2 * dRhoFacePlate + space; + + // Offset in z is given as distance from 0 to the middle of the Calorimeter volume + double extBarrelOffset1 = dimensions.offset(); + double extBarrelOffset2 = dimensions.z_offset(); + double extBarrelOffset3 = dimensions.v_offset(); + + // Hard-coded assumption that we have two different sequences for the modules + std::vector sequences = {aXmlElement.child(_Unicode(sequence_a)), aXmlElement.child(_Unicode(sequence_b))}; + // NOTE: This assumes that both have the same dimensions! + Dimension sequenceDimensions(sequences[1].dimensions()); + double dzSequence = sequenceDimensions.dz(); + lLog << MSG::DEBUG << "sequence thickness " << dzSequence << endmsg; + + // calculate the number of modules fitting in Z + unsigned int numSequencesZ1 = static_cast((2 * dimensions.width() - 2 * dZEndPlate - space) / dzSequence); + unsigned int numSequencesZ2 = static_cast((2 * dimensions.dz() - 2 * dZEndPlate - space) / dzSequence); + unsigned int numSequencesZ3 = static_cast((2 * dimensions.z_length() - 2 * dZEndPlate - space) / dzSequence); + + unsigned int numSequencesR1 = 0; + unsigned int numSequencesR2 = 0; + unsigned int numSequencesR3 = 0; + double moduleDepth1 = 0.; + double moduleDepth2 = 0.; + double moduleDepth3 = 0.; + std::vector layerDepths1 = std::vector(); + std::vector layerDepths2 = std::vector(); + std::vector layerDepths3 = std::vector(); + + // get all 'layer' children of the 'layers' tag + std::vector Layers; + for (xml_coll_t xCompColl(aXmlElement.child(_Unicode(layers)), _Unicode(layer)); xCompColl; + ++xCompColl) { + Layers.push_back(xCompColl); + } + + for (std::vector::iterator it = Layers.begin(); it != Layers.end(); ++it) { + xml_comp_t layer = *it; + Dimension layerDimension(layer.dimensions()); + numSequencesR1 += layerDimension.nmodules(); + numSequencesR2 += layerDimension.nModules(); + numSequencesR3 += layerDimension.nPads(); + for (int nLayer = 0; nLayer < layerDimension.nmodules(); nLayer++) { + moduleDepth1 += layerDimension.dr(); + layerDepths1.push_back(layerDimension.dr()); + } + for (int nLayer = 0; nLayer < layerDimension.nModules(); nLayer++) { + moduleDepth2 += layerDimension.dr(); + layerDepths2.push_back(layerDimension.dr()); + } + for (int nLayer = 0; nLayer < layerDimension.nPads(); nLayer++) { + moduleDepth3 += layerDimension.dr(); + layerDepths3.push_back(layerDimension.dr()); + } + } + + lLog << MSG::DEBUG << "retrieved number of layers in first Endcap part: " << numSequencesR1 + << " , which end up to a full module depth in rho of " << moduleDepth1 << endmsg; + lLog << MSG::DEBUG << "retrieved number of layers in first Endcap part: " << layerDepths1.size() << endmsg; + lLog << MSG::DEBUG << "retrieved number of layers in second Endcap part: " << numSequencesR2 + << " , which end up to a full module depth in rho of " << moduleDepth2 << endmsg; + lLog << MSG::DEBUG << "retrieved number of layers in second Endcap part: " << layerDepths2.size() << endmsg; + lLog << MSG::DEBUG << "retrieved number of layers in third Endcap part: " << numSequencesR3 + << " , which end up to a full module depth in rho of " << moduleDepth3 << endmsg; + lLog << MSG::DEBUG << "retrieved number of layers in third Endcap part: " << layerDepths3.size() << endmsg; + + lLog << MSG::INFO << "constructing first part EC: with offset " << extBarrelOffset1 << ": "<< numSequencesZ1 + << " rings in Z, " << numSequencesR1 << " layers in Rho, " << numSequencesR1 * numSequencesZ1 + << " tiles" << endmsg; + + lLog << MSG::INFO << "constructing second part EC: with offset " << extBarrelOffset2 << ": " << numSequencesZ2 + << " rings in Z, " << numSequencesR2 << " layers in Rho, " + << layerDepths2.size() * numSequencesZ2 << " tiles" << endmsg; + + lLog << MSG::INFO << "constructing third part EC: with offset " << extBarrelOffset3 << ": " << numSequencesZ3 + << " rings in Z, " << numSequencesR3 << " layers in Rho, " + << layerDepths3.size() * numSequencesZ3 << " tiles" << endmsg; + + lLog << MSG::INFO << "number of channels: " + << (numSequencesR1 * numSequencesZ1) + (numSequencesR2 * numSequencesZ2) + (numSequencesR3 * numSequencesZ3) + << endmsg; + + // Calculate correction along z based on the module size (can only have natural number of modules) + double dzDetector1 = (numSequencesZ1 * dzSequence) / 2 + 2 * dZEndPlate + space; + lLog << MSG::INFO + << "correction of dz (negative = size reduced) first part EC :" << dzDetector1*2 - dimensions.width()*2 + << endmsg; + double dzDetector2 = (numSequencesZ2 * dzSequence) / 2; + lLog << MSG::INFO << "dz second part EC:" << dzDetector2 * 2 + << endmsg; + lLog << MSG::INFO << "width second part EC:" << dimensions.dz() * 2 + << endmsg; + lLog << MSG::INFO << "correction of dz (negative = size reduced) second part EB:" << dzDetector2*2 - dimensions.dz()*2 + << endmsg; + + double dzDetector3 = (numSequencesZ3 * dzSequence) / 2 + 2 * dZEndPlate + space; + lLog << MSG::INFO << "dz third part EC:" << dzDetector2 * 2 + << endmsg; + + // Add structural support made of steel inside of HCal + DetElement facePlate1(aHCal, "FacePlate_" + std::to_string(1 * sign), 0); + dd4hep::Tube facePlateShape1(dimensions.rmin1(), (sensitiveBarrel1Rmin - space), + (dzDetector1 - 2 * dZEndPlate - space)); + Volume facePlateVol1("facePlateVol1", facePlateShape1, aLcdd.material(xFacePlate.materialStr())); + facePlateVol1.setVisAttributes(aLcdd, xFacePlate.visStr()); + dd4hep::Position offsetFace1(0, 0, sign * extBarrelOffset1); + + // Faceplate for 2nd part of extended Barrel + DetElement facePlate2(aHCal, "FacePlate_" + std::to_string(2 * sign), 0); + dd4hep::Tube facePlateShape2(dimensions.rmin2(), (sensitiveBarrel2Rmin - space), + dzDetector2); + Volume facePlateVol2("facePlateVol2", facePlateShape2, aLcdd.material(xFacePlate.materialStr())); + facePlateVol2.setVisAttributes(aLcdd, xFacePlate.visStr()); + dd4hep::Position offsetFace2(0, 0, sign * extBarrelOffset2); + + // Faceplate for 3rd part of extended Barrel + DetElement facePlate3(aHCal, "FacePlate_" + std::to_string(3 * sign), 0); + dd4hep::Tube facePlateShape3(dimensions.rmin(), (sensitiveBarrel3Rmin - space), + (dzDetector3 - 2 * dZEndPlate - space)); + Volume facePlateVol3("facePlateVol3", facePlateShape3, aLcdd.material(xFacePlate.materialStr())); + facePlateVol3.setVisAttributes(aLcdd, xFacePlate.visStr()); + dd4hep::Position offsetFace3(0, 0, sign * extBarrelOffset3); + + PlacedVolume placedFacePlate1 = aEnvelope.placeVolume(facePlateVol1, offsetFace1); + facePlate1.setPlacement(placedFacePlate1); + PlacedVolume placedFacePlate2 = aEnvelope.placeVolume(facePlateVol2, offsetFace2); + facePlate2.setPlacement(placedFacePlate2); + PlacedVolume placedFacePlate3 = aEnvelope.placeVolume(facePlateVol3, offsetFace3); + facePlate3.setPlacement(placedFacePlate3); + + // Add structural support made of steel at both ends of extHCal + dd4hep::Tube endPlateShape1(dimensions.rmin1(), (dimensions.rmax1() - dSteelSupport), dZEndPlate); + Volume endPlateVol1("endPlateVol1", endPlateShape1, aLcdd.material(xEndPlate.materialStr())); + endPlateVol1.setVisAttributes(aLcdd, xEndPlate.visStr()); + dd4hep::Tube endPlateShape3(dimensions.rmin(), (dimensions.rmax() - dSteelSupport), dZEndPlate); + Volume endPlateVol3("endPlateVol3", endPlateShape3, aLcdd.material(xEndPlate.materialStr())); + endPlateVol3.setVisAttributes(aLcdd, xEndPlate.visStr()); + + // Endplates placed for the extended Barrels in front and in the back to the central Barrel + DetElement endPlatePos(aHCal, "endPlate_" + std::to_string(1 * sign), 0); + dd4hep::Position posOffset(0, 0, sign * (extBarrelOffset3 + dzDetector3 - dZEndPlate)); + PlacedVolume placedEndPlatePos = aEnvelope.placeVolume(endPlateVol3, posOffset); + endPlatePos.setPlacement(placedEndPlatePos); + + DetElement endPlateNeg(aHCal, "endPlate_" + std::to_string(2 * sign), 0); + dd4hep::Position negOffset(0, 0, sign * (extBarrelOffset1 - dzDetector1 + dZEndPlate)); + PlacedVolume placedEndPlateNeg = aEnvelope.placeVolume(endPlateVol1, negOffset); + endPlateNeg.setPlacement(placedEndPlateNeg); + + std::vector layers; + layers.reserve(layerDepths1.size()+layerDepths2.size()+layerDepths3.size()); + std::vector > seqInLayers; + seqInLayers.reserve(layerDepths1.size()+layerDepths2.size()+layerDepths3.size()); + std::vector tilesPerLayer; + tilesPerLayer.reserve(layerDepths1.size()+layerDepths2.size()+layerDepths3.size()); + + // loop over R ("layers") + double layerR = 0.; + for (unsigned int idxLayer = 0; idxLayer < layerDepths1.size(); ++idxLayer) { + // in Module rmin = 0 for first wedge, changed radius to the full radius starting at (0,0,0) + double rminLayer = sensitiveBarrel1Rmin + layerR; + double rmaxLayer = sensitiveBarrel1Rmin + layerR + layerDepths1.at(idxLayer); + layerR += layerDepths1.at(idxLayer); + + //alternate: even layers consist of tile sequence b, odd layer of tile sequence a + unsigned int sequenceIdx = (idxLayer+1) % 2; + + dd4hep::Tube tileSequenceShape(rminLayer, rmaxLayer, 0.5*dzSequence); + Volume tileSequenceVolume("HCalECTileSequenceVol1", tileSequenceShape, aLcdd.air()); + + lLog << MSG::DEBUG << "layer radii: " << rminLayer << " - " << rmaxLayer << " [cm]" << endmsg; + + + dd4hep::Tube layerShape(rminLayer, rmaxLayer, dzDetector1 ); + Volume layerVolume("HCalECLayerVol1", layerShape, aLcdd.air()); + + + layerVolume.setVisAttributes(aLcdd.invisible()); + unsigned int idxSubMod = 0; + unsigned int idxActMod = 0; + + dd4hep::Position moduleOffset1 (0,0,sign * extBarrelOffset1); + + dd4hep::PlacedVolume placedLayerVolume = aEnvelope.placeVolume(layerVolume, moduleOffset1); + unsigned int type1 = 0; + if (sign<0) { + type1 = 3; + } + placedLayerVolume.addPhysVolID("type", type1); // First module type=0,3 in front of second +/- + placedLayerVolume.addPhysVolID("layer", idxLayer); + layers.push_back(placedLayerVolume); + + double tileZOffset = - 0.5* dzSequence; + + // first Z loop (tiles that make up a sequence) + for (xml_coll_t xCompColl(sequences[sequenceIdx], _Unicode(module_component)); xCompColl; + ++xCompColl, ++idxSubMod) { + xml_comp_t xComp = xCompColl; + dd4hep::Tube tileShape(rminLayer, rmaxLayer, 0.5 * xComp.thickness()); + + Volume tileVol("HCalECTileVol_"+ xComp.materialStr() + , tileShape, + aLcdd.material(xComp.materialStr())); + tileVol.setVisAttributes(aLcdd, xComp.visStr()); + + dd4hep::Position tileOffset(0, 0, tileZOffset + 0.5 * xComp.thickness() ); + dd4hep::PlacedVolume placedTileVol = tileSequenceVolume.placeVolume(tileVol, tileOffset); + + if (xComp.isSensitive()) { + tileVol.setSensitiveDetector(sensDet); + tilesPerLayer.push_back(placedTileVol); + idxActMod++; + } + tileZOffset += xComp.thickness(); + } + + // second z loop (place sequences in layer) + std::vector seqs; + double zOffset = - dzDetector1 + 0.5 * dzSequence; //2*dZEndPlate + space + 0.5 * dzSequence; + + for (uint numSeq=0; numSeq < numSequencesZ1; numSeq++){ + dd4hep::Position tileSequencePosition(0, 0, zOffset); + dd4hep::PlacedVolume placedTileSequenceVolume = layerVolume.placeVolume(tileSequenceVolume, tileSequencePosition); + placedTileSequenceVolume.addPhysVolID("row", numSeq); + seqs.push_back(placedTileSequenceVolume); + zOffset += dzSequence; + } + seqInLayers.push_back(seqs); + } + + + layerR = 0.; + // Placement of subWedges in Wedge, 2nd part + for (unsigned int idxLayer = 0; idxLayer < layerDepths2.size(); ++idxLayer) { + // in Module rmin = 0 for first wedge, changed radius to the full radius starting at (0,0,0) + double rminLayer = sensitiveBarrel2Rmin + layerR; + double rmaxLayer = sensitiveBarrel2Rmin + layerR + layerDepths2.at(idxLayer); + layerR += layerDepths2.at(idxLayer); + + //alternate: even layers consist of tile sequence b, odd layer of tile sequence a + unsigned int sequenceIdx = (idxLayer+1) % 2; + + dd4hep::Tube tileSequenceShape(rminLayer, rmaxLayer, 0.5*dzSequence); + Volume tileSequenceVolume("HCalECTileSequenceVol2", tileSequenceShape, aLcdd.air()); + + lLog << MSG::DEBUG << "layer radii: " << rminLayer << " - " << rmaxLayer << " [cm]" << endmsg; + + + dd4hep::Tube layerShape(rminLayer, rmaxLayer, dzDetector2); + Volume layerVolume("HCalECLayerVol2", layerShape, aLcdd.air()); + + layerVolume.setVisAttributes(aLcdd.invisible()); + unsigned int idxSubMod = 0; + unsigned int idxActMod = 0; + + double tileZOffset = - 0.5* dzSequence; + + // first Z loop (tiles that make up a sequence) + for (xml_coll_t xCompColl(sequences[sequenceIdx], _Unicode(module_component)); xCompColl; + ++xCompColl, ++idxSubMod) { + xml_comp_t xComp = xCompColl; + dd4hep::Tube tileShape(rminLayer, rmaxLayer, 0.5 * xComp.thickness()); + + Volume tileVol("HCalECTileVol_" + , tileShape, + aLcdd.material(xComp.materialStr())); + tileVol.setVisAttributes(aLcdd, xComp.visStr()); + + dd4hep::Position tileOffset(0, 0, tileZOffset + 0.5 * xComp.thickness() ); + dd4hep::PlacedVolume placedTileVol = tileSequenceVolume.placeVolume(tileVol, tileOffset); + + if (xComp.isSensitive()) { + tileVol.setSensitiveDetector(sensDet); + tilesPerLayer.push_back(placedTileVol); + idxActMod++; + } + tileZOffset += xComp.thickness(); + } + + // second z loop (place sequences in layer) + std::vector seqs; + double zOffset = - dzDetector2 + 0.5 * dzSequence; //(dzSequence * 0.5); + + for (uint numSeq=0; numSeq < numSequencesZ2; numSeq++){ + dd4hep::Position tileSequencePosition(0, 0, zOffset); + dd4hep::PlacedVolume placedTileSequenceVolume = layerVolume.placeVolume(tileSequenceVolume, tileSequencePosition); + placedTileSequenceVolume.addPhysVolID("row", numSeq); + seqs.push_back(placedTileSequenceVolume); + zOffset += dzSequence; + } + seqInLayers.push_back(seqs); + + dd4hep::Position moduleOffset2 (0, 0, sign * extBarrelOffset2); + dd4hep::PlacedVolume placedLayerVolume = aEnvelope.placeVolume(layerVolume, moduleOffset2); + unsigned int type2 = 1; + if (sign<0) { + type2 = 4; + } + placedLayerVolume.addPhysVolID("type", type2); // Second module type=1,4 behind the first +/- + placedLayerVolume.addPhysVolID("layer", layerDepths1.size() + idxLayer); + layers.push_back(placedLayerVolume); + } + + layerR = 0.; + // Placement of subWedges in Wedge, 3th part + for (unsigned int idxLayer = 0; idxLayer < layerDepths3.size(); ++idxLayer) { + // in Module rmin = 0 for first wedge, changed radius to the full radius starting at (0,0,0) + double rminLayer = sensitiveBarrel3Rmin + layerR; + double rmaxLayer = sensitiveBarrel3Rmin + layerR + layerDepths3.at(idxLayer); + layerR += layerDepths3.at(idxLayer); + + //alternate: even layers consist of tile sequence b, odd layer of tile sequence a + unsigned int sequenceIdx = (idxLayer+1) % 2; + + dd4hep::Tube tileSequenceShape(rminLayer, rmaxLayer, 0.5*dzSequence); + Volume tileSequenceVolume("HCalECTileSequenceVol3", tileSequenceShape, aLcdd.air()); + + lLog << MSG::DEBUG << "layer radii: " << rminLayer << " - " << rmaxLayer << " [cm]" << endmsg; + + dd4hep::Tube layerShape(rminLayer, rmaxLayer, dzDetector3); + Volume layerVolume("HCalECLayerVol3", layerShape, aLcdd.air()); + + layerVolume.setVisAttributes(aLcdd.invisible()); + unsigned int idxSubMod = 0; + unsigned int idxActMod = 0; + + double tileZOffset = - 0.5* dzSequence; + + // first Z loop (tiles that make up a sequence) + for (xml_coll_t xCompColl(sequences[sequenceIdx], _Unicode(module_component)); xCompColl; + ++xCompColl, ++idxSubMod) { + xml_comp_t xComp = xCompColl; + dd4hep::Tube tileShape(rminLayer, rmaxLayer, 0.5 * xComp.thickness()); + + Volume tileVol("HCalECTileVol_" + , tileShape, + aLcdd.material(xComp.materialStr())); + tileVol.setVisAttributes(aLcdd, xComp.visStr()); + + dd4hep::Position tileOffset(0, 0, tileZOffset + 0.5 * xComp.thickness() ); + dd4hep::PlacedVolume placedTileVol = tileSequenceVolume.placeVolume(tileVol, tileOffset); + + if (xComp.isSensitive()) { + tileVol.setSensitiveDetector(sensDet); + tilesPerLayer.push_back(placedTileVol); + idxActMod++; + } + tileZOffset += xComp.thickness(); + } + + // second z loop (place sequences in layer) + std::vector seqs; + double zOffset = - dzDetector3 + 0.5 * dzSequence; //2*dZEndPlate + space + (dzSequence * 0.5); + + for (uint numSeq=0; numSeq < numSequencesZ3; numSeq++){ + dd4hep::Position tileSequencePosition(0, 0, zOffset); + dd4hep::PlacedVolume placedTileSequenceVolume = layerVolume.placeVolume(tileSequenceVolume, tileSequencePosition); + placedTileSequenceVolume.addPhysVolID("row", numSeq); + seqs.push_back(placedTileSequenceVolume); + zOffset += dzSequence; + } + seqInLayers.push_back(seqs); + + dd4hep::Position moduleOffset3 (0, 0, sign * extBarrelOffset3); + dd4hep::PlacedVolume placedLayerVolume = aEnvelope.placeVolume(layerVolume, moduleOffset3); + unsigned int type3 = 2; + if (sign<0) { + type3 = 5; + } + placedLayerVolume.addPhysVolID("type", type3); // Second module type=2,5 behind the first +/- + placedLayerVolume.addPhysVolID("layer", layerDepths1.size() + layerDepths2.size() + idxLayer); + layers.push_back(placedLayerVolume); + } + + // Placement of DetElements + lLog << MSG::DEBUG << "Layers in r : " << layers.size() << std::endl; + lLog << MSG::DEBUG << "Tiles in layers :" << tilesPerLayer.size() << std::endl; + + for (uint iLayer = 0; iLayer < (layerDepths1.size()+layerDepths2.size()+layerDepths3.size()); iLayer++) { + DetElement layerDet(aHCal, dd4hep::xml::_toString(sign*(iLayer+1), "layer%d"), sign*(iLayer+1)); + layerDet.setPlacement(layers[iLayer]); + + for (uint iSeq = 0; iSeq < seqInLayers[iLayer].size(); iSeq++){ + DetElement seqDet(layerDet, dd4hep::xml::_toString(iSeq, "seq%d"), sign*(iSeq+1)); + seqDet.setPlacement(seqInLayers[iLayer][iSeq]); + + DetElement tileDet(seqDet, dd4hep::xml::_toString(iSeq, "tile%d"), sign*(iSeq+1)); + tileDet.setPlacement(tilesPerLayer[iLayer]); + } + } + +} + +static dd4hep::Ref_t createHCalEC(dd4hep::Detector& lcdd, xml_h xmlElement, dd4hep::SensitiveDetector sensDet) { + + + xml_det_t xmlDet = xmlElement; + std::string detName = xmlDet.nameStr(); + + // Make DetElement + dd4hep::DetElement hCalEC(detName, xmlDet.id()); + + // Make volume that envelopes the whole barrel; set material to air + Dimension dimensions(xmlDet.dimensions()); + + dd4hep::Tube envelope(dimensions.rmin(), dimensions.rmax1(), (dimensions.v_offset() + dimensions.z_length())); + dd4hep::Tube negative1(dimensions.rmin(), dimensions.rmax1(), (dimensions.offset() - dimensions.width())); + dd4hep::Tube negative2(dimensions.rmin(), dimensions.rmin1(), (dimensions.z_offset() - dimensions.dz())); + dd4hep::Tube negative3(dimensions.rmin(), dimensions.rmin2(), (dimensions.v_offset() - dimensions.z_length())); + dd4hep::SubtractionSolid envelopeShapeTmp1(envelope, negative1); + dd4hep::SubtractionSolid envelopeShapeTmp2(envelopeShapeTmp1, negative2); + dd4hep::SubtractionSolid envelopeShape(envelopeShapeTmp2, negative3); + + Volume envelopeVolume(detName + "_volume", envelopeShape, lcdd.air()); + envelopeVolume.setVisAttributes(lcdd, dimensions.visStr()); + + lLog << MSG::DEBUG << "Placing detector on the positive side: (cm) " << (dimensions.offset() + dimensions.dz()) + << endmsg; + buildEC(lcdd, sensDet, envelopeVolume, hCalEC, xmlElement, 1); + lLog << MSG::DEBUG << "Placing detector on the negative side: (cm) " << -(dimensions.offset() + dimensions.dz()) + << endmsg; + buildEC(lcdd, sensDet, envelopeVolume, hCalEC, xmlElement, -1); + + // Place envelope volume + Volume motherVol = lcdd.pickMotherVolume(hCalEC); + + PlacedVolume placedHCal = motherVol.placeVolume(envelopeVolume); + placedHCal.addPhysVolID("system", xmlDet.id()); + hCalEC.setPlacement(placedHCal); + + return hCalEC; +} +} // namespace hcal + +DECLARE_DETELEMENT(CaloThreePartsEndcap, det::createHCalEC) diff --git a/Detector/DetFCCeeIDEA-LAr/compact/FCCee_DectMaster.xml b/Detector/DetFCCeeIDEA-LAr/compact/FCCee_DectMaster.xml index 5427069b..51cd47a2 100644 --- a/Detector/DetFCCeeIDEA-LAr/compact/FCCee_DectMaster.xml +++ b/Detector/DetFCCeeIDEA-LAr/compact/FCCee_DectMaster.xml @@ -39,6 +39,7 @@ + From 13b114e33456520769fd5d946520f5280f746295 Mon Sep 17 00:00:00 2001 From: Jana Date: Thu, 2 Feb 2023 10:35:09 +0100 Subject: [PATCH 2/9] CMakeFile fixed --- Detector/DetFCCeeHCalTile/CMakeLists.txt | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Detector/DetFCCeeHCalTile/CMakeLists.txt b/Detector/DetFCCeeHCalTile/CMakeLists.txt index 44dd2706..e8721e48 100644 --- a/Detector/DetFCCeeHCalTile/CMakeLists.txt +++ b/Detector/DetFCCeeHCalTile/CMakeLists.txt @@ -4,17 +4,8 @@ install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/compact DESTINATION ${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}/Detector/DetFCCeeHCalTile) - file(GLOB sources src/*.cpp) add_dd4hep_plugin(DetFCCeeHCalTile SHARED ${sources}) target_link_libraries(DetFCCeeHCalTile DD4hep::DDCore) - set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) - - -#add_test(NAME ConstructDetFCCeeHCalTile -# COMMAND root -q -b ".github/scripts/load_detector.C(\"Detector/DetFCCeeHCalTile/compact/standalone.xml\")" -# WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} -# ) -#k4_set_test_env(ConstructDetFCCeeHCalTile) From 21b57745a7efc3d732563f3a363076892c704476 Mon Sep 17 00:00:00 2001 From: Jana Date: Thu, 13 Apr 2023 14:42:50 +0200 Subject: [PATCH 3/9] ECal inclined src for FCCee --- Detector/DetFCCeeECalInclined/CMakeLists.txt | 6 + .../compact/FCCee_ECalBarrel.xml | 2 +- .../src/ECalBarrelInclinedFCCee_geo.cpp | 572 ++++++++++++++++++ 3 files changed, 579 insertions(+), 1 deletion(-) create mode 100644 Detector/DetFCCeeECalInclined/src/ECalBarrelInclinedFCCee_geo.cpp diff --git a/Detector/DetFCCeeECalInclined/CMakeLists.txt b/Detector/DetFCCeeECalInclined/CMakeLists.txt index 30282bcd..7282cc39 100644 --- a/Detector/DetFCCeeECalInclined/CMakeLists.txt +++ b/Detector/DetFCCeeECalInclined/CMakeLists.txt @@ -3,3 +3,9 @@ ################################################################################ install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/compact DESTINATION ${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}/Detector/DetFCCeeECalInclined) + +file(GLOB sources src/*.cpp) +add_dd4hep_plugin(DetFCCeeECalInclined SHARED ${sources}) +target_link_libraries(DetFCCeeECalInclined DD4hep::DDCore) + +set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) diff --git a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml index 20c9d365..13d4ed57 100644 --- a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml +++ b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml @@ -95,7 +95,7 @@ - + diff --git a/Detector/DetFCCeeECalInclined/src/ECalBarrelInclinedFCCee_geo.cpp b/Detector/DetFCCeeECalInclined/src/ECalBarrelInclinedFCCee_geo.cpp new file mode 100644 index 00000000..24a4533a --- /dev/null +++ b/Detector/DetFCCeeECalInclined/src/ECalBarrelInclinedFCCee_geo.cpp @@ -0,0 +1,572 @@ +#include "DD4hep/DetFactoryHelper.h" +#include "DD4hep/Handle.h" +#include "XML/Utilities.h" + +#include + +// todo: remove gaudi logging and properly capture output +#define endmsg std::endl +#define lLog std::cout +namespace MSG { +const std::string ERROR = " Error: "; +const std::string DEBUG = " Debug: "; +const std::string INFO = " Info: "; +} + +namespace det { +static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLcdd, + dd4hep::xml::Handle_t aXmlElement, + dd4hep::SensitiveDetector aSensDet) { + + dd4hep::xml::DetElement xmlDetElem = aXmlElement; + std::string nameDet = xmlDetElem.nameStr(); + dd4hep::xml::Dimension dim(xmlDetElem.dimensions()); + dd4hep::DetElement caloDetElem(nameDet, xmlDetElem.id()); + + // Create air envelope for the whole barrel + dd4hep::Volume envelopeVol(nameDet + "_vol", dd4hep::Tube(dim.rmin(), dim.rmax(), dim.dz()), + aLcdd.material("Air")); + envelopeVol.setVisAttributes(aLcdd, dim.visStr()); + + // Retrieve cryostat data + dd4hep::xml::DetElement cryostat = aXmlElement.child(_Unicode(cryostat)); + dd4hep::xml::Dimension cryoDim(cryostat.dimensions()); + double cryoThicknessFront = cryoDim.rmin2() - cryoDim.rmin1(); + dd4hep::xml::DetElement cryoFront = cryostat.child(_Unicode(front)); + dd4hep::xml::DetElement cryoBack = cryostat.child(_Unicode(back)); + dd4hep::xml::DetElement cryoSide = cryostat.child(_Unicode(side)); + bool cryoFrontSensitive = cryoFront.isSensitive(); + bool cryoBackSensitive = cryoBack.isSensitive(); + bool cryoSideSensitive = cryoSide.isSensitive(); + + // Retrieve active and passive material data + dd4hep::xml::DetElement calo = aXmlElement.child(_Unicode(calorimeter)); + dd4hep::xml::Dimension caloDim(calo.dimensions()); + dd4hep::xml::DetElement active = calo.child(_Unicode(active)); + std::string activeMaterial = active.materialStr(); + double activeThickness = active.thickness(); + + dd4hep::xml::DetElement overlap = active.child(_Unicode(overlap)); + double activePassiveOverlap = overlap.offset(); + if (activePassiveOverlap < 0 || activePassiveOverlap > 0.5) { + // todo: ServiceHandle incidentSvc("IncidentSvc", "ECalConstruction"); + lLog << MSG::ERROR << "Overlap between active and passive cannot be more than half of passive plane!" << endmsg; + //todo: incidentSvc->fireIncident(Incident("ECalConstruction", "GeometryFailure")); + } + dd4hep::xml::DetElement layers = calo.child(_Unicode(layers)); + uint numLayers = 0; + std::vector layerHeight; + double layersTotalHeight = 0; + for (dd4hep::xml::Collection_t layer_coll(layers, _Unicode(layer)); layer_coll; ++layer_coll) { + dd4hep::xml::Component layer = layer_coll; + numLayers += layer.repeat(); + for (int iLay = 0; iLay < layer.repeat(); iLay++) { + layerHeight.push_back(layer.thickness()); + } + layersTotalHeight += layer.repeat() * layer.thickness(); + } + lLog << MSG::DEBUG << "**** FCCee ECAL Inclined ****" << endmsg; + lLog << MSG::DEBUG << "Number of layers: " << numLayers << " total thickness " << layersTotalHeight << endmsg; + + dd4hep::xml::DetElement readout = calo.child(_Unicode(readout)); + std::string readoutMaterial = readout.materialStr(); + double readoutThickness = readout.thickness(); + + dd4hep::xml::DetElement passive = calo.child(_Unicode(passive)); + dd4hep::xml::DetElement passiveInner = passive.child(_Unicode(inner)); + dd4hep::xml::DetElement passiveInnerMax = passive.child(_Unicode(innerMax)); + dd4hep::xml::DetElement passiveOuter = passive.child(_Unicode(outer)); + dd4hep::xml::DetElement passiveGlue = passive.child(_Unicode(glue)); + std::string passiveInnerMaterial = passiveInner.materialStr(); + std::string passiveOuterMaterial = passiveOuter.materialStr(); + std::string passiveGlueMaterial = passiveGlue.materialStr(); + double passiveInnerThicknessMin = passiveInner.thickness(); + double passiveInnerThicknessMax = passiveInnerMax.thickness(); + double passiveOuterThickness = passiveOuter.thickness(); + double passiveGlueThickness = passiveGlue.thickness(); + double passiveThickness = passiveInnerThicknessMin + passiveOuterThickness + passiveGlueThickness; + double angle = passive.rotation().angle(); + + double bathRmin = caloDim.rmin(); // - margin for inclination + double bathRmax = caloDim.rmax(); // + margin for inclination + dd4hep::Tube bathOuterShape(bathRmin, bathRmax, caloDim.dz()); // make it 4 volumes + 5th for detector envelope + dd4hep::Tube bathAndServicesOuterShape(cryoDim.rmin2(), cryoDim.rmax1(), caloDim.dz()); // make it 4 volumes + 5th for detector envelope + if (cryoThicknessFront > 0) { + // 1. Create cryostat + dd4hep::Tube cryoFrontShape(cryoDim.rmin1(), cryoDim.rmin2(), cryoDim.dz()); + dd4hep::Tube cryoBackShape(cryoDim.rmax1(), cryoDim.rmax2(), cryoDim.dz()); + dd4hep::Tube cryoSideOuterShape(cryoDim.rmin2(), cryoDim.rmax1(), cryoDim.dz()); + dd4hep::SubtractionSolid cryoSideShape(cryoSideOuterShape, bathAndServicesOuterShape); + lLog << MSG::INFO << "ECAL cryostat: front: rmin (cm) = " << cryoDim.rmin1() << " rmax (cm) = " << cryoDim.rmin2() << " dz (cm) = " << cryoDim.dz() << endmsg; + lLog << MSG::INFO << "ECAL cryostat: back: rmin (cm) = " << cryoDim.rmax1() << " rmax (cm) = " << cryoDim.rmax2() << " dz (cm) = " << cryoDim.dz() << endmsg; + lLog << MSG::INFO << "ECAL cryostat: side: rmin (cm) = " << cryoDim.rmin2() << " rmax (cm) = " << cryoDim.rmax1() << " dz (cm) = " << cryoDim.dz() - caloDim.dz() << endmsg; + dd4hep::Volume cryoFrontVol(cryostat.nameStr()+"_front", cryoFrontShape, aLcdd.material(cryostat.materialStr())); + dd4hep::Volume cryoBackVol(cryostat.nameStr()+"_back", cryoBackShape, aLcdd.material(cryostat.materialStr())); + dd4hep::Volume cryoSideVol(cryostat.nameStr()+"_side", cryoSideShape, aLcdd.material(cryostat.materialStr())); + dd4hep::PlacedVolume cryoFrontPhysVol = envelopeVol.placeVolume(cryoFrontVol); + dd4hep::PlacedVolume cryoBackPhysVol = envelopeVol.placeVolume(cryoBackVol); + dd4hep::PlacedVolume cryoSidePhysVol = envelopeVol.placeVolume(cryoSideVol); + if (cryoFrontSensitive) { + cryoFrontVol.setSensitiveDetector(aSensDet); + cryoFrontPhysVol.addPhysVolID("cryo", 1); + cryoFrontPhysVol.addPhysVolID("type", 1); + lLog << MSG::INFO << "Cryostat front volume set as sensitive" << endmsg; + } + if (cryoBackSensitive) { + cryoBackVol.setSensitiveDetector(aSensDet); + cryoBackPhysVol.addPhysVolID("cryo", 1); + cryoBackPhysVol.addPhysVolID("type", 2); + lLog << MSG::INFO << "Cryostat back volume set as sensitive" << endmsg; + } + if (cryoSideSensitive) { + cryoSideVol.setSensitiveDetector(aSensDet); + cryoSidePhysVol.addPhysVolID("cryo", 1); + cryoSidePhysVol.addPhysVolID("type", 3); + lLog << MSG::INFO << "Cryostat front volume set as sensitive" << endmsg; + } + dd4hep::DetElement cryoFrontDetElem(caloDetElem, "cryo_front", 0); + cryoFrontDetElem.setPlacement(cryoFrontPhysVol); + dd4hep::DetElement cryoBackDetElem(caloDetElem, "cryo_back", 0); + cryoBackDetElem.setPlacement(cryoBackPhysVol); + dd4hep::DetElement cryoSideDetElem(caloDetElem, "cryo_side", 0); + cryoSideDetElem.setPlacement(cryoSidePhysVol); + // 1.2. Create place-holder for services + dd4hep::Tube servicesFrontShape(cryoDim.rmin2(), bathRmin, caloDim.dz()); + dd4hep::Tube servicesBackShape(bathRmax, cryoDim.rmax1(), caloDim.dz()); + lLog << MSG::INFO << "ECAL services: front: rmin (cm) = " << cryoDim.rmin2() << " rmax (cm) = " << bathRmin << " dz (cm) = " << caloDim.dz() << endmsg; + lLog << MSG::INFO << "ECAL services: back: rmin (cm) = " << bathRmax << " rmax (cm) = " << cryoDim.rmax1() << " dz (cm) = " << caloDim.dz() << endmsg; + dd4hep::Volume servicesFrontVol("services_front", servicesFrontShape, aLcdd.material(activeMaterial)); + dd4hep::Volume servicesBackVol("services_back", servicesBackShape, aLcdd.material(activeMaterial)); + dd4hep::PlacedVolume servicesFrontPhysVol = envelopeVol.placeVolume(servicesFrontVol); + dd4hep::PlacedVolume servicesBackPhysVol = envelopeVol.placeVolume(servicesBackVol); + if (cryoFrontSensitive) { + servicesFrontVol.setSensitiveDetector(aSensDet); + servicesFrontPhysVol.addPhysVolID("cryo", 1); + servicesFrontPhysVol.addPhysVolID("type", 4); + lLog << MSG::INFO << "Services front volume set as sensitive" << endmsg; + } + if (cryoBackSensitive) { + servicesBackVol.setSensitiveDetector(aSensDet); + servicesBackPhysVol.addPhysVolID("cryo", 1); + servicesBackPhysVol.addPhysVolID("type", 5); + lLog << MSG::INFO << "Services back volume set as sensitive" << endmsg; + } + dd4hep::DetElement servicesFrontDetElem(caloDetElem, "services_front", 0); + servicesFrontDetElem.setPlacement(servicesFrontPhysVol); + dd4hep::DetElement servicesBackDetElem(caloDetElem, "services_back", 0); + servicesBackDetElem.setPlacement(servicesBackPhysVol); + } + // 2. Create bath that is inside the cryostat and surrounds the detector + // Bath is filled with active material -> but not sensitive + dd4hep::Volume bathVol(activeMaterial + "_bath", bathOuterShape, aLcdd.material(activeMaterial)); + lLog << MSG::INFO << "ECAL bath: material = " << activeMaterial << " rmin (cm) = " << bathRmin + << " rmax (cm) = " << bathRmax << " thickness in front of ECal (cm) = " << caloDim.rmin() - cryoDim.rmin2() + << " thickness behind ECal (cm) = " << cryoDim.rmax1() - caloDim.rmax() << endmsg; + + // 3. Create the calorimeter by placing the passive material, trapezoid active layers, readout and again trapezoid + // active layers in the bath. + // sensitive detector for the layers + dd4hep::SensitiveDetector sd = aSensDet; + dd4hep::xml::Dimension sdType = xmlDetElem.child(_U(sensitive)); + sd.setType(sdType.typeStr()); + lLog << MSG::INFO << "ECAL calorimeter volume rmin (cm) = " << caloDim.rmin() << " rmax (cm) = " << caloDim.rmax() + << endmsg; + + // 3.a. Create the passive planes, readout in between of 2 passive planes and the remaining space fill with active + // material + ////////////////////////////// + // PASSIVE PLANES + ////////////////////////////// + lLog << MSG::INFO << "passive inner material = " << passiveInnerMaterial << "\n" + << " and outer material = " << passiveOuterMaterial << "\n" + << " thickness of inner part at inner radius (cm) = " << passiveInnerThicknessMin << "\n" + << " thickness of inner part at outer radius (cm) = " << passiveInnerThicknessMax << "\n" + << " thickness of outer part (cm) = " << passiveOuterThickness << "\n" + << " thickness of total (cm) = " << passiveThickness << "\n" + << " rotation angle = " << angle << endmsg; + uint numPlanes = + round(M_PI / asin((passiveThickness + activeThickness + readoutThickness) / (2. * caloDim.rmin() * cos(angle)))); + double dPhi = 2. * M_PI / numPlanes; + lLog << MSG::INFO << "number of passive plates = " << numPlanes << " azim. angle difference = " << dPhi << endmsg; + lLog << MSG::INFO << " distance at inner radius (cm) = " << 2. * M_PI * caloDim.rmin() / numPlanes << "\n" + << " distance at outer radius (cm) = " << 2. * M_PI * caloDim.rmax() / numPlanes << endmsg; + // Readout is in the middle between two passive planes + double offsetPassivePhi = caloDim.offset() + dPhi / 2.; + double offsetReadoutPhi = caloDim.offset() + 0; + lLog << MSG::INFO << "readout material = " << readoutMaterial << "\n" + << " thickness of readout planes (cm) = " << readoutThickness << "\n number of readout layers = " << numLayers + << endmsg; + double Rmin = caloDim.rmin(); + double Rmax = caloDim.rmax(); + double dR = Rmax - Rmin; + double planeLength = -Rmin * cos(angle) + sqrt(pow(Rmax, 2) - pow(Rmin * sin(angle), 2)); + lLog << MSG::INFO << "thickness of calorimeter (cm) = " << dR << "\n" + << " length of passive or readout planes (cm) = " << planeLength << endmsg; + + + // fill the thickness in the boundary of each layer + std::vector passiveInnerThicknessLayer(numLayers+1); + double runningHeight = 0; + for (uint iLay = 0; iLay < numLayers; iLay++) { + passiveInnerThicknessLayer[iLay] = passiveInnerThicknessMin + (passiveInnerThicknessMax - passiveInnerThicknessMin) * + (runningHeight) / (Rmax - Rmin); + runningHeight += layerHeight[iLay]; + } + passiveInnerThicknessLayer[numLayers] = passiveInnerThicknessMin + (passiveInnerThicknessMax - passiveInnerThicknessMin) * + (runningHeight) / (Rmax - Rmin); + + double passiveAngle = atan2((passiveInnerThicknessMax - passiveInnerThicknessMin) / 2., planeLength); + double cosPassiveAngle = cos(passiveAngle); + double rotatedOuterThickness = passiveOuterThickness / cosPassiveAngle; + double rotatedGlueThickness = passiveGlueThickness / cosPassiveAngle; + + // rescale layer thicknesses + double scaleLayerThickness = planeLength / layersTotalHeight; + layersTotalHeight = 0; + for (uint iLay = 0; iLay < numLayers; iLay++) { + layerHeight[iLay] *= scaleLayerThickness; + + layersTotalHeight += layerHeight[iLay]; + lLog << MSG::DEBUG << "Thickness of layer " << iLay << " : " << layerHeight[iLay] << endmsg; + } + double layerFirstOffset = -planeLength / 2. + layerHeight[0] / 2.; + + //dd4hep::Box passiveShape(passiveThickness / 2., caloDim.dz(), planeLength / 2.); + dd4hep::Trd1 passiveShape(passiveInnerThicknessMin / 2. + rotatedOuterThickness / 2. + rotatedGlueThickness / 2., + passiveInnerThicknessMax / 2. + rotatedOuterThickness / 2. + rotatedGlueThickness / 2., + caloDim.dz(), planeLength / 2.); + // inner layer is not in the first calo layer (to sample more uniformly in the layer where upstream correction is + // applied) + //dd4hep::Box passiveInnerShape(passiveInnerThickness / 2., caloDim.dz(), planeLength / 2. - layerHeight[0] / 2.); + dd4hep::Trd1 passiveInnerShape(passiveInnerThicknessLayer[1] / 2., passiveInnerThicknessMax / 2., caloDim.dz(), planeLength / 2. - layerHeight[0] / 2.); + //dd4hep::Box passiveInnerShapeFirstLayer(passiveInnerThickness / 2., caloDim.dz(), layerHeight[0] / 2.); + dd4hep::Trd1 passiveInnerShapeFirstLayer(passiveInnerThicknessMin / 2., passiveInnerThicknessLayer[1] / 2., caloDim.dz(), layerHeight[0] / 2.); + dd4hep::Box passiveOuterShape(passiveOuterThickness / 4., caloDim.dz(), planeLength / 2. / cosPassiveAngle); + dd4hep::Box passiveGlueShape(passiveGlueThickness / 4., caloDim.dz(), planeLength / 2. / cosPassiveAngle); + // passive volume consists of inner part and two outer, joind by glue + dd4hep::Volume passiveVol("passive", passiveShape, aLcdd.material("Air")); + dd4hep::Volume passiveInnerVol(passiveInnerMaterial + "_passive", passiveInnerShape, + aLcdd.material(passiveInnerMaterial)); + dd4hep::Volume passiveInnerVolFirstLayer(activeMaterial + "_passive", passiveInnerShapeFirstLayer, + aLcdd.material(activeMaterial)); + dd4hep::Volume passiveOuterVol(passiveOuterMaterial + "_passive", passiveOuterShape, + aLcdd.material(passiveOuterMaterial)); + dd4hep::Volume passiveGlueVol(passiveGlueMaterial + "_passive", passiveGlueShape, + aLcdd.material(passiveGlueMaterial)); + + if (passiveInner.isSensitive()) { + lLog << MSG::DEBUG << "Passive inner volume set as sensitive" << endmsg; + // inner part starts at second layer + double layerOffset = layerFirstOffset + layerHeight[1] / 2.; + for (uint iLayer = 1; iLayer < numLayers; iLayer++) { + //dd4hep::Box layerPassiveInnerShape(passiveInnerThickness / 2., caloDim.dz(), layerHeight[iLayer] / 2.); + dd4hep::Trd1 layerPassiveInnerShape(passiveInnerThicknessLayer[iLayer] / 2., passiveInnerThicknessLayer[iLayer+1] / 2., caloDim.dz(), layerHeight[iLayer] / 2.); + dd4hep::Volume layerPassiveInnerVol(passiveInnerMaterial, layerPassiveInnerShape, + aLcdd.material(passiveInnerMaterial)); + layerPassiveInnerVol.setSensitiveDetector(aSensDet); + dd4hep::PlacedVolume layerPassiveInnerPhysVol = + passiveInnerVol.placeVolume(layerPassiveInnerVol, dd4hep::Position(0, 0, layerOffset)); + layerPassiveInnerPhysVol.addPhysVolID("layer", iLayer); + dd4hep::DetElement layerPassiveInnerDetElem("layer", iLayer); + layerPassiveInnerDetElem.setPlacement(layerPassiveInnerPhysVol); + if (iLayer != numLayers - 1) { + layerOffset += layerHeight[iLayer] / 2. + layerHeight[iLayer + 1] / 2.; + } + } + } + if (passiveOuter.isSensitive()) { + lLog << MSG::DEBUG << "Passive outer volume set as sensitive" << endmsg; + double layerOffset = layerFirstOffset / cosPassiveAngle; + for (uint iLayer = 0; iLayer < numLayers; iLayer++) { + dd4hep::Box layerPassiveOuterShape(passiveOuterThickness / 4., caloDim.dz(), layerHeight[iLayer] / 2. / cosPassiveAngle); + dd4hep::Volume layerPassiveOuterVol(passiveOuterMaterial, layerPassiveOuterShape, + aLcdd.material(passiveOuterMaterial)); + layerPassiveOuterVol.setSensitiveDetector(aSensDet); + dd4hep::PlacedVolume layerPassiveOuterPhysVol = + passiveOuterVol.placeVolume(layerPassiveOuterVol, dd4hep::Position(0, 0, layerOffset)); + layerPassiveOuterPhysVol.addPhysVolID("layer", iLayer); + dd4hep::DetElement layerPassiveOuterDetElem("layer", iLayer); + layerPassiveOuterDetElem.setPlacement(layerPassiveOuterPhysVol); + if (iLayer != numLayers - 1) { + layerOffset += (layerHeight[iLayer] / 2. + layerHeight[iLayer + 1] / 2.) / cosPassiveAngle; + } + } + } + if (passiveGlue.isSensitive()) { + lLog << MSG::DEBUG << "Passive glue volume set as sensitive" << endmsg; + double layerOffset = layerFirstOffset / cosPassiveAngle; + for (uint iLayer = 0; iLayer < numLayers; iLayer++) { + dd4hep::Box layerPassiveGlueShape(passiveGlueThickness / 4., caloDim.dz(), layerHeight[iLayer] / 2. / cosPassiveAngle); + dd4hep::Volume layerPassiveGlueVol(passiveGlueMaterial, layerPassiveGlueShape, + aLcdd.material(passiveGlueMaterial)); + layerPassiveGlueVol.setSensitiveDetector(aSensDet); + dd4hep::PlacedVolume layerPassiveGluePhysVol = + passiveGlueVol.placeVolume(layerPassiveGlueVol, dd4hep::Position(0, 0, layerOffset)); + layerPassiveGluePhysVol.addPhysVolID("layer", iLayer); + dd4hep::DetElement layerPassiveGlueDetElem("layer", iLayer); + layerPassiveGlueDetElem.setPlacement(layerPassiveGluePhysVol); + if (iLayer != numLayers - 1) { + layerOffset += (layerHeight[iLayer] / 2. + layerHeight[iLayer + 1] / 2.) / cosPassiveAngle; + } + } + } + + dd4hep::PlacedVolume passiveInnerPhysVol = + passiveVol.placeVolume(passiveInnerVol, dd4hep::Position(0, 0, layerHeight[0] / 2.)); + dd4hep::PlacedVolume passiveInnerPhysVolFirstLayer = + passiveVol.placeVolume(passiveInnerVolFirstLayer, dd4hep::Position(0, 0, layerFirstOffset)); + dd4hep::PlacedVolume passiveOuterPhysVolBelow = passiveVol.placeVolume( + passiveOuterVol, + dd4hep::Transform3D(dd4hep::RotationY(-passiveAngle), + dd4hep::Position(-(passiveInnerThicknessMin + passiveInnerThicknessMax) / 4. - + rotatedGlueThickness / 2. - rotatedOuterThickness / 4., 0, 0))); + dd4hep::PlacedVolume passiveOuterPhysVolAbove = passiveVol.placeVolume( + passiveOuterVol, + dd4hep::Transform3D(dd4hep::RotationY(passiveAngle), + dd4hep::Position((passiveInnerThicknessMin + passiveInnerThicknessMax) / 4. + + rotatedGlueThickness / 2. + rotatedOuterThickness / 4., 0, 0))); + dd4hep::PlacedVolume passiveGluePhysVolBelow = passiveVol.placeVolume( + passiveGlueVol, + dd4hep::Transform3D(dd4hep::RotationY(-passiveAngle), + dd4hep::Position(-(passiveInnerThicknessMin + passiveInnerThicknessMax) / 4. - + rotatedGlueThickness / 4., 0, 0))); + dd4hep::PlacedVolume passiveGluePhysVolAbove = passiveVol.placeVolume( + passiveGlueVol, + dd4hep::Transform3D(dd4hep::RotationY(passiveAngle), + dd4hep::Position((passiveInnerThicknessMin + passiveInnerThicknessMax) / 4. + + rotatedGlueThickness / 4., 0, 0))); + passiveInnerPhysVol.addPhysVolID("subtype", 0); + passiveInnerPhysVolFirstLayer.addPhysVolID("subtype", 0); + passiveOuterPhysVolBelow.addPhysVolID("subtype", 1); + passiveOuterPhysVolAbove.addPhysVolID("subtype", 2); + passiveGluePhysVolBelow.addPhysVolID("subtype", 3); + passiveGluePhysVolAbove.addPhysVolID("subtype", 4); + if (passiveInner.isSensitive()) { + passiveInnerVolFirstLayer.setSensitiveDetector(aSensDet); + passiveInnerPhysVolFirstLayer.addPhysVolID("layer", 0); + dd4hep::DetElement passiveInnerDetElemFirstLayer("layer", 0); + passiveInnerDetElemFirstLayer.setPlacement(passiveInnerPhysVolFirstLayer); + } + + ////////////////////////////// + // READOUT PLANES + ////////////////////////////// + dd4hep::Box readoutShape(readoutThickness / 2., caloDim.dz(), planeLength / 2.); + dd4hep::Volume readoutVol(readoutMaterial, readoutShape, aLcdd.material(readoutMaterial)); + if (readout.isSensitive()) { + lLog << MSG::INFO << "Readout volume set as sensitive" << endmsg; + double layerOffset = layerFirstOffset; + for (uint iLayer = 0; iLayer < numLayers; iLayer++) { + dd4hep::Box layerReadoutShape(readoutThickness / 2., caloDim.dz(), layerHeight[iLayer] / 2.); + dd4hep::Volume layerReadoutVol(readoutMaterial, layerReadoutShape, aLcdd.material(readoutMaterial)); + layerReadoutVol.setSensitiveDetector(aSensDet); + dd4hep::PlacedVolume layerReadoutPhysVol = + readoutVol.placeVolume(layerReadoutVol, dd4hep::Position(0, 0, layerOffset)); + layerReadoutPhysVol.addPhysVolID("layer", iLayer); + dd4hep::DetElement layerReadoutDetElem("layer", iLayer); + layerReadoutDetElem.setPlacement(layerReadoutPhysVol); + if (iLayer != numLayers - 1) { + layerOffset += layerHeight[iLayer] / 2. + layerHeight[iLayer + 1] / 2.; + } + } + } + + ////////////////////////////// + // ACTIVE + ////////////////////////////// + // thickness of active layers at inner radius and outer ( = distance between passive plane and readout plane) + // at inner radius: distance projected at plane perpendicular to readout plane + double activeInThickness = Rmin * sin(dPhi / 2.) * cos(angle); + activeInThickness -= passiveThickness * (0.5 - activePassiveOverlap); + // at outer radius: distance projected at plane perpendicular to readout plane + double activeOutThickness = (Rmin + planeLength) * sin(dPhi / 2.) * cos(angle); + // make correction for outer readius caused by inclination angle + // first calculate intersection of readout plane and plane parallel to shifted passive plane + double xIntersect = (Rmin * (tan(angle) - cos(dPhi / 2.) * tan(angle + dPhi / 2.)) - planeLength * sin(dPhi / 2.)) / + (tan(angle) - tan(angle + dPhi / 2.)); + double yIntersect = tan(angle) * xIntersect + Rmin * (sin(dPhi / 2.) - tan(angle)) + planeLength * sin(dPhi / 2.); + // distance from inner radius to intersection + double correction = + planeLength - sqrt(pow(xIntersect - Rmin * cos(dPhi / 2), 2) + pow(yIntersect - Rmin * sin(dPhi / 2), 2)); + // correction to the active thickness + activeOutThickness += 2. * correction * sin(dPhi / 4.); + activeOutThickness -= passiveThickness * (0.5 - activePassiveOverlap); + // print the active layer dimensions + double activeInThicknessAfterSubtraction = + 2. * activeInThickness - readoutThickness - 2. * activePassiveOverlap * passiveThickness; + double activeOutThicknessAfterSubtraction = + 2. * activeOutThickness - readoutThickness - 2. * activePassiveOverlap * + (passiveThickness + passiveInnerThicknessMax - passiveInnerThicknessMin); // correct thickness for trapezoid + lLog << MSG::INFO << "active material = " << activeMaterial + << " active layers thickness at inner radius (cm) = " << activeInThicknessAfterSubtraction + << " thickness at outer radious (cm) = " << activeOutThicknessAfterSubtraction << " making " + << (activeOutThicknessAfterSubtraction - activeInThicknessAfterSubtraction) * 100 / + activeInThicknessAfterSubtraction + << " % increase." << endmsg; + lLog << MSG::INFO + << "active passive initial overlap (before subtraction) (cm) = " << passiveThickness * activePassiveOverlap + << " = " << activePassiveOverlap * 100 << " %" << endmsg; + + // creating shape for rows of layers (active material between two passive planes, with readout in the middle) + // first define area between two passive planes, area can reach up to the symmetry axis of passive plane + dd4hep::Trd1 activeOuterShape(activeInThickness, activeOutThickness, caloDim.dz(), planeLength / 2.); + // subtract readout shape from the middle + dd4hep::SubtractionSolid activeShapeNoReadout(activeOuterShape, readoutShape); + + // make calculation for active plane that is inclined with 0 deg (= offset + angle) + double Cx = Rmin * cos(-angle) + planeLength / 2.; + double Cy = Rmin * sin(-angle); + double Ax = Rmin * cos(-angle + dPhi / 2.) + planeLength / 2. * cos(dPhi / 2.); + double Ay = Rmin * sin(-angle + dPhi / 2.) + planeLength / 2. * sin(dPhi / 2.); + double CAx = fabs(Ax - Cx); + double CAy = fabs(Ay - Cy); + double zprim, xprim; + zprim = CAx; + xprim = CAy; + + double Bx = Rmin * cos(-angle - dPhi / 2.) + planeLength / 2. * cos(-dPhi / 2.); + double By = Rmin * sin(-angle - dPhi / 2.) + planeLength / 2. * sin(-dPhi / 2.); + double CBx = fabs(Bx - Cx); + double CBy = fabs(By - Cy); + double zprimB, xprimB; + zprimB = CBx; + xprimB = CBy; + + // subtract passive volume above + dd4hep::SubtractionSolid activeShapeNoPassiveAbove( + activeShapeNoReadout, passiveShape, + dd4hep::Transform3D(dd4hep::RotationY(-dPhi / 2.), + dd4hep::Position(-fabs(xprim), 0, fabs(zprim)))); + // subtract passive volume below + dd4hep::SubtractionSolid activeShape( + activeShapeNoPassiveAbove, passiveShape, + dd4hep::Transform3D(dd4hep::RotationY(dPhi / 2.), + dd4hep::Position(fabs(xprimB), 0, -fabs(zprimB)))); + dd4hep::Volume activeVol("active", activeShape, aLcdd.material("Air")); + + std::vector layerPhysVols; + // place layers within active volume + std::vector layerInThickness; + std::vector layerOutThickness; + double layerIncreasePerUnitThickness = (activeOutThickness - activeInThickness) / layersTotalHeight; + for (uint iLay = 0; iLay < numLayers; iLay++) { + if (iLay == 0) { + layerInThickness.push_back(activeInThickness); + } else { + layerInThickness.push_back(layerOutThickness[iLay - 1]); + } + layerOutThickness.push_back(layerInThickness[iLay] + layerIncreasePerUnitThickness * layerHeight[iLay]); + } + double layerOffset = layerFirstOffset; + for (uint iLayer = 0; iLayer < numLayers; iLayer++) { + dd4hep::Trd1 layerOuterShape(layerInThickness[iLayer], layerOutThickness[iLayer], caloDim.dz(), layerHeight[iLayer] / 2.); + dd4hep::SubtractionSolid layerShapeNoReadout(layerOuterShape, readoutShape); + dd4hep::SubtractionSolid layerShapeNoPassiveAbove( + layerShapeNoReadout, passiveShape, + dd4hep::Transform3D(dd4hep::RotationY(-dPhi / 2.), + dd4hep::Position(-fabs(xprim), 0, fabs(zprim) - layerOffset))); + // subtract passive volume below + dd4hep::SubtractionSolid layerShape( + layerShapeNoPassiveAbove, passiveShape, + dd4hep::Transform3D(dd4hep::RotationY(dPhi / 2.), + dd4hep::Position(fabs(xprimB), 0, -fabs(zprimB) - layerOffset))); + dd4hep::Volume layerVol("layer", layerShape, aLcdd.material(activeMaterial)); + layerVol.setSensitiveDetector(aSensDet); + layerPhysVols.push_back(activeVol.placeVolume(layerVol, dd4hep::Position(0, 0, layerOffset))); + layerPhysVols.back().addPhysVolID("layer", iLayer); + if (iLayer != numLayers - 1) { + layerOffset += layerHeight[iLayer] / 2. + layerHeight[iLayer + 1] / 2.; + } + } + + dd4hep::DetElement bathDetElem(caloDetElem, "bath", 1); + std::vector activePhysVols; + // Next place elements: passive planes, readout planes and rows of layers + for (uint iPlane = 0; iPlane < numPlanes; iPlane++) { + // first calculate positions of passive and readout planes + // PASSIVE + // calculate centre position of the plane without plane rotation + double phi = offsetPassivePhi + iPlane * dPhi; + double xRadial = (Rmin + planeLength / 2.) * cos(phi); + double yRadial = (Rmin + planeLength / 2.) * sin(phi); + // calculate position of the beginning of plane + double xRmin = Rmin * cos(phi); + double yRmin = Rmin * sin(phi); + // rotate centre by angle wrt beginning of plane + double xRotated = xRmin + (xRadial - xRmin) * cos(angle) - (yRadial - yRmin) * sin(angle); + double yRotated = yRmin + (xRadial - xRmin) * sin(angle) + (yRadial - yRmin) * cos(angle); + dd4hep::Transform3D transform(dd4hep::RotationX(-M_PI / 2.) // to get in XY plane + * + dd4hep::RotationY(M_PI / 2. // to get pointed towards centre + - + phi - angle), + dd4hep::Position(xRotated, yRotated, 0)); + dd4hep::PlacedVolume passivePhysVol = bathVol.placeVolume(passiveVol, transform); + passivePhysVol.addPhysVolID("module", iPlane); + passivePhysVol.addPhysVolID("type", 1); // 0 = active, 1 = passive, 2 = readout + dd4hep::DetElement passiveDetElem(bathDetElem, "passive" + std::to_string(iPlane), iPlane); + passiveDetElem.setPlacement(passivePhysVol); + + // READOUT + // calculate centre position of the plane without plane rotation + double phiRead = offsetReadoutPhi + iPlane * dPhi; + double xRadialRead = (Rmin + planeLength / 2.) * cos(phiRead); + double yRadialRead = (Rmin + planeLength / 2.) * sin(phiRead); + // calculate position of the beginning of plane + double xRminRead = Rmin * cos(phiRead); + double yRminRead = Rmin * sin(phiRead); + // rotate centre by angle wrt beginning of plane + double xRotatedRead = xRminRead + (xRadialRead - xRminRead) * cos(angle) - (yRadialRead - yRminRead) * sin(angle); + double yRotatedRead = yRminRead + (xRadialRead - xRminRead) * sin(angle) + (yRadialRead - yRminRead) * cos(angle); + dd4hep::Transform3D transformRead( + dd4hep::RotationX(-M_PI / 2.) // to get in XY plane + * + dd4hep::RotationY(M_PI / 2. // to get pointed towards centre + - + phiRead - angle), + dd4hep::Position(xRotatedRead, yRotatedRead, 0)); + dd4hep::PlacedVolume readoutPhysVol = bathVol.placeVolume(readoutVol, transformRead); + readoutPhysVol.addPhysVolID("module", iPlane); + readoutPhysVol.addPhysVolID("type", 2); // 0 = active, 1 = passive, 2 = readout + dd4hep::DetElement readoutDetElem(bathDetElem, "readout" + std::to_string(iPlane), iPlane); + readoutDetElem.setPlacement(readoutPhysVol); + + // ACTIVE + dd4hep::Rotation3D rotationActive(dd4hep::RotationX(-M_PI / 2) * + dd4hep::RotationY(M_PI / 2 - phiRead - angle)); + activePhysVols.push_back(bathVol.placeVolume( + activeVol, + dd4hep::Transform3D(rotationActive, dd4hep::Position(xRotatedRead, yRotatedRead, 0)))); + activePhysVols.back().addPhysVolID("module", iPlane); + activePhysVols.back().addPhysVolID("type", 0); // 0 = active, 1 = passive, 2 = readout + } + dd4hep::PlacedVolume bathPhysVol = envelopeVol.placeVolume(bathVol); + bathDetElem.setPlacement(bathPhysVol); + for (uint iPlane = 0; iPlane < numPlanes; iPlane++) { + dd4hep::DetElement activeDetElem(bathDetElem, "active" + std::to_string(iPlane), iPlane); + activeDetElem.setPlacement(activePhysVols[iPlane]); + for (uint iLayer = 0; iLayer < numLayers; iLayer++) { + dd4hep::DetElement layerDetElem(activeDetElem, "layer" + std::to_string(iLayer), iLayer); + layerDetElem.setPlacement(layerPhysVols[iLayer]); + } + } + + // Place the envelope + dd4hep::Volume motherVol = aLcdd.pickMotherVolume(caloDetElem); + dd4hep::PlacedVolume envelopePhysVol = motherVol.placeVolume(envelopeVol); + envelopePhysVol.addPhysVolID("system", xmlDetElem.id()); + caloDetElem.setPlacement(envelopePhysVol); + + // Create caloData object + auto caloData = new dd4hep::rec::LayeredCalorimeterData; + caloData->layoutType = dd4hep::rec::LayeredCalorimeterData::BarrelLayout; + caloDetElem.addExtension(caloData); + + // Set type flags + dd4hep::xml::setDetectorTypeFlag(xmlDetElem, caloDetElem); + + return caloDetElem; +} +} // namespace det + +DECLARE_DETELEMENT(EmCaloBarrelInclinedFCCee, det::createECalBarrelInclinedFCCee) From 6e8d70074d517d4e5cfa328e0813ac18af18a4e1 Mon Sep 17 00:00:00 2001 From: Jana Date: Tue, 23 May 2023 10:40:43 +0200 Subject: [PATCH 4/9] ECAL barrel double-vessel front cryo --- .../compact/FCCee_ECalBarrel.xml | 31 +++++-- .../src/ECalBarrelInclinedFCCee_geo.cpp | 81 ++++++++++++------- 2 files changed, 73 insertions(+), 39 deletions(-) diff --git a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml index 13d4ed57..4397301e 100644 --- a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml +++ b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml @@ -26,16 +26,17 @@ - - + + + - + - + @@ -101,10 +102,24 @@ - - - - + + + + + + + + + + + + + diff --git a/Detector/DetFCCeeECalInclined/src/ECalBarrelInclinedFCCee_geo.cpp b/Detector/DetFCCeeECalInclined/src/ECalBarrelInclinedFCCee_geo.cpp index 24a4533a..bd4f0b2a 100644 --- a/Detector/DetFCCeeECalInclined/src/ECalBarrelInclinedFCCee_geo.cpp +++ b/Detector/DetFCCeeECalInclined/src/ECalBarrelInclinedFCCee_geo.cpp @@ -30,14 +30,22 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc // Retrieve cryostat data dd4hep::xml::DetElement cryostat = aXmlElement.child(_Unicode(cryostat)); - dd4hep::xml::Dimension cryoDim(cryostat.dimensions()); - double cryoThicknessFront = cryoDim.rmin2() - cryoDim.rmin1(); - dd4hep::xml::DetElement cryoFront = cryostat.child(_Unicode(front)); - dd4hep::xml::DetElement cryoBack = cryostat.child(_Unicode(back)); - dd4hep::xml::DetElement cryoSide = cryostat.child(_Unicode(side)); - bool cryoFrontSensitive = cryoFront.isSensitive(); + + dd4hep::xml::DetElement cryoFrontWarm = cryostat.child(_Unicode(cryo_front_warm)); + dd4hep::xml::DetElement cryoFrontCold = cryostat.child(_Unicode(cryo_front_cold)); + dd4hep::xml::DetElement cryoBack = cryostat.child(_Unicode(cryo_back)); + dd4hep::xml::DetElement cryoSide = cryostat.child(_Unicode(cryo_side)); + + bool cryoFrontSensitive = cryoFrontWarm.isSensitive(); bool cryoBackSensitive = cryoBack.isSensitive(); bool cryoSideSensitive = cryoSide.isSensitive(); + + dd4hep::xml::Dimension cryoFrontWarmDim(cryoFrontWarm.dimensions()); + // if cryoThicknessFront>0 -> build the cryostat + double cryoThicknessFront = cryoFrontWarmDim.rmax() - cryoFrontWarmDim.rmin(); + dd4hep::xml::Dimension cryoFrontColdDim(cryoFrontCold.dimensions()); + dd4hep::xml::Dimension cryoBackDim(cryoBack.dimensions()); + dd4hep::xml::Dimension cryoSideDim(cryoSide.dimensions()); // Retrieve active and passive material data dd4hep::xml::DetElement calo = aXmlElement.child(_Unicode(calorimeter)); @@ -90,51 +98,62 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc double bathRmin = caloDim.rmin(); // - margin for inclination double bathRmax = caloDim.rmax(); // + margin for inclination dd4hep::Tube bathOuterShape(bathRmin, bathRmax, caloDim.dz()); // make it 4 volumes + 5th for detector envelope - dd4hep::Tube bathAndServicesOuterShape(cryoDim.rmin2(), cryoDim.rmax1(), caloDim.dz()); // make it 4 volumes + 5th for detector envelope + dd4hep::Tube bathAndServicesOuterShape(cryoFrontColdDim.rmax(), cryoBackDim.rmin(), caloDim.dz()); // make it 4 volumes + 5th for detector envelope if (cryoThicknessFront > 0) { // 1. Create cryostat - dd4hep::Tube cryoFrontShape(cryoDim.rmin1(), cryoDim.rmin2(), cryoDim.dz()); - dd4hep::Tube cryoBackShape(cryoDim.rmax1(), cryoDim.rmax2(), cryoDim.dz()); - dd4hep::Tube cryoSideOuterShape(cryoDim.rmin2(), cryoDim.rmax1(), cryoDim.dz()); + dd4hep::Tube cryoFrontWarmShape(cryoFrontWarmDim.rmin(), cryoFrontWarmDim.rmax(), cryoFrontWarmDim.dz()); + dd4hep::Tube cryoFrontColdShape(cryoFrontColdDim.rmin(), cryoFrontColdDim.rmax(), cryoFrontColdDim.dz()); + dd4hep::Tube cryoBackShape(cryoBackDim.rmin(), cryoBackDim.rmax(), cryoBackDim.dz()); + dd4hep::Tube cryoSideOuterShape(cryoSideDim.rmin(), cryoSideDim.rmax(), cryoSideDim.dz()); dd4hep::SubtractionSolid cryoSideShape(cryoSideOuterShape, bathAndServicesOuterShape); - lLog << MSG::INFO << "ECAL cryostat: front: rmin (cm) = " << cryoDim.rmin1() << " rmax (cm) = " << cryoDim.rmin2() << " dz (cm) = " << cryoDim.dz() << endmsg; - lLog << MSG::INFO << "ECAL cryostat: back: rmin (cm) = " << cryoDim.rmax1() << " rmax (cm) = " << cryoDim.rmax2() << " dz (cm) = " << cryoDim.dz() << endmsg; - lLog << MSG::INFO << "ECAL cryostat: side: rmin (cm) = " << cryoDim.rmin2() << " rmax (cm) = " << cryoDim.rmax1() << " dz (cm) = " << cryoDim.dz() - caloDim.dz() << endmsg; - dd4hep::Volume cryoFrontVol(cryostat.nameStr()+"_front", cryoFrontShape, aLcdd.material(cryostat.materialStr())); + lLog << MSG::INFO << "ECAL cryostat: front warm: rmin (cm) = " << cryoFrontWarmDim.rmin() << " rmax (cm) = " << cryoFrontWarmDim.rmax() << " dz (cm) = " << cryoFrontWarmDim.dz() << endmsg; + lLog << MSG::INFO << "ECAL cryostat: front cold: rmin (cm) = " << cryoFrontColdDim.rmin() << " rmax (cm) = " << cryoFrontColdDim.rmax() << " dz (cm) = " << cryoFrontColdDim.dz() << endmsg; + lLog << MSG::INFO << "ECAL cryostat: back: rmin (cm) = " << cryoBackDim.rmin() << " rmax (cm) = " << cryoBackDim.rmax() << " dz (cm) = " << cryoBackDim.dz() << endmsg; + lLog << MSG::INFO << "ECAL cryostat: side: rmin (cm) = " << cryoSideDim.rmin() << " rmax (cm) = " << cryoSideDim.rmax() << " dz (cm) = " << cryoSideDim.dz() - caloDim.dz() << endmsg; + dd4hep::Volume cryoFrontWarmVol(cryostat.nameStr()+"_frontWarm", cryoFrontWarmShape, aLcdd.material(cryostat.materialStr())); + dd4hep::Volume cryoFrontColdVol(cryostat.nameStr()+"_frontCold", cryoFrontColdShape, aLcdd.material(cryostat.materialStr())); dd4hep::Volume cryoBackVol(cryostat.nameStr()+"_back", cryoBackShape, aLcdd.material(cryostat.materialStr())); dd4hep::Volume cryoSideVol(cryostat.nameStr()+"_side", cryoSideShape, aLcdd.material(cryostat.materialStr())); - dd4hep::PlacedVolume cryoFrontPhysVol = envelopeVol.placeVolume(cryoFrontVol); + dd4hep::PlacedVolume cryoFrontWarmPhysVol = envelopeVol.placeVolume(cryoFrontWarmVol); + dd4hep::PlacedVolume cryoFrontColdPhysVol = envelopeVol.placeVolume(cryoFrontColdVol); dd4hep::PlacedVolume cryoBackPhysVol = envelopeVol.placeVolume(cryoBackVol); dd4hep::PlacedVolume cryoSidePhysVol = envelopeVol.placeVolume(cryoSideVol); if (cryoFrontSensitive) { - cryoFrontVol.setSensitiveDetector(aSensDet); - cryoFrontPhysVol.addPhysVolID("cryo", 1); - cryoFrontPhysVol.addPhysVolID("type", 1); - lLog << MSG::INFO << "Cryostat front volume set as sensitive" << endmsg; + cryoFrontWarmVol.setSensitiveDetector(aSensDet); + cryoFrontWarmPhysVol.addPhysVolID("cryo", 1); + cryoFrontWarmPhysVol.addPhysVolID("type", 1); + lLog << MSG::INFO << "Cryostat front warm volume set as sensitive" << endmsg; + cryoFrontColdVol.setSensitiveDetector(aSensDet); + cryoFrontColdPhysVol.addPhysVolID("cryo", 1); + cryoFrontColdPhysVol.addPhysVolID("type", 2); + lLog << MSG::INFO << "Cryostat front cold volume set as sensitive" << endmsg; + } if (cryoBackSensitive) { cryoBackVol.setSensitiveDetector(aSensDet); cryoBackPhysVol.addPhysVolID("cryo", 1); - cryoBackPhysVol.addPhysVolID("type", 2); + cryoBackPhysVol.addPhysVolID("type", 3); lLog << MSG::INFO << "Cryostat back volume set as sensitive" << endmsg; } if (cryoSideSensitive) { cryoSideVol.setSensitiveDetector(aSensDet); cryoSidePhysVol.addPhysVolID("cryo", 1); - cryoSidePhysVol.addPhysVolID("type", 3); + cryoSidePhysVol.addPhysVolID("type", 4); lLog << MSG::INFO << "Cryostat front volume set as sensitive" << endmsg; } - dd4hep::DetElement cryoFrontDetElem(caloDetElem, "cryo_front", 0); - cryoFrontDetElem.setPlacement(cryoFrontPhysVol); + dd4hep::DetElement cryoFrontWarmDetElem(caloDetElem, "cryo_front_warm", 0); + cryoFrontWarmDetElem.setPlacement(cryoFrontWarmPhysVol); + dd4hep::DetElement cryoFrontColdDetElem(caloDetElem, "cryo_front_cold", 0); + cryoFrontColdDetElem.setPlacement(cryoFrontColdPhysVol); dd4hep::DetElement cryoBackDetElem(caloDetElem, "cryo_back", 0); cryoBackDetElem.setPlacement(cryoBackPhysVol); dd4hep::DetElement cryoSideDetElem(caloDetElem, "cryo_side", 0); cryoSideDetElem.setPlacement(cryoSidePhysVol); // 1.2. Create place-holder for services - dd4hep::Tube servicesFrontShape(cryoDim.rmin2(), bathRmin, caloDim.dz()); - dd4hep::Tube servicesBackShape(bathRmax, cryoDim.rmax1(), caloDim.dz()); - lLog << MSG::INFO << "ECAL services: front: rmin (cm) = " << cryoDim.rmin2() << " rmax (cm) = " << bathRmin << " dz (cm) = " << caloDim.dz() << endmsg; - lLog << MSG::INFO << "ECAL services: back: rmin (cm) = " << bathRmax << " rmax (cm) = " << cryoDim.rmax1() << " dz (cm) = " << caloDim.dz() << endmsg; + dd4hep::Tube servicesFrontShape(cryoFrontColdDim.rmax(), bathRmin, caloDim.dz()); + dd4hep::Tube servicesBackShape(bathRmax, cryoBackDim.rmin(), caloDim.dz()); + lLog << MSG::INFO << "ECAL services: front: rmin (cm) = " << cryoFrontColdDim.rmax() << " rmax (cm) = " << bathRmin << " dz (cm) = " << caloDim.dz() << endmsg; + lLog << MSG::INFO << "ECAL services: back: rmin (cm) = " << bathRmax << " rmax (cm) = " << cryoBackDim.rmin() << " dz (cm) = " << caloDim.dz() << endmsg; dd4hep::Volume servicesFrontVol("services_front", servicesFrontShape, aLcdd.material(activeMaterial)); dd4hep::Volume servicesBackVol("services_back", servicesBackShape, aLcdd.material(activeMaterial)); dd4hep::PlacedVolume servicesFrontPhysVol = envelopeVol.placeVolume(servicesFrontVol); @@ -142,13 +161,13 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc if (cryoFrontSensitive) { servicesFrontVol.setSensitiveDetector(aSensDet); servicesFrontPhysVol.addPhysVolID("cryo", 1); - servicesFrontPhysVol.addPhysVolID("type", 4); + servicesFrontPhysVol.addPhysVolID("type", 5); lLog << MSG::INFO << "Services front volume set as sensitive" << endmsg; } if (cryoBackSensitive) { servicesBackVol.setSensitiveDetector(aSensDet); servicesBackPhysVol.addPhysVolID("cryo", 1); - servicesBackPhysVol.addPhysVolID("type", 5); + servicesBackPhysVol.addPhysVolID("type", 6); lLog << MSG::INFO << "Services back volume set as sensitive" << endmsg; } dd4hep::DetElement servicesFrontDetElem(caloDetElem, "services_front", 0); @@ -160,8 +179,8 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc // Bath is filled with active material -> but not sensitive dd4hep::Volume bathVol(activeMaterial + "_bath", bathOuterShape, aLcdd.material(activeMaterial)); lLog << MSG::INFO << "ECAL bath: material = " << activeMaterial << " rmin (cm) = " << bathRmin - << " rmax (cm) = " << bathRmax << " thickness in front of ECal (cm) = " << caloDim.rmin() - cryoDim.rmin2() - << " thickness behind ECal (cm) = " << cryoDim.rmax1() - caloDim.rmax() << endmsg; + << " rmax (cm) = " << bathRmax << " thickness in front of ECal (cm) = " << caloDim.rmin() - cryoFrontColdDim.rmax() + << " thickness behind ECal (cm) = " << cryoBackDim.rmin() - caloDim.rmax() << endmsg; // 3. Create the calorimeter by placing the passive material, trapezoid active layers, readout and again trapezoid // active layers in the bath. From eb1c999bbd11192c84fa901123286eeabd72a541 Mon Sep 17 00:00:00 2001 From: Jana Date: Tue, 23 May 2023 14:49:01 +0200 Subject: [PATCH 5/9] ECAL barrel double-vessel back cryo --- .../compact/FCCee_ECalBarrel.xml | 21 +++--- .../src/ECalBarrelInclinedFCCee_geo.cpp | 64 +++++++++++++------ 2 files changed, 56 insertions(+), 29 deletions(-) diff --git a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml index 4397301e..97b7c839 100644 --- a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml +++ b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml @@ -40,7 +40,7 @@ - + @@ -84,14 +84,14 @@ - system:4,cryo:1,type:3,subtype:3,layer:8,module:11,eta:9 + system:4,cryo:1,type:4,subtype:3,layer:8,module:11,eta:9 - system:4,cryo:1,type:3,subtype:3,layer:8,eta:9,phi:10 + system:4,cryo:1,type:4,subtype:3,layer:8,eta:9,phi:10 @@ -108,18 +108,21 @@ + + + + + + + + + - diff --git a/Detector/DetFCCeeECalInclined/src/ECalBarrelInclinedFCCee_geo.cpp b/Detector/DetFCCeeECalInclined/src/ECalBarrelInclinedFCCee_geo.cpp index bd4f0b2a..1d0fecd3 100644 --- a/Detector/DetFCCeeECalInclined/src/ECalBarrelInclinedFCCee_geo.cpp +++ b/Detector/DetFCCeeECalInclined/src/ECalBarrelInclinedFCCee_geo.cpp @@ -33,18 +33,22 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc dd4hep::xml::DetElement cryoFrontWarm = cryostat.child(_Unicode(cryo_front_warm)); dd4hep::xml::DetElement cryoFrontCold = cryostat.child(_Unicode(cryo_front_cold)); - dd4hep::xml::DetElement cryoBack = cryostat.child(_Unicode(cryo_back)); + dd4hep::xml::DetElement cryoBackCold = cryostat.child(_Unicode(cryo_back_cold)); + dd4hep::xml::DetElement cryoSolenoid = cryostat.child(_Unicode(cryo_solenoid)); + dd4hep::xml::DetElement cryoBackWarm = cryostat.child(_Unicode(cryo_back_warm)); dd4hep::xml::DetElement cryoSide = cryostat.child(_Unicode(cryo_side)); bool cryoFrontSensitive = cryoFrontWarm.isSensitive(); - bool cryoBackSensitive = cryoBack.isSensitive(); + bool cryoBackSensitive = cryoBackCold.isSensitive(); bool cryoSideSensitive = cryoSide.isSensitive(); dd4hep::xml::Dimension cryoFrontWarmDim(cryoFrontWarm.dimensions()); // if cryoThicknessFront>0 -> build the cryostat double cryoThicknessFront = cryoFrontWarmDim.rmax() - cryoFrontWarmDim.rmin(); dd4hep::xml::Dimension cryoFrontColdDim(cryoFrontCold.dimensions()); - dd4hep::xml::Dimension cryoBackDim(cryoBack.dimensions()); + dd4hep::xml::Dimension cryoBackColdDim(cryoBackCold.dimensions()); + dd4hep::xml::Dimension cryoSolenoidDim(cryoSolenoid.dimensions()); + dd4hep::xml::Dimension cryoBackWarmDim(cryoBackWarm.dimensions()); dd4hep::xml::Dimension cryoSideDim(cryoSide.dimensions()); // Retrieve active and passive material data @@ -98,25 +102,33 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc double bathRmin = caloDim.rmin(); // - margin for inclination double bathRmax = caloDim.rmax(); // + margin for inclination dd4hep::Tube bathOuterShape(bathRmin, bathRmax, caloDim.dz()); // make it 4 volumes + 5th for detector envelope - dd4hep::Tube bathAndServicesOuterShape(cryoFrontColdDim.rmax(), cryoBackDim.rmin(), caloDim.dz()); // make it 4 volumes + 5th for detector envelope + dd4hep::Tube bathAndServicesOuterShape(cryoFrontColdDim.rmax(), cryoBackWarmDim.rmin(), caloDim.dz()); // make it 4 volumes + 5th for detector envelope if (cryoThicknessFront > 0) { // 1. Create cryostat dd4hep::Tube cryoFrontWarmShape(cryoFrontWarmDim.rmin(), cryoFrontWarmDim.rmax(), cryoFrontWarmDim.dz()); dd4hep::Tube cryoFrontColdShape(cryoFrontColdDim.rmin(), cryoFrontColdDim.rmax(), cryoFrontColdDim.dz()); - dd4hep::Tube cryoBackShape(cryoBackDim.rmin(), cryoBackDim.rmax(), cryoBackDim.dz()); + dd4hep::Tube cryoBackColdShape(cryoBackColdDim.rmin(), cryoBackColdDim.rmax(), cryoBackColdDim.dz()); + dd4hep::Tube cryoSolenoidShape(cryoSolenoidDim.rmin(), cryoSolenoidDim.rmax(), cryoSolenoidDim.dz()); + dd4hep::Tube cryoBackWarmShape(cryoBackWarmDim.rmin(), cryoBackWarmDim.rmax(), cryoBackWarmDim.dz()); dd4hep::Tube cryoSideOuterShape(cryoSideDim.rmin(), cryoSideDim.rmax(), cryoSideDim.dz()); dd4hep::SubtractionSolid cryoSideShape(cryoSideOuterShape, bathAndServicesOuterShape); lLog << MSG::INFO << "ECAL cryostat: front warm: rmin (cm) = " << cryoFrontWarmDim.rmin() << " rmax (cm) = " << cryoFrontWarmDim.rmax() << " dz (cm) = " << cryoFrontWarmDim.dz() << endmsg; lLog << MSG::INFO << "ECAL cryostat: front cold: rmin (cm) = " << cryoFrontColdDim.rmin() << " rmax (cm) = " << cryoFrontColdDim.rmax() << " dz (cm) = " << cryoFrontColdDim.dz() << endmsg; - lLog << MSG::INFO << "ECAL cryostat: back: rmin (cm) = " << cryoBackDim.rmin() << " rmax (cm) = " << cryoBackDim.rmax() << " dz (cm) = " << cryoBackDim.dz() << endmsg; + lLog << MSG::INFO << "ECAL cryostat: back cold: rmin (cm) = " << cryoBackColdDim.rmin() << " rmax (cm) = " << cryoBackColdDim.rmax() << " dz (cm) = " << cryoBackColdDim.dz() << endmsg; + lLog << MSG::INFO << "ECAL cryostat: solenoid: rmin (cm) = " << cryoSolenoidDim.rmin() << " rmax (cm) = " << cryoSolenoidDim.rmax() << " dz (cm) = " << cryoSolenoidDim.dz() << endmsg; + lLog << MSG::INFO << "ECAL cryostat: back warm: rmin (cm) = " << cryoBackWarmDim.rmin() << " rmax (cm) = " << cryoBackWarmDim.rmax() << " dz (cm) = " << cryoBackWarmDim.dz() << endmsg; lLog << MSG::INFO << "ECAL cryostat: side: rmin (cm) = " << cryoSideDim.rmin() << " rmax (cm) = " << cryoSideDim.rmax() << " dz (cm) = " << cryoSideDim.dz() - caloDim.dz() << endmsg; dd4hep::Volume cryoFrontWarmVol(cryostat.nameStr()+"_frontWarm", cryoFrontWarmShape, aLcdd.material(cryostat.materialStr())); dd4hep::Volume cryoFrontColdVol(cryostat.nameStr()+"_frontCold", cryoFrontColdShape, aLcdd.material(cryostat.materialStr())); - dd4hep::Volume cryoBackVol(cryostat.nameStr()+"_back", cryoBackShape, aLcdd.material(cryostat.materialStr())); + dd4hep::Volume cryoBackColdVol(cryostat.nameStr()+"_backCold", cryoBackColdShape, aLcdd.material(cryostat.materialStr())); + dd4hep::Volume cryoSolenoidVol(cryostat.nameStr()+"_solenoid", cryoSolenoidShape, aLcdd.material(cryostat.materialStr())); + dd4hep::Volume cryoBackWarmVol(cryostat.nameStr()+"_backWarm", cryoBackWarmShape, aLcdd.material(cryostat.materialStr())); dd4hep::Volume cryoSideVol(cryostat.nameStr()+"_side", cryoSideShape, aLcdd.material(cryostat.materialStr())); dd4hep::PlacedVolume cryoFrontWarmPhysVol = envelopeVol.placeVolume(cryoFrontWarmVol); dd4hep::PlacedVolume cryoFrontColdPhysVol = envelopeVol.placeVolume(cryoFrontColdVol); - dd4hep::PlacedVolume cryoBackPhysVol = envelopeVol.placeVolume(cryoBackVol); + dd4hep::PlacedVolume cryoBackColdPhysVol = envelopeVol.placeVolume(cryoBackColdVol); + dd4hep::PlacedVolume cryoSolenoidPhysVol = envelopeVol.placeVolume(cryoSolenoidVol); + dd4hep::PlacedVolume cryoBackWarmPhysVol = envelopeVol.placeVolume(cryoBackWarmVol); dd4hep::PlacedVolume cryoSidePhysVol = envelopeVol.placeVolume(cryoSideVol); if (cryoFrontSensitive) { cryoFrontWarmVol.setSensitiveDetector(aSensDet); @@ -130,30 +142,42 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc } if (cryoBackSensitive) { - cryoBackVol.setSensitiveDetector(aSensDet); - cryoBackPhysVol.addPhysVolID("cryo", 1); - cryoBackPhysVol.addPhysVolID("type", 3); - lLog << MSG::INFO << "Cryostat back volume set as sensitive" << endmsg; + cryoBackColdVol.setSensitiveDetector(aSensDet); + cryoBackColdPhysVol.addPhysVolID("cryo", 1); + cryoBackColdPhysVol.addPhysVolID("type", 3); + lLog << MSG::INFO << "Cryostat back cold volume set as sensitive" << endmsg; + cryoSolenoidVol.setSensitiveDetector(aSensDet); + cryoSolenoidPhysVol.addPhysVolID("cryo", 1); + cryoSolenoidPhysVol.addPhysVolID("type", 4); + lLog << MSG::INFO << "Cryostat solenoid volume set as sensitive" << endmsg; + cryoBackWarmVol.setSensitiveDetector(aSensDet); + cryoBackWarmPhysVol.addPhysVolID("cryo", 1); + cryoBackWarmPhysVol.addPhysVolID("type", 5); + lLog << MSG::INFO << "Cryostat back warm volume set as sensitive" << endmsg; } if (cryoSideSensitive) { cryoSideVol.setSensitiveDetector(aSensDet); cryoSidePhysVol.addPhysVolID("cryo", 1); - cryoSidePhysVol.addPhysVolID("type", 4); + cryoSidePhysVol.addPhysVolID("type", 6); lLog << MSG::INFO << "Cryostat front volume set as sensitive" << endmsg; } dd4hep::DetElement cryoFrontWarmDetElem(caloDetElem, "cryo_front_warm", 0); cryoFrontWarmDetElem.setPlacement(cryoFrontWarmPhysVol); dd4hep::DetElement cryoFrontColdDetElem(caloDetElem, "cryo_front_cold", 0); cryoFrontColdDetElem.setPlacement(cryoFrontColdPhysVol); - dd4hep::DetElement cryoBackDetElem(caloDetElem, "cryo_back", 0); - cryoBackDetElem.setPlacement(cryoBackPhysVol); + dd4hep::DetElement cryoBackColdDetElem(caloDetElem, "cryo_back_cold", 0); + cryoBackColdDetElem.setPlacement(cryoBackColdPhysVol); + dd4hep::DetElement cryoSolenoidDetElem(caloDetElem, "cryo_solenoid", 0); + cryoSolenoidDetElem.setPlacement(cryoSolenoidPhysVol); + dd4hep::DetElement cryoBackWarmDetElem(caloDetElem, "cryo_back_warm", 0); + cryoBackWarmDetElem.setPlacement(cryoBackWarmPhysVol); dd4hep::DetElement cryoSideDetElem(caloDetElem, "cryo_side", 0); cryoSideDetElem.setPlacement(cryoSidePhysVol); // 1.2. Create place-holder for services dd4hep::Tube servicesFrontShape(cryoFrontColdDim.rmax(), bathRmin, caloDim.dz()); - dd4hep::Tube servicesBackShape(bathRmax, cryoBackDim.rmin(), caloDim.dz()); + dd4hep::Tube servicesBackShape(bathRmax, cryoBackColdDim.rmin(), caloDim.dz()); lLog << MSG::INFO << "ECAL services: front: rmin (cm) = " << cryoFrontColdDim.rmax() << " rmax (cm) = " << bathRmin << " dz (cm) = " << caloDim.dz() << endmsg; - lLog << MSG::INFO << "ECAL services: back: rmin (cm) = " << bathRmax << " rmax (cm) = " << cryoBackDim.rmin() << " dz (cm) = " << caloDim.dz() << endmsg; + lLog << MSG::INFO << "ECAL services: back: rmin (cm) = " << bathRmax << " rmax (cm) = " << cryoBackColdDim.rmin() << " dz (cm) = " << caloDim.dz() << endmsg; dd4hep::Volume servicesFrontVol("services_front", servicesFrontShape, aLcdd.material(activeMaterial)); dd4hep::Volume servicesBackVol("services_back", servicesBackShape, aLcdd.material(activeMaterial)); dd4hep::PlacedVolume servicesFrontPhysVol = envelopeVol.placeVolume(servicesFrontVol); @@ -161,13 +185,13 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc if (cryoFrontSensitive) { servicesFrontVol.setSensitiveDetector(aSensDet); servicesFrontPhysVol.addPhysVolID("cryo", 1); - servicesFrontPhysVol.addPhysVolID("type", 5); + servicesFrontPhysVol.addPhysVolID("type", 7); lLog << MSG::INFO << "Services front volume set as sensitive" << endmsg; } if (cryoBackSensitive) { servicesBackVol.setSensitiveDetector(aSensDet); servicesBackPhysVol.addPhysVolID("cryo", 1); - servicesBackPhysVol.addPhysVolID("type", 6); + servicesBackPhysVol.addPhysVolID("type", 7); lLog << MSG::INFO << "Services back volume set as sensitive" << endmsg; } dd4hep::DetElement servicesFrontDetElem(caloDetElem, "services_front", 0); @@ -180,7 +204,7 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc dd4hep::Volume bathVol(activeMaterial + "_bath", bathOuterShape, aLcdd.material(activeMaterial)); lLog << MSG::INFO << "ECAL bath: material = " << activeMaterial << " rmin (cm) = " << bathRmin << " rmax (cm) = " << bathRmax << " thickness in front of ECal (cm) = " << caloDim.rmin() - cryoFrontColdDim.rmax() - << " thickness behind ECal (cm) = " << cryoBackDim.rmin() - caloDim.rmax() << endmsg; + << " thickness behind ECal (cm) = " << cryoBackColdDim.rmin() - caloDim.rmax() << endmsg; // 3. Create the calorimeter by placing the passive material, trapezoid active layers, readout and again trapezoid // active layers in the bath. From 4cc4627455e67deaba64c97eeb0edb361a52a36d Mon Sep 17 00:00:00 2001 From: Jana Date: Mon, 28 Aug 2023 15:39:39 +0200 Subject: [PATCH 6/9] double vessel --- .../compact/FCCee_ECalBarrel.xml | 30 ++++++----- .../src/ECalBarrelInclinedFCCee_geo.cpp | 53 ++++++++++++------- 2 files changed, 49 insertions(+), 34 deletions(-) diff --git a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml index 97b7c839..dc9b175a 100644 --- a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml +++ b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml @@ -48,11 +48,13 @@ - + + + @@ -99,34 +101,34 @@ - + - + - + - + - + - + - - - - - - + + + + + + - + diff --git a/Detector/DetFCCeeECalInclined/src/ECalBarrelInclinedFCCee_geo.cpp b/Detector/DetFCCeeECalInclined/src/ECalBarrelInclinedFCCee_geo.cpp index 1d0fecd3..bb224f8b 100644 --- a/Detector/DetFCCeeECalInclined/src/ECalBarrelInclinedFCCee_geo.cpp +++ b/Detector/DetFCCeeECalInclined/src/ECalBarrelInclinedFCCee_geo.cpp @@ -36,11 +36,12 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc dd4hep::xml::DetElement cryoBackCold = cryostat.child(_Unicode(cryo_back_cold)); dd4hep::xml::DetElement cryoSolenoid = cryostat.child(_Unicode(cryo_solenoid)); dd4hep::xml::DetElement cryoBackWarm = cryostat.child(_Unicode(cryo_back_warm)); - dd4hep::xml::DetElement cryoSide = cryostat.child(_Unicode(cryo_side)); + dd4hep::xml::DetElement cryoSideWarm = cryostat.child(_Unicode(cryo_side_warm)); + dd4hep::xml::DetElement cryoSideCold = cryostat.child(_Unicode(cryo_side_cold)); bool cryoFrontSensitive = cryoFrontWarm.isSensitive(); - bool cryoBackSensitive = cryoBackCold.isSensitive(); - bool cryoSideSensitive = cryoSide.isSensitive(); + bool cryoBackSensitive = cryoBackWarm.isSensitive(); + bool cryoSideSensitive = cryoSideWarm.isSensitive(); dd4hep::xml::Dimension cryoFrontWarmDim(cryoFrontWarm.dimensions()); // if cryoThicknessFront>0 -> build the cryostat @@ -49,8 +50,9 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc dd4hep::xml::Dimension cryoBackColdDim(cryoBackCold.dimensions()); dd4hep::xml::Dimension cryoSolenoidDim(cryoSolenoid.dimensions()); dd4hep::xml::Dimension cryoBackWarmDim(cryoBackWarm.dimensions()); - dd4hep::xml::Dimension cryoSideDim(cryoSide.dimensions()); - + dd4hep::xml::Dimension cryoSideColdDim(cryoSideCold.dimensions()); + dd4hep::xml::Dimension cryoSideWarmDim(cryoSideWarm.dimensions()); + // Retrieve active and passive material data dd4hep::xml::DetElement calo = aXmlElement.child(_Unicode(calorimeter)); dd4hep::xml::Dimension caloDim(calo.dimensions()); @@ -102,7 +104,8 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc double bathRmin = caloDim.rmin(); // - margin for inclination double bathRmax = caloDim.rmax(); // + margin for inclination dd4hep::Tube bathOuterShape(bathRmin, bathRmax, caloDim.dz()); // make it 4 volumes + 5th for detector envelope - dd4hep::Tube bathAndServicesOuterShape(cryoFrontColdDim.rmax(), cryoBackWarmDim.rmin(), caloDim.dz()); // make it 4 volumes + 5th for detector envelope + dd4hep::Tube bathAndServicesWarmOuterShape(cryoSideWarmDim.rmin(), cryoSideWarmDim.rmax(), caloDim.dim_z()); // make it 4 volumes + 5th for detector envelope + dd4hep::Tube bathAndServicesColdOuterShape(cryoSideColdDim.rmin(), cryoSideColdDim.rmax(), caloDim.dz()); // make it 4 volumes + 5th for detector envelope if (cryoThicknessFront > 0) { // 1. Create cryostat dd4hep::Tube cryoFrontWarmShape(cryoFrontWarmDim.rmin(), cryoFrontWarmDim.rmax(), cryoFrontWarmDim.dz()); @@ -110,26 +113,31 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc dd4hep::Tube cryoBackColdShape(cryoBackColdDim.rmin(), cryoBackColdDim.rmax(), cryoBackColdDim.dz()); dd4hep::Tube cryoSolenoidShape(cryoSolenoidDim.rmin(), cryoSolenoidDim.rmax(), cryoSolenoidDim.dz()); dd4hep::Tube cryoBackWarmShape(cryoBackWarmDim.rmin(), cryoBackWarmDim.rmax(), cryoBackWarmDim.dz()); - dd4hep::Tube cryoSideOuterShape(cryoSideDim.rmin(), cryoSideDim.rmax(), cryoSideDim.dz()); - dd4hep::SubtractionSolid cryoSideShape(cryoSideOuterShape, bathAndServicesOuterShape); + dd4hep::Tube cryoSideColdOuterShape(cryoSideColdDim.rmin(), cryoSideColdDim.rmax(), cryoSideColdDim.dz()); + dd4hep::Tube cryoSideWarmOuterShape(cryoSideWarmDim.rmin(), cryoSideWarmDim.rmax(), cryoSideWarmDim.dz()); + dd4hep::SubtractionSolid cryoSideColdShape(cryoSideColdOuterShape, bathAndServicesColdOuterShape); + dd4hep::SubtractionSolid cryoSideWarmShape(cryoSideWarmOuterShape, bathAndServicesWarmOuterShape); lLog << MSG::INFO << "ECAL cryostat: front warm: rmin (cm) = " << cryoFrontWarmDim.rmin() << " rmax (cm) = " << cryoFrontWarmDim.rmax() << " dz (cm) = " << cryoFrontWarmDim.dz() << endmsg; lLog << MSG::INFO << "ECAL cryostat: front cold: rmin (cm) = " << cryoFrontColdDim.rmin() << " rmax (cm) = " << cryoFrontColdDim.rmax() << " dz (cm) = " << cryoFrontColdDim.dz() << endmsg; lLog << MSG::INFO << "ECAL cryostat: back cold: rmin (cm) = " << cryoBackColdDim.rmin() << " rmax (cm) = " << cryoBackColdDim.rmax() << " dz (cm) = " << cryoBackColdDim.dz() << endmsg; lLog << MSG::INFO << "ECAL cryostat: solenoid: rmin (cm) = " << cryoSolenoidDim.rmin() << " rmax (cm) = " << cryoSolenoidDim.rmax() << " dz (cm) = " << cryoSolenoidDim.dz() << endmsg; lLog << MSG::INFO << "ECAL cryostat: back warm: rmin (cm) = " << cryoBackWarmDim.rmin() << " rmax (cm) = " << cryoBackWarmDim.rmax() << " dz (cm) = " << cryoBackWarmDim.dz() << endmsg; - lLog << MSG::INFO << "ECAL cryostat: side: rmin (cm) = " << cryoSideDim.rmin() << " rmax (cm) = " << cryoSideDim.rmax() << " dz (cm) = " << cryoSideDim.dz() - caloDim.dz() << endmsg; + lLog << MSG::INFO << "ECAL cryostat: side cold: rmin (cm) = " << cryoSideColdDim.rmin() << " rmax (cm) = " << cryoSideColdDim.rmax() << " dz (cm) = " << cryoSideColdDim.dz() - caloDim.dz() << endmsg; + lLog << MSG::INFO << "ECAL cryostat: side warm: rmin (cm) = " << cryoSideWarmDim.rmin() << " rmax (cm) = " << cryoSideWarmDim.rmax() << " dz (cm) = " << cryoSideWarmDim.dz() - caloDim.dim_z() << endmsg; dd4hep::Volume cryoFrontWarmVol(cryostat.nameStr()+"_frontWarm", cryoFrontWarmShape, aLcdd.material(cryostat.materialStr())); dd4hep::Volume cryoFrontColdVol(cryostat.nameStr()+"_frontCold", cryoFrontColdShape, aLcdd.material(cryostat.materialStr())); dd4hep::Volume cryoBackColdVol(cryostat.nameStr()+"_backCold", cryoBackColdShape, aLcdd.material(cryostat.materialStr())); dd4hep::Volume cryoSolenoidVol(cryostat.nameStr()+"_solenoid", cryoSolenoidShape, aLcdd.material(cryostat.materialStr())); dd4hep::Volume cryoBackWarmVol(cryostat.nameStr()+"_backWarm", cryoBackWarmShape, aLcdd.material(cryostat.materialStr())); - dd4hep::Volume cryoSideVol(cryostat.nameStr()+"_side", cryoSideShape, aLcdd.material(cryostat.materialStr())); + dd4hep::Volume cryoSideWarmVol(cryostat.nameStr()+"_sideWarm", cryoSideWarmShape, aLcdd.material(cryostat.materialStr())); + dd4hep::Volume cryoSideColdVol(cryostat.nameStr()+"_sideCold", cryoSideColdShape, aLcdd.material(cryostat.materialStr())); dd4hep::PlacedVolume cryoFrontWarmPhysVol = envelopeVol.placeVolume(cryoFrontWarmVol); dd4hep::PlacedVolume cryoFrontColdPhysVol = envelopeVol.placeVolume(cryoFrontColdVol); dd4hep::PlacedVolume cryoBackColdPhysVol = envelopeVol.placeVolume(cryoBackColdVol); dd4hep::PlacedVolume cryoSolenoidPhysVol = envelopeVol.placeVolume(cryoSolenoidVol); dd4hep::PlacedVolume cryoBackWarmPhysVol = envelopeVol.placeVolume(cryoBackWarmVol); - dd4hep::PlacedVolume cryoSidePhysVol = envelopeVol.placeVolume(cryoSideVol); + dd4hep::PlacedVolume cryoSideWarmPhysVol = envelopeVol.placeVolume(cryoSideWarmVol); + dd4hep::PlacedVolume cryoSideColdPhysVol = envelopeVol.placeVolume(cryoSideColdVol); if (cryoFrontSensitive) { cryoFrontWarmVol.setSensitiveDetector(aSensDet); cryoFrontWarmPhysVol.addPhysVolID("cryo", 1); @@ -139,7 +147,6 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc cryoFrontColdPhysVol.addPhysVolID("cryo", 1); cryoFrontColdPhysVol.addPhysVolID("type", 2); lLog << MSG::INFO << "Cryostat front cold volume set as sensitive" << endmsg; - } if (cryoBackSensitive) { cryoBackColdVol.setSensitiveDetector(aSensDet); @@ -156,10 +163,14 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc lLog << MSG::INFO << "Cryostat back warm volume set as sensitive" << endmsg; } if (cryoSideSensitive) { - cryoSideVol.setSensitiveDetector(aSensDet); - cryoSidePhysVol.addPhysVolID("cryo", 1); - cryoSidePhysVol.addPhysVolID("type", 6); - lLog << MSG::INFO << "Cryostat front volume set as sensitive" << endmsg; + cryoSideWarmVol.setSensitiveDetector(aSensDet); + cryoSideWarmPhysVol.addPhysVolID("cryo", 1); + cryoSideWarmPhysVol.addPhysVolID("type", 6); + lLog << MSG::INFO << "Cryostat side warm volume set as sensitive" << endmsg; + cryoSideColdVol.setSensitiveDetector(aSensDet); + cryoSideColdPhysVol.addPhysVolID("cryo", 1); + cryoSideColdPhysVol.addPhysVolID("type", 7); + lLog << MSG::INFO << "Cryostat side cold volume set as sensitive" << endmsg; } dd4hep::DetElement cryoFrontWarmDetElem(caloDetElem, "cryo_front_warm", 0); cryoFrontWarmDetElem.setPlacement(cryoFrontWarmPhysVol); @@ -171,8 +182,10 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc cryoSolenoidDetElem.setPlacement(cryoSolenoidPhysVol); dd4hep::DetElement cryoBackWarmDetElem(caloDetElem, "cryo_back_warm", 0); cryoBackWarmDetElem.setPlacement(cryoBackWarmPhysVol); - dd4hep::DetElement cryoSideDetElem(caloDetElem, "cryo_side", 0); - cryoSideDetElem.setPlacement(cryoSidePhysVol); + dd4hep::DetElement cryoSideWarmDetElem(caloDetElem, "cryo_side_warm", 0); + cryoSideWarmDetElem.setPlacement(cryoSideWarmPhysVol); + dd4hep::DetElement cryoSideColdDetElem(caloDetElem, "cryo_side_cold", 0); + cryoSideColdDetElem.setPlacement(cryoSideColdPhysVol); // 1.2. Create place-holder for services dd4hep::Tube servicesFrontShape(cryoFrontColdDim.rmax(), bathRmin, caloDim.dz()); dd4hep::Tube servicesBackShape(bathRmax, cryoBackColdDim.rmin(), caloDim.dz()); @@ -185,13 +198,13 @@ static dd4hep::detail::Ref_t createECalBarrelInclinedFCCee(dd4hep::Detector& aLc if (cryoFrontSensitive) { servicesFrontVol.setSensitiveDetector(aSensDet); servicesFrontPhysVol.addPhysVolID("cryo", 1); - servicesFrontPhysVol.addPhysVolID("type", 7); + servicesFrontPhysVol.addPhysVolID("type", 8); lLog << MSG::INFO << "Services front volume set as sensitive" << endmsg; } if (cryoBackSensitive) { servicesBackVol.setSensitiveDetector(aSensDet); servicesBackPhysVol.addPhysVolID("cryo", 1); - servicesBackPhysVol.addPhysVolID("type", 7); + servicesBackPhysVol.addPhysVolID("type", 9); lLog << MSG::INFO << "Services back volume set as sensitive" << endmsg; } dd4hep::DetElement servicesFrontDetElem(caloDetElem, "services_front", 0); From 4e6d030706c47c8ea6897c49133d36970bf3720f Mon Sep 17 00:00:00 2001 From: Jana Date: Tue, 29 Aug 2023 10:48:51 +0200 Subject: [PATCH 7/9] xml file fixed --- Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml index df5d4ac6..dc9b175a 100644 --- a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml +++ b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml @@ -104,7 +104,6 @@ -<<<<<<< HEAD @@ -126,12 +125,6 @@ -======= - - - - ->>>>>>> origin From 8e30cdd5d8c6e1d4f3cb646531f842fbee87100e Mon Sep 17 00:00:00 2001 From: Jana Date: Wed, 30 Aug 2023 15:53:18 +0200 Subject: [PATCH 8/9] double vessel cryo --- .../compact/FCCee_ECalBarrel.xml | 66 ++----- .../compact/FCCee_ECalBarrel_upstream.xml | 6 +- .../compact/FCCee_ECalBarrel_v1.xml | 163 ++++++++++++++++++ 3 files changed, 186 insertions(+), 49 deletions(-) create mode 100644 Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_v1.xml diff --git a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml index dc9b175a..382af33c 100644 --- a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml +++ b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml @@ -1,14 +1,6 @@ - - + - + Settings for the inclined EM calorimeter. The barrel is filled with liquid argon. Passive material includes lead in the middle and steal on the outside, glued together. @@ -26,21 +18,20 @@ - - - + + - + - + - + @@ -48,13 +39,11 @@ - - + - @@ -67,7 +56,7 @@ taking into account the angular projection effect --> - + @@ -77,7 +66,7 @@ - + @@ -86,49 +75,32 @@ - system:4,cryo:1,type:4,subtype:3,layer:8,module:11,eta:9 + system:4,cryo:1,type:3,subtype:3,layer:8,module:11,eta:9 - system:4,cryo:1,type:4,subtype:3,layer:8,eta:9,phi:10 + system:4,cryo:1,type:3,subtype:3,layer:8,eta:9,phi:10 - + - + - - - - - - - - - - - - - - - - - - - - - + + + + - + diff --git a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_upstream.xml b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_upstream.xml index 20e4a308..b3eee7d8 100644 --- a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_upstream.xml +++ b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_upstream.xml @@ -11,7 +11,9 @@ - + + + @@ -132,4 +134,4 @@ - \ No newline at end of file + diff --git a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_v1.xml b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_v1.xml new file mode 100644 index 00000000..dc9b175a --- /dev/null +++ b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_v1.xml @@ -0,0 +1,163 @@ + + + + + + Settings for the inclined EM calorimeter. + The barrel is filled with liquid argon. Passive material includes lead in the middle and steal on the outside, glued together. + Passive plates are inclined by a certain angle from the radial direction. + In between of two passive plates there is a readout. + Space between the plate and readout is of trapezoidal shape and filled with liquid argon. + Definition of sizes, visualization settings, readout and longitudinal segmentation are specified. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + system:4,cryo:1,type:4,subtype:3,layer:8,module:11,eta:9 + + + + + + + system:4,cryo:1,type:4,subtype:3,layer:8,eta:9,phi:10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 973e99fae839321d2efc906b2072a7029ccf55bc Mon Sep 17 00:00:00 2001 From: Jana Date: Thu, 31 Aug 2023 09:03:06 +0200 Subject: [PATCH 9/9] info added --- .../compact/FCCee_ECalBarrel.xml | 20 +++++++++++++------ ...lBarrel_v1.xml => FCCee_ECalBarrel_v2.xml} | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-) rename Detector/DetFCCeeECalInclined/compact/{FCCee_ECalBarrel_v1.xml => FCCee_ECalBarrel_v2.xml} (99%) diff --git a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml index 382af33c..e9d45224 100644 --- a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml +++ b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel.xml @@ -1,6 +1,14 @@ - + + - + Settings for the inclined EM calorimeter. The barrel is filled with liquid argon. Passive material includes lead in the middle and steal on the outside, glued together. @@ -56,7 +64,7 @@ taking into account the angular projection effect --> - + @@ -66,7 +74,7 @@ - + @@ -74,7 +82,7 @@ - + system:4,cryo:1,type:3,subtype:3,layer:8,module:11,eta:9 @@ -93,7 +101,7 @@ - + diff --git a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_v1.xml b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_v2.xml similarity index 99% rename from Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_v1.xml rename to Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_v2.xml index dc9b175a..98ec8a50 100644 --- a/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_v1.xml +++ b/Detector/DetFCCeeECalInclined/compact/FCCee_ECalBarrel_v2.xml @@ -10,7 +10,7 @@ status="development" version="1.0"> - Settings for the inclined EM calorimeter. + Settings for the inclined EM calorimeter using FCCee factory (EmCaloBarrelInclinedFCCee). The barrel is filled with liquid argon. Passive material includes lead in the middle and steal on the outside, glued together. Passive plates are inclined by a certain angle from the radial direction. In between of two passive plates there is a readout.