ATLAS Offline Software
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
xAOD::TrackParticle_v1 Class Reference

Class describing a TrackParticle. More...

#include <TrackParticle_v1.h>

Inheritance diagram for xAOD::TrackParticle_v1:
Collaboration diagram for xAOD::TrackParticle_v1:

Public Types

using TypelessConstAccessor = ConstAuxElement::TypelessConstAccessor
 
template<class T , class ALLOC = AuxAllocator_t<T>>
using ConstAccessor = SG::ConstAccessor< T, ALLOC >
 
template<class T , class ALLOC = AuxAllocator_t<T>>
using Accessor = SG::Accessor< T, ALLOC >
 
template<class T , class ALLOC = AuxAllocator_t<T>>
using Decorator = SG::Decorator< T, ALLOC >
 

Public Member Functions

 TrackParticle_v1 ()
 Default constructor. More...
 
 ~TrackParticle_v1 ()
 Destructor. More...
 
 TrackParticle_v1 (const TrackParticle_v1 &o)
 Copy ctor. This involves copying the entire Auxilary store, and is a slow operation which should be used sparingly. More...
 
TrackParticle_v1operator= (const TrackParticle_v1 &tp)
 Assignment operator. This can involve creating and copying an Auxilary store, and so should be used sparingly. More...
 
bool summaryValue (uint8_t &value, const SummaryType &information) const
 Accessor for TrackSummary values. More...
 
bool summaryValue (float &value, const SummaryType &information) const
 Accessor for TrackSummary values. More...
 
void setSummaryValue (uint8_t &value, const SummaryType &information)
 Set method for TrackSummary values. More...
 
void setSummaryValue (float &value, const SummaryType &information)
 Set method for TrackSummary values. More...
 
void resetCache ()
 Reset the internal cache of the object. More...
 
template<class T , class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::reference_type auxdata (const std::string &name)
 Fetch an aux data variable, as a non-const reference. More...
 
template<class T , class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdata (const std::string &name) const
 Fetch an aux data variable, as a const reference. More...
 
template<class T , class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool isAvailableWritable (const std::string &name, const std::string &clsname="")
 Check if an aux variable is available for writing. More...
 
void assign (const AuxElement &other, bool warnUnlocked=false)
 Assignment. More...
 
const SG::AuxVectorDatacontainer () const
 Return the container holding this element. More...
 
SG::AuxVectorDatacontainer ()
 Return the container holding this element. More...
 
template<class T , class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdataConst (const std::string &name) const
 Fetch an aux data variable, as a const reference. More...
 
template<class T , class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor< T, ALLOC >::const_reference_type auxdataConst (const std::string &name, const std::string &clsname) const
 Fetch an aux data variable, as a const reference. More...
 
template<class T , class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool isAvailableWritableAsDecoration (const std::string &name, const std::string &clsname="") const
 Check if an aux variable is available for writing as a decoration. More...
 
template<class T , class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type auxdecor (const std::string &name) const
 Fetch an aux decoration, as a non-const reference. More...
 
template<class T , class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Decorator< T, ALLOC >::reference_type auxdecor (const std::string &name, const std::string &clsname) const
 Fetch an aux decoration, as a non-const reference. More...
 
void makePrivateStore ()
 Create a new (empty) private store for this object. More...
 
template<class U1 >
void makePrivateStore (const U1 &other, bool warnUnlocked=false)
 Create a new private store for this object and copy aux data. More...
 
template<class U1 >
void makePrivateStore (const U1 *other, bool warnUnlocked=false)
 Create a new private store for this object and copy aux data. More...
 
void releasePrivateStore ()
 Release and free any private store associated with this object. More...
 
void setStore (const SG::IConstAuxStore *store)
 Set the store associated with this object. More...
 
void setStore (SG::IAuxStore *store)
 Set the store associated with this object. More...
 
void setStore (const DataLink< SG::IConstAuxStore > &store)
 Set the store associated with this object. More...
 
void setConstStore (const SG::IConstAuxStore *store)
 Synonym for setStore with IConstAuxStore. More...
 
void setNonConstStore (SG::IAuxStore *store)
 Synonym for setStore with IAuxStore. More...
 
bool usingPrivateStore () const
 Test to see if this object is currently using a private store. More...
 
bool usingStandaloneStore () const
 Test to see if this object is currently using a standalone store. More...
 
const SG::IConstAuxStoregetConstStore () const
 Return the current store, as a const interface. More...
 
SG::IAuxStoregetStore () const
 Return the current store, as a non-const interface. More...
 
void clearCache ()
 Clear the cached aux data pointers. More...
 
const SG::auxid_set_tgetAuxIDs () const
 Return a set of identifiers for existing data items for this object. More...
 
const SG::auxid_set_tgetDecorIDs () const
 Return a set of identifiers for decorations for this object. More...
 
bool hasStore () const
 Return true if this object has an associated store. More...
 
bool hasNonConstStore () const
 Return true if this object has an associated non-const store. More...
 
bool clearDecorations () const
 Clear all decorations. More...
 
bool trackIndices () const
 Return true if index tracking is enabled for this object. More...
 
size_t index () const
 Return the index of this element within its container. More...
 
size_t index () const
 Return the index of this element within its container. More...
 

Static Public Attributes

static constexpr bool supportsThinning = true
 Mark that this type supports thinning operations. More...
 

Protected Member Functions

bool noPrivateData () const
 True if this element has no private data. More...
 
bool havePrivateData () const
 True if this element currently has private data. More...
 
bool hadPrivateData () const
 True if this element had private data before it was added to its current container. More...
 

Private Types

enum  covMatrixIndex {
  d0_index =0, z0_index =1, phi_index =2, th_index =3,
  qp_index =4
}
 
typedef std::vector< std::pair< covMatrixIndex, covMatrixIndex > > covMatrixIndexPairVec
 
enum  PrivateStoreState : uint8_t { PrivateStoreState::NO_PRIVATE = 0, PrivateStoreState::HAVE_PRIVATE = 1, PrivateStoreState::HAD_PRIVATE = 2 }
 The current private data state. More...
 

Private Member Functions

void releasePrivateStoreForDtor ()
 Out-of-line portion of destructor. More...
 
void setIndex (size_t index, SG::AuxVectorData *container)
 Set the index/container for this element. More...
 
bool setIndexPrivate (size_t index, SG::AuxVectorData *container)
 Set the index/container for this element. More...
 
void makePrivateStore1 (const void *other, bool warnUnlocked)
 Create a new private store for this object and copy aux data. More...
 
void makePrivateStore1 (const AuxElement *other, bool warnUnlocked)
 Create a new private store for this object and copy aux data. More...
 
AuxElementStandaloneData * setStore1 (const SG::IConstAuxStore *store)
 Set the store associated with this object. More...
 
void clearAux ()
 Clear all aux data associated with this element. More...
 
void copyAux (const ConstAuxElement &other, bool warnUnlocked=false)
 Copy aux data from another object. More...
 
void setNoPrivateData ()
 Record that this element does not have private data. More...
 
void setHavePrivateData ()
 Record that this element currently has private data. More...
 
void setHadPrivateData ()
 Record that this element used to have private data. More...
 

Static Private Member Functions

static const covMatrixIndexPairVeccovMatrixComprIndexPairs ()
 
static void clearAuxHelper (AuxVectorData &container, size_t index)
 Clear all aux data associated with an element. More...
 
static void copyAuxHelper (AuxVectorData &container, size_t index, const ConstAuxElement &other, bool warnUnlocked)
 Copy aux data from another object. More...
 

Private Attributes

CxxUtils::CachedValue< Trk::Perigeem_perigeeParameters
 Cached MeasuredPerigee, built from this object. More...
 
const SG::AuxVectorDatam_container
 The container of which this object is an element. More...
 
size_t m_index
 The index of this element within its container. More...
 
PrivateStoreState m_privateStoreState
 

Static Private Attributes

static const std::size_t COVMATRIX_OFFDIAG_VEC_COMPR_SIZE = 6
 

Functions for getting and setting user properties

template<class T >
XAOD_AUXDATA_DEPRECATED T & auxdata (const std::string &name, const std::string &clsname="")
 Fetch an aux data variable, as a non-const reference. More...
 
template<class T >
XAOD_AUXDATA_DEPRECATED const T & auxdata (const std::string &name, const std::string &clsname="") const
 Fetch an aux data variable, as a const reference. More...
 
template<class T >
XAOD_AUXDATA_DEPRECATED bool isAvailable (const std::string &name, const std::string &clsname="") const
 Check if a user property is available for reading or not. More...
 
template<class T >
XAOD_AUXDATA_DEPRECATED bool isAvailableWritable (const std::string &name, const std::string &clsname="") const
 Check if a user property is available for writing or not. More...
 

IParticle functions

typedef IParticle::FourMom_t FourMom_t
 Definition of the 4-momentum type. More...
 
typedef ROOT::Math::LorentzVector< ROOT::Math::PxPyPzM4D< double > > GenVecFourMom_t
 Base 4 Momentum type for TrackParticle. More...
 
virtual double pt () const override final
 The transverse momentum ( \(p_T\)) of the particle. More...
 
virtual double eta () const override final
 The pseudorapidity ( \(\eta\)) of the particle. More...
 
virtual double phi () const override final
 The azimuthal angle ( \(\phi\)) of the particle (has range \(-\pi\) to \(+\pi\).) More...
 
virtual double m () const override final
 The invariant mass of the particle.. More...
 
virtual double e () const override final
 The total energy of the particle. More...
 
virtual double rapidity () const override final
 The true rapidity (y) of the particle. More...
 
virtual FourMom_t p4 () const override final
 The full 4-momentum of the particle. More...
 
GenVecFourMom_t genvecP4 () const
 The full 4-momentum of the particle : GenVector form. More...
 
virtual Type::ObjectType type () const override final
 The type of the object as a simple enumeration. More...
 

Defining parameters functions

The 'defining parameters' are key to the concept of a TrackParticle, and give the values for the IParticle interface ( pt(), phi(), eta() etc.).

They use the Trk::Perigee coordinate system, and are defined as: \(( d_0, z_0, \phi, \theta, q/p )\). The parameters are expressed with respect to an origin (returned by vx(), vy() and vy() ), currently intended to be the 'beamspot'. This origin is expected to be the same for all track particles in a collection (and this may be be enforced). The \(\phi\) parameter is returned by either the phi() or the phi0() methods, the difference just being whether it is returned as a float or a double (it is stored as a float)

float charge () const
 Returns the charge. More...
 
float d0 () const
 Returns the \(d_0\) parameter. More...
 
float z0 () const
 Returns the \(z_0\) parameter. More...
 
float phi0 () const
 Returns the \(\phi\) parameter, which has range \(-\pi\) to \(+\pi\). More...
 
float theta () const
 Returns the \(\theta\) parameter, which has range 0 to \(\pi\). More...
 
float qOverP () const
 Returns the \(q/p\) parameter. More...
 
float time () const
 Returns the time. More...
 
float timeResolution () const
 Returns the time resolution. More...
 
uint8_t hasValidTime () const
 Returns whether or not the track has a valid time. More...
 
DefiningParameters_t definingParameters () const
 Returns a SVector of the Perigee track parameters. More...
 
const ParametersCovMatrix_t definingParametersCovMatrix () const
 Returns the 5x5 symmetric matrix containing the defining parameters covariance matrix. More...
 
ParametersCovMatrixFilled_t definingParametersCovMatrixFilled () const
 Returns a 5x5 matrix describing which elements of the covariance matrix are known. More...
 
const std::vector< float > & definingParametersCovMatrixDiagVec () const
 Returns the diagonal elements of the defining parameters covariance matrix. More...
 
const std::vector< float > & definingParametersCovMatrixOffDiagVec () const
 Returns the correlation coefficient associated with the off-diagonal elements of the covariance matrix = cov(X,Y)/sqrt(cov(X,X)*cov(Y,Y)) More...
 
std::vector< floatdefiningParametersCovMatrixVec () const
 Returns the length 6 vector containing the elements of defining parameters covariance matrix. More...
 
bool definingParametersCovMatrixOffDiagCompr () const
 
void setDefiningParameters (float d0, float z0, float phi0, float theta, float qOverP)
 Set the defining parameters. More...
 
void setDefiningParameters (float d0, float z0, float phi0, float theta, float qOverP, float time)
 
void setTime (float time)
 
void setTimeResolution (float timeResolution)
 
void setHasValidTime (uint8_t hasValidTime)
 
void setDefiningParametersCovMatrix (const ParametersCovMatrix_t &cov)
 Set the defining parameters covariance matrix. More...
 
void setDefiningParametersCovMatrixDiagVec (const std::vector< float > &vec)
 Set the defining parameters covariance matrix using a length 15 vector. More...
 
void setDefiningParametersCovMatrixOffDiagVec (const std::vector< float > &vec)
 Set the off-diagonal elements of the defining parameters covariance matrix. More...
 
void setDefiningParametersCovMatrixVec (const std::vector< float > &cov)
 
void compressDefiningParametersCovMatrixOffDiag ()
 Delete some off-diagonal elements for compression. More...
 
float vx () const
 The x origin for the parameters. More...
 
float vy () const
 The y origin for the parameters. More...
 
float vz () const
 The z origin for the parameters. More...
 
void setParametersOrigin (float x, float y, float z)
 Set the origin for the parameters. More...
 
const Trk::PerigeeperigeeParameters () const
 Returns the Trk::MeasuredPerigee track parameters. More...
 

Curvilinear functions

The set of functions which return other track parameters.

The remaining track parameters (i.e. not the 'defining parameters') use the 'curvilinear' coordinate system, and are represented by the parameters \((x,y,z,p_x,p_y,p_z)\). The parameters can have an associated local 5x5 error/covariance matrix. They are expressed at various points through the detector, which can be determined by the parameterPosition() method.

// Example code to use parameters
unsigned int index=0;
if (myTP.indexOfParameterAtPosition(index, xAOD::FirstMeasurement)){
CurvilinearParameters_t parameters = myTP.trackParameters(index);
}
size_t numberOfParameters () const
 Returns the number of additional parameters stored in the TrackParticle. More...
 
