ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
ActsTrk::TrackParamsEstimationTool Class Reference

#include <TrackParamsEstimationTool.h>

Inheritance diagram for ActsTrk::TrackParamsEstimationTool:
Collaboration diagram for ActsTrk::TrackParamsEstimationTool:

Public Member Functions

 TrackParamsEstimationTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~TrackParamsEstimationTool ()=default
 
virtual StatusCode initialize () override
 
virtual std::optional< Acts::BoundTrackParameters > estimateTrackParameters (const EventContext &ctx, const ActsTrk::Seed &seed, const Acts::GeometryContext &geoContext, const Acts::MagneticFieldContext &magFieldContext, std::function< const Acts::Surface &(const ActsTrk::Seed &)> retrieveSurface) const override
 
virtual std::optional< Acts::BoundTrackParameters > estimateTrackParameters (const EventContext &ctx, const ActsTrk::Seed &seed, const Acts::GeometryContext &geoContext, const Acts::Surface &surface, const Acts::BoundSquareMatrix &covariance, const Acts::Vector3 &bField, double bFieldMin) const override
 

Private Attributes

Gaudi::Property< double > m_bFieldMin
 
Gaudi::Property< double > m_sigmaLoc0
 
Gaudi::Property< double > m_sigmaLoc1
 
Gaudi::Property< double > m_sigmaPhi
 
Gaudi::Property< double > m_sigmaTheta
 
Gaudi::Property< double > m_sigmaQOverP
 
Gaudi::Property< double > m_sigmaT0
 
Gaudi::Property< std::vector< double > > m_initialVarInflation
 
Acts::BoundSquareMatrix m_covariance = Acts::BoundSquareMatrix::Zero()
 The track parameters covariance (assumed to be the same for all estimated track parameters for the moment) More...
 

Detailed Description

Definition at line 14 of file TrackParamsEstimationTool.h.

Constructor & Destructor Documentation

◆ TrackParamsEstimationTool()

ActsTrk::TrackParamsEstimationTool::TrackParamsEstimationTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 10 of file TrackParamsEstimationTool.cxx.

13  : base_class(type, name, parent)
14  {}

◆ ~TrackParamsEstimationTool()

virtual ActsTrk::TrackParamsEstimationTool::~TrackParamsEstimationTool ( )
virtualdefault

Member Function Documentation

◆ estimateTrackParameters() [1/2]

std::optional< Acts::BoundTrackParameters > ActsTrk::TrackParamsEstimationTool::estimateTrackParameters ( const EventContext &  ctx,
const ActsTrk::Seed seed,
const Acts::GeometryContext &  geoContext,
const Acts::MagneticFieldContext &  magFieldContext,
std::function< const Acts::Surface &(const ActsTrk::Seed &)>  retrieveSurface 
) const
overridevirtual

Definition at line 47 of file TrackParamsEstimationTool.cxx.

52  {
53  const auto& sp_collection = seed.sp();
54  if ( sp_collection.size() < 3 ) return std::nullopt;
55  const auto& bottom_sp = sp_collection.front();
56 
57  // Magnetic Field
58  ATLASMagneticFieldWrapper magneticField;
59  Acts::MagneticFieldProvider::Cache magFieldCache = magneticField.makeCache( magFieldContext );
60  Acts::Vector3 bField = *magneticField.getField( Acts::Vector3(bottom_sp->x(), bottom_sp->y(), bottom_sp->z()),
61  magFieldCache );
62 
63  // Get the surface
64  const Acts::Surface& surface = retrieveSurface(seed);
65 
66  return estimateTrackParameters(ctx,
67  seed,
68  geoContext,
69  surface,
71  bField,
72  m_bFieldMin);
73  }

◆ estimateTrackParameters() [2/2]

std::optional< Acts::BoundTrackParameters > ActsTrk::TrackParamsEstimationTool::estimateTrackParameters ( const EventContext &  ctx,
const ActsTrk::Seed seed,
const Acts::GeometryContext &  geoContext,
const Acts::Surface &  surface,
const Acts::BoundSquareMatrix &  covariance,
const Acts::Vector3 &  bField,
double  bFieldMin 
) const
overridevirtual

Definition at line 76 of file TrackParamsEstimationTool.cxx.

