80 : fNameExtension(fDefaultNameExtension)
124 G4cout <<
"Place " <<
name <<
" lv " << LV <<
" "
154 motherLV, isMany, copyNo, surfCheck);
164 isMany, copyNo, surfCheck);
179 motherLV, isMany, copyNo, surfCheck);
189 LV,
name, reflMotherLV, isMany, copyNo, surfCheck);
215 G4cout <<
"Replicate " <<
name <<
" lv " << LV <<
" "
220 =
new G4PVReplica(
name, LV, motherLV, axis, nofReplicas, width, offset);
229 axis, nofReplicas, width, offset);
254 G4cout <<
"Divide " <<
name <<
" lv " << LV <<
" "
270 axis, nofDivisions, width, offset);
295 G4cout <<
"Divide " <<
name <<
" lv " << LV <<
" "
311 axis, nofDivisions, offset);
336 G4cout <<
"Divide " <<
name <<
" lv " << LV <<
" "
343 -> CreatePVDivision(
name, LV, motherLV, axis, width, offset);
352 axis, width, offset);
408 std::ostringstream message;
409 message <<
"Invalid reflection for volume: "
411 <<
"Cannot be applied to a volume already reflected !";
412 G4Exception(
"G4ReflectionFactory::CreateReflectedLV()",
451 G4cout <<
"G4ReflectionFactory::ReflectDaughters(): "
510 if (refDLV ==
nullptr)
575 if (refDLV ==
nullptr)
589 axis, nofReplicas, width, offset);
599 axis, nofReplicas, width, offset);
634 if (refDLV ==
nullptr)
670 std::ostringstream message;
671 message <<
"Not yet implemented. Volume: " << dPV->
GetName() <<
G4endl
672 <<
"Reflection of parameterised volumes is not yet implemented.";
673 G4Exception(
"G4ReflectionFactory::ReflectPVParameterised()",
738 if (scale(0,0)*scale(1,1)*scale(2,2) < 0.)
770 G4cout <<
"lv: " << (*it).first <<
" lv_refl: " << (*it).second <<
G4endl;
786 for (
auto i=0; i<4; ++i)
787 for (
auto j=0; j<4; ++j)
788 diff += std::abs(scale(i,j) -
fScale(i,j));
792 std::ostringstream message;
793 message <<
"Unexpected scale in input !" <<
G4endl
794 <<
" Difference: " << diff;
809 if (!divisionFactory)
811 std::ostringstream message;
812 message <<
"A concrete G4PVDivisionFactory instantiated is required !"
814 <<
" It has been requested to reflect divided volumes."
816 <<
" In this case, it is required to instantiate a concrete"
818 <<
" factory G4PVDivisionFactory in your program -before-"
820 <<
" executing the reflection !";
821 G4Exception(
"G4ReflectionFactory::GetPVDivisionFactory()",
825 return divisionFactory;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::pair< G4VPhysicalVolume *, G4VPhysicalVolume * > G4PhysicalVolumesPair
std::map< G4LogicalVolume *, G4LogicalVolume *, std::less< G4LogicalVolume * > > G4ReflectedVolumesMap
G4GLOB_DLL std::ostream G4cout
G4double GetSurfaceTolerance() const
static G4GeometryTolerance * GetInstance()
G4VSolid * GetSolid() const
const G4VisAttributes * GetVisAttributes() const
G4VSensitiveDetector * GetSensitiveDetector() const
void SetRegion(G4Region *reg)
size_t GetNoDaughters() const
G4bool IsRootRegion() const
G4Region * GetRegion() const
G4double GetBiasWeight() const
G4Material * GetMaterial() const
G4VPhysicalVolume * GetDaughter(const G4int i) const
G4UserLimits * GetUserLimits() const
G4FieldManager * GetFieldManager() const
void SetVisAttributes(const G4VisAttributes *pVA)
void SetBiasWeight(G4double w)
const G4String & GetName() const
G4LogicalVolume * ReflectLV(G4LogicalVolume *LV, G4bool surfCheck=false)
G4bool IsReflection(const G4Scale3D &scale) const
G4int GetVerboseLevel() const
const G4String & GetVolumesNameExtension() const
G4bool IsReflected(G4LogicalVolume *lv) const
G4PhysicalVolumesPair Divide(const G4String &name, G4LogicalVolume *LV, G4LogicalVolume *motherLV, EAxis axis, G4int nofDivisions, G4double width, G4double offset)
G4LogicalVolume * GetReflectedLV(G4LogicalVolume *lv) const
static G4ReflectionFactory * Instance()
void SetVerboseLevel(G4int verboseLevel)
virtual ~G4ReflectionFactory()
G4ReflectedVolumesMap::const_iterator LogicalVolumesMapIterator
void ReflectPVPlacement(G4VPhysicalVolume *PV, G4LogicalVolume *refLV, G4bool surfCheck=false)
G4double GetScalePrecision() const
G4VPVDivisionFactory * GetPVDivisionFactory() const
void CheckScale(const G4Scale3D &scale) const
void PrintConstituentLVMap()
G4PhysicalVolumesPair Place(const G4Transform3D &transform3D, const G4String &name, G4LogicalVolume *LV, G4LogicalVolume *motherLV, G4bool isMany, G4int copyNo, G4bool surfCheck=false)
static const G4Scale3D fScale
static G4ThreadLocal G4ReflectionFactory * fInstance
G4ReflectedVolumesMap fConstituentLVMap
G4bool IsConstituent(G4LogicalVolume *lv) const
void ReflectPVReplica(G4VPhysicalVolume *PV, G4LogicalVolume *refLV)
void SetScalePrecision(G4double scaleValue)
void ReflectDaughters(G4LogicalVolume *LV, G4LogicalVolume *refLV, G4bool surfCheck=false)
void ReflectPVParameterised(G4VPhysicalVolume *PV, G4LogicalVolume *refLV, G4bool surfChk=false)
void ReflectPVDivision(G4VPhysicalVolume *PV, G4LogicalVolume *refLV)
const G4ReflectedVolumesMap & GetReflectedVolumesMap() const
static const G4String fDefaultNameExtension
G4LogicalVolume * GetConstituentLV(G4LogicalVolume *reflLV) const
G4LogicalVolume * CreateReflectedLV(G4LogicalVolume *LV)
G4ReflectedVolumesMap fReflectedLVMap
G4PhysicalVolumesPair Replicate(const G4String &name, G4LogicalVolume *LV, G4LogicalVolume *motherLV, EAxis axis, G4int nofReplicas, G4double width, G4double offset=0.)
void SetVolumesNameExtension(const G4String &nameExtension)
void AddRootLogicalVolume(G4LogicalVolume *lv, G4bool search=true)
static G4VPVDivisionFactory * Instance()
virtual G4VPhysicalVolume * CreatePVDivision(const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMother, const EAxis pAxis, const G4int nReplicas, const G4double width, const G4double offset)=0
virtual G4bool IsReplicated() const =0
G4LogicalVolume * GetLogicalVolume() const
G4RotationMatrix GetObjectRotationValue() const
virtual void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const =0
virtual G4int GetCopyNo() const =0
const G4String & GetName() const
virtual G4VPVParameterisation * GetParameterisation() const =0
virtual G4bool IsMany() const =0
G4ThreeVector GetObjectTranslation() const
const char * name(G4int ptype)