xAOD::TrackParticle_v1 Class Reference

#include <TrackParticle_v1.h>

Inheritance diagram for xAOD::TrackParticle_v1:
xAOD::IParticle SG::AuxElement SG::IAuxElement

List of all members.

Public Member Functions

 TrackParticle_v1 ()
 Default constructor.
 ~TrackParticle_v1 ()
 Destructor.
 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.
TrackParticle_v1operator= (const TrackParticle_v1 &tp)
 Assignment operator. This can involve creating and copying an Auxilary store, and so should be used sparingly.
bool summaryValue (uint8_t &value, const SummaryType &information) const
bool summaryValue (float &value, const SummaryType &information) const
void setSummaryValue (uint8_t &value, const SummaryType &information)
 Set method for TrackSummary values.
void setSummaryValue (float &value, const SummaryType &information)

IParticle functions



typedef IParticle::FourMom_t FourMom_t
 Definition of the 4-momentum type.
virtual double pt () const
 The transverse momentum ($p_T$) of the particle.
virtual double eta () const
 The pseudorapidity ($\eta$) of the particle.
virtual double phi () const
 The azimuthal angle ($\phi$) of the particle (has range $-\pi$ to $+\pi$.).
virtual double m () const
 The invariant mass of the particle..
virtual double e () const
 The total energy of the particle.
virtual double rapidity () const
 The true rapidity (y) of the particle.
virtual const FourMom_tp4 () const
 The full 4-momentum of the particle.
virtual Type::ObjectType type () const
 The type of the object as a simple enumeration.

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.
float d0 () const
 Returns the $d_0$ parameter.
float z0 () const
 Returns the $z_0$ parameter.
float phi0 () const
 Returns the $\phi$ parameter, which has range $-\pi$ to $+\pi$.
float theta () const
 Returns the $\theta$ parameter, which has range 0 to $\pi$.
float qOverP () const
 Returns the $q/p$ parameter.
const DefiningParameters_t 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)$.
const ParametersCovMatrix_t definingParametersCovMatrix () const
 Returns the 5x5 symmetric matrix containing the defining parameters covariance matrix.
const std::vector< float > & definingParametersCovMatrixVec () const
 Returns the length 6 vector containing the elements of defining parameters covariance matrix.
void setDefiningParameters (float d0, float z0, float phi0, float theta, float qOverP)
 Set the defining parameters.
void setDefiningParametersCovMatrix (const ParametersCovMatrix_t &cov)
 Set the defining parameters covariance matrix.
void setDefiningParametersCovMatrixVec (const std::vector< float > &cov)
 Set the defining parameters covariance matrix using a length 15 vector.
float vx () const
 The x origin for the parameters.
float vy () const
 The y origin for the parameters.
float vz () const
 The z origin for the parameters.
void setParametersOrigin (float x, float y, float z)
 Set the origin for the parameters.
const Trk::Perigee & perigeeParameters () const
 Returns the Trk::MeasuredPerigee track parameters.

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.
const CurvilinearParameters_t trackParameters (unsigned int index) const
 Returns the track parameter vector at 'index'.
float parameterX (unsigned int index) const
 Returns the parameter x position, for 'index'.
float parameterY (unsigned int index) const
 Returns the parameter y position, for 'index'.
float parameterZ (unsigned int index) const
 Returns the parameter z position, for 'index'.
float parameterPX (unsigned int index) const
 Returns the parameter x momentum component, for 'index'.
float parameterPY (unsigned int index) const
 Returns the parameter y momentum component, for 'index'.
float parameterPZ (unsigned int index) const
 Returns the parameter z momentum component, for 'index'.
void setTrackParameters (std::vector< std::vector< float > > &parameters)
ParametersCovMatrix_t trackParameterCovarianceMatrix (unsigned int index) const
 Returns the TrackParticleCovMatrix_t (covariance matrix) at 'index', which corresponds to the parameters at the same index.
