Skip to content
Snippets Groups Projects
Commit bf80730b authored by Dmitry Kalinkin's avatar Dmitry Kalinkin
Browse files

mutiple_tracks: support only podio 1.0+

parent 0ee3a447
Branches
No related tags found
1 merge request!336mutiple_tracks: support only podio 1.0+
Pipeline #111881 failed
......@@ -94,12 +94,6 @@ int rec_multiple_tracks(const char* fname = "topside/rec_multiple_tracks.root")
{
ROOT::EnableImplicitMT();
ROOT::RDataFrame podio_metadata_df("podio_metadata", fname);
auto podioBuildVersion_major = podio_metadata_df.Take<unsigned short>("PodioBuildVersion.major");
auto podioBuildVersion_minor = podio_metadata_df.Take<unsigned short>("PodioBuildVersion.minor");
auto podioBuildVersion = fmt::format("{:d}.{:d}", podioBuildVersion_major->front(), podioBuildVersion_minor->front());
std::cout << "podioBuildVersion: " << podioBuildVersion << std::endl;
ROOT::RDataFrame df("events", fname);
auto df0 = df.Define("isThrown", "MCParticles.generatorStatus == 1")
......@@ -117,14 +111,7 @@ int rec_multiple_tracks(const char* fname = "topside/rec_multiple_tracks.root")
.Define("N_EndcapHits", [](std::vector<edm4eic::TrackerHitData> hits) { return hits.size();}, {"TrackerEndcapRecHits"})
;
if (podioBuildVersion == "0.16") {
df0 = df0.Define("zTrackSegments", z_segments, {"HcalEndcapNTrackSegments", "HcalEndcapNTrackSegments_0"});
}
if (podioBuildVersion == "0.17" ||
podioBuildVersion == "0.99" ||
podioBuildVersion == "1.0") {
df0 = df0.Define("zTrackSegments", z_segments, {"HcalEndcapNTrackSegments", "_HcalEndcapNTrackSegments_points"});
}
df0 = df0.Define("zTrackSegments", z_segments, {"HcalEndcapNTrackSegments", "_HcalEndcapNTrackSegments_points"});
auto h_zTrackSegment = df0.Histo1D({"h_zTrackSegment", "z ; #z", 400, -400, 400}, "zTrackSegments");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment