ATLAS Offline Software
Public Member Functions | Private 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::Vector3 &bField) const override
 

Private Member Functions

const Acts::Logger & logger () const
 Private access to the logger. More...
 

Private Attributes

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< double > m_initialSigmaPtRel
 
Gaudi::Property< std::vector< double > > m_initialVarInflation
 
Gaudi::Property< bool > m_useTopSp
 
std::unique_ptr< const Acts::Logger > m_logger {nullptr}
 logging instance More...
 

Detailed Description

Definition at line 15 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 11 of file TrackParamsEstimationTool.cxx.

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

◆ ~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 37 of file TrackParamsEstimationTool.cxx.

42  {
43  const auto& sp_collection = seed.sp();
44  if ( sp_collection.size() < 3 ) return std::nullopt;
45  const auto& bottom_sp = m_useTopSp ? sp_collection.back() : sp_collection.front();
46 
47  // Magnetic Field
48  ATLASMagneticFieldWrapper magneticField;
49  Acts::MagneticFieldProvider::Cache magFieldCache = magneticField.makeCache( magFieldContext );
50  Acts::Vector3 bField = *magneticField.getField( Acts::Vector3(bottom_sp->x(), bottom_sp->y(), bottom_sp->z()),
51  magFieldCache );
52 
53  // Get the surface
54  const Acts::Surface& surface = retrieveSurface(seed);
55 
56  return estimateTrackParameters(ctx,
57  seed,
58  geoContext,
59  surface,
60  bField);
61  }

◆ 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::Vector3 &  bField 
) const
overridevirtual

Definition at line 64 of file TrackParamsEstimationTool.cxx.

69  {
70  // Get SPs
71  const auto& sp_collection = seed.sp();
72  if ( sp_collection.size() < 3 ) return std::nullopt;
73 
74  // Compute Bound parameters at surface
75  auto params_result = m_useTopSp ?
76  Acts::estimateTrackParamsFromSeed(geoContext,
77  std::ranges::views::reverse(sp_collection),
78  surface,
79  bField) :
80  Acts::estimateTrackParamsFromSeed(geoContext,
81  sp_collection,
82  surface,
83  bField);
84 
85  if ( not params_result.ok() ) {
86  return std::nullopt;
87  }
88 
89  auto& params = params_result.value();
90 
91  if (m_useTopSp) {
92  // reverse direction so momentum vector pointing outwards
93  params = Acts::reflectBoundParameters(params);
94  }
95 
96  Acts::EstimateTrackParamCovarianceConfig covarianceEstimationConfig = {
98  .initialSigmaPtRel = m_initialSigmaPtRel,
99  .initialVarInflation = Eigen::Map<const Acts::BoundVector>(m_initialVarInflation.value().data()),
100  .noTimeVarInflation = 1.0,
101  };
102  Acts::BoundMatrix covariance = Acts::estimateTrackParamCovariance(covarianceEstimationConfig, params, false);
103 
104  // Create BoundTrackParameters
105  return Acts::BoundTrackParameters(surface.getSharedPtr(),
106  params,
107  covariance,
109  }

◆ initialize()

StatusCode ActsTrk::TrackParamsEstimationTool::initialize ( )
overridevirtual

Definition at line 17 of file TrackParamsEstimationTool.cxx.

18  {
19  ATH_MSG_INFO( "Initializing " << name() << "..." );
20 
21  ATH_MSG_DEBUG( "Properties Summary:" );
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  ATH_MSG_DEBUG( " " << m_useTopSp );
30 
31  // Make the logger And Propagate to ACTS routines
32  m_logger = makeActsAthenaLogger(this, "Acts");
33  return StatusCode::SUCCESS;
34  }

◆ logger()

const Acts::Logger& ActsTrk::TrackParamsEstimationTool::logger ( ) const
inlineprivate

Private access to the logger.

Definition at line 67 of file TrackParamsEstimationTool.h.

67 { return *m_logger; }

Member Data Documentation

◆ m_initialSigmaPtRel

Gaudi::Property< double > ActsTrk::TrackParamsEstimationTool::m_initialSigmaPtRel
private
Initial value:
{this, "initialSigmaPtRel", 0.1,
"Initial relative pT resolution"}

Definition at line 59 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 61 of file TrackParamsEstimationTool.h.

◆ m_logger

std::unique_ptr<const Acts::Logger> ActsTrk::TrackParamsEstimationTool::m_logger {nullptr}
private

logging instance

Definition at line 69 of file TrackParamsEstimationTool.h.

◆ m_sigmaLoc0

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

Definition at line 47 of file TrackParamsEstimationTool.h.

◆ m_sigmaLoc1

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

Definition at line 49 of file TrackParamsEstimationTool.h.

◆ m_sigmaPhi

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

Definition at line 51 of file TrackParamsEstimationTool.h.

◆ m_sigmaQOverP

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

Definition at line 55 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 57 of file TrackParamsEstimationTool.h.

◆ m_sigmaTheta

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

Definition at line 53 of file TrackParamsEstimationTool.h.

◆ m_useTopSp

Gaudi::Property< bool > ActsTrk::TrackParamsEstimationTool::m_useTopSp
private
Initial value:
{this, "useTopSp", false,
"Use top SP. By default, use bottom SP."}

Definition at line 63 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:47
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
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:37
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
ATLASMagneticFieldWrapper
Definition: ATLASMagneticFieldWrapper.h:15
ActsTrk::TrackParamsEstimationTool::m_initialSigmaPtRel
Gaudi::Property< double > m_initialSigmaPtRel
Definition: TrackParamsEstimationTool.h:59
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:61
ActsTrk::TrackParamsEstimationTool::m_sigmaTheta
Gaudi::Property< double > m_sigmaTheta
Definition: TrackParamsEstimationTool.h:53
xAOD::pion
@ pion
Definition: TrackingPrimitives.h:196
ATLASMagneticFieldWrapper::makeCache
MagneticFieldProvider::Cache makeCache(const Acts::MagneticFieldContext &mctx) const override
Definition: ATLASMagneticFieldWrapper.h:34
DeMoUpdate.reverse
reverse
Definition: DeMoUpdate.py:563
ActsTrk::TrackParamsEstimationTool::m_sigmaLoc1
Gaudi::Property< double > m_sigmaLoc1
Definition: TrackParamsEstimationTool.h:49
makeActsAthenaLogger
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
Definition: Tracking/Acts/ActsInterop/src/Logger.cxx:64
ActsTrk::TrackParamsEstimationTool::m_sigmaPhi
Gaudi::Property< double > m_sigmaPhi
Definition: TrackParamsEstimationTool.h:51
Generate_dsid_ranseed.seed
seed
Definition: Generate_dsid_ranseed.py:10
Acts
Definition: ChamberAssembleTool.h:18
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ActsTrk::TrackParamsEstimationTool::m_useTopSp
Gaudi::Property< bool > m_useTopSp
Definition: TrackParamsEstimationTool.h:63
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsTrk::TrackParamsEstimationTool::m_logger
std::unique_ptr< const Acts::Logger > m_logger
logging instance
Definition: TrackParamsEstimationTool.h:69
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
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:57
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:55
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:106