194 ATH_MSG_ERROR(
"m_pGeometryReader: unable to retrieve data from SG");
214 return StatusCode::SUCCESS;
221 StatusCode
sc = StatusCode::SUCCESS;
227 return StatusCode::SUCCESS;
234 return StatusCode::SUCCESS;
239 double fRecPosX = -9999.0, fRecPosY = -9999.0, fRecPosOD = -9999.0;
240 HepGeom::Point3D<double> PointInDetCS;
241 HepGeom::Point3D<double> PointInPotCS;
242 HepGeom::Point3D<double> PointInStatCS;
243 HepGeom::Point3D<double> PointInAtlasCS;
249 if(
sc.isFailure() || !pLocRecCorrCol)
260 for(; mcColBeg!=mcColEnd; ++mcColBeg)
262 iAlgo = (*mcColBeg)->getAlgoNum();
263 iRPot = (*mcColBeg)->getPotNum();
264 fRecPosX = (*mcColBeg)->getXposition();
265 fRecPosY = (*mcColBeg)->getYposition();
267 PointInDetCS = HepGeom::Point3D<double>(fRecPosX, fRecPosY, 10.0);
272 m_pLocRecCorrEvCollection->push_back(
new ALFA_LocRecCorrEvent(iAlgo, iRPot, PointInAtlasCS[0], PointInAtlasCS[1], PointInAtlasCS[2], PointInPotCS[0], PointInPotCS[1], PointInStatCS[0], PointInStatCS[1], -9999.0, -9999.0));
277 if(
sc.isFailure() || !pLocRecCorrODCol)
289 for(; mcColODBeg!=mcColODEnd; ++mcColODBeg)
291 iAlgo = (*mcColODBeg)->getAlgoNum();
292 iRPot = (*mcColODBeg)->getPotNum();
293 iSide = (*mcColODBeg)->getSide();
294 fRecPosOD = (*mcColODBeg)->getYposition();
296 iSign = (iSide==0)? -1 : 1;
297 PointInDetCS = HepGeom::Point3D<double>(iSign*22, fRecPosOD, 35.5);
306 return StatusCode::SUCCESS;
313 ATH_MSG_DEBUG(
"begin ALFA_LocRecCorr::UserTransform3DInStation()");
315 CLHEP::HepRep3x3 matRotation;
361 ATH_MSG_WARNING(
"Unknown Roman pot, station transformation will be set to default (zero) values");
362 structUserTransform.
fAngle = 0.0;
363 structUserTransform.
vecRotation = CLHEP::Hep3Vector(0.0, 0.0, 0.0);
364 structUserTransform.
vecTranslation = CLHEP::Hep3Vector(0.0, 0.0, 0.0);
367 double fPhi = structUserTransform.
fAngle;
369 CLHEP::Hep3Vector vRotation = CLHEP::Hep3Vector(structUserTransform.
vecRotation);
370 CLHEP::Hep3Vector vTranslation = CLHEP::Hep3Vector(structUserTransform.
vecTranslation);
372 matRotation.xx_ = vRotation.x()*vRotation.x()*(1 - cos(fPhi)) + cos(fPhi);
373 matRotation.xy_ = vRotation.x()*vRotation.y()*(1 - cos(fPhi)) - vRotation.z()*sin(fPhi);
374 matRotation.xz_ = vRotation.x()*vRotation.z()*(1 - cos(fPhi)) + vRotation.y()*sin(fPhi);
376 matRotation.yx_ = vRotation.y()*vRotation.x()*(1 - cos(fPhi)) + vRotation.z()*sin(fPhi);
377 matRotation.yy_ = vRotation.y()*vRotation.y()*(1 - cos(fPhi)) + cos(fPhi);
378 matRotation.yz_ = vRotation.y()*vRotation.z()*(1 - cos(fPhi)) - vRotation.x()*sin(fPhi);
380 matRotation.zx_ = vRotation.z()*vRotation.x()*(1 - cos(fPhi)) - vRotation.y()*sin(fPhi);
381 matRotation.zy_ = vRotation.z()*vRotation.y()*(1 - cos(fPhi)) + vRotation.x()*sin(fPhi);
382 matRotation.zz_ = vRotation.z()*vRotation.z()*(1 - cos(fPhi)) + cos(fPhi);
384 ATH_MSG_DEBUG(
"end ALFA_LocRecCorr::UserTransform3DInStation()");
386 return HepGeom::Transform3D(CLHEP::HepRotation(matRotation), vTranslation);
392 ATH_MSG_DEBUG(
"begin ALFA_LocRecCorr::UserTransform3DInDetector()");
394 CLHEP::HepRep3x3 matRotation;
440 ATH_MSG_WARNING(
"Unknown Roman pot, detector transformation will be set to default (zero) values");
441 structUserTransform.
fAngle = 0.0;
442 structUserTransform.
vecRotation = CLHEP::Hep3Vector(0.0, 0.0, 0.0);
443 structUserTransform.
vecTranslation = CLHEP::Hep3Vector(0.0, 0.0, 0.0);
446 double fPhi = structUserTransform.
fAngle;
448 CLHEP::Hep3Vector vRotation = CLHEP::Hep3Vector(structUserTransform.
vecRotation);
449 CLHEP::Hep3Vector vTranslation = CLHEP::Hep3Vector(structUserTransform.
vecTranslation);
451 matRotation.xx_ = vRotation.x()*vRotation.x()*(1 - cos(fPhi)) + cos(fPhi);
452 matRotation.xy_ = vRotation.x()*vRotation.y()*(1 - cos(fPhi)) - vRotation.z()*sin(fPhi);
453 matRotation.xz_ = vRotation.x()*vRotation.z()*(1 - cos(fPhi)) + vRotation.y()*sin(fPhi);
455 matRotation.yx_ = vRotation.y()*vRotation.x()*(1 - cos(fPhi)) + vRotation.z()*sin(fPhi);
456 matRotation.yy_ = vRotation.y()*vRotation.y()*(1 - cos(fPhi)) + cos(fPhi);
457 matRotation.yz_ = vRotation.y()*vRotation.z()*(1 - cos(fPhi)) - vRotation.x()*sin(fPhi);
459 matRotation.zx_ = vRotation.z()*vRotation.x()*(1 - cos(fPhi)) - vRotation.y()*sin(fPhi);
460 matRotation.zy_ = vRotation.z()*vRotation.y()*(1 - cos(fPhi)) + vRotation.x()*sin(fPhi);
461 matRotation.zz_ = vRotation.z()*vRotation.z()*(1 - cos(fPhi)) + cos(fPhi);
463 ATH_MSG_DEBUG(
"end ALFA_LocRecCorr::UserTransform3DInDetector()");
465 return HepGeom::Transform3D(CLHEP::HepRotation(matRotation), vTranslation);
473 HepGeom::Point3D<double>
Point;
502 ATH_MSG_WARNING(
"Unknown Roman pot, transformation point will be set to default (zero) value");
515 StatusCode
sc = StatusCode::SUCCESS;
522 ATH_MSG_FATAL(
"MD - Could not record the empty LocRecCorrEv collection in StoreGate");
527 ATH_MSG_DEBUG(
"MD - LocRecCorrEv collection was recorded in StoreGate");
538 ATH_MSG_DEBUG(
"begin ALFA_LocRecCorr::RecordODCollection()");
540 StatusCode
sc = StatusCode::SUCCESS;
547 ATH_MSG_FATAL(
"OD - Could not record the empty LocRecCorrEv collection in StoreGate");
553 ATH_MSG_DEBUG(
"OD - LocRecCorrEv collection is recorded in StoreGate");
571 int iChannel=iterAttr->first;
576 ATH_MSG_DEBUG(
"iChannel, fXOffset, fTheta, fYOffset = " << iChannel <<
", " <<
m_Config.CfgRPosParams[iChannel].swcorr.fXOffset);
583 ATH_MSG_DEBUG(
"Geometry for the SW corrections updated successfully");
587 ATH_MSG_FATAL(
"Unable to update a geometry of the SW corrections!");
589 return StatusCode::FAILURE;
592 return StatusCode::SUCCESS;
598 ATH_MSG_DEBUG(
"begin ALFA_LocRecCorr::UpdateGeometryAtlas()");
607 ATH_MSG_FATAL(
"Cannot update geometry. Initialization process failed.");
624 m_Config.CfgRPosParams[i].usercorr.bIsEnabledUserTranform=
true;
630 m_Config.CfgRPosParams[i].usercorr.bIsEnabledUserTranform=
true;
struct _USERTRANSFORM USERTRANSFORM
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
char data[hepevt_bytes_allocation_ATLAS]
std::vector< double > m_vecTransformInStationB7R1U
ALFA_LocRecCorrEvCollection * m_pLocRecCorrEvCollection
HepGeom::Point3D< double > Point3DInDetector(eRPotName eRPName)
std::vector< double > m_vecTransformInStationA7R1U
std::string m_strKeyLocRecCorrODEvCollection
ALFA_GeometryReader * m_pGeometryReader
std::vector< bool > m_bIsTransformInDetector
std::vector< double > m_vecTransformInStationB7R1L
HepGeom::Transform3D UserTransform3DInStation(eRPotName eRPName)
HepGeom::Transform3D m_TransMatrixSt[RPOTSCNT]
GEOMETRYCONFIGURATION m_Config
std::vector< double > m_pointTransformInDetectorA7L1L
std::vector< double > m_vecTransformInDetectorA7R1U
std::vector< double > m_pointTransformInDetectorA7R1L
std::vector< double > m_vecTransformInDetectorB7L1L
std::vector< double > m_vecTransformInStationA7L1U
std::string m_strKeyLocRecEvCollection
std::vector< double > m_vecTransformInDetectorA7L1L
std::vector< double > m_vecTransformInStationA7R1L
std::vector< double > m_vecTransformInDetectorB7R1U
void SetNominalGeometry()
std::vector< double > m_vecTransformInDetectorA7L1U
std::string m_strKeyLocRecODEvCollection
std::vector< double > m_vecTransformInDetectorB7R1L
bool UpdateGeometryAtlas()
std::vector< double > m_vecTransformInDetectorB7L1U
StatusCode RecordCollection()
std::vector< double > m_vecTransformInStationA7L1L
std::string m_strLocRecCollectionName
std::vector< double > m_vecTransformInStationB7L1U
std::vector< double > m_pointTransformInDetectorB7L1L
std::vector< double > m_pointTransformInDetectorA7L1U
std::vector< double > m_vecTransformInStationB7L1L
std::vector< double > m_pointTransformInDetectorB7R1L
std::string m_strLocRecODCollectionName
ALFA_LocRecCorr(const std::string &name, ISvcLocator *pSvcLocator)
std::vector< bool > m_bIsTransformInStation
ALFA_LocRecCorrODEvCollection * m_pLocRecCorrODEvCollection
StatusCode RecordODCollection()
HepGeom::Transform3D UserTransform3DInDetector(eRPotName eRPName)
std::string m_strKeyLocRecCorrEvCollection
std::vector< double > m_pointTransformInDetectorA7R1U
std::vector< double > m_pointTransformInDetectorB7L1U
std::vector< double > m_vecTransformInDetectorA7R1L
std::string m_strKeyGeometryForReco
std::vector< double > m_pointTransformInDetectorB7R1U
std::list< eRPotName > m_ListExistingRPots
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
const ServiceHandle< StoreGateSvc > & detStore() const
ChanAttrListMap::const_iterator const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Default object of 2D space.
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring