9 #include <phparameter/PHParameters.h>
25 #include <Geant4/G4ParticleDefinition.hh>
26 #include <Geant4/G4ReferenceCountedHandle.hh>
27 #include <Geant4/G4Step.hh>
28 #include <Geant4/G4StepPoint.hh>
29 #include <Geant4/G4StepStatus.hh>
30 #include <Geant4/G4String.hh>
31 #include <Geant4/G4SystemOfUnits.hh>
32 #include <Geant4/G4ThreeVector.hh>
33 #include <Geant4/G4TouchableHandle.hh>
34 #include <Geant4/G4Track.hh>
35 #include <Geant4/G4TrackStatus.hh>
36 #include <Geant4/G4Types.hh>
37 #include <Geant4/G4VPhysicalVolume.hh>
38 #include <Geant4/G4VTouchable.hh>
39 #include <Geant4/G4VUserTrackInformation.hh>
41 #include <boost/tokenizer.hpp>
45 #include <boost/version.hpp>
46 #if (__GNUC__ == 4 && __GNUC_MINOR__ == 4 && BOOST_VERSION == 105700)
47 #pragma GCC diagnostic ignored "-Wuninitialized"
48 #pragma message "ignoring bogus gcc warning in boost header lexical_cast.hpp"
49 #include <boost/lexical_cast.hpp>
50 #pragma GCC diagnostic warning "-Wuninitialized"
52 #include <boost/lexical_cast.hpp>
60 using namespace CLHEP;
68 IsBlackHole(params->get_int_param(
"blackhole"))
71 detectorname(params->get_string_param(
"detectorname"))
72 , superdetector(params->get_string_param(
"superdetector"))
74 , absorberhits_(nullptr)
76 , savehitcontainer(nullptr)
79 , savepoststepstatus(-1)
103 bool geantino =
false;
192 std::cout << __FILE__ <<
"::" << __func__ <<
"::" <<
GetName() <<
": hit was not created" << std::endl;
202 std::cout << __FILE__ <<
"::" << __func__ <<
"::" <<
GetName() <<
": hits do not belong to the same track" << std::endl;
204 <<
", current trackid: " << aTrack->
GetTrackID()
277 std::string hitnodename;
278 std::string absorbernodename;
292 hits_ = findNode::getClass<PHG4HitContainer>(topNode, hitnodename.c_str());
293 absorberhits_ = findNode::getClass<PHG4HitContainer>(topNode, absorbernodename.c_str());
326 boost::char_separator<char> sep(
"_");
327 boost::tokenizer<boost::char_separator<char>> tok(volume->
GetName(), sep);
328 boost::tokenizer<boost::char_separator<char>>::const_iterator tokeniter;
330 for (tokeniter = tok.begin(); tokeniter != tok.end(); ++tokeniter)
332 if (*tokeniter ==
"impr")
335 if (tokeniter != tok.end())
337 sector_id = boost::lexical_cast<
int>(*tokeniter);
342 <<
" for mRICH sector id " << std::endl;
346 else if (*tokeniter ==
"pv")
349 if (tokeniter != tok.end())
351 mRICH_id = boost::lexical_cast<
int>(*tokeniter);
356 <<
" for mRICH id " << std::endl;
362 module_id = (sector_id - 1) * 100 + mRICH_id;
364 if (
Verbosity() >=
Fun4AllBase::VERBOSITY_SOME) std::cout <<
"name of volume: " << volume->
GetName() <<
", sector_id = " << sector_id <<
", mRICH_id = " << mRICH_id <<
", module_id = " << module_id << std::endl;