Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
93da4bc
prepare Polarization
dirkzerwas Apr 13, 2026
1a7b0c8
add ME amegic definition
dirkzerwas Apr 13, 2026
1dcd3b0
activate Sherpa with Polarization
dirkzerwas Apr 13, 2026
3383314
update to main
dirkzerwas May 21, 2026
db92d1c
Merge branch 'main' of github.com:key4hep/k4GeneratorsConfig
dirkzerwas May 28, 2026
671de45
use ROOT label: chi2/ndf
dirkzerwas May 28, 2026
e4ea06d
remove spurious line and implement BST cross check
dirkzerwas May 28, 2026
f8d4bc9
consistency check updates
dirkzerwas May 28, 2026
126715b
add Herwig
dirkzerwas May 28, 2026
8b54711
add the possibility of a unit in the particle properties
dirkzerwas May 28, 2026
af1509a
upgrade HerwigProcDB
dirkzerwas May 28, 2026
72bd9a8
preparing Herwig
dirkzerwas May 29, 2026
20ba341
language
dirkzerwas May 29, 2026
5dd7192
language
dirkzerwas May 29, 2026
2f31af7
wip Herwig
dirkzerwas May 29, 2026
5865ebe
correct units set
dirkzerwas Jun 3, 2026
2ea3dd3
start selector work
dirkzerwas Jun 3, 2026
436ed2f
debugging other than parameters and setup
dirkzerwas Jun 4, 2026
e569628
debug output except alphaEM and sin2theta
dirkzerwas Jun 4, 2026
42a6feb
full initialization (maybe)
dirkzerwas Jun 4, 2026
b09eefe
#84 rudimentary workaround to get Herwig runnings
dirkzerwas Jun 5, 2026
d3ab1e8
output for Herwig is hepmc2
dirkzerwas Jun 5, 2026
8011c8b
#84 first attempt at cuts
dirkzerwas Jun 5, 2026
86692af
#84 clang
dirkzerwas Jun 5, 2026
9ae89a1
simplify Herwig
dirkzerwas Jun 8, 2026
d52a9ef
#84 references for Herwig
dirkzerwas Jun 8, 2026
aa64fb3
#84 add Herwig to CI
dirkzerwas Jun 8, 2026
2bf6037
#84 deactivate flavor selection for di-fermions
dirkzerwas Jun 8, 2026
7f91166
#84 Herwig situation unclear, remove temporarily from suite
dirkzerwas Jun 8, 2026
2c3f008
#84 remove neutrinos temporarily and flavour selecion for lepton pairs
dirkzerwas Jun 8, 2026
8a3cff9
#84 separate ChargedLeptons and Neutrinos
dirkzerwas Jun 8, 2026
fabe4dc
update ref after chargedlepton and Neutrino split
dirkzerwas Jun 8, 2026
a3b9094
Merge branch 'main' into paperV2
dirkzerwas Jun 9, 2026
fa3d339
make Madgraph run with more than 1M events
dirkzerwas Jun 12, 2026
225efd2
Merge branch 'paperV2' of github.com:key4hep/k4GeneratorsConfig into …
dirkzerwas Jun 12, 2026
1469927
simplify Herwig with Juans recipe
dirkzerwas Jun 23, 2026
d27924d
Update python/Generators/Herwig.py
apricePhy Jun 23, 2026
4dce416
add space in distrbution, change format to pdf for better resolution
dirkzerwas Jun 24, 2026
e66bb02
Merge branch 'paperV2' of github.com:key4hep/k4GeneratorsConfig into …
dirkzerwas Jun 24, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Generators:
- Madgraph
- KKMC
- Pythia
- Herwig

OutputFormat: edm4hep
OutDir: Run-Cards
Expand All @@ -18,10 +19,6 @@ Processes:
Muon91.2:
Final: [13, -13]

MuonNeutrino91.2:
Final: [14, -14]
ISRMode: 1

Tau91.2:
Final: [15, -15]
ISRMode: 1
Expand All @@ -31,10 +28,6 @@ Processes:
SqrtS: 350
ISRMode: 1

MuonNeutrino350:
Final: [14, -14]
SqrtS: 350

Tau350:
Final: [15, -15]
SqrtS: 350
Expand Down
58 changes: 58 additions & 0 deletions examples/NeutrinoProduction.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
Generators:
- Sherpa
- Whizard
- Madgraph
- KKMC
- Pythia

OutputFormat: edm4hep
OutDir: Run-Cards
Events: 10000
EventMode: unweighted

SqrtS: 91.2
Model: SM
ISRMode: 0

Processes:

MuonNeutrino91.2:
Final: [14, -14]
ISRMode: 1

MuonNeutrino350:
Final: [14, -14]
SqrtS: 350

Selectors:
Process:
Tau350:
PT:
Max: 175
Min: 20
Flavour: [-15,15]
Muon350:
PT:
Max: 175
Min: 20
Flavour: [-13,13]
Muon91.2:
PT:
Max: 45.6
Min: 20
Flavour: [-13,13]