const CurvilinearParameters_t trackParameters (unsigned int index) const
 Returns the track parameter vector at 'index'. More...
 
float parameterX (unsigned int index) const
 Returns the parameter x position, for 'index'. More...
 
float parameterY (unsigned int index) const
 Returns the parameter y position, for 'index'. More...
 
float parameterZ (unsigned int index) const
 Returns the parameter z position, for 'index'. More...
 
float parameterPX (unsigned int index) const
 Returns the parameter x momentum component, for 'index'. More...
 
float parameterPY (unsigned int index) const
 Returns the parameter y momentum component, for 'index'. More...
 
float parameterPZ (unsigned int index) const
 Returns the parameter z momentum component, for 'index'. More...
 
void setTrackParameters (std::vector< std::vector< float > > &parameters)
 Set the parameters via the passed vector of vectors. More...
 
ParametersCovMatrix_t trackParameterCovarianceMatrix (unsigned int index) const
 Returns the TrackParticleCovMatrix_t (covariance matrix) at 'index', which corresponds to the parameters at the same index. More...
 
void setTrackParameterCovarianceMatrix (unsigned int index, std::vector< float > &cov)
 Set the cov matrix of the parameter at 'index', using a vector of floats. More...
 
xAOD::ParameterPosition parameterPosition (unsigned int index) const
 Return the ParameterPosition of the parameters at 'index'. More...
 
bool indexOfParameterAtPosition (unsigned int &index, ParameterPosition position) const
 Function to determine if this TrackParticle contains track parameters at a certain position, and if so, what the 'index' is. More...
 
void setParameterPosition (unsigned int index, ParameterPosition pos)
 Set the 'position' (i.e. where it is in ATLAS) of the parameter at 'index', using the ParameterPosition enum. More...
 
const Trk::CurvilinearParameters curvilinearParameters (unsigned int index) const
 Returns a curvilinear representation of the parameters at 'index'. More...
 
float radiusOfFirstHit () const
 Returns the radius of the first hit. More...
 
void setRadiusOfFirstHit (float radius)
 Set the radius of the first hit. More...
 
uint64_t identifierOfFirstHit () const
 Returns the offline identifier of the first hit. More...
 
void setIdentifierOfFirstHit (uint64_t id)
 Set the offline identifier of the first hit. More...
 
float beamlineTiltX () const
 
void setBeamlineTiltX (float tiltX)
 
float beamlineTiltY () const
 
void setBeamlineTiltY (float tiltY)
 
uint32_t hitPattern () const
 
void setHitPattern (uint32_t hitpattern)
 
uint8_t numberOfUsedHitsdEdx () const
 
void setNumberOfUsedHitsdEdx (uint8_t numhits)
 
uint8_t numberOfIBLOverflowsdEdx () const
 
void setNumberOfIBLOverflowsdEdx (uint8_t numoverflows)
 

Fit quality functions

Returns some information about quality of the track fit.

float chiSquared () const
 Returns the \( \chi^2 \) of the overall track fit. More...
 
float numberDoF () const
 Returns the number of degrees of freedom of the overall track or vertex fit as float. More...
 
void setFitQuality (float chiSquared, float numberDoF)
 Set the 'Fit Quality' information. More...
 

TrackInfo functions

Contains information about the 'fitter' of this Trk::Track / TrackParticle.

Additionally there is some information about how the e.g. fit was configured. Also the information on the properties of the track fit is stored.

void setTrackProperties (const TrackProperties properties)
 Methods setting the TrackProperties. More...
 
void setPatternRecognitionInfo (const std::bitset< xAOD::NumberOfTrackRecoInfo > &patternReco)
 Method setting the pattern recognition algorithm, using a bitset. More...
 
void setPatternRecognitionInfo (uint64_t patternReco)
 Method setting the pattern recognition algorithm, using a 64-bit int (which is faster than using a bitset). More...
 
void setTrackFitter (const TrackFitter fitter)
 Method for setting the fitter, using the TrackFitter enum. More...
 
void setParticleHypothesis (const ParticleHypothesis hypo)
 Method for setting the particle type, using the ParticleHypothesis enum. More...
 
TrackProperties trackProperties () const
 Access methods for track properties, which returns 'true' if a logical AND of the parameter 'proprty' and the stored properties returns true. More...
 
std::bitset< NumberOfTrackRecoInfopatternRecoInfo () const
 Access method for pattern recognition algorithm. More...
 
ParticleHypothesis particleHypothesis () const
 Returns the particle hypothesis used for Track fitting. More...
 
TrackFitter trackFitter () const
 Returns the fitter. More...
 

Links

const ElementLink< TrackCollection > & trackLink () const
 Returns a link (which can be invalid) to the Trk::Track which was used to make this TrackParticle. More...
 
void setTrackLink (const ElementLink< TrackCollection > &track)
 Set the link to the original track. More...
 
const Trk::Tracktrack () const
 Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle. More...
 

Detailed Description

Class describing a TrackParticle.

Author
Edward Moyse Edwar.nosp@m.d.Mo.nosp@m.yse@c.nosp@m.ern..nosp@m.ch
Markus Elsing Marku.nosp@m.s.El.nosp@m.sing@.nosp@m.cern.nosp@m..ch

Definition at line 43 of file TrackParticle_v1.h.

Member Typedef Documentation

◆ Accessor

template<class T , class ALLOC = AuxAllocator_t<T>>
using SG::AuxElement::Accessor = SG::Accessor<T, ALLOC>
inherited

Definition at line 572 of file AuxElement.h.

◆ ConstAccessor

template<class T , class ALLOC = AuxAllocator_t<T>>
using SG::AuxElement::ConstAccessor = SG::ConstAccessor<T, ALLOC>
inherited

Definition at line 569 of file AuxElement.h.

◆ covMatrixIndexPairVec

Definition at line 350 of file TrackParticle_v1.h.

◆ Decorator

template<class T , class ALLOC = AuxAllocator_t<T>>
using SG::AuxElement::Decorator = SG::Decorator<T, ALLOC>
inherited

Definition at line 575 of file AuxElement.h.

◆ FourMom_t

Definition of the 4-momentum type.

Definition at line 72 of file TrackParticle_v1.h.

◆ GenVecFourMom_t

typedef ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<double> > xAOD::TrackParticle_v1::GenVecFourMom_t

Base 4 Momentum type for TrackParticle.

Definition at line 78 of file TrackParticle_v1.h.

◆ TypelessConstAccessor

using SG::AuxElement::TypelessConstAccessor = ConstAuxElement::TypelessConstAccessor
inherited

Definition at line 566 of file AuxElement.h.

Member Enumeration Documentation

◆ covMatrixIndex

Enumerator
d0_index 
z0_index 
phi_index 
th_index 
qp_index 

Definition at line 348 of file TrackParticle_v1.h.

◆ PrivateStoreState

enum SG::IAuxElement::PrivateStoreState : uint8_t
strongprivateinherited

The current private data state.

Enumerator
NO_PRIVATE 
HAVE_PRIVATE 
HAD_PRIVATE 

Definition at line 131 of file IAuxElement.h.

132  {
133  NO_PRIVATE = 0,
134  HAVE_PRIVATE = 1,
135  HAD_PRIVATE = 2,
136  };

Constructor & Destructor Documentation

◆ TrackParticle_v1() [1/2]

xAOD::TrackParticle_v1::TrackParticle_v1 ( )

Default constructor.

Definition at line 46 of file TrackParticle_v1.cxx.

47  : IParticle() {
48  // perigeeParameters cache initialized to be empty (default constructor)
49  }

◆ ~TrackParticle_v1()

xAOD::TrackParticle_v1::~TrackParticle_v1 ( )

Destructor.

Definition at line 72 of file TrackParticle_v1.cxx.

72 {}

◆ TrackParticle_v1() [2/2]

xAOD::TrackParticle_v1::TrackParticle_v1 ( const TrackParticle_v1 o)

Copy ctor. This involves copying the entire Auxilary store, and is a slow operation which should be used sparingly.

Definition at line 51 of file TrackParticle_v1.cxx.

52  : IParticle( tp ) {
54  // perigeeParameters cache initialized to be empty (default constructor)
55  // assume that this copy will create new cache as needed
56  }

Member Function Documentation

◆ assign()

void SG::AuxElement::assign ( const AuxElement other,
bool  warnUnlocked = false 
)
inherited

Assignment.

Parameters
otherThe object from which we're assigning.
warnUnlockedIf true, then warn when we skip unlocked decorations.

We don't copy container/index, as assignment doesn't change where this object is. However, if we have aux data, then we copy aux data if we're copying from an object that also has it; otherwise, if we're copying from an object with no aux data, then we clear ours.

◆ auxdata() [1/4]

template<class T , class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor<T, ALLOC>::reference_type SG::AuxElement::auxdata ( const std::string &  name)
inherited

Fetch an aux data variable, as a non-const reference.

Parameters
nameName of the aux variable.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

◆ auxdata() [2/4]

template<class T , class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor<T, ALLOC>::const_reference_type SG::AuxElement::auxdata ( const std::string &  name) const
inherited

Fetch an aux data variable, as a const reference.

Parameters
nameName of the aux variable.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor or ConstAccessor classes.

◆ auxdata() [3/4]

template<class T >
XAOD_AUXDATA_DEPRECATED T& xAOD::IParticle::auxdata ( const std::string &  name,
const std::string &  clsname = "" 
)
inlineinherited

Fetch an aux data variable, as a non-const reference.

This function provides an easy way for users to decorate objects with auxiliary data.

Take note that this function is slow. Should not be used inside time-critical code.

Parameters
nameName of the aux variable
clsnameThe name of the associated class. May be blank
Returns
A modifiable reference to the decoration

Definition at line 98 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

99  {
100 
101  return SG::Accessor< T >(name, clsname)(*this);
102  }

◆ auxdata() [4/4]

template<class T >
XAOD_AUXDATA_DEPRECATED const T& xAOD::IParticle::auxdata ( const std::string &  name,
const std::string &  clsname = "" 
) const
inlineinherited

Fetch an aux data variable, as a const reference.

This function provides an easy way for users to retrieve auxiliary decorations from an object.

Take note that this function is slow. Should not be used inside time-critical code.

Parameters
nameName of the aux variable
clsnameThe name of the associated class. May be blank
Returns
A constant reference to the decoration

Definition at line 118 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

119  {
120 
121  return SG::ConstAccessor< T >( name, clsname )( *this );
122  }

◆ auxdataConst() [1/2]

template<class T , class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor<T, ALLOC>::const_reference_type SG::AuxElement::auxdataConst ( const std::string &  name) const
inherited

Fetch an aux data variable, as a const reference.

Parameters
nameName of the aux variable.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the ConstAccessor class.

◆ auxdataConst() [2/2]

template<class T , class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Accessor<T, ALLOC>::const_reference_type SG::AuxElement::auxdataConst ( const std::string &  name,
const std::string &  clsname 
) const
inherited

Fetch an aux data variable, as a const reference.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the ConstAccessor class.

◆ auxdecor() [1/2]

template<class T , class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Decorator<T, ALLOC>::reference_type SG::AuxElement::auxdecor ( const std::string &  name) const
inherited

Fetch an aux decoration, as a non-const reference.

Parameters
nameName of the aux variable.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ auxdecor() [2/2]

template<class T , class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED Decorator<T, ALLOC>::reference_type SG::AuxElement::auxdecor ( const std::string &  name,
const std::string &  clsname 
) const
inherited

Fetch an aux decoration, as a non-const reference.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

If the container is locked, this will allow fetching only variables that do not yet exist (in which case they will be marked as decorations) or variables already marked as decorations.

◆ beamlineTiltX()

float xAOD::TrackParticle_v1::beamlineTiltX ( ) const

◆ beamlineTiltY()

float xAOD::TrackParticle_v1::beamlineTiltY ( ) const

◆ charge()

float xAOD::TrackParticle_v1::charge ( ) const

Returns the charge.

Definition at line 151 of file TrackParticle_v1.cxx.

151  {
152  // static Accessor< float > acc( "charge" );
153  return (qOverP() > 0) ? 1 : ((qOverP() < 0) ? -1 : 0);
154  }

◆ chiSquared()

float xAOD::TrackParticle_v1::chiSquared ( ) const

Returns the \( \chi^2 \) of the overall track fit.

◆ clearAux()

void SG::AuxElement::clearAux ( )
privateinherited

Clear all aux data associated with this element.

If this object has no associated store, this does nothing. If the associated aux data is const, this throws ExcConstAuxData.

Definition at line 580 of file AuxElement.cxx.

581 {
582  if (!m_container) return;
584 }

◆ clearAuxHelper()

void SG::AuxElement::clearAuxHelper ( AuxVectorData container,
size_t  index 
)
staticprivateinherited

Clear all aux data associated with an element.

Parameters
containerContainer of the element.
indexIndex of this element within the container.

If the associated aux data is const, this throws ExcConstAuxData.

Definition at line 639 of file AuxElement.cxx.

640 {
641  if (!container.hasStore()) return;
642  if (!container.hasNonConstStore()) {
643  throw SG::ExcConstAuxData ("clearAux", SG::null_auxid);
644  }
645 
647  for (SG::auxid_t auxid : container.getWritableAuxIDs()) {
648  r.clear (auxid, container, index, 1);
649  }
650 }

◆ clearCache()

void SG::AuxElement::clearCache ( )
inherited

Clear the cached aux data pointers.

You should call this any time something changes in the aux store that could invalidate the vector pointers.

Definition at line 339 of file AuxElement.cxx.

340 {
341  if (container())
342  container()->clearCache();
343 }

◆ clearDecorations()

bool SG::AuxElement::clearDecorations ( ) const
inherited

Clear all decorations.

Erase all decorations from an associated store, restoring the state to when lock was called.

Returns true if there were any decorations that were cleared, false if the store did not contain any decorations.

Definition at line 428 of file AuxElement.cxx.

429 {
430  if (havePrivateData())
431  return m_container->clearDecorations();
432  return false;
433 }

◆ compressDefiningParametersCovMatrixOffDiag()

