Skip to content
Snippets Groups Projects
Commit 5f06ae76 authored by John Chapman's avatar John Chapman
Browse files

Suppress warnings about invalid Identifiers for dead material

Some G4 volumes are partly active and particle dead depending on
where in the volume the energy was deposited. This means that it
is perfectly possible to get a dead material `LArG4Identifier` for
some parts of an otherwise active volume. In this case we should
not issue a warning message as the `Identifier` generated from the
`LArG4Identifier` is expected to be invalid.


Former-commit-id: 49bfecc9756ce6b3548ef1c8ab0922d0cf13519d
parent 98f4cdf5
No related branches found
No related tags found
No related merge requests found
......@@ -131,7 +131,17 @@ G4bool LArFCS_StepInfoSD::ProcessHits(G4Step* a_step,G4TouchableHistory*)
//for (size_t i=0; i<numberOfProcessedHits; ++i) {
for (const auto& larhit: processedHits) {
Identifier id = this->ConvertID(larhit.id);
if (id == invalidIdentifier) {
if(larhit.id[0]==10) {
if(m_config.verboseLevel > 9) {
G4cout << this->GetName()<<" VERBOSE ProcessHits: Dead Material LArG4Identifier: "<<(std::string) larhit.id<<G4endl
<<" "<<id<<G4endl
<<" "<<id.getString()<<G4endl
<<" "<< a_step->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetName()<<G4endl
<<" numberOfProcessedHits: "<<numberOfProcessedHits<<G4endl;
G4cout <<" "<<invalidIdentifier<<G4endl;
}
}
else if (id == invalidIdentifier) {
G4cout << this->GetName()<<" WARNING ProcessHits: Something wrong with LArG4Identifier: "<<(std::string) larhit.id<<G4endl
<<" "<<id<<G4endl
<<" "<<id.getString()<<G4endl
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment