Skip to content

Commit

Permalink
Merge pull request #27739 from bsunanda/Phase2-hgx211
Browse files Browse the repository at this point in the history
Phase2-hgx211 Modify the tests and try to put tests in HGCal Geometry area
  • Loading branch information
cmsbuild committed Aug 13, 2019
2 parents 464d3c1 + 2043900 commit 1a0cdc9
Show file tree
Hide file tree
Showing 14 changed files with 203 additions and 19 deletions.
Expand Up @@ -18,7 +18,7 @@
<rSolid name="MotherOfAllBoxes"/>
</LogicalPart>
</LogicalPartSection>
<Algorithm name="HGCal:DDHGCalCell">
<Algorithm name="hgcal:DDHGCalCell">
<rParent name="testDDHGCalCellAlgorithm:MotherOfAllBoxes"/>
<Numeric name="WaferSize" value="[WaferSize]"/>
<Numeric name="WaferThick" value="[WaferThickness]"/>
Expand Down
18 changes: 9 additions & 9 deletions DetectorDescription/DDCMS/data/testDDHGCalWafer8Algorithm.xml
Expand Up @@ -11,7 +11,7 @@
</ConstantsSection>

<PosPartSection label="testDDHGCalWafer8Algorithm.xml">
<Algorithm name="HGCal:DDHGCalWafer8">
<Algorithm name="hgcal:DDHGCalWafer8">
<rParent name="HGCalEEWafer0Fine"/>
<Numeric name="WaferSize" value="[WaferSize]"/>
<Numeric name="WaferThick" value="[WaferThickness]"/>
Expand All @@ -30,7 +30,7 @@
testDDHGCalCellAlgorithm:HGCalEECellCorner06Fine</Vector>
</Algorithm>
<!--
<Algorithm name="HGCal:DDHGCalWafer8">
<Algorithm name="hgcal:DDHGCalWafer8">
<rParent name="HGCalEEWafer1Fine"/>
<Numeric name="WaferSize" value="[WaferSize]"/>
<Numeric name="WaferThick" value="[WaferThickness]"/>
Expand All @@ -48,7 +48,7 @@
testDDHGCalCellAlgorithm:HGCalEECellCorner14Fine,testDDHGCalCellAlgorithm:HGCalEECellCorner15Fine,
testDDHGCalCellAlgorithm:HGCalEECellCorner16Fine</Vector>
</Algorithm>
<Algorithm name="HGCal:DDHGCalWafer8">
<Algorithm name="hgcal:DDHGCalWafer8">
<rParent name="HGCalEEWafer0Coarse1"/>
<Numeric name="WaferSize" value="[WaferSize]"/>
<Numeric name="WaferThick" value="[WaferThickness]"/>
Expand All @@ -66,7 +66,7 @@
testDDHGCalCellAlgorithm:HGCalEECellCorner04Coarse1,testDDHGCalCellAlgorithm:HGCalEECellCorner05Coarse1,
testDDHGCalCellAlgorithm:HGCalEECellCorner06Coarse1</Vector>
</Algorithm>
<Algorithm name="HGCal:DDHGCalWafer8">
<Algorithm name="hgcal:DDHGCalWafer8">
<rParent name="HGCalEEWafer1Coarse1"/>
<Numeric name="WaferSize" value="[WaferSize]"/>
<Numeric name="WaferThick" value="[WaferThickness]"/>
Expand All @@ -84,7 +84,7 @@
testDDHGCalCellAlgorithm:HGCalEECellCorner14Coarse1,testDDHGCalCellAlgorithm:HGCalEECellCorner15Coarse1,
testDDHGCalCellAlgorithm:HGCalEECellCorner16Coarse1</Vector>
</Algorithm>
<Algorithm name="HGCal:DDHGCalWafer8">
<Algorithm name="hgcal:DDHGCalWafer8">
<rParent name="HGCalEEWafer0Coarse2"/>
<Numeric name="WaferSize" value="[WaferSize]"/>
<Numeric name="WaferThick" value="[WaferThickness]"/>
Expand All @@ -102,7 +102,7 @@
testDDHGCalCellAlgorithm:HGCalEECellCorner04Coarse2,testDDHGCalCellAlgorithm:HGCalEECellCorner05Coarse2,
testDDHGCalCellAlgorithm:HGCalEECellCorner06Coarse2</Vector>
</Algorithm>
<Algorithm name="HGCal:DDHGCalWafer8">
<Algorithm name="hgcal:DDHGCalWafer8">
<rParent name="HGCalEEWafer1Coarse2"/>
<Numeric name="WaferSize" value="[WaferSize]"/>
<Numeric name="WaferThick" value="[WaferThickness]"/>
Expand All @@ -120,7 +120,7 @@
testDDHGCalCellAlgorithm:HGCalEECellCorner14Coarse2,testDDHGCalCellAlgorithm:HGCalEECellCorner15Coarse2,
testDDHGCalCellAlgorithm:HGCalEECellCorner16Coarse2</Vector>
</Algorithm>
<Algorithm name="HGCal:DDHGCalWafer8">
<Algorithm name="hgcal:DDHGCalWafer8">
<rParent name="HGCalHEWafer0Fine"/>
<Numeric name="WaferSize" value="[WaferSize]"/>
<Numeric name="WaferThick" value="[WaferThickness]"/>
Expand All @@ -138,7 +138,7 @@
testDDHGCalCellAlgorithm:HGCalHECellCorner04Fine,testDDHGCalCellAlgorithm:HGCalHECellCorner05Fine,
testDDHGCalCellAlgorithm:HGCalHECellCorner06Fine</Vector>
</Algorithm>
<Algorithm name="HGCal:DDHGCalWafer8">
<Algorithm name="hgcal:DDHGCalWafer8">
<rParent name="HGCalHEWafer0Coarse1"/>
<Numeric name="WaferSize" value="[WaferSize]"/>
<Numeric name="WaferThick" value="[WaferThickness]"/>
Expand All @@ -156,7 +156,7 @@
testDDHGCalCellAlgorithm:HGCalHECellCorner04Coarse1,testDDHGCalCellAlgorithm:HGCalHECellCorner05Coarse1,
testDDHGCalCellAlgorithm:HGCalHECellCorner06Coarse1</Vector>
</Algorithm>
<Algorithm name="HGCal:DDHGCalWafer8">
<Algorithm name="hgcal:DDHGCalWafer8">
<rParent name="HGCalHEWafer0Coarse2"/>
<Numeric name="WaferSize" value="[WaferSize]"/>
<Numeric name="WaferThick" value="[WaferThickness]"/>
Expand Down
2 changes: 1 addition & 1 deletion DetectorDescription/DDCMS/plugins/DDHGCalCell.cc
Expand Up @@ -247,4 +247,4 @@ static long algorithm(dd4hep::Detector& /* description */,
}

