Skip to content

Commit

Permalink
Disable the reading of dQ/dx values form Tracks (HEP-FCC#387)
Browse files Browse the repository at this point in the history
* Add missing header

* Disable usage of track dq/dx information in analyzers
  • Loading branch information
tmadlener authored Jul 16, 2024
1 parent 4716953 commit 19ff336
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions analyzers/dataframe/FCCAnalyses/JetConstituentsUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "ROOT/RVec.hxx"
#include "edm4hep/ReconstructedParticle.h"
#include "edm4hep/MCParticle.h"
#include "edm4hep/Quantity.h"
#if __has_include("edm4hep/TrackerHit3DData.h")
#include "edm4hep/TrackerHit3DData.h"
#else
Expand Down
4 changes: 4 additions & 0 deletions analyzers/dataframe/src/JetConstituentsUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,11 @@ namespace FCCAnalyses
{
if (ct.at(j).tracks_begin < trackdata.size() && (int)isChargedHad.at(j) == 1)
{
#if EDM4HEP_BUILD_VERSION > EDM4HEP_VERSION(0, 10, 6)
tmp.push_back(-1);
#else
tmp.push_back(dNdx.at(trackdata.at(ct.at(j).tracks_begin).dxQuantities_begin).value / 1000.);
#endif
}
else
{
Expand Down
4 changes: 4 additions & 0 deletions analyzers/dataframe/src/ReconstructedTrack.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "FCCAnalyses/ReconstructedParticle.h"
#include <iostream>

#include "edm4hep/EDM4hepVersion.h"

#include "FCCAnalyses/ReconstructedTrack.h"
#include "FCCAnalyses/VertexingUtils.h"

Expand Down Expand Up @@ -219,10 +221,12 @@ ROOT::VecOps::RVec<float> tracks_dNdx(
}
}
float dndx = -1;
#if EDM4HEP_BUILD_VERSION <= EDM4HEP_VERSION(0, 10, 5)
if (tk_jdx >= 0) {
int j = trackdata[tk_jdx].dxQuantities_begin;
dndx = dNdx[j].value / 1000;
}
#endif
results.push_back(dndx);
}
return results;
Expand Down

0 comments on commit 19ff336

Please sign in to comment.