Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ include:
- local: 'benchmarks/Exclusive-Diffraction-Tagging/tcs/config.yml'
- local: 'benchmarks/Exclusive-Diffraction-Tagging/u_omega/config.yml'
- local: 'benchmarks/Inclusive/dis/config.yml'
- local: 'benchmarks/Jets-HF/jets/config.yml'

summary:
stage: finish
Expand All @@ -135,6 +136,7 @@ summary:
- "demp:results"
- "dis:results"
- "dvcs:results"
- "jets:results"
- "tcs:results"
- "u_omega:results"
script:
Expand Down
6 changes: 4 additions & 2 deletions .rootlogon.C
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
// Ensure fmt is loaded
R__LOAD_LIBRARY(libfmt);
// Ensure fmt is loaded (skip if not available)
if (gSystem->Load("libfmt") < 0) {
// Library not found, but try to continue anyway
}
//
// top-level include-dir
gROOT->ProcessLine(".include include");
Expand Down
10 changes: 5 additions & 5 deletions benchmarks/Jets-HF/jets/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ rule jets_compile:

rule jets_generate_config:
input:
data="sim_output/{DETECTOR_CONFIG}/pythia8NCDIS_{EBEAM}x{PBEAM}_minQ2={MINQ2}_beamEffects_xAngle=-0.025_hiDiv_1.edm4eic.root",
data="sim_output/{DETECTOR_CONFIG}/pythia8NCDIS_{EBEAM}x{PBEAM}_minQ2={MINQ2}_beamEffects_xAngle=-0.025_hiDiv_1.0000.eicrecon.edm4eic.root",
output:
config="results/{DETECTOR_CONFIG}/jets/{EBEAM}on{PBEAM}/minQ2={MINQ2}_config.json",
shell: """
cat > {output.config} <<EOF
{{
"rec_file": "{input.data}",
"detector": "{wildcards.DETECTOR_CONFIG}",
"output_prefix": "$(dirname "{output.config}")/dis_{wildcards.EBEAM}x{wildcards.PBEAM}_minQ2={wildcards.MINQ2}",
"output_prefix": "$(dirname "{output.config}")/jets_{wildcards.EBEAM}x{wildcards.PBEAM}_minQ2={wildcards.MINQ2}",
"results_path": "$(dirname "{output.config}")",
"ebeam": {wildcards.EBEAM},
"pbeam": {wildcards.PBEAM},
"minq2": {wildcards.MINQ2},
"plot_tag": "dis_{wildcards.EBEAM}x{wildcards.PBEAM}_minQ2={wildcards.MINQ2}",
"test_tag": "dis_{wildcards.EBEAM}x{wildcards.PBEAM}_minQ2={wildcards.MINQ2}"
"plot_tag": "jets_{wildcards.EBEAM}x{wildcards.PBEAM}_minQ2={wildcards.MINQ2}",
"test_tag": "jets_{wildcards.EBEAM}x{wildcards.PBEAM}_minQ2={wildcards.MINQ2}"
}}
EOF
"""
Expand All @@ -29,7 +29,7 @@ rule jets_analysis_jets:
input:
script="benchmarks/Jets-HF/jets/analysis/jets.cxx",
script_compiled=ROOT_BUILD_DIR_PREFIX + "benchmarks/Jets-HF/jets/analysis/jets_cxx.so",
data="sim_output/{DETECTOR_CONFIG}/pythia8NCDIS_{EBEAM}x{PBEAM}_minQ2={MINQ2}_beamEffects_xAngle=-0.025_hiDiv_1.edm4eic.root",
data="sim_output/{DETECTOR_CONFIG}/pythia8NCDIS_{EBEAM}x{PBEAM}_minQ2={MINQ2}_beamEffects_xAngle=-0.025_hiDiv_1.0000.eicrecon.edm4eic.root",
config="results/{DETECTOR_CONFIG}/jets/{EBEAM}on{PBEAM}/minQ2={MINQ2}_config.json",
output:
results_path=directory("results/{DETECTOR_CONFIG}/jets/{EBEAM}on{PBEAM}/minQ2={MINQ2}"),
Expand Down
27 changes: 16 additions & 11 deletions benchmarks/Jets-HF/jets/analysis/jets.cxx
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
#include <edm4eic/EDM4eicVersion.h>
#include <TCanvas.h>
#include <TChain.h>
#include <TColor.h>
#include <TF1.h>
#include <TFile.h>
#include <TGraph.h>
#include <TH1D.h>
#include <TH2D.h>
#include <TStyle.h>
#include <TTreeReader.h>
#include <TTreeReaderArray.h>
#include <TLegend.h>
#include <TVector3.h>

