8 #include "G4TransportationManager.hh" 9 #include "G4Navigator.hh" 10 #include "G4VTouchable.hh" 11 #include "G4TouchableHistory.hh" 21 G4Navigator* theStdNavigator = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking();
22 G4Navigator theNavigator;
23 theNavigator.SetWorldVolume(theStdNavigator->GetWorldVolume());
26 std::vector<const GeometricDet*> allSensitiveDets;
28 edm::LogInfo(
"TrackerSimInfoNumbering")<<
" TouchableTo History: got "<<allSensitiveDets.size()<<
" sensitive detectors from TrackerMapDDDtoID.";
30 for ( std::vector<const GeometricDet*>::const_iterator it = allSensitiveDets.begin();
31 it != allSensitiveDets.end();
35 theNavigator.LocateGlobalPointAndSetup(G4ThreeVector(t.x(),t.y(),t.z()));
36 G4TouchableHistory *
hist = theNavigator.CreateTouchableHistory();
43 myMap[st] =
nav_type((*it)->navType().begin(),(*it)->navType().end());
59 edm::LogInfo(
"TrackerSimInfoNumbering")<<
" TouchableToHistory: mapped "<<
myDirectMap.size()<<
" detectors to G4.";
62 edm::LogError(
"TrackerSimInfoNumbering")<<
" ERROR: DDD sensitive detectors do not match Geant4 ones.";
86 G4Navigator* theStdNavigator = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking();
87 G4Navigator theNavigator;
88 theNavigator.SetWorldVolume(theStdNavigator->GetWorldVolume());
90 theNavigator.LocateGlobalPointAndSetup(G4ThreeVector(t.x(),t.y(),t.z()));
91 G4TouchableHistory*
hist = theNavigator.CreateTouchableHistory();
100 std::vector<int> debugint;
101 std::vector<std::string> debugstring;
103 int levels = v->GetHistoryDepth();
106 if (v->GetVolume(
k)->GetLogicalVolume()->GetName() !=
"TOBInactive") {
108 std::pair<int,std::string>
109 (v->GetVolume(
k)->GetCopyNo(),
110 v->GetVolume(
k)->GetLogicalVolume()->GetName()));
112 debugint.push_back(v->GetVolume(
k)->GetCopyNo());
113 debugstring.push_back(v->GetVolume(
k)->GetLogicalVolume()->GetName());
119 for(u_int32_t
jj=0;
jj<debugstring.size();
jj++)
LogDebug(
"TrackerSimDebugNumbering")<<
" "<<debugstring[
jj];
145 int levels = v->GetHistoryDepth();
147 LogDebug(
"TrackerSimDebugNumbering")<<
" NAME : "<<v->GetVolume()->GetLogicalVolume()->GetName();
149 LogDebug(
"TrackerSimInfoNumbering") <<
" Hist: "<< v->GetVolume(
k)->GetLogicalVolume()->GetName()<<
150 " Copy "<< v->GetVolume(
k)->GetCopyNo();
DirectMapType myDirectMap
DDFilteredView & getFilteredView(const G4VTouchable &, DDFilteredView &)
nav_type touchableToNavType(const G4VTouchable *)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
bool goTo(const nav_type &)
const GeometricDet * myGeomDet
std::vector< int > nav_type
Nav_Story getNavStory(DDFilteredView &)
Nav_Story touchableToNavStory(const G4VTouchable *)
void dumpG4VPV(const G4VTouchable *)
std::vector< std::pair< int, std::string > > Nav_Story
ConstGeometricDetContainer deepComponents() const
nav_type getNavType(const G4VTouchable &)
const DDTranslation & translation() const
The absolute translation of the current node.
int touchableToInt(const G4VTouchable *)