|
ATLAS Offline Software
|
Go to the documentation of this file.
24 #include "CLHEP/Units/SystemOfUnits.h"
25 #include "CLHEP/Vector/Rotation.h"
26 #include "CLHEP/Vector/ThreeVector.h"
40 const std::string&
name,
41 const IInterface*
parent) :
43 m_calosurf(
"CaloSurfaceBuilder"),
44 m_extrapolator(
"Trk::Extrapolator/AtlasExtrapolator")
84 s = toolSvc()->retrieveTool(
"TBCaloCoordinate",
tool);
104 ATH_MSG_INFO (
"Successfully retrieved Tool CaloSurfaceBuilder "
123 double& etaCaloLocal,
double& phiCaloLocal)
132 ATH_MSG_WARNING (
"CaloVariables called with null Trk::TrackParameters*" ) ;
144 << pt_ctb.y() <<
" " << pt_ctb.z() <<
" R="
145 << std::sqrt( pt_ctb.x()*pt_ctb.x() + pt_ctb.y()*pt_ctb.y()
146 + pt_ctb.z()*pt_ctb.z())
147 <<
" eta=" << pt_ctb.eta() <<
" phi=" << pt_ctb.phi() );
152 << pt_local.x() <<
" "
153 << pt_local.y() <<
" " << pt_local.z() <<
" R="
154 << std::sqrt( pt_local.x()*pt_local.x() + pt_local.y()*pt_local.y()
155 + pt_local.z()*pt_local.z())
156 <<
" eta=" << pt_local.eta() <<
" phi=" << pt_local.phi());
159 etaCaloLocal = pt_local.eta();
160 phiCaloLocal = pt_local.phi();
171 ATH_MSG_WARNING (
"CaloLocalPoint TrkParam called with null Trk::TrackParameters*" );
176 ATH_MSG_WARNING (
"CaloLocalPoint TrkParam called with null Amg::Vector3D* pt_local" );
181 ATH_MSG_WARNING (
"CaloLocalPoint TrkParam called with null Amg::Vector3D* pt_ctb" );
189 << pt_ctb->x() <<
" "
190 << pt_ctb->y() <<
" " << pt_ctb->z() <<
" R="
191 << std::sqrt( pt_ctb->x()*pt_ctb->x() + pt_ctb->y()*pt_ctb->y()
192 + pt_ctb->z()*pt_ctb->z())
193 <<
" eta=" << pt_ctb->eta() <<
" phi=" << pt_ctb->phi() );
198 << pt_local->x() <<
" "
199 << pt_local->y() <<
" " << pt_local->z() <<
" R="
200 << std::sqrt( pt_local->x()*pt_local->x()
201 + pt_local->y()*pt_local->y()
202 + pt_local->z()*pt_local->z())
203 <<
" eta=" << pt_local->eta() <<
" phi=" << pt_local->phi());
215 ATH_MSG_WARNING (
"TrackSeenByCalo Trk called with null Trk::TrackParameters*" );
220 ATH_MSG_WARNING (
"TrackSeenByCalo Trk called with null Amg::Vector3D* pt_local");
226 ATH_MSG_WARNING (
"TrackSeenByCalo Trk called with null Amg::Vector3D* pt_ctb");
233 bool success =
false;
270 bool success =
false;
274 ATH_MSG_WARNING (
"TrackSeenByCalo TrkParam called with null Trk::TrackParameters*" );
280 ATH_MSG_WARNING(
"TrackSeenByCalo TrkParam called with null Amg::Vector3D* pt_local" );
285 ATH_MSG_WARNING (
"TrackSeenByCalo TrkParam called with null Amg::Vector3D* pt_ctb" );
291 double trketa = parm->
eta();
295 if (!surf)
return success;
315 const int sampling_or_module,
331 const int sampling_or_module,
347 double& trketa_atcalo,
double& trkphi_atcalo)
352 ATH_MSG_WARNING (
"TrackSeenByCalo Trk called with null Trk::TrackParameters*" );
357 ATH_MSG_WARNING (
"TrackSeenByCalo Trk called with null Amg::Vector3D* pt_local" ) ;
362 ATH_MSG_WARNING (
"TrackSeenByCalo Trk called with null Amg::Vector3D* pt_ctb" );
367 bool success =
false;
375 if ((*caloMgrHandle)->lar_geometry() ==
"H8") {
393 trketa_atcalo = param->
eta();
395 trkphi_atcalo = std::acos(
cos(param->parameters()[
Trk::phi]));
397 trkphi_atcalo = -1. * std::acos(
cos(param->parameters()[
Trk::phi]));
403 trketa_atcalo = 999999.;
404 trkphi_atcalo = 999999.;
429 ATH_MSG_WARNING (
"extrapolate TrkParam called with null Trk::TrackParameters*" ) ;
441 ATH_MSG_DEBUG (
"Trying to propagate TrackParameters to Surface ... "
446 Gaudi::Hive::currentContext(),
478 ATH_MSG_DEBUG (
"Trying to propagate to Surface ... " << (*surf) );
481 Gaudi::Hive::currentContext(),
505 const EventContext& ctx = Gaudi::Hive::currentContext();
507 if (
vertex.vxTrackAtVertexAvailable())
511 for (
const auto& trkAtVertex :
vertex.vxTrackAtVertex())
520 else if (
vertex.nTrackParticles() == 1)
524 unsigned int index(0);
538 for (
unsigned int i = 0;
i <
vertex.nTrackParticles(); ++
i)
547 tp->perigeeParameters(),
def retrieve(aClass, aKey=None)
Intersection straightLineIntersection(const T &pars, bool forceDir=false, const Trk::BoundaryCheck &bchk=false) const
fst straight line intersection schema - templated for charged and neutral parameters
const Amg::Vector3D & position() const
Access method for the position.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
bool msgLvl(const MSG::Level lvl) const
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
static void build_sample(CaloCell_ID::SUBCALO subCalo, bool barrel, int sampling_or_module, CaloCell_ID::CaloSample &sample)
translate between the 2 ways to label a sub-detector:
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.
::StatusCode StatusCode
StatusCode definition for legacy code.
SUBCALO
enumeration of sub calorimeters
static double fix(double phi)
const DataVector< const TrackParameters > * trackParameters() const
Return a pointer to a vector of TrackParameters.
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
const Amg::Vector3D & momentum() const
Access method for the momentum.
Class describing a Vertex.
This class provides the client interface for accessing the detector description information common to...
#define ATH_MSG_WARNING(x)
double eta() const
Access method for pseudorapidity - from momentum.
Class describing a TrackParticle.