Belle II Software  release-05-01-25
GeoVXDAssembly.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Andreas Moll, Zbynek Drasal, Christian Oswald, *
7  * Martin Ritter *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 #include <vxd/geometry/GeoVXDAssembly.h>
13 #include <G4ReflectionFactory.hh>
14 #include <G4LogicalVolume.hh>
15 
16 namespace Belle2 {
21  namespace VXD {
22 
23  void GeoVXDAssembly::place(G4LogicalVolume* mother, const G4Transform3D& transform)
24  {
25  G4ReflectionFactory& reflection = *G4ReflectionFactory::Instance();
26  int numberOfDaughters = mother->GetNoDaughters();
27  for (Placement& p : m_volumes) {
28  reflection.Place(transform * p.second, p.first->GetName(), p.first,
29  mother, false, ++numberOfDaughters, false);
30  }
31  }
32 
33  } //VXD namespace
35 } //Belle2 namespace
36 
37 
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::VXD::GeoVXDAssembly::place
void place(G4LogicalVolume *mother, const G4Transform3D &transform)
Place all the volumes already added to the assembly in the given mother.
Definition: GeoVXDAssembly.cc:32
Belle2::VXD::GeoVXDAssembly::Placement
std::pair< G4LogicalVolume *, G4Transform3D > Placement
Placement of a logical volume consists of the Volume and ins transformation.
Definition: GeoVXDAssembly.h:34
Belle2::VXD::GeoVXDAssembly::m_volumes
std::vector< Placement > m_volumes
Array of all volumes and their placements in the assembly.
Definition: GeoVXDAssembly.h:64