Sherpa:
Run:
EW_SCHEME: 3


ParticleData:
23:
mass: 91.1876
width: 2.4952

Analysis:
Tools: [key4HEP]

1 change: 1 addition & 0 deletions examples/ZHProduction.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Generators:
- Herwig
- Sherpa
- Whizard
- Madgraph
Expand Down
10 changes: 5 additions & 5 deletions k4GeneratorsConfig/src/eventGenerationCollections2Root.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void k4GeneratorsConfig::eventGenerationCollections2Root::Init() {
TGaxis::SetExponentOffset(-0.08, -0.12, "y");

// define the generator colors (as offset)
std::vector<std::string> genNames = {"Madgraph", "Sherpa", "Whizard", "KKMC", "Pythia", "Babayaga"};
std::vector<std::string> genNames = {"Madgraph", "Sherpa", "Whizard", "KKMC", "Pythia", "Babayaga", "Herwig"};
for (unsigned int i = 0; i < genNames.size(); i++) {
m_generatorColorOffset[genNames[i]] = i;
}
Expand Down Expand Up @@ -464,7 +464,7 @@ void k4GeneratorsConfig::eventGenerationCollections2Root::writeCrossSectionFigur
mgRMS->GetYaxis()->SetLabelSize(0.1);

// generate a name and write a png
label << m_dirname << "/" << m_processesList[iProc] << "wRMS.png";
label << m_dirname << "/" << m_processesList[iProc] << "wRMS.pdf";
c1->Print(label.str().c_str());
label.clear();
label.str("");
Expand Down Expand Up @@ -503,7 +503,7 @@ void k4GeneratorsConfig::eventGenerationCollections2Root::writeCrossSectionFigur
mgDelta->GetYaxis()->SetLabelSize(0.1);

// generate a name and write a png
label << m_dirname << "/" << m_processesList[iProc] << "wDelta.png";
label << m_dirname << "/" << m_processesList[iProc] << "wDelta.pdf";
c1->Print(label.str().c_str());
label.clear();
label.str("");
Expand Down Expand Up @@ -571,7 +571,7 @@ void k4GeneratorsConfig::eventGenerationCollections2Root::writeAnalysisHistosFig
// now build the legend:
TLegend* topLegend = new TLegend(0.1, 0.0, 0.4, 0.4);
std::ostringstream title;
title << m_procSqrtsList[proc].first << " #sqrt{s} =" << m_procSqrtsList[proc].second << "GeV";
title << m_procSqrtsList[proc].first << " #sqrt{s} =" << m_procSqrtsList[proc].second << " GeV";
topLegend->SetHeader(title.str().c_str(), "C");
// we need to get the histo from the top
TList* topPadPrimitives = topPad->GetListOfPrimitives();
Expand Down Expand Up @@ -626,7 +626,7 @@ void k4GeneratorsConfig::eventGenerationCollections2Root::writeAnalysisHistosFig
// done, save the canvas
label << m_dirname << "/" << m_procSqrtsList[proc].first
<< (unsigned int)(m_procSqrtsList[proc].second * m_EnergyUnitCnv) << m_cnvAnalysisHistosNames[proc][ihisto]
<< ".png";
<< ".pdf";
m_cnvAnalysisHistos[proc][ihisto]->Print(label.str().c_str());
label.clear();
label.str("");
Expand Down
4 changes: 4 additions & 0 deletions python/Generators/Babayaga.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ def getParticleOperator(self, pdg, prop):
# not used by Babayaga
pass

def getParticlePropertyUnit(self):
# not used
pass

def getParticleProperty(self, attr):
# not used by Babayaga
pass
9 changes: 7 additions & 2 deletions python/Generators/GeneratorBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def resetGeneratorDatacard(self):
def getGeneratorCommand(self,key,value):
pass

def addOption2GeneratorDatacard(self,key,value,replace=True):
def addOption2GeneratorDatacard(self,key,value,unit="",replace=True):
# check if the key is already defined in the datacard, then we take the last one (TBC):
if replace is True:
if key in self.__datacardContent:
Expand Down Expand Up @@ -440,14 +440,19 @@ def prepareParticles(self,add2Datacard=True, writeParticleHeader=False):
for attr in particle:
value = particle[attr]
prop = self.getParticleProperty(attr)
unit = self.getParticlePropertyUnit()
# writing out
if prop is not None:
command = self.getParticleOperator(pdg,prop)
if add2Datacard is True:
self.addOption2GeneratorDatacard(command, value,replace=False)
self.addOption2GeneratorDatacard(command, value, unit, replace=False)
else:
self.replaceOptionInGeneratorDatacard(command,value)

@abstractmethod
def getParticlePropertyUnit(self):
pass

@abstractmethod
def getParticleProperty(self, attr):
pass
Expand Down
Loading
Loading