ATLAS Offline Software
AFP_Geometry.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 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"
12 #include "AthenaKernel/CLASS_DEF.h"
13 
14 #include <list>
15 #include <map>
16 #include <vector>
17 #include <string>
18 
20 {
21 
22 protected:
24 
25  std::map<eAFPStation, std::map<int, HepGeom::Transform3D> > m_MapSIDTransToLocal;
26  std::map<eAFPStation, std::map<int, HepGeom::Transform3D> > m_MapSIDTransToGlobal;
27 
28 public:
30  AFP_Geometry(const AFP_CONFIGURATION* pCfgParams);
31  ~AFP_Geometry();
32 
33 public:
34  void getCfgParams(AFP_CONFIGURATION* pCfgParams) const { *pCfgParams=m_CfgParams; }
35  HepGeom::Transform3D getStationTransform(const char* pszStationName) const; //in world
36  HepGeom::Transform3D getStationElementTransform(const char* pszStationName, eStationElement eElement, const int nPlateID=-1) const; //in station
37 
38 public:
39  //SID detector
40  int getSIDPlatesCnt(const eAFPStation eStation) const{
41  std::map<eAFPStation, AFP_SIDCONFIGURATION> sidcfg(m_CfgParams.sidcfg.begin(),m_CfgParams.sidcfg.end());
42  return sidcfg[eStation].fLayerCount;
43  }
44  HepGeom::Transform3D getSIDTransform(const eSIDTransformType eType, const char* pszStationName, const int nPlateID) const; // in station
45  StatusCode getPointInSIDSensorLocalCS(const int nStationID, const int nPlateID, const HepGeom::Point3D<double>& GlobalPoint, HepGeom::Point3D<double>& LocalPoint) const;
46  StatusCode getPointInSIDSensorGlobalCS(const int nStationID, const int nPlateID, const HepGeom::Point3D<double>& LocalPoint, HepGeom::Point3D<double>& GlobalPoint) const;
47  eAFPStation parseStationName(const char* pszStationName) const;
48 
49  //TOF detector
50  void setupLBarsDims(const eAFPStation eStation);
51  void getPixelLocalPosition(const eAFPStation eStation, const int nPixelID, double* pfX1Pos, double* pfX2Pos) const;
52  int getPixelRow(const int nPixelID) const { return (nPixelID-(nPixelID%10))/10; }
53  int getPixelColumn(const int nPixelID) const { return nPixelID%10; }
54 
55 };
56 
57 #ifndef __CINT__
58 CLASS_DEF(AFP_Geometry, 160718034, 1)
59 #endif
60 
61 #endif //AFP_GEOMETRY_H
AFP_Geometry::m_MapSIDTransToLocal
std::map< eAFPStation, std::map< int, HepGeom::Transform3D > > m_MapSIDTransToLocal
Definition: AFP_Geometry.h:25
AFP_CONFIGURATION::sidcfg
std::map< eAFPStation, AFP_SIDCONFIGURATION > sidcfg
Definition: AFP_ConfigParams.h:136
AFP_Geometry::getSIDPlatesCnt
int getSIDPlatesCnt(const eAFPStation eStation) const
Definition: AFP_Geometry.h:40
AFP_ConfigParams.h
AFP_constants.h
AFP_Geometry::getCfgParams
void getCfgParams(AFP_CONFIGURATION *pCfgParams) const
Definition: AFP_Geometry.h:34
AFP_Geometry::getPointInSIDSensorLocalCS
StatusCode getPointInSIDSensorLocalCS(const int nStationID, const int nPlateID, const HepGeom::Point3D< double > &GlobalPoint, HepGeom::Point3D< double > &LocalPoint) const
Definition: AFP_Geometry.cxx:227
AFP_Geometry::AFP_Geometry
AFP_Geometry()
Definition: AFP_Geometry.h:29
AFP_Geometry::getStationTransform
HepGeom::Transform3D getStationTransform(const char *pszStationName) const
Definition: AFP_Geometry.cxx:55
AFP_Geometry::getPixelRow
int getPixelRow(const int nPixelID) const
Definition: AFP_Geometry.h:52
AFP_Geometry::getSIDTransform
HepGeom::Transform3D getSIDTransform(const eSIDTransformType eType, const char *pszStationName, const int nPlateID) const
Definition: AFP_Geometry.cxx:136
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AFP_CONFIGURATION
Definition: AFP_ConfigParams.h:135
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
AFP_Geometry::getStationElementTransform
HepGeom::Transform3D getStationElementTransform(const char *pszStationName, eStationElement eElement, const int nPlateID=-1) const
Definition: AFP_Geometry.cxx:81
AFP_Geometry::parseStationName
eAFPStation parseStationName(const char *pszStationName) const
Definition: AFP_Geometry.cxx:214
AFP_Geometry::getPixelLocalPosition
void getPixelLocalPosition(const eAFPStation eStation, const int nPixelID, double *pfX1Pos, double *pfX2Pos) const
Definition: AFP_Geometry.cxx:264
eSIDTransformType
eSIDTransformType
Definition: AFP_ConfigParams.h:17
AFP_Geometry
Definition: AFP_Geometry.h:20
AFP_Geometry::setupLBarsDims
void setupLBarsDims(const eAFPStation eStation)
Definition: AFP_Geometry.cxx:276
eAFPStation
eAFPStation
Definition: AFP_ConfigParams.h:18
AFP_Geometry::getPixelColumn
int getPixelColumn(const int nPixelID) const
Definition: AFP_Geometry.h:53
AFP_Geometry::getPointInSIDSensorGlobalCS
StatusCode getPointInSIDSensorGlobalCS(const int nStationID, const int nPlateID, const HepGeom::Point3D< double > &LocalPoint, HepGeom::Point3D< double > &GlobalPoint) const
Definition: AFP_Geometry.cxx:245
AFP_Geometry::~AFP_Geometry
~AFP_Geometry()
Definition: AFP_Geometry.cxx:50
eStationElement
eStationElement
Definition: AFP_ConfigParams.h:16
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
AFP_Geometry::m_MapSIDTransToGlobal
std::map< eAFPStation, std::map< int, HepGeom::Transform3D > > m_MapSIDTransToGlobal
Definition: AFP_Geometry.h:26
AFP_Geometry::m_CfgParams
AFP_CONFIGURATION m_CfgParams
Definition: AFP_Geometry.h:23
CLASS_DEF.h
macros to associate a CLID to a type