From b77730afa6c8a09c2cf44d46b244dd0d91b3a8e1 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sun, 13 Oct 2019 03:32:38 -0400 Subject: [PATCH 1/3] - add new ForwardTOF volume FTOL to support new tof geometry [rtj] --- src/GlueXDetectorConstruction.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/GlueXDetectorConstruction.cc b/src/GlueXDetectorConstruction.cc index c4dc70d..78153f0 100644 --- a/src/GlueXDetectorConstruction.cc +++ b/src/GlueXDetectorConstruction.cc @@ -361,7 +361,9 @@ void GlueXDetectorConstruction::ConstructSDandField() } iter->second->SetSensitiveDetector(ccalHandler); } - else if (volname == "FTOC" || volname == "FTOX" || volname == "FTOH") { + else if (volname == "FTOC" || volname == "FTOX" || + volname == "FTOH" || volname == "FTOL") + { if (ftofHandler == 0) { ftofHandler = new GlueXSensitiveDetectorFTOF("ftof"); SDman->AddNewDetector(ftofHandler); From 5697bb62a5acb7c453ccfa776b3a623ed0d91298 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sun, 13 Oct 2019 03:40:39 -0400 Subject: [PATCH 2/3] * GlueXSensitiveDetectorFTOF.cc changes to support TOF upgrade [rtj] - remove hard-coded references to TOF counter pairs ordering - replace with code that uses paired_row identifiers from hdds - print error if hdds is missing the paired_row identifiers --- src/GlueXSensitiveDetectorFTOF.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/GlueXSensitiveDetectorFTOF.cc b/src/GlueXSensitiveDetectorFTOF.cc index d7dec36..5e073c5 100644 --- a/src/GlueXSensitiveDetectorFTOF.cc +++ b/src/GlueXSensitiveDetectorFTOF.cc @@ -154,7 +154,13 @@ G4bool GlueXSensitiveDetectorFTOF::ProcessHits(G4Step* step, int plane = GetIdent("plane", touch); int column = GetIdent("column", touch); int barNo = GetIdent("row", touch); - barNo = (barNo > 44)? barNo - 23 : barNo; + int barIndex = (column < 2)? barNo : GetIdent("paired_row", touch); + if (barIndex < 1) { + G4cerr << "GlueXSensitiveDetectorFTOF::ProcessHits error - " + << "hdds geometry for FTOF is missing paired_row identifier, " + << "cannot continue!" << G4endl; + exit(1); + } G4Track *track = step->GetTrack(); G4int trackID = track->GetTrackID(); int pdgtype = track->GetDynamicParticle()->GetPDGcode(); @@ -191,10 +197,10 @@ G4bool GlueXSensitiveDetectorFTOF::ProcessHits(G4Step* step, // Post the hit to the hits map, ordered by plane,bar,end index if (dEsum > 0) { - int key = GlueXHitFTOFbar::GetKey(plane, barNo); + int key = GlueXHitFTOFbar::GetKey(plane, barIndex); GlueXHitFTOFbar *counter = (*fBarHitsMap)[key]; if (counter == 0) { - GlueXHitFTOFbar newcounter(plane, barNo); + GlueXHitFTOFbar newcounter(plane, barIndex); fBarHitsMap->add(key, newcounter); counter = (*fBarHitsMap)[key]; } From 9f99d8e42daba4ba01bf1bb94dbdd8fbca3a8b56 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sun, 13 Oct 2019 04:03:58 -0400 Subject: [PATCH 3/3] * reduce the amount of verbose output at startup in hdgeant4.cc [rtj] --- src/hdgeant4.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hdgeant4.cc b/src/hdgeant4.cc index 1fb8d9d..1083899 100644 --- a/src/hdgeant4.cc +++ b/src/hdgeant4.cc @@ -23,6 +23,7 @@ #include #include #include +#include #ifdef G4VIS_USE #include @@ -151,7 +152,7 @@ int main(int argc,char** argv) #else G4RunManager runManager; #endif - runManager.SetVerboseLevel(3); + runManager.SetVerboseLevel(0); // Let user turn off geometry optimization for faster startup // (and slower running) @@ -184,6 +185,8 @@ int main(int argc,char** argv) // Physics process initialization GlueXPhysicsList *physicslist = new GlueXPhysicsList(); runManager.SetUserInitialization(physicslist); + G4HadronicProcessStore *pstore = G4HadronicProcessStore::Instance(); + pstore->SetVerbose(0); // User actions initialization GlueXUserActionInitialization *userinit;