// first argument is the type from the xml file
DECLARE_DDCMS_DETELEMENT(DDCMS_HGCal_DDHGCalCell, algorithm)
DECLARE_DDCMS_DETELEMENT(DDCMS_hgcal_DDHGCalCell, algorithm)
2 changes: 1 addition & 1 deletion DetectorDescription/DDCMS/plugins/DDHGCalWafer.cc
Expand Up @@ -83,4 +83,4 @@ static long algorithm(dd4hep::Detector& /* description */,
}

// first argument is the type from the xml file
DECLARE_DDCMS_DETELEMENT(DDCMS_HGCal_DDHGCalWafer, algorithm)
DECLARE_DDCMS_DETELEMENT(DDCMS_hgcal_DDHGCalWafer, algorithm)
2 changes: 1 addition & 1 deletion DetectorDescription/DDCMS/plugins/DDHGCalWafer8.cc
Expand Up @@ -119,4 +119,4 @@ static long algorithm(dd4hep::Detector& /* description */,
}

// first argument is the type from the xml file
DECLARE_DDCMS_DETELEMENT(DDCMS_HGCal_DDHGCalWafer8, algorithm)
DECLARE_DDCMS_DETELEMENT(DDCMS_hgcal_DDHGCalWafer8, algorithm)
@@ -0,0 +1,33 @@
<?xml version="1.0"?>
<DDDefinition>
<debug>
<debug_shapes/>
<debug_includes/>
<debug_rotations/>
<debug_includes/>
<debug_volumes/>
<debug_constants/>
<!-- debug_materials/ -->
<debug_namespaces/>
<debug_placements/>
<debug_algorithms/>