void xAOD::TrackParticle_v1::compressDefiningParametersCovMatrixOffDiag ( )

Delete some off-diagonal elements for compression.

Definition at line 437 of file TrackParticle_v1.cxx.

437  {
438 
439  ParametersCovMatrix_t cov = definingParametersCovMatrix();
440  std::vector< float > offDiagVecCompr;
441  offDiagVecCompr.resize(COVMATRIX_OFFDIAG_VEC_COMPR_SIZE);
442 
443  const covMatrixIndexPairVec& vecPairIndex = covMatrixComprIndexPairs();
444 
445  for(unsigned int k=0; k<COVMATRIX_OFFDIAG_VEC_COMPR_SIZE; ++k){
446  std::pair<covMatrixIndex,covMatrixIndex> pairIndex = vecPairIndex[k];
447  covMatrixIndex i = pairIndex.first;
448  covMatrixIndex j = pairIndex.second;
449  float offDiagElement = cov(i,i)>0 && cov(j,j)>0 ? cov(i,j)/sqrt(cov(i,i)*cov(j,j)) : 0;
450  offDiagVecCompr[k] = offDiagElement;
451  }
452 
453  accCovMatrixOffDiag( *this ) = offDiagVecCompr;
454  return;
455 
456  }

◆ container() [1/2]

SG::AuxVectorData* SG::AuxElement::container ( )
inherited

Return the container holding this element.

◆ container() [2/2]

const SG::AuxVectorData* SG::AuxElement::container ( ) const
inherited

Return the container holding this element.

◆ copyAux()

void SG::AuxElement::copyAux ( const ConstAuxElement other,
bool  warnUnlocked = false 
)
privateinherited

Copy aux data from another object.

Parameters
otherThe object from which to copy.
warnUnlockedIf true, then warn when we skip unlocked decorations.

If this object has no associated store, this does nothing. If the associated aux data is const, this throws ExcConstAuxData.

All aux data items from other are copied to this object. Any aux data items associated with this object that are not present in other are cleared. (If other has no aux data, then all aux data items for this object are cleared.)

Definition at line 600 of file AuxElement.cxx.

602 {
603  if (!m_container) return;
604  copyAuxHelper (*container(), index(), other, warnUnlocked);
605 }

◆ copyAuxHelper()

void SG::AuxElement::copyAuxHelper ( AuxVectorData container,
size_t  index,
const ConstAuxElement other,
bool  warnUnlocked 
)
staticprivateinherited

Copy aux data from another object.

Parameters
containerContainer of the element.
indexIndex of this element within the container.
otherThe object from which to copy.
warnUnlockedIf true, then warn when we skip unlocked decorations.

If the associated aux data is const, this throws ExcConstAuxData.

All aux data items from other are copied to this object. Any aux data items associated with this object that are not present in other are cleared. (If other has no aux data, then all aux data items for this object are cleared.)

Definition at line 667 of file AuxElement.cxx.

671 {
672  if (!container.hasStore()) return;
674  throw SG::ExcConstAuxData ("copyAux");
675 
676  const SG::AuxVectorData* ocont = other.container();
677 
678  if (!ocont || !ocont->hasStore()) {
680  return;
681  }
682 
683 #ifndef XAOD_STANDALONE
684  const SG::auxid_set_t& other_decors = ocont->getDecorIDs();
685 #endif
686  SG::auxid_set_t other_ids = ocont->getAuxIDs();
687 
688  size_t oindex = other.index();
690 
691  for (SG::auxid_t auxid : other_ids) {
692 #ifndef XAOD_STANDALONE
693  if (other_decors.test (auxid)) {
694  // Don't copy decorations --- another thread may be modifying them.
695  other_ids.reset (auxid);
696  // Warn if we skip a decoration (except for mcEventWeights,
697  // for which this is expected).
698  if (warnUnlocked && r.getName(auxid) != "mcEventWeights") {
699  std::ostringstream ss;
700  ss << "skipped unlocked decoration " << r.getName(auxid)
701  << " (" << auxid << ")";
702  ATHCONTAINERS_WARNING("copyAux", ss.str());
703  }
704  }
705  else
706 #endif
707  if (!r.isLinked (auxid)) {
708  r.copy (auxid, container, index, *ocont, oindex, 1);
709  }
710  }
711 
712  for (SG::auxid_t auxid : container.getWritableAuxIDs()) {
713  if (!other_ids.test (auxid)) {
714  r.clear (auxid, container, index, 1);
715  }
716  }
717 }

◆ covMatrixComprIndexPairs()

const TrackParticle_v1::covMatrixIndexPairVec & xAOD::TrackParticle_v1::covMatrixComprIndexPairs ( )
staticprivate

Definition at line 765 of file TrackParticle_v1.cxx.

765  {
766  static const covMatrixIndexPairVec result {
769  return result;
770  }

◆ curvilinearParameters()

const Trk::CurvilinearParameters xAOD::TrackParticle_v1::curvilinearParameters ( unsigned int  index) const

Returns a curvilinear representation of the parameters at 'index'.

Note
This is only available in Athena.

Definition at line 674 of file TrackParticle_v1.cxx.

674  {
675 
676  static const Accessor< std::vector<float> > acc( "trackParameterCovarianceMatrices" );
677  unsigned int offset = index*15;
678  // copy the correct values into the temp matrix
679  ParametersCovMatrix_t cov;
680  auto it = acc(*this).begin()+offset;
681  Amg::expand(it,it+15,cov);
682  // retrieve the parameters to build the curvilinear frame
685  Trk::CurvilinearParameters param(pos,mom,charge(),std::move(cov));
686 
687  return param;
688  }

◆ d0()

float xAOD::TrackParticle_v1::d0 ( ) const

Returns the \(d_0\) parameter.

◆ definingParameters()

DefiningParameters_t xAOD::TrackParticle_v1::definingParameters ( ) const

Returns a SVector of the Perigee track parameters.

i.e. a vector of \(\left(\begin{array}{c}d_0\\z_0\\\phi_0\\\theta\\q/p\end{array}\right)\)

Definition at line 172 of file TrackParticle_v1.cxx.

172  {
173  DefiningParameters_t tmp;
174  tmp << d0() , z0() , phi0() , theta() , qOverP();
175  return tmp;
176  }

◆ definingParametersCovMatrix()

const xAOD::ParametersCovMatrix_t xAOD::TrackParticle_v1::definingParametersCovMatrix ( ) const

Returns the 5x5 symmetric matrix containing the defining parameters covariance matrix.

Definition at line 247 of file TrackParticle_v1.cxx.

247  {
248 
249  // Set up the result matrix.
250  xAOD::ParametersCovMatrix_t cov;
251  cov.setZero();
252 
253  // Set the diagonal elements of the matrix.
254  if( accCovMatrixDiag.isAvailable( *this ) &&
255  ( static_cast< int >( accCovMatrixDiag( *this ).size() ) == cov.rows() ) ) {
256 
257  // Access the "raw" variable.
258  const std::vector< float >& diagVec = accCovMatrixDiag( *this );
259  // Set the diagonal elements using the raw variable.
260  for( int i = 0; i < cov.rows(); ++i ) {
261  cov( i, i ) = diagVec[ i ];
262  }
263  } else {
265  // If the variable is not available/set, set the matrix to identity.
266  cov.setIdentity();
267  }
268 
269  bool offDiagCompr = definingParametersCovMatrixOffDiagCompr();
270 
271  // Set the off-diagonal elements of the matrix.
272  if(!offDiagCompr){
273 
274  if( accCovMatrixOffDiag.isAvailable( *this ) &&
275  ( static_cast< int >( accCovMatrixOffDiag( *this ).size() ) ==
276  ( ( ( cov.rows() - 1 ) * cov.rows() ) / 2 ) ) ) {
277 
278  // Access the "raw" variable.
279  const std::vector< float >& offDiagVec = accCovMatrixOffDiag( *this );
280  // Set the off-diagonal elements using the raw variable.
281  std::size_t vecIndex = 0;
282  for( int i = 1; i < cov.rows(); ++i ) {
283  for( int j = 0; j < i; ++j, ++vecIndex ) {
284  float offDiagCoeff = cov(i,i)>0 && cov(j,j)>0 ? offDiagVec[vecIndex]*sqrt(cov(i,i)*cov(j,j)) : 0;
285  cov.fillSymmetric( i, j, offDiagCoeff );
286  }
287  }
288  }
289 
291 
292  }
293 
294  else{ //Compressed case
295 
296  if( accCovMatrixOffDiag.isAvailable( *this ) &&
297  ( static_cast< int >( accCovMatrixOffDiag( *this ).size() ) == COVMATRIX_OFFDIAG_VEC_COMPR_SIZE ) ) {
298  // Access the "raw" variable.
299  const std::vector< float >& offDiagVec = accCovMatrixOffDiag( *this );
300  // Set the off-diagonal elements using the raw variable.
301 
302  const covMatrixIndexPairVec& vecPairIndex = covMatrixComprIndexPairs();
303 
304  for(unsigned int k=0; k<COVMATRIX_OFFDIAG_VEC_COMPR_SIZE; ++k){
305  std::pair<covMatrixIndex,covMatrixIndex> pairIndex = vecPairIndex[k];
306  covMatrixIndex i = pairIndex.first;
307  covMatrixIndex j = pairIndex.second;
308  float offDiagCoeff = cov(i,i)>0 && cov(j,j)>0 ? offDiagVec[k]*sqrt(cov(i,i)*cov(j,j)) : 0;
309  cov.fillSymmetric( i, j, offDiagCoeff );
310  }
311 
312  }
313 
315 
316  }
317 
318 
319  // Return the filled matrix.
320  return cov;
321 
322  }

◆ definingParametersCovMatrixDiagVec()

const std::vector< float > & xAOD::TrackParticle_v1::definingParametersCovMatrixDiagVec ( ) const

Returns the diagonal elements of the defining parameters covariance matrix.

Definition at line 376 of file TrackParticle_v1.cxx.

376  {
377 
378  return accCovMatrixDiag( *this );
379  }

◆ definingParametersCovMatrixFilled()

ParametersCovMatrixFilled_t xAOD::TrackParticle_v1::definingParametersCovMatrixFilled ( ) const

Returns a 5x5 matrix describing which elements of the covariance matrix are known.

Definition at line 324 of file TrackParticle_v1.cxx.

324  {
325 
326  // Create the result matrix.
328  result.setZero();
329 
330  // Check if the diagonal elements are available.
331  if( accCovMatrixDiag.isAvailable( *this ) &&
332  ( static_cast< int >( accCovMatrixDiag( *this ).size() ) == result.rows() ) ) {
333 
334  result.setIdentity();
335  }
336 
337  bool offDiagCompr = definingParametersCovMatrixOffDiagCompr();
338 
339  if(!offDiagCompr){
340 
341  // Check if the off-diagonal elements are available.
342  if( accCovMatrixOffDiag.isAvailable( *this ) &&
343  ( static_cast< int >( accCovMatrixOffDiag( *this ).size() ) ==
344  ( ( result.rows() * ( result.rows() - 1 ) ) / 2 ) ) ) {
345 
346  for( int i = 1; i < result.rows(); ++i ) {
347  for( int j = 0; j < i; ++j ) {
348  result.fillSymmetric( i, j, true );
349  }
350  }
351  }
352 
353  }
354 
355  else{
356 
357  if( accCovMatrixOffDiag.isAvailable( *this ) &&
358  ( static_cast< int >( accCovMatrixOffDiag( *this ).size() ) == COVMATRIX_OFFDIAG_VEC_COMPR_SIZE ) ){
359 
360  const covMatrixIndexPairVec& vecPairIndex = covMatrixComprIndexPairs();
361 
362  for(const auto& pairIndex : vecPairIndex){
363  covMatrixIndex i = pairIndex.first;
364  covMatrixIndex j = pairIndex.second;
365  result.fillSymmetric( i, j, true );
366  }
367 
368  }
369 
370  }
371 
372  // Return the object.
373  return result;
374  }

◆ definingParametersCovMatrixOffDiagCompr()

bool xAOD::TrackParticle_v1::definingParametersCovMatrixOffDiagCompr ( ) const

Definition at line 430 of file TrackParticle_v1.cxx.

430  {
431 
432  bool flag = false;
433  if(accCovMatrixOffDiag.isAvailable( *this )) flag = (static_cast< int >(accCovMatrixOffDiag( *this ).size())==COVMATRIX_OFFDIAG_VEC_COMPR_SIZE);
434  return flag;
435  }

◆ definingParametersCovMatrixOffDiagVec()

const std::vector< float > & xAOD::TrackParticle_v1::definingParametersCovMatrixOffDiagVec ( ) const

Returns the correlation coefficient associated with the off-diagonal elements of the covariance matrix = cov(X,Y)/sqrt(cov(X,X)*cov(Y,Y))

Definition at line 381 of file TrackParticle_v1.cxx.

381  {
382 
383  return accCovMatrixOffDiag( *this );
384  }

◆ definingParametersCovMatrixVec()

std::vector< float > xAOD::TrackParticle_v1::definingParametersCovMatrixVec ( ) const

Returns the length 6 vector containing the elements of defining parameters covariance matrix.

Definition at line 386 of file TrackParticle_v1.cxx.

386  {
387 
388  std::vector< float > vec;
390  Amg::compress(cov,vec);
391  return vec;
392 
393  }

◆ e()

double xAOD::TrackParticle_v1::e ( ) const
finaloverridevirtual

The total energy of the particle.

Implements xAOD::IParticle.

Definition at line 110 of file TrackParticle_v1.cxx.

110  {
111  return genvecP4().E();
112  }

◆ eta()

double xAOD::TrackParticle_v1::eta ( ) const
finaloverridevirtual

The pseudorapidity ( \(\eta\)) of the particle.

Implements xAOD::IParticle.

Definition at line 78 of file TrackParticle_v1.cxx.

78  {
79  return genvecP4().Eta();
80  }

◆ genvecP4()

TrackParticle_v1::GenVecFourMom_t xAOD::TrackParticle_v1::genvecP4 ( ) const

The full 4-momentum of the particle : GenVector form.

Definition at line 117 of file TrackParticle_v1.cxx.

117  {
118  using namespace std;
119  float p = 10.e6; // 10 TeV (default value for very high pt muons, with qOverP==0)
120  if (fabs(qOverP())>0.) p = 1/fabs(qOverP());
121  float thetaT = theta();
122  float phiT = phi();
123  float sinTheta= sin(thetaT);
124  float px = p*sinTheta*cos(phiT);
125  float py = p*sinTheta*sin(phiT);
126  float pz = p*cos(thetaT);
127  return GenVecFourMom_t(px, py, pz, m());
128  }

◆ getAuxIDs()

const SG::auxid_set_t & SG::AuxElement::getAuxIDs ( ) const
inherited

Return a set of identifiers for existing data items for this object.

If this object has a private or standalone store, then information from that will be returned. Otherwise, if this element is part of a container, then information for the container will be returned. Otherwise, return an empty set.

Definition at line 355 of file AuxElement.cxx.

356 {
357 #ifdef ATHCONTAINERS_R21_COMPAT
358  if (havePrivateData())
359  return m_container->getConstStore()->getAuxIDs();
360  if (container())
361  return container()->getAuxIDs();
362  static const SG::auxid_set_t null_set;
363  return null_set;
364 #else
366 #endif
367 }

◆ getConstStore()

const SG::IConstAuxStore * SG::AuxElement::getConstStore ( ) const
inherited

Return the current store, as a const interface.

This will be non-zero if either a const or non-const store is associated with this object. This will fetch either a private or standalone store.

Definition at line 304 of file AuxElement.cxx.

305 {
306  if (havePrivateData()) {
307  return m_container->getConstStore();
308  }
309  return 0;
310 }

◆ getDecorIDs()

const SG::auxid_set_t & SG::AuxElement::getDecorIDs ( ) const
inherited

Return a set of identifiers for decorations for this object.

   If this object has a private or standalone store, then information
   from that will be returned.  Otherwise, if this element
   is part of a container, then information for the container
   will be returned.  Otherwise, return an empty set.

Definition at line 378 of file AuxElement.cxx.

379 {
380 #ifdef ATHCONTAINERS_R21_COMPAT
381  if (havePrivateData())
383  if (container())
384  return container()->getDecorIDs();
385  static const SG::auxid_set_t null_set;
386  return null_set;
387 #else
389 #endif
390 }

◆ getStore()

SG::IAuxStore * SG::AuxElement::getStore ( ) const
inherited

Return the current store, as a non-const interface.

This will be non-zero if a non-const store is associated with this object. This will fetch either a private or standalone store.

Definition at line 319 of file AuxElement.cxx.

320 {
321  if (havePrivateData()) {
322 #ifdef ATHCONTAINERS_R21_COMPAT
324 #else
325  SG::AuxVectorData* container_nc ATLAS_THREAD_SAFE = const_cast<SG::AuxVectorData*>(container());
326 #endif
327  return container_nc->getStore();
328  }
329  return 0;
330 }

◆ hadPrivateData()

bool SG::IAuxElement::hadPrivateData ( ) const
protectedinherited

True if this element had private data before it was added to its current container.

◆ hasNonConstStore()

bool SG::AuxElement::hasNonConstStore ( ) const
inherited

Return true if this object has an associated non-const store.

This will be true for either a private or standalone store.

Definition at line 411 of file AuxElement.cxx.

412 {
413  if (havePrivateData())
414  return m_container->hasNonConstStore();
415  return false;
416 }

◆ hasStore()

bool SG::AuxElement::hasStore ( ) const
inherited

Return true if this object has an associated store.

This will be true for either a private or standalone store.

Definition at line 398 of file AuxElement.cxx.

399 {
400  if (havePrivateData())
401  return m_container->hasStore();
402  return false;
403 }

◆ hasValidTime()

uint8_t xAOD::TrackParticle_v1::hasValidTime ( ) const

Returns whether or not the track has a valid time.

◆ havePrivateData()

bool SG::IAuxElement::havePrivateData ( ) const
protectedinherited

True if this element currently has private data.

◆ hitPattern()

uint32_t xAOD::TrackParticle_v1::hitPattern ( ) const

◆ identifierOfFirstHit()

uint64_t xAOD::TrackParticle_v1::identifierOfFirstHit ( ) const

Returns the offline identifier of the first hit.

◆ index() [1/2]

size_t SG::IAuxElement::index ( ) const
inherited

Return the index of this element within its container.

◆ index() [2/2]

size_t SG::IAuxElement::index
inherited

Return the index of this element within its container.

Inherited from IAuxElement.

◆ indexOfParameterAtPosition()

bool xAOD::TrackParticle_v1::indexOfParameterAtPosition ( unsigned int index,
ParameterPosition  position 
) const

Function to determine if this TrackParticle contains track parameters at a certain position, and if so, what the 'index' is.

Parameters
[in]indexFilled with the index of the track parameters at 'position' - untouched otherwise.
[out]positionThe location in the detector of the required track parameters.
Returns
Returns 'true' if the TrackParticle parameters at 'position', returns False otherwise.

Definition at line 654 of file TrackParticle_v1.cxx.

655  {
656  size_t maxParameters = numberOfParameters();
657  bool foundParameters=false;
658  for (size_t i=0; i<maxParameters; ++i){
659  if (parameterPosition(i)==position){
660  foundParameters=true;
661  index=i;
662  break;
663  }
664  }
665  return foundParameters;
666  }

◆ isAvailable()

template<class T >
XAOD_AUXDATA_DEPRECATED bool xAOD::IParticle::isAvailable ( const std::string &  name,
const std::string &  clsname = "" 
) const
inlineinherited

Check if a user property is available for reading or not.

This function should be used to check if a user property which may or may not exist, is set on the object.

Parameters
nameName of the auxiliary variable
clsnameThe name of the associated class. May be blank
Returns
Whether the decoration exists or not

Definition at line 135 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

136  {
137 
138  return SG::ConstAccessor< T >(name, clsname).isAvailable(*this);
139  }

◆ isAvailableWritable() [1/2]

template<class T , class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool SG::AuxElement::isAvailableWritable ( const std::string &  name,
const std::string &  clsname = "" 
)
inherited

Check if an aux variable is available for writing.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

◆ isAvailableWritable() [2/2]

template<class T >
XAOD_AUXDATA_DEPRECATED bool xAOD::IParticle::isAvailableWritable ( const std::string &  name,
const std::string &  clsname = "" 
) const
inlineinherited

Check if a user property is available for writing or not.

This function can be used to check whether it will be possible to set a user property on the object.

Parameters
nameName of the auxiliary variable
clsnameThe name of the associated class. May be blank
Returns
Whether the decoration is possible to set

Definition at line 152 of file Event/xAOD/xAODBase/xAODBase/IParticle.h.

153  {
154 
155  return SG::Accessor< T >(name, clsname).isAvailableWritable(*this);
156  }

◆ isAvailableWritableAsDecoration()

template<class T , class ALLOC = AuxAllocator_t<T>>
XAOD_AUXDATA_DEPRECATED bool SG::AuxElement::isAvailableWritableAsDecoration ( const std::string &  name,
const std::string &  clsname = "" 
) const
inherited

Check if an aux variable is available for writing as a decoration.

Parameters
nameName of the aux variable.
clsnameThe name of the associated class. May be blank.

This method has to translate from the aux data name to the internal representation each time it is called. Using this method inside of loops is discouraged; instead use the Accessor class.

◆ m()

double xAOD::TrackParticle_v1::m ( ) const
finaloverridevirtual

The invariant mass of the particle..

Implements xAOD::IParticle.

Definition at line 84 of file TrackParticle_v1.cxx.

84  {
85  // Codes using a fitter set a hypothesis, and the
86  // particular fitter that was employed..
87  // A mass is never set/stored.
88  //
89  // In the past we were returning the mass of a charged pion always
90  //
91  // This created a confusion on why TrackParticles created by
92  // specific lepton fitter have a pion mass (the leptons per se have the
93  // correct mass). Lets try to remedy this.
94  uint8_t hypo = particleHypothesis();
95  if (hypo == xAOD::electron) {
96  // Since GX2 also set sometimes the hypo to electron
97  // lets also check for GSF.
101  }
102  }
103  if (hypo == xAOD::muon) {
105  }
106  // default charged pion
108  }

