8 import FWCore.ParameterSet.Config
as cms
9 import os, sys, imp, re
10 import FWCore.ParameterSet.VarParsing
as VarParsing
18 options.register(
'geometry',
20 VarParsing.VarParsing.multiplicity.singleton,
21 VarParsing.VarParsing.varType.string,
22 "geometry of operations: D88, D92, D93")
24 options.register(
'layers',
26 VarParsing.VarParsing.multiplicity.singleton,
27 VarParsing.VarParsing.varType.string,
28 "For single layer use 'layers=3' (default is 'layers=1'); or for multiple layers use 'layers=1,27,41,46'; or for all layers use 'layers=1-47'. Note that the size may increase by ~10 times or more in RAM and filesize if 'all layers' option is used.")
31 options.parseArguments()
33 import FWCore.ParameterSet.Config
as cms
40 fileInput =
"file:step3.root" 42 if (options.geometry ==
"D88"):
43 from Configuration.Eras.Era_Phase2C11I13M9_cff
import Phase2C11I13M9
44 process = cms.Process(
'HGCalMTReco',Phase2C11I13M9)
45 process.load(
'Configuration.Geometry.GeometryExtended2026D88Reco_cff')
46 outputFile =
'file:recoutputD88.root' 47 elif (options.geometry ==
"D93"):
48 from Configuration.Eras.Era_Phase2C11I13M9_cff
import Phase2C11I13M9
49 process = cms.Process(
'HGCalMTReco',Phase2C11I13M9)
50 process.load(
'Configuration.Geometry.GeometryExtended2026D93Reco_cff')
51 outputFile =
'file:recoutputD93.root' 52 elif (options.geometry ==
"D92"):
53 from Configuration.Eras.Era_Phase2C11I13M9_cff
import Phase2C11I13M9
54 process = cms.Process(
'HGCalMTReco',Phase2C11I13M9)
55 process.load(
'Configuration.Geometry.GeometryExtended2026D92Reco_cff')
56 outputFile =
'file:recoutputD92.root' 58 print(
"Please select a valid geometry version e.g. D88, D92, D93....")
60 print(
"Input file: ", fileInput)
61 print(
"Output file: ", outputFile)
63 process.load(
"SimGeneral.HepPDTESSource.pythiapdt_cfi")
64 process.load(
'Configuration.StandardSequences.MagneticField_cff')
65 process.load(
'Configuration.StandardSequences.Services_cff')
66 process.load(
'FWCore.MessageService.MessageLogger_cfi')
67 process.load(
'Configuration.EventContent.EventContent_cff')
68 process.load(
'Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
69 from Configuration.AlCa.GlobalTag
import GlobalTag
70 process.GlobalTag =
GlobalTag(process.GlobalTag,
'auto:phase2_realistic_T21',
'')
72 process.MessageLogger.cerr.FwkReport.reportEvery = 100
74 process.source = cms.Source(
"PoolSource",
75 dropDescendantsOfDroppedBranches = cms.untracked.bool(
False),
76 fileNames = cms.untracked.vstring(fileInput),
77 inputCommands = cms.untracked.vstring(
79 'drop l1tTkPrimaryVertexs_L1TkPrimaryVertex__*' 81 secondaryFileNames = cms.untracked.vstring()
84 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents) )
86 process.load(
'Validation.HGCalValidation.hgcalMTRecoStudy_cfi')
88 process.hgcalMTRecoStudyEE = process.hgcalMTRecoStudy.clone(detectorName =
'HGCalEESensitive',
89 source =
'HGCalRecHit:HGCEERecHits',
90 layerList = options.layers
93 process.hgcalMTRecoStudyFH = process.hgcalMTRecoStudy.clone(detectorName =
'HGCalHESiliconSensitive',
94 source =
'HGCalRecHit:HGCHEFRecHits',
95 layerList = options.layers
98 process.hgcalMTRecoStudyBH = process.hgcalMTRecoStudy.clone( detectorName =
'HGCalHEScintillatorSensitive',
99 source =
'HGCalRecHit:HGCHEBRecHits',
100 layerList = options.layers
103 process.TFileService = cms.Service(
"TFileService",
104 fileName = cms.string(outputFile),
105 closeFileFast = cms.untracked.bool(
True))
107 process.p = cms.Path(process.hgcalMTRecoStudyEE+process.hgcalMTRecoStudyFH+process.hgcalMTRecoStudyBH)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)