10 import FWCore.ParameterSet.Config
as cms
11 import os, sys, imp, re
12 import FWCore.ParameterSet.VarParsing
as VarParsing
17 options.register(
'geometry',
19 VarParsing.VarParsing.multiplicity.singleton,
20 VarParsing.VarParsing.varType.string,
21 "geometry of operations: D105, D110, D114")
23 options.register(
'layers',
25 VarParsing.VarParsing.multiplicity.singleton,
26 VarParsing.VarParsing.varType.string,
27 "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 in memory usage and ~50 times in file volume if 'all layers' option is applied.")
29 options.register(
'type',
31 VarParsing.VarParsing.multiplicity.singleton,
32 VarParsing.VarParsing.varType.string,
33 "type of operations: mu, tt")
36 options.parseArguments()
38 import FWCore.ParameterSet.Config
as cms
39 from Configuration.Eras.Era_Phase2C17I13M9_cff
import Phase2C17I13M9
40 process = cms.Process(
'HGCalCellHit',Phase2C17I13M9)
47 loadFile =
"Configuration.Geometry.GeometryExtendedRun4" + options.geometry +
"Reco_cff" 48 inputFile =
"file:step1" + options.geometry + options.type +
".root" 49 outputFile =
"file:geantoutput" + options.geometry + options.type +
".root" 51 if (options.geometry ==
"D105"):
52 geomFile =
'Validation/HGCalValidation/data/wafer_v16.csv' 53 elif (options.geometry ==
"D114"):
54 geomFile =
'Validation/HGCalValidation/data/wafer_v17.csv' 56 geomFile =
'Validation/HGCalValidation/data/wafer_v17.csv' 58 print(
"Geometry file: ", loadFile)
59 print(
"Wafer file: ", geomFile)
60 print(
"Input file: ", inputFile)
61 print(
"Output file: ", outputFile)
63 process.load(
'SimGeneral.HepPDTESSource.pythiapdt_cfi')
64 process.load(loadFile)
65 process.load(
'FWCore.MessageService.MessageLogger_cfi')
66 process.MessageLogger.cerr.FwkReport.reportEvery = 100
67 if hasattr(process,
'MessageLogger'):
68 process.MessageLogger.ValidHGCal=dict()
70 process.load(
"IOMC.RandomEngine.IOMC_cff")
71 process.RandomNumberGeneratorService.generator.initialSeed = 456789
73 process.source = cms.Source(
"PoolSource",
74 fileNames = cms.untracked.vstring(inputFile)
77 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1))
79 process.load(
'Validation.HGCalValidation.hgcalCellHitSum_cff')
81 process.hgcalCellHitSumEE.geometryFileName = geomFile
82 process.hgcalCellHitSumHEF.geometryFileName = geomFile
83 process.hgcalCellHitSumHEB.geometryFileName = geomFile
85 process.TFileService = cms.Service(
"TFileService",
86 fileName = cms.string(outputFile) )
88 process.p = cms.Path(process.hgcalCellHitSumEE*process.hgcalCellHitSumHEF*process.hgcalCellHitSumHEB)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)