Skip to content

Commit

Permalink
Merge pull request #31752 from davidlange6/dl200912
Browse files Browse the repository at this point in the history
TrackingMaterialProducer fix in volume accounting
  • Loading branch information
cmsbuild committed Oct 13, 2020
2 parents 20b72c5 + 2642251 commit 47e5513
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -285,7 +285,7 @@ void TrackingMaterialProducer::update(const G4Step* step) {
// update track accounting
if (enter_sensitive) {
if (m_track_volume != nullptr) {
edm::LogWarning("TrackingMaterialProducer") << "Entering volume " << sensitive << "while inside volume "
edm::LogWarning("TrackingMaterialProducer") << "Entering volume " << sensitive << " while inside volume "
<< m_track_volume << ". Something is inconsistent";
m_track.reset();
}
Expand All @@ -295,11 +295,12 @@ void TrackingMaterialProducer::update(const G4Step* step) {
m_track.step(MaterialAccountingStep(length, radiationLengths, energyLoss, globalPositionIn, globalPositionOut));
if (leave_sensitive) {
if (m_track_volume != sensitive) {
edm::LogWarning("TrackingMaterialProducer") << "Leaving volume " << sensitive << "while inside volume "
edm::LogWarning("TrackingMaterialProducer") << "Leaving volume " << sensitive << " while inside volume "
<< m_track_volume << ". Something is inconsistent";
m_track.reset();
} else
m_track.leaveDetector(cosThetaPost);
m_track_volume = nullptr;
}
if (sensitive)
LogInfo("TrackingMaterialProducer") << "Track was near sensitive volume " << sensitive->GetName() << std::endl;
Expand Down

0 comments on commit 47e5513

Please sign in to comment.