void setTrackParameterCovarianceMatrix (unsigned int index, std::vector< float > &cov)
xAOD::ParameterPosition parameterPosition (unsigned int index) const
 Return the ParameterPosition of the parameters at 'index'.
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.
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.
const Trk::CurvilinearParameters curvilinearParameters (unsigned int index) const
 Returns a curvilinear representation of the parameters at 'index'.
float radiusOfFirstHit () const
 Returns the radius of the first hit.
void setRadiusOfFirstHit (float radius)
 Set the radius of the first hit.
uint64_t identifierOfFirstHit () const
 Returns the offline identifier of the first hit.
void setIdentifierOfFirstHit (uint64_t id)
 Set the offline identifier of the first hit.
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.
float numberDoF () const
 Returns the number of degrees of freedom of the overall track or vertex fit as float.
void setFitQuality (float chiSquared, float numberDoF)
 Set the 'Fit Quality' information.

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.
void setPatternRecognitionInfo (const std::bitset< xAOD::NumberOfTrackRecoInfo > &patternReco)
void setPatternRecognitionInfo (uint64_t patternReco)
void setTrackFitter (const TrackFitter fitter)
 Method for setting the fitter, using the TrackFitter enum.
void setParticleHypothesis (const ParticleHypothesis hypo)
 Method for setting the particle type, using the ParticleHypothesis enum.
TrackProperties trackProperties () const
std::bitset
< NumberOfTrackRecoInfo > 
patternRecoInfo () const
 Access method for pattern recognition algorithm.
ParticleHypothesis particleHypothesis () const
 Returns the particle hypothesis used for Track fitting.
TrackFitter trackFitter () const
 Returns the fitter.

Links



const ElementLink
< TrackCollection > & 
trackLink () const
 Returns a link (which can be invalid) to the Trk::Track which was used to make this TrackParticle.
void setTrackLink (const ElementLink< TrackCollection > &track)
 Set the link to the original track.
const Trk::Track * track () const
 Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
const ElementLink
< VertexContainer > & 
vertexLink () const
 Returns a link (which can be invalid) to the xAOD::Vertex associated with this TrackParticle.
void setVertexLink (const ElementLink< VertexContainer > &vertex)
 Set the link to the vertex.
const Vertexvertex () const
 Returns a pointer (which can be NULL) to the xAOD::Vertex associated with this TrackParticle.

Detailed Description

Class describing a TrackParticle.

Author:
Edward Moyse <Edward.Moyse@cern.ch>
Markus Elsing <Markus.Elsing@cern.ch>

Member Function Documentation

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.
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] index Filled with the index of the track parameters at 'position' - untouched otherwise.
[out] position The location in the detector of the required track parameters.
Returns:
Returns 'true' if the TrackParticle parameters at 'position', returns False otherwise.
size_t xAOD::TrackParticle_v1::numberOfParameters (  )  const

Returns the number of additional parameters stored in the TrackParticle.

Todo:
  • Can we do this in a better way? Not great to force retrieval of one specific parameter - any would do.

const TrackParticle_v1::FourMom_t & xAOD::TrackParticle_v1::p4 (  )  const [virtual]

The full 4-momentum of the particle.

Todo:
Get value from somewhere. Also, the TrackParticle took the Pion mass - do we really want to do this? We have ParticleHypo?

Implements xAOD::IParticle.

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.
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))
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);
void xAOD::TrackParticle_v1::setSummaryValue ( float &  value,
const SummaryType information 
)

Set method for TrackSummary values.

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

Set the link to the original track.

Note:
This is only available in Athena.
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)$

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)

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.

 int numberOfBLayerHits=0;
 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] information The information being requested. This is not guaranteed to be stored in all TrackParticles.
[out] value Only 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).

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.

 int numberOfBLayerHits=0;
 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] information The information being requested. This is not guaranteed to be stored in all TrackParticles.
[out] value Only 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).
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.
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.

Note:
This is only available in Athena.

The function will return an invalid ElementLink in case nothing was set for it yet. 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
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)

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1