#include <fstream>

#include "fmt/color.h"
#include "fmt/core.h"

Expand Down Expand Up @@ -67,7 +72,7 @@ const int seabornBlue = TColor::GetColor(100, 149, 237);
float DELTARCUT = 0.05;

// Reco Jets
TTreeReaderArray<int> recoType = {tree_reader, "ReconstructedChargedJets.type"};
TTreeReaderArray<unsigned int> recoType = {tree_reader, "ReconstructedChargedJets.type"};
#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8,9,0)
TTreeReaderArray<float> recoArea = {tree_reader, "ReconstructedChargedJets.area"};
#endif
Expand Down Expand Up @@ -97,12 +102,12 @@ const int seabornBlue = TColor::GetColor(100, 149, 237);
TTreeReaderArray<int> recoPartPDG = {tree_reader, "ReconstructedChargedParticles.PDG"};
TTreeReaderArray<float> recoPartNRG = {tree_reader, "ReconstructedChargedParticles.energy"};

TTreeReaderArray<unsigned int> recoPartAssocRec = {tree_reader, "ReconstructedChargedParticleLinks.from"}; // Reco <-> MCParticle
TTreeReaderArray<unsigned int> recoPartAssocSim = {tree_reader, "ReconstructedChargedParticleLinks.to"};
TTreeReaderArray<unsigned int> recoPartAssocRec = {tree_reader, "_ReconstructedChargedParticleLinks_from.index"}; // Reco <-> MCParticle
TTreeReaderArray<unsigned int> recoPartAssocSim = {tree_reader, "_ReconstructedChargedParticleLinks_to.index"};
TTreeReaderArray<float> recoPartAssocWeight = {tree_reader, "ReconstructedChargedParticleLinks.weight"};

