CMS 3D CMS Logo

testHGCalReco_cfg.py
Go to the documentation of this file.
1 
11 import FWCore.ParameterSet.Config as cms
12 import os, sys, imp, re, random
13 import FWCore.ParameterSet.VarParsing as VarParsing
14 
15 
17 options = VarParsing.VarParsing('standard')
18 options.register('geometry',
19  "D92",
20  VarParsing.VarParsing.multiplicity.singleton,
21  VarParsing.VarParsing.varType.string,
22  "geometry of operations: D88, D92, D93, V17Shift, V18")
23 options.register('type',
24  "DDD",
25  VarParsing.VarParsing.multiplicity.singleton,
26  VarParsing.VarParsing.varType.string,
27  "type of operations: DDD, DD4hep")
28 options.register('data',
29  "mu",
30  VarParsing.VarParsing.multiplicity.singleton,
31  VarParsing.VarParsing.varType.string,
32  "data of operations: mu, tt")
33 options.register('tag',
34  "Def",
35  VarParsing.VarParsing.multiplicity.singleton,
36  VarParsing.VarParsing.varType.string,
37  "tag of operations: Def, Thr, 0Noise")
38 
39 options.parseArguments()
40 
41 print(options)
42 
43 
45 from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
46 if (options.type == "DD4hep"):
47  from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
48  process = cms.Process('SingleMuonSim',Phase2C17I13M9,dd4hep)
49  if (options.geometry == "V17Shift"):
50  geomFile = "Geometry.HGCalCommonData.testHGCal" + options.type + options.geometry + "Reco_cff"
51  elif (options.geometry == "V18"):
52  geomFile = "Geometry.HGCalCommonData.testHGCal" + options.type + options.geometry + "Reco_cff"
53  else:
54  geomFile = "Configuration.Geometry.Geometry" + options.type +"Extended2026" + options.geometry + "Reco_cff"
55 else:
56  process = cms.Process('SingleMuonSim',Phase2C17I13M9)
57  if (options.geometry == "V17Shift"):
58  geomFile = "Geometry.HGCalCommonData.testHGCal" + options.geometry + "Reco_cff"
59  elif (options.geometry == "V18"):
60  geomFile = "Geometry.HGCalCommonData.testHGCal" + options.geometry + "Reco_cff"
61  else:
62  geomFile = "Configuration.Geometry.GeometryExtended2026" + options.geometry + "Reco_cff"
63 globalTag = "auto:phase2_realistic_T21"
64 inFile = "file:step2" + options.type + options.geometry + options.data + ".root"
65 outFile = "file:step3" + options.type + options.geometry + options.data + ".root"
66 fileName = "missing" + options.type + options.geometry + options.data + options.tag + ".root"
67 
68 print("Geometry file: ", geomFile)
69 print("Global Tag: ", globalTag)
70 print("Input file: ", inFile)
71 print("Output file: ", outFile)
72 print("Root file: ", fileName)
73 
74 # import of standard configurations
75 process.load('Configuration.StandardSequences.Services_cff')
76 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
77 process.load('FWCore.MessageService.MessageLogger_cfi')
78 process.load('Configuration.EventContent.EventContent_cff')
79 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
80 process.load(geomFile)
81 process.load('Configuration.StandardSequences.MagneticField_cff')
82 process.load('Configuration.StandardSequences.RawToDigi_cff')
83 process.load('Configuration.StandardSequences.Reconstruction_cff')
84 process.load('Configuration.StandardSequences.RecoSim_cff')
85 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
86 process.load('Validation.HGCalValidation.hgcMissingRecHit_cfi')
87 
88 process.MessageLogger.cerr.FwkReport.reportEvery = 1
89 if hasattr(process,'MessageLogger'):
90  process.MessageLogger.HGCalMiss=dict()
91  process.MessageLogger.HGCalError=dict()
92 
93 process.maxEvents = cms.untracked.PSet(
94  input = cms.untracked.int32(-1),
95  output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
96 )
97 
98 # Input source
99 process.source = cms.Source("PoolSource",
100  fileNames = cms.untracked.vstring(inFile),
101  secondaryFileNames = cms.untracked.vstring()
102 )
103 
104 process.options = cms.untracked.PSet(
105  IgnoreCompletely = cms.untracked.vstring(),
106  Rethrow = cms.untracked.vstring(),
107  TryToContinue = cms.untracked.vstring(),
108  accelerators = cms.untracked.vstring('*'),
109  allowUnscheduled = cms.obsolete.untracked.bool,
110  canDeleteEarly = cms.untracked.vstring(),
111  deleteNonConsumedUnscheduledModules = cms.untracked.bool(True),
112  dumpOptions = cms.untracked.bool(False),
113  emptyRunLumiMode = cms.obsolete.untracked.string,
114  eventSetup = cms.untracked.PSet(
115  forceNumberOfConcurrentIOVs = cms.untracked.PSet(
116  allowAnyLabel_=cms.required.untracked.uint32
117  ),
118  numberOfConcurrentIOVs = cms.untracked.uint32(0)
119  ),
120  fileMode = cms.untracked.string('FULLMERGE'),
121  forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
122  makeTriggerResults = cms.obsolete.untracked.bool,
123  numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(0),
124  numberOfConcurrentRuns = cms.untracked.uint32(1),
125  numberOfStreams = cms.untracked.uint32(0),
126  numberOfThreads = cms.untracked.uint32(1),
127  printDependencies = cms.untracked.bool(False),
128  sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
129  throwIfIllegalParameter = cms.untracked.bool(True),
130  wantSummary = cms.untracked.bool(False)
131 )
132 
133 # Production Info
134 process.configurationMetadata = cms.untracked.PSet(
135  annotation = cms.untracked.string('step3 nevts:10'),
136  name = cms.untracked.string('Applications'),
137  version = cms.untracked.string('$Revision: 1.19 $')
138 )
139 
140 # Output definition
141 
142 process.FEVTDEBUGHLToutput = cms.OutputModule("PoolOutputModule",
143  dataset = cms.untracked.PSet(
144  dataTier = cms.untracked.string('GEN-SIM-RECO'),
145  filterName = cms.untracked.string('')
146  ),
147  fileName = cms.untracked.string(outFile),
148  outputCommands = cms.untracked.vstring(
149  'keep *_*hbhe*_*_*',
150  'keep *_g4SimHits_*_*',
151  'keep *_*HGC*_*_*',
152  ),
153  splitLevel = cms.untracked.int32(0)
154 )
155 
156 # Additional output definition
157 process.TFileService = cms.Service("TFileService",
158  fileName = cms.string(fileName),
159  closeFileFast = cms.untracked.bool(True) )
160 
161 # Other statements
162 process.mix.playback = True
163 process.mix.digitizers = cms.PSet()
164 for a in process.aliases: delattr(process, a)
165 process.RandomNumberGeneratorService.restoreStateLabel=cms.untracked.string("randomEngineStateProducer")
166 from Configuration.AlCa.GlobalTag import GlobalTag
167 process.GlobalTag = GlobalTag(process.GlobalTag, globalTag, '')
168 
169 # Path and EndPath definitions
170 process.raw2digi_step = cms.Path(process.RawToDigi)
171 process.reconstruction_step = cms.Path(process.reconstruction)
172 process.recosim_step = cms.Path(process.recosim)
173 process.analysis_step = cms.Path(process.hgcMissingRecHit)
174 process.FEVTDEBUGHLToutput_step = cms.EndPath(process.FEVTDEBUGHLToutput)
175 
176 # Schedule definition
177 process.schedule = cms.Schedule(process.raw2digi_step,
178  process.reconstruction_step,
179  process.recosim_step,
180  process.analysis_step,
181  process.FEVTDEBUGHLToutput_step)
182 
183 # customisation of the process.
184 
185 # Automatic addition of the customisation function from SimGeneral.MixingModule.fullMixCustomize_cff
186 from SimGeneral.MixingModule.fullMixCustomize_cff import setCrossingFrameOn
187 
188 #call to customisation function setCrossingFrameOn imported from SimGeneral.MixingModule.fullMixCustomize_cff
189 process = setCrossingFrameOn(process)
190 
191 # End of customisation functions
192 
193 # Add early deletion of temporary data products to reduce peak memory need
194 from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
195 process = customiseEarlyDelete(process)
196 # End adding early deletion
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def setCrossingFrameOn(process)