diff --git a/Geometry/HGCalCommonData/data/hgcalPassive/v18/hgcalPassive.xml b/Geometry/HGCalCommonData/data/hgcalPassive/v18/hgcalPassive.xml new file mode 100644 index 0000000000000..010f53671b8bf --- /dev/null +++ b/Geometry/HGCalCommonData/data/hgcalPassive/v18/hgcalPassive.xml @@ -0,0 +1,210 @@ + + + +i + + + + + + + + + + + + + + + Copper, StainlessSteel, Epoxy, Lead + + materials:Copper, materials:StainlessSteel, materials:Epoxy, + materials:Lead + + 0.1*mm, 0.3*mm, 0.05*mm, 2.77*mm + + 0, 1, 2, 3, 2, 1, 0 + + + + + + + + + Copper, StainlessSteel, Epoxy, Lead + + materials:Copper, materials:StainlessSteel, materials:Epoxy, + materials:Lead + + 0.1*mm, 0.3*mm, 0.05*mm, 4.97*mm + + 0, 1, 2, 3, 2, 1, 0 + + + + + + + + + Copper, StainlessSteel, Epoxy, Lead + + materials:Copper, materials:StainlessSteel, materials:Epoxy, + materials:Lead + + 0.1*mm, 0.3*mm, 0.05*mm, 8.22*mm + + 0, 1, 2, 3, 2, 1, 0 + + + + + + + + + Copper + + materials:Copper + + 6.05*mm + + + + + + + + + + + HD1, HD2, HD3, HD4, HD5, LD1, LD2, LD3, LD4, LD5, LD6 + + 21, 22, 23, 24, 25, 11, 12, 13, 14, 15, 16 + + 0, 1, 2, 3, 4, 5 + + 00, 01, 02, 03, 04, 05 + + Copper, StainlessSteel, Epoxy, Lead + + materials:Copper, materials:StainlessSteel, materials:Epoxy, + materials:Lead + + 0.1*mm, 0.3*mm, 0.05*mm, 2.77*mm + + 0, 1, 2, 3, 2, 1, 0 + + + + + + + + + HD1, HD2, HD3, HD4, HD5, LD1, LD2, LD3, LD4, LD5, LD6 + + 21, 22, 23, 24, 25, 11, 12, 13, 14, 15, 16 + + 0, 1, 2, 3, 4, 5 + + 00, 01, 02, 03, 04, 05 + + Copper, StainlessSteel, Epoxy, Lead + + materials:Copper, materials:StainlessSteel, materials:Epoxy, + materials:Lead + + 0.1*mm, 0.3*mm, 0.05*mm, 4.97*mm + + 0, 1, 2, 3, 2, 1, 0 + + + + + + + + + HD1, HD2, HD3, HD4, HD5, LD1, LD2, LD3, LD4, LD5, LD6 + + 21, 22, 23, 24, 25, 11, 12, 13, 14, 15, 16 + + 0, 1, 2, 3, 4, 5 + + 00, 01, 02, 03, 04, 05 + + Copper, StainlessSteel, Epoxy, Lead + + materials:Copper, materials:StainlessSteel, materials:Epoxy, + materials:Lead + + 0.1*mm, 0.3*mm, 0.05*mm, 8.22*mm + + 0, 1, 2, 3, 2, 1, 0 + + + + + + + + + HD1, HD2, HD3, HD4, HD5, LD1, LD2, LD3, LD4, LD5, LD6 + + 21, 22, 23, 24, 25, 11, 12, 13, 14, 15, 16 + + 0, 1, 2, 3, 4, 5 + + 00, 01, 02, 03, 04, 05 + + Copper + + materials:Copper + + 6.05*mm + + + + + + + + + + + StainlessSteel + + materials:StainlessSteel + + 4.00*mm + + + + + + + + + + + HD1, HD2, HD3, HD4, HD5, LD1, LD2, LD3, LD4, LD5, LD6 + + 21, 22, 23, 24, 25, 11, 12, 13, 14, 15, 16 + + 0, 1, 2, 3, 4, 5 + + 00, 01, 02, 03, 04, 05 + + StainlessSteel + + materials:StainlessSteel + + 4.00*mm + + + + + + diff --git a/Geometry/HGCalCommonData/data/hgcalPassive/v18/hgcalpos.xml b/Geometry/HGCalCommonData/data/hgcalPassive/v18/hgcalpos.xml new file mode 100644 index 0000000000000..ecc8f93447217 --- /dev/null +++ b/Geometry/HGCalCommonData/data/hgcalPassive/v18/hgcalpos.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Geometry/HGCalCommonData/plugins/DDHGCalPassiveFull.cc b/Geometry/HGCalCommonData/plugins/DDHGCalPassiveFull.cc new file mode 100644 index 0000000000000..8795942dc5624 --- /dev/null +++ b/Geometry/HGCalCommonData/plugins/DDHGCalPassiveFull.cc @@ -0,0 +1,160 @@ +/////////////////////////////////////////////////////////////////////////////// +// File: DDHGCalPassiveFull.cc +// Description: Geometry factory class for a full silicon Wafer +// Created by Sunanda Banerjee +/////////////////////////////////////////////////////////////////////////////// +#include "DetectorDescription/Core/interface/DDAlgorithm.h" +#include "DetectorDescription/Core/interface/DDAlgorithmFactory.h" +#include "DetectorDescription/Core/interface/DDCurrentNamespace.h" +#include "DetectorDescription/Core/interface/DDLogicalPart.h" +#include "DetectorDescription/Core/interface/DDMaterial.h" +#include "DetectorDescription/Core/interface/DDSolid.h" +#include "DetectorDescription/Core/interface/DDSplit.h" +#include "DetectorDescription/Core/interface/DDTypes.h" +#include "DetectorDescription/Core/interface/DDutils.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/PluginManager/interface/PluginFactory.h" + +#include +#include +#include + +//#define EDM_ML_DEBUG + +class DDHGCalPassiveFull : public DDAlgorithm { +public: + // Constructor and Destructor + DDHGCalPassiveFull(); + ~DDHGCalPassiveFull() override = default; + + void initialize(const DDNumericArguments& nArgs, + const DDVectorArguments& vArgs, + const DDMapArguments& mArgs, + const DDStringArguments& sArgs, + const DDStringVectorArguments& vsArgs) override; + void execute(DDCompactView& cpv) override; + +private: + std::string material_; // Material name for module + double thick_; // Module thickness + double waferSize_; // Wafer size + double waferSepar_; // Sensor separation + std::vector layerNames_; // Names of the layers + std::vector materials_; // Materials of the layers + std::vector layerThick_; // Thickness of layers + std::vector copyNumber_; // Initial copy numbers + std::vector layerType_; // Layer types +}; + +DDHGCalPassiveFull::DDHGCalPassiveFull() { +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << "DDHGCalPassiveFull: Creating an instance"; +#endif +} + +void DDHGCalPassiveFull::initialize(const DDNumericArguments& nArgs, + const DDVectorArguments& vArgs, + const DDMapArguments&, + const DDStringArguments& sArgs, + const DDStringVectorArguments& vsArgs) { + material_ = sArgs["ModuleMaterial"]; + thick_ = nArgs["ModuleThickness"]; + waferSize_ = nArgs["WaferSize"]; + waferSepar_ = nArgs["SensorSeparation"]; +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << "DDHGCalPassiveFull: Module " << parent().name() << " made of " << material_ << " T " + << thick_ << " Wafer 2r " << waferSize_ << " Half Separation " << waferSepar_; +#endif + layerNames_ = vsArgs["LayerNames"]; + materials_ = vsArgs["LayerMaterials"]; + layerThick_ = vArgs["LayerThickness"]; + copyNumber_.resize(materials_.size(), 1); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << "DDHGCalPassiveFull: " << layerNames_.size() << " types of volumes"; + for (unsigned int i = 0; i < layerNames_.size(); ++i) + edm::LogVerbatim("HGCalGeom") << "Volume [" << i << "] " << layerNames_[i] << " of thickness " << layerThick_[i] + << " filled with " << materials_[i]; +#endif + layerType_ = dbl_to_int(vArgs["LayerType"]); +#ifdef EDM_ML_DEBUG + std::ostringstream st1; + for (unsigned int i = 0; i < layerType_.size(); ++i) + st1 << " [" << i << "] " << layerType_[i]; + edm::LogVerbatim("HGCalGeom") << "There are " << layerType_.size() << " blocks" << st1.str(); +#endif +} + +void DDHGCalPassiveFull::execute(DDCompactView& cpv) { +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << "==>> Executing DDHGCalPassiveFull..."; +#endif + + static constexpr double tol = 0.00001; + static const double sqrt3 = std::sqrt(3.0); + double rM = 0.5 * (waferSize_ + waferSepar_); + double RM2 = rM / sqrt3; + + // First the mother + std::vector xM = {rM, 0, -rM, -rM, 0, rM}; + std::vector yM = {RM2, 2 * RM2, RM2, -RM2, -2 * RM2, -RM2}; + std::vector zw = {-0.5 * thick_, 0.5 * thick_}; + std::vector zx(2, 0), zy(2, 0), scale(2, 1.0); + std::string parentName = parent().name().name(); + DDSolid solid = DDSolidFactory::extrudedpolygon(parentName, xM, yM, zw, zx, zy, scale); + DDName matName(DDSplit(material_).first, DDSplit(material_).second); + DDMaterial matter(matName); + DDLogicalPart glogM = DDLogicalPart(solid.ddname(), matter, solid); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << "DDHGCalPassiveFull: " << solid.name() << " extruded polygon made of " << matName + << " z|x|y|s (0) " << zw[0] << ":" << zx[0] << ":" << zy[0] << ":" << scale[0] + << " z|x|y|s (1) " << zw[1] << ":" << zx[1] << ":" << zy[1] << ":" << scale[1] + << " and " << xM.size() << " edges"; + for (unsigned int kk = 0; kk < xM.size(); ++kk) + edm::LogVerbatim("HGCalGeom") << "[" << kk << "] " << xM[kk] << ":" << yM[kk]; +#endif + + // Then the layers + std::vector glogs(materials_.size()); + double zi(-0.5 * thick_), thickTot(0.0); + for (unsigned int l = 0; l < layerType_.size(); l++) { + unsigned int i = layerType_[l]; + if (copyNumber_[i] == 1) { + zw[0] = -0.5 * layerThick_[i]; + zw[1] = 0.5 * layerThick_[i]; + std::string layerName = parentName + layerNames_[i]; + solid = DDSolidFactory::extrudedpolygon(layerName, xM, yM, zw, zx, zy, scale); + DDName matN(DDSplit(materials_[i]).first, DDSplit(materials_[i]).second); + DDMaterial matter(matN); + glogs[i] = DDLogicalPart(solid.ddname(), matter, solid); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << "DDHGCalPassiveFull: Layer " << i << ":" << l << ":" << solid.name() + << " extruded polygon made of " << matN << " z|x|y|s (0) " << zw[0] << ":" << zx[0] + << ":" << zy[0] << ":" << scale[0] << " z|x|y|s (1) " << zw[1] << ":" << zx[1] + << ":" << zy[1] << ":" << scale[1] << " and " << xM.size() << " edges"; + for (unsigned int kk = 0; kk < xM.size(); ++kk) + edm::LogVerbatim("HGCalGeom") << "[" << kk << "] " << xM[kk] << ":" << yM[kk]; +#endif + } + DDTranslation tran0(0, 0, (zi + 0.5 * layerThick_[i])); + DDRotation rot; + cpv.position(glogs[i], glogM, copyNumber_[i], tran0, rot); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << "DDHGCalPassiveFull: " << glogs[i].name() << " number " << copyNumber_[i] + << " positioned in " << glogM.name() << " at " << tran0 << " with no rotation"; +#endif + ++copyNumber_[i]; + zi += layerThick_[i]; + thickTot += layerThick_[i]; + } + if ((std::abs(thickTot - thick_) >= tol) && (!layerType_.empty())) { + if (thickTot > thick_) { + edm::LogError("HGCalGeom") << "Thickness of the partition " << thick_ << " is smaller than " << thickTot + << ": thickness of all its components **** ERROR ****"; + } else { + edm::LogWarning("HGCalGeom") << "Thickness of the partition " << thick_ << " does not match with " << thickTot + << " of the components"; + } + } +} + +DEFINE_EDM_PLUGIN(DDAlgorithmFactory, DDHGCalPassiveFull, "hgcal:DDHGCalPassiveFull"); diff --git a/Geometry/HGCalCommonData/plugins/DDHGCalPassivePartial.cc b/Geometry/HGCalCommonData/plugins/DDHGCalPassivePartial.cc new file mode 100644 index 0000000000000..c46a7347eea95 --- /dev/null +++ b/Geometry/HGCalCommonData/plugins/DDHGCalPassivePartial.cc @@ -0,0 +1,187 @@ +#include "DetectorDescription/Core/interface/DDAlgorithm.h" +#include "DetectorDescription/Core/interface/DDAlgorithmFactory.h" +#include "DetectorDescription/Core/interface/DDCurrentNamespace.h" +#include "DetectorDescription/Core/interface/DDLogicalPart.h" +#include "DetectorDescription/Core/interface/DDMaterial.h" +#include "DetectorDescription/Core/interface/DDSolid.h" +#include "DetectorDescription/Core/interface/DDSplit.h" +#include "DetectorDescription/Core/interface/DDTypes.h" +#include "DetectorDescription/Core/interface/DDutils.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/PluginManager/interface/PluginFactory.h" +#include "Geometry/HGCalCommonData/interface/HGCalTypes.h" +#include "Geometry/HGCalCommonData/interface/HGCalWaferMask.h" + +#include +#include +#include + +//#define EDM_ML_DEBUG + +class DDHGCalPassivePartial : public DDAlgorithm { +public: + // Constructor and Destructor + DDHGCalPassivePartial() = default; + ~DDHGCalPassivePartial() override = default; + + void initialize(const DDNumericArguments& nArgs, + const DDVectorArguments& vArgs, + const DDMapArguments& mArgs, + const DDStringArguments& sArgs, + const DDStringVectorArguments& vsArgs) override; + void execute(DDCompactView& cpv) override; + +private: + std::string material_; // Material name for module with gap + double thick_; // Module thickness + double waferSize_; // Wafer size + double waferSepar_; // Sensor separation + std::vector tags_; // Tags to be added to each name + std::vector partialTypes_; // Type of partial wafer + std::vector placementIndex_; + std::vector placementIndexTags_; // Plaement index of the wafers + std::vector layerNames_; // Names of the layers + std::vector materials_; // Materials of the layers + std::vector layerThick_; // Thickness of layers + std::vector layerType_; // Types of layers +}; + +void DDHGCalPassivePartial::initialize(const DDNumericArguments& nArgs, + const DDVectorArguments& vArgs, + const DDMapArguments&, + const DDStringArguments& sArgs, + const DDStringVectorArguments& vsArgs) { + material_ = sArgs["ModuleMaterial"]; + thick_ = nArgs["ModuleThickness"]; + waferSize_ = nArgs["WaferSize"]; + waferSepar_ = nArgs["SensorSeparation"]; +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << "DDHGCalPassivePartial: Module " << parent().name() << " made of " << material_ + << " T " << thick_ << " Wafer 2r " << waferSize_ << " Half Separation " << waferSepar_; +#endif + tags_ = vsArgs["Tags"]; + partialTypes_ = dbl_to_int(vArgs["PartialTypes"]); + placementIndex_ = dbl_to_int(vArgs["PlacementIndex"]); + placementIndexTags_ = vsArgs["PlacementIndexTags"]; +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << "DDHGCalPassivePartial: " << tags_.size() << " variations of wafer types"; + for (unsigned int k = 0; k < tags_.size(); ++k) { + for (unsigned int m = 0; m < placementIndex_.size(); ++m) { + edm::LogVerbatim("HGCalGeom") << "Type[" << k << "] " << tags_[k] << " Partial " << partialTypes_[k] + << " Placement Index " << placementIndex_[m] << " Tag " << placementIndexTags_[m]; + } + } +#endif + layerNames_ = vsArgs["LayerNames"]; + materials_ = vsArgs["LayerMaterials"]; + layerThick_ = vArgs["LayerThickness"]; +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << "DDHGCalPassivePartial: " << layerNames_.size() << " types of volumes"; + for (unsigned int i = 0; i < layerNames_.size(); ++i) + edm::LogVerbatim("HGCalGeom") << "Volume [" << i << "] " << layerNames_[i] << " of thickness " << layerThick_[i] + << " filled with " << materials_[i]; +#endif + layerType_ = dbl_to_int(vArgs["LayerType"]); +#ifdef EDM_ML_DEBUG + std::ostringstream st1; + for (unsigned int i = 0; i < layerType_.size(); ++i) + st1 << " [" << i << "] " << layerType_[i]; + edm::LogVerbatim("HGCalGeom") << "There are " << layerType_.size() << " blocks" << st1.str(); +#endif +} + +void DDHGCalPassivePartial::execute(DDCompactView& cpv) { +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << "==>> Executing DDHGCalPassivePartial..."; +#endif + + static constexpr double tol = 0.00001; + std::string parentName = parent().name().name(); + + // Loop over all types + for (unsigned int k = 0; k < tags_.size(); ++k) { + for (unsigned int m = 0; m < placementIndex_.size(); ++m) { + // First the mother + std::string mother = parentName + placementIndexTags_[m] + tags_[k]; + std::vector > wxy = + HGCalWaferMask::waferXY(partialTypes_[k], placementIndex_[m], (waferSize_ + waferSepar_), 0.0, 0.0, 0.0); + std::vector xM, yM; + for (unsigned int i = 0; i < (wxy.size() - 1); ++i) { + xM.emplace_back(wxy[i].first); + yM.emplace_back(wxy[i].second); + } + std::vector zw = {-0.5 * thick_, 0.5 * thick_}; + std::vector zx(2, 0), zy(2, 0), scale(2, 1.0); + DDSolid solid = DDSolidFactory::extrudedpolygon(mother, xM, yM, zw, zx, zy, scale); + DDName matName(DDSplit(material_).first, DDSplit(material_).second); + DDMaterial matter(matName); + DDLogicalPart glogM = DDLogicalPart(solid.ddname(), matter, solid); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << "DDHGCalPassivePartial: " << solid.name() << " extruded polygon made of " + << matName << " z|x|y|s (0) " << zw[0] << ":" << zx[0] << ":" << zy[0] << ":" + << scale[0] << " z|x|y|s (1) " << zw[1] << ":" << zx[1] << ":" << zy[1] << ":" + << scale[1] << " partial " << partialTypes_[k] << " placement index " + << placementIndex_[m] << " and " << xM.size() << " edges"; + for (unsigned int j = 0; j < xM.size(); ++j) + edm::LogVerbatim("HGCalGeom") << "[" << j << "] " << xM[j] << ":" << yM[j]; +#endif + + // Then the layers + std::vector glogs(materials_.size()); + std::vector copyNumber(materials_.size(), 1); + double zi(-0.5 * thick_), thickTot(0.0); + for (unsigned int l = 0; l < layerType_.size(); l++) { + unsigned int i = layerType_[l]; + wxy = HGCalWaferMask::waferXY(partialTypes_[k], placementIndex_[m], waferSize_, 0.0, 0.0, 0.0); + std::vector xL, yL; + for (unsigned int i0 = 0; i0 < (wxy.size() - 1); ++i0) { + xL.emplace_back(wxy[i0].first); + yL.emplace_back(wxy[i0].second); + } +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << "DDHGCalPassivePartial:Layer " << l << ":" << i << " T " << layerThick_[i] + << " Copy " << copyNumber[i] << " Partial type " << partialTypes_[k]; +#endif + DDRotation rot; + if (copyNumber[i] == 1) { + zw[0] = -0.5 * layerThick_[i]; + zw[1] = 0.5 * layerThick_[i]; + std::string lname = mother + layerNames_[i]; + solid = DDSolidFactory::extrudedpolygon(lname, xL, yL, zw, zx, zy, scale); + DDName matN(DDSplit(materials_[i]).first, DDSplit(materials_[i]).second); + DDMaterial matter(matN); + glogs[i] = DDLogicalPart(solid.ddname(), matter, solid); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << "DDHGCalPassivePartial: " << solid.name() << " extruded polygon made of " + << matN << " z|x|y|s (0) " << zw[0] << ":" << zx[0] << ":" << zy[0] << ":" + << scale[0] << " z|x|y|s (1) " << zw[1] << ":" << zx[1] << ":" << zy[1] << ":" + << scale[1] << " partial " << partialTypes_[k] << " placement index " + << placementIndex_[m] << " and " << xL.size() << " edges"; + for (unsigned int j = 0; j < xL.size(); ++j) + edm::LogVerbatim("HGCalGeom") << "[" << j << "] " << xL[j] << ":" << yL[j]; +#endif + } + DDTranslation tran(0, 0, (zi + 0.5 * layerThick_[i])); + cpv.position(glogs[i], glogM, copyNumber[i], tran, rot); +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("HGCalGeom") << "DDHGCalPassivePartial: " << glogs[i].name() << " number " << copyNumber[i] + << " positioned in " << glogM.name() << " at " << tran << " with no rotation"; +#endif + ++copyNumber[i]; + zi += layerThick_[i]; + thickTot += layerThick_[i]; + } + if ((std::abs(thickTot - thick_) >= tol) && (!layerType_.empty())) { + if (thickTot > thick_) { + edm::LogError("HGCalGeom") << "Thickness of the partition " << thick_ << " is smaller than " << thickTot + << ": thickness of all its components **** ERROR ****"; + } else { + edm::LogWarning("HGCalGeom") << "Thickness of the partition " << thick_ << " does not match with " << thickTot + << " of the components"; + } + } + } + } +} + +DEFINE_EDM_PLUGIN(DDAlgorithmFactory, DDHGCalPassivePartial, "hgcal:DDHGCalPassivePartial"); diff --git a/Geometry/HGCalCommonData/python/testHGCalPassiveXML_cfi.py b/Geometry/HGCalCommonData/python/testHGCalPassiveXML_cfi.py new file mode 100644 index 0000000000000..a04308ee6dde8 --- /dev/null +++ b/Geometry/HGCalCommonData/python/testHGCalPassiveXML_cfi.py @@ -0,0 +1,20 @@ +import FWCore.ParameterSet.Config as cms + +XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource", + geomXMLFiles = cms.vstring( + 'Geometry/CMSCommonData/data/materials/2021/v3/materials.xml', + 'Geometry/CMSCommonData/data/rotations.xml', + 'Geometry/CMSCommonData/data/extend/v2/cmsextent.xml', + 'Geometry/CMSCommonData/data/cavernData/2021/v1/cavernData.xml', + 'Geometry/CMSCommonData/data/cms/2026/v5/cms.xml', + 'Geometry/CMSCommonData/data/cmsMother.xml', + 'Geometry/CMSCommonData/data/eta3/etaMax.xml', + 'Geometry/CMSCommonData/data/caloBase/2026/v7/caloBase.xml', + 'Geometry/HGCalCommonData/data/hgcalMaterial/v2/hgcalMaterial.xml', + 'Geometry/HGCalCommonData/data/hgcal/v18/hgcal.xml', + 'Geometry/HGCalCommonData/data/hgcalPassive/v18/hgcalPassive.xml', + 'Geometry/HGCalCommonData/data/hgcalPassive/v18/hgcalpos.xml'), + rootNodeName = cms.string('cms:OCMS') +) + + diff --git a/Geometry/HGCalCommonData/test/python/dumpHGCalPassive_cfg.py b/Geometry/HGCalCommonData/test/python/dumpHGCalPassive_cfg.py new file mode 100644 index 0000000000000..43334ff3b88b4 --- /dev/null +++ b/Geometry/HGCalCommonData/test/python/dumpHGCalPassive_cfg.py @@ -0,0 +1,35 @@ +import FWCore.ParameterSet.Config as cms +from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9 +process = cms.Process('GeomDump',Phase2C17I13M9) + +geomFile = "Geometry.HGCalCommonData.testHGCalPassiveXML_cfi" +fileName = "hgcalPassiveDDD.root" + +print("Geometry file: ", geomFile) +print("Output file: ", fileName) + +process.load(geomFile) +process.load('FWCore.MessageService.MessageLogger_cfi') + +if 'MessageLogger' in process.__dict__: + process.MessageLogger.G4cerr=dict() + process.MessageLogger.G4cout=dict() + process.MessageLogger.HGCalGeom=dict() +# process.MessageLogger.SimG4CoreGeometry=dict() +# process.MessageLogger.TGeoMgrFromDdd=dict() + +process.source = cms.Source("EmptySource") + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(1) +) + +process.add_(cms.ESProducer("TGeoMgrFromDdd", + verbose = cms.untracked.bool(False), + level = cms.untracked.int32(14) +)) + +process.dump = cms.EDAnalyzer("DumpSimGeometry", + outputFileName = cms.untracked.string(fileName)) + +process.p = cms.Path(process.dump)