85 fNameExtension(fDefaultNameExtension)
129 G4cout <<
"Place " << name <<
" lv " << LV <<
" "
138 transform3D.getDecomposition(scale, rotation, translation);
159 motherLV, isMany, copyNo, surfCheck);
169 isMany, copyNo, surfCheck);
184 motherLV, isMany, copyNo, surfCheck);
194 LV, name, reflMotherLV, isMany, copyNo, surfCheck);
220 G4cout <<
"Replicate " << name <<
" lv " << LV <<
" "
225 =
new G4PVReplica(name, LV, motherLV, axis, nofReplicas, width, offset);
234 axis, nofReplicas, width, offset);
259 G4cout <<
"Divide " << name <<
" lv " << LV <<
" "
275 axis, nofDivisions, width, offset);
300 G4cout <<
"Divide " << name <<
" lv " << LV <<
" "
316 axis, nofDivisions, offset);
341 G4cout <<
"Divide " << name <<
" lv " << LV <<
" "
348 -> CreatePVDivision(name, LV, motherLV, axis, width, offset);
357 axis, width, offset);
413 std::ostringstream message;
414 message <<
"Invalid reflection for volume: "
416 <<
"Cannot be applied to a volume already reflected !";
417 G4Exception(
"G4ReflectionFactory::CreateReflectedLV()",
456 G4cout <<
"G4ReflectionFactory::ReflectDaughters(): "
594 axis, nofReplicas,
width, offset);
604 axis, nofReplicas,
width, offset);
675 std::ostringstream message;
676 message <<
"Not yet implemented. Volume: " << dPV->
GetName() <<
G4endl
677 <<
"Reflection of parameterised volumes is not yet implemented.";
678 G4Exception(
"G4ReflectionFactory::ReflectPVParameterised()",
743 if (scale(0,0)*scale(1,1)*scale(2,2) < 0.)
776 G4cout <<
"lv: " << (*it).first <<
" lv_refl: " << (*it).second <<
G4endl;
792 for (
G4int i=0; i<4; i++)
793 for (
G4int j=0; j<4; j++)
794 diff += std::abs(scale(i,j) -
fScale(i,j));
798 std::ostringstream message;
799 message <<
"Unexpected scale in input !" <<
G4endl
800 <<
" Difference: " << diff;
815 if (!divisionFactory)
817 std::ostringstream message;
818 message <<
"A concrete G4PVDivisionFactory instantiated is required !"
820 <<
" It has been requested to reflect divided volumes."
822 <<
" In this case, it is required to instantiate a concrete"
824 <<
" factory G4PVDivisionFactory in your program -before-"
826 <<
" executing the reflection !";
827 G4Exception(
"G4ReflectionFactory::GetPVDivisionFactory()",
831 return divisionFactory;
G4PhysicalVolumesPair Divide(const G4String &name, G4LogicalVolume *LV, G4LogicalVolume *motherLV, EAxis axis, G4int nofDivisions, G4double width, G4double offset)
G4ReflectedVolumesMap fReflectedLVMap
void ReflectPVParameterised(G4VPhysicalVolume *PV, G4LogicalVolume *refLV, G4bool surfCheck=false)
void PrintConstituentLVMap()
const G4String & GetVolumesNameExtension() const
G4Material * GetMaterial() const
void AddRootLogicalVolume(G4LogicalVolume *lv)
virtual G4bool IsReplicated() const =0
void SetScalePrecision(G4double scaleValue)
G4double GetSurfaceTolerance() const
G4VSolid * GetSolid() const
G4VPhysicalVolume * GetDaughter(const G4int i) const
G4LogicalVolume * GetConstituentLV(G4LogicalVolume *reflLV) const
G4PhysicalVolumesPair Replicate(const G4String &name, G4LogicalVolume *LV, G4LogicalVolume *motherLV, EAxis axis, G4int nofReplicas, G4double width, G4double offset=0)
const char * name(G4int ptype)
G4Region * GetRegion() const
void CheckScale(const G4Scale3D &scale) const
G4bool IsReflected(G4LogicalVolume *lv) const
static G4ReflectionFactory * Instance()
static G4VPVDivisionFactory * Instance()
G4double GetBiasWeight() const
G4GLOB_DLL std::ostream G4cout
G4PhysicalVolumesPair Place(const G4Transform3D &transform3D, const G4String &name, G4LogicalVolume *LV, G4LogicalVolume *motherLV, G4bool isMany, G4int copyNo, G4bool surfCheck=false)
G4ReflectedVolumesMap fConstituentLVMap
const G4String & GetName() const
virtual G4bool IsMany() const =0
virtual ~G4ReflectionFactory()
G4ReflectedVolumesMap::const_iterator LogicalVolumesMapIterator
const G4ReflectedVolumesMap & GetReflectedVolumesMap() const
G4bool IsRootRegion() const
G4VPVDivisionFactory * GetPVDivisionFactory() const
virtual G4VPVParameterisation * GetParameterisation() const =0
G4RotationMatrix GetObjectRotationValue() const
std::map< G4LogicalVolume *, G4LogicalVolume *, std::less< G4LogicalVolume * > > G4ReflectedVolumesMap
const G4VisAttributes * GetVisAttributes() const
static const G4Scale3D fScale
void SetVolumesNameExtension(const G4String &nameExtension)
G4int GetNoDaughters() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4UserLimits * GetUserLimits() const
static const G4String fDefaultNameExtension
void SetVerboseLevel(G4int verboseLevel)
virtual G4VPhysicalVolume * CreatePVDivision(const G4String &pName, G4LogicalVolume *pLogical, G4LogicalVolume *pMother, const EAxis pAxis, const G4int nReplicas, const G4double width, const G4double offset)=0
G4double GetScalePrecision() const
G4LogicalVolume * GetLogicalVolume() const
G4int GetVerboseLevel() const
G4bool IsReflection(const G4Scale3D &scale) const
G4LogicalVolume * GetReflectedLV(G4LogicalVolume *lv) const
virtual G4int GetCopyNo() const =0
G4LogicalVolume * ReflectLV(G4LogicalVolume *LV, G4bool surfCheck=false)
std::pair< G4VPhysicalVolume *, G4VPhysicalVolume * > G4PhysicalVolumesPair
virtual void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const =0
static G4ThreadLocal G4ReflectionFactory * fInstance
void ReflectPVPlacement(G4VPhysicalVolume *PV, G4LogicalVolume *refLV, G4bool surfCheck=false)
G4FieldManager * GetFieldManager() const
G4ThreeVector GetObjectTranslation() const
const G4String & GetName() const
void ReflectDaughters(G4LogicalVolume *LV, G4LogicalVolume *refLV, G4bool surfCheck=false)
void ReflectPVDivision(G4VPhysicalVolume *PV, G4LogicalVolume *refLV)
G4VSensitiveDetector * GetSensitiveDetector() const
G4LogicalVolume * CreateReflectedLV(G4LogicalVolume *LV)
G4bool IsConstituent(G4LogicalVolume *lv) const
void SetVisAttributes(const G4VisAttributes *pVA)
static G4GeometryTolerance * GetInstance()
void ReflectPVReplica(G4VPhysicalVolume *PV, G4LogicalVolume *refLV)