<!--
<debug_materials/>
<debug_visattr/>
-->
</debug>

<open_geometry/>
<close_geometry/>

<IncludeSection>
<Include ref="Geometry/CMSCommonData/data/materials.xml"/>
<Include ref="Geometry/CMSCommonData/data/rotations.xml"/>
<Include ref="Geometry/HGCalCommonData/test/cms.xml"/>
<Include ref="Geometry/HGCalCommonData/data/hgcalwafer/v8/hgcal.xml"/>
<Include ref="Geometry/HGCalCommonData/data/hgcalwafer/v8/hgcalwafer.xml"/>
</IncludeSection>

</DDDefinition>

@@ -0,0 +1,34 @@
<?xml version="1.0"?>
<DDDefinition>
<debug>
<debug_shapes/>
<debug_includes/>
<debug_rotations/>
<debug_includes/>
<debug_volumes/>
<debug_constants/>
<!-- debug_materials/ -->
<debug_namespaces/>
<debug_placements/>
<debug_algorithms/>

<!--
<debug_materials/>
<debug_visattr/>
-->
</debug>

<open_geometry/>
<close_geometry/>

<IncludeSection>
<Include ref="Geometry/CMSCommonData/data/materials.xml"/>
<Include ref="Geometry/CMSCommonData/data/rotations.xml"/>
<Include ref="Geometry/HGCalCommonData/test/cms.xml"/>
<Include ref="Geometry/HGCalCommonData/data/hgcalwafer/v9/hgcal.xml"/>
<Include ref="Geometry/HGCalCommonData/data/hgcalcell/v9/hgcalcell.xml"/>
<Include ref="Geometry/HGCalCommonData/data/hgcalwafer/v9/hgcalwafer.xml"/>
</IncludeSection>

</DDDefinition>

31 changes: 31 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalwafer/v8/hgcal.xml
@@ -0,0 +1,31 @@
<?xml version="1.0"?>
<DDDefinition xmlns="http://www.cern.ch/cms/DDL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.cern.ch/cms/DDL ../../../DetectorDescription/Schema/DDLSchema.xsd">

<ConstantsSection label="hgcal.xml" eval="true">
<Constant name="WaferW" value="123.7*mm"/>
</ConstantsSection>

<PosPartSection label="hgcal.xml">
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalwafer:HGCalEEWaferCoarse"/>
<Translation x="0*fm" y="0*fm" z="-0.5*cm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalwafer:HGCalEEWaferFine"/>
<Translation x="0*fm" y="0*fm" z="0.5*cm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalwafer:HGCalHEWaferCoarse"/>
<Translation x="0*fm" y="0*fm" z="-1.5*cm"/>
</PosPart>
<PosPart copyNumber="1">
<rParent name="cms:CMSE"/>
<rChild name="hgcalwafer:HGCalHEWaferFine"/>
<Translation x="0*fm" y="0*fm" z="1.5*cm"/>
</PosPart>
</PosPartSection>

</DDDefinition>
13 changes: 13 additions & 0 deletions Geometry/HGCalCommonData/python/testHGCalWafer8XML_cfi.py
@@ -0,0 +1,13 @@
import FWCore.ParameterSet.Config as cms

XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource",
geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/materials.xml',
'Geometry/CMSCommonData/data/rotations.xml',
'Geometry/HGCalCommonData/test/cms.xml',
'Geometry/HGCalCommonData/data/hgcalwafer/v9/hgcal.xml',
'Geometry/HGCalCommonData/data/hgcalwafer/v9/hgcalwafer.xml',
'Geometry/HGCalCommonData/data/hgcalcell/v9/hgcalcell.xml'),
rootNodeName = cms.string('cms:OCMS')
)


