File indexing completed on 2025-01-18 09:14:55
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include <DDG4/Factories.h>
0016
0017 #include <G4ExtendedMaterial.hh>
0018 #include <G4LogicalCrystalVolume.hh>
0019
0020
0021 namespace { class ChannelingCrystalVolume; }
0022
0023
0024 namespace dd4hep {
0025
0026
0027
0028
0029
0030
0031
0032
0033 template <> G4LogicalVolume*
0034 Geant4LogicalVolumeFactory<ChannelingCrystalVolume>::create(dd4hep::Detector& ,
0035 Volume volume,
0036 G4VSolid* solid,
0037 G4Material* material)
0038 {
0039 G4ExtendedMaterial* mat = dynamic_cast<G4ExtendedMaterial*>(material);
0040 if ( !mat ) {
0041 except("ChannelingCrystalVolume",
0042 "====> Material %s is no G4ExtendedMaterial!", material->GetName().c_str());
0043 }
0044 auto* ptr = new G4LogicalCrystalVolume(solid, mat, volume.name());
0045 printout(ALWAYS,"ChannelingCrystalVolume",
0046 "====> Created specialize logical volume [G4LogicalCrystalVolume]: %s",
0047 volume.name());
0048 return ptr;
0049 }
0050 }
0051
0052 DECLARE_GEANT4LOGICALVOLUME(ChannelingCrystalVolume)