ATLAS Offline Software
Loading...
Searching...
No Matches
ForwardRegionGeoModelFactory.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ForwardRegionGeoModelFactory_h
6#define ForwardRegionGeoModelFactory_h 1
7#include "GeoModelKernel/GeoVDetectorFactory.h"
8
10#include "GaudiKernel/ToolHandle.h"
11#include "ForwardRegionGeoModelManager.h" //need for covariant return type
12
13#include <string>
14#include <vector>
15#include <map>
16
17class StoreGateSvc;
18
48
49class ForwardRegionGeoModelFactory : public GeoVDetectorFactory {
50
51 public:
52
53 // Constructor:
55
56 // Destructor:
58
59 // Creation of geometry:
60 virtual void create(GeoPhysVol *world);
61
62 // Access to the results:
64
65 private:
66
68
69 // map of defined materials
70 std::map<std::string,const GeoMaterial*> m_MapMaterials;
71
72 // property configuration
75
76 ToolHandle<IForwardRegionProperties> m_properties; // properties of mag. field tool
77
78 // initialization of the material map
79 void DefineMaterials();
80
81 // construct elements for given beam
82 void constructElements(GeoPhysVol *fwrPhys, std::vector<std::vector<std::string> > loadedDataFile, int beam);
83
84 // Elements
85 GeoPhysVol* insertMagnetEnvelope(const std::string& name, double x, double y, double z, double rotationAngle, double diameter, double halfL, double dL, GeoPhysVol* fwrPhys);
86 void insertCircularElement(const std::string& name, double x, double y, double z, double rotationAngle, double xAperture, double yAperture, double halfL, double dL, double tubeThickness, GeoPhysVol* fwrPhys);
87 void insertEllipticalElement(const std::string& name, double x, double y, double z, double rotationAngle, double xAperture, double yAperture, double halfL, double dL, double tubeThickness, GeoPhysVol* fwrPhys);
88 void insertXRecticircularElement(const std::string& name, double x, double y, double z, double rotationAngle, double xAperture, double yAperture, double halfL, double dL, double tubeThickness, GeoPhysVol* fwrPhys);
89 void insertYRecticircularElement(const std::string& name, double x, double y, double z, double rotationAngle, double xAperture, double yAperture, double halfL, double dL, double tubeThickness, GeoPhysVol* fwrPhys);
90 void insertTrousersElement(const std::string& name, double x, double y, double z, double rotationAngle, GeoPhysVol* fwrPhys);
91 void insertTCLElement(const std::string& name, double x, double y, double z, GeoPhysVol* fwrPhys, double TCLJawDistO, double TCLJawDistI, bool tungstenInsteadOfCopper = false);
92
93 // Load data from file into 2D array of strings
94 std::vector<std::vector<std::string> > loadDataFile(const std::string& fileName, int cols);
95
96 // convert number to string
97 template <class T>
98 std::string num2str(T);
99
100 // signum
101 template <typename T> int sgn(T val);
102
103 // Illegal operations:
106
107 // The manager:
109};
110
111// Class ForwardRegionGeoModelFactory
112#endif
113
114
struct _FWD_CONFIGURATION * PFWD_CONFIGURATION
struct _FWD_CONFIGURATION FWD_CONFIGURATION
struct _FWDMg_CONFIGURATION FWDMg_CONFIGURATION
#define y
#define x
#define z
void insertTrousersElement(const std::string &name, double x, double y, double z, double rotationAngle, GeoPhysVol *fwrPhys)
ToolHandle< IForwardRegionProperties > m_properties
GeoPhysVol * insertMagnetEnvelope(const std::string &name, double x, double y, double z, double rotationAngle, double diameter, double halfL, double dL, GeoPhysVol *fwrPhys)
void insertEllipticalElement(const std::string &name, double x, double y, double z, double rotationAngle, double xAperture, double yAperture, double halfL, double dL, double tubeThickness, GeoPhysVol *fwrPhys)
const ForwardRegionGeoModelFactory & operator=(const ForwardRegionGeoModelFactory &right)
void insertYRecticircularElement(const std::string &name, double x, double y, double z, double rotationAngle, double xAperture, double yAperture, double halfL, double dL, double tubeThickness, GeoPhysVol *fwrPhys)
void constructElements(GeoPhysVol *fwrPhys, std::vector< std::vector< std::string > > loadedDataFile, int beam)
void insertTCLElement(const std::string &name, double x, double y, double z, GeoPhysVol *fwrPhys, double TCLJawDistO, double TCLJawDistI, bool tungstenInsteadOfCopper=false)
ForwardRegionGeoModelFactory(const ForwardRegionGeoModelFactory &right)
void insertCircularElement(const std::string &name, double x, double y, double z, double rotationAngle, double xAperture, double yAperture, double halfL, double dL, double tubeThickness, GeoPhysVol *fwrPhys)
std::map< std::string, const GeoMaterial * > m_MapMaterials
virtual void create(GeoPhysVol *world)
virtual const ForwardRegionGeoModelManager * getDetectorManager() const
std::vector< std::vector< std::string > > loadDataFile(const std::string &fileName, int cols)
void insertXRecticircularElement(const std::string &name, double x, double y, double z, double rotationAngle, double xAperture, double yAperture, double halfL, double dL, double tubeThickness, GeoPhysVol *fwrPhys)
ForwardRegionGeoModelManager * m_detectorManager
ForwardRegionGeoModelFactory(StoreGateSvc *pDetStore, const PFWD_CONFIGURATION pConfig)
The Athena Transient Store API.