◆ makePrivateStore() [1/3]

void SG::AuxElement::makePrivateStore ( )
inherited

Create a new (empty) private store for this object.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

Definition at line 192 of file AuxElement.cxx.

193 {
194  if (m_container) {
195  throw SG::ExcBadPrivateStore ("store already exists");
196  }
197 
201 }

◆ makePrivateStore() [2/3]

template<class U1 >
void SG::AuxElement::makePrivateStore ( const U1 &  other,
bool  warnUnlocked = false 
)
inherited

Create a new private store for this object and copy aux data.

Parameters
otherThe object from which aux data should be copied.
warnUnlockedIf true, then warn when we skip unlocked decorations.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

If other is an object that has aux data, then those data will be copied; otherwise, nothing will be done.

◆ makePrivateStore() [3/3]

template<class U1 >
void SG::AuxElement::makePrivateStore ( const U1 *  other,
bool  warnUnlocked = false 
)
inherited

Create a new private store for this object and copy aux data.

Parameters
otherThe object from which aux data should be copied.
warnUnlockedIf true, then warn when we skip unlocked decorations.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

If other is an object that has aux data, then those data will be copied; otherwise, nothing will be done.

◆ makePrivateStore1() [1/2]

void SG::AuxElement::makePrivateStore1 ( const AuxElement other,
bool  warnUnlocked 
)
privateinherited

Create a new private store for this object and copy aux data.

Parameters
otherThe object from which aux data should be copied.
warnUnlockedIf true, then warn when we skip unlocked decorations.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

This overload handles the case where other does have aux data.

Definition at line 565 of file AuxElement.cxx.

567 {
569  if (other)
570  this->copyAux (*other, warnUnlocked);
571 }

◆ makePrivateStore1() [2/2]

void SG::AuxElement::makePrivateStore1 ( const void *  other,
bool  warnUnlocked 
)
privateinherited

Create a new private store for this object and copy aux data.

Parameters
otherThe object from which aux data should be copied.
warnUnlockedIf true, then warn when we skip unlocked decorations.

ExcBadPrivateStore will be thrown if this object is already associated with a store.

This overload handles the case where other does not have aux data.

◆ noPrivateData()

bool SG::IAuxElement::noPrivateData ( ) const
protectedinherited

True if this element has no private data.

◆ numberDoF()

float xAOD::TrackParticle_v1::numberDoF ( ) const

Returns the number of degrees of freedom of the overall track or vertex fit as float.

◆ numberOfIBLOverflowsdEdx()

uint8_t xAOD::TrackParticle_v1::numberOfIBLOverflowsdEdx ( ) const

◆ numberOfParameters()

size_t xAOD::TrackParticle_v1::numberOfParameters ( ) const

Returns the number of additional parameters stored in the TrackParticle.

number of parameters should be the size of positions we need for them

Definition at line 554 of file TrackParticle_v1.cxx.

554  {
556  static const Accessor< std::vector<uint8_t> > acc( "parameterPosition" );
557  if(! acc.isAvailable( *this )) return 0;
558  return acc(*this).size();
559  }

◆ numberOfUsedHitsdEdx()

uint8_t xAOD::TrackParticle_v1::numberOfUsedHitsdEdx ( ) const

◆ operator=()

TrackParticle_v1 & xAOD::TrackParticle_v1::operator= ( const TrackParticle_v1 tp)

Assignment operator. This can involve creating and copying an Auxilary store, and so should be used sparingly.

Definition at line 58 of file TrackParticle_v1.cxx.

58  {
59  if(this == &tp) return *this;
60 
61  if( ( ! hasStore() ) && ( ! container() ) ) {
63  }
64  this->IParticle::operator=( tp );
65 #ifndef XAOD_ANALYSIS
66  // assume that this copy will create new cache as needed
67  m_perigeeParameters.reset();
68 #endif // not XAOD_ANALYSIS
69  return *this;
70  }

◆ p4()

TrackParticle_v1::FourMom_t xAOD::TrackParticle_v1::p4 ( ) const
finaloverridevirtual

The full 4-momentum of the particle.

Implements xAOD::IParticle.

Definition at line 130 of file TrackParticle_v1.cxx.

130  {
132  using namespace std;
133  float p = 10.e6; // 10 TeV (default value for very high pt muons, with qOverP==0)
134  if (fabs(qOverP())>0.) p = 1/fabs(qOverP());
135  float thetaT = theta();
136  float phiT = phi();
137  float sinTheta= sin(thetaT);
138  float px = p*sinTheta*cos(phiT);
139  float py = p*sinTheta*sin(phiT);
140  float pz = p*cos(thetaT);
141  float e = pow (m(),2) +
142  pow( px,2) + pow( py,2) + pow( pz,2);
143  p4.SetPxPyPzE( px, py, pz, sqrt(e) );
144  return p4;
145  }

◆ parameterPosition()

xAOD::ParameterPosition xAOD::TrackParticle_v1::parameterPosition ( unsigned int  index) const

Return the ParameterPosition of the parameters at 'index'.

Definition at line 648 of file TrackParticle_v1.cxx.

649  {
650  static const Accessor< std::vector<uint8_t> > acc( "parameterPosition" );
651  return static_cast<xAOD::ParameterPosition>(acc(*this).at(index));
652  }

◆ parameterPX()

float xAOD::TrackParticle_v1::parameterPX ( unsigned int  index) const

Returns the parameter x momentum component, for 'index'.

Definition at line 613 of file TrackParticle_v1.cxx.

613  {
614  static const Accessor< std::vector<float> > acc( "parameterPX" );
615  return acc(*this).at(index);
616  }

◆ parameterPY()

float xAOD::TrackParticle_v1::parameterPY ( unsigned int  index) const

Returns the parameter y momentum component, for 'index'.

Definition at line 618 of file TrackParticle_v1.cxx.

618  {
619  static const Accessor< std::vector<float> > acc( "parameterPY" );
620  return acc(*this).at(index);
621  }

