VGM Version 5.3
Loading...
Searching...
No Matches
Placement.h
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The RootGM package of the Virtual Geometry Model
5// Copyright (C) 2007, Ivana Hrivnacova
6// All rights reserved.
7//
8// For the licensing terms see vgm/LICENSE.
9// Contact: ivana@ipno.in2p3.fr
10// -----------------------------------------------------------------------
11
13//
19
20#ifndef ROOT_GM_PLACEMENT_H
21#define ROOT_GM_PLACEMENT_H
22
24
26
27#include <string>
28#include <vector>
29
30class TGeoPatternFinder;
31class TGeoMatrix;
32class TGeoNode;
33
34namespace VGM {
35class IVolume;
36}
37
38namespace RootGM {
39
41{
42 public:
43 Placement(const std::string& name, int copyNo, VGM::IVolume* volume,
44 VGM::IVolume* motherVolume, TGeoMatrix* transformation);
45 Placement(const std::string& name, VGM::IVolume* volume,
46 VGM::IVolume* motherVolume, VGM::Axis axis, int nofItems, double width,
47 double offset);
48 Placement(VGM::IVolume* volume, VGM::IVolume* motherVolume, TGeoNode* node);
49 Placement(VGM::IVolume* volume, VGM::IVolume* motherVolume, TGeoNode* node,
50 std::vector<const TGeoNode*> assemblyNodes);
51 virtual ~Placement();
52
53 // static methods
54 static void SetIncludeAssembliesInNames(bool includeAssembliesInNames);
55 static bool GetIncludeAssembliesInNames();
56
57 static void SetNameSeparator(char nameSeparator);
58 static void SetNamePrefix(char namePrefix);
59 static char GetNameSeparator();
60 static char GetNamePrefix();
61
62 // methods
63 virtual VGM::PlacementType Type() const;
64 virtual std::string Name() const;
65 virtual int CopyNo() const;
66 virtual VGM::Transform Transformation() const;
67
68 virtual bool MultiplePlacementData(VGM::Axis& axis, int& nofItems,
69 double& width, double& offset, double& halfGap) const;
70
71 virtual bool ParameterisedPlacementData(
72 std::vector<VGM::Transform>& transforms,
73 std::vector<VGM::IVolume*>& volumes) const;
74
75 protected:
76 Placement();
77 Placement(const Placement& rhs);
78
79 private:
80 // methods
81 TGeoMatrix* ComposeMatrix(VGM::IVolume* volume, VGM::IVolume* motherVolume,
82 TGeoMatrix* transformation) const;
83
84 // static data members
85 static bool fgIncludeAssembliesInNames;
86 static char fgNameSeparator;
87 static char fgNamePrefix;
88
89 // data members
90 std::string fName;
91 TGeoNode* fGeoNode;
92 TGeoMatrix* fVGMMatrix;
93 std::vector<const TGeoNode*> fAssemblyNodes;
94};
95
96} // namespace RootGM
97
98#endif // ROOT_GM_PLACEMENT_H
The abstract base class to positions of volumes.
Definition VPlacement.h:32
VGM implementation for Root positions of volumes.
Definition Placement.h:41
virtual ~Placement()
static bool GetIncludeAssembliesInNames()
Definition Placement.cxx:57
static void SetNamePrefix(char namePrefix)
Definition Placement.cxx:74
virtual VGM::Transform Transformation() const
Return the 3D transformation (if simple placement)
static void SetNameSeparator(char nameSeparator)
Definition Placement.cxx:66
static char GetNamePrefix()
Definition Placement.cxx:90
virtual VGM::PlacementType Type() const
Return the type of this placement.
static void SetIncludeAssembliesInNames(bool includeAssembliesInNames)
Definition Placement.cxx:47
virtual std::string Name() const
Return the name of this placement.
static char GetNameSeparator()
Definition Placement.cxx:82
virtual bool ParameterisedPlacementData(std::vector< VGM::Transform > &transforms, std::vector< VGM::IVolume * > &volumes) const
Fill the parameterised placement data if relevant and return true; return false if not parameterised ...
virtual int CopyNo() const
Return the copy number of this placement.
virtual bool MultiplePlacementData(VGM::Axis &axis, int &nofItems, double &width, double &offset, double &halfGap) const
Fill the multiple placement data if relevant and return true; return false if not multiple placement.
VGM Axis enumeration.
The VGM interface to volumes.
Definition IVolume.h:32
VGM implementation for Root.
Definition axis.h:28
VGM interfaces.
Definition VMedium.h:28
std::vector< double > Transform
Definition Transform.h:40
PlacementType
Definition IPlacement.h:32