#include <TrackParticle_v1.h>
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_v1 & | operator= (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 () of the particle. | |
virtual double | eta () const |
The pseudorapidity () of the particle. | |
virtual double | phi () const |
The azimuthal angle () of the particle (has range to .). | |
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_t & | p4 () 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: . 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 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 parameter. | |
float | z0 () const |
Returns the parameter. | |
float | phi0 () const |
Returns the parameter, which has range to . | |
float | theta () const |
Returns the parameter, which has range 0 to . | |
float | qOverP () const |
Returns the parameter. | |
const DefiningParameters_t | definingParameters () const |
Returns a SVector of the Perigee track parameters. i.e. a vector of . | |
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 . 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 > > ¶meters) |
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 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 Vertex * | vertex () const |
Returns a pointer (which can be NULL) to the xAOD::Vertex associated with this TrackParticle. |
Class describing a TrackParticle.
const Trk::CurvilinearParameters xAOD::TrackParticle_v1::curvilinearParameters | ( | unsigned int | index | ) | const |
Returns a curvilinear representation of the parameters at 'index'.
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.
[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. |
size_t xAOD::TrackParticle_v1::numberOfParameters | ( | ) | const |
Returns the number of additional parameters stored in the TrackParticle.
const TrackParticle_v1::FourMom_t & xAOD::TrackParticle_v1::p4 | ( | ) | const [virtual] |
The full 4-momentum of the particle.
Implements xAOD::IParticle.
const Trk::Perigee & xAOD::TrackParticle_v1::perigeeParameters | ( | ) | const |
Returns the Trk::MeasuredPerigee track parameters.
These are defined as:
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.
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 represents the lower diagonal, i.e. it gives a matrix of
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!"); }
[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. |
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!"); }
[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. |
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.
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. This is to avoid users having to always check both for the decoration being available, and the link being valid.
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();