64 G4LogicalVolume* LogicalVolumeAtDepth = path[depth]->GetLogicalVolume();
67 if( volName.find(
"volAuxDet") != std::string::npos &&
68 volName.find(
"Sensitive") != std::string::npos){
71 G4Point3D local(0., 0., 0.);
72 G4Point3D world = DepthToWorld * local;
82 MF_LOG_DEBUG(
"AuxDetReadoutGeometry") <<
"found" << path[depth]->GetName()
83 <<
", number " << adNum <<
":" << svNum;
86 (G4SDManager::GetSDMpointer())->AddNewDetector(adReadout);
87 LogicalVolumeAtDepth->SetSensitiveDetector(adReadout);
94 unsigned int deeper = depth+1;
95 if(deeper >= path.size()){
96 throw cet::exception(
"AuxDetReadoutGeometry") <<
"exceeded maximum TGeoNode depth\n";
100 G4int nd = LogicalVolumeAtDepth->GetNoDaughters();
101 for(
int d = 0;
d < nd; ++
d){
104 path[deeper] = LogicalVolumeAtDepth->GetDaughter(
d);
107 G4Transform3D DeeperToMother( path[deeper]->GetObjectRotationValue(),
108 path[deeper]->GetObjectTranslation() );
109 G4Transform3D DeeperToWorld = DepthToWorld * DeeperToMother;
static constexpr double cm
void FindAuxDetSensitiveAtPosition(geo::Point_t const &point, std::size_t &adg, std::size_t &sv, double tolerance=0) const
Fills the indices of the sensitive auxiliary detector at location.
uint32_t fNumSensitiveVol
number of sensitive volumes
art::ServiceHandle< geo::Geometry const > fGeo
Handle to the geometry.
std::string to_string(ModuleType const mt)
void FindAndMakeAuxDetSensitive(std::vector< const G4VPhysicalVolume * > &path, unsigned int depth, G4Transform3D DepthToWorld)
cet::coded_exception< error, detail::translate > exception