ATLAS Offline Software
|
#include <BPhysHelper.h>
Public Types | |
enum | pv_type { PV_MAX_SUM_PT2, PV_MIN_A0, PV_MIN_Z0, PV_MIN_Z0_BA } |
: Enum type of the PV More... | |
Public Member Functions | |
BPhysHelper (const xAOD::Vertex *b) | |
: Main constructor More... | |
const xAOD::Vertex * | vtx () const |
Getter method for the cached xAOD::Vertex. More... | |
const TMatrixTSym< double > & | covariance () |
: Returns full covariance matrix More... | |
Protected Member Functions | |
bool | cacheCov () |
: Cache covariance matrix More... | |
bool | cacheRefTracks () |
: Cache refitted tracks More... | |
bool | cacheMuons () |
: Cache linked muons More... | |
bool | cacheElectrons () |
bool | cachePrecedingVertices () |
: Cache preceding vertices More... | |
bool | cacheCascadeVertices () |
: Cache cascade vertices More... | |
Protected Attributes | |
const xAOD::Vertex * | m_b |
Cached B decay xAOD vertex. More... | |
Definition at line 71 of file BPhysHelper.h.
: Enum type of the PV
This enum type is used to identify type of the PV and quantities calculated using the PV. For instance, the transverse distance can be calculated wrt the default PV, the closest PV etc.
@value: PV_MAX_SUM_PT2 vertex with the largest sum Pt^2 (the default one) @value: PV_MIN_A0 collision vertex closest in 3D to the particle's trajectory, i.e. the vertex with the smalles 3D impact parameter a0 @value: PV_MIN_Z0 collision vertex closest in delta(z0) = pv_z - z0, where z0 is the z coordinate of the intesection of the particle's trajectory with the beam axis in the Z-rho plane. @value: PV_MIN_Z0_BA collision vertex closest in delta(z0) = pv_z - z0, where z0 is the z coordinate of the point of closest aproach (in 2D) to the particle's trajectory with the beam axis in the Z-rho plane.
Enumerator | |
---|---|
PV_MAX_SUM_PT2 | |
PV_MIN_A0 | |
PV_MIN_Z0 | |
PV_MIN_Z0_BA |
Definition at line 475 of file BPhysHelper.h.
|
inline |
: Main constructor
The Main constructor. BPhysHelper does NOT take ownership of the class "b"
[in] | b | Pointer to the xAOD::Vertex |
Definition at line 85 of file BPhysHelper.h.
float xAOD::BPhysHelper::a0 | ( | const pv_type | vertexType = BPhysHelper::PV_MIN_A0 | ) |
Get the 3D, transverse, and longitudinal impact parameters and their error.
Impact parameters and their error
[in] | vertexType | type (selection) of the PV ( |
Definition at line 957 of file BPhysHelper.cxx.
float xAOD::BPhysHelper::a0Err | ( | const pv_type | vertexType = BPhysHelper::PV_MIN_A0 | ) |
float xAOD::BPhysHelper::a0xy | ( | const pv_type | vertexType = BPhysHelper::PV_MIN_A0 | ) |
float xAOD::BPhysHelper::a0xyErr | ( | const pv_type | vertexType = BPhysHelper::PV_MIN_A0 | ) |
|
protected |
: Cache cascade vertices
To speed up access to linked cascade vertices, m_cachedCascadeVertices vector is created first time linked cascade vertices accessor methods are called. In subsequent calls, cached vector is used.
Definition at line 1316 of file BPhysHelper.cxx.
|
protected |
: Cache covariance matrix
To speed up access to covariance matrix, m_cachedCov attribute is created first time covariance matrix accessor method is called. In subsequent calls, cached matrix is used.
Definition at line 1089 of file BPhysHelper.cxx.
|
protected |
Definition at line 1226 of file BPhysHelper.cxx.
|
protected |
: Cache linked muons
To speed up access to linked muons, m_cachedMuons vector is created first time linked muon accessor methods are called. In subsequent calls, cached vector is used.
Definition at line 1181 of file BPhysHelper.cxx.
|
protected |
: Cache preceding vertices
To speed up access to linked preceding vertices, m_cachedPrecedingVertices vector is created first time linked preceding vertices accessor methods are called. In subsequent calls, cached vector is used.
Definition at line 1271 of file BPhysHelper.cxx.
|
protected |
: Cache refitted tracks
To speed up access to refitted track momenta, m_cachedRefTracks vector is created first time refitted track accessor methods are called. In subsequent calls, cached vector is used.
Definition at line 1137 of file BPhysHelper.cxx.
const xAOD::Vertex * xAOD::BPhysHelper::cascadeVertex | ( | const size_t | index | ) |
Returns pointer to a cascade vertex.
[in] | index | index of the cascade vertex |
Definition at line 694 of file BPhysHelper.cxx.
const std::vector< const xAOD::Vertex * > & xAOD::BPhysHelper::cascadeVertices | ( | ) |
Returns vector of pointers to cascade vertices.
Definition at line 710 of file BPhysHelper.cxx.
: Returns full covariance matrix
Converts native covariance matrix stored as a std::vector<float> into a symmetric matrix-form represented by TMatrixTSym<double> class.
Definition at line 103 of file BPhysHelper.cxx.
const xAOD::Electron * xAOD::BPhysHelper::electron | ( | const size_t | index | ) |
Definition at line 532 of file BPhysHelper.cxx.
const std::vector< const xAOD::Electron * > & xAOD::BPhysHelper::electrons | ( | ) |
Definition at line 548 of file BPhysHelper.cxx.
float xAOD::BPhysHelper::lxy | ( | const pv_type | vertexType = BPhysHelper::PV_MIN_A0 | ) |
Get the transverse decay distance and its error measured between the refitted primary vertex of type pv_type and the B vertex.
Transverse decay distance and its error
[in] | vertexType | type (selection) of the PV ( |
Definition at line 866 of file BPhysHelper.cxx.
float xAOD::BPhysHelper::lxyErr | ( | const pv_type | vertexType = BPhysHelper::PV_MIN_A0 | ) |
float xAOD::BPhysHelper::lxyz | ( | const pv_type | vertexType = BPhysHelper::PV_MIN_A0 | ) |
float xAOD::BPhysHelper::lxyzErr | ( | const pv_type | vertexType = BPhysHelper::PV_MIN_A0 | ) |
const xAOD::Muon * xAOD::BPhysHelper::muon | ( | const size_t | index | ) |
Returns pointer to the i-th linked muon.
[in] | index | index of the linked muon |
Definition at line 452 of file BPhysHelper.cxx.
const std::vector< const xAOD::Muon * > & xAOD::BPhysHelper::muons | ( | ) |
Returns linked muons.
Definition at line 468 of file BPhysHelper.cxx.
int xAOD::BPhysHelper::nCascadeVertices | ( | ) |
: Links to cascade vertices
Cascade decays, e.g. Bd->Jpsi(mumu)+Ks(pipi), consist of more than one reconstructed vertex. for instance in case of the Bd decay, 2 vertices are required. Cascade vertices links are used to store relations between mother and daughter vertices in the cascade decays. Returns number of cascade vertices
Definition at line 682 of file BPhysHelper.cxx.
int xAOD::BPhysHelper::nElectrons | ( | ) |
Definition at line 521 of file BPhysHelper.cxx.
int xAOD::BPhysHelper::nMuons | ( | ) |
: Methods providing access to the linked muons
By default, xAOD::Vertex provides only links to the TrackParticles used to build the vertex. Links to muons (e.g. for Jpsi->mu+mu) are stored using auxiliary branches. Returns number of stored muon links
Definition at line 441 of file BPhysHelper.cxx.
int xAOD::BPhysHelper::nPrecedingVertices | ( | ) |
: Links to preceding vertices
The B vertices are often build from tracks that have already been pre-selected by requirements based on some preceding vertex fit. For instance, B --> J/psi(mumu)+K vertex is only build using muon tracks that have been successfully refitted in a J/psi->mumu vertex.
The following methods enable to retrieve/store links to the vertices that were preceded this one in the reconstruction flow. Returns number of preceding vertices
Definition at line 601 of file BPhysHelper.cxx.
int xAOD::BPhysHelper::nRefTrks | ( | ) |
Returns number of stored refitted track momenta.
Methods providing access to the refitted tracks momenta and related quantities:
Definition at line 115 of file BPhysHelper.cxx.
int xAOD::BPhysHelper::nRefTrksCascade | ( | ) |
Returns number of stored refitted tracks INCLUDING those from the linked cascade vertices.
Definition at line 764 of file BPhysHelper.cxx.
const xAOD::Vertex * xAOD::BPhysHelper::origPv | ( | const pv_type | vertexType = BPhysHelper::PV_MIN_A0 | ) |
const xAOD::Vertex * xAOD::BPhysHelper::precedingVertex | ( | const size_t | index | ) |
Returns pointer to a preceding vertex.
[in] | index | index of the preceding vertex |
Definition at line 613 of file BPhysHelper.cxx.
const std::vector< const xAOD::Vertex * > & xAOD::BPhysHelper::precedingVertices | ( | ) |
Returns vector of pointers to preceding vertices.
Definition at line 629 of file BPhysHelper.cxx.
float xAOD::BPhysHelper::ptErr | ( | ) |
Returns pT error.
Definition at line 431 of file BPhysHelper.cxx.
const xAOD::Vertex * xAOD::BPhysHelper::pv | ( | const pv_type | vertexType = BPhysHelper::PV_MIN_A0 | ) |
Get the refitted collision vertex of type pv_type.
Links to the refitted primary vertices
[in] | vertexType | type (selection) of the PV ( |
Definition at line 796 of file BPhysHelper.cxx.
int xAOD::BPhysHelper::RefitPVStatus | ( | const pv_type | vertexType = BPhysHelper::PV_MIN_A0 | ) |
Get the exitCode of the refitter for vertex of type pv_type.
[in] | vertexType | type (selection) of the PV ( |
Definition at line 855 of file BPhysHelper.cxx.
TVector3 xAOD::BPhysHelper::refTrk | ( | const size_t | index | ) |
Returns i-th refitted track 3-momentum.
[in] | index | index of the refitted track |
Definition at line 126 of file BPhysHelper.cxx.
Returns i-th refitted track as a 4-vector given the mass hypothesis.
[in] | index | index of the refitted track |
[in] | mass | mass hypothesis assigned to the refitted track |
Definition at line 153 of file BPhysHelper.cxx.
Returns charge of the i-th track.
[in] | index | index of the track |
Definition at line 255 of file BPhysHelper.cxx.
const xAOD::IParticle * xAOD::BPhysHelper::refTrkOrigin | ( | const size_t | index | ) | const |
: Returns the original track (charged or neutral) corresponding to the i-th refitted track
In xAOD model, charged and neutral particles are represented by two distict classes: xAOD::TrackParticle and xAOD::NeutralParticle. Vertex fitters can use both as input and store charded tracks first (needs checking!!!) in the list of refitted momenta.
This method returns pointer to the original track corresponding to the i-th refitted track, i.e. either TrackParticle (if index<nTrackParticles) or NeutralParticle (if index>=nTrackParticles).
One has to dynamicly cast the returned value to either TrackParticle or NeutralParticle. One can use refTrkCharge to determine if the refitted track is charged or neutral.
[in] | index | index of the refitted track |
Definition at line 171 of file BPhysHelper.cxx.
TVector3 xAOD::BPhysHelper::refTrkOriginP | ( | const size_t | index | ) | const |
Returns perigee 3-momentum of the original track corresponding i-th refitted track.
[in] | index | index of the refitted track |
Definition at line 194 of file BPhysHelper.cxx.
: Returns lorentz vector build from the original track perigee momentum and given mass hypothesis
The lorentz vector is created from the perigee parameters of the original track (neutral or charged) which corresponds to the i-th refitted track and a given mass hypothesis
[in] | index | index of the refitted track |
[in] | mass | mass hypothesis of the track |
Definition at line 236 of file BPhysHelper.cxx.
const std::vector< TVector3 > & xAOD::BPhysHelper::refTrks | ( | ) |
Returns refitted track momenta.
Definition at line 142 of file BPhysHelper.cxx.
float xAOD::BPhysHelper::setA0 | ( | const float | val, |
const pv_type | vertexType = BPhysHelper::PV_MIN_A0 |
||
) |
Set the 3D and transverse impact parameters and their error.
[in] | vertexType | type (selection) of the PV ( |
[in] | val | input value |
Definition at line 1023 of file BPhysHelper.cxx.
float xAOD::BPhysHelper::setA0Err | ( | const float | val, |
const pv_type | vertexType = BPhysHelper::PV_MIN_A0 |
||
) |
float xAOD::BPhysHelper::setA0xy | ( | const float | val, |
const pv_type | vertexType = BPhysHelper::PV_MIN_A0 |
||
) |
float xAOD::BPhysHelper::setA0xyErr | ( | const float | val, |
const pv_type | vertexType = BPhysHelper::PV_MIN_A0 |
||
) |
bool xAOD::BPhysHelper::setCascadeVertices | ( | const std::vector< const xAOD::Vertex * > & | vertices, |
const xAOD::VertexContainer * | vertexContainer | ||
) |
Sets links to cascade vertices.
[in] | index | index of the cascade vertex |
Definition at line 722 of file BPhysHelper.cxx.
bool xAOD::BPhysHelper::setElectrons | ( | const std::vector< const xAOD::Electron * > & | electrons, |
const xAOD::ElectronContainer * | electronContainer | ||
) |
Definition at line 559 of file BPhysHelper.cxx.
bool xAOD::BPhysHelper::setLxy | ( | const float | val, |
const pv_type | vertexType = BPhysHelper::PV_MIN_A0 |
||
) |
Set the transverse decay distance and its error measured between the refitted primary vertex of type pv_type and the B vertex.
[in] | vertexType | type (selection) of the PV ( |
[in] | val | input value |
Definition at line 888 of file BPhysHelper.cxx.
bool xAOD::BPhysHelper::setLxyErr | ( | const float | val, |
const pv_type | vertexType = BPhysHelper::PV_MIN_A0 |
||
) |
bool xAOD::BPhysHelper::setLxyz | ( | const float | val, |
const pv_type | vertexType = BPhysHelper::PV_MIN_A0 |
||
) |
bool xAOD::BPhysHelper::setLxyzErr | ( | const float | val, |
const pv_type | vertexType = BPhysHelper::PV_MIN_A0 |
||
) |
bool xAOD::BPhysHelper::setMuons | ( | const std::vector< const xAOD::Muon * > & | muons, |
const xAOD::MuonContainer * | muonContainer | ||
) |
Set links to muons.
[in] | muons | std::vector of muons to be linked to this vertex |
[in] | muonContainer | collection these muons belong to |
Definition at line 479 of file BPhysHelper.cxx.
bool xAOD::BPhysHelper::setOrigPv | ( | const xAOD::Vertex * | pv, |
const xAOD::VertexContainer * | vertexContainer, | ||
const pv_type | vertexType = BPhysHelper::PV_MIN_A0 |
||
) |
Set the original collision vertex of type pv_type.
[in] | vertexType | type (selection) of the PV ( |
[in] | pv | pointer to the PV |
[in] | vertexContainer | collection in which the PV is stored |
Definition at line 818 of file BPhysHelper.cxx.
bool xAOD::BPhysHelper::setPrecedingVertices | ( | const std::vector< const xAOD::Vertex * > & | vertices, |
const xAOD::VertexContainer * | vertexContainer | ||
) |
Sets links to preceding vertices.
[in] | index | index of the preceding vertex |
Definition at line 641 of file BPhysHelper.cxx.
Set pT error.
[in] | input | value |
Definition at line 436 of file BPhysHelper.cxx.
bool xAOD::BPhysHelper::setPv | ( | const xAOD::Vertex * | pv, |
const xAOD::VertexContainer * | vertexContainer, | ||
const pv_type | vertexType = BPhysHelper::PV_MIN_A0 |
||
) |
Set the refitted collision vertex of type pv_type.
[in] | vertexType | type (selection) of the PV ( |
[in] | pv | pointer to the PV |
[in] | vertexContainer | collection in which the PV is stored |
Definition at line 831 of file BPhysHelper.cxx.
bool xAOD::BPhysHelper::setRefitPVStatus | ( | int | code, |
const pv_type | vertexType = BPhysHelper::PV_MIN_A0 |
||
) |
Set the exitCode of the refitter for vertex of type pv_type.
[in] | vertexType | type (selection) of the PV ( |
[in] | code | int containing the code |
Definition at line 844 of file BPhysHelper.cxx.
bool xAOD::BPhysHelper::setRefTrks | ( | ) |
: Sets refitted track momenta
This method uses as input the tracks-at-vertex branch (std::vector< Trk::VxTrackAtVertex >) in xAOD::Vertex. This method only works in ATHENA and only for transient xAOD::Vertex instances, which still hold the refitted tracks as vxTrackAtVertex branch. Once the vertex class is stored in the xAOD file, the vxTrackAtVertex branch is lost.
This method is meant to be called by the vertex fitters immediately after the vertex is created to convert vxTrackAtVertex branch into the persistifiable form.
Definition at line 341 of file BPhysHelper.cxx.
Sets refitted track momenta.
[in] | refTrks | std::vector of refitted momenta as TVector3 |
Definition at line 312 of file BPhysHelper.cxx.
bool xAOD::BPhysHelper::setRefTrks | ( | std::vector< float > | px, |
std::vector< float > | py, | ||
std::vector< float > | pz | ||
) |
Sets refitted track momenta.
[in] | px,py,pz | components of the refitted momenta |
Definition at line 286 of file BPhysHelper.cxx.
float xAOD::BPhysHelper::setZ0 | ( | const float | val, |
const pv_type | vertexType = BPhysHelper::PV_MIN_A0 |
||
) |
float xAOD::BPhysHelper::setZ0Err | ( | const float | val, |
const pv_type | vertexType = BPhysHelper::PV_MIN_A0 |
||
) |
TVector3 xAOD::BPhysHelper::totalP | ( | ) |
: Returns total 3-momentum calculated from the refitted tracks
Total momentum calculated from refitted tracksReturns total 3-momentum calculated from the refitted tracks.
Definition at line 374 of file BPhysHelper.cxx.
Returns total 4-momentum calculated from the refitted tracks given mass hypotheses for individual tracks.
[in] | masses | invariant mass hypotheses |
Definition at line 410 of file BPhysHelper.cxx.
|
inline |
Getter method for the cached xAOD::Vertex.
Definition at line 108 of file BPhysHelper.h.
float xAOD::BPhysHelper::z0 | ( | const pv_type | vertexType = BPhysHelper::PV_MIN_A0 | ) |
float xAOD::BPhysHelper::z0Err | ( | const pv_type | vertexType = BPhysHelper::PV_MIN_A0 | ) |
|
protected |
Cached B decay xAOD vertex.
Definition at line 674 of file BPhysHelper.h.
|
protected |
Definition at line 716 of file BPhysHelper.h.
|
protected |
Definition at line 682 of file BPhysHelper.h.
|
protected |
Definition at line 704 of file BPhysHelper.h.
|
protected |
Definition at line 703 of file BPhysHelper.h.
|
protected |
Definition at line 714 of file BPhysHelper.h.
|
protected |
Definition at line 692 of file BPhysHelper.h.
|
protected |
Definition at line 715 of file BPhysHelper.h.
|
protected |
cached covariance matrix
Definition at line 681 of file BPhysHelper.h.
|
protected |
Definition at line 702 of file BPhysHelper.h.
|
protected |
cached linked muons
Definition at line 701 of file BPhysHelper.h.
|
protected |
cached linked vertices
Definition at line 713 of file BPhysHelper.h.
|
protected |
cached refitted track momenta
Definition at line 691 of file BPhysHelper.h.
Return number of vertex association types (useful for loops).
Some useful static consts
Definition at line 613 of file BPhysHelper.h.
|
static |
Return string names for vertex association types.
Definition at line 605 of file BPhysHelper.h.
Definition at line 728 of file BPhysHelper.h.
|
staticprotected |
Definition at line 727 of file BPhysHelper.h.
|
staticprotected |
Definition at line 726 of file BPhysHelper.h.
|
staticprotected |
Return error values for vector quantities:
Definition at line 725 of file BPhysHelper.h.
|
staticprotected |
Definition at line 729 of file BPhysHelper.h.