Skip to content

Commit

Permalink
Print info from LHEF, if available (#134)
Browse files Browse the repository at this point in the history
* Print info from LHEF, if available
  • Loading branch information
kjvbrt authored Oct 15, 2024
1 parent 96bc868 commit 089ec95
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions standalone/src/DelphesPythia8Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,30 @@

void PrintXS(Pythia8::Pythia* pythia) {
// convert mb to pb
float xsec = pythia->info.sigmaGen() * 1.e09;
float xsec = pythia->info.sigmaGen() * 1.e09;
float xsec_err = pythia->info.sigmaErr() * 1.e09;

std::cout << "------------------------------------------------------------------------" << std::endl;
std::cout << "" << std::endl;
std::cout << "Pythia8 Cross-section: " << xsec << " pb" << std::endl;
std::cout << "" << std::endl;
std::cout << std::endl;
std::cout << "Pythia8 Cross-section (" << pythia->info.name() << "): " << xsec << " +/- " << xsec_err << " pb\n";
std::cout << std::endl;
if (pythia->info.nProcessesLHEF()) {
std::cout << "Input LHEF Cross-section:\n";
for (int i = 0; i < pythia->info.nProcessesLHEF(); ++i) {
std::cout << " - " << pythia->info.nameProc(i) << ": " << pythia->info.sigmaLHEF(i) << "\n";
}
std::cout << std::endl;
if (size(pythia->info.headerKeys())) {
std::cout << "Information from LHEF file:\n";

for (const auto& key : pythia->info.headerKeys()) {
if (key == "MGGenerationInfo") {
std::cout << pythia->info.header(key) << std::endl;
}
}
}
}
std::cout << "------------------------------------------------------------------------" << std::endl;
}

void ConvertInput(Long64_t eventCounter, Pythia8::Pythia* pythia, ExRootTreeBranch* branch, DelphesFactory* factory,
Expand Down

0 comments on commit 089ec95

Please sign in to comment.