From a23f73354503cb63c011fe7b24d66c0fff07ff74 Mon Sep 17 00:00:00 2001 From: CoralieNeubueser Date: Fri, 9 Mar 2018 11:05:42 +0100 Subject: [PATCH 01/10] updates in the TileCal geometry to replace the phi segmentation, thus the readout changed as well --- .../compact/FCChh_HCalBarrel_TileCal.xml | 12 +- .../FCChh_HCalExtendedBarrel_TileCal.xml | 42 ++++--- .../FCChh_HCalExtendedTileDefinition.xml | 64 +++++----- .../compact/FCChh_HCalTileDefinition.xml | 2 +- .../DetFCChhHCalTile/src/HCalBarrel_geo.cpp | 22 ++-- .../src/HCalExtBarrel_geo.cpp | 104 ++++++++-------- .../runFullCaloSystem_SimAndDigitisation.py | 114 +++++------------- .../options/runHcalDigitisationFlatNoise.py | 9 +- .../runHcalDigitisationWithoutNoise.py | 7 +- 9 files changed, 162 insertions(+), 214 deletions(-) diff --git a/Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml b/Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml index d91d461fb..91702ecd0 100644 --- a/Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml +++ b/Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml @@ -15,7 +15,7 @@ - + @@ -50,14 +50,18 @@ + + + system:4,module:8,row:9,layer:5 + system:4,module:7,row:9,layer:5,tile:2,eta:1,phi:10 - - - system:4,module:7,row:9,layer:5,tile:2,eta:9,phi:10 + + + system:4,module:8,row:9,layer:5,eta:9 diff --git a/Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedBarrel_TileCal.xml b/Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedBarrel_TileCal.xml index 61e4ca647..5a1c2dd0a 100644 --- a/Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedBarrel_TileCal.xml +++ b/Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedBarrel_TileCal.xml @@ -13,27 +13,27 @@ - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - - - - + + + + @@ -51,6 +51,10 @@ + + + system:4,type:2,module:9,row:8,layer:4 + diff --git a/Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedTileDefinition.xml b/Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedTileDefinition.xml index afd91065d..8f3e02a42 100644 --- a/Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedTileDefinition.xml +++ b/Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedTileDefinition.xml @@ -1,67 +1,67 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + + + + diff --git a/Detector/DetFCChhHCalTile/compact/FCChh_HCalTileDefinition.xml b/Detector/DetFCChhHCalTile/compact/FCChh_HCalTileDefinition.xml index 2df064973..2d0501b63 100644 --- a/Detector/DetFCChhHCalTile/compact/FCChh_HCalTileDefinition.xml +++ b/Detector/DetFCChhHCalTile/compact/FCChh_HCalTileDefinition.xml @@ -1,4 +1,4 @@ - + diff --git a/Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp b/Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp index 0bd78408f..5d10c4166 100644 --- a/Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp +++ b/Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp @@ -193,7 +193,7 @@ static dd4hep::Ref_t createHCal(dd4hep::Detector& lcdd, xml_h xmlElement, dd4hep lcdd.material(xComp.materialStr())); tileVol.setSensitiveDetector(sensDet); tiles.push_back(layerVolume.placeVolume(tileVol, offset)); - tiles.back().addPhysVolID("tile", idxActMod); + // tiles.back().addPhysVolID("tile", idxActMod); idxActMod++; } else { tiles.push_back(layerVolume.placeVolume(modCompVol, offset)); @@ -217,19 +217,22 @@ static dd4hep::Ref_t createHCal(dd4hep::Detector& lcdd, xml_h xmlElement, dd4hep for (unsigned int idxZRow = 0; idxZRow < numSequencesZ; ++idxZRow) { double zOffset = -dzDetector + dZEndPlate + space + (2 * idxZRow + 1) * (dzSequence * 0.5); - lLog << MSG::DEBUG << "z offset of wedges = " << zOffset << std::endl; + // unsigned int seqId = idxZRow % 3; + lLog << MSG::DEBUG << "z offset of wedges = " << zOffset << endmsg; if ((-dzDetector + zOffset) >= dzDetector) { - lLog << MSG::WARNING << " WARNING!!!! Module position outside of detector envelope" << std::endl; + lLog << MSG::WARNING << " WARNING!!!! Module position outside of detector envelope" << endmsg; } dd4hep::Position wedgeOffset(0, zOffset, 0); + // dd4hep::Transform3D rotate(dd4hep::RotationY(seqId*-0.5 * dd4hep::pi), wedgeOffset); // Fill vector for DetElements rows.push_back(moduleVolume.placeVolume(wedgeVolume, wedgeOffset)); rows.back().addPhysVolID("row", idxZRow); } for (unsigned int idxPhi = 0; idxPhi < numSequencesPhi; ++idxPhi) { - double phi = 0.5 * dphi + idxPhi * dphi; // 0.5*dphi for middle of module + double phi = -0.5 * dd4hep::pi - dphi * 0.5 - + idxPhi * dphi; // modules placed following phi-eta segmentation with offset: -pi double yPosModule = (sensitiveBarrelRmin + dzModule) * cos(phi); double xPosModule = (sensitiveBarrelRmin + dzModule) * sin(phi); double yPosSupport = (sensitiveBarrelRmin + 2 * dzModule + dzSupport) * cos(phi); @@ -239,20 +242,19 @@ static dd4hep::Ref_t createHCal(dd4hep::Detector& lcdd, xml_h xmlElement, dd4hep dd4hep::Position supportOffset(xPosSupport, yPosSupport, 0); dd4hep::Transform3D trans(dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), moduleOffset); - dd4hep::Transform3D transS(dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), supportOffset); + // Fill the vectors of DetElements modules.push_back(envelopeVolume.placeVolume(moduleVolume, trans)); modules.back().addPhysVolID("module", idxPhi); supports.push_back(envelopeVolume.placeVolume(steelSupportVolume, transS)); - // } } // Placement of DetElements - lLog << MSG::DEBUG << "Modules in phi : " << modules.size() << std::endl; - lLog << MSG::DEBUG << "Rows in z : " << rows.size() << std::endl; - lLog << MSG::DEBUG << "Layers in r : " << layers.size() << std::endl; - lLog << MSG::DEBUG << "Tiles in layers :" << tilesInLayers[1].size() << std::endl; + lLog << MSG::DEBUG << "Modules in phi : " << modules.size() << endmsg; + lLog << MSG::DEBUG << "Rows in z : " << rows.size() << endmsg; + lLog << MSG::DEBUG << "Layers in r : " << layers.size() << endmsg; + lLog << MSG::DEBUG << "Tiles in layers :" << tilesInLayers[1].size() << endmsg; for (uint iPhi = 0; iPhi < numSequencesPhi; iPhi++) { DetElement moduleDet(hCal, dd4hep::xml::_toString(iPhi, "module%d"), iPhi); diff --git a/Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp b/Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp index 46eda271d..a77968055 100644 --- a/Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp +++ b/Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp @@ -12,9 +12,8 @@ using dd4hep::xml::Dimension; using dd4hep::PlacedVolume; namespace det { -void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet, - dd4hep::Volume& aEnvelope, dd4hep::DetElement& aHCal, - dd4hep::xml::Handle_t& aXmlElement, int sign) { +void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector& aSensDet, dd4hep::Volume& aEnvelope, + dd4hep::DetElement& aHCal, dd4hep::xml::Handle_t& aXmlElement, int sign) { dd4hep::SensitiveDetector sensDet = aSensDet; Dimension sensDetType = aXmlElement.child(_Unicode(sensitive)); @@ -109,7 +108,7 @@ void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector // 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)); + (dzDetector1 - 2 * dZEndPlate - space)); Volume facePlateVol1("facePlateVol1", facePlateShape1, aLcdd.material(xFacePlate.materialStr())); facePlateVol1.setVisAttributes(aLcdd, xFacePlate.visStr()); dd4hep::Position offsetFace1(0, 0, sign * extBarrelOffset1); @@ -117,7 +116,7 @@ void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector // 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 - 2 * dZEndPlate - space)); + (dzDetector2 - 2 * dZEndPlate - space)); Volume facePlateVol2("facePlateVol2", facePlateShape2, aLcdd.material(xFacePlate.materialStr())); facePlateVol2.setVisAttributes(aLcdd, xFacePlate.visStr()); dd4hep::Position offsetFace2(0, 0, sign * extBarrelOffset2); @@ -191,9 +190,9 @@ void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector tilesInLayers.reserve(layerDepths1.size() + layerDepths2.size()); // First we construct base wedges: - Volume WedgeVolume1("WedgeVolume1", dd4hep::Trapezoid(dx1Module1, dx2Module1, dy0, dy0, dzModule1), + Volume WedgeVolume1("WedgeVolumeEB", dd4hep::Trapezoid(dx1Module1, dx2Module1, dy0, dy0, dzModule1), aLcdd.material("Air")); - Volume WedgeVolume2("WedgeVolume2", dd4hep::Trapezoid(dx1Module2, dx2Module2, dy0, dy0, dzModule2), + Volume WedgeVolume2("WedgeVolumeEB", dd4hep::Trapezoid(dx1Module2, dx2Module2, dy0, dy0, dzModule2), aLcdd.material("Air")); double layerR = 0.; // Placement of subWedges in Wedge @@ -212,15 +211,15 @@ void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector layerR += layerDepths1.at(idxLayer); - Volume layerVolume("layerVolume", dd4hep::Trapezoid(dx1, dx2, dy0, dy0, dz0), aLcdd.material("Air")); - layerVolume.setVisAttributes(aLcdd.invisible()); + Volume layerVolumeEB("layerVolumeEB", dd4hep::Trapezoid(dx1, dx2, dy0, dy0, dz0), aLcdd.material("Air")); + layerVolumeEB.setVisAttributes(aLcdd.invisible()); unsigned int idxSubMod = 0; unsigned int idxActMod = 0; double modCompZOffset = -sequenceDimensions.dz() * 0.5; // layer middle offset dd4hep::Position modOffset(0, 0, rMiddle); - layers.push_back(WedgeVolume1.placeVolume(layerVolume, modOffset)); + layers.push_back(WedgeVolume1.placeVolume(layerVolumeEB, modOffset)); layers.back().addPhysVolID("layer", idxLayer); std::vector tiles; @@ -229,21 +228,21 @@ void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector ++xCompColl, ++idxSubMod) { xml_comp_t xComp = xCompColl; double dyComp = xComp.thickness() * 0.5; - Volume modCompVol("modCompVolume", dd4hep::Trapezoid(dx1, dx2, dyComp, dyComp, dz0), + Volume modCompVol("modCompVolumeEB", dd4hep::Trapezoid(dx1, dx2, dyComp, dyComp, dz0), aLcdd.material(xComp.materialStr())); modCompVol.setVisAttributes(aLcdd, xComp.visStr()); dd4hep::Position offset(0, modCompZOffset + dyComp + xComp.y_offset() / 2, 0); if (xComp.isSensitive()) { - Volume tileVol("tileVolume", dd4hep::Trapezoid(dx1, dx2, dyComp, dyComp, dz0), + Volume tileVol("tileVolumeEB", dd4hep::Trapezoid(dx1, dx2, dyComp, dyComp, dz0), aLcdd.material(xComp.materialStr())); tileVol.setVisAttributes(aLcdd, xComp.visStr()); tileVol.setSensitiveDetector(sensDet); - tiles.push_back(layerVolume.placeVolume(tileVol, offset)); - tiles.back().addPhysVolID("tile", idxActMod); + tiles.push_back(layerVolumeEB.placeVolume(tileVol, offset)); + // tiles.back().addPhysVolID("tile", idxActMod); idxActMod++; } else { - tiles.push_back(layerVolume.placeVolume(modCompVol, offset)); + tiles.push_back(layerVolumeEB.placeVolume(modCompVol, offset)); } modCompZOffset += xComp.thickness() + xComp.y_offset(); } @@ -268,15 +267,15 @@ void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector layerR += layerDepths2.at(idxLayer); - Volume layerVolume("layerVolume", dd4hep::Trapezoid(dx1, dx2, dy0, dy0, dz0), aLcdd.material("Air")); - layerVolume.setVisAttributes(aLcdd.invisible()); + Volume layerVolumeEB("layerVolumeEB", dd4hep::Trapezoid(dx1, dx2, dy0, dy0, dz0), aLcdd.material("Air")); + layerVolumeEB.setVisAttributes(aLcdd.invisible()); unsigned int idxSubMod = 0; unsigned int idxActMod = 0; double modCompZOffset = -sequenceDimensions.dz() * 0.5; // layer middle offset dd4hep::Position modOffset(0, 0, rMiddle); - layers.push_back(WedgeVolume2.placeVolume(layerVolume, modOffset)); + layers.push_back(WedgeVolume2.placeVolume(layerVolumeEB, modOffset)); layers.back().addPhysVolID("layer", idxLayer); std::vector tiles; @@ -285,21 +284,21 @@ void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector ++xCompColl, ++idxSubMod) { xml_comp_t xComp = xCompColl; double dyComp = xComp.thickness() * 0.5; - Volume modCompVol("modCompVolume", dd4hep::Trapezoid(dx1, dx2, dyComp, dyComp, dz0), + Volume modCompVol("modCompVolumeEB", dd4hep::Trapezoid(dx1, dx2, dyComp, dyComp, dz0), aLcdd.material(xComp.materialStr())); modCompVol.setVisAttributes(aLcdd, xComp.visStr()); dd4hep::Position offset(0, modCompZOffset + dyComp + xComp.y_offset() / 2, 0); if (xComp.isSensitive()) { - Volume tileVol("tileVolume", dd4hep::Trapezoid(dx1, dx2, dyComp, dyComp, dz0), + Volume tileVol("tileVolumeEB", dd4hep::Trapezoid(dx1, dx2, dyComp, dyComp, dz0), aLcdd.material(xComp.materialStr())); tileVol.setVisAttributes(aLcdd, xComp.visStr()); tileVol.setSensitiveDetector(sensDet); - tiles.push_back(layerVolume.placeVolume(tileVol, offset)); - tiles.back().addPhysVolID("tile", idxActMod); + tiles.push_back(layerVolumeEB.placeVolume(tileVol, offset)); + // tiles.back().addPhysVolID("tile", idxActMod); idxActMod++; } else { - tiles.push_back(layerVolume.placeVolume(modCompVol, offset)); + tiles.push_back(layerVolumeEB.placeVolume(modCompVol, offset)); } modCompZOffset += xComp.thickness() + xComp.y_offset(); } @@ -307,26 +306,24 @@ void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector tilesInLayers.push_back(tiles); } - Volume ModuleVolume1("ModuleVolume1", + Volume ModuleVolume1("ModuleVolumeEB", dd4hep::Trapezoid(dx1Module1, dx2Module1, (dzDetector1 - 2 * dZEndPlate - space), - (dzDetector1 - 2 * dZEndPlate - space), dzModule1), + (dzDetector1 - 2 * dZEndPlate - space), dzModule1), aLcdd.material("Air")); - Volume ModuleVolume2("ModuleVolume2", + Volume ModuleVolume2("ModuleVolumeEB", dd4hep::Trapezoid(dx1Module2, dx2Module2, (dzDetector2 - 2 * dZEndPlate - space), - (dzDetector2 - 2 * dZEndPlate - space), dzModule2), + (dzDetector2 - 2 * dZEndPlate - space), dzModule2), aLcdd.material("Air")); Volume SteelSupportVolume1("SteelSupportVolume1", - dd4hep::Trapezoid(dx1Support1, dx2Support1, - (dzDetector1 - 2 * dZEndPlate - space), - (dzDetector1 - 2 * dZEndPlate - space), dzSupport), + dd4hep::Trapezoid(dx1Support1, dx2Support1, (dzDetector1 - 2 * dZEndPlate - space), + (dzDetector1 - 2 * dZEndPlate - space), dzSupport), aLcdd.material(xSteelSupport.materialStr())); Volume SteelSupportVolume2("SteelSupportVolume2", - dd4hep::Trapezoid(dx1Support2, dx2Support2, - (dzDetector2 - 2 * dZEndPlate - space), - (dzDetector2 - 2 * dZEndPlate - space), dzSupport), + dd4hep::Trapezoid(dx1Support2, dx2Support2, (dzDetector2 - 2 * dZEndPlate - space), + (dzDetector2 - 2 * dZEndPlate - space), dzSupport), aLcdd.material(xSteelSupport.materialStr())); // Placement of rings @@ -350,7 +347,7 @@ void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector } for (unsigned int idxPhi = 0; idxPhi < numSequencesPhi; ++idxPhi) { - double phi = 0.5 * dphi + idxPhi * dphi; // 0.5*dphi for middle of module + double phi = -dphi * 0.5 - idxPhi * dphi - 0.5 * dd4hep::pi; // modules placed following phi-eta segmentation double yPosModule1 = (sensitiveBarrel1Rmin + dzModule1) * cos(phi); double xPosModule1 = (sensitiveBarrel1Rmin + dzModule1) * sin(phi); double yPosSupport1 = (sensitiveBarrel1Rmin + 2 * dzModule1 + dzSupport) * cos(phi); @@ -370,17 +367,13 @@ void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector dd4hep::Position supportOffset2(xPosSupport2, yPosSupport2, sign * extBarrelOffset2); // Placement around central Barrel - dd4hep::Transform3D trans1( - dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), moduleOffset1); + dd4hep::Transform3D trans1(dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), moduleOffset1); - dd4hep::Transform3D trans1S( - dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), supportOffset1); + dd4hep::Transform3D trans1S(dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), supportOffset1); - dd4hep::Transform3D trans2( - dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), moduleOffset2); + dd4hep::Transform3D trans2(dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), moduleOffset2); - dd4hep::Transform3D trans2S( - dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), supportOffset2); + dd4hep::Transform3D trans2S(dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), supportOffset2); // Fill the vectors of DetElements modules1.push_back(aEnvelope.placeVolume(ModuleVolume1, trans1)); @@ -412,30 +405,30 @@ void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector support2.setPlacement(supports2[iPhi]); for (uint iZ = 0; iZ < numSequencesZ1; iZ++) { - DetElement wedgeDet(moduleDet1, dd4hep::xml::_toString(iZ, "row%d"), iZ); - wedgeDet.setPlacement(rows[iZ]); + DetElement wedgeEBDet(moduleDet1, dd4hep::xml::_toString(iZ, "EBrow%d"), iZ); + wedgeEBDet.setPlacement(rows[iZ]); for (uint iLayer = 0; iLayer < numSequencesR1; iLayer++) { - DetElement layerDet(wedgeDet, dd4hep::xml::_toString(iLayer, "layer%d"), iLayer); - layerDet.setPlacement(layers[iLayer]); + DetElement layerEBDet(wedgeEBDet, dd4hep::xml::_toString(iLayer, "EBlayer%d"), iLayer); + layerEBDet.setPlacement(layers[iLayer]); for (uint iTile = 0; iTile < tilesInLayers[iLayer].size(); iTile++) { - DetElement tileDet(layerDet, dd4hep::xml::_toString(iTile, "tile%d"), iTile); - tileDet.setPlacement(tilesInLayers[iLayer][iTile]); + DetElement tileEBDet(layerEBDet, dd4hep::xml::_toString(iTile, "EBtile%d"), iTile); + tileEBDet.setPlacement(tilesInLayers[iLayer][iTile]); } } } for (uint iZ = numSequencesZ1; iZ < (numSequencesZ1 + numSequencesZ2); iZ++) { - DetElement wedgeDet(moduleDet2, dd4hep::xml::_toString(iZ, "row%d"), iZ); - wedgeDet.setPlacement(rows[iZ]); + DetElement wedgeEBDet(moduleDet2, dd4hep::xml::_toString(iZ, "EBrow%d"), iZ); + wedgeEBDet.setPlacement(rows[iZ]); for (uint iLayer = numSequencesR1; iLayer < (numSequencesR1 + numSequencesR2); iLayer++) { - DetElement layerDet(wedgeDet, dd4hep::xml::_toString(iLayer, "layer%d"), iLayer); - layerDet.setPlacement(layers[iLayer]); + DetElement layerEBDet(wedgeEBDet, dd4hep::xml::_toString(iLayer, "EBlayer%d"), iLayer); + layerEBDet.setPlacement(layers[iLayer]); for (uint iTile = 0; iTile < tilesInLayers[iLayer].size(); iTile++) { - DetElement tileDet(layerDet, dd4hep::xml::_toString(iTile, "tile%d"), iTile); - tileDet.setPlacement(tilesInLayers[iLayer][iTile]); + DetElement tileEBDet(layerEBDet, dd4hep::xml::_toString(iTile, "EBtile%d"), iTile); + tileEBDet.setPlacement(tilesInLayers[iLayer][iTile]); } } } @@ -443,8 +436,7 @@ void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector return; } -static dd4hep::Ref_t createHCalEB(dd4hep::Detector& lcdd, xml_h xmlElement, - dd4hep::SensitiveDetector sensDet) { +static dd4hep::Ref_t createHCalEB(dd4hep::Detector& lcdd, xml_h xmlElement, dd4hep::SensitiveDetector sensDet) { // Get the Gaudi message service and message stream: ServiceHandle msgSvc("MessageSvc", "ExtHCalConstruction"); diff --git a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py index 0b55204a7..0a1edb55e 100644 --- a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py +++ b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py @@ -21,7 +21,8 @@ 'file:Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml', 'file:Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedBarrel_TileCal.xml', 'file:Detector/DetFCChhCalDiscs/compact/Endcaps_coneCryo.xml', - 'file:Detector/DetFCChhCalDiscs/compact/Forward_coneCryo.xml' + 'file:Detector/DetFCChhCalDiscs/compact/Forward_coneCryo.xml', + 'file:Detector/DetFCChhTailCatcher/compact/FCChh_TailCatcher.xml' ], OutputLevel = INFO) @@ -50,17 +51,15 @@ ecalEndcapReadoutName = "EMECPhiEta" ecalFwdReadoutName = "EMFwdPhiEta" # HCAL readouts -hcalReadoutName = "BarHCal_Readout" -newHcalReadoutName = hcalReadoutName + "_phieta" -extHcalReadoutName = "ExtBarHCal_Readout" -newExtHcalReadoutName = extHcalReadoutName + "_phieta" +hcalReadoutName = "HCalBarrelReadout" +extHcalReadoutName = "HCalExtBarrelReadout" hcalEndcapReadoutName = "HECPhiEta" hcalFwdReadoutName = "HFwdPhiEta" +# Tail Catcher readout +tailCatcherReadoutName = "Muons_Readout" # layers to be merged in endcaps & forward calo -ecalEndcapNumberOfLayersToMerge = [26]*5+[27] -ecalFwdNumberOfLayersToMerge = [7]*5+[8] -hcalEndcapNumberOfLayersToMerge = [13]+[14]*5 -hcalFwdNumberOfLayersToMerge = [8]+[9]*5 +ecalEndcapNumberOfLayersToMerge = [2] + [2] + [4]*38 +hcalEndcapNumberOfLayersToMerge = [2] + [4]*20 identifierName = "layer" volumeName = "layer" @@ -86,6 +85,9 @@ savehcalfwdtool = SimG4SaveCalHits("saveHCalFwdHits", readoutNames = [hcalFwdReadoutName]) savehcalfwdtool.positionedCaloHits.Path = "HCalFwdPositionedHits" savehcalfwdtool.caloHits.Path = "HCalFwdHits" +savetailcatchertool = SimG4SaveCalHits("saveTailCatcherHits", readoutNames = [tailCatcherReadoutName]) +savetailcatchertool.positionedCaloHits = "TailCatcherPositionedHits" +savetailcatchertool.caloHits = "TailCatcherHits" # next, create the G4 algorithm, giving the list of names of tools ("XX/YY") from Configurables import SimG4SingleParticleGeneratorTool @@ -97,7 +99,7 @@ outputs= ["SimG4SaveCalHits/saveECalBarrelHits", "SimG4SaveCalHits/saveECalEndcapHits", "SimG4SaveCalHits/saveECalFwdHits", "SimG4SaveCalHits/saveHCalHits", "SimG4SaveCalHits/saveExtHCalHits", "SimG4SaveCalHits/saveHCalEndcapHits", - "SimG4SaveCalHits/saveHCalFwdHits"], + "SimG4SaveCalHits/saveHCalFwdHits", "SimG4SaveCalHits/saveTailCatcherHits"], eventProvider=pgun, OutputLevel=INFO) @@ -178,25 +180,12 @@ createEcalEndcapCells.hits.Path="mergedECalEndcapHits" createEcalEndcapCells.cells.Path="ECalEndcapCells" -# Create Ecal cells in forward -mergelayersEcalFwd = MergeLayers("MergeLayersEcalFwd", - # take the bitfield description from the geometry service - readout = ecalFwdReadoutName, - # cells in which field should be merged - identifier = identifierName, - volumeName = volumeName, - # how many cells to merge - merge = ecalFwdNumberOfLayersToMerge, - OutputLevel = INFO) -mergelayersEcalFwd.inhits.Path = "ECalFwdHits" -mergelayersEcalFwd.outhits.Path = "mergedECalFwdHits" - createEcalFwdCells = CreateCaloCells("CreateEcalFwdCaloCells", doCellCalibration=True, calibTool=calibEcalFwd, addCellNoise=False, filterCellNoise=False, OutputLevel=INFO) -createEcalFwdCells.hits.Path="mergedECalFwdHits" +createEcalFwdCells.hits.Path="ECalFwdHits" createEcalFwdCells.cells.Path="ECalFwdCells" # Create cells in HCal @@ -208,26 +197,7 @@ addCellNoise = False, filterCellNoise = False, OutputLevel = INFO, hits="HCalHits", - cells="HCalCells") - -# additionally for HCal -positionsHcal = CreateVolumeCaloPositions("positionsHcal", OutputLevel = INFO) -positionsHcal.hits.Path = "HCalCells" -positionsHcal.positionedHits.Path = "HCalPositions" - -from Configurables import RedoSegmentation -resegmentHcal = RedoSegmentation("ReSegmentationHcal", - # old bitfield (readout) - oldReadoutName = hcalReadoutName, - # # specify which fields are going to be altered (deleted/rewritten) - oldSegmentationIds = ["eta","phi"], - # new bitfield (readout), with new segmentation - newReadoutName = newHcalReadoutName, - debugPrint = 10, - OutputLevel = INFO, - inhits = "HCalPositions", - outhits = "newHCalCells") - + cells="HCalBarrelCells") # Hcal extended barrel cells createExtHcalCells = CreateCaloCells("CreateExtHcalCaloCells", @@ -236,24 +206,7 @@ addCellNoise = False, filterCellNoise = False, OutputLevel = INFO, hits="ExtHCalHits", - cells="ExtHCalCells") - -positionsExtHcal = CreateVolumeCaloPositions("positionsExtHcal", OutputLevel = INFO) -positionsExtHcal.hits.Path = "ExtHCalCells" -positionsExtHcal.positionedHits.Path = "ExtHCalPositions" - -resegmentExtHcal = RedoSegmentation("ReSegmentationExtHcal", - # old bitfield (readout) - oldReadoutName = extHcalReadoutName, - # specify which fields are going to be altered (deleted/rewritten) - oldSegmentationIds = ["eta","phi"], - # new bitfield (readout), with new segmentation - newReadoutName = newExtHcalReadoutName, - debugPrint = 10, - OutputLevel = INFO, - inhits = "ExtHCalPositions", - outhits = "newExtHCalCells") - + cells="HCalExtBarrelCells") # Create Hcal cells in endcaps mergelayersHcalEndcap = MergeLayers("MergeLayersHcalEndcap", @@ -276,30 +229,25 @@ createHcalEndcapCells.hits.Path="mergedHCalEndcapHits" createHcalEndcapCells.cells.Path="HCalEndcapCells" -# Create Hcal cells in forward -mergelayersHcalFwd = MergeLayers("MergeLayersHcalFwd", - # take the bitfield description from the geometry service - readout = hcalFwdReadoutName, - # cells in which field should be merged - identifier = identifierName, - volumeName = volumeName, - # how many cells to merge - merge = hcalFwdNumberOfLayersToMerge, - OutputLevel = INFO) -mergelayersHcalFwd.inhits.Path = "HCalFwdHits" -mergelayersHcalFwd.outhits.Path = "mergedHCalFwdHits" - createHcalFwdCells = CreateCaloCells("CreateHcalFwdCaloCells", doCellCalibration=True, calibTool=calibHcalFwd, addCellNoise=False, filterCellNoise=False, OutputLevel=INFO) -createHcalFwdCells.hits.Path="mergedHCalFwdHits" +createHcalFwdCells.hits.Path="HCalFwdHits" createHcalFwdCells.cells.Path="HCalFwdCells" +# -> Tail Catcher +createTailCatcherCells = CreateCaloCells("CreateTailCatcherCells", + doCellCalibration=False, + addCellNoise = False, filterCellNoise = False, + OutputLevel = INFO, + hits="TailCatcherHits", + cells="TailCatcherCells") + out = PodioOutput("out", OutputLevel=INFO) -out.outputCommands = ["drop *", "keep ECalBarrelCells", "keep ECalEndcapCells", "keep ECalFwdCells", "keep newHCalCells", "keep newExtHCalCells", "keep HCalEndcapCells", "keep HCalFwdCells"] +out.outputCommands = ["drop *", "keep ECalBarrelCells", "keep ECalEndcapCells", "keep ECalFwdCells", "keep HCalBarrelCells", "keep HCalExtBarrelCells", "keep HCalEndcapCells", "keep HCalFwdCells", "keep TailCatcherCells", "keep GenParticles","keep GenVertices"] out.filename = "output_fullCalo_SimAndDigi_e50GeV_"+str(num_events)+"events.root" #CPU information @@ -315,13 +263,10 @@ createEcalEndcapCells.AuditExecute = True createEcalFwdCells.AuditExecute = True createHcalCells.AuditExecute = True -positionsHcal.AuditExecute = True -resegmentHcal.AuditExecute = True createExtHcalCells.AuditExecute = True -positionsExtHcal.AuditExecute = True -resegmentExtHcal.AuditExecute = True createHcalEndcapCells.AuditExecute = True createHcalFwdCells.AuditExecute = True +createTailCatcherCells.AuditExecute = True out.AuditExecute = True ApplicationMgr( @@ -332,18 +277,13 @@ createEcalBarrelCells, mergelayersEcalEndcap, createEcalEndcapCells, - mergelayersEcalFwd, createEcalFwdCells, createHcalCells, - positionsHcal, - resegmentHcal, createExtHcalCells, - positionsExtHcal, - resegmentExtHcal, mergelayersHcalEndcap, createHcalEndcapCells, - mergelayersHcalFwd, createHcalFwdCells, + createTailCatcherCells, out ], EvtSel = 'NONE', diff --git a/Reconstruction/RecCalorimeter/tests/options/runHcalDigitisationFlatNoise.py b/Reconstruction/RecCalorimeter/tests/options/runHcalDigitisationFlatNoise.py index f6e455ad4..0b54bd076 100644 --- a/Reconstruction/RecCalorimeter/tests/options/runHcalDigitisationFlatNoise.py +++ b/Reconstruction/RecCalorimeter/tests/options/runHcalDigitisationFlatNoise.py @@ -15,18 +15,19 @@ # common HCAL specific information # readout name -hcalReadoutName = "BarHCal_Readout" +hcalReadoutName = "HCalBarrelReadout" # active material identifier name -hcalIdentifierName = ["module", "row", "layer", "tile"] +hcalIdentifierName = ["module", "row", "layer"] # active material volume name -hcalVolumeName = ["moduleVolume", "wedgeVolume", "layerVolume", "modCompVolume"] +hcalVolumeName = ["moduleVolume", "wedgeVolume", "layerVolume"] # ECAL bitfield names & values hcalFieldNames=["system"] hcalFieldValues=[8] #Configure tools for calo reconstruction from Configurables import CalibrateCaloHitsTool, NoiseCaloCellsFlatTool, NestedVolumesCaloTool -noise = NoiseCaloCellsFlatTool("HCalNoise") +noise = NoiseCaloCellsFlatTool("HCalNoise", + cellNoise = 0.01) hcalgeo = NestedVolumesCaloTool("HcalGeo", activeVolumeName = hcalVolumeName, activeFieldName = hcalIdentifierName, diff --git a/Reconstruction/RecCalorimeter/tests/options/runHcalDigitisationWithoutNoise.py b/Reconstruction/RecCalorimeter/tests/options/runHcalDigitisationWithoutNoise.py index df723c5c0..90d698484 100644 --- a/Reconstruction/RecCalorimeter/tests/options/runHcalDigitisationWithoutNoise.py +++ b/Reconstruction/RecCalorimeter/tests/options/runHcalDigitisationWithoutNoise.py @@ -13,9 +13,14 @@ 'file:Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml'], OutputLevel = INFO) +#Configure tools for calo reconstruction +from Configurables import CalibrateCaloHitsTool +calibHcells = CalibrateCaloHitsTool("CalibrateHCal", invSamplingFraction="41.7 ") + from Configurables import CreateCaloCells createcells = CreateCaloCells("CreateCaloCells", - doCellCalibration = False, + calibTool=calibHcells, + doCellCalibration = True, addCellNoise = False, filterCellNoise = False, OutputLevel = DEBUG) createcells.hits.Path="HCalHits" From 6382d4e5581f6ab70d9599278a11b2844cdcff11 Mon Sep 17 00:00:00 2001 From: CoralieNeubueser Date: Fri, 9 Mar 2018 11:13:25 +0100 Subject: [PATCH 02/10] cleaned --- Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp | 1 - Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp b/Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp index 5d10c4166..8610e2146 100644 --- a/Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp +++ b/Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp @@ -193,7 +193,6 @@ static dd4hep::Ref_t createHCal(dd4hep::Detector& lcdd, xml_h xmlElement, dd4hep lcdd.material(xComp.materialStr())); tileVol.setSensitiveDetector(sensDet); tiles.push_back(layerVolume.placeVolume(tileVol, offset)); - // tiles.back().addPhysVolID("tile", idxActMod); idxActMod++; } else { tiles.push_back(layerVolume.placeVolume(modCompVol, offset)); diff --git a/Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp b/Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp index a77968055..251f34f51 100644 --- a/Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp +++ b/Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp @@ -239,7 +239,6 @@ void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector tileVol.setVisAttributes(aLcdd, xComp.visStr()); tileVol.setSensitiveDetector(sensDet); tiles.push_back(layerVolumeEB.placeVolume(tileVol, offset)); - // tiles.back().addPhysVolID("tile", idxActMod); idxActMod++; } else { tiles.push_back(layerVolumeEB.placeVolume(modCompVol, offset)); From 398ad956eca4365e987520f9cba4bb4fbdaea49d Mon Sep 17 00:00:00 2001 From: CoralieNeubueser Date: Fri, 9 Mar 2018 14:10:46 +0100 Subject: [PATCH 03/10] updated readout name and cell collection --- .../options/runFullCaloSystem_ReconstructionSW_noNoise.py | 8 ++++---- .../runFullCaloSystem_ReconstructionSW_noiseFromFile.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noNoise.py b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noNoise.py index 619b933c6..ca4df1633 100644 --- a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noNoise.py +++ b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noNoise.py @@ -3,16 +3,16 @@ ecalBarrelCellsName = "ECalBarrelCells" ecalEndcapCellsName = "ECalEndcapCells" ecalFwdCellsName = "ECalFwdCells" -hcalBarrelCellsName = "newHCalCells" -hcalExtBarrelCellsName = "newExtHCalCells" +hcalBarrelCellsName = "HCalBarrelCells" +hcalExtBarrelCellsName = "HCalExtBarrelCells" hcalEndcapCellsName = "HCalEndcapCells" hcalFwdCellsName = "HCalFwdCells" # Readouts ecalBarrelReadoutName = "ECalBarrelPhiEta" ecalEndcapReadoutName = "EMECPhiEta" ecalFwdReadoutName = "EMFwdPhiEta" -hcalBarrelReadoutName = "BarHCal_Readout_phieta" -hcalExtBarrelReadoutName = "ExtBarHCal_Readout_phieta" +hcalBarrelReadoutName = "HCalBarrelReadout" +hcalExtBarrelReadoutName = "HCalExtBarrelReadout" hcalEndcapReadoutName = "HECPhiEta" hcalFwdReadoutName = "HFwdPhiEta" # Number of events diff --git a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py index e85115e15..4a562e355 100644 --- a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py +++ b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py @@ -3,16 +3,16 @@ ecalBarrelCellsName = "ECalBarrelCells" ecalEndcapCellsName = "ECalEndcapCells" ecalFwdCellsName = "ECalFwdCells" -hcalBarrelCellsName = "newHCalCells" -hcalExtBarrelCellsName = "newExtHCalCells" +hcalBarrelCellsName = "HCalBarrelCells" +hcalExtBarrelCellsName = "HCalExtBarrelCells" hcalEndcapCellsName = "HCalEndcapCells" hcalFwdCellsName = "HCalFwdCells" # Readouts ecalBarrelReadoutName = "ECalBarrelPhiEta" ecalEndcapReadoutName = "EMECPhiEtaReco" ecalFwdReadoutName = "EMFwdPhiEta" -hcalBarrelReadoutName = "BarHCal_Readout_phieta" -hcalExtBarrelReadoutName = "ExtBarHCal_Readout_phieta" +hcalBarrelReadoutName = "HCalBarrelReadout" +hcalExtBarrelReadoutName = "HCalExtBarrelReadout" hcalEndcapReadoutName = "HECPhiEta" hcalFwdReadoutName = "HFwdPhiEta" # Number of events From 2aa0dec0653e3a127a73e75ae0d3ef65f2d7fbad Mon Sep 17 00:00:00 2001 From: CoralieNeubueser Date: Fri, 9 Mar 2018 15:26:56 +0100 Subject: [PATCH 04/10] use empty cell collection for hcal w/o eta-phi segmentation --- .../runFullCaloSystem_ReconstructionSW_noNoise.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noNoise.py b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noNoise.py index ca4df1633..b765d069e 100644 --- a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noNoise.py +++ b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noNoise.py @@ -40,6 +40,10 @@ ], OutputLevel = INFO) +from Configurables import CreateEmptyCaloCellsCollection +createemptycells = CreateEmptyCaloCellsCollection("CreateEmptyCaloCells") +createemptycells.cells.Path = "emptyCaloCells" + #Create calo clusters from Configurables import CreateCaloClustersSlidingWindow, CaloTowerTool from GaudiKernel.PhysicalConstants import pi @@ -49,16 +53,16 @@ ecalBarrelReadoutName = ecalBarrelReadoutName, ecalEndcapReadoutName = ecalEndcapReadoutName, ecalFwdReadoutName = ecalFwdReadoutName, - hcalBarrelReadoutName = hcalBarrelReadoutName, - hcalExtBarrelReadoutName = hcalExtBarrelReadoutName, + hcalBarrelReadoutName = ecalBarrelReadoutName, + hcalExtBarrelReadoutName = ecalBarrelReadoutName, hcalEndcapReadoutName = hcalEndcapReadoutName, hcalFwdReadoutName = hcalFwdReadoutName, OutputLevel = DEBUG) towers.ecalBarrelCells.Path = ecalBarrelCellsName towers.ecalEndcapCells.Path = ecalEndcapCellsName towers.ecalFwdCells.Path = ecalFwdCellsName -towers.hcalBarrelCells.Path = hcalBarrelCellsName -towers.hcalExtBarrelCells.Path = hcalExtBarrelCellsName +towers.hcalBarrelCells.Path = "emptyCaloCells" +towers.hcalExtBarrelCells.Path = "emptyCaloCells" towers.hcalEndcapCells.Path = hcalEndcapCellsName towers.hcalFwdCells.Path = hcalFwdCellsName @@ -98,6 +102,7 @@ ApplicationMgr( TopAlg = [podioinput, + createemptycells, createClusters, out ], From 9d086cd7bac1649597b138efe9e10e68f7e277b7 Mon Sep 17 00:00:00 2001 From: CoralieNeubueser Date: Mon, 12 Mar 2018 17:58:28 +0100 Subject: [PATCH 05/10] implemented Annas comments --- .../compact/FCChh_HCalBarrel_TileCal.xml | 12 +--- .../FCChh_HCalExtendedBarrel_TileCal.xml | 10 +--- .../DetFCChhHCalTile/src/HCalBarrel_geo.cpp | 4 +- .../src/HCalExtBarrel_geo.cpp | 3 +- ...FullCaloSystem_ReconstructionSW_noNoise.py | 52 +++++++++++++--- ...loSystem_ReconstructionSW_noiseFromFile.py | 8 +-- .../runFullCaloSystem_SimAndDigitisation.py | 59 ++++++++++++------- 7 files changed, 93 insertions(+), 55 deletions(-) diff --git a/Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml b/Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml index 91702ecd0..5b2c920f2 100644 --- a/Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml +++ b/Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml @@ -51,17 +51,11 @@ - system:4,module:8,row:9,layer:5 - - - - system:4,module:7,row:9,layer:5,tile:2,eta:1,phi:10 - - - - system:4,module:8,row:9,layer:5,eta:9 + + + system:4,module:8,row:9,layer:5,eta:9,phi:10 diff --git a/Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedBarrel_TileCal.xml b/Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedBarrel_TileCal.xml index 5a1c2dd0a..b6b6e54d8 100644 --- a/Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedBarrel_TileCal.xml +++ b/Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedBarrel_TileCal.xml @@ -52,17 +52,11 @@ - system:4,type:2,module:9,row:8,layer:4 - - - - system:4,type:2,module:9,row:8,layer:4,tile:2,eta:1,phi:10 - - + - system:4,type:2,module:9,row:8,layer:4,tile:2,eta:10,phi:10 + system:4,type:2,module:9,row:8,layer:4,eta:10,phi:10 diff --git a/Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp b/Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp index 8610e2146..13c9a7831 100644 --- a/Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp +++ b/Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp @@ -216,14 +216,12 @@ static dd4hep::Ref_t createHCal(dd4hep::Detector& lcdd, xml_h xmlElement, dd4hep for (unsigned int idxZRow = 0; idxZRow < numSequencesZ; ++idxZRow) { double zOffset = -dzDetector + dZEndPlate + space + (2 * idxZRow + 1) * (dzSequence * 0.5); - // unsigned int seqId = idxZRow % 3; lLog << MSG::DEBUG << "z offset of wedges = " << zOffset << endmsg; if ((-dzDetector + zOffset) >= dzDetector) { lLog << MSG::WARNING << " WARNING!!!! Module position outside of detector envelope" << endmsg; } dd4hep::Position wedgeOffset(0, zOffset, 0); - // dd4hep::Transform3D rotate(dd4hep::RotationY(seqId*-0.5 * dd4hep::pi), wedgeOffset); // Fill vector for DetElements rows.push_back(moduleVolume.placeVolume(wedgeVolume, wedgeOffset)); rows.back().addPhysVolID("row", idxZRow); @@ -231,7 +229,7 @@ static dd4hep::Ref_t createHCal(dd4hep::Detector& lcdd, xml_h xmlElement, dd4hep for (unsigned int idxPhi = 0; idxPhi < numSequencesPhi; ++idxPhi) { double phi = -0.5 * dd4hep::pi - dphi * 0.5 - - idxPhi * dphi; // modules placed following phi-eta segmentation with offset: -pi + idxPhi * dphi; // module placement starts at -pi double yPosModule = (sensitiveBarrelRmin + dzModule) * cos(phi); double xPosModule = (sensitiveBarrelRmin + dzModule) * sin(phi); double yPosSupport = (sensitiveBarrelRmin + 2 * dzModule + dzSupport) * cos(phi); diff --git a/Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp b/Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp index 251f34f51..a0032a36b 100644 --- a/Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp +++ b/Detector/DetFCChhHCalTile/src/HCalExtBarrel_geo.cpp @@ -294,7 +294,6 @@ void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector tileVol.setVisAttributes(aLcdd, xComp.visStr()); tileVol.setSensitiveDetector(sensDet); tiles.push_back(layerVolumeEB.placeVolume(tileVol, offset)); - // tiles.back().addPhysVolID("tile", idxActMod); idxActMod++; } else { tiles.push_back(layerVolumeEB.placeVolume(modCompVol, offset)); @@ -346,7 +345,7 @@ void buildEB(MsgStream& lLog, dd4hep::Detector& aLcdd, dd4hep::SensitiveDetector } for (unsigned int idxPhi = 0; idxPhi < numSequencesPhi; ++idxPhi) { - double phi = -dphi * 0.5 - idxPhi * dphi - 0.5 * dd4hep::pi; // modules placed following phi-eta segmentation + double phi = -dphi * 0.5 - idxPhi * dphi - 0.5 * dd4hep::pi; // module placement starts at -pi double yPosModule1 = (sensitiveBarrel1Rmin + dzModule1) * cos(phi); double xPosModule1 = (sensitiveBarrel1Rmin + dzModule1) * sin(phi); double yPosSupport1 = (sensitiveBarrel1Rmin + 2 * dzModule1 + dzSupport) * cos(phi); diff --git a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noNoise.py b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noNoise.py index b765d069e..fd8087aa9 100644 --- a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noNoise.py +++ b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noNoise.py @@ -13,6 +13,8 @@ ecalFwdReadoutName = "EMFwdPhiEta" hcalBarrelReadoutName = "HCalBarrelReadout" hcalExtBarrelReadoutName = "HCalExtBarrelReadout" +hcalBarrelReadoutPhiEtaName = "BarHCal_Readout_phieta" +hcalExtBarrelReadoutPhiEtaName = "ExtBarHCal_Readout_phieta" hcalEndcapReadoutName = "HECPhiEta" hcalFwdReadoutName = "HFwdPhiEta" # Number of events @@ -40,9 +42,40 @@ ], OutputLevel = INFO) -from Configurables import CreateEmptyCaloCellsCollection -createemptycells = CreateEmptyCaloCellsCollection("CreateEmptyCaloCells") -createemptycells.cells.Path = "emptyCaloCells" +# additionally for HCal +from Configurables import CreateVolumeCaloPositions +positionsHcal = CreateVolumeCaloPositions("positionsHcal", OutputLevel = INFO) +positionsHcal.hits.Path = hcalBarrelCellsName +positionsHcal.positionedHits.Path = "HCalBarrelPositions" + +from Configurables import RedoSegmentation +resegmentHcal = RedoSegmentation("ReSegmentationHcal", + # old bitfield (readout) + oldReadoutName = hcalBarrelReadoutName, + # # specify which fields are going to be altered (deleted/rewritten) + # oldSegmentationIds = ["eta","phi"], + # new bitfield (readout), with new segmentation + newReadoutName = hcalBarrelReadoutPhiEtaName, + debugPrint = 10, + OutputLevel = INFO, + inhits = "HCalBarrelPositions", + outhits = "newHCalBarrelCells") + +positionsExtHcal = CreateVolumeCaloPositions("positionsExtHcal", OutputLevel = INFO) +positionsExtHcal.hits.Path = hcalExtBarrelCellsName +positionsExtHcal.positionedHits.Path = "HCalExtBarrelPositions" + +resegmentExtHcal = RedoSegmentation("ReSegmentationExtHcal", + # old bitfield (readout) + oldReadoutName = hcalExtBarrelReadoutName, + # specify which fields are going to be altered (deleted/rewritten) + #oldSegmentationIds = ["eta","phi"], + # new bitfield (readout), with new segmentation + newReadoutName = hcalExtBarrelReadoutPhiEtaName, + debugPrint = 10, + OutputLevel = INFO, + inhits = "HCalExtBarrelPositions", + outhits = "newHCalExtBarrelCells") #Create calo clusters from Configurables import CreateCaloClustersSlidingWindow, CaloTowerTool @@ -53,16 +86,16 @@ ecalBarrelReadoutName = ecalBarrelReadoutName, ecalEndcapReadoutName = ecalEndcapReadoutName, ecalFwdReadoutName = ecalFwdReadoutName, - hcalBarrelReadoutName = ecalBarrelReadoutName, - hcalExtBarrelReadoutName = ecalBarrelReadoutName, + hcalBarrelReadoutName = hcalBarrelReadoutPhiEtaName, + hcalExtBarrelReadoutName = hcalExtBarrelReadoutPhiEtaName, hcalEndcapReadoutName = hcalEndcapReadoutName, hcalFwdReadoutName = hcalFwdReadoutName, OutputLevel = DEBUG) towers.ecalBarrelCells.Path = ecalBarrelCellsName towers.ecalEndcapCells.Path = ecalEndcapCellsName towers.ecalFwdCells.Path = ecalFwdCellsName -towers.hcalBarrelCells.Path = "emptyCaloCells" -towers.hcalExtBarrelCells.Path = "emptyCaloCells" +towers.hcalBarrelCells.Path = "newHCalBarrelCells" +towers.hcalExtBarrelCells.Path ="newHCalExtBarrelCells" towers.hcalEndcapCells.Path = hcalEndcapCellsName towers.hcalFwdCells.Path = hcalFwdCellsName @@ -102,7 +135,10 @@ ApplicationMgr( TopAlg = [podioinput, - createemptycells, + positionsHcal, + resegmentHcal, + positionsExtHcal, + resegmentExtHcal, createClusters, out ], diff --git a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py index 4a562e355..e85115e15 100644 --- a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py +++ b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py @@ -3,16 +3,16 @@ ecalBarrelCellsName = "ECalBarrelCells" ecalEndcapCellsName = "ECalEndcapCells" ecalFwdCellsName = "ECalFwdCells" -hcalBarrelCellsName = "HCalBarrelCells" -hcalExtBarrelCellsName = "HCalExtBarrelCells" +hcalBarrelCellsName = "newHCalCells" +hcalExtBarrelCellsName = "newExtHCalCells" hcalEndcapCellsName = "HCalEndcapCells" hcalFwdCellsName = "HCalFwdCells" # Readouts ecalBarrelReadoutName = "ECalBarrelPhiEta" ecalEndcapReadoutName = "EMECPhiEtaReco" ecalFwdReadoutName = "EMFwdPhiEta" -hcalBarrelReadoutName = "HCalBarrelReadout" -hcalExtBarrelReadoutName = "HCalExtBarrelReadout" +hcalBarrelReadoutName = "BarHCal_Readout_phieta" +hcalExtBarrelReadoutName = "ExtBarHCal_Readout_phieta" hcalEndcapReadoutName = "HECPhiEta" hcalFwdReadoutName = "HFwdPhiEta" # Number of events diff --git a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py index 0a1edb55e..36805910b 100644 --- a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py +++ b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py @@ -21,8 +21,7 @@ 'file:Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml', 'file:Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedBarrel_TileCal.xml', 'file:Detector/DetFCChhCalDiscs/compact/Endcaps_coneCryo.xml', - 'file:Detector/DetFCChhCalDiscs/compact/Forward_coneCryo.xml', - 'file:Detector/DetFCChhTailCatcher/compact/FCChh_TailCatcher.xml' + 'file:Detector/DetFCChhCalDiscs/compact/Forward_coneCryo.xml' ], OutputLevel = INFO) @@ -58,8 +57,10 @@ # Tail Catcher readout tailCatcherReadoutName = "Muons_Readout" # layers to be merged in endcaps & forward calo -ecalEndcapNumberOfLayersToMerge = [2] + [2] + [4]*38 -hcalEndcapNumberOfLayersToMerge = [2] + [4]*20 +ecalEndcapNumberOfLayersToMerge = [26]*5+[27] +ecalFwdNumberOfLayersToMerge = [7]*5+[8] +hcalEndcapNumberOfLayersToMerge = [13]+[14]*5 +hcalFwdNumberOfLayersToMerge = [8]+[9]*5 identifierName = "layer" volumeName = "layer" @@ -85,9 +86,6 @@ savehcalfwdtool = SimG4SaveCalHits("saveHCalFwdHits", readoutNames = [hcalFwdReadoutName]) savehcalfwdtool.positionedCaloHits.Path = "HCalFwdPositionedHits" savehcalfwdtool.caloHits.Path = "HCalFwdHits" -savetailcatchertool = SimG4SaveCalHits("saveTailCatcherHits", readoutNames = [tailCatcherReadoutName]) -savetailcatchertool.positionedCaloHits = "TailCatcherPositionedHits" -savetailcatchertool.caloHits = "TailCatcherHits" # next, create the G4 algorithm, giving the list of names of tools ("XX/YY") from Configurables import SimG4SingleParticleGeneratorTool @@ -99,7 +97,7 @@ outputs= ["SimG4SaveCalHits/saveECalBarrelHits", "SimG4SaveCalHits/saveECalEndcapHits", "SimG4SaveCalHits/saveECalFwdHits", "SimG4SaveCalHits/saveHCalHits", "SimG4SaveCalHits/saveExtHCalHits", "SimG4SaveCalHits/saveHCalEndcapHits", - "SimG4SaveCalHits/saveHCalFwdHits", "SimG4SaveCalHits/saveTailCatcherHits"], + "SimG4SaveCalHits/saveHCalFwdHits"], eventProvider=pgun, OutputLevel=INFO) @@ -156,6 +154,7 @@ hits="ECalBarrelCellsStep2", cells="ECalBarrelCells") + # Create Ecal cells in endcaps # 1. step - merge layer IDs # 2. step - create cells @@ -180,12 +179,25 @@ createEcalEndcapCells.hits.Path="mergedECalEndcapHits" createEcalEndcapCells.cells.Path="ECalEndcapCells" +# Create Ecal cells in forward +mergelayersEcalFwd = MergeLayers("MergeLayersEcalFwd", + # take the bitfield description from the geometry service + readout = ecalFwdReadoutName, + # cells in which field should be merged + identifier = identifierName, + volumeName = volumeName, + # how many cells to merge + merge = ecalFwdNumberOfLayersToMerge, + OutputLevel = INFO) +mergelayersEcalFwd.inhits.Path = "ECalFwdHits" +mergelayersEcalFwd.outhits.Path = "mergedECalFwdHits" + createEcalFwdCells = CreateCaloCells("CreateEcalFwdCaloCells", doCellCalibration=True, calibTool=calibEcalFwd, addCellNoise=False, filterCellNoise=False, OutputLevel=INFO) -createEcalFwdCells.hits.Path="ECalFwdHits" +createEcalFwdCells.hits.Path="mergedECalFwdHits" createEcalFwdCells.cells.Path="ECalFwdCells" # Create cells in HCal @@ -229,25 +241,30 @@ createHcalEndcapCells.hits.Path="mergedHCalEndcapHits" createHcalEndcapCells.cells.Path="HCalEndcapCells" +# Create Hcal cells in forward +mergelayersHcalFwd = MergeLayers("MergeLayersHcalFwd", + # take the bitfield description from the geometry service + readout = hcalFwdReadoutName, + # cells in which field should be merged + identifier = identifierName, + volumeName = volumeName, + # how many cells to merge + merge = hcalFwdNumberOfLayersToMerge, + OutputLevel = INFO) +mergelayersHcalFwd.inhits.Path = "HCalFwdHits" +mergelayersHcalFwd.outhits.Path = "mergedHCalFwdHits" + createHcalFwdCells = CreateCaloCells("CreateHcalFwdCaloCells", doCellCalibration=True, calibTool=calibHcalFwd, addCellNoise=False, filterCellNoise=False, OutputLevel=INFO) -createHcalFwdCells.hits.Path="HCalFwdHits" +createHcalFwdCells.hits.Path="mergedHCalFwdHits" createHcalFwdCells.cells.Path="HCalFwdCells" -# -> Tail Catcher -createTailCatcherCells = CreateCaloCells("CreateTailCatcherCells", - doCellCalibration=False, - addCellNoise = False, filterCellNoise = False, - OutputLevel = INFO, - hits="TailCatcherHits", - cells="TailCatcherCells") - out = PodioOutput("out", OutputLevel=INFO) -out.outputCommands = ["drop *", "keep ECalBarrelCells", "keep ECalEndcapCells", "keep ECalFwdCells", "keep HCalBarrelCells", "keep HCalExtBarrelCells", "keep HCalEndcapCells", "keep HCalFwdCells", "keep TailCatcherCells", "keep GenParticles","keep GenVertices"] +out.outputCommands = ["drop *", "keep ECalBarrelCells", "keep ECalEndcapCells", "keep ECalFwdCells", "keep HCalBarrelCells", "keep HCalExtBarrelCells", "keep HCalEndcapCells", "keep HCalFwdCells", "keep GenParticles","keep GenVertices"] out.filename = "output_fullCalo_SimAndDigi_e50GeV_"+str(num_events)+"events.root" #CPU information @@ -266,7 +283,6 @@ createExtHcalCells.AuditExecute = True createHcalEndcapCells.AuditExecute = True createHcalFwdCells.AuditExecute = True -createTailCatcherCells.AuditExecute = True out.AuditExecute = True ApplicationMgr( @@ -277,13 +293,14 @@ createEcalBarrelCells, mergelayersEcalEndcap, createEcalEndcapCells, + mergelayersEcalFwd, createEcalFwdCells, createHcalCells, createExtHcalCells, mergelayersHcalEndcap, createHcalEndcapCells, + mergelayersHcalFwd, createHcalFwdCells, - createTailCatcherCells, out ], EvtSel = 'NONE', From 8146654fa80b4d8069b011bb213b2a268168cd43 Mon Sep 17 00:00:00 2001 From: CoralieNeubueser Date: Mon, 12 Mar 2018 18:26:03 +0100 Subject: [PATCH 06/10] implemented Annas comments --- ...loSystem_ReconstructionSW_noiseFromFile.py | 57 ++++++++++++++++--- .../options/runHcalDigitisationFlatNoise.py | 4 +- 2 files changed, 52 insertions(+), 9 deletions(-) diff --git a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py index e85115e15..93ddb892a 100644 --- a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py +++ b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py @@ -3,16 +3,18 @@ ecalBarrelCellsName = "ECalBarrelCells" ecalEndcapCellsName = "ECalEndcapCells" ecalFwdCellsName = "ECalFwdCells" -hcalBarrelCellsName = "newHCalCells" -hcalExtBarrelCellsName = "newExtHCalCells" +hcalBarrelCellsName = "HCalBarrelCells" +hcalExtBarrelCellsName = "HCalExtBarrelCells" hcalEndcapCellsName = "HCalEndcapCells" hcalFwdCellsName = "HCalFwdCells" # Readouts ecalBarrelReadoutName = "ECalBarrelPhiEta" ecalEndcapReadoutName = "EMECPhiEtaReco" ecalFwdReadoutName = "EMFwdPhiEta" -hcalBarrelReadoutName = "BarHCal_Readout_phieta" -hcalExtBarrelReadoutName = "ExtBarHCal_Readout_phieta" +hcalBarrelReadoutName = "HCalBarrelReadout" +hcalExtBarrelReadoutName = "HCalExtBarrelReadout" +hcalBarrelReadoutPhiEtaName = "BarHCal_Readout_phieta" +hcalExtBarrelReadoutPhiEtaName = "ExtBarHCal_Readout_phieta" hcalEndcapReadoutName = "HECPhiEta" hcalFwdReadoutName = "HFwdPhiEta" # Number of events @@ -44,6 +46,41 @@ ecalBarrelNoiseHistName = "h_elecNoise_fcc_" ecalEndcapNoiseHistName = "h_elecNoise_fcc_" +# additionally for HCal +from Configurables import CreateVolumeCaloPositions +positionsHcal = CreateVolumeCaloPositions("positionsHcal", OutputLevel = INFO) +positionsHcal.hits.Path = hcalBarrelCellsName +positionsHcal.positionedHits.Path = "HCalBarrelPositions" + +from Configurables import RedoSegmentation +resegmentHcal = RedoSegmentation("ReSegmentationHcal", + # old bitfield (readout) + oldReadoutName = hcalBarrelReadoutName, + # # specify which fields are going to be altered (deleted/rewritten) + # oldSegmentationIds = ["eta","phi"], + # new bitfield (readout), with new segmentation + newReadoutName = hcalBarrelReadoutPhiEtaName, + debugPrint = 10, + OutputLevel = INFO, + inhits = "HCalBarrelPositions", + outhits = "newHCalBarrelCells") + +positionsExtHcal = CreateVolumeCaloPositions("positionsExtHcal", OutputLevel = INFO) +positionsExtHcal.hits.Path = hcalExtBarrelCellsName +positionsExtHcal.positionedHits.Path = "HCalExtBarrelPositions" + +resegmentExtHcal = RedoSegmentation("ReSegmentationExtHcal", + # old bitfield (readout) + oldReadoutName = hcalExtBarrelReadoutName, + # specify which fields are going to be altered (deleted/rewritten) + #oldSegmentationIds = ["eta","phi"], + # new bitfield (readout), with new segmentation + newReadoutName = hcalExtBarrelReadoutPhiEtaName, + debugPrint = 10, + OutputLevel = INFO, + inhits = "HCalExtBarrelPositions", + outhits = "newHCalExtBarrelCells") + # add noise, create all existing cells in detector from Configurables import NoiseCaloCellsFromFileTool, TubeLayerPhiEtaCaloTool,CreateCaloCells noiseBarrel = NoiseCaloCellsFromFileTool("NoiseBarrel", @@ -102,16 +139,16 @@ ecalBarrelReadoutName = ecalBarrelReadoutName, ecalEndcapReadoutName = ecalEndcapReadoutName, ecalFwdReadoutName = ecalFwdReadoutName, - hcalBarrelReadoutName = hcalBarrelReadoutName, - hcalExtBarrelReadoutName = hcalExtBarrelReadoutName, + hcalBarrelReadoutName = hcalBarrelReadoutPhiEtaName, + hcalExtBarrelReadoutName = hcalExtBarrelReadoutPhiEtaName, hcalEndcapReadoutName = hcalEndcapReadoutName, hcalFwdReadoutName = hcalFwdReadoutName, OutputLevel = DEBUG) towers.ecalBarrelCells.Path = ecalBarrelCellsName + "Noise" towers.ecalEndcapCells.Path = ecalEndcapCellsName + "Noise" towers.ecalFwdCells.Path = ecalFwdCellsName -towers.hcalBarrelCells.Path = hcalBarrelCellsName -towers.hcalExtBarrelCells.Path = hcalExtBarrelCellsName +towers.hcalBarrelCells.Path = "newHCalBarrelCells" +towers.hcalExtBarrelCells.Path ="newHCalExtBarrelCells" towers.hcalEndcapCells.Path = hcalEndcapCellsName towers.hcalFwdCells.Path = hcalFwdCellsName @@ -149,6 +186,10 @@ ApplicationMgr( TopAlg = [podioinput, + positionsHcal, + resegmentHcal, + positionsExtHcal, + resegmentExtHcal, createEcalBarrelCells, createEcalEndcapCells, createClusters, diff --git a/Reconstruction/RecCalorimeter/tests/options/runHcalDigitisationFlatNoise.py b/Reconstruction/RecCalorimeter/tests/options/runHcalDigitisationFlatNoise.py index 0b54bd076..86b100c81 100644 --- a/Reconstruction/RecCalorimeter/tests/options/runHcalDigitisationFlatNoise.py +++ b/Reconstruction/RecCalorimeter/tests/options/runHcalDigitisationFlatNoise.py @@ -26,6 +26,7 @@ #Configure tools for calo reconstruction from Configurables import CalibrateCaloHitsTool, NoiseCaloCellsFlatTool, NestedVolumesCaloTool +calibHcells = CalibrateCaloHitsTool("CalibrateHCal", invSamplingFraction="41.7 ") noise = NoiseCaloCellsFlatTool("HCalNoise", cellNoise = 0.01) hcalgeo = NestedVolumesCaloTool("HcalGeo", @@ -39,7 +40,8 @@ from Configurables import CreateCaloCells createcells = CreateCaloCells("CreateCaloCells", geometryTool = hcalgeo, - doCellCalibration = False, + calibTool=calibHcells, + doCellCalibration = True, addCellNoise = True, filterCellNoise = False, noiseTool = noise, OutputLevel = DEBUG) From 5ba42ed416975fde0425a92ece66783c76480718 Mon Sep 17 00:00:00 2001 From: CoralieNeubueser Date: Tue, 13 Mar 2018 11:45:43 +0100 Subject: [PATCH 07/10] updated readout name --- .../tests/options/geant_fullsim_hcal_singleparticles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Reconstruction/RecCalorimeter/tests/options/geant_fullsim_hcal_singleparticles.py b/Reconstruction/RecCalorimeter/tests/options/geant_fullsim_hcal_singleparticles.py index 2ff6f8aca..0a8f8c69f 100644 --- a/Reconstruction/RecCalorimeter/tests/options/geant_fullsim_hcal_singleparticles.py +++ b/Reconstruction/RecCalorimeter/tests/options/geant_fullsim_hcal_singleparticles.py @@ -39,7 +39,7 @@ # Translates EDM to G4Event, passes the event to G4, writes out outputs via tools # and a tool that saves the calorimeter hits from Configurables import SimG4Alg, SimG4SaveCalHits, InspectHitsCollectionsTool -savehcaltool = SimG4SaveCalHits("saveHCalHits",readoutNames = ["BarHCal_Readout"]) +savehcaltool = SimG4SaveCalHits("saveHCalHits",readoutNames = ["HCalBarrelReadout"]) savehcaltool.positionedCaloHits.Path = "HCalPositionedHits" savehcaltool.caloHits.Path = "HCalHits" # Change INFO to DEBUG for printout of each deposit From d65c94eef4f9c173950f26b912fdd207adbcf2a0 Mon Sep 17 00:00:00 2001 From: CoralieNeubueser Date: Tue, 13 Mar 2018 13:53:59 +0100 Subject: [PATCH 08/10] updated hcal readout name --- Examples/options/geant_pgun_fullsim.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Examples/options/geant_pgun_fullsim.py b/Examples/options/geant_pgun_fullsim.py index b1e746916..81306c094 100644 --- a/Examples/options/geant_pgun_fullsim.py +++ b/Examples/options/geant_pgun_fullsim.py @@ -69,9 +69,9 @@ savefwdtool = SimG4SaveCalHits("saveECalFwdHits", readoutNames = ["EMFwdPhiEta"]) savefwdtool.positionedCaloHits.Path = "ECalFwdPositionedHits" savefwdtool.caloHits.Path = "ECalFwdHits" -savehcaltool = SimG4SaveCalHits("saveHCalHits", readoutNames = ["BarHCal_Readout"]) -savehcaltool.positionedCaloHits.Path = "HCalPositionedHits" -savehcaltool.caloHits.Path = "HCalHits" +savehcaltool = SimG4SaveCalHits("saveHCalHits", readoutNames = ["HCalBarrelReadout"]) +savehcaltool.positionedCaloHits.Path = "HCalBarrelPositionedHits" +savehcaltool.caloHits.Path = "HCalBarrelHits" # next, create the G4 algorithm, giving the list of names of tools ("XX/YY") particle_converter = SimG4PrimariesFromEdmTool("EdmConverter") particle_converter.genParticles.Path = "allGenParticles" @@ -91,5 +91,5 @@ EvtMax=1, ## order is important, as GeoSvc is needed by SimG4Svc ExtSvc=[podioevent, geoservice, geantservice, ppservice], - OutputLevel=DEBUG + OutputLevel=INFO ) From 89f07099c366513cd7bf51054411471d2e344f69 Mon Sep 17 00:00:00 2001 From: CoralieNeubueser Date: Tue, 13 Mar 2018 14:06:11 +0100 Subject: [PATCH 09/10] updated hcal readout name --- Examples/options/min_bias_pool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Examples/options/min_bias_pool.py b/Examples/options/min_bias_pool.py index 0ff26e9ec..b0fcc3c5f 100644 --- a/Examples/options/min_bias_pool.py +++ b/Examples/options/min_bias_pool.py @@ -63,7 +63,7 @@ saveecaltool.positionedCaloHits.Path = "ECalPositionedHits" saveecaltool.caloHits.Path = "ECalHits" -savehcaltool = SimG4SaveCalHits("saveHCalHits",readoutNames = ["BarHCal_Readout"]) +savehcaltool = SimG4SaveCalHits("saveHCalHits",readoutNames = ["HCalBarrelReadout"]) savehcaltool.positionedCaloHits.Path = "HCalPositionedHits" savehcaltool.caloHits.Path = "HCalHits" From 4b23b84cdc1473dc6a86e23a8f33b1032acc9530 Mon Sep 17 00:00:00 2001 From: CoralieNeubueser Date: Tue, 13 Mar 2018 16:16:29 +0100 Subject: [PATCH 10/10] added tests --- Examples/CMakeLists.txt | 3 +++ Examples/options/min_bias_pool.py | 2 +- .../tests/options/runFullCaloSystem_SimAndDigitisation.py | 2 -- Sim/SimG4Components/CMakeLists.txt | 3 +++ Sim/SimG4Components/tests/options/geant_fullsim_hcal.py | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt index f3feb3ffb..e8cbeda97 100644 --- a/Examples/CMakeLists.txt +++ b/Examples/CMakeLists.txt @@ -47,6 +47,9 @@ gaudi_add_test(ReadFullSimTrackerHits gaudi_add_test(GeantFullSimParticleGun WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} FRAMEWORK options/geant_pgun_fullsim.py) +gaudi_add_test(GeantFullSimMinBias + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + FRAMEWORK options/min_bias_pool.py) gaudi_add_test(GeantFastSimTrackerECalGFlash WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} FRAMEWORK options/geant_fastsim.py) diff --git a/Examples/options/min_bias_pool.py b/Examples/options/min_bias_pool.py index b0fcc3c5f..6b4174209 100644 --- a/Examples/options/min_bias_pool.py +++ b/Examples/options/min_bias_pool.py @@ -59,7 +59,7 @@ field = SimG4ConstantMagneticFieldTool("SimG4ConstantMagneticFieldTool", FieldOn=True, IntegratorStepper="ClassicalRK4") from Configurables import SimG4Alg, SimG4SaveCalHits -saveecaltool = SimG4SaveCalHits("saveECalHits",readoutNames = ["ECalHitsPhiEta"]) +saveecaltool = SimG4SaveCalHits("saveECalHits",readoutNames = ["ECalBarrelEta"]) saveecaltool.positionedCaloHits.Path = "ECalPositionedHits" saveecaltool.caloHits.Path = "ECalHits" diff --git a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py index 36805910b..30162705a 100644 --- a/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py +++ b/Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py @@ -54,8 +54,6 @@ extHcalReadoutName = "HCalExtBarrelReadout" hcalEndcapReadoutName = "HECPhiEta" hcalFwdReadoutName = "HFwdPhiEta" -# Tail Catcher readout -tailCatcherReadoutName = "Muons_Readout" # layers to be merged in endcaps & forward calo ecalEndcapNumberOfLayersToMerge = [26]*5+[27] ecalFwdNumberOfLayersToMerge = [7]*5+[8] diff --git a/Sim/SimG4Components/CMakeLists.txt b/Sim/SimG4Components/CMakeLists.txt index dd687f212..8dae594ee 100644 --- a/Sim/SimG4Components/CMakeLists.txt +++ b/Sim/SimG4Components/CMakeLists.txt @@ -24,6 +24,9 @@ include(CTest) gaudi_add_test(GeantFullSimGdml WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} FRAMEWORK tests/options/geant_fullsim_gdml.py) +gaudi_add_test(GeantFullSimHCal + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + FRAMEWORK tests/options/geant_fullsim_hcal.py) gaudi_add_test(GeantFullSimMoreEvents WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/Sim/SimG4Components/tests/ FRAMEWORK tests/options/geant_fullsim_moreEvents.py) diff --git a/Sim/SimG4Components/tests/options/geant_fullsim_hcal.py b/Sim/SimG4Components/tests/options/geant_fullsim_hcal.py index 8aac8aaa3..bd155d0e9 100644 --- a/Sim/SimG4Components/tests/options/geant_fullsim_hcal.py +++ b/Sim/SimG4Components/tests/options/geant_fullsim_hcal.py @@ -33,7 +33,7 @@ # first, create a tool that saves the calorimeter hits (of type "hcal") # Name of that tool in GAUDI is "XX/YY" where XX is the tool class name ("SimG4SaveTrackerHits") # and YY is the given name ("saveTrackerHits") -savehcaltool = SimG4SaveCalHits("saveHCalHits", readoutNames = ["BarHCal_Readout"]) +savehcaltool = SimG4SaveCalHits("saveHCalHits", readoutNames = ["HCalBarrelReadout"]) savehcaltool.positionedCaloHits.Path = "positionedCaloHits" savehcaltool.caloHits.Path = "caloHits" # next, create the G4 algorithm, giving the list of names of tools ("XX/YY")