◆ parameterPZ()

float xAOD::TrackParticle_v1::parameterPZ ( unsigned int  index) const

Returns the parameter z momentum component, for 'index'.

Definition at line 623 of file TrackParticle_v1.cxx.

623  {
624  static const Accessor< std::vector<float> > acc( "parameterPZ" );
625  return acc(*this).at(index);
626  }

◆ parameterX()

float xAOD::TrackParticle_v1::parameterX ( unsigned int  index) const

Returns the parameter x position, for 'index'.

Definition at line 598 of file TrackParticle_v1.cxx.

598  {
599  static const Accessor< std::vector<float> > acc( "parameterX" );
600  return acc(*this).at(index);
601  }

◆ parameterY()

float xAOD::TrackParticle_v1::parameterY ( unsigned int  index) const

Returns the parameter y position, for 'index'.

Definition at line 603 of file TrackParticle_v1.cxx.

603  {
604  static const Accessor< std::vector<float> > acc( "parameterY" );
605  return acc(*this).at(index);
606  }

◆ parameterZ()

float xAOD::TrackParticle_v1::parameterZ ( unsigned int  index) const

Returns the parameter z position, for 'index'.

Definition at line 608 of file TrackParticle_v1.cxx.

608  {
609  static const Accessor< std::vector<float> > acc( "parameterZ" );
610  return acc(*this).at(index);
611  }

◆ particleHypothesis()

xAOD::ParticleHypothesis xAOD::TrackParticle_v1::particleHypothesis ( ) const

Returns the particle hypothesis used for Track fitting.

Definition at line 729 of file TrackParticle_v1.cxx.

729  {
730  static const Accessor<uint8_t> acc("particleHypothesis");
731  if (!acc.isAvailable(*this)) {
732  return xAOD::pion;
733  }
734  return static_cast<xAOD::ParticleHypothesis>(acc(*this));
735  }

◆ patternRecoInfo()

std::bitset< xAOD::NumberOfTrackRecoInfo > xAOD::TrackParticle_v1::patternRecoInfo ( ) const

Access method for pattern recognition algorithm.

Definition at line 707 of file TrackParticle_v1.cxx.

708  {
709  static const Accessor< uint64_t > acc( "patternRecoInfo" );
710  std::bitset<xAOD::NumberOfTrackRecoInfo> tmp(acc(*this));
711  return tmp;
712  }

◆ perigeeParameters()

const Trk::Perigee & xAOD::TrackParticle_v1::perigeeParameters ( ) const

Returns the Trk::MeasuredPerigee track parameters.

These are defined as: \(\left(\begin{array}{c}d_0\\z_0\\\phi_0\\\theta\\q/p\\\end{array}\right)\)

Note
This is only available in Athena.

Definition at line 486 of file TrackParticle_v1.cxx.

486  {
487 
488  // Require the cache to be valid and check if the cached pointer has been set
489  if(m_perigeeParameters.isValid()){
490  return *(m_perigeeParameters.ptr());
491  }
492  static const Accessor< float > acc1( "d0" );
493  static const Accessor< float > acc2( "z0" );
494  static const Accessor< float > acc3( "phi" );
495  static const Accessor< float > acc4( "theta" );
496  static const Accessor< float > acc5( "qOverP" );
497  static const Accessor< std::vector<float> > acc6( "definingParametersCovMatrix" );
498  ParametersCovMatrix_t cov = ParametersCovMatrix_t(definingParametersCovMatrix());
499  static const Accessor< float > acc7( "beamlineTiltX" );
500  static const Accessor< float > acc8( "beamlineTiltY" );
501 
502  if(!acc7.isAvailable( *this ) || !acc8.isAvailable( *this )){
503  Trk::Perigee tmpPerigeeParameters(
504  acc1(*this),
505  acc2(*this),
506  acc3(*this),
507  acc4(*this),
508  acc5(*this),
510  std::move(cov));
511  m_perigeeParameters.set(tmpPerigeeParameters);
512  return *(m_perigeeParameters.ptr());
513  }
514 
515  Amg::Translation3D amgtranslation(vx(),vy(),vz());
516  Amg::Transform3D pAmgTransf = amgtranslation * Amg::RotationMatrix3D::Identity();
517  pAmgTransf *= Amg::AngleAxis3D(acc8(*this), Amg::Vector3D(0.,1.,0.));
518  pAmgTransf *= Amg::AngleAxis3D(acc7(*this), Amg::Vector3D(1.,0.,0.));
519  Trk::Perigee tmpPerigeeParameters(acc1(*this),
520  acc2(*this),
521  acc3(*this),
522  acc4(*this),
523  acc5(*this),
524  pAmgTransf,
525  std::move(cov));
526 
527  m_perigeeParameters.set(tmpPerigeeParameters);
528  return *(m_perigeeParameters.ptr());
529  }

◆ phi()

virtual double xAOD::TrackParticle_v1::phi ( ) const
finaloverridevirtual

The azimuthal angle ( \(\phi\)) of the particle (has range \(-\pi\) to \(+\pi\).)

Implements xAOD::IParticle.

◆ phi0()

float xAOD::TrackParticle_v1::phi0 ( ) const

Returns the \(\phi\) parameter, which has range \(-\pi\) to \(+\pi\).

Definition at line 159 of file TrackParticle_v1.cxx.

159  {
160 
161  static const Accessor< float > acc( "phi" );
162  return acc( *this );
163  }

◆ pt()

double xAOD::TrackParticle_v1::pt ( ) const
finaloverridevirtual

The transverse momentum ( \(p_T\)) of the particle.

Implements xAOD::IParticle.

Definition at line 74 of file TrackParticle_v1.cxx.

74  {
75  return genvecP4().Pt();
76  }

◆ qOverP()

float xAOD::TrackParticle_v1::qOverP ( ) const

Returns the \(q/p\) parameter.

◆ radiusOfFirstHit()

float xAOD::TrackParticle_v1::radiusOfFirstHit ( ) const

Returns the radius of the first hit.

◆ rapidity()

double xAOD::TrackParticle_v1::rapidity ( ) const
finaloverridevirtual

The true rapidity (y) of the particle.

Implements xAOD::IParticle.

Definition at line 113 of file TrackParticle_v1.cxx.

113  {
114  return genvecP4().Rapidity();
115  }

◆ releasePrivateStore()

void SG::AuxElement::releasePrivateStore ( )
inherited

Release and free any private store associated with this object.

ExcBadPrivateStore will be thrown if this object does not have a private store.

Definition at line 210 of file AuxElement.cxx.

211 {
212  if (hadPrivateData()) {
213  // We had a private store, but it was released because this object
214  // was added to a container. Just forget about it.
216  return;
217  }
218 
219  if (!havePrivateData() ||
220  !m_container ||
221  typeid(*m_container) != typeid(AuxElementPrivateData))
222  {
223  throw SG::ExcBadPrivateStore ("no private store exists");
224  }
225 
228  delete m_container;
229  m_container = 0;
230 }

◆ releasePrivateStoreForDtor()

void SG::AuxElement::releasePrivateStoreForDtor ( )
privateinherited

Out-of-line portion of destructor.

Delete a private store if we have one.

Definition at line 441 of file AuxElement.cxx.

442 {
443 #ifdef ATHCONTAINERS_R21_COMPAT
444  if (havePrivateData()) {
445  delete m_container;
446  }
447 #else
449 #endif
450 }

◆ resetCache()

void xAOD::TrackParticle_v1::resetCache ( )

Reset the internal cache of the object.

Definition at line 822 of file TrackParticle_v1.cxx.

822  {
823 #ifndef XAOD_ANALYSIS
824  m_perigeeParameters.reset();
825 #endif // not XAOD_ANALYSIS
826  }

◆ setBeamlineTiltX()

void xAOD::TrackParticle_v1::setBeamlineTiltX ( float  tiltX)

◆ setBeamlineTiltY()

void xAOD::TrackParticle_v1::setBeamlineTiltY ( float  tiltY)

◆ setConstStore()

void SG::AuxElement::setConstStore ( const SG::IConstAuxStore store)
inherited

Synonym for setStore with IConstAuxStore.

Parameters
storeThe new store.

◆ setDefiningParameters() [1/2]

void xAOD::TrackParticle_v1::setDefiningParameters ( float  d0,
float  z0,
float  phi0,
float  theta,
float  qOverP 
)

Set the defining parameters.

Definition at line 178 of file TrackParticle_v1.cxx.

178  {
179 #ifndef XAOD_ANALYSIS
180  // reset perigee cache if existing
181  if(m_perigeeParameters.isValid()) {
182  m_perigeeParameters.reset();
183  }
184 #endif // not XAOD_ANALYSIS
185  static const Accessor< float > acc1( "d0" );
186  acc1( *this ) = d0;
187 
188  static const Accessor< float > acc2( "z0" );
189  acc2( *this ) = z0;
190 
191  static const Accessor< float > acc3( "phi" );
192  acc3( *this ) = phi0;
193 
194  static const Accessor< float > acc4( "theta" );
195  acc4( *this ) = theta;
196 
197  static const Accessor< float > acc5( "qOverP" );
198  acc5( *this ) = qOverP;
199 
200  return;
201  }

◆ setDefiningParameters() [2/2]

void xAOD::TrackParticle_v1::setDefiningParameters ( float  d0,
float  z0,
float  phi0,
float  theta,
float  qOverP,
float  time 
)

Definition at line 203 of file TrackParticle_v1.cxx.

203  {
205  setTime(time);
206  return;
207  }

◆ setDefiningParametersCovMatrix()

void xAOD::TrackParticle_v1::setDefiningParametersCovMatrix ( const ParametersCovMatrix_t &  cov)

Set the defining parameters covariance matrix.

Definition at line 214 of file TrackParticle_v1.cxx.

214  {
215 
216 #ifndef XAOD_ANALYSIS
217  // reset perigee cache if existing
218  if(m_perigeeParameters.isValid()) {
219  m_perigeeParameters.reset();
220  }
221 #endif // not XAOD_ANALYSIS
222 
223  // Extract the diagonal elements from the matrix.
224  std::vector< float > diagVec;
225  diagVec.reserve( cov.rows() );
226  for( int i = 0; i < cov.rows(); ++i ) {
227  diagVec.push_back( cov( i, i ) );
228  }
229  // Set the variable.
231 
232  // Extract the off-diagonal elements from the matrix.
233  std::vector< float > offDiagVec;
234  offDiagVec.reserve( ( ( cov.rows() - 1 ) * cov.rows() ) / 2 );
235  for( int i = 1; i < cov.rows(); ++i ) {
236  for( int j = 0; j < i; ++j ) {
237  float offDiagCoeff = (cov( i, i )>0 && cov( j, j )>0) ? cov( i, j )/sqrt(cov( i, i )*cov( j, j )) : 0;
238  offDiagVec.push_back( offDiagCoeff );
239  }
240  }
241  // Set the variable.
243 
244  return;
245  }

◆ setDefiningParametersCovMatrixDiagVec()

void xAOD::TrackParticle_v1::setDefiningParametersCovMatrixDiagVec ( const std::vector< float > &  vec)

Set the defining parameters covariance matrix using a length 15 vector.

Set the diagonal elements of the defining parameters covariance matrix

Definition at line 395 of file TrackParticle_v1.cxx.

395  {
396 
397  if (vec.size() != ParametersCovMatrix_t::RowsAtCompileTime) {
398  throw std::runtime_error(
399  "Setting track definingParametersCovMatrixDiag with vector of size " +
400  std::to_string(vec.size()) + " instead of expected " +
401  std::to_string(ParametersCovMatrix_t::RowsAtCompileTime) +
402  " is not supported");
403  }
404 
405  accCovMatrixDiag( *this ) = vec;
406  return;
407  }

◆ setDefiningParametersCovMatrixOffDiagVec()

void xAOD::TrackParticle_v1::setDefiningParametersCovMatrixOffDiagVec ( const std::vector< float > &  vec)

Set the off-diagonal elements of the defining parameters covariance matrix.

Definition at line 409 of file TrackParticle_v1.cxx.

409  {
410 
411  bool offDiagCompr = definingParametersCovMatrixOffDiagCompr();
412 
413  unsigned int uncompr_size = ( ( ( ParametersCovMatrix_t::RowsAtCompileTime - 1 ) *
414  ParametersCovMatrix_t::RowsAtCompileTime ) / 2 );
415  unsigned int size = offDiagCompr ? COVMATRIX_OFFDIAG_VEC_COMPR_SIZE : uncompr_size;
416 
417  if( !(vec.size() == size || vec.size() == uncompr_size) ){ //If off-diagonal elements are already compressed, can either set with uncompressed or compressed vector
418  throw std::runtime_error(
419  "Setting track definingParametersCovMatrixOffDiag with vector of "
420  "size " +
421  std::to_string(vec.size()) + " instead of expected " +
422  std::to_string(size) + " or " + std::to_string(uncompr_size) +
423  " is not supported");
424  }
425 
426  accCovMatrixOffDiag( *this ) = vec;
427  return;
428  }

◆ setDefiningParametersCovMatrixVec()

void xAOD::TrackParticle_v1::setDefiningParametersCovMatrixVec ( const std::vector< float > &  cov)

Definition at line 461 of file TrackParticle_v1.cxx.

461  {
462 
463  xAOD::ParametersCovMatrix_t covMatrix;
464  if( !cov.empty() ) Amg::expand( cov.begin(), cov.end(),covMatrix );
465  else covMatrix.setIdentity();
467 
468  }

◆ setFitQuality()

void xAOD::TrackParticle_v1::setFitQuality ( float  chiSquared,
float  numberDoF 
)

Set the 'Fit Quality' information.

Definition at line 535 of file TrackParticle_v1.cxx.

535  {
536  static const Accessor< float > acc1( "chiSquared" );
537  acc1( *this ) = chiSquared;
538  static const Accessor< float > acc2( "numberDoF" );
539  acc2( *this ) = numberDoF;
540  }

◆ setHadPrivateData()

void SG::IAuxElement::setHadPrivateData ( )
privateinherited

