File indexing completed on 2024-04-06 12:31:05
0001
0002 """
0003 $cmsRun TrackerMaterialAnalyser.py PhaseII
0004
0005 Input: "material.root" produced by:
0006
0007 $cmsRun MaterialProducer10GeVNeutrino.py
0008 """
0009 import sys
0010 import FWCore.ParameterSet.Config as cms
0011
0012 process = cms.Process("MaterialAnalyser")
0013
0014 ph1Xml = "dd4hep_trackingMaterialGroups_ForPhaseI.xml"
0015 ph2Xml = "dd4hep_trackingMaterialGroups_ForPhaseII.xml"
0016
0017 groupsPh1 = cms.vstring(
0018 "TrackerRecMaterialPixelBarrelLayer0_External",
0019 "TrackerRecMaterialPixelBarrelLayer1_External",
0020 "TrackerRecMaterialPixelBarrelLayer2_External",
0021 "TrackerRecMaterialPixelBarrelLayer3_External",
0022 "TrackerRecMaterialPixelBarrelLayer0",
0023 "TrackerRecMaterialPixelBarrelLayer1",
0024 "TrackerRecMaterialPixelBarrelLayer2",
0025 "TrackerRecMaterialPixelBarrelLayer3",
0026 "TrackerRecMaterialTIBLayer0_Z0",
0027 "TrackerRecMaterialTIBLayer0_Z20",
0028 "TrackerRecMaterialTIBLayer1_Z0",
0029 "TrackerRecMaterialTIBLayer1_Z30",
0030 "TrackerRecMaterialTIBLayer2_Z0",
0031 "TrackerRecMaterialTIBLayer2_Z40",
0032 "TrackerRecMaterialTIBLayer3_Z0",
0033 "TrackerRecMaterialTIBLayer3_Z50",
0034 "TrackerRecMaterialTOBLayer0_Z0",
0035 "TrackerRecMaterialTOBLayer0_Z20",
0036 "TrackerRecMaterialTOBLayer0_Z70",
0037 "TrackerRecMaterialTOBLayer1_Z0",
0038 "TrackerRecMaterialTOBLayer1_Z20",
0039 "TrackerRecMaterialTOBLayer1_Z80",
0040 "TrackerRecMaterialTOBLayer2_Z0",
0041 "TrackerRecMaterialTOBLayer2_Z25",
0042 "TrackerRecMaterialTOBLayer2_Z80",
0043 "TrackerRecMaterialTOBLayer3_Z0",
0044 "TrackerRecMaterialTOBLayer3_Z25",
0045 "TrackerRecMaterialTOBLayer3_Z80",
0046 "TrackerRecMaterialTOBLayer4_Z0",
0047 "TrackerRecMaterialTOBLayer4_Z25",
0048 "TrackerRecMaterialTOBLayer4_Z80",
0049 "TrackerRecMaterialTOBLayer5_Z0",
0050 "TrackerRecMaterialTOBLayer5_Z25",
0051 "TrackerRecMaterialTOBLayer5_Z80",
0052 "TrackerRecMaterialPixelEndcapDisk1Fw_Inner",
0053 "TrackerRecMaterialPixelEndcapDisk1Fw_Outer",
0054 "TrackerRecMaterialPixelEndcapDisk2Fw_Inner",
0055 "TrackerRecMaterialPixelEndcapDisk2Fw_Outer",
0056 "TrackerRecMaterialPixelEndcapDisk3Fw_Inner",
0057 "TrackerRecMaterialPixelEndcapDisk3Fw_Outer",
0058 "TrackerRecMaterialPixelEndcapDisk1Bw_Inner",
0059 "TrackerRecMaterialPixelEndcapDisk1Bw_Outer",
0060 "TrackerRecMaterialPixelEndcapDisk2Bw_Inner",
0061 "TrackerRecMaterialPixelEndcapDisk2Bw_Outer",
0062 "TrackerRecMaterialPixelEndcapDisk3Bw_Inner",
0063 "TrackerRecMaterialPixelEndcapDisk3Bw_Outer",
0064 "TrackerRecMaterialTIDDisk1_R0",
0065 "TrackerRecMaterialTIDDisk1_R30",
0066 "TrackerRecMaterialTIDDisk2_R25",
0067 "TrackerRecMaterialTIDDisk2_R30",
0068 "TrackerRecMaterialTIDDisk2_R40",
0069 "TrackerRecMaterialTIDDisk3_R24",
0070 "TrackerRecMaterialTECDisk0_R20",
0071 "TrackerRecMaterialTECDisk0_R40",
0072 "TrackerRecMaterialTECDisk0_R50",
0073 "TrackerRecMaterialTECDisk0_R60",
0074 "TrackerRecMaterialTECDisk0_R90",
0075 "TrackerRecMaterialTECDisk1_R20",
0076 "TrackerRecMaterialTECDisk2_R20",
0077 "TrackerRecMaterialTECDisk3",
0078 "TrackerRecMaterialTECDisk4_R33",
0079 "TrackerRecMaterialTECDisk5_R33",
0080 "TrackerRecMaterialTECDisk6",
0081 "TrackerRecMaterialTECDisk7_R40",
0082 "TrackerRecMaterialTECDisk8",
0083 )
0084
0085 groupsPh2 = cms.vstring(
0086 "TrackerRecMaterialPhase2PixelBarrelLayer1",
0087 "TrackerRecMaterialPhase2PixelBarrelLayer2",
0088 "TrackerRecMaterialPhase2PixelBarrelLayer3",
0089 "TrackerRecMaterialPhase2PixelBarrelLayer4",
0090 "TrackerRecMaterialPhase2PixelForwardDisk1",
0091 "TrackerRecMaterialPhase2PixelForwardDisk2",
0092 "TrackerRecMaterialPhase2PixelForwardDisk3",
0093 "TrackerRecMaterialPhase2PixelForwardDisk4",
0094 "TrackerRecMaterialPhase2PixelForwardDisk5",
0095 "TrackerRecMaterialPhase2PixelForwardDisk6",
0096 "TrackerRecMaterialPhase2PixelForwardDisk7",
0097 "TrackerRecMaterialPhase2PixelForwardDisk8",
0098 "TrackerRecMaterialPhase2PixelForwardDisk9",
0099 "TrackerRecMaterialPhase2PixelForwardDisk10",
0100 "TrackerRecMaterialPhase2PixelForwardDisk11",
0101 "TrackerRecMaterialPhase2PixelForwardDisk12",
0102 "TrackerRecMaterialPhase2OTBarrelLayer1",
0103 "TrackerRecMaterialPhase2OTBarrelLayer2",
0104 "TrackerRecMaterialPhase2OTBarrelLayer3",
0105 "TrackerRecMaterialPhase2OTBarrelLayer4",
0106 "TrackerRecMaterialPhase2OTBarrelLayer5",
0107 "TrackerRecMaterialPhase2OTBarrelLayer6",
0108 "TrackerRecMaterialPhase2OTForwardDisk1",
0109 "TrackerRecMaterialPhase2OTForwardDisk2",
0110 "TrackerRecMaterialPhase2OTForwardDisk3",
0111 "TrackerRecMaterialPhase2OTForwardDisk4",
0112 "TrackerRecMaterialPhase2OTForwardDisk5"
0113 )
0114
0115 optPh = str(sys.argv[1])
0116
0117 groups = None
0118 if( optPh.lower() == "phasei"):
0119 groups = groupsPh1
0120 process.load('Configuration.Geometry.GeometryDD4hepExtended2021Reco_cff')
0121 elif( optPh.lower() == "phaseii"):
0122 groups = groupsPh2
0123 else:
0124 print("Valid options: PhaseI, PhaseII")
0125
0126 from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cff import *
0127 from Geometry.EcalCommonData.ecalSimulationParameters_cff import *
0128 from Geometry.HcalCommonData.hcalDDDSimConstants_cff import *
0129 from Geometry.HGCalCommonData.hgcalParametersInitialization_cfi import *
0130 from Geometry.HGCalCommonData.hgcalNumberingInitialization_cfi import *
0131 from Geometry.MuonNumbering.muonGeometryConstants_cff import *
0132 from Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cff import *
0133
0134 process.load('FWCore.MessageService.MessageLogger_cfi')
0135
0136 process.DDCompactViewESProducer = cms.ESProducer(
0137 "DDCompactViewESProducer",
0138 appendToDataLabel = cms.string('')
0139 )
0140
0141 process.trackingMaterialAnalyser = cms.EDAnalyzer(
0142 "DD4hep_TrackingMaterialAnalyser",
0143 MaterialAccounting = cms.InputTag("trackingMaterialProducer"),
0144 SplitMode = cms.string("NearestLayer"),
0145 DDDetector = cms.ESInputTag("",""),
0146 SkipBeforeFirstDetector = cms.bool(False),
0147 SkipAfterLastDetector = cms.bool(True),
0148 SaveSummaryPlot = cms.bool(True),
0149 SaveDetailedPlots = cms.bool(True),
0150 SaveParameters = cms.bool(True),
0151 SaveXML = cms.bool(True),
0152 isHGCal = cms.bool(False),
0153 isHFNose = cms.bool(False),
0154 Groups = groups
0155 )
0156
0157 process.source = cms.Source("PoolSource",
0158 fileNames = cms.untracked.vstring('file:material.root')
0159 )
0160
0161 process.maxEvents = cms.untracked.PSet(
0162 input = cms.untracked.int32(-1)
0163 )
0164
0165 process.MessageLogger.files.LogTrackingMaterialAnalysis = dict()
0166 process.MessageLogger.TrackingMaterialAnalysis=dict()
0167 process.path = cms.Path(process.trackingMaterialAnalyser)
0168