Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Configuration/Generator/python/DisplacedParticleGun_cfi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import FWCore.ParameterSet.Config as cms

generator = cms.EDProducer(
"DisplacedParticleGunProducer",
PGunParameters = cms.PSet(
# particle direction
MinPt = cms.double(5.0),
MaxPt = cms.double(100.0),
MinPhi = cms.double(-3.141592653589793),
MaxPhi = cms.double(+3.141592653589793),

# displaced vertex in transverse plane (cm)
RMin = cms.double(0.0),
RMax = cms.double(10.0),
MinVtxPhi = cms.double(0.0),
MaxVtxPhi = cms.double(2.0 * 3.141592653589793),
ZVtx = cms.double(0.0),

NParticles = cms.int32(1),
PartID = cms.vint32(22), # photon

# how to sample the vertex radius
UniformDensityInR = cms.bool(False),

# if True: derive theta to hit a region of the HGCAL front surface
# if False: use MinTheta/MaxTheta
PointingToHGCAL = cms.bool(True),

# only used if PointingToHGCAL == True (cm),
# corresponds to the central third of HGCAL's front surface
RminFrontSurfaceHGCAL = cms.double(58.79),
RmaxFrontSurfaceHGCAL = cms.double(91.58),

# only used if PointingToHGCAL == False (radians)
MinTheta = cms.double(0.),
MaxTheta = cms.double(3.141592653589793),
),
Verbosity = cms.untracked.int32(0),
firstRun = cms.untracked.uint32(1),
psethack = cms.string("displaced gun with theta, optionally pointing to hard-coded HGCAL front surface"),
)
7 changes: 5 additions & 2 deletions Configuration/PyReleaseValidation/python/relval_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4950,6 +4950,9 @@ def gen2024HiMix(fragment,howMuch):

upgradeStepDict['GenSimCloseBy'][k] = deepcopy(upgradeStepDict['GenSim'][k])
upgradeStepDict['GenSimCloseBy'][k]['--beamspot'] = 'CloseBy'

upgradeStepDict['GenSimDisplaced'][k] = deepcopy(upgradeStepDict['GenSim'][k])
upgradeStepDict['GenSimDisplaced'][k]['--beamspot'] = 'CloseBy'

upgradeStepDict['GenSimHLBeamSpot'][k] = {'-s' : 'GEN,SIM',
'-n' : 10,
Expand All @@ -4963,7 +4966,7 @@ def gen2024HiMix(fragment,howMuch):
upgradeStepDict['GenSimHLBeamSpot14'][k] = deepcopy(upgradeStepDict['GenSimHLBeamSpot'][k])
upgradeStepDict['GenSimHLBeamSpot14'][k]['--conditions'] = gt

upgradeStepDict['GenSimHLBeamSpotCloseBy'][k] = upgradeStepDict['GenSimCloseBy'][k]
upgradeStepDict['GenSimHLBeamSpotCloseBy'][k] = deepcopy(upgradeStepDict['GenSimCloseBy'][k])

upgradeStepDict['Sim'][k] = {'-s' : 'SIM',
'-n' : 10,
Expand Down Expand Up @@ -5201,7 +5204,7 @@ def gen2024HiMix(fragment,howMuch):

# in case special WF has PU-specific changes: apply *after* basic PU step is created
specialWF.setupPU(upgradeStepDict, k, upgradeProperties[year][k])

for step in upgradeStepDict.keys():
# we need to do this for each fragment
if ('Sim' in step and ('Fast' not in step and step != 'Sim')) or ('Premix' in step) or ('Sim' not in step and 'Gen' in step):
Expand Down
2 changes: 2 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def notForGenOnly(key,specialType):
step = 'GenSimHLBeamSpotCloseBy'
elif 'CloseBy' in frag or 'CE_E' in frag or 'CE_H' in frag:
step = 'GenSimCloseBy'
elif 'Displaced' in frag:
step = 'GenSimDisplaced'
stepMaker = makeStepNameSim
elif 'Gen' in step:
if 'HLBeamSpot' in step:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ def condition(self, fragment, stepList, key, hasHarvest):
'Sim',
'GenSim',
'GenSimCloseBy',
'GenSimDisplaced',
'GenSimHLBeamSpot',
'GenSimHLBeamSpot14',
'GenSimHLBeamSpotCloseBy',
Expand Down Expand Up @@ -4081,4 +4082,5 @@ def __init__(self, howMuch, dataset):
('Hydjet_Quenched_MinBias_5519GeV_cfi', UpgradeFragment(U2000by1,'HydjetQMinBias_5519GeV')),
('SingleMuPt15Eta0_0p4_cfi', UpgradeFragment(Kby(9,100),'SingleMuPt15Eta0p_0p4')),
('CloseByPGun_Barrel_Front_cfi', UpgradeFragment(Kby(9,100),'CloseByPGun_Barrel_Front')),
('DisplacedParticleGun_cfi', UpgradeFragment(Kby(9,100),'DisplacedPGun')),
])
Loading