14 #include <Geant4/G4IonisParamMat.hh>
15 #include <Geant4/G4Material.hh>
16 #include <Geant4/G4MaterialCutsCouple.hh>
17 #include <Geant4/G4ParticleDefinition.hh>
18 #include <Geant4/G4ReferenceCountedHandle.hh>
19 #include <Geant4/G4Step.hh>
20 #include <Geant4/G4StepStatus.hh>
21 #include <Geant4/G4String.hh>
22 #include <Geant4/G4SystemOfUnits.hh>
23 #include <Geant4/G4ThreeVector.hh>
24 #include <Geant4/G4TouchableHandle.hh>
25 #include <Geant4/G4Track.hh>
26 #include <Geant4/G4VSolid.hh>
27 #include <Geant4/G4TrackStatus.hh>
28 #include <Geant4/G4Types.hh>
29 #include <Geant4/G4VPhysicalVolume.hh>
30 #include <Geant4/G4VTouchable.hh>
31 #include <Geant4/G4VUserTrackInformation.hh>
32 #include <Geant4/G4VSensitiveDetector.hh>
33 #include <Geant4/G4OpticalPhoton.hh>
34 #include <Geant4/G4Scintillation.hh>
35 #include <Geant4/G4Cerenkov.hh>
37 #include <boost/tokenizer.hpp>
41 #include <boost/version.hpp>
42 #if (__GNUC__ == 4 && __GNUC_MINOR__ == 4 && BOOST_VERSION == 105700)
43 #pragma GCC diagnostic ignored "-Wuninitialized"
44 #pragma message "ignoring bogus gcc warning in boost header lexical_cast.hpp"
45 #include <boost/lexical_cast.hpp>
46 #pragma GCC diagnostic warning "-Wuninitialized"
48 #include <boost/lexical_cast.hpp>
63 , absorberhits_(nullptr)
64 , hitcontainer(nullptr)
71 , absorbertruth(absorberactive)
72 , light_scint_model(1)
165 bool geantino =
false;
240 static bool once =
true;
241 if (once && edep > 0)
247 cout <<
"PHG4ForwardDualReadoutSteppingAction::UserSteppingAction::"
250 <<
" use scintillating light model at each Geant4 steps. "
255 <<
"Birk Constant = "
258 <<
"edep = " << edep <<
", "
261 <<
"light_yield = " << light_yield << endl;
276 float fNcerenkov = 0;
281 G4int fCerenkovSubType;
307 if((ptype == fScinType) && (pstype == fScinSubType) && (prevMaterial->
GetName().find(
"G4_POLYSTYRENE") != std::string::npos)){ fNscin++;}
309 if( (ptype == fCerenkovType) && (pstype == fCerenkovSubType) && ((prevMaterial->
GetName().find(
"PMMA") != std::string::npos) || (prevMaterial->
GetName().find(
"Quartz") != std::string::npos))){ fNcerenkov++;}
431 std::string hitnodename;
432 std::string absorbernodename;
447 hits_ = findNode::getClass<PHG4HitContainer>(topNode, hitnodename);
448 absorberhits_ = findNode::getClass<PHG4HitContainer>(topNode, absorbernodename);
453 std::cout <<
"PHG4ForwardDualReadoutSteppingAction::SetTopNode - unable to find " << hitnodename << std::endl;
459 cout <<
"PHG4ForwardDualReadoutSteppingAction::SetTopNode - unable to find " << absorbernodename << endl;
501 boost::char_separator<char> sep(
"_");
502 boost::tokenizer<boost::char_separator<char> > tok(volume->
GetName(), sep);
503 boost::tokenizer<boost::char_separator<char> >::const_iterator tokeniter;
504 for (tokeniter = tok.begin(); tokeniter != tok.end(); ++tokeniter)
506 if (*tokeniter ==
"j")
509 if (tokeniter == tok.end())
break;
510 j = boost::lexical_cast<
int>(*tokeniter);
512 else if (*tokeniter ==
"k")
515 if (tokeniter == tok.end())
break;
516 k = boost::lexical_cast<
int>(*tokeniter);