Record that this element used to have private data.

◆ setHasValidTime()

void xAOD::TrackParticle_v1::setHasValidTime ( uint8_t  hasValidTime)

◆ setHavePrivateData()

void SG::IAuxElement::setHavePrivateData ( )
privateinherited

Record that this element currently has private data.

◆ setHitPattern()

void xAOD::TrackParticle_v1::setHitPattern ( uint32_t  hitpattern)

◆ setIdentifierOfFirstHit()

void xAOD::TrackParticle_v1::setIdentifierOfFirstHit ( uint64_t  id)

Set the offline identifier of the first hit.

◆ setIndex()

void SG::AuxElement::setIndex ( size_t  index,
SG::AuxVectorData container 
)
privateinherited

Set the index/container for this element.

Parameters
indexThe index of this object within the container.
containerThe container holding this object. May be null if this object is being removed from a container.

Usually this simply sets the index and container members of this object. However, in the case where this object has an associated private store, then we need to deal with releasing the store if the object is being added to a container, or making a new store if the object is being removed from a container.

◆ setIndexPrivate()

bool SG::AuxElement::setIndexPrivate ( size_t  index,
SG::AuxVectorData container 
)
privateinherited

Set the index/container for this element.

Parameters
indexThe index of this object within the container.
containerThe container holding this object. May be null if this object is being removed from a container.

This is called from setIndex when we have a private store to deal with.

Definition at line 505 of file AuxElement.cxx.

506 {
507 #ifdef ATHCONTAINERS_R21_COMPAT
508  if (hadPrivateData()) {
509  // We had a private store, but it was released because we were added
510  // to a container.
511 
512  if (container == 0) {
513  // We're being moved out of the container. Make a new private
514  // store, copy the data, and switch to it.
515  auto privateData = new SG::AuxElementPrivateData;
516  AuxElement to (privateData, 0);
517  to.copyAux (*this);
520  m_container = privateData;
521  return true;
522  }
523  }
524  else if (havePrivateData() &&
525  typeid(*m_container) == typeid(AuxElementPrivateData))
526  {
527  // We currently have a private store.
528 
529  if (container != 0 && container != m_container) {
530  // We're being added to a container.
531  // Aux data has already been copied.
532  // Release private store.
535  delete m_container;
537  return false;
538  }
539  }
540  else {
541  // We have a standalone store.
542  throw SG::ExcBadPrivateStore ("Attempt to add/remove a standalone object "
543  "from a container.");
544  }
545 
548  return false;
549 #else
551 #endif
552 }

◆ setNonConstStore()

void SG::AuxElement::setNonConstStore ( SG::IAuxStore store)
inherited

Synonym for setStore with IAuxStore.

Parameters
storeThe new store.

◆ setNoPrivateData()

void SG::IAuxElement::setNoPrivateData ( )
privateinherited

Record that this element does not have private data.

◆ setNumberOfIBLOverflowsdEdx()

void xAOD::TrackParticle_v1::setNumberOfIBLOverflowsdEdx ( uint8_t  numoverflows)

◆ setNumberOfUsedHitsdEdx()

void xAOD::TrackParticle_v1::setNumberOfUsedHitsdEdx ( uint8_t  numhits)

◆ setParameterPosition()

void xAOD::TrackParticle_v1::setParameterPosition ( unsigned int  index,
xAOD::ParameterPosition  pos 
)

Set the 'position' (i.e. where it is in ATLAS) of the parameter at 'index', using the ParameterPosition enum.

Definition at line 668 of file TrackParticle_v1.cxx.

668  {
669  static const Accessor< std::vector<uint8_t> > acc( "parameterPosition" );
670  acc( *this ).at(index) = static_cast<uint8_t>(pos);
671  }

◆ setParametersOrigin()

void xAOD::TrackParticle_v1::setParametersOrigin ( float  x,
float  y,
float  z 
)

Set the origin for the parameters.

Definition at line 474 of file TrackParticle_v1.cxx.

474  {
475  static const Accessor< float > acc1( "vx" );
476  acc1( *this ) = x;
477 
478  static const Accessor< float > acc2( "vy" );
479  acc2( *this ) = y;
480 
481  static const Accessor< float > acc3( "vz" );
482  acc3( *this ) = z;
483  }

◆ setParticleHypothesis()

void xAOD::TrackParticle_v1::setParticleHypothesis ( const ParticleHypothesis  hypo)

Method for setting the particle type, using the ParticleHypothesis enum.

Definition at line 724 of file TrackParticle_v1.cxx.

724  {
725  static const Accessor<uint8_t> acc("particleHypothesis");
726  acc(*this) = static_cast<uint8_t>(value);
727  }

◆ setPatternRecognitionInfo() [1/2]

void xAOD::TrackParticle_v1::setPatternRecognitionInfo ( const std::bitset< xAOD::NumberOfTrackRecoInfo > &  patternReco)

Method setting the pattern recognition algorithm, using a bitset.

The bitset should be created using the TrackPatternRecoInfo enum as follows:

const std::bitset<xAOD::NumberOfTrackRecoInfo> patternReco;
patternReco.set(xAOD::Fatras);

Definition at line 719 of file TrackParticle_v1.cxx.

719  {
720  static const Accessor< uint64_t > acc( "patternRecoInfo" );
721  acc( *this ) = patternReco.to_ullong();
722  }

◆ setPatternRecognitionInfo() [2/2]

void xAOD::TrackParticle_v1::setPatternRecognitionInfo ( uint64_t  patternReco)

Method setting the pattern recognition algorithm, using a 64-bit int (which is faster than using a bitset).

The bit set should be created using the TrackPatternRecoInfo enum as follows:

uint64_t patternReco;
patternReco |= (1<<static_cast<uint64_t>(xAOD::Fatras))

Definition at line 714 of file TrackParticle_v1.cxx.

714  {
715  static const Accessor< uint64_t > acc( "patternRecoInfo" );
716  acc( *this ) = patternReco;
717  }

◆ setRadiusOfFirstHit()

void xAOD::TrackParticle_v1::setRadiusOfFirstHit ( float  radius)

Set the radius of the first hit.

◆ setStore() [1/3]

void SG::AuxElement::setStore ( const DataLink< SG::IConstAuxStore > &  store)
inherited

Set the store associated with this object.

Parameters
storeThe new store.

If store is nonzero, this adds a standalone store to the object. The object must not be in a container and must not have a private store. If store is zero, this removes a standalone store.

Parameters
storeLink to the new store.

Definition at line 269 of file AuxElement.cxx.

270 {
271  AuxElementStandaloneData* data = setStore1 (store);
272  if (store)
273  data->setStore (store);
274 }

◆ setStore() [2/3]

void SG::AuxElement::setStore ( const SG::IConstAuxStore store)
inherited

Set the store associated with this object.

Parameters
storeThe new store.

If store is nonzero, this adds a standalone store to the object. The object must not be in a container and must not have a private store. If store is zero, this removes a standalone store.

Definition at line 241 of file AuxElement.cxx.

242 {
243  AuxElementStandaloneData* data = setStore1 (store);
244  if (store)
245  data->setStore (store);
246 }

◆ setStore() [3/3]

void SG::AuxElement::setStore ( SG::IAuxStore store)
inherited

Set the store associated with this object.

Parameters
storeThe new store.

If store is nonzero, this adds a standalone store to the object. The object must not be in a container and must not have a private store. If store is zero, this removes a standalone store.

Definition at line 257 of file AuxElement.cxx.

258 {
259  AuxElementStandaloneData* data = setStore1 (store);
260  if (store)
261  data->setStore (store);
262 }

◆ setStore1()

AuxElementStandaloneData * SG::AuxElement::setStore1 ( const SG::IConstAuxStore store)
privateinherited

Set the store associated with this object.

Parameters
storeThe new store.

Helper for setStore. Creates the AuxElementStandaloneData object if needed and returns it.

Parameters
storeThe new store.

Helper for setStore. Creates the @x AuxElementStandaloneData object if needed and returns it.

Definition at line 461 of file AuxElement.cxx.

462 {
463  if (store) {
464  // Want this object be standalone.
465  if (!m_container) {
466  // Not in a container (and no private store). Make a new object.
467  AuxElementStandaloneData* data = new AuxElementStandaloneData;
469  m_container = data;
470  return data;
471  }
472  if (usingStandaloneStore()) {
473  // Standalone --- return existing object.
474  return static_cast<AuxElementStandaloneData*> (container());
475  }
476  // Otherwise, it's an error.
477  throw ExcBadPrivateStore ("Attempt to attach a standalone store to an "
478  "object in a container or with a private store.");
479  }
480 
481  else {
482  // Getting rid of a standalone store.
483  if (usingStandaloneStore()) {
485  delete m_container;
486  m_container = 0;
487  }
488  else if (m_container != 0)
489  throw ExcBadPrivateStore ("Attempt to remove a standalone store from an "
490  "object in a container or with a private store.");
491  return 0;
492  }
493 }

◆ setSummaryValue() [1/2]

void xAOD::TrackParticle_v1::setSummaryValue ( float value,
const SummaryType information 
)

Set method for TrackSummary values.

Definition at line 759 of file TrackParticle_v1.cxx.

759  {
761  // Set the value:
762  ( *acc )( *this ) = value;
763  }

◆ setSummaryValue() [2/2]

void xAOD::TrackParticle_v1::setSummaryValue ( uint8_t value,
const SummaryType information 
)

Set method for TrackSummary values.

Definition at line 753 of file TrackParticle_v1.cxx.

753  {
755  // Set the value:
756  ( *acc )( *this ) = value;
757  }

◆ setTime()

void xAOD::TrackParticle_v1::setTime ( float  time)

◆ setTimeResolution()

void xAOD::TrackParticle_v1::setTimeResolution ( float  timeResolution)

◆ setTrackFitter()

void xAOD::TrackParticle_v1::setTrackFitter ( const TrackFitter  fitter)

Method for setting the fitter, using the TrackFitter enum.

Definition at line 694 of file TrackParticle_v1.cxx.

694  {
695  static const Accessor<uint8_t> acc("trackFitter");
696  acc(*this) = static_cast<uint8_t>(value);
697  }

◆ setTrackLink()

void xAOD::TrackParticle_v1::setTrackLink ( const ElementLink< TrackCollection > &  track)

Set the link to the original track.

Note
This is only available in Athena.

Definition at line 795 of file TrackParticle_v1.cxx.

796  {
797 
798  // The accessor:
799  static const Accessor< ElementLink< TrackCollection > > acc( "trackLink" );
800 
801  // Do the deed:
802  acc( *this ) = el;
803  return;
804  }

◆ setTrackParameterCovarianceMatrix()

void xAOD::TrackParticle_v1::setTrackParameterCovarianceMatrix ( unsigned int  index,
std::vector< float > &  cov 
)

Set the cov matrix of the parameter at 'index', using a vector of floats.

The vector \(\mathrm{v}(a1,a2,a3 ... a_{15})\) represents the lower diagonal, i.e. it gives a matrix of \(\left(\begin{array}{ccccc} a_1 & a_2 & a_4 & a_7 & a_{11} \\ a_2 & a_3 & a_5 & a_8 & a_{12} \\ a_4 & a_5 & a_6 & a_9 & a_{13} \\ a_7 & a_8 & a_9 & a_{10} & a_{14} \\ a_{11} & a_{12} & a_{13} & a_{14} & a_{15} \end{array}\right)\)

Definition at line 639 of file TrackParticle_v1.cxx.

639  {
640  assert(cov.size()==15);
641  unsigned int offset = index*15;
642  static const Accessor< std::vector < float > > acc( "trackParameterCovarianceMatrices" );
643  std::vector<float>& v = acc(*this);
644  v.resize(offset+15);
645  std::copy(cov.begin(),cov.end(),v.begin()+offset );
646  }

◆ setTrackParameters()

void xAOD::TrackParticle_v1::setTrackParameters ( std::vector< std::vector< float > > &  parameters)

Set the parameters via the passed vector of vectors.

The vector<float> should be of size 6: x,y,z,px,py,pz (charge is stored elsewhere)

Definition at line 568 of file TrackParticle_v1.cxx.

568  {
569  static const Accessor< std::vector < float > > acc1( "parameterX" );
570  static const Accessor< std::vector < float > > acc2( "parameterY" );
571  static const Accessor< std::vector < float > > acc3( "parameterZ" );
572  static const Accessor< std::vector < float > > acc4( "parameterPX" );
573  static const Accessor< std::vector < float > > acc5( "parameterPY" );
574  static const Accessor< std::vector < float > > acc6( "parameterPZ" );
575  static const Accessor< std::vector<uint8_t> > acc7( "parameterPosition" );
576 
577  acc1(*this).resize(parameters.size());
578  acc2(*this).resize(parameters.size());
579  acc3(*this).resize(parameters.size());
580  acc4(*this).resize(parameters.size());
581  acc5(*this).resize(parameters.size());
582  acc6(*this).resize(parameters.size());
583  acc7(*this).resize(parameters.size());
584 
585  unsigned int index=0;
586  std::vector<std::vector<float> >::const_iterator it=parameters.begin(), itEnd=parameters.end();
587  for (;it!=itEnd;++it,++index){
588  assert((*it).size()==6);
589  acc1(*this).at(index)=(*it).at(0);
590  acc2(*this).at(index)=(*it).at(1);
591  acc3(*this).at(index)=(*it).at(2);
592  acc4(*this).at(index)=(*it).at(3);
593  acc5(*this).at(index)=(*it).at(4);
594  acc6(*this).at(index)=(*it).at(5);
595  }
596  }

◆ setTrackProperties()

void xAOD::TrackParticle_v1::setTrackProperties ( const TrackProperties  properties)

Methods setting the TrackProperties.

◆ summaryValue() [1/2]

bool xAOD::TrackParticle_v1::summaryValue ( float value,
const SummaryType information 
) const

Accessor for TrackSummary values.

If 'information' is stored in this TrackParticle and is of the correct templated type T, then the function fills 'value' and returns 'true', otherwise it returns 'false', and does not touch 'value'. See below for an example of how this is intended to be used.

