Dear @brfranco , thanks a lot for the very helpful inputs which allowed me to already setup something on my side.
With the help of various AI to which i passed various tutorials, i ended up understandign that for my study, as first step i need to be able to produce my own signal decay, so i need to run ``k4run`` to run first a pythia step.
I am not an expert on this (simulation) so i was having a look a bit around to achieve what i want, which i doubt it’s the case anyway with what i will post later ( but at least is running successfully).
What i want to do is the following :
(ee → Z → bbar , have always one of the b to hadronize to a Lambdab ( so the other will do Lambdab-bar ) and then force one of the 2 to decay through my signal Lambdab→(ppi) gamma .
As starting point i wrote (p8_ee_Zbb_LambdaB_forced.cmd )
Beams:idA = 11
Beams:idB = -11
Beams:eCM = 91.2
WeakSingleBoson:ffbar2gmZ = on
23:onMode = off
23:onIfAny = 5 -5
! Optional mild baryon boost
StringFlav:probQQtoQ = 0.20
! Your forced decays (if not using EvtGen)
5122:onMode = off
5122:onIfMatch = 3122 22
5122:addChannel = 1 1.0 11 3122 22
-5122:onMode = off
-5122:onIfMatch = -3122 22
-5122:addChannel = 1 1.0 11 -3122 22
3122:onMode = off
3122:onIfMatch = 2212 -211
-3122:onMode = off
-3122:onIfMatch = -2212 211
Then i have my Lb2LambdaGamma.dec
# Lambda_b -> Lambda0 gamma decay
# The other b-quark decays inclusively (using DECAY.DEC defaults)
# Force Lambda_b radiative decay for analysis
Decay Lambda_b0
1.0 Lambda0 gamma PHSP;
Enddecay
Decay anti-Lambda_b0
1.0 anti-Lambda0 gamma PHSP;
Enddecay
# Lambda0 -> p pi decay
Decay Lambda0
1.0 p+ pi- PHSP;
Enddecay
Decay anti-Lambda0
1.0 anti-p- pi+ PHSP;
Enddecay
# All B mesons (B0, B+, Bs, Bc) will decay according to DECAY.DEC
# This provides the generic b-hadron decays for the other hemisphere
End
and my Generate_Lb.py file
from Gaudi.Configuration import INFO, DEBUG
from Configurables import (
ApplicationMgr,
GenAlg,
PythiaInterface,
HepMCToEDMConverter,
IOSvc
)
ApplicationMgr().EvtSel = ‘NONE’
# ApplicationMgr().HistogramPersist = False
ApplicationMgr().EvtMax = 200000 # Oversize → filter later for signal
ApplicationMgr().OutputLevel = INFO
# Pythia8 as signal provider
pythia = PythiaInterface(“PythiaInterface”)
pythia.pythiacard = “p8_ee_Zbb_LambdaB_forced.cmd”
pythia.doEvtGenDecays = True
pythia.UserDecayFile = “Lb2LambdaGamma.dec” # Your custom file (relative or absolute path)
pythia.EvtGenDecayFile = “DECAY.DEC” # NB: from wget local
pythia.EvtGenParticleDataFile = “evt.pdl” # NB: from wget local
# Optional: force reload or extra settings*
pythia.pythiaExtraSettings = [
“Init:showProcesses = on”, # Print init summary
“Init:showMultipartonInteractions = on”
]
# Generator algorithm (wraps PythiaInterface)
gen = GenAlg(“Generator”)
gen.SignalProvider = pythia
# Convert HepMC → EDM4hep MCParticles
hepmc_converter = HepMCToEDMConverter(“HepMCToEDMConverter”)
hepmc_converter.hepmc.Path = “hepmc” # Input: HepMC GenEvent location
hepmc_converter.GenParticles.Path = “GenParticles” # Output: EDM4hep MCParticle collection
# IOSvc for automatic EDM4hep output (writes ALL collections)
iosvc = IOSvc(“IOSvc”)
iosvc.Output = “ee_Zbb_Lb_Lgamma.edm4hep.root” # Your file
# Execution sequence + add IOSvc as service
ApplicationMgr().TopAlg += [gen, hepmc_converter]
ApplicationMgr().ExtSvc += [iosvc]
Then i just run k4run generate_Lb.py , it runs successfully so it’s already a success for me. However i am not 100% sure i am generating things as i want ( or how would be suggested to do ). As i understood i need ee_Zbb_Lb_Lgamma.edm4hep.root to pass to various detectors setup to make some comparisons/studies. Is that correct?
Thanks a lot in advance
Renato