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