Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
3ad413a
streamline the Process module
dirkzerwas Jun 5, 2025
7ccf508
update analysis processing
dirkzerwas Jun 5, 2025
d6d92a4
clang changes
dirkzerwas Jun 6, 2025
b9ce86f
clang and move differential to analysisHistos
dirkzerwas Jun 6, 2025
b6f4f79
move xsectionSummary to eventGenerationSummary
dirkzerwas Jun 6, 2025
b4ddc73
moving to a consistent naming scheme
dirkzerwas Jun 6, 2025
4400e27
clang correction
dirkzerwas Jun 6, 2025
678c837
axis labels, naming scheme, bug fix multiples sqrts
dirkzerwas Jun 6, 2025
d2ea502
clang
dirkzerwas Jun 6, 2025
281d482
remove unusable commandWord
dirkzerwas Jun 6, 2025
e22f98f
missing comparator aded
dirkzerwas Jun 6, 2025
f64d7b4
change naming scheme to MeV
dirkzerwas Jun 6, 2025
04355a5
clang
dirkzerwas Jun 6, 2025
7a7ecf8
simplify and automatize xsection figures
dirkzerwas Jun 10, 2025
a9f8ce9
clang
dirkzerwas Jun 10, 2025
13a844f
add second summary figure
dirkzerwas Jun 11, 2025
d9191c8
add superposotion and pulls for differentials
dirkzerwas Jun 11, 2025
1c1a0c0
clang
dirkzerwas Jun 11, 2025
9676bc1
margin for rounding errors, correct pz range
dirkzerwas Jun 12, 2025
c5da986
simple chi2
dirkzerwas Jun 12, 2025
d02946d
simplify the structure
dirkzerwas Jun 12, 2025
6a6a587
clean up of labels
dirkzerwas Jun 12, 2025
85c3b50
clang
dirkzerwas Jun 12, 2025
153fe2b
clang
dirkzerwas Jun 12, 2025
e4e31ca
argument names
dirkzerwas Jun 12, 2025
241b68b
fix legend and memory leak
dirkzerwas Jun 12, 2025
276a4b9
move to new names
dirkzerwas Jun 12, 2025
fe87832
add chi2 to output and restructure
dirkzerwas Jun 12, 2025
79e010e
clang
dirkzerwas Jun 12, 2025
88b322d
clang
dirkzerwas Jun 12, 2025
cabecc4
robust determination of sqrts
dirkzerwas Jun 12, 2025
e005ca6
clang
dirkzerwas Jun 12, 2025
99cf070
move sqrtsProc list to pair
dirkzerwas Jun 12, 2025
604f849
order the root tree
dirkzerwas Jun 12, 2025
13faed5
move up minimal cross section
dirkzerwas Jun 12, 2025
86474e5
syntax
dirkzerwas Jun 12, 2025
4d13c0a
common energy conversion
dirkzerwas Jun 13, 2025
7220a30
robustness of structure
dirkzerwas Jun 13, 2025
3bc076a
clang
dirkzerwas Jun 13, 2025
135f5c3
clang
dirkzerwas Jun 13, 2025
e93be28
add new structure Proc/Gen
dirkzerwas Jun 13, 2025
5b29f73
safe index usage and speed up loops
dirkzerwas Jun 13, 2025
7208978
clearer variables
dirkzerwas Jun 13, 2025
2097b0a
clang
dirkzerwas Jun 13, 2025
746286d
remove superfluous method
dirkzerwas Jun 16, 2025
895db42
remove superfluous method writeTree
dirkzerwas Jun 16, 2025
100d8fc
better naming for method
dirkzerwas Jun 16, 2025
fea4cfc
adding triplet to indexlogic
dirkzerwas Jun 16, 2025
f35a70d
simplify structure and make index search robust
dirkzerwas Jun 16, 2025
99c9865
clang and make the artifacts available even for failures
dirkzerwas Jun 16, 2025
fb7e2bd
remove temporarily whizard from BST test
dirkzerwas Jun 16, 2025
2f61cab
filename update for consistency
dirkzerwas Jun 17, 2025
b92d7d5
consistent errors in sqrts
dirkzerwas Jun 17, 2025
62a5a66
correct typo in test script
dirkzerwas Jun 17, 2025
f99603b
correct access to error
dirkzerwas Jun 17, 2025
635757d
clean up of EDM4HEP writer and 2root
dirkzerwas Jun 17, 2025
b8b977a
clang
dirkzerwas Jun 17, 2025
d37292a
prepare figures for the artififacts
dirkzerwas Jun 17, 2025
5a0883c
correct yml
dirkzerwas Jun 17, 2025
c1f6ada
correct yml
dirkzerwas Jun 17, 2025
f62c97f
protection against non-existant files
dirkzerwas Jun 17, 2025
86c7b35
clang
dirkzerwas Jun 17, 2025
3bd7231
debug whizard on alma
dirkzerwas Jun 17, 2025
52becbd
step 2 of whizard debug
dirkzerwas Jun 17, 2025
696309d
change permissions
dirkzerwas Jun 17, 2025
cb2c2cc
correct clang bugs
dirkzerwas Jun 17, 2025
fc701a8
correct clang bugs
dirkzerwas Jun 17, 2025
edec373
correct clang bugs
dirkzerwas Jun 17, 2025
6bc5647
debug whizard
dirkzerwas Jun 17, 2025
b9a245f
debug whizard alma
dirkzerwas Jun 17, 2025
70f87cc
debug whizard
dirkzerwas Jun 17, 2025
fa23b6c
debug whizard
dirkzerwas Jun 18, 2025
ab1e467
debug whizard
dirkzerwas Jun 18, 2025
006c21c
debug whizard ci alma
dirkzerwas Jun 18, 2025
9ca83b5
debug whizard
dirkzerwas Jun 18, 2025
b2401ff
debug whizard
dirkzerwas Jun 18, 2025
95ab734
debug whizard
dirkzerwas Jun 18, 2025
0524e1c
debug whizard ci
dirkzerwas Jun 18, 2025
0ede625
debug whizard ci
dirkzerwas Jun 18, 2025
a459c62
Try older release
tmadlener Jun 18, 2025
69eed39
debug whizard ci
dirkzerwas Jun 18, 2025
046afa4
debug whizard ci
dirkzerwas Jun 18, 2025
af2bf93
debug whizard ci
dirkzerwas Jun 18, 2025
051e3dc
debug whizard ci
dirkzerwas Jun 18, 2025
a04b855
debug whizard ci
dirkzerwas Jun 18, 2025
f3c3cbe
debug whizard ci
dirkzerwas Jun 18, 2025
b53f189
debug whizard ci
dirkzerwas Jun 18, 2025
bcbc58f
Update key4hep_build.yml
dirkzerwas Jun 18, 2025
ea1f50e
debug whizard ci
dirkzerwas Jun 18, 2025
72ecbd8
debug whizard ci
dirkzerwas Jun 18, 2025
b2fd167
debug whizard ci
dirkzerwas Jun 18, 2025
cc3b2ba
debug whizard ci
dirkzerwas Jun 18, 2025
7219538
debug ci for whizard
dirkzerwas Jun 18, 2025
16355f0
debug whizard ci
dirkzerwas Jun 18, 2025
d05dc62
debug whizard ci
dirkzerwas Jun 18, 2025
93817b5
debug whizard ci
dirkzerwas Jun 19, 2025
06388fb
debug whizard ci
dirkzerwas Jun 19, 2025
86025c2
debug whizard ci
dirkzerwas Jun 19, 2025
e89944e
rename ecmsfiles to yaml
dirkzerwas Jun 19, 2025
3788be7
revert to standard configuration and tests
dirkzerwas Jun 20, 2025
430bdb1
bug fixes and corrections for the output
dirkzerwas Jun 20, 2025
e084a07
reactiviate the setup
dirkzerwas Jun 20, 2025
30f001a
remove superfluous files
dirkzerwas Jun 20, 2025
cd6cfa3
debug artififact output
dirkzerwas Jun 20, 2025
ca6a978
debug artififact output
dirkzerwas Jun 20, 2025
eb1d521
revert to identified failure state
dirkzerwas Jun 20, 2025
58f5ccf
make execution compatible with local modifications
dirkzerwas Jun 20, 2025
38f40d8
move to new structure
dirkzerwas Jun 20, 2025
d9d06db
new reference after update
dirkzerwas Jun 20, 2025
fc34189
precommit and naming
dirkzerwas Jun 20, 2025
fb92089
complete conversion of pythia
dirkzerwas Jun 20, 2025
abdfb20
update scheme for pythia
dirkzerwas Jun 20, 2025
5ce77cc
add analysis
dirkzerwas Jun 24, 2025
d6fd254
simplify ci tests
dirkzerwas Jun 24, 2025
d415054
debugging of ci environment
dirkzerwas Jun 24, 2025
80500ae
debugging of ci environment
dirkzerwas Jun 24, 2025
d60c02f
debugging of ci environment
dirkzerwas Jun 24, 2025
e729f2a
debugging of ci environment
dirkzerwas Jun 24, 2025
b038468
debug
dirkzerwas Jun 24, 2025
760c8f7
ci debug
dirkzerwas Jun 24, 2025
2612c94
debugging CI
dirkzerwas Jun 24, 2025
c2cbeaa
debugging CI
dirkzerwas Jun 24, 2025
4296e53
ci debugging
dirkzerwas Jun 24, 2025
a58ed95
safer multienvironment
dirkzerwas Jun 24, 2025
c799204
safer multienvironment
dirkzerwas Jun 24, 2025
a1e83b5
safer multienvironment
dirkzerwas Jun 24, 2025
891a679
safer multienvironment
dirkzerwas Jun 24, 2025
683ef31
safer multienvironment
dirkzerwas Jun 24, 2025
47543f6
safer multienvironment
dirkzerwas Jun 24, 2025
72e87f7
safer multienvironment
dirkzerwas Jun 24, 2025
eb4cd3b
safer multienvironment
dirkzerwas Jun 24, 2025
851a61f
update reference
dirkzerwas Jun 25, 2025
8ef9dd6
update ci
dirkzerwas Jun 25, 2025
22e2364
resolve conflict
dirkzerwas Jun 25, 2025
1dbcc66
esthetics clarity in script
dirkzerwas Jun 25, 2025
1fc3aef
updating the local setup
dirkzerwas Jun 25, 2025
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
5 changes: 4 additions & 1 deletion .github/workflows/key4hep_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@ jobs:
with:
name: k4GeneratorsConfig_report_${{ matrix.build_type }}_${{ matrix.image }}
path: |
test/xsectionSummary.dat
test/GenerationSummary.dat
test/*.png
test/*.pdf
test/*.root
test/output/*
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ set(basic_libdir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" )
set(bindir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
set(libdir ${basic_libdir})
set_target_properties(convertHepMC2EDM4HEP PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/$<0:>)
set_target_properties(xsectionSummary PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/$<0:>)
set_target_properties(eventGenerationSummary PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/$<0:>)
set_target_properties(pythiaRunner PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/$<0:>)
set_target_properties(pythiaLHERunner PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/$<0:>)
set_target_properties(key4HEPAnalysis PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/$<0:>)
Expand Down
1 change: 0 additions & 1 deletion examples/FermionProductionBST.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Generators:
- Whizard
- Madgraph

OutputFormat: hepmc3
Expand Down
14 changes: 7 additions & 7 deletions k4GeneratorsConfig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@ install(TARGETS convertHepMC2EDM4HEP
)

set(xsection_sources
${CMAKE_CURRENT_SOURCE_DIR}/src/xsectionSummary.cxx
${CMAKE_CURRENT_SOURCE_DIR}/src/eventGenerationSummary.cxx
${CMAKE_CURRENT_SOURCE_DIR}/src/xsection.cxx
${CMAKE_CURRENT_SOURCE_DIR}/src/xsectionCollection.cxx
${CMAKE_CURRENT_SOURCE_DIR}/src/xsection2Root.cxx
${CMAKE_CURRENT_SOURCE_DIR}/src/differential.cxx
${CMAKE_CURRENT_SOURCE_DIR}/src/eventGenerationCollections.cxx
${CMAKE_CURRENT_SOURCE_DIR}/src/eventGenerationCollections2Root.cxx
${CMAKE_CURRENT_SOURCE_DIR}/src/analysisHistos.cxx
)

add_executable(xsectionSummary ${xsection_sources})
target_link_libraries(xsectionSummary PRIVATE
add_executable(eventGenerationSummary ${xsection_sources})
target_link_libraries(eventGenerationSummary PRIVATE
EDM4HEP::edm4hep podio::podioRootIO ROOT::Tree ROOT::Hist ROOT::Gpad
)

install(TARGETS xsectionSummary
install(TARGETS eventGenerationSummary
EXPORT k4GeneratorsConfigTargets
DESTINATION "${CMAKE_INSTALL_BINDIR}"
)
Expand Down
2 changes: 1 addition & 1 deletion k4GeneratorsConfig/src/WriterEDM4HEP.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace HepMC3 {
WriterEDM4HEP::WriterEDM4HEP(const std::string& filename, std::shared_ptr<GenRunInfo> run)
: m_file(filename), m_stream(&m_file), m_particle_counter(0), m_edm4hepWriterClosed(false),
m_edm4hepWriter(filename) {
HEPMC3_WARNING("WriterEDM4HEP::WriterEDM4HEP: the conversion to EDM4HEP is still being developed")
// HEPMC3_WARNING("WriterEDM4HEP::WriterEDM4HEP: the conversion to EDM4HEP is still being developed")
set_run_info(run);
if (!run_info())
set_run_info(std::make_shared<GenRunInfo>());
Expand Down
89 changes: 89 additions & 0 deletions k4GeneratorsConfig/src/analysisHistos.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#include "analysisHistos.h"
#include <iostream>
#include <memory>

#include "TFile.h"
#include "TKey.h"
#include "TROOT.h"

k4GeneratorsConfig::analysisHistos::analysisHistos()
: m_sqrts(0.), m_generator(""), m_process(""), m_file(""), m_isValid(false) {}
k4GeneratorsConfig::analysisHistos::analysisHistos(const analysisHistos& theOriginal) {
if (this != &theOriginal) {
m_sqrts = theOriginal.m_sqrts;
m_generator = theOriginal.m_generator;
m_process = theOriginal.m_process;
m_file = theOriginal.m_file;
m_isValid = theOriginal.m_isValid;
for (auto histo : theOriginal.m_listOfHists) {
m_listOfHists.push_back(new TH1D(*histo));
}
}
}
k4GeneratorsConfig::analysisHistos& k4GeneratorsConfig::analysisHistos::operator=(const analysisHistos& theOriginal) {
if (this != &theOriginal) {
m_sqrts = theOriginal.m_sqrts;
m_generator = theOriginal.m_generator;
m_process = theOriginal.m_process;
m_file = theOriginal.m_file;
m_isValid = theOriginal.m_isValid;
for (auto hist : m_listOfHists) {
delete hist;
}
m_listOfHists.clear();
for (auto hist : theOriginal.m_listOfHists) {
m_listOfHists.push_back(new TH1D(*hist));
}
}

return *this;
}
k4GeneratorsConfig::analysisHistos::~analysisHistos() {}
bool k4GeneratorsConfig::analysisHistos::processFile() {

// open the root file
std::unique_ptr<TFile> theFile(TFile::Open(m_file.c_str()));
if (!theFile || theFile->IsZombie())
return false;

// retrieve the RunInfo for the weight names, there should only be 1 entry per Run
TIter keyList(theFile->GetListOfKeys());
TKey* key;
while ((key = (TKey*)keyList())) {
TClass* cl = gROOT->GetClass(key->GetClassName());
if (cl->InheritsFrom("TH1")) {
m_listOfHists.push_back(new TH1D(*(TH1D*)key->ReadObj()));
// turn ownership over to analysisHistos:
m_listOfHists[m_listOfHists.size() - 1]->SetDirectory(0);
}
}

return true;
}
void k4GeneratorsConfig::analysisHistos::setSQRTS(double sqrts) { m_sqrts = sqrts; }
void k4GeneratorsConfig::analysisHistos::setGenerator(std::string gen) { m_generator = gen; }
void k4GeneratorsConfig::analysisHistos::setProcess(std::string proc) { m_process = proc; }
void k4GeneratorsConfig::analysisHistos::setFile(std::string file) {
m_file = file;
m_isValid = processFile();
}
double k4GeneratorsConfig::analysisHistos::SQRTS() { return m_sqrts; }
std::string k4GeneratorsConfig::analysisHistos::Generator() { return m_generator; }
std::string k4GeneratorsConfig::analysisHistos::Process() { return m_process; }
std::string k4GeneratorsConfig::analysisHistos::File() { return m_file; }
bool k4GeneratorsConfig::analysisHistos::isValid() { return m_isValid; }
TH1D* k4GeneratorsConfig::analysisHistos::TH1DHisto(unsigned int iHisto) {
return m_listOfHists.size() > 0 ? m_listOfHists[iHisto] : 0;
}
const std::vector<TH1D*>& k4GeneratorsConfig::analysisHistos::TH1DHistos() const { return m_listOfHists; }
unsigned int k4GeneratorsConfig::analysisHistos::NbOf1DHistos() { return m_listOfHists.size(); }
void k4GeneratorsConfig::analysisHistos::Print() {
std::cout << std::endl;
std::cout << "AnalysisHistos object summary:" << std::endl;
std::cout << "File : " << m_file << std::endl;
std::cout << "Process : " << m_process << std::endl;
std::cout << "SQRTS : " << m_sqrts << std::endl;
std::cout << "Generator : " << m_generator << std::endl;
std::cout << "analysisHistos valid: " << m_isValid << std::endl;
std::cout << std::endl;
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#ifndef K4GENERATORSCONFIG_DIFFERENTIAL_H
#define K4GENERATORSCONFIG_DIFFERENTIAL_H
#ifndef K4GENERATORSCONFIG_ANALYSISHISTOS_H
#define K4GENERATORSCONFIG_ANALYSISHISTOS_H

#include <string>

#include "TH1D.h"

namespace k4GeneratorsConfig {
class differential {
class analysisHistos {
public:
differential();
differential(const differential&);
differential& operator=(const differential&);
~differential();
analysisHistos();
analysisHistos(const analysisHistos&);
analysisHistos& operator=(const analysisHistos&);
~analysisHistos();

bool processFile();

Expand All @@ -26,6 +26,7 @@ class differential {
std::string File();
bool isValid();
TH1D* TH1DHisto(unsigned int);
const std::vector<TH1D*>& TH1DHistos() const;
unsigned int NbOf1DHistos();

void Print();
Expand Down
88 changes: 0 additions & 88 deletions k4GeneratorsConfig/src/differential.cxx

This file was deleted.

Loading
Loading