6 #include "G4PVPlacement.hh" 
    7 #include "G4RotationMatrix.hh" 
    8 #include "G4AffineTransform.hh" 
    9 #include "G4LogicalVolume.hh" 
   10 #include "G4VPhysicalVolume.hh" 
   11 #include "G4ReflectionFactory.hh" 
   34     for( 
unsigned int i = 0; 
i < howmany; 
i++ )
 
   36       G4RotationMatrix* pRotToClean = 
m_triplets[
i].GetRotation();
 
   37       if( pRotToClean != 0 )
 
   48     for( 
unsigned int j = 0; j < howmany; j++ )
 
   50       G4RotationMatrix* pRotToClean = 
m_PVStore[j]->GetRotation();
 
   51       if( pRotToClean != 0 )
 
   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;
 
  104   G4bool isReflection = 
false;
 
  118                                           G4ThreeVector&    translation,
 
  119                                           G4RotationMatrix* pRotation )
 
  121   G4RotationMatrix*  toStore  = 
new G4RotationMatrix;
 
  123   if( pRotation != 0 )  { *toStore = *pRotation; }
 
  133                                           G4Transform3D&    transformation )
 
  139   G4Translate3D translation;
 
  140   transformation.getDecomposition(
scale, 
rotation, translation);
 
  142   G4ThreeVector      
v = translation.getTranslation();
 
  143   G4RotationMatrix*  
r = 
new G4RotationMatrix;
 
  146   G4bool isReflection = 
false;
 
  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 ); 
 
  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 );
 
  317                                     G4Transform3D&    transformation,
 
  328   MakeImprint(
this, pMotherLV, transformation, copyNumBase, ITkScheme, surfCheck);