42G4ThreadLocal unsigned int G4AssemblyVolume::fsInstanceCounter = 0;
53 if (aStore->
GetAssembly(fAssemblyID,
false) !=
nullptr)
55 std::ostringstream message;
56 message <<
"The assembly has NOT been registered !" <<
G4endl
57 <<
" Assembly " << fAssemblyID
58 <<
" already existing in store !" <<
G4endl;
59 G4Exception(
"G4AssemblyVolume::G4AssemblyVolume()",
"GeomVol1001",
80 if (aStore->
GetAssembly(fAssemblyID,
false) !=
nullptr)
82 std::ostringstream message;
83 message <<
"The assembly has NOT been registered !" <<
G4endl
84 <<
" Assembly " << fAssemblyID
85 <<
" already existing in store !" <<
G4endl;
86 G4Exception(
"G4Assembly::G4Assembly()",
"GeomVol1001",
100 std::size_t howmany = fTriplets.size();
103 for( std::size_t i = 0; i < howmany; ++i )
136 if( pRotation !=
nullptr ) { *toStore = *pRotation; }
139 fTriplets.push_back( toAdd );
158 G4bool isReflection =
false;
159 if (scale(0,0)*scale(1,1)*scale(2,2) < 0.) { isReflection =
true; }
162 fTriplets.push_back( toAdd );
175 if( pRotation !=
nullptr ) { *toStore = *pRotation; }
178 fTriplets.push_back( toAdd );
199 G4bool isReflection =
false;
200 if (scale(0,0)*scale(1,1)*scale(2,2) < 0.) { isReflection =
true; }
203 fTriplets.push_back( toAdd );
251 std::size_t numberOfDaughters;
253 if( copyNumBase == 0 )
259 numberOfDaughters = copyNumBase;
268 auto triplets = pAssembly->fTriplets;
273 for( std::size_t i = 0; i < triplets.size(); ++i )
276 triplets[i].GetTranslation() );
277 if ( triplets[i].IsReflection() ) { Ta = Ta *
G4ReflectZ3D(); }
281 if ( triplets[i].GetVolume() !=
nullptr )
293 std::stringstream pvName;
299 << triplets[i].GetVolume()->GetName().c_str()
310 pvName.str().c_str(),
311 triplets[i].GetVolume(),
314 G4int(numberOfDaughters+i),
319 fPVStore.push_back( pvPlaced.first );
320 if ( pvPlaced.second !=
nullptr ) { fPVStore.push_back( pvPlaced.second ); }
326 else if ( triplets[i].GetAssembly() !=
nullptr )
331 Tfinal, (
G4int)i*100+copyNumBase, surfCheck );
337 "Triplet has no volume and no assembly");
357 if( pRotationInMother ==
nullptr )
366 translationInMother );
367 MakeImprint(
this, pMotherLV, transform, copyNumBase, surfCheck);
382 MakeImprint(
this, pMotherLV, transformation, copyNumBase, surfCheck);
388 return G4AssemblyVolume::fsInstanceCounter;
394 G4AssemblyVolume::fsInstanceCounter = value;
400 G4AssemblyVolume::fsInstanceCounter++;
406 G4AssemblyVolume::fsInstanceCounter--;
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)
unsigned int GetImprintsCount() const
void MakeImprint(G4LogicalVolume *pMotherLV, G4ThreeVector &translationInMother, G4RotationMatrix *pRotationInMother, G4int copyNumBase=0, G4bool surfCheck=false)
void InstanceCountMinus()
void SetAssemblyID(unsigned int value)
void AddPlacedAssembly(G4AssemblyVolume *pAssembly, G4Transform3D &transformation)
unsigned int GetAssemblyID() const
void SetInstanceCount(unsigned int value)
void AddPlacedVolume(G4LogicalVolume *pPlacedVolume, G4ThreeVector &translation, G4RotationMatrix *rotation)
void SetImprintsCount(unsigned int value)
unsigned int GetInstanceCount() const
std::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)