|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef JIVEXML_MUONGEOMETRYWRITER
6 #define JIVEXML_MUONGEOMETRYWRITER
10 #include "CLHEP/Geometry/Point3D.h"
12 #include "GeoModelKernel/GeoVolumeCursor.h"
13 #include "GeoModelKernel/GeoSimplePolygonBrep.h"
19 class MuonDetectorManager;
73 const std::string& stationTech,
77 double wi,
double wo,
int eta,
78 const std::string& phiString,
79 double dphi,
double shift,
double alpha)
const ;
96 double getDeltaPhi(
const HepGeom::Point3D<double> &
pos,
int maxPhi)
const ;
104 double getShift(
const HepGeom::Point3D<double> &
pos,
double dphi)
const ;
135 void readNSWMMPars(
const GeoVolumeCursor *
pv,
int maxPhi, std::string& chamberName, HepGeom::Point3D<double>& pos_rot,
136 double& zi,
double& zo,
double& ri,
double& ro,
double& wi,
double& wo,
double& dphi,
double& shift,
int&
phiIndex)
const ;
145 std::string& chamberName, HepGeom::Point3D<double>& pos_rot,
const GeoSimplePolygonBrep*& theBrep,
146 int& nvtx,
double& dz,
double& dphi,
double& shift,
int&
phiIndex)
const ;
155 void readBrepAsATrd(
const GeoSimplePolygonBrep* theBrep,
double rho,
const int* vtx,
double& ri,
double& ro,
double& wi,
double& wo)
const ;
void processNSW(std::ofstream &out)
process the geometry of New Small Wheel
Ensure that the Athena extensions are properly loaded.
static const double m_smallAngle
Maximum deviation from the reference value before the station is considered different.
void readBrepAsATrd(const GeoSimplePolygonBrep *theBrep, double rho, const int *vtx, double &ri, double &ro, double &wi, double &wo) const
Takes four vetecies of a GeoSimplePolygonBrep to form a trapezoid shape and reads the parameters of t...
int getPhiIndex(double phi, int maxPhi) const
Returns phi index of the sector.
MuonGeometryWriter(const std::string &t, const std::string &n, const IInterface *p)
Constructor.
void readNSWSTGCPars(const GeoVolumeCursor *pv, int maxPhi, std::string &chamberName, HepGeom::Point3D< double > &pos_rot, const GeoSimplePolygonBrep *&theBrep, int &nvtx, double &dz, double &dphi, double &shift, int &phiIndex) const
Reads the geometry parameters of a NSW sTGC chamber.
HepGeom::Point3D< double > getPosition(const MuonGM::MuonStation *station, int maxPhi) const
Returns the global position of the station, rotated to sector 1.
HepGeom::Point3D< double > getPositionNSW(Amg::Vector3D pos, int maxPhi) const
Returns the global position of the NSW station, rotated to sector 1.
::StatusCode StatusCode
StatusCode definition for legacy code.
Eigen::Affine3d Transform3D
Writes the GeoModel muon geometry to an XML file for use with Atlantis.
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
virtual StatusCode writeGeometry()
Writes the geometry of the ATLAS muon spectrometer to an XML file for use with Atlantis.
Eigen::Matrix< double, 3, 1 > Vector3D
static const double m_smallDistance
void writeFooter(std::ofstream &out) const
Writes the footer of the XML file to a stream.
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
bool equalLength(double a, double b) const
Compares two coordinates or lenghts.
void readNSWMMPars(const GeoVolumeCursor *pv, int maxPhi, std::string &chamberName, HepGeom::Point3D< double > &pos_rot, double &zi, double &zo, double &ri, double &ro, double &wi, double &wo, double &dphi, double &shift, int &phiIndex) const
Reads the geometry parameters of a NSW Micromegas chamber.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
double getShift(const HepGeom::Point3D< double > &pos, double dphi) const
Returns the shift of the station with respect to the center of the sector.
void writeATrd(std::ofstream &out, const std::string &stationTech, const std::string &stationName, double zi, double zo, double ri, double ro, double wi, double wo, int eta, const std::string &phiString, double dphi, double shift, double alpha) const
Writes a trapezoid station in XML to a stream.
const MuonGM::MuonDetectorManager * m_muon_manager
Pointer to the muon detector manager (GeoModel)
double getAlpha(const HepGeom::Transform3D &trans) const
Returns the forward tilt angle of a station (for CSCs).
void writeHeader(std::ofstream &out) const
Writes the header of the XML file to a stream.
bool equalAngle(double a, double b) const
Compares two angles.
double getDeltaPhi(const HepGeom::Point3D< double > &pos, int maxPhi) const
Returns the rotation of the station with respect to the center of the sector.
void writeStations(std::ofstream &out) const
Retrieves all stations from GeoModel and writes the corresponding XML elements to a stream.