LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
LArVoxelReadoutGeometry.cxx File Reference

Define the "parallel" geometry that's seen by the LAr Voxels. More...

#include "nutools/G4Base/DetectorConstruction.h"
#include <vector>
#include <cmath>
#include <map>
#include <memory>
#include <sstream>
#include <iostream>
#include "art/Framework/Services/Registry/ServiceHandle.h"
#include "messagefacility/MessageLogger/MessageLogger.h"
#include "larsim/LArG4/LArVoxelReadoutGeometry.h"
#include "larsim/LArG4/LArVoxelReadout.h"
#include "larsim/Simulation/LArVoxelCalculator.h"
#include "Geant4/G4PVPlacement.hh"
#include "Geant4/G4PVReplica.hh"
#include "Geant4/G4LogicalVolume.hh"
#include "Geant4/G4VisAttributes.hh"
#include "Geant4/G4VSolid.hh"
#include "Geant4/G4Box.hh"
#include "Geant4/G4Tubs.hh"
#include "Geant4/G4ThreeVector.hh"
#include "Geant4/G4RotationMatrix.hh"
#include "Geant4/G4VSensitiveDetector.hh"
#include "Geant4/G4SDManager.hh"
#include "Geant4/G4Material.hh"
#include "Geant4/G4Point3D.hh"
#include "Geant4/globals.hh"
#include <typeinfo>

Go to the source code of this file.

Namespaces

 larg4
 Geant4 interface.
 

Functions

template<typename T >
std::string demangle_cxx_symbol (const T &obj)
 
template<class STREAM >
int DumpPhysicalVolume (STREAM &out, const G4VPhysicalVolume &PV, std::string indentstr="")
 

Variables

constexpr bool DisableVoxelCaching = false
 

Detailed Description

Define the "parallel" geometry that's seen by the LAr Voxels.

Author
selig.nosp@m.man@.nosp@m.nevis.nosp@m..col.nosp@m.umbia.nosp@m..edu

Definition in file LArVoxelReadoutGeometry.cxx.

Function Documentation

template<typename T >
std::string demangle_cxx_symbol ( const T &  obj)

Definition at line 68 of file LArVoxelReadoutGeometry.cxx.

References DumpPhysicalVolume().

Referenced by DumpPhysicalVolume().

68 { return typeid(obj).name(); }
template<class STREAM >
int DumpPhysicalVolume ( STREAM &  out,
const G4VPhysicalVolume &  PV,
std::string  indentstr = "" 
)

Definition at line 75 of file LArVoxelReadoutGeometry.cxx.

References demangle_cxx_symbol(), and larg4::LArVoxelReadoutGeometry::LArVoxelReadoutGeometry().

Referenced by larg4::LArVoxelReadoutGeometry::Construct(), and demangle_cxx_symbol().

76 {
77 
78  const G4ThreeVector& pos = PV.GetTranslation();
79  const G4LogicalVolume* LV = PV.GetLogicalVolume();
80 
81  int count = 1;
82  out << indentstr << PV.GetName() << " [" << demangle_cxx_symbol(PV) << "]"
83  << " at (" << pos.x() << ", " << pos.y() << ", " << pos.z() << ")";
84  if (LV) {
85  out << ", a " << LV->GetName();
86 
87  const G4VSolid* Solid = LV->GetSolid();
88  if (Solid) {
89  out << " shaped as " << Solid->GetName();
90  const G4Box* pBox;
91 
92  try { pBox = dynamic_cast<const G4Box*>(Solid); }
93  catch (std::bad_cast&) { pBox = nullptr; }
94 
95  if (pBox) {
96  out << ", a (" << (2.*pBox->GetXHalfLength())
97  << " x " << (2.*pBox->GetYHalfLength())
98  << " x " << (2.*pBox->GetZHalfLength()) << ") cm box";
99  } // if box
100  else {
101  out << ", a " << demangle_cxx_symbol(*Solid);
102  }
103  }
104  else {
105  out << " with no shape (!?!)";
106  }
107 
108  G4int nDaughters = LV->GetNoDaughters();
109  if (nDaughters > 0) {
110  out << " with " << nDaughters << " subvolumes:\n";
111  for (G4int i = 0; i < nDaughters; ++i) {
112  count += DumpPhysicalVolume(out, *LV->GetDaughter(i), indentstr + " ");
113  }
114  }
115  else out << '\n';
116  }
117  else out << " with no logical volume (!?)\n";
118 
119  return count;
120 } // DumpPhysicalVolume()
int DumpPhysicalVolume(STREAM &out, const G4VPhysicalVolume &PV, std::string indentstr="")
std::string demangle_cxx_symbol(const T &obj)

Variable Documentation

constexpr bool DisableVoxelCaching = false