Belle II Software  release-08-01-10
GeoVXDAssembly.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #include <vxd/geometry/GeoVXDAssembly.h>
10 #include <G4ReflectionFactory.hh>
11 #include <G4LogicalVolume.hh>
12 
13 namespace Belle2 {
18  namespace VXD {
19 
20  void GeoVXDAssembly::place(G4LogicalVolume* mother, const G4Transform3D& transform)
21  {
22  G4ReflectionFactory& reflection = *G4ReflectionFactory::Instance();
23  int numberOfDaughters = mother->GetNoDaughters();
24  for (Placement& p : m_volumes) {
25  reflection.Place(transform * p.second, p.first->GetName(), p.first,
26  mother, false, ++numberOfDaughters, false);
27  }
28  }
29 
30  } //VXD namespace
32 } //Belle2 namespace
33 
34 
void place(G4LogicalVolume *mother, const G4Transform3D &transform)
Place all the volumes already added to the assembly in the given mother.
std::pair< G4LogicalVolume *, G4Transform3D > Placement
Placement of a logical volume consists of the Volume and ins transformation.
std::vector< Placement > m_volumes
Array of all volumes and their placements in the assembly.
Abstract base class for different kinds of events.