![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <ALFA_GeometryReader.h>
|
| ALFA_GeometryReader () |
|
| ~ALFA_GeometryReader () |
|
bool | Initialize (const PGEOMETRYCONFIGURATION pConfig, eFiberCoordSystem eFCoordSystem) |
|
bool | ReadFiberGeometry (const PGEOMETRYCONFIGURATION pConfig) |
|
int | GetRPotCount () const |
|
void | PrintFiberGeometry (std::ostream &OutStream) |
|
void | PrintFiberGeometry (const char *szOutFilename) |
|
void | GetListOfRPotIDs (std::map< eRPotName, std::string > *pMapRPotName) |
|
void | GetListOfExistingRPotIDs (std::list< eRPotName > *pListRPotName) |
|
bool | GetUFiberParams (PFIBERPARAMS pFiberParams, const eRPotName eRPName, const int nPlateID, const int nFiberID) |
|
bool | GetVFiberParams (PFIBERPARAMS pFiberParams, const eRPotName eRPName, const int nPlateID, const int nFiberID) |
|
bool | StoreReconstructionGeometry (const eRPotName eRPName, const eFiberType eFType, const char *szDataDestination) |
|
bool | GetPlateParams (PPLATEPARAMS pPlateParams, const eRPotName eRPName, const int nPlateID) |
|
bool | GetRPPosParams (PRPPOSPARAMS pRPosParams, const eRPotName eRPName) |
|
bool | GetASPosParams (PASPOSPARAMS pRPosParams, const eAStationName eASName) |
|
const char * | GetRPotLabel (const eRPotName eRPName) |
|
const char * | GetAStationLabel (const eAStationName eASName) |
|
eGeoSourceType | GetRPGeometryType (const eRPotName eRPName, eFiberType eFType) |
|
bool | GetMDFiberParams (PFIBERPARAMS pFiberParams, const eFiberType eFType, const eRPotName eRPName, const int nPlateID, const int nFiberID) |
|
bool | GetODFiberParams (PFIBERPARAMS pFiberParams, const eFiberType eFType, const eRPotName eRPName, const int nPlateID, const int nFiberID) |
|
bool | SaveRPGeometryParams (const eRPotName eRPName, const char *szDataDestination) |
|
HepGeom::Point3D< double > | GetDetPointInAtlas (eRPotName eRPName, const HepGeom::Point3D< double > &PointInDetCS) |
|
HepGeom::Point3D< double > | GetDetPointInRPot (eRPotName eRPName, const HepGeom::Point3D< double > &PointInDetCS) |
|
HepGeom::Transform3D | GetTransformMatrix (const eRPotName eRPName, const eTransformElement eMatrixType) |
|
double | GetRPotZPosInAtlas (const eRPotName eRPName) |
|
double | GetUFiberCentreXPos (const eRPotName eRPName, const int nPlateID, const int nFiberID) |
|
double | GetVFiberCentreXPos (const eRPotName eRPName, const int nPlateID, const int nFiberID) |
|
double | GetUFiberAngle (const eRPotName eRPName, const int nPlateID, const int nFiberID) |
|
double | GetVFiberAngle (const eRPotName eRPName, const int nPlateID, const int nFiberID) |
|
double | GetODFiberCentreYPos (const eRPotName eRPName, const eFiberType eFType, const int nPlateID, const int nFiberID) |
|
double | GetODFiberAngle (const eRPotName eRPName, const eFiberType eFType, const int nPlateID, const int nFiberID) |
|
void | SetUFiberPositionToMainReference (const eRPotName eRPName, const int nPlateID, const int nFiberID, const HepGeom::Point3D< float > &TransPoint, const double fTransSlope) |
|
void | SetVFiberPositionToMainReference (const eRPotName eRPName, const int nPlateID, const int nFiberID, const HepGeom::Point3D< float > &TransPoint, const double fTransSlope) |
|
void | SetODFiberPositionToMainReference (const eRPotName eRPName, const eFiberType eFType, const int nPlateID, const int nFiberID, const HepGeom::Point3D< float > &TransPoint, const double fTransSlope) |
|
double | GetMDFiberSlope (const eRPotName eRPName, const eFiberType eFType, const int nPlateID, const int nFiberID) |
|
double | GetMDFiberOffset (const eRPotName eRPName, const eFiberType eFType, const int nPlateID, const int nFiberID) |
|
double | GetMDFiberZPos (const eRPotName eRPName, const eFiberType eFType, const int nPlateID, const int nFiberID) |
|
double | GetODFiberSlope (const eRPotName eRPName, const eFiberType eFType, const int nPlateID, const int nFiberID) |
|
double | GetODFiberOffset (const eRPotName eRPName, const eFiberType eFType, const int nPlateID, const int nFiberID) |
|
double | GetODFiberZPos (const eRPotName eRPName, const eFiberType eFType, const int nPlateID, const int nFiberID) |
|
|
static const HepGeom::Point3D< double > | ms_NominalRPPin1 =HepGeom::Point3D<double>(+77.5*CLHEP::mm,+172.2*CLHEP::mm,-124.0*CLHEP::mm) |
|
static const HepGeom::Point3D< double > | ms_NominalRPMainPoint =HepGeom::Point3D<double>(0.0*CLHEP::mm,31.525*CLHEP::mm,8.0*CLHEP::mm) |
|
static const HepGeom::Point3D< double > | ms_NominalAlfaRefPoint =HepGeom::Point3D<double>(-77.5*CLHEP::mm,-35.2*CLHEP::mm,114.0*CLHEP::mm) |
|
static const HepGeom::Point3D< double > | ms_NominalDetPin1 =HepGeom::Point3D<double>(-77.5*CLHEP::mm,-35.0*CLHEP::mm,114.0*CLHEP::mm) |
|
|
bool | InitializeDefault (const PGEOMETRYCONFIGURATION pConfig) |
|
bool | ReadSource (const eGeoSourceType eSourceType, const eRPotName eRPName, const eFiberType eFType, const char *szDataSource) |
|
bool | SetIdealGeometry (const eRPotName eRPName, const eFiberType eFType) |
|
void | UpdateGeometry () |
|
void | UpdateStationsPosParams () |
|
void | UpdateSimRPPos (const eRPotName eRPName) |
|
bool | ReadFile (const eRPotName eRPName, const eFiberType eFType, const char *szFilename) |
|
bool | ReadDatabase (const eRPotName eRPName, const eFiberType eFType, const char *szDataSource) |
|
void | TransformFiberPositions (PFIBERPARAMS pFiberParams, eRPotName eRPName, const eFiberType eType, const eGeoSourceType eSourceType) |
|
void | TransformFiberPositionsFCSCladding (PFIBERPARAMS pFiberParams, eRPotName eRPName, const eFiberType eType, const eGeoSourceType eSourceType) |
|
void | TransformFiberPositionsFCSAtlas (PFIBERPARAMS pFiberParams, eRPotName eRPName, const eFiberType eType, const eGeoSourceType eSourceType) |
|
HepGeom::Transform3D | ComputeTransformMatrix (const std::vector< HepGeom::Point3D< double > > &VecIdealRefPoints, const std::vector< HepGeom::Point3D< double > > &VecRealRefPoints, const int nPointCnt, HepGeom::Scale3D &Scale, bool bForceUseSVD=false) |
|
bool | ParseRPMetrology (eGeoSourceType eSourceType, const char *szDataSource) |
|
bool | ResolveRPotRefPoints (const char *szvalue, eRPotName eRPName, eRefPointType eRPointType) |
|
bool | ParseRefPoints (const char *szvalue, std::vector< HepGeom::Point3D< double > > &vecRefPoints, eMetrologyCoordSystem eCSystem) |
|
bool | ParseArrayOfValues (const char *szvalue, std::vector< double > &vecValues) |
|
bool | SetupRPMetrologyPoints (ALFA_ConfigParams &CfgParams, eRPotName eRPName) |
|
bool | SetupDetMetrologyPoints (ALFA_ConfigParams &CfgParams, eRPotName eRPName) |
|
bool | SetupStationMetrologyPoints (ALFA_ConfigParams &CfgParams, eAStationName eASName) |
|
double | GetPolyFitValue (const double fInputValue, const std::vector< double > &vecPolyFitParams) |
|
void | SetupCurrentLVDT (const PGEOMETRYCONFIGURATION pConfig) |
|
void | SetupSWCorrections (const PGEOMETRYCONFIGURATION pConfig) |
|
void | SetupUserCorrections (const PGEOMETRYCONFIGURATION pConfig) |
|
Definition at line 215 of file ALFA_GeometryReader.h.
◆ ALFA_GeometryReader()
ALFA_GeometryReader::ALFA_GeometryReader |
( |
| ) |
|
◆ ~ALFA_GeometryReader()
ALFA_GeometryReader::~ALFA_GeometryReader |
( |
| ) |
|
◆ ComputeTransformMatrix()
HepGeom::Transform3D ALFA_GeometryReader::ComputeTransformMatrix |
( |
const std::vector< HepGeom::Point3D< double > > & |
VecIdealRefPoints, |
|
|
const std::vector< HepGeom::Point3D< double > > & |
VecRealRefPoints, |
|
|
const int |
nPointCnt, |
|
|
HepGeom::Scale3D & |
Scale, |
|
|
bool |
bForceUseSVD = false |
|
) |
| |
|
private |
Definition at line 887 of file ALFA_GeometryReader.cxx.
891 const int N=nPointCnt;
892 CLHEP::HepVector vecAux1,vecAux2;
893 CLHEP::HepVector xmean,ymean,
t;
894 CLHEP::HepMatrix
C,U,V,
R,
W;
896 HepGeom::Rotate3D AuxRot;
897 HepGeom::Translate3D AuxTranslation;
901 if(nPointCnt==3 && !bForceUseSVD)
904 VecRealRefPoints[0],VecRealRefPoints[1],VecRealRefPoints[2]);
905 AuxTrans.getDecomposition(
Scale,AuxRot,AuxTranslation);
912 std::vector<CLHEP::HepVector> pX (
N);
913 std::vector<CLHEP::HepVector> pY (
N);
914 std::vector<CLHEP::HepVector> pXs (
N);
915 std::vector<CLHEP::HepVector> pYs(
N);
918 pX[
i]=CLHEP::Hep3Vector(VecIdealRefPoints[
i].
x(),VecIdealRefPoints[
i].
y(),VecIdealRefPoints[
i].
z());
919 pY[
i]=CLHEP::Hep3Vector(VecRealRefPoints[
i].
x(),VecRealRefPoints[
i].
y(),VecRealRefPoints[
i].
z());
931 vecAux1=CLHEP::Hep3Vector();
932 vecAux2=CLHEP::Hep3Vector();
938 xmean=vecAux1/(1.0*
N);
939 ymean=vecAux2/(1.0*
N);
941 C=CLHEP::HepMatrix(3,3);
945 C+=pYs[
i]*pXs[
i].T();
950 std::vector<double*> ppfA(3);
951 std::vector<double*> ppfV(3);
953 ppfA[
i]=
new double[3];
956 ppfV[
i]=
new double[3];
960 std::vector<double> pfW (3);
964 for(j=0;j<3;j++) ppfA[
i][j]=(
double)
C[
i][j];
967 dsvd(ppfA.data(),3,3,pfW.data(),ppfV.data());
969 U=CLHEP::HepMatrix(3,3); V=CLHEP::HepMatrix(3,3);
971 for(j=0;j<3;j++) U[
i][j]=(
double)ppfA[
i][j];
972 for(j=0;j<3;j++) V[
i][j]=(
double)ppfV[
i][j];
975 W=CLHEP::HepMatrix(3,3);
976 W[0][0]=1;
W[1][1]=1;
977 W[2][2]=(U*V).determinant();
987 CLHEP::HepRep3x3 matAux;
988 matAux.xx_=
R[0][0]; matAux.xy_=
R[0][1]; matAux.xz_=
R[0][2];
989 matAux.yx_=
R[1][0]; matAux.yy_=
R[1][1]; matAux.yz_=
R[1][2];
990 matAux.zx_=
R[2][0]; matAux.zy_=
R[2][1]; matAux.zz_=
R[2][2];
991 CLHEP::HepRotation TransM=CLHEP::HepRotation(matAux);
992 CLHEP::Hep3Vector TransT=CLHEP::Hep3Vector(
t[0],
t[1],
t[2]);
◆ GetASPosParams()
Definition at line 1949 of file ALFA_GeometryReader.cxx.
1956 pASPosParams->clear();
1958 *pASPosParams=(*iter).second;
1962 LogStream<<MSG::ERROR<<
"Unknown ALFA Station ID="<<eASName<<
endmsg;
◆ GetAStationLabel()
◆ GetDetPointInAtlas()
HepGeom::Point3D< double > ALFA_GeometryReader::GetDetPointInAtlas |
( |
eRPotName |
eRPName, |
|
|
const HepGeom::Point3D< double > & |
PointInDetCS |
|
) |
| |
Definition at line 2859 of file ALFA_GeometryReader.cxx.
2867 HepGeom::Point3D<double> PointInAtlasCS, PointInRPotCS;
2872 HepGeom::Vector3D<double>
Shift=RPPin1-MainPoint;
2873 HepGeom::Point3D<double> PointInMainPoint=
Shift+AlfaRefPoint+PointInDetCS;
2876 PointInAtlasCS=TotTransform*PointInRPotCS;
2879 throw new GaudiException(
" The GetDetPointInAtlas() can be used only with EFCS_ATLAS or EFCS_CLADDING flag ",
"ALFA_GeometryReader::GetDetPointInAtlas", StatusCode::FAILURE);
2901 return PointInAtlasCS;
◆ GetDetPointInRPot()
HepGeom::Point3D< double > ALFA_GeometryReader::GetDetPointInRPot |
( |
eRPotName |
eRPName, |
|
|
const HepGeom::Point3D< double > & |
PointInDetCS |
|
) |
| |
Definition at line 2904 of file ALFA_GeometryReader.cxx.
2910 HepGeom::Point3D<double> PointInRPotCS;
2915 HepGeom::Vector3D<double>
Shift=RPPin1-MainPoint;
2916 HepGeom::Point3D<double> PointInMainPoint=
Shift+AlfaRefPoint+PointInDetCS;
2920 throw new GaudiException(
" The GetDetPointInAtlas() can be used only with EFCS_ATLAS or EFCS_CLADDING flag ",
"ALFA_GeometryReader::GetDetPointInAtlas", StatusCode::FAILURE);
2923 return PointInRPotCS;
◆ GetListOfExistingRPotIDs()
void ALFA_GeometryReader::GetListOfExistingRPotIDs |
( |
std::list< eRPotName > * |
pListRPotName | ) |
|
◆ GetListOfRPotIDs()
void ALFA_GeometryReader::GetListOfRPotIDs |
( |
std::map< eRPotName, std::string > * |
pMapRPotName | ) |
|
Definition at line 1910 of file ALFA_GeometryReader.cxx.
1912 std::string strLabel;
1913 std::map<eRPotName,ROMAPOT>::const_iterator rpiter;
1915 if(pMapRPotName!=
nullptr){
1916 pMapRPotName->clear();
1920 pMapRPotName->insert(std::pair<eRPotName,std::string>((*rpiter).first,strLabel));
◆ GetMDFiberOffset()
◆ GetMDFiberParams()
Definition at line 1985 of file ALFA_GeometryReader.cxx.
1991 if(pFiberParams==
nullptr)
1993 LogStream<<MSG::ERROR<<
"pFiberParams points to NULL"<<
endmsg;
1997 LogStream<<MSG::ERROR<<
"Invalid coordinate system"<<
endmsg;
2008 LogStream<<MSG::ERROR<<
"Invalid fiber type"<<
endmsg;
◆ GetMDFiberSlope()
◆ GetMDFiberZPos()
◆ GetODFiberAngle()
◆ GetODFiberCentreYPos()
◆ GetODFiberOffset()
◆ GetODFiberParams()
Definition at line 2017 of file ALFA_GeometryReader.cxx.
2020 std::list<FIBERPARAMS>::const_iterator iter;
2021 std::map<eRPotName, ROMAPOT>::const_iterator rpiter;
2031 for(iter=(*rpiter).second.ListODFibersU0.begin();iter!=(*rpiter).second.ListODFibersU0.end();++iter)
2033 if (((*iter).nPlateID==nPlateID) && ((*iter).nFiberID==nFiberID))
break;
2036 if (iter==(*rpiter).second.ListODFibersU0.end())
2038 LogStream<<MSG::ERROR<<
"Cannot find ODFiberU0 PotID="<<eRPName<<
", PlateID="<<nPlateID<<
" and FiberID="<<nFiberID<<
endmsg;
2043 *pFiberParams = *iter;
2051 for(iter=(*rpiter).second.ListODFibersV0.begin();iter!=(*rpiter).second.ListODFibersV0.end();++iter)
2053 if (((*iter).nPlateID==nPlateID) && ((*iter).nFiberID==nFiberID))
break;
2056 if (iter==(*rpiter).second.ListODFibersV0.end())
2058 LogStream<<MSG::ERROR<<
"Cannot find ODFiberV0 PotID="<<eRPName<<
", PlateID="<<nPlateID<<
" and FiberID="<<nFiberID<<
endmsg;
2063 *pFiberParams = *iter;
2071 for(iter=(*rpiter).second.ListODFibersU1.begin();iter!=(*rpiter).second.ListODFibersU1.end();++iter)
2073 if (((*iter).nPlateID==nPlateID) && ((*iter).nFiberID==nFiberID))
break;
2076 if (iter==(*rpiter).second.ListODFibersU1.end())
2078 LogStream<<MSG::ERROR<<
"Cannot find ODFiberU1 PotID="<<eRPName<<
", PlateID="<<nPlateID<<
" and FiberID="<<nFiberID<<
endmsg;
2083 *pFiberParams = *iter;
2091 for(iter=(*rpiter).second.ListODFibersV1.begin();iter!=(*rpiter).second.ListODFibersV1.end();++iter)
2093 if (((*iter).nPlateID==nPlateID) && ((*iter).nFiberID==nFiberID))
break;
2096 if (iter==(*rpiter).second.ListODFibersV1.end())
2098 LogStream<<MSG::ERROR<<
"Cannot find ODFiberV1 PotID="<<eRPName<<
", PlateID="<<nPlateID<<
" and FiberID="<<nFiberID<<
endmsg;
2103 *pFiberParams = *iter;
2111 LogStream<<MSG::ERROR<<
"Unknown ODFiber eFType="<<eFType<<
endmsg;
2118 LogStream<<MSG::ERROR<<
"Unknown Roma pot PotID="<<eRPName<<
endmsg;
◆ GetODFiberSlope()
◆ GetODFiberZPos()
◆ GetPlateParams()
Definition at line 1609 of file ALFA_GeometryReader.cxx.
1618 if((pliter=(*rpiter).second.MapPlates.find(nPlateID))!=(*rpiter).second.MapPlates.end()){
1619 *pPlateParams=(*pliter).second;
1623 LogStream<<MSG::ERROR<<
"Unknown Ti plate ID "<<nPlateID<<
endmsg;
1627 LogStream<<MSG::ERROR<<
"Unknown Roman pot PotID="<<eRPName<<
endmsg;
◆ GetPolyFitValue()
double ALFA_GeometryReader::GetPolyFitValue |
( |
const double |
fInputValue, |
|
|
const std::vector< double > & |
vecPolyFitParams |
|
) |
| |
|
private |
Definition at line 2844 of file ALFA_GeometryReader.cxx.
2847 double fOutputValue=0.0;
2849 n=vecPolyFitParams.size();
2853 fOutputValue+=vecPolyFitParams[
i]*
pow(fInputValue,
n-1-
i);
2856 return fOutputValue;
◆ GetRPGeometryType()
◆ GetRPotCount()
int ALFA_GeometryReader::GetRPotCount |
( |
| ) |
const |
|
inline |
◆ GetRPotLabel()
◆ GetRPotZPosInAtlas()
double ALFA_GeometryReader::GetRPotZPosInAtlas |
( |
const eRPotName |
eRPName | ) |
|
◆ GetRPPosParams()
Definition at line 1930 of file ALFA_GeometryReader.cxx.
1937 pRPPosParams->clear();
1939 *pRPPosParams=(*iter).second;
1943 LogStream<<MSG::ERROR<<
"Unknown Roma pot ID="<<eRPName<<
endmsg;
◆ GetTransformMatrix()
Definition at line 2996 of file ALFA_GeometryReader.cxx.
3009 HepGeom::Vector3D<double> Shift1=RPPin1-MainPoint;
3010 HepGeom::Vector3D<double> Shift2=RPPin1-MainPoint+AlfaRefPoint;
3011 HepGeom::Vector3D<double> Shift3=0.5*(AParams.
ShiftE+AParams.
ShiftS);
3025 TransMatrix=HepGeom::Translate3D(-Shift1);
3028 TransMatrix=HepGeom::Translate3D(Shift2);
3031 TransMatrix=HepGeom::Translate3D(-Shift3);
3034 throw GaudiException(
" Invalid matrix identificator ",
"ALFA_GeometryReader::GetTransformMatrix", StatusCode::FAILURE);
◆ GetUFiberAngle()
◆ GetUFiberCentreXPos()
◆ GetUFiberParams()
Definition at line 1414 of file ALFA_GeometryReader.cxx.
1417 std::list<FIBERPARAMS>::const_iterator iter;
1418 std::map<eRPotName, ROMAPOT>::const_iterator rpiter;
1423 for(iter=(*rpiter).second.ListUFibers.begin();iter!=(*rpiter).second.ListUFibers.end();++iter){
1424 if(((*iter).nPlateID==nPlateID) && ((*iter).nFiberID==nFiberID))
break;
1427 if(iter==(*rpiter).second.ListUFibers.end()){
1428 LogStream<<MSG::ERROR<<
"Cannot find fiber PotID="<<eRPName<<
", PlateID="<<nPlateID<<
" and FiberID="<<nFiberID<<
endmsg;
1432 *pFiberParams = *iter;
1437 LogStream<<MSG::ERROR<<
"Unknown Roman pot PotID="<<eRPName<<
endmsg;
◆ GetVFiberAngle()
◆ GetVFiberCentreXPos()
◆ GetVFiberParams()
Definition at line 1443 of file ALFA_GeometryReader.cxx.
1446 std::list<FIBERPARAMS>::const_iterator iter;
1447 std::map<eRPotName, ROMAPOT>::const_iterator rpiter;
1452 for(iter=(*rpiter).second.ListVFibers.begin();iter!=(*rpiter).second.ListVFibers.end();++iter){
1453 if(((*iter).nPlateID==nPlateID) && ((*iter).nFiberID==nFiberID))
break;
1456 if(iter==(*rpiter).second.ListVFibers.end()) {
1457 LogStream<<MSG::ERROR<<
"Cannot find fiber PotID="<<eRPName<<
", PlateID="<<nPlateID<<
" and FiberID="<<nFiberID<<
endmsg;
1461 *pFiberParams = *iter;
1466 LogStream<<MSG::ERROR<<
"Unknown Roman pot PotID="<<eRPName<<
endmsg;
◆ Initialize()
Definition at line 688 of file ALFA_GeometryReader.cxx.
720 LogStream<<MSG::INFO<<
"Metrology data loaded from file "<<
FilePath<<
endmsg;
734 throw GaudiException(
" Unknown metrology type ",
"ALFA_GeometryReader::Initialize", StatusCode::FAILURE);
◆ InitializeDefault()
Definition at line 446 of file ALFA_GeometryReader.cxx.
461 strcpy(ASPosParams.
szLabel,
"B7L1");
467 strcpy(ASPosParams.
szLabel,
"A7L1");
473 strcpy(ASPosParams.
szLabel,
"A7R1");
479 strcpy(ASPosParams.
szLabel,
"B7R1");
487 strcpy(RPPosParams.
szLabel,
"B7L1U");
512 strcpy(RPPosParams.
szLabel,
"B7L1L");
537 strcpy(RPPosParams.
szLabel,
"A7L1U");
562 strcpy(RPPosParams.
szLabel,
"A7L1L");
587 strcpy(RPPosParams.
szLabel,
"A7R1U");
612 strcpy(RPPosParams.
szLabel,
"A7R1L");
637 strcpy(RPPosParams.
szLabel,
"B7R1U");
662 strcpy(RPPosParams.
szLabel,
"B7R1L");
◆ ParseArrayOfValues()
bool ALFA_GeometryReader::ParseArrayOfValues |
( |
const char * |
szvalue, |
|
|
std::vector< double > & |
vecValues |
|
) |
| |
|
private |
Definition at line 2591 of file ALFA_GeometryReader.cxx.
2595 char *ppos1,*ppos2,*pstop;
2599 memset(szbuff,0,
sizeof(szbuff));
2600 if(szvalue) strncpy(szbuff,szvalue,
sizeof(szbuff)-1);
2603 ppos2=strchr(ppos1,
',');
2605 while(ppos2!=
nullptr){
2608 faux=strtod(ppos1,&pstop);
2609 if(pstop==ppos2) vecValues.push_back(faux);
2616 ppos2=strchr(ppos1,
',');
2620 faux=strtod(ppos1,&pstop);
2621 if(*pstop==0) vecValues.push_back(faux);
2625 if(!bRes) vecValues.clear();
◆ ParseRefPoints()
bool ALFA_GeometryReader::ParseRefPoints |
( |
const char * |
szvalue, |
|
|
std::vector< HepGeom::Point3D< double > > & |
vecRefPoints, |
|
|
eMetrologyCoordSystem |
eCSystem |
|
) |
| |
|
private |
Definition at line 2515 of file ALFA_GeometryReader.cxx.
2517 double fx,fy,fz,faux;
2518 char *ppos1,*ppos2,*ppos3,*ppos4,*pstop;
2520 HepGeom::Point3D<double> RefPoint;
2524 memset(szbuff,0,
sizeof(szbuff));
2525 strcpy(szbuff,szvalue);
2530 while((ppos1=strchr(ppos2,
'['))!=
nullptr){
2531 if(!(ppos2=strchr(ppos1+1,
']')))
return false;
2536 if(nCnt==0)
return false;
2537 vecRefPoints.resize(nCnt);
2541 while((ppos1=strchr(ppos2,
'['))!=
nullptr){
2542 if(!(ppos2=strchr(ppos1,
']')))
return false;
2546 if(!(ppos4=strchr(ppos3+1,
',')))
return false;
2548 faux=strtod(ppos3,&pstop);
2549 if(pstop!=ppos4 && *pstop!=
' ')
return false;
2554 if(!(ppos4=strchr(ppos3+1,
',')))
return false;
2556 faux=strtod(ppos3,&pstop);
2557 if(pstop!=ppos4 && *pstop!=
' ')
return false;
2562 if(!(ppos4=strchr(ppos3+1,
']')))
return false;
2564 faux=strtod(ppos3,&pstop);
2565 if(pstop!=ppos4 && *pstop!=
' ')
return false;
2570 RefPoint[0]=fx; RefPoint[1]=fy; RefPoint[2]=fz;
2573 RefPoint[0]=fx; RefPoint[1]=fz; RefPoint[2]=-fy;
2576 RefPoint[0]=fx; RefPoint[1]=-fz; RefPoint[2]=fy;
2579 RefPoint[0]=fx; RefPoint[1]=fy; RefPoint[2]=fz;
2581 else throw new GaudiException(
"Invalid type of metrology coordinate system",
"ALFA_GeometryReader::ParseRefPoints", StatusCode::FAILURE);
2583 vecRefPoints[
i++]=RefPoint;
◆ ParseRPMetrology()
bool ALFA_GeometryReader::ParseRPMetrology |
( |
eGeoSourceType |
eSourceType, |
|
|
const char * |
szDataSource |
|
) |
| |
|
private |
Definition at line 2422 of file ALFA_GeometryReader.cxx.
2433 if(CfgParams.
Init(szDataSource,
"[B7L1]")==0)
return false;
2436 if(CfgParams.
Init(szDataSource,
"[A7L1]")==0)
return false;
2439 if(CfgParams.
Init(szDataSource,
"[A7R1]")==0)
return false;
2442 if(CfgParams.
Init(szDataSource,
"[B7R1]")==0)
return false;
2447 if(CfgParams.
Init(szDataSource,
"[B7L1U]")==0)
return false;
2452 if(CfgParams.
Init(szDataSource,
"[B7L1L]")==0)
return false;
2457 if(CfgParams.
Init(szDataSource,
"[A7L1U]")==0)
return false;
2462 if(CfgParams.
Init(szDataSource,
"[A7L1L]")==0)
return false;
2467 if(CfgParams.
Init(szDataSource,
"[A7R1U]")==0)
return false;
2472 if(CfgParams.
Init(szDataSource,
"[A7R1L]")==0)
return false;
2477 if(CfgParams.
Init(szDataSource,
"[B7R1U]")==0)
return false;
2482 if(CfgParams.
Init(szDataSource,
"[B7R1L]")==0)
return false;
2490 LogStream<<MSG::ERROR<<
"The file source is supported only."<<
endmsg;
◆ PrintFiberGeometry() [1/2]
void ALFA_GeometryReader::PrintFiberGeometry |
( |
const char * |
szOutFilename | ) |
|
◆ PrintFiberGeometry() [2/2]
void ALFA_GeometryReader::PrintFiberGeometry |
( |
std::ostream & |
OutStream | ) |
|
Definition at line 1641 of file ALFA_GeometryReader.cxx.
1644 std::list<FIBERPARAMS>::const_iterator iter;
1645 std::map<eRPotName, ROMAPOT>::const_iterator rpiter;
1651 LogStream<<MSG::ERROR<<
"Invalid coordinate system"<<
endmsg;
1656 OutStream<<std::endl<<
"Geometry of U-fibers in Roma Pot "<<(*rpiter).first<<std::endl;
1660 for(iter=(*rpiter).second.ListUFibers.begin();iter!=(*rpiter).second.ListUFibers.end();++iter){
1661 OutStream<<(*rpiter).first<<
"\t\t\t\t"<<(*iter).nPlateID<<
"\t\t\t\t"<<(*iter).nFiberID<<
"\t\t\t\t"<<(*iter).nLayerID<<
"\t\t\t\t";
1666 OutStream<<std::endl<<
"Geometry of V-fibers in Roma Pot "<<(*rpiter).first<<std::endl;
1670 for(iter=(*rpiter).second.ListVFibers.begin();iter!=(*rpiter).second.ListVFibers.end();++iter){
1671 OutStream<<(*rpiter).first<<
"\t\t\t\t"<<(*iter).nPlateID<<
"\t\t\t\t"<<(*iter).nFiberID<<
"\t\t\t\t"<<(*iter).nLayerID<<
"\t\t\t\t";
1676 OutStream<<std::endl<<
"Geometry of V0-ODFibers in Roma Pot "<<(*rpiter).first<<std::endl;
1680 for(iter=(*rpiter).second.ListODFibersV0.begin();iter!=(*rpiter).second.ListODFibersV0.end();++iter){
1681 OutStream<<(*rpiter).first<<
"\t\t\t\t"<<(*iter).nPlateID<<
"\t\t\t\t"<<(*iter).nFiberID<<
"\t\t\t\t"<<(*iter).nLayerID<<
"\t\t\t\t";
1686 OutStream<<std::endl<<
"Geometry of U0-ODFibers in Roma Pot "<<(*rpiter).first<<std::endl;
1690 for(iter=(*rpiter).second.ListODFibersU0.begin();iter!=(*rpiter).second.ListODFibersU0.end();++iter){
1691 OutStream<<(*rpiter).first<<
"\t\t\t\t"<<(*iter).nPlateID<<
"\t\t\t\t"<<(*iter).nFiberID<<
"\t\t\t\t"<<(*iter).nLayerID<<
"\t\t\t\t";
1696 OutStream<<std::endl<<
"Geometry of U1-ODFibers in Roma Pot "<<(*rpiter).first<<std::endl;
1700 for(iter=(*rpiter).second.ListODFibersU1.begin();iter!=(*rpiter).second.ListODFibersU1.end();++iter){
1701 OutStream<<(*rpiter).first<<
"\t\t\t\t"<<(*iter).nPlateID<<
"\t\t\t\t"<<(*iter).nFiberID<<
"\t\t\t\t"<<(*iter).nLayerID<<
"\t\t\t\t";
1706 OutStream<<std::endl<<
"Geometry of V1-ODFibers in Roma Pot "<<(*rpiter).first<<std::endl;
1710 for(iter=(*rpiter).second.ListODFibersV1.begin();iter!=(*rpiter).second.ListODFibersV1.end();++iter){
1711 OutStream<<(*rpiter).first<<
"\t\t\t\t"<<(*iter).nPlateID<<
"\t\t\t\t"<<(*iter).nFiberID<<
"\t\t\t\t"<<(*iter).nLayerID<<
"\t\t\t\t";
◆ ReadDatabase()
Definition at line 1323 of file ALFA_GeometryReader.cxx.
1332 std::vector<std::string> strDBElements;
1336 memset(szSource,0,
sizeof(szSource));
1337 if(szDataSource) strncpy(szSource, szDataSource,
sizeof(szSource)-1);
1338 char* strtok_ptr =
nullptr;
1339 pch = strtok_r(szSource,
":",&strtok_ptr);
1340 while (pch !=
nullptr)
1342 strDBElements.emplace_back(pch);
1343 pch = strtok_r(
nullptr,
":",&strtok_ptr);
1350 bRes = p_DBAccess->
ReadGeometry(eRPName, eFType, strDBElements[2], strDBElements[1], strDBElements[0]);
1361 m_MapRPot.insert(std::pair<eRPotName,ROMAPOT>(eRPName,RomaPot));
1367 std::list<FIBERDATA>::const_iterator iter;
1370 if (eRPName == (*iter).nPotID)
1374 FiberParams.
nLayerID = (*iter).nLayerID;
1375 FiberParams.
nFiberID = (*iter).nFiberID;
1376 FiberParams.
fSlope = (*iter).fSlope;
1377 FiberParams.
fOffset = (*iter).fOffset;
1378 FiberParams.
fZPos = (*iter).fZPos;
◆ ReadFiberGeometry()
Definition at line 1004 of file ALFA_GeometryReader.cxx.
1006 bool bFailRes=
false;
1008 std::list<eRPotName>::const_iterator iterRPName;
1011 if(pConfig!=
nullptr)
1016 nRPCfgIndex=((
int)(*iterRPName))-1;
◆ ReadFile()
Definition at line 1175 of file ALFA_GeometryReader.cxx.
1180 int i,nLine,nLength;
1198 m_MapRPot.insert(std::pair<eRPotName,ROMAPOT>(eRPName,RomaPot));
1204 if((pFile=fopen(szFilename,
"r"))==
nullptr){
1205 LogStream<<MSG::ERROR<<
"Could not open the file "<<szFilename<<
endmsg;
1210 while(!feof(pFile)){
1211 if(fgets(szLine,
sizeof(szLine),pFile)!=
nullptr){
1216 if(nLine<6)
continue;
1218 nLength=strlen(szLine);
1221 for(
i=0;
i<nLength;
i++) {
if(*(szLine+
i)==
' ')
continue;
else break; }
1223 pch2=strchr(pch1,
' ');
1230 LogStream<<MSG::ERROR<<
"Error at line "<<nLine<<
" while reading the data file "<<szFilename<<
endmsg;
1237 for(
i=0;
i<nLength;
i++) {
if(*(pch2+
i)==
' ')
continue;
else break;}
1239 pch2=strchr(pch1,
' ');
1245 LogStream<<MSG::ERROR<<
"Error at line "<<nLine<<
" while reading the data file "<<szFilename<<
endmsg;
1252 for(
i=0;
i<nLength;
i++) {
if(*(pch2+
i)==
' ')
continue;
else break; }
1254 pch2=strchr(pch1,
' ');
1260 LogStream<<MSG::ERROR<<
"Error at line "<<nLine<<
" while reading the data file "<<szFilename<<
endmsg;
1267 for(
i=0;
i<nLength;
i++) {
if(*(pch2+
i)==
' ')
continue;
else break; }
1269 pch2=strchr(pch1,
' ');
1275 LogStream<<MSG::ERROR<<
"Error at line "<<nLine<<
" while reading the data file "<<szFilename<<
endmsg;
1282 for(
i=0;
i<nLength;
i++) {
if(*(pch2+
i)==
' ')
continue;
else break; }
1317 if(pFile) fclose(pFile);
◆ ReadSource()
Definition at line 1032 of file ALFA_GeometryReader.cxx.
1036 std::string strDetType,
FilePath, GeomFile;
1043 switch(eSourceType){
1045 LogStream<<MSG::INFO<<
"The IDEAL "<<strDetType<<
" fiber geometry will be loaded for RP "<<
GetRPotLabel(eRPName)<<
endmsg;
1050 GeomFile=std::string(
"geom_")+strDetType+std::string(
"_")+std::string(
GetRPotLabel(eRPName))+std::string(
".dat");
1052 else FilePath=std::string(szDataSource);
1054 LogStream<<MSG::INFO<<
"The "<<strDetType<<
" fiber geometry will be loaded from FILE "<<
FilePath.c_str()<<
" for RP "<<
GetRPotLabel(eRPName)<<
endmsg;
1058 LogStream<<MSG::INFO<<
"The "<<strDetType<<
" fiber geometry will be loaded from DATABASE for RP "<<
GetRPotLabel(eRPName)<<
endmsg;
1069 m_MapRPot[eRPName].MapPlates.insert(std::pair<int,PLATEPARAMS>(
i,PlateParams));
1073 m_MapRPot[eRPName].MapODPlates.insert(std::pair<int,PLATEPARAMS>(
i,PlateParams));
1083 throw GaudiException(
" Could not load geometry ",
"ALFA_GeometryReader::ReadSource", StatusCode::FAILURE);
◆ ResolveRPotRefPoints()
◆ SaveRPGeometryParams()
bool ALFA_GeometryReader::SaveRPGeometryParams |
( |
const eRPotName |
eRPName, |
|
|
const char * |
szDataDestination |
|
) |
| |
Definition at line 2927 of file ALFA_GeometryReader.cxx.
2930 double fRotX,fRotY,fRotZ;
2932 FILE *pfile=fopen(szDataDestination,
"w");
2935 fprintf(pfile,
"Romain pot geometry info: ----------------------------------------\r\n");
2937 fprintf(pfile,
"LVDT: %.3f mm\r\n\r\n",
m_RPPosParams[eRPName].fCurrentLVDTmm);
2939 fprintf(pfile,
"Transformation matrix of RP in station MainPoint:\r\n");
2947 fprintf(pfile,
"RotX=%.5f rad, RotY=%.5f rad, RotZ=%.5f rad\r\n",fRotX,fRotY,fRotZ);
2956 fprintf(pfile,
"\r\nDetector geometry info: ------------------------------------------\r\n");
2957 fprintf(pfile,
"Transformation matrix of detector in RP MainPoint:\r\n");
2965 fprintf(pfile,
"RotX=%.5f rad, RotY=%.5f rad, RotZ=%.5f rad\r\n",fRotX,fRotY,fRotZ);
2973 fprintf(pfile,
"\r\nReference pins and Track point info: ------------------------------------------\r\n");
2974 fprintf(pfile,
"RPPin1: nominal=[%.3f,%.3f,%.3f], real=[%.3f,%.3f,%.3f] (Station CS)\r\n",
m_RPPosParams[eRPName].RefPins.IdealRPPin1.x(),
m_RPPosParams[eRPName].RefPins.IdealRPPin1.y(),
m_RPPosParams[eRPName].RefPins.IdealRPPin1.z(),
2976 fprintf(pfile,
"RPPin2: nominal=[%.3f,%.3f,%.3f], real=[%.3f,%.3f,%.3f] (Station CS)\r\n",
m_RPPosParams[eRPName].RefPins.IdealRPPin2.x(),
m_RPPosParams[eRPName].RefPins.IdealRPPin2.y(),
m_RPPosParams[eRPName].RefPins.IdealRPPin2.z(),
2978 fprintf(pfile,
"RPPin3: nominal=[%.3f,%.3f,%.3f], real=[%.3f,%.3f,%.3f] (Station CS)\r\n",
m_RPPosParams[eRPName].RefPins.IdealRPPin3.x(),
m_RPPosParams[eRPName].RefPins.IdealRPPin3.y(),
m_RPPosParams[eRPName].RefPins.IdealRPPin3.z(),
2980 fprintf(pfile,
"Detector TrackPoint: [%.3f,%.3f,%.3f] (ALFA CS), [%.3f,%.3f,%.3f] (RPot CS), [%.3f,%.3f,%.3f] (ATLAS CS)\r\n",
m_RPPosParams[eRPName].RefPins.DTPInAlfaCS.x(),
m_RPPosParams[eRPName].RefPins.DTPInAlfaCS.y(),
m_RPPosParams[eRPName].RefPins.DTPInAlfaCS.z(),
2983 fprintf(pfile,
"Detector CentrePoint: [%.3f,%.3f,%.3f] (ALFA CS), [%.3f,%.3f,%.3f] (RPot CS), [%.3f,%.3f,%.3f] (ATLAS CS)\r\n",
m_RPPosParams[eRPName].RefPins.DCPInAlfaCS.x(),
m_RPPosParams[eRPName].RefPins.DCPInAlfaCS.y(),
m_RPPosParams[eRPName].RefPins.DCPInAlfaCS.z(),
◆ SetIdealGeometry()
Definition at line 1089 of file ALFA_GeometryReader.cxx.
1110 m_MapRPot.insert(std::pair<eRPotName,ROMAPOT>(eRPName,RomaPot));
1150 m_MapRPot[eRPName].ListODFibersV0.push_back(FiberParams);
1155 m_MapRPot[eRPName].ListODFibersV1.push_back(FiberParams);
1161 m_MapRPot[eRPName].ListODFibersU0.push_back(FiberParams);
1166 m_MapRPot[eRPName].ListODFibersU1.push_back(FiberParams);
◆ SetODFiberPositionToMainReference()
Definition at line 2124 of file ALFA_GeometryReader.cxx.
2129 MsgStream LogStream(
Athena::getMessageSvc(),
"ALFA_GeometryReader::SetODFiberPositionToMainReference");
2132 LogStream<<MSG::ERROR<<
"Invalid coordinate system"<<
endmsg;
2142 for(iter=(*rpiter).second.ListODFibersU0.begin();iter!=(*rpiter).second.ListODFibersU0.end();++iter)
2144 if (((*iter).nPlateID==nPlateID) && ((*iter).nFiberID==nFiberID))
break;
2147 if (iter==(*rpiter).second.ListODFibersU0.end())
2149 LogStream<<MSG::ERROR<<
"Cannot find ODFiberU0 PotID="<<eRPName<<
", PlateID="<<nPlateID<<
" and FiberID="<<nFiberID<<
endmsg;
2154 (*iter).MainRefPointPos=TransPoint;
2155 (*iter).fMainRefPointSlope=fTransSlope;
2162 for(iter=(*rpiter).second.ListODFibersV0.begin();iter!=(*rpiter).second.ListODFibersV0.end();++iter)
2164 if (((*iter).nPlateID==nPlateID) && ((*iter).nFiberID==nFiberID))
break;
2167 if (iter==(*rpiter).second.ListODFibersV0.end())
2169 LogStream<<MSG::ERROR<<
"Cannot find ODFiberV0 PotID="<<eRPName<<
", PlateID="<<nPlateID<<
" and FiberID="<<nFiberID<<
endmsg;
2174 (*iter).MainRefPointPos=TransPoint;
2175 (*iter).fMainRefPointSlope=fTransSlope;
2182 for(iter=(*rpiter).second.ListODFibersU1.begin();iter!=(*rpiter).second.ListODFibersU1.end();++iter)
2184 if (((*iter).nPlateID==nPlateID) && ((*iter).nFiberID==nFiberID))
break;
2187 if (iter==(*rpiter).second.ListODFibersU1.end())
2189 LogStream<<MSG::ERROR<<
"Cannot find ODFiberU1 PotID="<<eRPName<<
", PlateID="<<nPlateID<<
" and FiberID="<<nFiberID<<
endmsg;
2194 (*iter).MainRefPointPos=TransPoint;
2195 (*iter).fMainRefPointSlope=fTransSlope;
2202 for(iter=(*rpiter).second.ListODFibersV1.begin();iter!=(*rpiter).second.ListODFibersV1.end();++iter)
2204 if (((*iter).nPlateID==nPlateID) && ((*iter).nFiberID==nFiberID))
break;
2207 if (iter==(*rpiter).second.ListODFibersV1.end())
2209 LogStream<<MSG::ERROR<<
"Cannot find ODFiberV1 PotID="<<eRPName<<
", PlateID="<<nPlateID<<
" and FiberID="<<nFiberID<<
endmsg;
2214 (*iter).MainRefPointPos=TransPoint;
2215 (*iter).fMainRefPointSlope=fTransSlope;
2222 LogStream<<MSG::ERROR<<
"Unknown ODFiber eFType="<<eFType<<
endmsg;
2229 LogStream<<MSG::ERROR<<
"Unknown Roman pot PotID="<<eRPName<<
endmsg;
◆ SetUFiberPositionToMainReference()
void ALFA_GeometryReader::SetUFiberPositionToMainReference |
( |
const eRPotName |
eRPName, |
|
|
const int |
nPlateID, |
|
|
const int |
nFiberID, |
|
|
const HepGeom::Point3D< float > & |
TransPoint, |
|
|
const double |
fTransSlope |
|
) |
| |
Definition at line 1545 of file ALFA_GeometryReader.cxx.
1551 MsgStream LogStream(
Athena::getMessageSvc(),
"ALFA_GeometryReader::SetUFiberPositionToMainReference");
1554 LogStream<<MSG::ERROR<<
"Invalid coordinate system"<<
endmsg;
1559 for(iter=(*rpiter).second.ListUFibers.begin();iter!=(*rpiter).second.ListUFibers.end();++iter){
1560 if(((*iter).nPlateID==nPlateID) && ((*iter).nFiberID==nFiberID))
break;
1563 if(iter==(*rpiter).second.ListUFibers.end()) {
1564 LogStream<<MSG::ERROR<<
"Cannot find fiber PotID="<<eRPName<<
", PlateID="<<nPlateID<<
" and FiberID="<<nFiberID<<
endmsg;
1568 (*iter).MainRefPointPos=TransPoint;
1569 (*iter).fMainRefPointSlope=fTransSlope;
1573 LogStream<<MSG::ERROR<<
"Unknown Roman pot PotID="<<eRPName<<
endmsg;
◆ SetupCurrentLVDT()
◆ SetupDetMetrologyPoints()
Definition at line 2630 of file ALFA_GeometryReader.cxx.
2639 double xr1,yr1,xr2,yr2;
2640 HepGeom::Point3D<double> PointIdealD3, PointRealD3;
2641 HepGeom::Point3D<double> PointIdealD4, PointRealD4;
2642 HepGeom::Point3D<double> PointIdealD5, PointRealD5;
2644 std::vector<double> vecDetEdges;
2645 std::vector<HepGeom::Point3D<double> > vecNominalDetPoints;
2646 std::vector<HepGeom::Point3D<double> > vecRealDetPoints;
2649 if(!CfgParams.
IsKey(
"idealrefdetpoints"))
return false;
2651 if(!CfgParams.
IsKey(
"realrefdetpoints"))
return false;
2654 if(!CfgParams.
IsKey(
"realdetedgeypos"))
return false;
2657 fZc=0.5*(vecDetEdges[0]+vecDetEdges[1]);
2658 PointIdealD3=HepGeom::Point3D<double>(10.0,0.0,0.0);
2659 PointIdealD4=HepGeom::Point3D<double>(0.0,10.0,0.0);
2660 PointIdealD5=HepGeom::Point3D<double>(0.0,0.0,10.0);
2663 xp1=vecNominalDetPoints[0].x();
2664 yp1=vecNominalDetPoints[0].y();
2670 xr1=vecRealDetPoints[0].x();
2671 yr1=vecRealDetPoints[0].y();
2672 xr2=vecRealDetPoints[1].x();
2673 yr2=vecRealDetPoints[1].y();
2677 double alpha=-
atan((xr2-xr1)/(yr2-yr1));
2691 CorrectionInDetPin1=HepGeom::Translate3D(a3,a4,fZc-113.0*
CLHEP::mm)*HepGeom::RotateZ3D(alpha);
2700 HepGeom::Vector3D<double> OriginShift=RPPin1+DetPin1-MainPoint;
2702 CLHEP::Hep3Vector TranslationInMainPoint=CorrectionInDetPin1.getTranslation()-CorrectionInDetPin1*OriginShift+OriginShift;
2704 CLHEP::HepRotation RotationInMainPoint=CorrectionInDetPin1.getRotation();
2707 PointRealD3=CorrectionInMainPoint*PointIdealD3;
2708 PointRealD4=CorrectionInMainPoint*PointIdealD4;
2709 PointRealD5=CorrectionInMainPoint*PointIdealD5;
2714 m_RPPosParams[eRPName].VecIdealDetRefPoints[0]=PointIdealD5;
2717 m_RPPosParams[eRPName].VecIdealDetRefPoints[1]=PointIdealD4;
2720 m_RPPosParams[eRPName].VecIdealDetRefPoints[2]=PointIdealD3;
◆ SetupRPMetrologyPoints()
Definition at line 2726 of file ALFA_GeometryReader.cxx.
2732 double fCurrentLVDTmm;
2733 HepGeom::Point3D<double> PSinStation, RPPinNominal;
2734 double fCurrentLVDT=0.0;
2735 std::vector<double> vecPolyFitParams;
2736 std::vector<HepGeom::Point3D<double> > vecPSinRPCS;
2737 std::vector<HepGeom::Point3D<double> > vecNominalPSinStationCS;
2738 std::vector<HepGeom::Point3D<double> > vecRealPSinStationCS;
2749 vecNominalPSinStationCS.resize(nCnt);
2750 vecRealPSinStationCS.resize(nCnt);
2753 if(!CfgParams.
IsKey(
"psinrpss"))
return false;
2757 for(
i=0;
i<nCnt;
i++){
2758 vecNominalPSinStationCS[
i]=RPPinNominal+HepGeom::RotateX3D(RPPosParams.
bIsLow? 180*
CLHEP::deg:0.0)*vecPSinRPCS[
i];
2791 PSinStation.set(fx,fy,fz);
2792 vecRealPSinStationCS[0]=PSinStation;
2800 PSinStation.set(fx,fy,fz);
2801 vecRealPSinStationCS[1]=PSinStation;
2809 PSinStation.set(fx,fy,fz);
2810 vecRealPSinStationCS[2]=PSinStation;
2819 m_RPPosParams[eRPName].VecIdealRPRefPoints=vecNominalPSinStationCS;
2820 m_RPPosParams[eRPName].VecRealRPRefPoints=vecRealPSinStationCS;
◆ SetupStationMetrologyPoints()
Definition at line 2827 of file ALFA_GeometryReader.cxx.
2829 std::vector<HepGeom::Point3D<double> > vecShiftPoints;
2832 if(!CfgParams.
IsKey(
"shifte"))
return false;
2837 if(!CfgParams.
IsKey(
"shifts"))
return false;
◆ SetupSWCorrections()
◆ SetupUserCorrections()
◆ SetVFiberPositionToMainReference()
void ALFA_GeometryReader::SetVFiberPositionToMainReference |
( |
const eRPotName |
eRPName, |
|
|
const int |
nPlateID, |
|
|
const int |
nFiberID, |
|
|
const HepGeom::Point3D< float > & |
TransPoint, |
|
|
const double |
fTransSlope |
|
) |
| |
Definition at line 1577 of file ALFA_GeometryReader.cxx.
1583 MsgStream LogStream(
Athena::getMessageSvc(),
"ALFA_GeometryReader::SetVFiberPositionToMainReference");
1586 LogStream<<MSG::ERROR<<
"Invalid coordinate system"<<
endmsg;
1591 for(iter=(*rpiter).second.ListVFibers.begin();iter!=(*rpiter).second.ListVFibers.end();++iter){
1592 if(((*iter).nPlateID==nPlateID) && ((*iter).nFiberID==nFiberID))
break;
1595 if(iter==(*rpiter).second.ListVFibers.end()){
1596 LogStream<<MSG::ERROR<<
"Cannot find fiber PotID="<<eRPName<<
", PlateID="<<nPlateID<<
" and FiberID="<<nFiberID<<
endmsg;
1600 (*iter).MainRefPointPos=TransPoint;
1601 (*iter).fMainRefPointSlope=fTransSlope;
1605 LogStream<<MSG::ERROR<<
"Unknown Roman pot PotID="<<eRPName<<
endmsg;
◆ StoreReconstructionGeometry()
Definition at line 1718 of file ALFA_GeometryReader.cxx.
1721 double fParamB, fY, fX, fZ, fSlope;
1728 LogStream<<MSG::ERROR<<
"Invalid coordinate system"<<
endmsg;
1732 pFile = fopen(szDataDestination,
"w");
1733 if(pFile==
nullptr)
return false;
1735 fprintf(pFile,
"xxxxxxxxxxxxxxxxxxx\n");
1740 fprintf(pFile,
"20\n");
1752 fParamB=fY-fSlope*fX;
1760 fprintf(pFile,
" %2d %2d %7.5f %7.4f %7.3f\n", (
i*2-1), j, fSlope, fParamB, fZ);
1773 fParamB=fY-fSlope*fX;
1781 fprintf(pFile,
" %2d %2d %7.5f %7.4f %7.3f\n", (
i*2), j, fSlope, fParamB, fZ);
1788 fprintf(pFile,
"6\n");
1802 fParamB=fY-fSlope*fX;
1810 fprintf(pFile,
" %2d %2d %7.5f %7.4f %7.3f\n", (
i*2-1), j, fSlope, fParamB, fZ);
1824 fParamB=fY-fSlope*fX;
1832 fprintf(pFile,
" %2d %2d %7.5f %7.4f %7.3f\n", (
i*2-1), j, fSlope, fParamB, fZ);
1848 fParamB=fY-fSlope*fX;
1855 fprintf(pFile,
" %2d %2d %7.5f %7.4f %7.3f\n", (
i*2), j, fSlope, fParamB, fZ);
1871 fParamB=fY-fSlope*fX;
1878 fprintf(pFile,
" %2d %2d %7.5f %7.4f %7.3f\n", (
i*2), j, fSlope, fParamB, fZ);
◆ TransformFiberPositions()
◆ TransformFiberPositionsFCSAtlas()
Definition at line 274 of file ALFA_GeometryReader.cxx.
282 const double MD_stagger[10] = {0.0, 0.283, -0.141, 0.141, -0.283, 0.354, -0.071, 0.212, -0.212, 0.071};
283 const double OD_stagger[3] = {0.0, -0.167, -0.334};
284 const double fSCY=-126.3765+0.0045;
286 const double fSCY_ODFiberU=-106.333;
287 const double fSCY_ODFiberV=-113.833;
295 double fCentrePos=0.0, fZOffset=0.0;
307 pFiberParams->
fOffset=-1.414213562*fCentrePos+fSCY-fStagger;
311 pFiberParams->
fOffset=+1.414213562*fCentrePos+fSCY+fStagger;
326 pFiberParams->
fOffset=fCentrePos+fSCY_ODFiberV+fStagger;
334 pFiberParams->
fOffset=fCentrePos+fSCY_ODFiberV+fStagger;
348 pFiberParams->
fOffset=fCentrePos+fSCY_ODFiberU+fStagger;
356 pFiberParams->
fOffset=fCentrePos+fSCY_ODFiberU+fStagger;
367 HepGeom::Point3D<double> DetFiberPoint1, DetFiberPoint2, DetPin1Point;
368 HepGeom::Point3D<double> AtlFiberPoint1, AtlFiberPoint2, AtlDetPin1Point;
369 HepGeom::Point3D<double> AtlProjFiberPoint1, AtlProjFiberPoint2;
371 DetPin1Point=HepGeom::Point3D<double>(0.0,0.0,0.0);
372 DetFiberPoint1=HepGeom::Point3D<double>(0.0,pFiberParams->
fOffset,(RPPosParams.
bIsLow)? -fZOffset:+fZOffset);
373 DetFiberPoint2=HepGeom::Point3D<double>(-pFiberParams->
fOffset/pFiberParams->
fSlope,0.0,(RPPosParams.
bIsLow)? -fZOffset:+fZOffset);
379 AtlProjFiberPoint1=HepGeom::Point3D<double>(AtlFiberPoint1[0],AtlFiberPoint1[1],AtlDetPin1Point[2]+fZOffset);
380 AtlProjFiberPoint2=HepGeom::Point3D<double>(AtlFiberPoint2[0],AtlFiberPoint2[1],AtlDetPin1Point[2]+fZOffset);
382 double fx2=AtlProjFiberPoint1[0]+AtlProjFiberPoint1[1]*(AtlProjFiberPoint2[0]-AtlProjFiberPoint1[0])/(AtlProjFiberPoint1[1]-AtlProjFiberPoint2[1]);
383 double fy1=AtlProjFiberPoint1[1]+AtlProjFiberPoint1[0]*(AtlProjFiberPoint2[1]-AtlProjFiberPoint1[1])/(AtlProjFiberPoint1[0]-AtlProjFiberPoint2[0]);
390 HepGeom::Vector3D<double> DirVector=AtlFiberPoint2-AtlFiberPoint1;
◆ TransformFiberPositionsFCSCladding()
Definition at line 135 of file ALFA_GeometryReader.cxx.
137 const double ALFA_stagger[10] = {0.0, 0.283, -0.141, 0.141, -0.283, 0.354, -0.071, 0.212, -0.212, 0.071};
138 const double OD_stagger[3] = {0.0, -0.167, -0.334};
139 const double fSCY=-126.3765+0.0045;
141 const double fSCY_ODFiberU=-106.333;
142 const double fSCY_ODFiberV=-113.833;
144 const double fSCX_ODFiber00=-23.00;
145 const double fSCX_ODFiber01=+23.00;
157 LogStream<<MSG::ERROR<<
"Wrong PlateID "<<pFiberParams->
nPlateID<<
" (RP no."<<eRPName<<
")"<<
endmsg;
171 LogStream<<MSG::ERROR<<
"Wrong ODPlateID "<<pFiberParams->
nPlateID<<
" (RP no."<<eRPName<<
")"<<
endmsg;
◆ UpdateGeometry()
void ALFA_GeometryReader::UpdateGeometry |
( |
| ) |
|
|
private |
◆ UpdateSimRPPos()
Definition at line 798 of file ALFA_GeometryReader.cxx.
802 HepGeom::Scale3D AuxScale;
827 HepGeom::Vector3D<double> NominalDetNormal=HepGeom::Vector3D<double>(0.0,0.0,1.0);
848 HepGeom::Point3D<double> RPPin1,MainPoint;
857 std::vector<HepGeom::Point3D<double> > VecIdealDetRefPoints(nCnt);
858 std::vector<HepGeom::Point3D<double> > VecRealDetRefPoints(nCnt);
861 VecIdealDetRefPoints[
i]=
m_RPPosParams[eRPName].VecIdealDetRefPoints[
i];
874 CLHEP::HepRotation RotationInMainPoint=Params.
DetSWTransform.getRotation();
◆ UpdateStationsPosParams()
void ALFA_GeometryReader::UpdateStationsPosParams |
( |
| ) |
|
|
private |
Definition at line 767 of file ALFA_GeometryReader.cxx.
771 HepGeom::Vector3D<double> MeanShift;
777 m_ASPosParams[eASName].ASTransformInMainPoint=HepGeom::Translate3D(MeanShift);
783 m_ASPosParams[eASName].ASTransformInMainPoint=HepGeom::Translate3D(MeanShift);
789 m_ASPosParams[eASName].ASTransformInMainPoint=HepGeom::Translate3D(MeanShift);
795 m_ASPosParams[eASName].ASTransformInMainPoint=HepGeom::Translate3D(MeanShift);
◆ m_ASPosParams
◆ m_ConfigOpts
◆ m_eFCoordSystem
◆ m_eMetrologyType
◆ m_ListExistingRPots
std::list<eRPotName> ALFA_GeometryReader::m_ListExistingRPots |
|
private |
◆ m_MapRPot
◆ m_RPPosParams
◆ ms_NominalAlfaRefPoint
const HepGeom::Point3D< double > ALFA_GeometryReader::ms_NominalAlfaRefPoint =HepGeom::Point3D<double>(-77.5*CLHEP::mm,-35.2*CLHEP::mm,114.0*CLHEP::mm) |
|
static |
◆ ms_NominalDetPin1
const HepGeom::Point3D< double > ALFA_GeometryReader::ms_NominalDetPin1 =HepGeom::Point3D<double>(-77.5*CLHEP::mm,-35.0*CLHEP::mm,114.0*CLHEP::mm) |
|
static |
◆ ms_NominalRPMainPoint
const HepGeom::Point3D< double > ALFA_GeometryReader::ms_NominalRPMainPoint =HepGeom::Point3D<double>(0.0*CLHEP::mm,31.525*CLHEP::mm,8.0*CLHEP::mm) |
|
static |
◆ ms_NominalRPPin1
const HepGeom::Point3D< double > ALFA_GeometryReader::ms_NominalRPPin1 =HepGeom::Point3D<double>(+77.5*CLHEP::mm,+172.2*CLHEP::mm,-124.0*CLHEP::mm) |
|
static |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
void TransformFiberPositions(PFIBERPARAMS pFiberParams, eRPotName eRPName, const eFiberType eType, const eGeoSourceType eSourceType)
HepGeom::Point3D< double > DTPInAlfaCS
bool ReadFile(const eRPotName eRPName, const eFiberType eFType, const char *szFilename)
HepGeom::Point3D< double > IdealMainPointInStation
int Init(const char *szFile, const char *szSection)
int dsvd(double **a, int m, int n, double *w, double **v)
const char * GetParameter(const char *szKey) const
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
std::list< FIBERPARAMS > ListODFibersU1
HepGeom::Point3D< double > IdealMainPoint
std::list< FIBERPARAMS > ListVFibers
struct FIBERPARAMS::@49 fcs_atlas_full
struct CFGRPPOSPARAMS::@52 swcorr
HepGeom::Point3D< double > IdealRPPin3
HepGeom::Point3D< double > DCPInAlfaCS
void SetupCurrentLVDT(const PGEOMETRYCONFIGURATION pConfig)
bool ReadGeometry(const eRPotName eRPName, eFiberType eFType, const std::string &element, const std::string &tag, const std::string &node)
void SetupUserCorrections(const PGEOMETRYCONFIGURATION pConfig)
bool ReadDatabase(const eRPotName eRPName, const eFiberType eFType, const char *szDataSource)
#define INACTIVEDETEGDEDISTANCE
bool SetIdealGeometry(const eRPotName eRPName, const eFiberType eFType)
eFiberCoordSystem m_eFCoordSystem
HepGeom::Point3D< double > IdealRefPoint
void TransformFiberPositionsFCSAtlas(PFIBERPARAMS pFiberParams, eRPotName eRPName, const eFiberType eType, const eGeoSourceType eSourceType)
const char * GetRPotLabel(const eRPotName eRPName)
std::list< FIBERPARAMS > ListODFibersU0
bool GetVFiberParams(PFIBERPARAMS pFiberParams, const eRPotName eRPName, const int nPlateID, const int nFiberID)
HepGeom::Point3D< double > IdealMainPoint
HepGeom::Transform3D ASTransformInATLAS
HepGeom::Point3D< double > GetDetPointInRPot(eRPotName eRPName, const HepGeom::Point3D< double > &PointInDetCS)
std::vector< HepGeom::Point3D< double > > VecRealRPRefPoints
bool ParseRefPoints(const char *szvalue, std::vector< HepGeom::Point3D< double > > &vecRefPoints, eMetrologyCoordSystem eCSystem)
HepGeom::Transform3D DetTransformInMainPoint
std::vector< HepGeom::Point3D< double > > VecIdealRPRefPoints
struct FIBERPARAMS::@48 fcs_atlas
bool IsKey(const char *szKey) const
struct CFGRPPOSPARAMS::@53 usercorr
IMessageSvc * getMessageSvc(bool quiet=false)
std::string strODConnString
bool GetASPosParams(PASPOSPARAMS pRPosParams, const eAStationName eASName)
std::string strMDConnString
HepGeom::Transform3D UserTransformOfDetInRPot
double fMainRefPointSlope
std::map< eAStationName, ASPOSPARAMS > m_ASPosParams
void PrintFiberGeometry(std::ostream &OutStream)
std::list< FIBERDATA > m_ListFiberData
eMetrologyType m_eMetrologyType
bool bIsEnabledUserTranform
std::vector< HepGeom::Point3D< double > > VecIdealDetRefPoints
std::map< eRPotName, RPPOSPARAMS > m_RPPosParams
std::list< FIBERPARAMS > ListUFibers
bool ReadSource(const eGeoSourceType eSourceType, const eRPotName eRPName, const eFiberType eFType, const char *szDataSource)
HepGeom::Point3D< double > DCPInAtlasCS
HepGeom::Transform3D RPSWTransformInStation
HepGeom::Transform3D DetSWTransformInMainPoint
static const HepGeom::Point3D< double > ms_NominalDetPin1
void SetupSWCorrections(const PGEOMETRYCONFIGURATION pConfig)
HepGeom::Vector3D< double > ShiftE
HepGeom::Transform3D RPTransformInStation
HepGeom::Vector3D< double > ShiftS
bool SetupStationMetrologyPoints(ALFA_ConfigParams &CfgParams, eAStationName eASName)
Eigen::Affine3d Transform3D
struct FIBERPARAMS::@47 fcs_cladding
HepGeom::Transform3D DetIdealTransformInMainPoint
static const HepGeom::Point3D< double > ms_NominalAlfaRefPoint
HepGeom::Point3D< double > IdealRPPin1
HepGeom::Transform3D RPIdealTransformInStation
CFGRPPOSPARAMS CfgRPosParams[RPOTSCNT]
HepGeom::Point3D< float > MainRefPointPos
void Scale(TH1 *h, double d=1)
double atof(std::string_view str)
Converts a string into a double / float.
bool GetRPPosParams(PRPPOSPARAMS pRPosParams, const eRPotName eRPName)
std::list< eRPotName > m_ListExistingRPots
HepGeom::Point3D< double > GetDetPointInAtlas(eRPotName eRPName, const HepGeom::Point3D< double > &PointInDetCS)
static const HepGeom::Point3D< double > ms_NominalRPPin1
std::list< FIBERPARAMS > ListODFibersV1
std::list< FIBERPARAMS > ListODFibersV0
bool GetODFiberParams(PFIBERPARAMS pFiberParams, const eFiberType eFType, const eRPotName eRPName, const int nPlateID, const int nFiberID)
static const HepGeom::Point3D< double > ms_NominalRPMainPoint
HepGeom::Point3D< double > OriginOfDetSWTransform
HepGeom::Point3D< double > UserOriginOfDetTransInRPot
bool GetUFiberParams(PFIBERPARAMS pFiberParams, const eRPotName eRPName, const int nPlateID, const int nFiberID)
bool ParseRPMetrology(eGeoSourceType eSourceType, const char *szDataSource)
std::map< eRPotName, ROMAPOT > m_MapRPot
bool ReadFiberGeometry(const PGEOMETRYCONFIGURATION pConfig)
HepGeom::Transform3D UserTransformOfRPInStation
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
bool InitializeDefault(const PGEOMETRYCONFIGURATION pConfig)
HepGeom::Transform3D DetSWTransform
void TransformFiberPositionsFCSCladding(PFIBERPARAMS pFiberParams, eRPotName eRPName, const eFiberType eType, const eGeoSourceType eSourceType)
std::string strRPMetrologyConnString
bool SetupRPMetrologyPoints(ALFA_ConfigParams &CfgParams, eRPotName eRPName)
HepGeom::Transform3D ComputeTransformMatrix(const std::vector< HepGeom::Point3D< double > > &VecIdealRefPoints, const std::vector< HepGeom::Point3D< double > > &VecRealRefPoints, const int nPointCnt, HepGeom::Scale3D &Scale, bool bForceUseSVD=false)
HepGeom::Point3D< double > IdealRPPin2
void UpdateStationsPosParams()
bool SetupDetMetrologyPoints(ALFA_ConfigParams &CfgParams, eRPotName eRPName)
double GetPolyFitValue(const double fInputValue, const std::vector< double > &vecPolyFitParams)
void UpdateSimRPPos(const eRPotName eRPName)
bool ParseArrayOfValues(const char *szvalue, std::vector< double > &vecValues)