83  {
84  // Get SPs
85  const auto& sp_collection = seed.sp();
86  if ( sp_collection.size() < 3 ) return std::nullopt;
87 
88  // Compute Bound parameters at surface
89  std::optional<Acts::BoundVector> params_opt =
90  Acts::estimateTrackParamsFromSeed(geoContext,
91  sp_collection.begin(),
92  sp_collection.end(),
93  surface,
94  bField,
95  bFieldMin);
96 
97  if ( not params_opt.has_value() )
98  return std::nullopt;
99 
100  const auto& params = params_opt.value();
101 
102  // Create BoundTrackParameters
103  return Acts::BoundTrackParameters(surface.getSharedPtr(),
104  params,
105  covariance,
107  }

◆ initialize()

StatusCode ActsTrk::TrackParamsEstimationTool::initialize ( )
overridevirtual

Definition at line 16 of file TrackParamsEstimationTool.cxx.

17  {
18  ATH_MSG_INFO( "Initializing " << name() << "..." );
19 
20  ATH_MSG_DEBUG( "Properties Summary:" );
21  ATH_MSG_DEBUG( " " << m_bFieldMin );
22  ATH_MSG_DEBUG( " " << m_sigmaLoc0 );
23  ATH_MSG_DEBUG( " " << m_sigmaLoc1 );
24  ATH_MSG_DEBUG( " " << m_sigmaPhi );
25  ATH_MSG_DEBUG( " " << m_sigmaTheta );
26  ATH_MSG_DEBUG( " " << m_sigmaQOverP );
27  ATH_MSG_DEBUG( " " << m_sigmaT0 );
29 
30  m_covariance(Acts::eBoundLoc0, Acts::eBoundLoc0) =
31  m_initialVarInflation[Acts::eBoundLoc0] * m_sigmaLoc0 * m_sigmaLoc0;
32  m_covariance(Acts::eBoundLoc1, Acts::eBoundLoc1) =
33  m_initialVarInflation[Acts::eBoundLoc1] * m_sigmaLoc1 * m_sigmaLoc1;
34  m_covariance(Acts::eBoundPhi, Acts::eBoundPhi) =
35  m_initialVarInflation[Acts::eBoundPhi] * m_sigmaPhi * m_sigmaPhi;
36  m_covariance(Acts::eBoundTheta, Acts::eBoundTheta) =
37  m_initialVarInflation[Acts::eBoundTheta] * m_sigmaTheta * m_sigmaTheta;
38  m_covariance(Acts::eBoundQOverP, Acts::eBoundQOverP) =
39  m_initialVarInflation[Acts::eBoundQOverP] * m_sigmaQOverP * m_sigmaQOverP;
40  m_covariance(Acts::eBoundTime, Acts::eBoundTime) =
41  m_initialVarInflation[Acts::eBoundTime] * m_sigmaT0 * m_sigmaT0;
42 
43  return StatusCode::SUCCESS;
44  }

Member Data Documentation

◆ m_bFieldMin

Gaudi::Property< double > ActsTrk::TrackParamsEstimationTool::m_bFieldMin
private
Initial value:
{this, "bFieldMin", 0.1 * Acts::UnitConstants::T,
"The minimum magnetic field to trigger the track parameters estimation"}

Definition at line 48 of file TrackParamsEstimationTool.h.

◆ m_covariance

Acts::BoundSquareMatrix ActsTrk::TrackParamsEstimationTool::m_covariance = Acts::BoundSquareMatrix::Zero()
private

The track parameters covariance (assumed to be the same for all estimated track parameters for the moment)

Definition at line 67 of file TrackParamsEstimationTool.h.

◆ m_initialVarInflation

Gaudi::Property< std::vector<double> > ActsTrk::TrackParamsEstimationTool::m_initialVarInflation
private
Initial value:
{this, "initialVarInflation", {1., 1., 1., 1., 1., 1.},
"Inflate tracks"}

Definition at line 62 of file TrackParamsEstimationTool.h.

◆ m_sigmaLoc0

Gaudi::Property< double > ActsTrk::TrackParamsEstimationTool::m_sigmaLoc0
private
Initial value:
{this, "sigmaLoc0", 25 * Acts::UnitConstants::um,
"Constant term of the loc0 resolution"}

Definition at line 50 of file TrackParamsEstimationTool.h.

◆ m_sigmaLoc1

Gaudi::Property< double > ActsTrk::TrackParamsEstimationTool::m_sigmaLoc1
private
Initial value:
{this, "sigmaLoc1", 100 * Acts::UnitConstants::um,
"Constant term of the loc1 resolution"}

Definition at line 52 of file TrackParamsEstimationTool.h.

◆ m_sigmaPhi

Gaudi::Property< double > ActsTrk::TrackParamsEstimationTool::m_sigmaPhi
private
Initial value:
{this, "sigmaPhi", 0.02 * Acts::UnitConstants::degree,
"Phi angular resolution"}

Definition at line 54 of file TrackParamsEstimationTool.h.

◆ m_sigmaQOverP

Gaudi::Property< double > ActsTrk::TrackParamsEstimationTool::m_sigmaQOverP
private
Initial value:
{this, "sigmaQOverP", 0.1 / Acts::UnitConstants::GeV,
"q/p resolution"}

Definition at line 58 of file TrackParamsEstimationTool.h.

◆ m_sigmaT0

Gaudi::Property< double > ActsTrk::TrackParamsEstimationTool::m_sigmaT0
private
Initial value:
{this, "sigmaT0", 1 * Acts::UnitConstants::ns,
"Time resolution"}

Definition at line 60 of file TrackParamsEstimationTool.h.

◆ m_sigmaTheta

Gaudi::Property< double > ActsTrk::TrackParamsEstimationTool::m_sigmaTheta
private
Initial value:
{this, "sigmaTheta", 0.02 * Acts::UnitConstants::degree,
"Theta angular resolution"}

Definition at line 56 of file TrackParamsEstimationTool.h.


The documentation for this class was generated from the following files:
ActsTrk::TrackParamsEstimationTool::m_sigmaLoc0
Gaudi::Property< double > m_sigmaLoc0
Definition: TrackParamsEstimationTool.h:50
ActsTrk::TrackParamsEstimationTool::estimateTrackParameters
virtual std::optional< Acts::BoundTrackParameters > estimateTrackParameters(const EventContext &ctx, const ActsTrk::Seed &seed, const Acts::GeometryContext &geoContext, const Acts::MagneticFieldContext &magFieldContext, std::function< const Acts::Surface &(const ActsTrk::Seed &)> retrieveSurface) const override
Definition: TrackParamsEstimationTool.cxx:47
ATLASMagneticFieldWrapper
Definition: ATLASMagneticFieldWrapper.h:15
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ActsTrk::TrackParamsEstimationTool::m_initialVarInflation
Gaudi::Property< std::vector< double > > m_initialVarInflation
Definition: TrackParamsEstimationTool.h:62
ActsTrk::TrackParamsEstimationTool::m_sigmaTheta
Gaudi::Property< double > m_sigmaTheta
Definition: TrackParamsEstimationTool.h:56
xAOD::pion
@ pion
Definition: TrackingPrimitives.h:196
ActsTrk::TrackParamsEstimationTool::m_covariance
Acts::BoundSquareMatrix m_covariance
The track parameters covariance (assumed to be the same for all estimated track parameters for the mo...
Definition: TrackParamsEstimationTool.h:67
ATLASMagneticFieldWrapper::makeCache
MagneticFieldProvider::Cache makeCache(const Acts::MagneticFieldContext &mctx) const override
Definition: ATLASMagneticFieldWrapper.h:34
ActsTrk::TrackParamsEstimationTool::m_sigmaLoc1
Gaudi::Property< double > m_sigmaLoc1
Definition: TrackParamsEstimationTool.h:52
ActsTrk::TrackParamsEstimationTool::m_sigmaPhi
Gaudi::Property< double > m_sigmaPhi
Definition: TrackParamsEstimationTool.h:54
Generate_dsid_ranseed.seed
seed
Definition: Generate_dsid_ranseed.py:10
ActsTrk::TrackParamsEstimationTool::m_bFieldMin
Gaudi::Property< double > m_bFieldMin
Definition: TrackParamsEstimationTool.h:48
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ATLASMagneticFieldWrapper::getField
Acts::Result< Acts::Vector3 > getField(const Acts::Vector3 &position, Acts::MagneticFieldProvider::Cache &gcache) const override
Definition: ATLASMagneticFieldWrapper.h:39
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ActsTrk::TrackParamsEstimationTool::m_sigmaT0
Gaudi::Property< double > m_sigmaT0
Definition: TrackParamsEstimationTool.h:60
python.SystemOfUnits.ns
int ns
Definition: SystemOfUnits.py:130
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
ActsTrk::TrackParamsEstimationTool::m_sigmaQOverP
Gaudi::Property< double > m_sigmaQOverP
Definition: TrackParamsEstimationTool.h:58
GeV
#define GeV
Definition: CaloTransverseBalanceVecMon.cxx:30
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:106
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35