Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30125 from vargasa/tmx
DD4hep: SimTracker/TrackerMaterialAnalysis Migrated plugin Test
- Loading branch information
Showing
7 changed files
with
108 additions
and
3 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
SimTracker/TrackerMaterialAnalysis/data/dd4hep_trackingMaterialGroups.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
SimTracker/TrackerMaterialAnalysis/python/trackingMaterialAnalyser_ForPhaseII_dd4hep_cff.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
# Analyze and plot the tracking material | ||
from SimTracker.TrackerMaterialAnalysis.trackingMaterialAnalyser_ForPhaseII_dd4hep_cfi import * |
46 changes: 46 additions & 0 deletions
46
SimTracker/TrackerMaterialAnalysis/python/trackingMaterialAnalyser_ForPhaseII_dd4hep_cfi.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
trackingMaterialAnalyser = cms.EDAnalyzer("DD4hep_TrackingMaterialAnalyser", | ||
MaterialAccounting = cms.InputTag("trackingMaterialProducer"), | ||
SplitMode = cms.string("NearestLayer"), | ||
DDDetector = cms.ESInputTag("","CMS"), | ||
SkipBeforeFirstDetector = cms.bool(False), | ||
SkipAfterLastDetector = cms.bool(True), | ||
SaveSummaryPlot = cms.bool(True), | ||
SaveDetailedPlots = cms.bool(False), | ||
SaveParameters = cms.bool(True), | ||
SaveXML = cms.bool(True), | ||
isHGCal = cms.bool(False), | ||
isHFNose = cms.bool(False), | ||
# to derive the following list: | ||
# cat ../data/trackingMaterialGroups_ForPhaseII.xml | grep TrackingMaterialGroup | sed -e 's/\s*//' | cut -d ' ' -f 3 | tr '=' ' ' | cut -d ' ' -f 2 | tr -d '"' | sed -e 's/\(.*\)/"\1",/' | ||
Groups = cms.vstring( | ||
"TrackerRecMaterialPhase2PixelBarrelLayer1", | ||
"TrackerRecMaterialPhase2PixelBarrelLayer2", | ||
"TrackerRecMaterialPhase2PixelBarrelLayer3", | ||
"TrackerRecMaterialPhase2PixelBarrelLayer4", | ||
"TrackerRecMaterialPhase2PixelForwardDisk1", | ||
"TrackerRecMaterialPhase2PixelForwardDisk2", | ||
"TrackerRecMaterialPhase2PixelForwardDisk3", | ||
"TrackerRecMaterialPhase2PixelForwardDisk4", | ||
"TrackerRecMaterialPhase2PixelForwardDisk5", | ||
"TrackerRecMaterialPhase2PixelForwardDisk6", | ||
"TrackerRecMaterialPhase2PixelForwardDisk7", | ||
"TrackerRecMaterialPhase2PixelForwardDisk8", | ||
"TrackerRecMaterialPhase2PixelForwardDisk9", | ||
"TrackerRecMaterialPhase2PixelForwardDisk10", | ||
"TrackerRecMaterialPhase2PixelForwardDisk11", | ||
"TrackerRecMaterialPhase2PixelForwardDisk12", | ||
"TrackerRecMaterialPhase2OTBarrelLayer1", | ||
"TrackerRecMaterialPhase2OTBarrelLayer2", | ||
"TrackerRecMaterialPhase2OTBarrelLayer3", | ||
"TrackerRecMaterialPhase2OTBarrelLayer4", | ||
"TrackerRecMaterialPhase2OTBarrelLayer5", | ||
"TrackerRecMaterialPhase2OTBarrelLayer6", | ||
"TrackerRecMaterialPhase2OTForwardDisk1", | ||
"TrackerRecMaterialPhase2OTForwardDisk2", | ||
"TrackerRecMaterialPhase2OTForwardDisk3", | ||
"TrackerRecMaterialPhase2OTForwardDisk4", | ||
"TrackerRecMaterialPhase2OTForwardDisk5" | ||
) | ||
) |
47 changes: 47 additions & 0 deletions
47
SimTracker/TrackerMaterialAnalysis/test/TrackingMaterialAnalyser.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#! /usr/bin/env cmsRun | ||
|
||
import FWCore.ParameterSet.Config as cms | ||
|
||
process = cms.Process("MaterialAnalyser") | ||
|
||
process.DDDetectorESProducer = cms.ESSource( | ||
"DDDetectorESProducer", | ||
confGeomXMLFiles = cms.FileInPath('SimTracker/TrackerMaterialAnalysis/data/dd4hep_trackingMaterialGroups.xml'), | ||
appendToDataLabel = cms.string('CMS') | ||
) | ||
|
||
from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cff import * | ||
from SLHCUpgradeSimulations.Geometry.fakeConditions_phase2TkT14_cff import * | ||
from Geometry.EcalCommonData.ecalSimulationParameters_cff import * | ||
from Geometry.HcalCommonData.hcalDDDSimConstants_cff import * | ||
from Geometry.HGCalCommonData.hgcalParametersInitialization_cfi import * | ||
from Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi import * | ||
from Geometry.MuonNumbering.muonGeometryConstants_cff import * | ||
from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cff import * | ||
|
||
process.load('FWCore.MessageService.MessageLogger_cfi') | ||
|
||
process.DDCompactViewESProducer = cms.ESProducer( | ||
"DDCompactViewESProducer", | ||
appendToDataLabel = cms.string('CMS') | ||
) | ||
|
||
# Analyze and plot the tracking material | ||
process.load("SimTracker.TrackerMaterialAnalysis.trackingMaterialAnalyser_ForPhaseII_dd4hep_cff") | ||
process.trackingMaterialAnalyser.SplitMode = "NearestLayer" | ||
process.trackingMaterialAnalyser.SaveParameters = True | ||
process.trackingMaterialAnalyser.SaveXML = True | ||
process.trackingMaterialAnalyser.SaveDetailedPlots = False | ||
|
||
process.source = cms.Source("PoolSource", | ||
fileNames = cms.untracked.vstring('file:material.root') | ||
) | ||
|
||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(-1) | ||
) | ||
|
||
process.MessageLogger.destinations.extend(["LogTrackingMaterialAnalysis"]) | ||
process.MessageLogger.categories.append("TrackingMaterialAnalysis") | ||
process.path = cms.Path(process.trackingMaterialAnalyser) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters