Modern Particle & Nuclear Physics Data Analysis with ROOT RDataFrame
RAD is built around the idea of configuring a physics reaction as a ConfigReaction object.
e p -> e' K+ X).RAD provides a suite of utility classes:
// Setup for MC generator data (HepMC3)
#include "HepMCElectro.h"
#include "KinematicsProcElectro.h"
void ProcessHepMCZCombi() {
// 1. Create interface to the ROOT file
rad::HepMCElectro hepmc{"hepmc3_tree", "data_file.root"};
hepmc.SetupMC();
// 2. Define Topology (Candidates & Roles)
hepmc.SetBeamElectronIndex(0); // Beam is Index 0
// Define "ele" as any track with PID 11
hepmc.SetParticleCandidates("ele", 2 /*Role*/, rad::index::FilterIndices(11), {"pid"});
hepmc.SetParticleCandidates("pos", 3 /*Role*/, rad::index::FilterIndices(-11), {"pid"});
// 3. Initialize Kinematics Processor
rad::KinematicsProcElectro kine(&hepmc, "rec_");
// Define Composite Particles (J/psi -> e+ e-)
kine.Creator().Sum("Jpsi", {{"ele", "pos"}});
// 4. Calculate Physics
kine.Init(); // Triggers Combinatorial Sort
kine.Q2();
kine.Mass("M_Jpsi", {"Jpsi"});
// 5. Snapshot results
hepmc.Snapshot("output.root");
}
Standard workflow for combinatorial analysis.