7 #include "G4ParticleDefinition.hh" 
    8 #include "G4DynamicParticle.hh" 
    9 #include "G4TouchableHistory.hh" 
   15 #include "GaudiKernel/Bootstrap.h" 
   16 #include "GaudiKernel/ISvcLocator.h" 
   17 #include "GaudiKernel/IMessageSvc.h" 
   24                    "TestBoundariesUserAction")
 
   30     m_file = TFile::Open(
"points.root",
"RECREATE");
 
   33     m_tree = 
new TTree(
"points",
"points");
 
   56     G4StepPoint* preStep = aStep->GetPreStepPoint();
 
   57     G4StepPoint* postStep = aStep->GetPostStepPoint();
 
   59     if (!preStep || !postStep) {
 
   60       ATH_MSG_ERROR(
"TestBoundariesUserAction Error something missing");
 
   64     const G4TouchableHistory* preTH = 
dynamic_cast<const G4TouchableHistory*
>(preStep->GetTouchable());
 
   65     const G4TouchableHistory* postTH = 
dynamic_cast<const G4TouchableHistory*
>(postStep->GetTouchable());
 
   66     G4LogicalVolume* preLV = preStep->GetPhysicalVolume()->GetLogicalVolume();
 
   69       int preN=preTH->GetHistoryDepth();
 
   70       if (preN>0) preLV = preTH->GetVolume(preN-1)->GetLogicalVolume();
 
   73     G4LogicalVolume* postLV{};
 
   74     if (postStep->GetPhysicalVolume())
 
   75       postLV = postStep->GetPhysicalVolume()->GetLogicalVolume();
 
   77       int postN = postTH->GetHistoryDepth();
 
   78       if (postN>0) postLV = postTH->GetVolume(postN-1)->GetLogicalVolume();
 
   82       const G4ThreeVector& 
pos = aStep->GetPostStepPoint()->GetPosition();
 
   85         const std::string& preStepPointName = preLV->GetName();
 
   86         SMap::const_iterator 
it = 
m_sel.find(preStepPointName);
 
   95         SMap::const_iterator 
it = 
m_sel.find( postLV->GetName() );