7 changes: 2 additions & 5 deletions Geometry/HGCalCommonData/python/testHGCalWaferXML_cfi.py
Expand Up @@ -4,10 +4,7 @@
geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/materials.xml',
'Geometry/CMSCommonData/data/rotations.xml',
'Geometry/HGCalCommonData/test/cms.xml',
'Geometry/HGCalCommonData/data/hgcalwafer/v9/hgcal.xml',
'Geometry/HGCalCommonData/data/hgcalwafer/v9/hgcalwafer.xml',
'Geometry/HGCalCommonData/data/hgcalcell/v9/hgcalcell.xml'),
'Geometry/HGCalCommonData/data/hgcalwafer/v8/hgcal.xml',
'Geometry/HGCalCommonData/data/hgcalwafer/v8/hgcalwafer.xml'),
rootNodeName = cms.string('cms:OCMS')
)


26 changes: 26 additions & 0 deletions Geometry/HGCalCommonData/test/dumpWafer8Geometry_cfg.py
@@ -0,0 +1,26 @@
import FWCore.ParameterSet.Config as cms

process = cms.Process("DUMP")
process.load("Geometry.HGCalCommonData.testHGCalWafer8XML_cfi")
process.load('FWCore.MessageService.MessageLogger_cfi')

if 'MessageLogger' in process.__dict__:
process.MessageLogger.categories.append('G4cerr')
process.MessageLogger.categories.append('G4cout')
process.MessageLogger.categories.append('HGCalGeom')

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('wafer8DDD.root'))

process.p = cms.Path(process.dump)
2 changes: 1 addition & 1 deletion Geometry/HGCalCommonData/test/dumpWaferGeometry_cfg.py
Expand Up @@ -21,6 +21,6 @@
))

process.dump = cms.EDAnalyzer("DumpSimGeometry",
outputFileName = cms.untracked.string('wafer.root'))
outputFileName = cms.untracked.string('waferDDD.root'))

process.p = cms.Path(process.dump)
25 changes: 25 additions & 0 deletions Geometry/HGCalCommonData/test/testWafer8Geometry_cfg.py
@@ -0,0 +1,25 @@
import FWCore.ParameterSet.Config as cms

process = cms.Process("DDHGCalWafer8Test")

process.load('FWCore.MessageService.MessageLogger_cfi')
process.source = cms.Source("EmptySource")
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(1)
)

process.MessageLogger.cerr.FwkReport.reportEvery = 5
if hasattr(process,'MessageLogger'):
process.MessageLogger.categories.append('HGCalGeom')

process.DDDetectorESProducer = cms.ESSource("DDDetectorESProducer",
confGeomXMLFiles = cms.FileInPath('Geometry/HGCalCommonData/data/dd4hep/cms-test-ddhgcalwafer8-algorithm.xml'),
appendToDataLabel = cms.string('DDHGCalWafer8')
)

process.testDump = cms.EDAnalyzer("DDTestDumpFile",
outputFileName = cms.untracked.string('hgcalWafer8DD4Hep.root'),
DDDetector = cms.ESInputTag('','DDHGCalWafer8')
)

process.p = cms.Path(process.testDump)
25 changes: 25 additions & 0 deletions Geometry/HGCalCommonData/test/testWaferGeometry_cfg.py
@@ -0,0 +1,25 @@
import FWCore.ParameterSet.Config as cms

process = cms.Process("DDHGCalWafer8Test")

process.load('FWCore.MessageService.MessageLogger_cfi')
process.source = cms.Source("EmptySource")
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(1)
)

process.MessageLogger.cerr.FwkReport.reportEvery = 5
if hasattr(process,'MessageLogger'):
process.MessageLogger.categories.append('HGCalGeom')

process.DDDetectorESProducer = cms.ESSource("DDDetectorESProducer",
confGeomXMLFiles = cms.FileInPath('Geometry/HGCalCommonData/data/dd4hep/cms-test-ddhgcalwafer-algorithm.xml'),
appendToDataLabel = cms.string('DDHGCalWafer')
)

process.testDump = cms.EDAnalyzer("DDTestDumpFile",
outputFileName = cms.untracked.string('hgcalWaferDD4Hep.root'),
DDDetector = cms.ESInputTag('','DDHGCalWafer')
)

process.p = cms.Path(process.testDump)

0 comments on commit 1a0cdc9

Please sign in to comment.