208 ATH_MSG_ERROR(
"m_pGeometryReader: unable to retrieve data from SG");
228 return StatusCode::SUCCESS;
242 return StatusCode::SUCCESS;
249 return StatusCode::SUCCESS;
254 double fRecPosX = -9999.0, fRecPosY = -9999.0, fRecPosOD = -9999.0;
255 HepGeom::Point3D<double> PointInDetCS;
256 HepGeom::Point3D<double> PointInPotCS;
257 HepGeom::Point3D<double> PointInStatCS;
258 HepGeom::Point3D<double> PointInAtlasCS;
264 if(
sc.isFailure() || !pLocRecCorrCol)
275 for(; mcColBeg!=mcColEnd; ++mcColBeg)
277 iAlgo = (*mcColBeg)->getAlgoNum();
278 iRPot = (*mcColBeg)->getPotNum();
279 fRecPosX = (*mcColBeg)->getXposition();
280 fRecPosY = (*mcColBeg)->getYposition();
282 PointInDetCS = HepGeom::Point3D<double>(fRecPosX, fRecPosY, 10.0);
287 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));
292 if(
sc.isFailure() || !pLocRecCorrODCol)
304 for(; mcColODBeg!=mcColODEnd; ++mcColODBeg)
306 iAlgo = (*mcColODBeg)->getAlgoNum();
307 iRPot = (*mcColODBeg)->getPotNum();
308 iSide = (*mcColODBeg)->getSide();
309 fRecPosOD = (*mcColODBeg)->getYposition();
311 iSign = (iSide==0)? -1 : 1;
312 PointInDetCS = HepGeom::Point3D<double>(iSign*22, fRecPosOD, 35.5);
321 return StatusCode::SUCCESS;
341 ATH_MSG_DEBUG(
"begin ALFA_LocRecCorr::UserTransform3DInStation()");
343 CLHEP::HepRep3x3 matRotation;
389 ATH_MSG_WARNING(
"Unknown Roman pot, station transformation will be set to default (zero) values");
390 structUserTransform.
fAngle = 0.0;
391 structUserTransform.
vecRotation = CLHEP::Hep3Vector(0.0, 0.0, 0.0);
392 structUserTransform.
vecTranslation = CLHEP::Hep3Vector(0.0, 0.0, 0.0);
395 double fPhi = structUserTransform.
fAngle;
397 CLHEP::Hep3Vector vRotation = CLHEP::Hep3Vector(structUserTransform.
vecRotation);
398 CLHEP::Hep3Vector vTranslation = CLHEP::Hep3Vector(structUserTransform.
vecTranslation);
400 matRotation.xx_ = vRotation.x()*vRotation.x()*(1 -
cos(fPhi)) +
cos(fPhi);
401 matRotation.xy_ = vRotation.x()*vRotation.y()*(1 -
cos(fPhi)) - vRotation.z()*
sin(fPhi);
402 matRotation.xz_ = vRotation.x()*vRotation.z()*(1 -
cos(fPhi)) + vRotation.y()*
sin(fPhi);
404 matRotation.yx_ = vRotation.y()*vRotation.x()*(1 -
cos(fPhi)) + vRotation.z()*
sin(fPhi);
405 matRotation.yy_ = vRotation.y()*vRotation.y()*(1 -
cos(fPhi)) +
cos(fPhi);
406 matRotation.yz_ = vRotation.y()*vRotation.z()*(1 -
cos(fPhi)) - vRotation.x()*
sin(fPhi);
408 matRotation.zx_ = vRotation.z()*vRotation.x()*(1 -
cos(fPhi)) - vRotation.y()*
sin(fPhi);
409 matRotation.zy_ = vRotation.z()*vRotation.y()*(1 -
cos(fPhi)) + vRotation.x()*
sin(fPhi);
410 matRotation.zz_ = vRotation.z()*vRotation.z()*(1 -
cos(fPhi)) +
cos(fPhi);
412 ATH_MSG_DEBUG(
"end ALFA_LocRecCorr::UserTransform3DInStation()");
420 ATH_MSG_DEBUG(
"begin ALFA_LocRecCorr::UserTransform3DInDetector()");
422 CLHEP::HepRep3x3 matRotation;
468 ATH_MSG_WARNING(
"Unknown Roman pot, detector transformation will be set to default (zero) values");
469 structUserTransform.
fAngle = 0.0;
470 structUserTransform.
vecRotation = CLHEP::Hep3Vector(0.0, 0.0, 0.0);
471 structUserTransform.
vecTranslation = CLHEP::Hep3Vector(0.0, 0.0, 0.0);
474 double fPhi = structUserTransform.
fAngle;
476 CLHEP::Hep3Vector vRotation = CLHEP::Hep3Vector(structUserTransform.
vecRotation);
477 CLHEP::Hep3Vector vTranslation = CLHEP::Hep3Vector(structUserTransform.
vecTranslation);
479 matRotation.xx_ = vRotation.x()*vRotation.x()*(1 -
cos(fPhi)) +
cos(fPhi);
480 matRotation.xy_ = vRotation.x()*vRotation.y()*(1 -
cos(fPhi)) - vRotation.z()*
sin(fPhi);
481 matRotation.xz_ = vRotation.x()*vRotation.z()*(1 -
cos(fPhi)) + vRotation.y()*
sin(fPhi);
483 matRotation.yx_ = vRotation.y()*vRotation.x()*(1 -
cos(fPhi)) + vRotation.z()*
sin(fPhi);
484 matRotation.yy_ = vRotation.y()*vRotation.y()*(1 -
cos(fPhi)) +
cos(fPhi);
485 matRotation.yz_ = vRotation.y()*vRotation.z()*(1 -
cos(fPhi)) - vRotation.x()*
sin(fPhi);
487 matRotation.zx_ = vRotation.z()*vRotation.x()*(1 -
cos(fPhi)) - vRotation.y()*
sin(fPhi);
488 matRotation.zy_ = vRotation.z()*vRotation.y()*(1 -
cos(fPhi)) + vRotation.x()*
sin(fPhi);
489 matRotation.zz_ = vRotation.z()*vRotation.z()*(1 -
cos(fPhi)) +
cos(fPhi);
491 ATH_MSG_DEBUG(
"end ALFA_LocRecCorr::UserTransform3DInDetector()");
501 HepGeom::Point3D<double>
Point;
530 ATH_MSG_WARNING(
"Unknown Roman pot, transformation point will be set to default (zero) value");
550 ATH_MSG_FATAL(
"MD - Could not record the empty LocRecCorrEv collection in StoreGate");
555 ATH_MSG_DEBUG(
"MD - LocRecCorrEv collection was recorded in StoreGate");
566 ATH_MSG_DEBUG(
"begin ALFA_LocRecCorr::RecordODCollection()");
575 ATH_MSG_FATAL(
"OD - Could not record the empty LocRecCorrEv collection in StoreGate");
581 ATH_MSG_DEBUG(
"OD - LocRecCorrEv collection is recorded in StoreGate");
592 ATH_MSG_DEBUG(
"begin ALFA_LocRecCorr::AddCOOLFolderCallback()");
598 if(
sc!=StatusCode::SUCCESS)
600 ATH_MSG_ERROR(
"Cannot register COOL callback for folder '"<<szFolder<<
"'");
603 ATH_MSG_DEBUG(
"end ALFA_LocRecCorr::AddCOOLFolderCallback()");
615 list<string>::const_iterator iter;
619 for(iter=
keys.begin();iter!=
keys.end();++iter)
621 if((*iter)==
"/FWD/ALFA/position_calibration")
623 ATH_MSG_DEBUG(
" IOV/COOL Notification '"<<
"/FWD/ALFA/position_calibration"<<
"'");
625 if(
detStore()->
retrieve(listAttrColl,
"/FWD/ALFA/position_calibration")==StatusCode::SUCCESS)
627 for(iterAttr=listAttrColl->
begin();iterAttr!=listAttrColl->
end();++iterAttr)
629 iChannel=iterAttr->first;
641 ATH_MSG_DEBUG(
"Geometry for the SW corrections updated successfully");
645 ATH_MSG_FATAL(
"Unable to update a geometry of the SW corrections!");
647 return StatusCode::FAILURE;
652 ATH_MSG_ERROR(
"The folder '"<<
"/FWD/ALFA/position_calibration"<<
"' not found");
654 return StatusCode::FAILURE;
667 ATH_MSG_DEBUG(
"begin ALFA_LocRecCorr::UpdateGeometryAtlas()");
676 ATH_MSG_FATAL(
"Cannot update geometry. Initialization process failed.");