53 std::ostringstream message;
54 message <<
"The assembly has NOT been registered !" <<
G4endl
56 <<
" already existing in store !" <<
G4endl;
57 G4Exception(
"G4AssemblyVolume::G4AssemblyVolume()",
"GeomVol1001",
79 std::ostringstream message;
80 message <<
"The assembly has NOT been registered !" <<
G4endl
82 <<
" already existing in store !" <<
G4endl;
83 G4Exception(
"G4Assembly::G4Assembly()",
"GeomVol1001",
99 for(
unsigned int i = 0; i < howmany; ++i )
102 if( pRotToClean != 0 )
134 if( pRotation !=
nullptr ) { *toStore = *pRotation; }
155 G4bool isReflection =
false;
156 if (scale(0,0)*scale(1,1)*scale(2,2) < 0.) { isReflection =
true; }
171 if( pRotation !=
nullptr ) { *toStore = *pRotation; }
194 G4bool isReflection =
false;
195 if (scale(0,0)*scale(1,1)*scale(2,2) < 0.) { isReflection =
true; }
245 unsigned int numberOfDaughters;
247 if( copyNumBase == 0 )
253 numberOfDaughters = copyNumBase;
267 for(
unsigned int i = 0; i < triplets.size(); ++i )
270 triplets[i].GetTranslation() );
271 if ( triplets[i].IsReflection() ) { Ta = Ta *
G4ReflectZ3D(); }
275 if ( triplets[i].GetVolume() )
287 std::stringstream pvName;
293 << triplets[i].GetVolume()->GetName().c_str()
304 pvName.str().c_str(),
305 triplets[i].GetVolume(),
308 numberOfDaughters + i,
313 fPVStore.push_back( pvPlaced.first );
314 if ( pvPlaced.second ) {
fPVStore.push_back( pvPlaced.second ); }
320 else if ( triplets[i].GetAssembly() )
325 Tfinal, i*100+copyNumBase, surfCheck );
331 "Triplet has no volume and no assembly");
350 if( pRotationInMother ==
nullptr )
359 translationInMother );
374 MakeImprint(
this, pMotherLV, transformation, copyNumBase, surfCheck);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::pair< G4VPhysicalVolume *, G4VPhysicalVolume * > G4PhysicalVolumesPair
CLHEP::HepRotation G4RotationMatrix
static DLL_API const HepRotation IDENTITY
static G4AssemblyStore * GetInstance()
static void DeRegister(G4AssemblyVolume *pAssembly)
G4AssemblyVolume * GetAssembly(unsigned int id, G4bool verbose=true) const
static void Register(G4AssemblyVolume *pAssembly)
std::map< unsigned int, G4Transform3D > fImprintsTransf
unsigned int GetImprintsCount() const
void MakeImprint(G4LogicalVolume *pMotherLV, G4ThreeVector &translationInMother, G4RotationMatrix *pRotationInMother, G4int copyNumBase=0, G4bool surfCheck=false)
std::vector< G4VPhysicalVolume * > fPVStore
void InstanceCountMinus()
void SetAssemblyID(unsigned int value)
void AddPlacedAssembly(G4AssemblyVolume *pAssembly, G4Transform3D &transformation)
static G4ThreadLocal unsigned int fsInstanceCounter
unsigned int GetAssemblyID() const
void SetInstanceCount(unsigned int value)
void AddPlacedVolume(G4LogicalVolume *pPlacedVolume, G4ThreeVector &translation, G4RotationMatrix *rotation)
void SetImprintsCount(unsigned int value)
std::vector< G4AssemblyTriplet > fTriplets
unsigned int GetInstanceCount() const
size_t GetNoDaughters() const
static G4ReflectionFactory * Instance()
G4PhysicalVolumesPair Place(const G4Transform3D &transform3D, const G4String &name, G4LogicalVolume *LV, G4LogicalVolume *motherLV, G4bool isMany, G4int copyNo, G4bool surfCheck=false)