if( myParticle.summaryValue(numberOfBLayerHits,xAOD::numberOfBLayerHits) ){
ATH_MSG_INFO("Successfully retrieved the integer value, numberOfBLayerHits");
}
float numberOfCscPhiHits=0.0; //Wrong! This is actually an int too.
if( !myParticle.summaryValue(numberOfCscPhiHits,xAOD::numberOfCscPhiHits) ){
ATH_MSG_INFO("Types must match!");
}
Parameters
[in]informationThe information being requested. This is not guaranteed to be stored in all TrackParticles.
[out]valueOnly filled if this TrackParticle contains 'information', and the types match.
Returns
Returns 'true' if the TrackParticle contains 'information', and its concrete type matches 'value' (templated type T).

Definition at line 745 of file TrackParticle_v1.cxx.

745  {
747  if( ( ! acc ) || ( ! acc->isAvailable( *this ) ) ) return false;
748  // Retrieve the value:
749  value = ( *acc )( *this );
750  return true;
751  }

◆ summaryValue() [2/2]

bool xAOD::TrackParticle_v1::summaryValue ( uint8_t value,
const SummaryType information 
) const

Accessor for TrackSummary values.

If 'information' is stored in this TrackParticle and is of the correct templated type T, then the function fills 'value' and returns 'true', otherwise it returns 'false', and does not touch 'value'. See below for an example of how this is intended to be used.

if( myParticle.summaryValue(numberOfBLayerHits,xAOD::numberOfBLayerHits) ){
ATH_MSG_INFO("Successfully retrieved the integer value, numberOfBLayerHits");
}
float numberOfCscPhiHits=0.0; //Wrong! This is actually an int too.
if( !myParticle.summaryValue(numberOfCscPhiHits,xAOD::numberOfCscPhiHits) ){
ATH_MSG_INFO("Types must match!");
}
Parameters
[in]informationThe information being requested. This is not guaranteed to be stored in all TrackParticles.
[out]valueOnly filled if this TrackParticle contains 'information', and the types match.
Returns
Returns 'true' if the TrackParticle contains 'information', and its concrete type matches 'value' (templated type T).

Definition at line 737 of file TrackParticle_v1.cxx.

737  {
739  if( ( ! acc ) || ( ! acc->isAvailable( *this ) ) ) return false;
740  // Retrieve the value:
741  value = ( *acc )( *this );
742  return true;
743  }

◆ theta()

float xAOD::TrackParticle_v1::theta ( ) const

Returns the \(\theta\) parameter, which has range 0 to \(\pi\).

◆ time()

float xAOD::TrackParticle_v1::time ( ) const

Returns the time.

◆ timeResolution()

float xAOD::TrackParticle_v1::timeResolution ( ) const

Returns the time resolution.

◆ track()

const Trk::Track * xAOD::TrackParticle_v1::track ( ) const

Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.

Note
This is only available in Athena.

Definition at line 806 of file TrackParticle_v1.cxx.

806  {
807 
808  // The accessor:
809  static const ConstAccessor< ElementLink< TrackCollection > > acc( "trackLink" );
810 
811  if( ! acc.isAvailable( *this ) ) {
812  return nullptr;
813  }
814  if( ! acc( *this ).isValid() ) {
815  return nullptr;
816  }
817 
818  return *( acc( *this ) );
819  }

◆ trackFitter()

xAOD::TrackFitter xAOD::TrackParticle_v1::trackFitter ( ) const

Returns the fitter.

Definition at line 699 of file TrackParticle_v1.cxx.

699  {
700  static const Accessor<uint8_t> acc("trackFitter");
701  if (!acc.isAvailable(*this)) {
703  }
704  return static_cast<xAOD::TrackFitter>(acc(*this));
705  }

◆ trackIndices()

bool SG::AuxElement::trackIndices ( ) const
inherited

Return true if index tracking is enabled for this object.

Always returns true. Included here to be consistent with AuxVectorBase when standalone objects may be used as template parameters.

◆ trackLink()

const ElementLink< TrackCollection > & xAOD::TrackParticle_v1::trackLink ( ) const

Returns a link (which can be invalid) to the Trk::Track which was used to make this TrackParticle.

The function will return an invalid ElementLink in case nothing was set for it yet.

Note
This is only available in Athena.

This is to avoid users having to always check both for the decoration being available, and the link being valid.

Returns
An element link to the parent Trk::Track of this track particle

Definition at line 780 of file TrackParticle_v1.cxx.

780  {
781 
782  // The accessor:
783  static const ConstAccessor< ElementLink< TrackCollection > > acc( "trackLink" );
784 
785  // Check if one of them is available:
786  if( acc.isAvailable( *this ) ) {
787  return acc( *this );
788  }
789 
790  // If no Trk::Track link was not set (yet), return a dummy object:
792  return dummy;
793  }

◆ trackParameterCovarianceMatrix()

xAOD::ParametersCovMatrix_t xAOD::TrackParticle_v1::trackParameterCovarianceMatrix ( unsigned int  index) const

Returns the TrackParticleCovMatrix_t (covariance matrix) at 'index', which corresponds to the parameters at the same index.

Definition at line 628 of file TrackParticle_v1.cxx.

629  {
630  static const Accessor< std::vector<float> > acc( "trackParameterCovarianceMatrices" );
631  unsigned int offset = index*15;
632  // copy the correct values into the temp matrix
633  xAOD::ParametersCovMatrix_t tmp;
634  std::vector<float>::const_iterator it = acc(*this).begin()+offset;
635  Amg::expand(it,it+15,tmp);
636  return tmp;
637  }

◆ trackParameters()

const CurvilinearParameters_t xAOD::TrackParticle_v1::trackParameters ( unsigned int  index) const

Returns the track parameter vector at 'index'.

Definition at line 561 of file TrackParticle_v1.cxx.

561  {
562  CurvilinearParameters_t tmp;
565  return tmp;
566  }

◆ trackProperties()

TrackProperties xAOD::TrackParticle_v1::trackProperties ( ) const

Access methods for track properties, which returns 'true' if a logical AND of the parameter 'proprty' and the stored properties returns true.

i.e. you do:

TrackProperties testProperty;
testProperty.set(SOMEPROPERTY);
if (trackParticle.trackProperties(testProperty)) doSomething();
Todo:
  • fix the above (or make something nicer)

◆ type()

Type::ObjectType xAOD::TrackParticle_v1::type ( ) const
finaloverridevirtual

The type of the object as a simple enumeration.

Implements xAOD::IParticle.

Definition at line 147 of file TrackParticle_v1.cxx.

147  {
148  return Type::TrackParticle;
149  }

◆ usingPrivateStore()

bool SG::AuxElement::usingPrivateStore ( ) const
inherited

Test to see if this object is currently using a private store.

Definition at line 280 of file AuxElement.cxx.

281 {
282  return havePrivateData() &&
283  typeid(*m_container) == typeid(AuxElementPrivateData);
284 }

◆ usingStandaloneStore()

bool SG::AuxElement::usingStandaloneStore ( ) const
inherited

Test to see if this object is currently using a standalone store.

Test to see if this object is currently using a private store.

Definition at line 290 of file AuxElement.cxx.

291 {
292  return havePrivateData() &&
293  typeid(*m_container) == typeid(AuxElementStandaloneData);
294 }

◆ vx()

float xAOD::TrackParticle_v1::vx ( ) const

The x origin for the parameters.

◆ vy()

float xAOD::TrackParticle_v1::vy ( ) const

The y origin for the parameters.

◆ vz()

float xAOD::TrackParticle_v1::vz ( ) const

The z origin for the parameters.

◆ z0()

float xAOD::TrackParticle_v1::z0 ( ) const

Returns the \(z_0\) parameter.

Member Data Documentation

◆ COVMATRIX_OFFDIAG_VEC_COMPR_SIZE

const std::size_t xAOD::TrackParticle_v1::COVMATRIX_OFFDIAG_VEC_COMPR_SIZE = 6
staticprivate

Definition at line 349 of file TrackParticle_v1.h.

◆ m_container

const SG::AuxVectorData* SG::ConstAuxElement::m_container
privateinherited

The container of which this object is an element.

Should be null if this object is not within a container, except that it may also point at a private store.

Definition at line 335 of file AuxElement.h.

◆ m_index

size_t SG::IAuxElement::m_index
privateinherited

The index of this element within its container.

Should be 0 if this object is not within a container.

Definition at line 128 of file IAuxElement.h.

◆ m_perigeeParameters

CxxUtils::CachedValue<Trk::Perigee> xAOD::TrackParticle_v1::m_perigeeParameters
private

Cached MeasuredPerigee, built from this object.

Note
This is only available in Athena.

Definition at line 368 of file TrackParticle_v1.h.

◆ m_privateStoreState

PrivateStoreState SG::IAuxElement::m_privateStoreState
privateinherited

Definition at line 137 of file IAuxElement.h.

◆ supportsThinning

constexpr bool SG::AuxElement::supportsThinning = true
staticconstexprinherited

Mark that this type supports thinning operations.

See AthContainers/supportsThinning.h and AthenaPoolCnvSvc/T_AthenaPoolCnv.h. Helps guide which pool converter template will be used. If false, the default pool converter will be used rather than the aux store-specific one. Ordinary xAOD type should not touch this, but may be overridden in a derived class to handle certain special cases.

Definition at line 959 of file AuxElement.h.


