Skip to content

Commit

Permalink
Merge pull request #126 from JeffersonLab/tof_upgrade_fixes_rtj
Browse files Browse the repository at this point in the history
Tof upgrade fixes rtj
  • Loading branch information
sdobbs authored Oct 13, 2019
2 parents 8567429 + 9f99d8e commit 1fe8c0d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/GlueXDetectorConstruction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 9 additions & 3 deletions src/GlueXSensitiveDetectorFTOF.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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];
}
Expand Down
5 changes: 4 additions & 1 deletion src/hdgeant4.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <G4UImanager.hh>
#include <G4Timer.hh>
#include <G4LogicalVolumeStore.hh>
#include <G4HadronicProcessStore.hh>

#ifdef G4VIS_USE
#include <G4VisExecutive.hh>
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1fe8c0d

Please sign in to comment.