CMS 3D CMS Logo

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