The documentation for this class was generated from the following files:
python.CaloBCIDAvgAlgConfig.acc3
def acc3
Definition: CaloBCIDAvgAlgConfig.py:69
SG::AuxVectorData::getConstStore
const SG::IConstAuxStore * getConstStore() const
Return the current store, as a const interface.
xAOD::TrackParticle_v1::GenVecFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzM4D< double > > GenVecFourMom_t
Base 4 Momentum type for TrackParticle.
Definition: TrackParticle_v1.h:78
SGTest::store
TestStore store
Definition: TestStore.cxx:23
beamspotman.r
def r
Definition: beamspotman.py:674
LArSamples::FitterData::fitter
const ShapeFitter * fitter
Definition: ShapeFitter.cxx:23
SG::ConstAuxElement::getAuxIDs
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items for this object.
Definition: AuxElement.cxx:153
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:196
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
xAOD::name
name
Definition: TriggerMenuJson_v1.cxx:29
xAOD::AmgSymMatrix
AmgSymMatrix(N) toEigen(const ConstMatrixMap< N > &xAODmat) requires(N > 1)
Definition: MeasurementDefs.h:88
xAOD::TrackParticle_v1::th_index
@ th_index
Definition: TrackParticle_v1.h:348
xAOD::TrackParticle_v1::m
virtual double m() const override final
The invariant mass of the particle..
Definition: TrackParticle_v1.cxx:84
xAOD::trackSummaryAccessorV1< float >
const SG::AuxElement::Accessor< float > * trackSummaryAccessorV1< float >(xAOD::SummaryType type)
Definition: TrackSummaryAccessors_v1.cxx:127
get_generator_info.result
result
Definition: get_generator_info.py:21
test_pyathena.px
px
Definition: test_pyathena.py:18
Amg::compress
void compress(const AmgSymMatrix(N) &covMatrix, std::vector< float > &vec)
Definition: EventPrimitivesHelpers.h:56
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:558
xAOD::electron
@ electron
Definition: TrackingPrimitives.h:195
SG::AuxTypeRegistry::instance
static AuxTypeRegistry & instance()
Return the singleton registry instance.
Definition: AuxTypeRegistry.cxx:639
SG::Accessor< T >
xAOD::TrackParticle_v1::vx
float vx() const
The x origin for the parameters.
SG::AuxVectorData::getDecorIDs
const SG::auxid_set_t & getDecorIDs() const
Return a set of identifiers for decorations for this object.
Definition: AuxVectorData.cxx:215
xAOD::TrackParticle_v1::setDefiningParametersCovMatrixDiagVec
void setDefiningParametersCovMatrixDiagVec(const std::vector< float > &vec)
Set the defining parameters covariance matrix using a length 15 vector.
Definition: TrackParticle_v1.cxx:395
xAOD::TrackParticle_v1::charge
float charge() const
Returns the charge.
Definition: TrackParticle_v1.cxx:151
Trk::PerigeeSurface
Definition: PerigeeSurface.h:43
SG::AuxVectorData::getWritableAuxIDs
const SG::auxid_set_t & getWritableAuxIDs() const
Return a set of identifiers for writable data items in this store.
Definition: AuxVectorData.cxx:231
index
Definition: index.py:1
xAOD::TrackFitter
TrackFitter
Enums to identify who created this track and which properties does it have.
Definition: TrackingPrimitives.h:40
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
SG::ConstAuxElement::m_container
const SG::AuxVectorData * m_container
The container of which this object is an element.
Definition: AuxElement.h:335
ParticleConstants::PDG2011::muonMassInMeV
constexpr double muonMassInMeV
the mass of the muon (in MeV)
Definition: ParticleConstants.h:29
xAOD::TrackParticle_v1::vz
float vz() const
The z origin for the parameters.
xAOD::TrackParticle_v1::parameterPX
float parameterPX(unsigned int index) const
Returns the parameter x momentum component, for 'index'.
Definition: TrackParticle_v1.cxx:613
SG::AuxElement::clearAuxHelper
static void clearAuxHelper(AuxVectorData &container, size_t index)
Clear all aux data associated with an element.
Definition: AuxElement.cxx:639
xAOD::TrackParticle_v1::m_perigeeParameters
CxxUtils::CachedValue< Trk::Perigee > m_perigeeParameters
Cached MeasuredPerigee, built from this object.
Definition: TrackParticle_v1.h:368
skel.it
it
Definition: skel.GENtoEVGEN.py:407
xAOD::TrackParticle_v1::FourMom_t
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
Definition: TrackParticle_v1.h:72
SG::AuxVectorData::hasNonConstStore
bool hasNonConstStore() const
Return true if this object has an associated non-const store.
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:200
xAOD::TrackParticle_v1::z0
float z0() const
Returns the parameter.
xAOD::TrackParticle_v1::chiSquared
float chiSquared() const
Returns the of the overall track fit.
ParticleTest.tp
tp
Definition: ParticleTest.py:25
xAOD::pion
@ pion
Definition: TrackingPrimitives.h:197
xAOD::TrackParticle_v1::setDefiningParameters
void setDefiningParameters(float d0, float z0, float phi0, float theta, float qOverP)
Set the defining parameters.
Definition: TrackParticle_v1.cxx:178
athena.value
value
Definition: athena.py:124
SG::AuxElement::usingStandaloneStore
bool usingStandaloneStore() const
Test to see if this object is currently using a standalone store.
Definition: AuxElement.cxx:290
xAOD::TrackParticle_v1::qp_index
@ qp_index
Definition: TrackParticle_v1.h:348
SG::ConstAuxElement::setIndexPrivate
bool setIndexPrivate(size_t index, const SG::AuxVectorData *container)
Set the index/container for this element.
Definition: AuxElement.cxx:97
xAOD::TrackParticle_v1::covMatrixIndex
covMatrixIndex
Definition: TrackParticle_v1.h:348
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:9
SG::ConstAccessor< T >
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
xAOD::trackSummaryAccessorV1< uint8_t >
const SG::AuxElement::Accessor< uint8_t > * trackSummaryAccessorV1< uint8_t >(xAOD::SummaryType type)
Definition: TrackSummaryAccessors_v1.cxx:25
xAOD::ParameterPosition
ParameterPosition
Enum allowing us to know where in ATLAS the parameters are defined.
Definition: TrackingPrimitives.h:210
SG::ExcConstAuxData
Exception — Non-const operation performed on const aux data.
Definition: Control/AthContainers/AthContainers/exceptions.h:77
SG::IAuxElement::setNoPrivateData
void setNoPrivateData()
Record that this element does not have private data.
x
#define x
xAOD::py
py
Definition: CompositeParticle_v1.cxx:160
xAOD::TrackParticle_v1::d0_index
@ d0_index
Definition: TrackParticle_v1.h:348
xAOD::numberOfBLayerHits
@ numberOfBLayerHits
these are the hits in the first pixel layer, i.e.
Definition: TrackingPrimitives.h:232
xAOD::TrackParticle_v1::d0
float d0() const
Returns the parameter.
Amg::expand
void expand(std::vector< float >::const_iterator it, std::vector< float >::const_iterator, AmgSymMatrix(N) &covMatrix)
Definition: EventPrimitivesHelpers.h:75
xAOD::TrackParticle_v1::parameterX
float parameterX(unsigned int index) const
Returns the parameter x position, for 'index'.
Definition: TrackParticle_v1.cxx:598
SG::AuxVectorData::getAuxIDs
const SG::auxid_set_t & getAuxIDs() const
Return a set of identifiers for existing data items in store associated with this object.
Definition: AuxVectorData.cxx:203
SG::AuxTypeRegistry
Handle mappings between names and auxid_t.
Definition: AuxTypeRegistry.h:61
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
ParticleConstants::PDG2011::chargedPionMassInMeV
constexpr double chargedPionMassInMeV
the mass of the charged pion (in MeV)
Definition: ParticleConstants.h:41
SG::IAuxElement::index
size_t index() const
Return the index of this element within its container.
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
CxxUtils::vec
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
Definition: vec.h:207
SG::IAuxElement::setHadPrivateData
void setHadPrivateData()
Record that this element used to have private data.
xAOD::TrackParticle_v1::p4
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
Definition: TrackParticle_v1.cxx:130
xAOD::TrackParticle_v1::parameterY
float parameterY(unsigned int index) const
Returns the parameter y position, for 'index'.
Definition: TrackParticle_v1.cxx:603
xAOD::TrackProperties
TrackProperties
Definition: TrackingPrimitives.h:66
xAOD::TrackParticle_v1::parameterPY
float parameterPY(unsigned int index) const
Returns the parameter y momentum component, for 'index'.
Definition: TrackParticle_v1.cxx:618
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
xAOD::TrackParticle_v1::definingParametersCovMatrixOffDiagCompr
bool definingParametersCovMatrixOffDiagCompr() const
Definition: TrackParticle_v1.cxx:430
xAOD::TrackParticle_v1::trackFitter
TrackFitter trackFitter() const
Returns the fitter.
Definition: TrackParticle_v1.cxx:699
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
SG::AuxElement::copyAux
void copyAux(const ConstAuxElement &other, bool warnUnlocked=false)
Copy aux data from another object.
Definition: AuxElement.cxx:600
xAOD::FirstMeasurement
@ FirstMeasurement
Parameter defined at the position of the 1st measurement.
Definition: TrackingPrimitives.h:214
SG::AuxElement::AuxElement
AuxElement()
Default constructor.
python.CaloBCIDAvgAlgConfig.acc1
def acc1
Definition: CaloBCIDAvgAlgConfig.py:49
xAOD::covMatrix
covMatrix
Definition: TrackMeasurement_v1.cxx:19
SG::IAuxElement::havePrivateData
bool havePrivateData() const
True if this element currently has private data.
ATHCONTAINERS_WARNING
#define ATHCONTAINERS_WARNING(ctx, msg)
Definition: error.h:57
xAOD::GaussianSumFilter
@ GaussianSumFilter
Tracks from Gaussian Sum Filter.
Definition: TrackingPrimitives.h:50
master.flag
bool flag
Definition: master.py:29
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
SG::AuxVectorData::getStore
SG::IAuxStore * getStore()
Return the current store, as a non-const interface.
CalibDbCompareRT.dummy
dummy
Definition: CalibDbCompareRT.py:59
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
SG::ConstAuxElement::getDecorIDs
const SG::auxid_set_t & getDecorIDs() const
Return a set of identifiers for decorations for this object.
Definition: AuxElement.cxx:172
python.CaloBCIDAvgAlgConfig.acc2
def acc2
Definition: CaloBCIDAvgAlgConfig.py:59
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
AthenaPoolTestRead.acc
acc
Definition: AthenaPoolTestRead.py:16
SG::AuxElementPrivateData
Internal data container for private store.
Definition: AuxElement.cxx:46
xAOD::TrackParticle_v1::covMatrixIndexPairVec
std::vector< std::pair< covMatrixIndex, covMatrixIndex > > covMatrixIndexPairVec
Definition: TrackParticle_v1.h:350
xAOD::TrackParticle_v1::genvecP4
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : GenVector form.
Definition: TrackParticle_v1.cxx:117
Trk::CurvilinearParametersT
Definition: CurvilinearParametersT.h:48
xAOD::TrackParticle_v1::parameterPosition
xAOD::ParameterPosition parameterPosition(unsigned int index) const
Return the ParameterPosition of the parameters at 'index'.
Definition: TrackParticle_v1.cxx:648
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
SG::AuxVectorData::hasStore
bool hasStore() const
Return true if this object has an associated store.
python.LArRecUtilsConfig.acc4
def acc4
Definition: LArRecUtilsConfig.py:196
python.LArRecUtilsConfig.acc5
def acc5
Definition: LArRecUtilsConfig.py:205
xAOD::TrackParticle_v1::particleHypothesis
ParticleHypothesis particleHypothesis() const
Returns the particle hypothesis used for Track fitting.
Definition: TrackParticle_v1.cxx:729
python.LuminosityCondAlgConfig.acc6
def acc6
Definition: LuminosityCondAlgConfig.py:260
xAOD::TrackParticle_v1::phi0
float phi0() const
Returns the parameter, which has range to .
Definition: TrackParticle_v1.cxx:159
xAOD::TrackParticle_v1::qOverP
float qOverP() const
Returns the parameter.
xAOD::TrackParticle_v1::definingParametersCovMatrix
const ParametersCovMatrix_t definingParametersCovMatrix() const
Returns the 5x5 symmetric matrix containing the defining parameters covariance matrix.
Definition: TrackParticle_v1.cxx:247
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
xAOD::TrackParticle_v1::vy
float vy() const
The y origin for the parameters.
xAOD::TrackParticle_v1::z0_index
@ z0_index
Definition: TrackParticle_v1.h:348
SG::IAuxElement::setHavePrivateData
void setHavePrivateData()
Record that this element currently has private data.
xAOD::TrackParticle_v1::parameterPZ
float parameterPZ(unsigned int index) const
Returns the parameter z momentum component, for 'index'.
Definition: TrackParticle_v1.cxx:623
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
SG::AuxVectorData::clearCache
void clearCache()
Clear the cached aux data pointers.
xAOD::Fatras
@ Fatras
Track from FATRAS.
Definition: TrackingPrimitives.h:116
python.LuminosityCondAlgConfig.acc7
def acc7
Definition: LuminosityCondAlgConfig.py:268
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:192
xAOD::TrackParticle_v1::e
virtual double e() const override final
The total energy of the particle.
Definition: TrackParticle_v1.cxx:110
xAOD::TrackParticle_v1::numberOfParameters
size_t numberOfParameters() const
Returns the number of additional parameters stored in the TrackParticle.
Definition: TrackParticle_v1.cxx:554
xAOD::TrackParticle_v1::setDefiningParametersCovMatrix
void setDefiningParametersCovMatrix(const ParametersCovMatrix_t &cov)
Set the defining parameters covariance matrix.
Definition: TrackParticle_v1.cxx:214
xAOD::ParticleHypothesis
ParticleHypothesis
Definition: TrackingPrimitives.h:193
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
CxxUtils::to
CONT to(RANGE &&r)
Definition: ranges.h:39
xAOD::TrackParticle_v1::time
float time() const
Returns the time.
SG::AuxElement::hasStore
bool hasStore() const
Return true if this object has an associated store.
Definition: AuxElement.cxx:398
python.PyAthena.v
v
Definition: PyAthena.py:154
xAOD::IParticle::IParticle
IParticle()=default
SG::IAuxElement::setIndex
void setIndex(size_t index)
Set the index of this element within its container.
xAOD::NumberOfTrackFitters
@ NumberOfTrackFitters
maximum number of enums
Definition: TrackingPrimitives.h:62
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
y
#define y
SG::AuxVectorData::clearDecorations
bool clearDecorations() const
Clear all decorations.
Definition: AuxVectorData.cxx:653
xAOD::TrackParticle_v1::COVMATRIX_OFFDIAG_VEC_COMPR_SIZE
static const std::size_t COVMATRIX_OFFDIAG_VEC_COMPR_SIZE
Definition: TrackParticle_v1.h:349
SG::ExcBadPrivateStore
Exception — Bad use of private store.
Definition: Control/AthContainers/AthContainers/exceptions.h:113
SG::Accessor::isAvailableWritable
bool isAvailableWritable(ELT &e) const
Test to see if this variable exists in the store and is writable.
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
SG::IConstAuxStore::getDecorIDs
virtual const SG::auxid_set_t & getDecorIDs() const =0
Return a set of identifiers for decorations in this store.
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
xAOD::TrackParticle_v1::setDefiningParametersCovMatrixOffDiagVec
void setDefiningParametersCovMatrixOffDiagVec(const std::vector< float > &vec)
Set the off-diagonal elements of the defining parameters covariance matrix.
Definition: TrackParticle_v1.cxx:409
xAOD::TrackParticle_v1::parameterZ
float parameterZ(unsigned int index) const
Returns the parameter z position, for 'index'.
Definition: TrackParticle_v1.cxx:608
SG::auxid_set_t
A set of aux data identifiers.
Definition: AuxTypes.h:47
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Amg::AngleAxis3D
Eigen::AngleAxisd AngleAxis3D
Definition: GeoPrimitives.h:45
xAOD::TrackParticle_v1::numberDoF
float numberDoF() const
Returns the number of degrees of freedom of the overall track or vertex fit as float.
xAOD::TrackParticle_v1::setTime
void setTime(float time)
SG::AuxVectorData
Manage lookup of vectors of auxiliary data.
Definition: AuxVectorData.h:168
calibdata.copy
bool copy
Definition: calibdata.py:26
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
SG::ConstAuxElement::releasePrivateStoreForDtor
void releasePrivateStoreForDtor()
Out-of-line portion of destructor.
Definition: AuxElement.cxx:80
SG::AuxElement::container
const SG::AuxVectorData * container() const
Return the container holding this element.
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
xAOD::ParametersCovMatrixFilled_t
Eigen::Matrix< bool, 5, 5, 0, 5, 5 > ParametersCovMatrixFilled_t
Definition: TrackingPrimitives.h:35
xAODTrackParticlePrivate::covarianceUnsetHook
void covarianceUnsetHook()
Function that would be possible to use to debug what client is trying to access covariance matrix fro...
Definition: TrackParticle_v1.cxx:28
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
xAOD::TrackParticle_v1::theta
float theta() const
Returns the parameter, which has range 0 to .
Trk::numberOfCscPhiHits
@ numberOfCscPhiHits
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:107
SG::IAuxElement::hadPrivateData
bool hadPrivateData() const
True if this element had private data before it was added to its current container.
xAOD::IParticle::operator=
IParticle & operator=(const IParticle &)=default
SG::AuxElement::copyAuxHelper
static void copyAuxHelper(AuxVectorData &container, size_t index, const ConstAuxElement &other, bool warnUnlocked)
Copy aux data from another object.
Definition: AuxElement.cxx:667
xAOD::TrackParticle_v1::covMatrixComprIndexPairs
static const covMatrixIndexPairVec & covMatrixComprIndexPairs()
Definition: TrackParticle_v1.cxx:765
SG::IConstAuxStore::getAuxIDs
virtual const SG::auxid_set_t & getAuxIDs() const =0
Return a set of identifiers for existing data items in this store.
SG::AuxElement::setStore1
AuxElementStandaloneData * setStore1(const SG::IConstAuxStore *store)
Set the store associated with this object.
Definition: AuxElement.cxx:461
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
xAOD::TrackParticle_v1::phi_index
@ phi_index
Definition: TrackParticle_v1.h:348
fitman.k
k
Definition: fitman.py:528
CxxUtils::ConcurrentBitset::test
bool test(bit_t bit) const
Test to see if a bit is set.
ParticleConstants::PDG2011::electronMassInMeV
constexpr double electronMassInMeV
the mass of the electron (in MeV)
Definition: ParticleConstants.h:26