Skip to content
Snippets Groups Projects
Commit d3721231 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

eicd to edm4eic

parent 85c9c847
No related branches found
No related tags found
1 merge request!173feat: transition from eicd to edm4eic
...@@ -14,10 +14,10 @@ R__LOAD_LIBRARY(libfmt.so) ...@@ -14,10 +14,10 @@ R__LOAD_LIBRARY(libfmt.so)
#include "fmt/core.h" #include "fmt/core.h"
#include "fmt/color.h" #include "fmt/color.h"
R__LOAD_LIBRARY(libeicd.so) R__LOAD_LIBRARY(libedm4eic.so)
R__LOAD_LIBRARY(libDD4pod.so) R__LOAD_LIBRARY(libDD4pod.so)
#include "eicd/ReconstructedParticleCollection.h" #include "edm4eic/ReconstructedParticleCollection.h"
void synchrotron_raw(const char* fname = "rec_synchrotron.raw.root"){ void synchrotron_raw(const char* fname = "rec_synchrotron.raw.root"){
......
...@@ -15,10 +15,10 @@ R__LOAD_LIBRARY(libfmt.so) ...@@ -15,10 +15,10 @@ R__LOAD_LIBRARY(libfmt.so)
#include "fmt/core.h" #include "fmt/core.h"
#include "fmt/color.h" #include "fmt/color.h"
R__LOAD_LIBRARY(libeicd.so) R__LOAD_LIBRARY(libedm4eic.so)
R__LOAD_LIBRARY(libDD4pod.so) R__LOAD_LIBRARY(libDD4pod.so)
#include "eicd/ReconstructedParticleCollection.h" #include "edm4eic/ReconstructedParticleCollection.h"
void synchrotron_sim(const char* fname = "sim_synchrotron.edm4hep.root"){ void synchrotron_sim(const char* fname = "sim_synchrotron.edm4hep.root"){
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
#include "fmt/core.h" #include "fmt/core.h"
#include "nlohmann/json.hpp" #include "nlohmann/json.hpp"
#include "eicd/InclusiveKinematicsData.h" #include "edm4eic/InclusiveKinematicsData.h"
#include "eicd/ReconstructedParticleData.h" #include "edm4eic/ReconstructedParticleData.h"
int dis_electrons(const std::string& config_name) int dis_electrons(const std::string& config_name)
{ {
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
#include "fmt/core.h" #include "fmt/core.h"
#include "nlohmann/json.hpp" #include "nlohmann/json.hpp"
#include "eicd/CalorimeterHitData.h" #include "edm4eic/CalorimeterHitData.h"
#include "eicd/ClusterData.h" #include "edm4eic/ClusterData.h"
int rec_analysis_ecal(const std::string& config_name) int rec_analysis_ecal(const std::string& config_name)
{ {
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
#include "fmt/core.h" #include "fmt/core.h"
#include "nlohmann/json.hpp" #include "nlohmann/json.hpp"
#include "eicd/CalorimeterHitData.h" #include "edm4eic/CalorimeterHitData.h"
#include "eicd/ClusterData.h" #include "edm4eic/ClusterData.h"
int rec_analysis_hcal(const std::string& config_name) int rec_analysis_hcal(const std::string& config_name)
{ {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "fmt/core.h" #include "fmt/core.h"
#include "nlohmann/json.hpp" #include "nlohmann/json.hpp"
#include "eicd/RawCalorimeterHitData.h" #include "edm4eic/RawCalorimeterHitData.h"
int rec_analysis_raw(const std::string& config_name) int rec_analysis_raw(const std::string& config_name)
{ {
......
...@@ -14,11 +14,11 @@ R__LOAD_LIBRARY(libfmt.so) ...@@ -14,11 +14,11 @@ R__LOAD_LIBRARY(libfmt.so)
#include "fmt/core.h" #include "fmt/core.h"
#include "fmt/color.h" #include "fmt/color.h"
R__LOAD_LIBRARY(libeicd.so) R__LOAD_LIBRARY(libedm4eic.so)
R__LOAD_LIBRARY(libDD4pod.so) R__LOAD_LIBRARY(libDD4pod.so)
#include "eicd/InclusiveKinematicsCollection.h" #include "edm4eic/InclusiveKinematicsCollection.h"
#include "eicd/ReconstructedParticleCollection.h" #include "edm4eic/ReconstructedParticleCollection.h"
void dvcs_tests(const char* fname = "rec_dvcs.root"){ void dvcs_tests(const char* fname = "rec_dvcs.root"){
......
...@@ -76,7 +76,7 @@ int vm_invar(const std::string& config_name) ...@@ -76,7 +76,7 @@ int vm_invar(const std::string& config_name)
auto momenta_sort_sim = [vm_name, decay_name](const std::vector<edm4hep::MCParticleData>& parts){ auto momenta_sort_sim = [vm_name, decay_name](const std::vector<edm4hep::MCParticleData>& parts){
return util::momenta_sort_sim(parts, vm_name, decay_name); return util::momenta_sort_sim(parts, vm_name, decay_name);
}; };
auto momenta_sort_rec = [vm_name, decay_name](const std::vector<eicd::ReconstructedParticleData>& parts){ auto momenta_sort_rec = [vm_name, decay_name](const std::vector<edm4eic::ReconstructedParticleData>& parts){
return util::momenta_sort_rec(parts, vm_name, decay_name); return util::momenta_sort_rec(parts, vm_name, decay_name);
}; };
//==================================================================== //====================================================================
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#include "fmt/core.h" #include "fmt/core.h"
#include "nlohmann/json.hpp" #include "nlohmann/json.hpp"
#include "eicd/ReconstructedParticleCollection.h" #include "edm4eic/ReconstructedParticleCollection.h"
#include "eicd/ReconstructedParticleData.h" #include "edm4eic/ReconstructedParticleData.h"
// Run VM invariant-mass-based benchmarks on an input reconstruction file for // Run VM invariant-mass-based benchmarks on an input reconstruction file for
// a desired vector meson (e.g. jpsi) and a desired decay particle (e.g. muon) // a desired vector meson (e.g. jpsi) and a desired decay particle (e.g. muon)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include <ROOT/RDataFrame.hxx> #include <ROOT/RDataFrame.hxx>
#include <eicd/ReconstructedParticleData.h> #include <edm4eic/ReconstructedParticleData.h>
int analyze(std::string file) int analyze(std::string file)
{ {
...@@ -17,7 +17,7 @@ int analyze(std::string file) ...@@ -17,7 +17,7 @@ int analyze(std::string file)
return -1; return -1;
} }
auto n_tracks = [](const std::vector<eicd::ReconstructedParticleData> &p) { return (int) p.size(); }; auto n_tracks = [](const std::vector<edm4eic::ReconstructedParticleData> &p) { return (int) p.size(); };
auto d = df auto d = df
.Define("n_tracks_gen", n_tracks, {"GeneratedParticles"}) .Define("n_tracks_gen", n_tracks, {"GeneratedParticles"})
......
...@@ -15,11 +15,11 @@ R__LOAD_LIBRARY(libfmt.so) ...@@ -15,11 +15,11 @@ R__LOAD_LIBRARY(libfmt.so)
#include "fmt/core.h" #include "fmt/core.h"
#include "fmt/color.h" #include "fmt/color.h"
R__LOAD_LIBRARY(libeicd.so) R__LOAD_LIBRARY(libedm4eic.so)
R__LOAD_LIBRARY(libDD4pod.so) R__LOAD_LIBRARY(libDD4pod.so)
#include "eicd/InclusiveKinematicsCollection.h" #include "edm4eic/InclusiveKinematicsCollection.h"
#include "eicd/ReconstructedParticleCollection.h" #include "edm4eic/ReconstructedParticleCollection.h"
void tcs_tests(const char* fname = "rec_tcs.root"){ void tcs_tests(const char* fname = "rec_tcs.root"){
...@@ -30,7 +30,7 @@ void tcs_tests(const char* fname = "rec_tcs.root"){ ...@@ -30,7 +30,7 @@ void tcs_tests(const char* fname = "rec_tcs.root"){
ROOT::RDataFrame df("events", fname); ROOT::RDataFrame df("events", fname);
auto ff_theta_mrad = [] ( auto ff_theta_mrad = [] (
const std::vector<eicd::ReconstructedParticleData>& v, const std::vector<edm4eic::ReconstructedParticleData>& v,
const int16_t type const int16_t type
) -> std::vector<float> { ) -> std::vector<float> {
std::vector<float> theta; std::vector<float> theta;
...@@ -45,10 +45,10 @@ void tcs_tests(const char* fname = "rec_tcs.root"){ ...@@ -45,10 +45,10 @@ void tcs_tests(const char* fname = "rec_tcs.root"){
auto df0 = df.Define("n_parts", "ReconstructedParticles.size()") auto df0 = df.Define("n_parts", "ReconstructedParticles.size()")
.Define("isQ2gt1", "InclusiveKinematicsTruth.Q2 > 1.0") .Define("isQ2gt1", "InclusiveKinematicsTruth.Q2 > 1.0")
.Define("n_Q2gt1", "isQ2gt1.size()") .Define("n_Q2gt1", "isQ2gt1.size()")
.Define("ff_theta_mrad_B0", [&](const std::vector<eicd::ReconstructedParticleData>& v){return ff_theta_mrad(v,1);}, {"ReconstructedFFParticles"}) .Define("ff_theta_mrad_B0", [&](const std::vector<edm4eic::ReconstructedParticleData>& v){return ff_theta_mrad(v,1);}, {"ReconstructedFFParticles"})
.Define("ff_theta_mrad_RP", [&](const std::vector<eicd::ReconstructedParticleData>& v){return ff_theta_mrad(v,2);}, {"ReconstructedFFParticles"}) .Define("ff_theta_mrad_RP", [&](const std::vector<edm4eic::ReconstructedParticleData>& v){return ff_theta_mrad(v,2);}, {"ReconstructedFFParticles"})
.Define("ff_theta_mrad_OMD",[&](const std::vector<eicd::ReconstructedParticleData>& v){return ff_theta_mrad(v,3);}, {"ReconstructedFFParticles"}) .Define("ff_theta_mrad_OMD",[&](const std::vector<edm4eic::ReconstructedParticleData>& v){return ff_theta_mrad(v,3);}, {"ReconstructedFFParticles"})
.Define("ff_theta_mrad_ZDC",[&](const std::vector<eicd::ReconstructedParticleData>& v){return ff_theta_mrad(v,4);}, {"ReconstructedFFParticles"}) .Define("ff_theta_mrad_ZDC",[&](const std::vector<edm4eic::ReconstructedParticleData>& v){return ff_theta_mrad(v,4);}, {"ReconstructedFFParticles"})
; ;
auto h_n_parts = df0.Histo1D({"h_n_parts", "; h_n_parts n", 10, 0, 10}, "n_parts"); auto h_n_parts = df0.Histo1D({"h_n_parts", "; h_n_parts n", 10, 0, 10}, "n_parts");
......
...@@ -14,19 +14,19 @@ R__LOAD_LIBRARY(libfmt.so) ...@@ -14,19 +14,19 @@ R__LOAD_LIBRARY(libfmt.so)
#include "fmt/core.h" #include "fmt/core.h"
#include "fmt/color.h" #include "fmt/color.h"
R__LOAD_LIBRARY(libeicd.so) R__LOAD_LIBRARY(libedm4eic.so)
R__LOAD_LIBRARY(libDD4pod.so) R__LOAD_LIBRARY(libDD4pod.so)
#include "dd4pod/Geant4ParticleCollection.h" #include "dd4pod/Geant4ParticleCollection.h"
#include "eicd/TrackParametersCollection.h" #include "edm4eic/TrackParametersCollection.h"
#include "eicd/ClusterCollection.h" #include "edm4eic/ClusterCollection.h"
#include "eicd/ReconstructedParticleCollection.h" #include "edm4eic/ReconstructedParticleCollection.h"
#include "eicd/InclusiveKinematicsCollection.h" #include "edm4eic/InclusiveKinematicsCollection.h"
using ROOT::RDataFrame; using ROOT::RDataFrame;
using namespace ROOT::VecOps; using namespace ROOT::VecOps;
auto p_track = [](std::vector<eicd::TrackParametersData> const& in) { auto p_track = [](std::vector<edm4eic::TrackParametersData> const& in) {
std::vector<double> result; std::vector<double> result;
for (size_t i = 0; i < in.size(); ++i) { for (size_t i = 0; i < in.size(); ++i) {
result.push_back(std::abs(1.0/(in[i].qOverP))); result.push_back(std::abs(1.0/(in[i].qOverP)));
...@@ -66,7 +66,7 @@ auto fourvec = [](ROOT::VecOps::RVec<dd4pod::Geant4ParticleData> const& in) { ...@@ -66,7 +66,7 @@ auto fourvec = [](ROOT::VecOps::RVec<dd4pod::Geant4ParticleData> const& in) {
} }
return result; return result;
}; };
auto recfourvec = [](ROOT::VecOps::RVec<eicd::ReconstructedParticleData> const& in) { auto recfourvec = [](ROOT::VecOps::RVec<edm4eic::ReconstructedParticleData> const& in) {
std::vector<ROOT::Math::PxPyPzMVector> result; std::vector<ROOT::Math::PxPyPzMVector> result;
ROOT::Math::PxPyPzMVector lv; ROOT::Math::PxPyPzMVector lv;
for (size_t i = 0; i < in.size(); ++i) { for (size_t i = 0; i < in.size(); ++i) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment