ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_ComponentFactory.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 SCT_GEOMODEL_SCT_COMPONENTFACTORY_H
6#define SCT_GEOMODEL_SCT_COMPONENTFACTORY_H
7
8#include "SCT_Identifier.h"
9#include <string>
10#include <map>
11#include <memory>
12
13namespace InDetDD{class SCT_DetectorManager;}
16
17class GeoLogVol;
18class GeoVPhysVol;
19class GeoFullPhysVol;
20class GeoAlignableTransform;
21
22namespace GeoModelIO {
23 class ReadGeoModel;
24}
25
27{
28
29public:
30 SCT_ComponentFactory(const std::string & name,
31 InDetDD::SCT_DetectorManager* detectorManager,
32 SCT_GeometryManager* geometryManager,
33 SCT_MaterialManager* materials);
34
35 const std::string & getName() const {return m_name;}
36
37 // utility function to covert int to string
38 std::string intToString(int i) const;
39
40protected:
44
45 double epsilon() const;
46 virtual ~SCT_ComponentFactory();
47
48private:
49 std::string m_name;
50 static const double s_epsilon;
51
52};
53
54
56{
57
58public:
59 SCT_SharedComponentFactory(const std::string & name,
60 InDetDD::SCT_DetectorManager* detectorManager,
61 SCT_GeometryManager* geometryManager,
62 SCT_MaterialManager* materials=nullptr) :
63 SCT_ComponentFactory(name, detectorManager, geometryManager, materials),
64 m_physVolume(nullptr)
65 {};
66
67 GeoVPhysVol * getVolume() {return m_physVolume;}
68
69protected:
70 GeoVPhysVol * m_physVolume;
71 virtual GeoVPhysVol * build() = 0;
72
73};
74
76{
77
78public:
79 SCT_UniqueComponentFactory(const std::string & name,
80 InDetDD::SCT_DetectorManager* detectorManager,
81 SCT_GeometryManager* geometryManager,
82 SCT_MaterialManager* materials=nullptr,
83 GeoModelIO::ReadGeoModel* sqliteReader=nullptr,
84 std::shared_ptr<std::map<std::string, GeoFullPhysVol*>> mapFPV=nullptr,
85 std::shared_ptr<std::map<std::string, GeoAlignableTransform*>> mapAX=nullptr);
86
87 virtual GeoVPhysVol * build(SCT_Identifier id) = 0;
88
89protected:
90 const GeoLogVol * m_logVolume;
91 GeoModelIO::ReadGeoModel* m_sqliteReader;
92
93 virtual const GeoLogVol * preBuild() = 0;
94
95 std::shared_ptr<std::map<std::string, GeoFullPhysVol*>> m_mapFPV;
96 std::shared_ptr<std::map<std::string, GeoAlignableTransform*>> m_mapAX;
97
98};
99
100#endif // SCT_GEOMODEL_SCT_COMPONENTFACTORY_H
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated SCT in...
const std::string & getName() const
SCT_ComponentFactory(const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials)
static const double s_epsilon
std::string intToString(int i) const
InDetDD::SCT_DetectorManager * m_detectorManager
SCT_GeometryManager * m_geometryManager
SCT_MaterialManager * m_materials
virtual GeoVPhysVol * build()=0
SCT_SharedComponentFactory(const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials=nullptr)
SCT_UniqueComponentFactory(const std::string &name, InDetDD::SCT_DetectorManager *detectorManager, SCT_GeometryManager *geometryManager, SCT_MaterialManager *materials=nullptr, GeoModelIO::ReadGeoModel *sqliteReader=nullptr, std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > mapFPV=nullptr, std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > mapAX=nullptr)
std::shared_ptr< std::map< std::string, GeoFullPhysVol * > > m_mapFPV
virtual const GeoLogVol * preBuild()=0
std::shared_ptr< std::map< std::string, GeoAlignableTransform * > > m_mapAX
GeoModelIO::ReadGeoModel * m_sqliteReader
virtual GeoVPhysVol * build(SCT_Identifier id)=0
Message Stream Member.