ATLAS Offline Software
Loading...
Searching...
No Matches
AFP_Geometry.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef AFP_GEOMETRY_H
6#define AFP_GEOMETRY_H 1
7
10
11#include "CLHEP/Geometry/Point3D.h"
13
14#include <list>
15#include <map>
16#include <vector>
17#include <string>
18#include <string_view>
19
21{
22
23protected:
25
26 std::map<eAFPStation, std::map<int, HepGeom::Transform3D> > m_MapSIDTransToLocal;
27 std::map<eAFPStation, std::map<int, HepGeom::Transform3D> > m_MapSIDTransToGlobal;
28
29public:
31 AFP_Geometry(const AFP_CONFIGURATION* pCfgParams);
33
34public:
35 void getCfgParams(AFP_CONFIGURATION* pCfgParams) const { *pCfgParams=m_CfgParams; }
36 HepGeom::Transform3D getStationTransform(std::string_view pszStationName) const; //in world
37 HepGeom::Transform3D getStationElementTransform(std::string_view pszStationName, eStationElement eElement, const int nPlateID=-1) const; //in station
38
39public:
40 //SID detector
41 int getSIDPlatesCnt(const eAFPStation eStation) const{
42 std::map<eAFPStation, AFP_SIDCONFIGURATION> sidcfg(m_CfgParams.sidcfg.begin(),m_CfgParams.sidcfg.end());
43 return sidcfg[eStation].fLayerCount;
44 }
45 HepGeom::Transform3D getSIDTransform(const eSIDTransformType eType, std::string_view pszStationName, const int nPlateID) const; // in station
46 StatusCode getPointInSIDSensorLocalCS(const int nStationID, const int nPlateID, const HepGeom::Point3D<double>& GlobalPoint, HepGeom::Point3D<double>& LocalPoint) const;
47 StatusCode getPointInSIDSensorGlobalCS(const int nStationID, const int nPlateID, const HepGeom::Point3D<double>& LocalPoint, HepGeom::Point3D<double>& GlobalPoint) const;
48 eAFPStation parseStationName(std::string_view pszStationName) const;
49
50 //TOF detector
51 void setupLBarsDims(const eAFPStation eStation);
52 void getPixelLocalPosition(const eAFPStation eStation, const int nPixelID, double* pfX1Pos, double* pfX2Pos) const;
53 int getPixelRow(const int nPixelID) const { return (nPixelID-(nPixelID%10))/10; }
54 int getPixelColumn(const int nPixelID) const { return nPixelID%10; }
55
56};
57
58#ifndef __CINT__
59CLASS_DEF(AFP_Geometry, 160718034, 1)
60#endif
61
62#endif //AFP_GEOMETRY_H
eSIDTransformType
eAFPStation
eStationElement
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
HepGeom::Transform3D getStationElementTransform(std::string_view pszStationName, eStationElement eElement, const int nPlateID=-1) const
int getPixelColumn(const int nPixelID) const
void getPixelLocalPosition(const eAFPStation eStation, const int nPixelID, double *pfX1Pos, double *pfX2Pos) const
std::map< eAFPStation, std::map< int, HepGeom::Transform3D > > m_MapSIDTransToGlobal
std::map< eAFPStation, std::map< int, HepGeom::Transform3D > > m_MapSIDTransToLocal
void getCfgParams(AFP_CONFIGURATION *pCfgParams) const
void setupLBarsDims(const eAFPStation eStation)
HepGeom::Transform3D getSIDTransform(const eSIDTransformType eType, std::string_view pszStationName, const int nPlateID) const
AFP_CONFIGURATION m_CfgParams
StatusCode getPointInSIDSensorLocalCS(const int nStationID, const int nPlateID, const HepGeom::Point3D< double > &GlobalPoint, HepGeom::Point3D< double > &LocalPoint) const
eAFPStation parseStationName(std::string_view pszStationName) const
StatusCode getPointInSIDSensorGlobalCS(const int nStationID, const int nPlateID, const HepGeom::Point3D< double > &LocalPoint, HepGeom::Point3D< double > &GlobalPoint) const
int getPixelRow(const int nPixelID) const
HepGeom::Transform3D getStationTransform(std::string_view pszStationName) const
int getSIDPlatesCnt(const eAFPStation eStation) const