Commit e725764a authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Polish debug output

parent 46851bb8
......@@ -58,7 +58,9 @@ namespace Jug::Base {
int ID = 0;
for (const auto& p : *parts) {
if (p.genStatus() > 1) {
debug() << "ignoring particle with genStatus = " << p.genStatus() << endmsg;
if (msgLevel(MSG::DEBUG)) {
debug() << "ignoring particle with genStatus = " << p.genStatus() << endmsg;
}
continue;
}
......
......@@ -119,7 +119,9 @@ private:
std::vector<RecData> rc;
for (const auto& part : mc) {
if (part.genStatus() > 1) {
debug() << "ignoring particle with genStatus = " << part.genStatus() << endmsg;
if (msgLevel(MSG::DEBUG)) {
debug() << "ignoring particle with genStatus = " << part.genStatus() << endmsg;
}
continue;
}
// only detect neutrons and photons
......@@ -175,7 +177,10 @@ private:
std::vector<RecData> b0(const dd4pod::Geant4ParticleCollection& mc) {
std::vector<RecData> rc;
for (const auto& part : mc) {
if (part.genStatus() != 1) {
if (part.genStatus() > 1) {
if (msgLevel(MSG::DEBUG)) {
debug() << "ignoring particle with genStatus = " << part.genStatus() << endmsg;
}
continue;
}
// only detect charged hadrons and photons
......@@ -205,7 +210,10 @@ private:
std::vector<RecData> rp(const dd4pod::Geant4ParticleCollection& mc) {
std::vector<RecData> rc;
for (const auto& part : mc) {
if (part.genStatus() != 1) {
if (part.genStatus() > 1) {
if (msgLevel(MSG::DEBUG)) {
debug() << "ignoring particle with genStatus = " << part.genStatus() << endmsg;
}
continue;
}
// only detect protons
......@@ -233,7 +241,10 @@ private:
std::vector<RecData> omd(const dd4pod::Geant4ParticleCollection& mc) {
std::vector<RecData> rc;
for (const auto& part : mc) {
if (part.genStatus() != 1) {
if (part.genStatus() > 1) {
if (msgLevel(MSG::DEBUG)) {
debug() << "ignoring particle with genStatus = " << part.genStatus() << endmsg;
}
continue;
}
// only detect protons
......
......@@ -74,7 +74,9 @@ public:
for (size_t ip = 0; ip < mc.size(); ++ip) {
const auto& mcpart = mc[ip];
if (consumed[ip] || mcpart.genStatus() > 1 || mcpart.charge() == 0 || mcpart.charge() * charge_rec < 0) {
debug() << "ignoring non-primary/neutral/opposite charge particle" << endmsg;
if (msgLevel(MSG::DEBUG)) {
debug() << "ignoring non-primary/neutral/opposite charge particle" << endmsg;
}
continue;
}
const double dp_rel = std::abs((mom.mag() - mcpart.ps().mag()) / mcpart.ps().mag());
......
......@@ -139,9 +139,9 @@ namespace Jug::Reco {
std::move(trackFindingOutput.trackTips),
std::move(trackFindingOutput.fittedParameters));
} else {
debug() << "Track finding failed for truth seed " << iseed << endmsg;
ACTS_WARNING("Track finding failed for truth seed " << iseed << " with error" << result.error());
// trajectories->push_back(SimMultiTrajectory());
if (msgLevel(MSG::DEBUG)) {
debug() << "Track finding failed for truth seed " << iseed << "with error: " << result.error() << endmsg;
}
}
}
......
......@@ -70,6 +70,7 @@ namespace Jug::Reco {
StatusCode TrackFindingAlgorithm::initialize()
{
warning() << "Deprecated algorithm, use CKFTracking instead" << endmsg;
if (GaudiAlgorithm::initialize().isFailure())
return StatusCode::FAILURE;
m_geoSvc = service("GeoSvc");
......@@ -139,7 +140,9 @@ namespace Jug::Reco {
std::move(trackFindingOutput.trackTips),
std::move(trackFindingOutput.fittedParameters));
} else {
debug() << "Track finding failed for truth seed " << iseed << endmsg;
if (msgLevel(MSG::DEBUG)) {
debug() << "Track finding failed for truth seed " << iseed << endmsg;
}
ACTS_WARNING("Track finding failed for truth seed " << iseed << " with error" << result.error());
// trajectories->push_back(SimMultiTrajectory());
}
......
......@@ -83,7 +83,9 @@ namespace Jug::Reco {
// genStatus = 1 means thrown G4Primary
if (part.genStatus() > 1 ) {
debug() << "ignoring particle with genStatus = " << part.genStatus() << endmsg;
if (msgLevel(MSG::DEBUG)) {
debug() << "ignoring particle with genStatus = " << part.genStatus() << endmsg;
}
continue;
}
using Acts::UnitConstants::GeV;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment