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 | |
const xAOD::Vertex * | vtx () const |
const TMatrixTSym< double > & | covariance () |
: Returns full covariance matrix | |
Protected Member Functions | |
bool | cacheCov () |
: Cache covariance matrix | |
bool | cacheRefTracks () |
: Cache refitted tracks | |
bool | cacheMuons () |
: Cache linked muons | |
bool | cachePrecedingVertices () |
: Cache preceding vertices | |
bool | cacheCascadeVertices () |
: Cache cascade vertices | |
Protected Attributes | |
const xAOD::Vertex * | m_b |
| |
bool | m_covCached |
TMatrixTSym< double > | m_cachedCov |
bool | m_refTracksCached |
std::vector< TVector3 > | m_cachedRefTracks |
bool | m_muonsCached |
std::vector< const xAOD::Muon * > | m_cachedMuons |
bool | m_precedingVerticesCached |
std::vector< const xAOD::Vertex * > | m_cachedPrecedingVertices |
bool | m_cascadeVerticesCached |
std::vector< const xAOD::Vertex * > | m_cachedCascadeVertices |
static const std::vector < TVector3 > | emptyVectorOfTVector3 |
static const std::vector < const xAOD::Muon * > | emptyVectorOfMuons |
static const TMatrixTSym< double > | emptyMatrix |
static const std::vector < const xAOD::Vertex * > | emptyVectorOfVertices |
int | nRefTrks () |
TVector3 | refTrk (const size_t index) |
const std::vector< TVector3 > & | refTrks () |
TLorentzVector | refTrk (const size_t index, const float mass) |
const xAOD::IParticle * | refTrkOrigin (const size_t index) const |
: Returns the original track (charged or neutral) corresponding to the i-th refitted track | |
TVector3 | refTrkOriginP (const size_t index) const |
TLorentzVector | refTrkOriginP (const size_t index, const float mass) const |
: Returns lorentz vector build from the original track perigee momentum and given mass hypothesis | |
float | refTrkCharge (const size_t index) const |
bool | setRefTrks (const std::vector< float > &px, const std::vector< float > &py, const std::vector< float > &pz) |
bool | setRefTrks (const std::vector< TVector3 > &refTrks) |
bool | setRefTrks () |
: Sets refitted track momenta | |
TVector3 | totalP () |
: Returns total 3-momentum calculated from the refitted tracks | |
TLorentzVector | totalP (const std::vector< double > &masses) |
float | ptErr () |
bool | setPtErr (const float val) |
int | nMuons () |
: Methods providing access to the linked muons | |
const xAOD::Muon * | muon (const size_t index) |
const std::vector< const xAOD::Muon * > & | muons () |
bool | setMuons (const std::vector< const xAOD::Muon * > &muons, const xAOD::MuonContainer *muonContainer) |
int | nPrecedingVertices () |
: Links to preceding vertices | |
const xAOD::Vertex * | precedingVertex (const size_t index) |
const std::vector< const xAOD::Vertex * > & | precedingVertices () |
bool | setPrecedingVertices (const std::vector< const xAOD::Vertex * > &vertices, const xAOD::VertexContainer *vertexContainer) |
int | nCascadeVertices () |
: Links to cascade vertices | |
const xAOD::Vertex * | cascadeVertex (const size_t index) |
const std::vector< const xAOD::Vertex * > & | cascadeVertices () |
bool | setCascadeVertices (const std::vector< const xAOD::Vertex * > &vertices, const xAOD::VertexContainer *vertexContainer) |
int | nRefTrksCascade () |
const xAOD::Vertex * | pv (const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
refitted PV | |
const xAOD::Vertex * | origPv (const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
original PV | |
bool | setOrigPv (const xAOD::Vertex *pv, const xAOD::VertexContainer *vertexContainer, const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
bool | setPv (const xAOD::Vertex *pv, const xAOD::VertexContainer *vertexContainer, const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
bool | setRefitPVStatus (int code, const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
int | RefitPVStatus (const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
float | lxy (const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
decay distance | |
float | lxyErr (const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
its error | |
bool | setLxy (const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
decay distance | |
bool | setLxyErr (const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
its error | |
float | a0 (const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
3D impact parameter | |
float | a0Err (const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
3D impact parameter error | |
float | a0xy (const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
transverse impact parameter | |
float | a0xyErr (const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
rtansverse impact parameter error | |
float | z0 (const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
longitudinal impact parameter | |
float | z0Err (const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
longitudinal impact parameter error | |
float | setA0 (const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
3D impact parameter | |
float | setA0Err (const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
3D impact parameter error | |
float | setA0xy (const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
transverse impact parameter | |
float | setA0xyErr (const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
transverse impact parameter error | |
float | setZ0 (const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
longitudinal impact parameter | |
float | setZ0Err (const float val, const pv_type vertexType=BPhysHelper::PV_MIN_A0) |
longitudinal impact parameter error |
: 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.
: PV_MAX_SUM_PT2 vertex with the largest sum Pt^2 (the default one) : PV_MIN_A0 collision vertex closest in 3D to the particle's trajectory, i.e. the vertex with the smalles 3D impact parameter a0 : 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. : 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.
xAOD::BPhysHelper::BPhysHelper | ( | const xAOD::Vertex * | b | ) | [inline] |
: Main constructor
The Main constructor. BPhysHelper does NOT take ownership of the class "b"
[in] | b | Pointer to the xAOD::Vertex |
float xAOD::BPhysHelper::a0 | ( | const pv_type | vertexType = BPhysHelper::PV_MIN_A0 |
) |
3D impact parameter
Impact parameters and their error Get the 3D, transverse, and longitudinal impact parameters and their error
[in] | vertexType | type (selection) of the PV ( |
bool xAOD::BPhysHelper::cacheCascadeVertices | ( | ) | [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.
bool xAOD::BPhysHelper::cacheCov | ( | ) | [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.
bool xAOD::BPhysHelper::cacheMuons | ( | ) | [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.
bool xAOD::BPhysHelper::cachePrecedingVertices | ( | ) | [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.
bool xAOD::BPhysHelper::cacheRefTracks | ( | ) | [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.
const xAOD::Vertex * xAOD::BPhysHelper::cascadeVertex | ( | const size_t | index | ) |
Returns pointer to a cascade vertex
[in] | index | index of the cascade vertex |
const std::vector< const xAOD::Vertex * > & xAOD::BPhysHelper::cascadeVertices | ( | ) |
Returns vector of pointers to cascade vertices
const TMatrixTSym< double > & xAOD::BPhysHelper::covariance | ( | ) |
: Returns full covariance matrix
Converts native covariance matrix stored as a std::vector<float> into a symmetric matrix-form represented by TMatrixTSym<double> class.
float xAOD::BPhysHelper::lxy | ( | const pv_type | vertexType = BPhysHelper::PV_MIN_A0 |
) |
decay distance
Transverse decay distance and its error Get 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 ( |
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 |
const std::vector< const xAOD::Muon * > & xAOD::BPhysHelper::muons | ( | ) |
Returns linked muons
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
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
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
int xAOD::BPhysHelper::nRefTrks | ( | ) |
Methods providing access to the refitted tracks momenta and related quantities: Returns number of stored refitted track momenta
int xAOD::BPhysHelper::nRefTrksCascade | ( | ) |
Returns number of stored refitted tracks INCLUDING those from the linked cascade vertices
const xAOD::Vertex * xAOD::BPhysHelper::precedingVertex | ( | const size_t | index | ) |
Returns pointer to a preceding vertex
[in] | index | index of the preceding vertex |
const std::vector< const xAOD::Vertex * > & xAOD::BPhysHelper::precedingVertices | ( | ) |
Returns vector of pointers to preceding vertices
float xAOD::BPhysHelper::ptErr | ( | ) |
Returns pT error
const xAOD::Vertex * xAOD::BPhysHelper::pv | ( | const pv_type | vertexType = BPhysHelper::PV_MIN_A0 |
) |
refitted PV
Links to the refitted primary vertices
Get the refitted collision vertex of type pv_type
[in] | vertexType | type (selection) of the PV ( |
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 ( |
TLorentzVector xAOD::BPhysHelper::refTrk | ( | const size_t | index, | |
const float | mass | |||
) |
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 |
TVector3 xAOD::BPhysHelper::refTrk | ( | const size_t | index | ) |
Returns i-th refitted track 3-momentum
[in] | index | index of the refitted track |
float xAOD::BPhysHelper::refTrkCharge | ( | const size_t | index | ) | const |
Returns charge of the i-th track
[in] | index | index of the track |
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 |
TLorentzVector xAOD::BPhysHelper::refTrkOriginP | ( | const size_t | index, | |
const float | mass | |||
) | const |
: 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 |
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 |
const std::vector< TVector3 > & xAOD::BPhysHelper::refTrks | ( | ) |
Returns refitted track momenta
float xAOD::BPhysHelper::setA0 | ( | const float | val, | |
const pv_type | vertexType = BPhysHelper::PV_MIN_A0 | |||
) |
3D impact parameter
Set the 3D and transverse impact parameters and their error
[in] | vertexType | type (selection) of the PV ( |
[in] | val | input value |
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 |
bool xAOD::BPhysHelper::setLxy | ( | const float | val, | |
const pv_type | vertexType = BPhysHelper::PV_MIN_A0 | |||
) |
decay distance
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 |
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 |
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 |
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 |
bool xAOD::BPhysHelper::setPtErr | ( | const float | val | ) |
Set pT error
[in] | input | value |
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 |
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 |
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.
bool xAOD::BPhysHelper::setRefTrks | ( | const std::vector< TVector3 > & | refTrks | ) |
Sets refitted track momenta
[in] | refTrks | std::vector of refitted momenta as TVector3 |
bool xAOD::BPhysHelper::setRefTrks | ( | const std::vector< float > & | px, | |
const std::vector< float > & | py, | |||
const std::vector< float > & | pz | |||
) |
Sets refitted track momenta
[in] | px,py,pz | components of the refitted momenta |
TLorentzVector xAOD::BPhysHelper::totalP | ( | const std::vector< double > & | masses | ) |
Returns total 4-momentum calculated from the refitted tracks given mass hypotheses for individual tracks
[in] | masses | invariant mass hypotheses |
TVector3 xAOD::BPhysHelper::totalP | ( | ) |
: Returns total 3-momentum calculated from the refitted tracks
Total momentum calculated from refitted tracks Returns total 3-momentum calculated from the refitted tracks.
const xAOD::Vertex* xAOD::BPhysHelper::vtx | ( | ) | const [inline] |
Getter method for the cached xAOD::Vertex
const std::vector< TVector3 > xAOD::BPhysHelper::emptyVectorOfTVector3 [static, protected] |
Return error values for vector quantities:
const xAOD::Vertex* xAOD::BPhysHelper::m_b [protected] |
Cached B decay xAOD vertex
bool xAOD::BPhysHelper::m_covCached [protected] |
cached covariance matrix
bool xAOD::BPhysHelper::m_muonsCached [protected] |
cached linked muons
bool xAOD::BPhysHelper::m_precedingVerticesCached [protected] |
cached linked vertices
bool xAOD::BPhysHelper::m_refTracksCached [protected] |
cached refitted track momenta