Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
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.{INDEX}.eicrecon.edm4eic.root",
Comment thread
wdconinc marked this conversation as resolved.
Outdated
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.{INDEX}.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
56 changes: 34 additions & 22 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,13 @@ 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<float> recoPartAssocWeight = {tree_reader, "ReconstructedChargedParticleLinks.weight"};
// NOTE: ReconstructedChargedParticleLinks branches are not available in the current data format
// TTreeReaderArray<unsigned int> recoPartAssocRec = {tree_reader, "ReconstructedChargedParticleLinks.from"}; // Reco <-> MCParticle
// TTreeReaderArray<unsigned int> recoPartAssocSim = {tree_reader, "ReconstructedChargedParticleLinks.to"};
// 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 +155,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 +165,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 +191,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 @@ -275,24 +281,30 @@ const int seabornBlue = TColor::GetColor(100, 149, 237);

// Find Jets with Electrons
bool noElectron = true;
// NOTE: Since ReconstructedChargedParticleLinks branches are not available in the current data format,
// electron identification is disabled. All jets will be analyzed with noElectron=true in the "NoElec" histograms.
for(unsigned int m=recoCstsBegin[i]; m<recoCstsEnd[i]; m++) // Loop over jet constituents
{
// NOTE: These variables are kept as placeholders for when ReconstructedChargedParticleLinks branches become available.
// Currently unused since the linking loop is commented out (branches not available in current data format).
int elecIndex = -1;
double elecIndexWeight = -1.0;
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
{
if(recoPartAssocWeight[n] > elecIndexWeight) // Find Particle with Greatest Weight = Contributed Most Hits to Track
{
elecIndex = recoPartAssocSim[n]; // Get Index of MCParticle Associated with ReconstructedChargedParticle
elecIndexWeight = recoPartAssocWeight[n];
}
}
}

if(pdgMCPart[elecIndex] == 11) // Test if Matched Particle is an Electron
// NOTE: ReconstructedChargedParticleLinks branches are not available in the current data format
// for(unsigned int n=0; n<recoPartAssocRec.GetSize(); n++) // Loop Over All ReconstructedChargedParticleLinks
// {
// if(recoPartAssocRec[n] == chargePartIndex) // Select Entry Matching the ReconstructedChargedParticle Index
// {
// if(recoPartAssocWeight[n] > elecIndexWeight) // Find Particle with Greatest Weight = Contributed Most Hits to Track
// {
// elecIndex = recoPartAssocSim[n]; // Get Index of MCParticle Associated with ReconstructedChargedParticle
// elecIndexWeight = recoPartAssocWeight[n];
// }
// }
// }

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

Expand Down