73 G4ThreeVector& translation,
74 G4RotationMatrix* pRotation,
75 int copyNo,
const G4String& userC)
77 G4RotationMatrix* toStore =
new G4RotationMatrix;
79 if( pRotation != 0 ) { *toStore = *pRotation; }
91 G4Transform3D& transformation,
92 int copyNo,
const G4String& userC)
97 G4Translate3D translation;
98 transformation.getDecomposition(scale, rotation, translation);
100 G4ThreeVector v = translation.getTranslation();
101 G4RotationMatrix*
r =
new G4RotationMatrix;
102 *
r = rotation.getRotation();
104 G4bool isReflection =
false;
105 if (scale(0,0)*scale(1,1)*scale(2,2) < 0.) { isReflection =
true; }
133 G4Transform3D& transformation )
139 G4Translate3D translation;
140 transformation.getDecomposition(scale, rotation, translation);
142 G4ThreeVector v = translation.getTranslation();
143 G4RotationMatrix*
r =
new G4RotationMatrix;
144 *
r = rotation.getRotation();
146 G4bool isReflection =
false;
147 if (scale(0,0)*scale(1,1)*scale(2,2) < 0.) { isReflection =
true; }
192 G4LogicalVolume* pMotherLV,
193 G4Transform3D& transformation,
198 unsigned int numberOfDaughters;
200 if( copyNumBase == 0 )
202 numberOfDaughters = pMotherLV->GetNoDaughters();
206 numberOfDaughters = copyNumBase;
213 std::vector<Geo2G4AssemblyTriplet> triplets = pAssembly->
m_triplets;
214 for(
unsigned int i = 0; i < triplets.size(); i++ )
216 G4Transform3D Ta( *(triplets[i].GetRotation()),
217 triplets[i].GetTranslation() );
218 if ( triplets[i].IsReflection() ) { Ta = Ta * G4ReflectZ3D(); }
220 G4Transform3D Tfinal = transformation * Ta;
221 if ( triplets[i].GetVolume() )
235 std::stringstream pvName;
241 << triplets[i].GetVolume()->GetName().c_str()
250 int ccn=numberOfDaughters + i;
256 G4PhysicalVolumesPair pvPlaced
257 = G4ReflectionFactory::Instance()->Place( Tfinal,
258 pvName.str().c_str(),
259 triplets[i].GetVolume(),
269 if ( pvPlaced.second ) {
m_PVStore.push_back( pvPlaced.second ); }
271 else if ( triplets[i].GetAssembly() )
275 if(ITkScheme) triplets[i].GetAssembly()->MakeImprint( triplets[i].GetAssembly(), pMotherLV,
276 Tfinal, i*100+copyNumBase, ITkScheme, surfCheck );
277 else MakeImprint( triplets[i].GetAssembly(), pMotherLV,
278 Tfinal, i*100+copyNumBase, ITkScheme, surfCheck );
282 G4Exception(
"Geo2G4AssemblyVolume::MakeImprint(..)",
283 "NotApplicable", FatalException,
284 "Triplet has no volume and no assembly");
290 G4ThreeVector& translationInMother,
291 const G4RotationMatrix* pRotationInMother,
304 if( pRotationInMother == 0 )
308 pRotationInMother = &G4RotationMatrix::IDENTITY;
311 G4Transform3D transform( *pRotationInMother,
312 translationInMother );
313 MakeImprint(
this, pMotherLV, transform, copyNumBase, ITkScheme, surfCheck);
317 G4Transform3D& transformation,
328 MakeImprint(
this, pMotherLV, transformation, copyNumBase, ITkScheme, surfCheck);
void MakeImprint(G4LogicalVolume *pMotherLV, G4ThreeVector &translationInMother, const G4RotationMatrix *pRotationInMother, G4int copyNumBase=0, G4bool ITkScheme=false, G4bool surfCheck=false)