// Generated Jets
TTreeReaderArray<int> genType = {tree_reader, "GeneratedChargedJets.type"};
TTreeReaderArray<unsigned int> genType = {tree_reader, "GeneratedChargedJets.type"};
#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8,9,0)
TTreeReaderArray<float> genArea = {tree_reader, "GeneratedChargedJets.area"};
#endif
Expand Down Expand Up @@ -149,8 +154,8 @@ const int seabornBlue = TColor::GetColor(100, 149, 237);
TH1D *recoChargedJetEHist = new TH1D("recoChargedJetE","",300,0.,300.);
TH1D *recoChargedJetEtaECutHist = new TH1D("recoChargedJetEtaECut","",60,-3.,3.);
#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8,9,0)
TH1D *recoChargedJetAreaECutHist = new TH1D("recoChargedJetAreaECut",250,0.,5.);
TH2D *recoChargedJetEvsAreaHist = new TH2D("recoChargedJetEvsArea",""250,0.,5.,300,0.,300.);
TH1D *recoChargedJetAreaECutHist = new TH1D("recoChargedJetAreaECut","",250,0.,5.);
TH2D *recoChargedJetEvsAreaHist = new TH2D("recoChargedJetEvsArea","",250,0.,5.,300,0.,300.);
#endif
TH2D *recoChargedJetEvsEtaHist = new TH2D("recoChargedJetEvsEta","",60,-3.,3.,300,0.,300.);
TH2D *recoChargedJetPhiVsEtaECutHist = new TH2D("recoChargedJetPhiVsEtaECut","",60,-3.,3.,100,-TMath::Pi(),TMath::Pi());
Expand All @@ -159,8 +164,8 @@ const int seabornBlue = TColor::GetColor(100, 149, 237);
TH1D *recoChargedJetENoElecHist = new TH1D("recoChargedJetENoElec","",300,0.,300.);
TH1D *recoChargedJetEtaECutNoElecHist = new TH1D("recoChargedJetEtaECutNoElec","",60,-3.,3.);
#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8,9,0)
TH1D *recoChargedJetAreaECutNoElecHist = new TH1D("recoHargedJetAreaECutNoElec","",250,0.,5.);
TH2D *recoChargedJetEvsAreaNoElecHist = new TH2D("recoChargedJetEvsAreaNoElec",250,0.,5.,300,0.,300.);
TH1D *recoChargedJetAreaECutNoElecHist = new TH1D("recoChargedJetAreaECutNoElec","",250,0.,5.);
TH2D *recoChargedJetEvsAreaNoElecHist = new TH2D("recoChargedJetEvsAreaNoElec","",250,0.,5.,300,0.,300.);
#endif
TH2D *recoChargedJetEvsEtaNoElecHist = new TH2D("recoChargedJetEvsEtaNoElec","",60,-3.,3.,300,0.,300.);
TH2D *recoChargedJetPhiVsEtaECutNoElecHist = new TH2D("recoChargedJetPhiVsEtaECutNoElec","",60,-3.,3.,100,-TMath::Pi(),TMath::Pi());
Expand All @@ -185,7 +190,7 @@ const int seabornBlue = TColor::GetColor(100, 149, 237);
TH1D *genChargedJetEtaECutHist = new TH1D("genChargedJetEtaECut","",60,-3.,3.);
#if EDM4EIC_BUILD_VERSION >= EDM4EIC_VERSION(8,9,0)
TH1D *genChargedJetAreaECutHist = new TH1D("genChargedJetAreaECut","",250,0.,5.);
TH2D *genChargedJetEvsAreaHist = new TH2D("genChargedJetEvsAreaHist",250,0.,5.,300,0.,300.);
TH2D *genChargedJetEvsAreaHist = new TH2D("genChargedJetEvsAreaHist","",250,0.,5.,300,0.,300.);
#endif
TH2D *genChargedJetEvsEtaHist = new TH2D("genChargedJetEvsEta","",60,-3.,3.,300,0.,300.);
TH2D *genChargedJetPhiVsEtaECutHist = new TH2D("genChargedJetPhiVsEtaECut","",60,-3.,3.,100,-TMath::Pi(),TMath::Pi());
Expand Down Expand Up @@ -279,7 +284,7 @@ const int seabornBlue = TColor::GetColor(100, 149, 237);
{
int elecIndex = -1;
double elecIndexWeight = -1.0;
int chargePartIndex = recoCstIndex[m]; // ReconstructedChargedParticle Index for m'th Jet Component
unsigned int chargePartIndex = recoCstIndex[m]; // ReconstructedChargedParticle Index for m'th Jet Component
for(unsigned int n=0; n<recoPartAssocRec.GetSize(); n++) // Loop Over All ReconstructedChargedParticleLinks
{
if(recoPartAssocRec[n] == chargePartIndex) // Select Entry Matching the ReconstructedChargedParticle Index
Expand All @@ -292,7 +297,7 @@ const int seabornBlue = TColor::GetColor(100, 149, 237);
}
}

if(pdgMCPart[elecIndex] == 11) // Test if Matched Particle is an Electron
if(elecIndex >= 0 && pdgMCPart[elecIndex] == 11) // Test if Matched Particle is an Electron
noElectron = false;
}

Expand Down
6 changes: 6 additions & 0 deletions benchmarks/Jets-HF/jets/benchmark.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "Jets in DIS",
"title": "Jets Benchmark",
"description": "Benchmark for assessing jet reconstruction",
"target": "0.8"
}