Skip to content

Commit

Permalink
Explicitly pass the beam energy in simple trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
tvami committed Apr 29, 2024
1 parent a1894b1 commit 296994d
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 16 deletions.
5 changes: 3 additions & 2 deletions .github/validation_samples/ecal_pn/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

from LDMX.Biasing import ecal
from LDMX.SimCore import generators as gen
mySim = ecal.photo_nuclear('ldmx-det-v14',gen.single_4gev_e_upstream_tagger())
det = 'ldmx-det-v14'
mySim = ecal.photo_nuclear(det,gen.single_4gev_e_upstream_tagger())
mySim.beamSpotSmear = [20.,80.,0.]
mySim.description = 'ECal PN Test Simulation'

Expand Down Expand Up @@ -62,6 +63,6 @@
TrigScintClusterProducer.pad2(),
TrigScintClusterProducer.pad3(),
trigScintTrack,
count, TriggerProcessor('trigger'),
count, TriggerProcessor('trigger', 4000.),
dqm.PhotoNuclearDQM(verbose=True),
] + dqm.all_dqm)
5 changes: 3 additions & 2 deletions .github/validation_samples/inclusive/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

from LDMX.SimCore import simulator as sim
mySim = sim.simulator( "mySim" )
mySim.setDetector( 'ldmx-det-v14-8gev', True )
det = 'ldmx-det-v14-8gev'
mySim.setDetector(det, True )
from LDMX.SimCore import generators as gen
mySim.generators.append( gen.single_8gev_e_upstream_tagger() )
mySim.beamSpotSmear = [20.,80.,0.]
Expand Down Expand Up @@ -62,6 +63,6 @@
TrigScintClusterProducer.pad2(),
TrigScintClusterProducer.pad3(),
trigScintTrack,
count, TriggerProcessor('trigger'),
count, TriggerProcessor('trigger', 8000.),
dqm.PhotoNuclearDQM(verbose=False),
] + dqm.all_dqm)
3 changes: 2 additions & 1 deletion .github/validation_samples/it_pileup/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
thisPassName="overlay"
p=ldmxcfg.Process(thisPassName)

det = 'ldmx-det-v14'
p.run = int(os.environ['LDMX_RUN_NUMBER'])
p.maxEvents = int(os.environ['LDMX_NUM_EVENTS'])
p.termLogLevel = 0
Expand Down Expand Up @@ -94,7 +95,7 @@
TrigScintClusterProducer.pad2(),
TrigScintClusterProducer.pad3(),
trigScintTrack,
count, TriggerProcessor('trigger'),
count, TriggerProcessor('trigger', 4000.),
dqm.SimObjects(sim_pass=thisPassName),
ecalDigiVerify,dqm.EcalShowerFeatures(),
dqm.PhotoNuclearDQM(verbose=False),
Expand Down
5 changes: 3 additions & 2 deletions .github/validation_samples/signal/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
p.maxTriesPerEvent = 10000

from LDMX.Biasing import target
det = 'ldmx-det-v14-8gev'
mySim = target.dark_brem(
#A' mass in MeV - set in init.sh to same value in GeV
10.0,
# library path is uniquely determined by arguments given to `dbgen run` in init.sh
# easiest way to find this path out is by running `. init.sh` locally to see what
# is produced
'electron_tungsten_MaxE_8.0_MinE_4.0_RelEStep_0.1_UndecayedAP_mA_0.01_run_1',
'ldmx-det-v14-8gev'
det
)

p.sequence = [ mySim ]
Expand Down Expand Up @@ -67,6 +68,6 @@
TrigScintClusterProducer.pad2(),
TrigScintClusterProducer.pad3(),
trigScintTrack,
count, TriggerProcessor('trigger'),
count, TriggerProcessor('trigger', 8000.),
dqm.DarkBremInteraction()
] + dqm.all_dqm)
5 changes: 3 additions & 2 deletions Detectors/test/lyso_signal_10MeV_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

p.maxTriesPerEvent = 10000

det = 'ldmx-lyso-r1-v14-8gev'
from LDMX.Biasing import target
mySim = target.dark_brem(
#A' mass in MeV - set in init.sh to same value in GeV
Expand All @@ -11,7 +12,7 @@
# easiest way to find this path out is by running `. init.sh` locally to see what
# is produced
'electron_lutetiumyttriumsiliconoxygen_MaxE_8.0_MinE_4.0_RelEStep_0.1_UndecayedAP_mA_0.01_run_3000',
'ldmx-lyso-r1-v14-8gev'
det
)

p.sequence = [ mySim ]
Expand Down Expand Up @@ -67,6 +68,6 @@
TrigScintClusterProducer.pad2(),
TrigScintClusterProducer.pad3(),
trigScintTrack,
count, TriggerProcessor('trigger'),
count, TriggerProcessor('trigger', 8000.),
dqm.DarkBremInteraction()
] + dqm.all_dqm)
5 changes: 3 additions & 2 deletions Detectors/test/reducedLDMX_eGun_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
myGun.enablePoisson = False #True

mySim = sim.simulator( "mySim" ) # Build simulator object
mySim.setDetector( 'ldmx-reduced-v1', True )
det = 'ldmx-reduced-v1'
mySim.setDetector(det, True )
mySim.beamSpotSmear = [20.,80.,0.]
mySim.description = 'Reduced ECal Electron Gun Test Simulation'

Expand Down Expand Up @@ -72,6 +73,6 @@
TrigScintClusterProducer.pad2(),
TrigScintClusterProducer.pad3(),
trigScintTrack,
count, TriggerProcessor('trigger'),
count, TriggerProcessor('trigger', 4000.),
# ] + dqm.all_dqm)
])
10 changes: 5 additions & 5 deletions Recon/python/simpleTrigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@
class TriggerProcessor(ldmxcfg.Producer) :
"""Configuration for the (multi-electron aware but simple) trigger on the ECal reco hits"""

def __init__(self,name) :
def __init__(self, name, beamEnergy) :
super().__init__(name,'recon::TriggerProcessor','Recon')

self.beamEnergy = 8000.
self.thresholds = [ self.beamEnergy/4000.*1500.0, self.beamEnergy/4000.*1000. + self.beamEnergy, self.beamEnergy/4000.*500. + 2*self.beamEnergy, self.beamEnergy/4000.*100. + 3*self.beamEnergy ] #toy something up
self.beamEnergy = beamEnergy
self.thresholds = [ self.beamEnergy/4000.*1500.0, self.beamEnergy/4000.*1000. + self.beamEnergy, self.beamEnergy/4000.*500. + 2*self.beamEnergy, self.beamEnergy/4000.*100. + 3*self.beamEnergy ]
self.mode = 0
self.start_layer = 0
self.end_layer = 20
self.input_collection = "EcalRecHits"
self.input_pass = ''
self.trigger_collection = "Trigger"

simpleTrigger = TriggerProcessor("simpleTrigger")
simpleTrigger = TriggerProcessor("simpleTrigger", 8000.)

0 comments on commit 296994d

Please sign in to comment.