59 return StatusCode::FAILURE;
93 SmartIF<ITHistSvc> tHistSvc{service(
"THistSvc")};
95 ATH_MSG_ERROR(
"initialize() Could not find Hist Service -> Switching ValidationMode Off !" );
101 ATH_MSG_ERROR(
"initialize() Could not register the validation Trees -> Switching ValidationMode Off !" );
107 ATH_MSG_INFO(
"initialize() RandomService = " << randSvc()->name() );
108 m_gaussDist =
new Rndm::Numbers(randSvc(), Rndm::Gauss(0.,1.));
109 m_flatDist =
new Rndm::Numbers(randSvc(), Rndm::Flat(0.,1.));
116 ATH_MSG_INFO(
"initialize() cylinder dimensions vector from jobOptions :" );
121 ATH_MSG_INFO(
"initialize() cylinder dimensions array for algorithm and ROOT tree :" );
127 ATH_MSG_WARNING(
"initialize() layer " << lay <<
"dimensions are smaller than those of layer " << lay-1 <<
" - constraining m_cylinders to " << lay-1 );
157 return StatusCode::SUCCESS;
191 const EventContext& ctx = Gaudi::Hive::currentContext();
201 ATH_MSG_WARNING(
"execute() No highest TrackingVolume / no VolumeBounds ... pretty useless!" );
202 return StatusCode::SUCCESS;
254 ATH_MSG_DEBUG(
"execute() Start Parameters : [phi,eta] = [ " << startParameters.
momentum().phi() <<
", " << startParameters.
eta() <<
" ]" );
275 const std::vector<const Trk::TrackStateOnSurface*>* collectedMaterial =
285 if (collectedMaterial && !collectedMaterial->empty()) {
291 for (
const auto* tsos : *collectedMaterial) {
292 newX0 += tsos->materialEffectsOnTrack() ? tsos->materialEffectsOnTrack()->thicknessInX0() : 0;
306 if (!lastParameters) {
307 ATH_MSG_WARNING(
"execute() Layer " << lay <<
": start parameters for cylinder NOT found - skip event !" );
310 ATH_MSG_VERBOSE(
"execute() Layer " << lay <<
": start parameters for cylinder found: " << *lastParameters );
314 newParameters =
nullptr;
319 m_onion ? *lastParameters : startParameters,
328 const std::vector<const Trk::TrackStateOnSurface*>* collectedMaterial =
330 m_onion ? *lastParameters : startParameters,
337 if (collectedMaterial && !collectedMaterial->empty()){
346 for (
const auto* tsos : *collectedMaterial) {
347 newX0 += tsos->materialEffectsOnTrack() ? tsos->materialEffectsOnTrack()->thicknessInX0() : 0;
355 if (!newParameters) {
361 m_onion ? *lastParameters : startParameters,
371 const std::vector<const Trk::TrackStateOnSurface*>* collectedMaterial =
373 m_onion ? *lastParameters : startParameters,
380 if (collectedMaterial && !collectedMaterial->empty()){
389 for (
const auto* tsos : *collectedMaterial) {
390 newX0 += tsos->materialEffectsOnTrack() ? tsos->materialEffectsOnTrack()->thicknessInX0() : 0;
399 if (!newParameters) {
400 ATH_MSG_WARNING(
"execute() Layer " << lay <<
" intersection did not work !" );
404 ATH_MSG_WARNING(
"execute() Layer " << lay <<
" intersection is outside the known world !" );
411 ATH_MSG_VERBOSE(
"execute() Track Parameters at layer " << lay <<
": " << *newParameters );
412 ATH_MSG_DEBUG(
"execute() Track Parameters at layer " << lay <<
": [r,z] = [ " << newPosition.perp() <<
", " << newPosition.z() );
439 lastParameters = newParameters;
454 ATH_MSG_DEBUG(
"execute() deleting DataVector parameters ... " );
456 return StatusCode::SUCCESS;
461 double x,
double y,
double z,
double phi,
double theta,
double alphaZ)
474 Amg::Vector3D surfaceYdirection(zAxis.cross(surfaceZdirection));
476 Amg::Vector3D surfaceXdirection(surfaceYdirection.cross(surfaceZdirection));
479 surfaceRotation.col(0) = surfaceXdirection;
480 surfaceRotation.col(1) = surfaceYdirection;
481 surfaceRotation.col(2) = surfaceZdirection;
484 return std::make_unique<Amg::Transform3D>(surfaceRotation, surfacePosition);
487 return std::make_unique<Amg::Transform3D>(nominalTransform*
Amg::AngleAxis3D(alphaZ,zAxis));
constexpr double mass[PARTICLEHYPOTHESES]
the array of masses