Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33233 from bsunanda/Run3-sim83
Run3 sim83 Attempt to unify the file definitions between FullSim and FastSim
- Loading branch information
Showing
8 changed files
with
125 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
# Several parameters needed for HF simulation | ||
|
||
HFLibraryFileBlock = cms.PSet( | ||
FileName = cms.FileInPath('SimG4CMS/Calo/data/HFShowerLibrary_oldpmt_noatt_eta4_16en_v3.root'), | ||
BackProbability = cms.double(0.2), | ||
TreeEMID = cms.string('emParticles'), | ||
TreeHadID = cms.string('hadParticles'), | ||
ApplyFiducialCut= cms.bool(True), | ||
Verbosity = cms.untracked.bool(False), | ||
BranchPost = cms.untracked.string(''), | ||
BranchEvt = cms.untracked.string(''), | ||
BranchPre = cms.untracked.string('') | ||
) | ||
|
||
HFShowerBlock = cms.PSet( | ||
ProbMax = cms.double(1.0), | ||
CFibre = cms.double(0.5), | ||
OnlyLong = cms.bool(True) | ||
) | ||
|
||
## | ||
## Change the HFShowerLibrary file from Run 2 | ||
## | ||
from Configuration.Eras.Modifier_run2_common_cff import run2_common | ||
run2_common.toModify( HFLibraryFileBlock, FileName = 'SimG4CMS/Calo/data/HFShowerLibrary_npmt_noatt_eta4_16en_v4.root' ) | ||
run2_common.toModify( HFShowerBlock, ProbMax = 0.5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
from Configuration.Eras.Era_Run3_cff import Run3 | ||
process = cms.Process("PROD",Run3) | ||
process.load("Configuration.Geometry.GeometryExtended2021Reco_cff") | ||
|
||
#from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep | ||
#process = cms.Process("PROD",Run3_dd4hep) | ||
#process.load("Configuration.Geometry.GeometryDD4hepExtended2021Reco_cff") | ||
|
||
process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi") | ||
process.load('FWCore.MessageService.MessageLogger_cfi') | ||
process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi") | ||
process.load("Configuration.StandardSequences.MagneticField_cff") | ||
process.load("Configuration.EventContent.EventContent_cff") | ||
process.load('Configuration.StandardSequences.Generator_cff') | ||
process.load('Configuration.StandardSequences.SimIdeal_cff') | ||
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff" | ||
) | ||
from Configuration.AlCa.GlobalTag import GlobalTag | ||
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2021_realistic', '') | ||
|
||
process.MessageLogger.cerr.FwkReport.reportEvery = 5 | ||
if hasattr(process,'MessageLogger'): | ||
process.MessageLogger.G4cerr=dict() | ||
process.MessageLogger.HcalSim=dict() | ||
process.MessageLogger.HFShower=dict() | ||
|
||
process.load("IOMC.RandomEngine.IOMC_cff") | ||
process.RandomNumberGeneratorService.generator.initialSeed = 456789 | ||
process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876 | ||
process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789 | ||
|
||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(5) | ||
) | ||
|
||
process.source = cms.Source("EmptySource") | ||
|
||
process.generator = cms.EDProducer("FlatRandomEGunProducer", | ||
PGunParameters = cms.PSet( | ||
PartID = cms.vint32(211), | ||
MinEta = cms.double(4.25), | ||
MaxEta = cms.double(4.25), | ||
MinPhi = cms.double(-3.14159265359), | ||
MaxPhi = cms.double(3.14159265359), | ||
MinE = cms.double(30.0), | ||
MaxE = cms.double(30.0) | ||
), | ||
Verbosity = cms.untracked.int32(0), | ||
AddAntiParticle = cms.bool(False), | ||
firstRun = cms.untracked.uint32(1) | ||
) | ||
|
||
process.output = cms.OutputModule("PoolOutputModule", | ||
process.FEVTSIMEventContent, | ||
fileName = cms.untracked.string('simevent030eta37.root') | ||
) | ||
|
||
process.Timing = cms.Service("Timing") | ||
|
||
process.generation_step = cms.Path(process.pgen) | ||
process.simulation_step = cms.Path(process.psim) | ||
process.out_step = cms.EndPath(process.output) | ||
|
||
process.g4SimHits.Physics.type = 'SimG4Core/Physics/FTFP_BERT_EMM' | ||
#process.g4SimHits.G4Commands = ['/tracking/verbose 1'] | ||
|
||
# Schedule definition | ||
process.schedule = cms.Schedule(process.generation_step, | ||
process.simulation_step, | ||
process.out_step | ||
) | ||
|
||
# filter all path with the production filter sequence | ||
for path in process.paths: | ||
getattr(process,path)._seq = process.generator * getattr(process,path)._seq | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters