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