GeoModel - GeoModelCore
GeoSerialTransformer.h
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GEOMODELKERNEL_GEOSERIALTRANSFORMER_H
6 #define GEOMODELKERNEL_GEOSERIALTRANSFORMER_H
7 
15 #include "GeoModelKernel/GeoGraphNode.h"
16 #include "GeoModelKernel/GeoVPhysVol.h"
17 #include "GeoModelKernel/GeoXF.h"
18 
20 {
21  public:
22  GeoSerialTransformer (const GeoVPhysVol *volume, const GeoXF::Function *func, unsigned int copies);
23 
24  // Executes a GeoNodeAction.
25  virtual void exec (GeoNodeAction *action) const;
26 
27  // Returns the transformation field itself.
28  const GeoXF::Function * getFunction () const;
29 
30  // Returns the volume:
31  PVConstLink getVolume () const
32  {
33  return m_physVol;
34  }
35 
36  // Returns the number of copies:
37  unsigned int getNCopies () const
38  {
39  return m_nCopies;
40  }
41 
42  // Returns the transformation to the ith copy:
43  GeoTrf::Transform3D getTransform (int i) const
44  {
45  return (*m_function) (i);
46  }
47 
48  protected:
49  virtual ~GeoSerialTransformer();
50 
51  private:
53  GeoSerialTransformer & operator=(const GeoSerialTransformer &right);
54 
55  // Number of copies of a physical volume to generate.
56  unsigned int m_nCopies;
57 
58  // Recipe for the transformation; specifically, a
59  // Transform-valued m_function of a single variable.
60  const GeoXF::Function *m_function;
61 
62  // The physical volume to be multiply placed.
63  const GeoVPhysVol *m_physVol;
64 };
65 
66 #endif
This class takes a physical volume and places it according to a transformation field, N times.
This type of action sees the geometry graph in full detail, including each transformation and propert...
Definition: GeoNodeAction.h:30
Represents Nodes that can be assembled together to make a graph. Subclasses (for now): ...
Definition: GeoGraphNode.h:28