Skip to content

Commit

Permalink
fix: mv id() to getObjectID().index because id() now returns ObjectID…
Browse files Browse the repository at this point in the history
…, not uint_t

See AIDASoft/podio#493
  • Loading branch information
wdconinc committed Nov 11, 2023
1 parent bc21315 commit 0b3e344
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion JugFast/src/components/TruthClustering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class TruthClustering : public GaudiAlgorithm {
// Loop over al calorimeter hits and sort per mcparticle
for (const auto& hit : hits) {
const auto& mcHit = mc[hit.getObjectID().index];
const auto& trackID = mcHit.getContributions(0).getParticle().id();
const auto& trackID = mcHit.getContributions(0).getParticle().getObjectID().index;
// Create a new protocluster if we don't have one for this trackID
if (protoIndex.count(trackID) == 0) {
auto pcl = proto.create();
Expand Down
10 changes: 5 additions & 5 deletions JugFast/src/components/TruthEnergyPositionClusterMerger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class TruthEnergyPositionClusterMerger : public GaudiAlgorithm {
}
for (const auto& [mcID, pclus] : posMap) {
if (msgLevel(MSG::DEBUG)) {
debug() << " --> Processing position cluster " << pclus.id() << ", mcID: " << mcID << ", energy: " << pclus.getEnergy()
debug() << " --> Processing position cluster " << pclus.getObjectID().index << ", mcID: " << mcID << ", energy: " << pclus.getEnergy()
<< endmsg;
}
if (energyMap.count(mcID)) {
Expand All @@ -116,8 +116,8 @@ class TruthEnergyPositionClusterMerger : public GaudiAlgorithm {
new_clus.addToShapeParameters(param);
}
if (msgLevel(MSG::DEBUG)) {
debug() << " --> Found matching energy cluster " << eclus.id() << ", energy: " << eclus.getEnergy() << endmsg;
debug() << " --> Created new combined cluster " << new_clus.id() << ", energy: " << new_clus.getEnergy() << endmsg;
debug() << " --> Found matching energy cluster " << eclus.getObjectID().index << ", energy: " << eclus.getEnergy() << endmsg;
debug() << " --> Created new combined cluster " << new_clus.getObjectID().index << ", energy: " << new_clus.getEnergy() << endmsg;
}

// set association
Expand Down Expand Up @@ -170,9 +170,9 @@ class TruthEnergyPositionClusterMerger : public GaudiAlgorithm {
new_clus.setPosition(edm4hep::utils::sphericalToVector(110.*cm, theta, phi));
new_clus.addToClusters(eclus);
if (msgLevel(MSG::DEBUG)) {
debug() << " --> Processing energy cluster " << eclus.id() << ", mcID: " << mcID << ", energy: " << eclus.getEnergy()
debug() << " --> Processing energy cluster " << eclus.getObjectID().index << ", mcID: " << mcID << ", energy: " << eclus.getEnergy()
<< endmsg;
debug() << " --> Created new 'combined' cluster " << new_clus.id() << ", energy: " << new_clus.getEnergy() << endmsg;
debug() << " --> Created new 'combined' cluster " << new_clus.getObjectID().index << ", energy: " << new_clus.getEnergy() << endmsg;
}

// set association
Expand Down
2 changes: 1 addition & 1 deletion JugReco/src/components/EnergyPositionClusterMerger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class EnergyPositionClusterMerger : public GaudiAlgorithm {
// label our energy cluster as consumed
consumed[best_match] = true;
if (msgLevel(MSG::DEBUG)) {
debug() << fmt::format("Matched position cluster {} with energy cluster {}\n", pc.id(), ec.id()) << endmsg;
debug() << fmt::format("Matched position cluster {} with energy cluster {}\n", pc.getObjectID().index, ec.getObjectID().index) << endmsg;
debug() << fmt::format(" - Position cluster: (E: {}, phi: {}, z: {})", pc.getEnergy(),
edm4hep::utils::angleAzimuthal(pc.getPosition()), pc.getPosition().z)
<< endmsg;
Expand Down
2 changes: 1 addition & 1 deletion JugReco/src/components/ImagingClusterReco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class ImagingClusterReco : public GaudiAlgorithm {
// debug output
if (msgLevel(MSG::DEBUG)) {
for (const auto& cl : clusters) {
debug() << fmt::format("Cluster {:d}: Edep = {:.3f} MeV, Dir = ({:.3f}, {:.3f}) deg", cl.id(),
debug() << fmt::format("Cluster {:d}: Edep = {:.3f} MeV, Dir = ({:.3f}, {:.3f}) deg", cl.getObjectID().index,
cl.getEnergy() * 1000., cl.getIntrinsicTheta() / M_PI * 180.,
cl.getIntrinsicPhi() / M_PI * 180.)
<< endmsg;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class EnergyPositionClusterMerger : public GaudiAlgorithm {
// label our energy cluster as consumed
consumed[best_match] = true;
if (msgLevel(MSG::DEBUG)) {
debug() << fmt::format("Matched position cluster {} with energy cluster {}\n", pc.id(), ec.id()) << endmsg;
debug() << fmt::format("Matched position cluster {} with energy cluster {}\n", pc.getObjectID().index, ec.getObjectID().index) << endmsg;
debug() << fmt::format(" - Position cluster: (E: {}, phi: {}, z: {})", pc.getEnergy(),
edm4hep::utils::angleAzimuthal(pc.getPosition()), pc.getPosition().z)
<< endmsg;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class ImagingClusterReco : public GaudiAlgorithm {
// debug output
if (msgLevel(MSG::DEBUG)) {
for (const auto& cl : clusters) {
debug() << fmt::format("Cluster {:d}: Edep = {:.3f} MeV, Dir = ({:.3f}, {:.3f}) deg", cl.id(),
debug() << fmt::format("Cluster {:d}: Edep = {:.3f} MeV, Dir = ({:.3f}, {:.3f}) deg", cl.getObjectID().index,
cl.getEnergy() * 1000., cl.getIntrinsicTheta() / M_PI * 180.,
cl.getIntrinsicPhi() / M_PI * 180.)
<< endmsg;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class EnergyPositionClusterMerger : public GaudiAlgorithm {
// label our energy cluster as consumed
consumed[best_match] = true;
if (msgLevel(MSG::DEBUG)) {
debug() << fmt::format("Matched position cluster {} with energy cluster {}\n", pc.id(), ec.id()) << endmsg;
debug() << fmt::format("Matched position cluster {} with energy cluster {}\n", pc.getObjectID().index, ec.getObjectID().index) << endmsg;
debug() << fmt::format(" - Position cluster: (E: {}, phi: {}, z: {})", pc.getEnergy(),
edm4hep::utils::angleAzimuthal(pc.getPosition()), pc.getPosition().z)
<< endmsg;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class ImagingClusterReco : public GaudiAlgorithm {
// debug output
if (msgLevel(MSG::DEBUG)) {
for (const auto& cl : clusters) {
debug() << fmt::format("Cluster {:d}: Edep = {:.3f} MeV, Dir = ({:.3f}, {:.3f}) deg", cl.id(),
debug() << fmt::format("Cluster {:d}: Edep = {:.3f} MeV, Dir = ({:.3f}, {:.3f}) deg", cl.getObjectID().index,
cl.getEnergy() * 1000., cl.getIntrinsicTheta() / M_PI * 180.,
cl.getIntrinsicPhi() / M_PI * 180.)
<< endmsg;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class TruthClustering : public GaudiAlgorithm {
// Loop over al calorimeter hits and sort per mcparticle
for (const auto& hit : hits) {
const auto& mcHit = mc[hit.getObjectID().index];
const auto& trackID = mcHit.getContributions(0).getParticle().id();
const auto& trackID = mcHit.getContributions(0).getParticle().getObjectID().index;
// Create a new protocluster if we don't have one for this trackID
if (protoIndex.count(trackID) == 0) {
auto pcl = proto.create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class TruthEnergyPositionClusterMerger : public GaudiAlgorithm {
}
for (const auto& [mcID, pclus] : posMap) {
if (msgLevel(MSG::DEBUG)) {
debug() << " --> Processing position cluster " << pclus.id() << ", mcID: " << mcID << ", energy: " << pclus.getEnergy()
debug() << " --> Processing position cluster " << pclus.getObjectID().index << ", mcID: " << mcID << ", energy: " << pclus.getEnergy()
<< endmsg;
}
if (energyMap.count(mcID)) {
Expand All @@ -116,8 +116,8 @@ class TruthEnergyPositionClusterMerger : public GaudiAlgorithm {
new_clus.addToShapeParameters(param);
}
if (msgLevel(MSG::DEBUG)) {
debug() << " --> Found matching energy cluster " << eclus.id() << ", energy: " << eclus.getEnergy() << endmsg;
debug() << " --> Created new combined cluster " << new_clus.id() << ", energy: " << new_clus.getEnergy() << endmsg;
debug() << " --> Found matching energy cluster " << eclus.getObjectID().index << ", energy: " << eclus.getEnergy() << endmsg;
debug() << " --> Created new combined cluster " << new_clus.getObjectID().index << ", energy: " << new_clus.getEnergy() << endmsg;
}

// set association
Expand Down Expand Up @@ -170,9 +170,9 @@ class TruthEnergyPositionClusterMerger : public GaudiAlgorithm {
new_clus.setPosition(edm4hep::utils::sphericalToVector(110.*cm, theta, phi));
new_clus.addToClusters(eclus);
if (msgLevel(MSG::DEBUG)) {
debug() << " --> Processing energy cluster " << eclus.id() << ", mcID: " << mcID << ", energy: " << eclus.getEnergy()
debug() << " --> Processing energy cluster " << eclus.getObjectID().index << ", mcID: " << mcID << ", energy: " << eclus.getEnergy()
<< endmsg;
debug() << " --> Created new 'combined' cluster " << new_clus.id() << ", energy: " << new_clus.getEnergy() << endmsg;
debug() << " --> Created new 'combined' cluster " << new_clus.getObjectID().index << ", energy: " << new_clus.getEnergy() << endmsg;
}

// set association
Expand Down
2 changes: 1 addition & 1 deletion external/algorithms/truth/src/todo/TruthClustering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class TruthClustering : public GaudiAlgorithm {
// Loop over al calorimeter hits and sort per mcparticle
for (const auto& hit : hits) {
const auto& mcHit = mc[hit.getObjectID().index];
const auto& trackID = mcHit.getContributions(0).getParticle().id();
const auto& trackID = mcHit.getContributions(0).getParticle().getObjectID().index;
// Create a new protocluster if we don't have one for this trackID
if (protoIndex.count(trackID) == 0) {
auto pcl = proto.create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class TruthEnergyPositionClusterMerger : public GaudiAlgorithm {
}
for (const auto& [mcID, pclus] : posMap) {
if (msgLevel(MSG::DEBUG)) {
debug() << " --> Processing position cluster " << pclus.id() << ", mcID: " << mcID << ", energy: " << pclus.getEnergy()
debug() << " --> Processing position cluster " << pclus.getObjectID().index << ", mcID: " << mcID << ", energy: " << pclus.getEnergy()
<< endmsg;
}
if (energyMap.count(mcID)) {
Expand All @@ -116,8 +116,8 @@ class TruthEnergyPositionClusterMerger : public GaudiAlgorithm {
new_clus.addToShapeParameters(param);
}
if (msgLevel(MSG::DEBUG)) {
debug() << " --> Found matching energy cluster " << eclus.id() << ", energy: " << eclus.getEnergy() << endmsg;
debug() << " --> Created new combined cluster " << new_clus.id() << ", energy: " << new_clus.getEnergy() << endmsg;
debug() << " --> Found matching energy cluster " << eclus.getObjectID().index << ", energy: " << eclus.getEnergy() << endmsg;
debug() << " --> Created new combined cluster " << new_clus.getObjectID().index << ", energy: " << new_clus.getEnergy() << endmsg;
}

// set association
Expand Down Expand Up @@ -170,9 +170,9 @@ class TruthEnergyPositionClusterMerger : public GaudiAlgorithm {
new_clus.setPosition(edm4hep::utils::sphericalToVector(110.*cm, theta, phi));
new_clus.addToClusters(eclus);
if (msgLevel(MSG::DEBUG)) {
debug() << " --> Processing energy cluster " << eclus.id() << ", mcID: " << mcID << ", energy: " << eclus.getEnergy()
debug() << " --> Processing energy cluster " << eclus.getObjectID().index << ", mcID: " << mcID << ", energy: " << eclus.getEnergy()
<< endmsg;
debug() << " --> Created new 'combined' cluster " << new_clus.id() << ", energy: " << new_clus.getEnergy() << endmsg;
debug() << " --> Created new 'combined' cluster " << new_clus.getObjectID().index << ", energy: " << new_clus.getEnergy() << endmsg;
}

// set association
Expand Down

0 comments on commit 0b3e344

Please sign in to comment.