Block of elements. More...
#include <PFDisplacedVertex.h>
Public Types | |
enum | M_Hypo { M_CUSTOM, M_MASSLESS, M_PION, M_KAON, M_LAMBDA } |
Mass hypothesis enum. More... | |
typedef std::pair < PFTrackHitInfo, PFTrackHitInfo > | PFTrackHitFullInfo |
typedef std::pair< unsigned int, unsigned int > | PFTrackHitInfo |
Information on the distance between track's hits and the Vertex. | |
enum | VertexTrackType { T_NOT_FROM_VERTEX, T_TO_VERTEX, T_FROM_VERTEX, T_MERGED } |
enum | VertexType { ANY = 0, FAKE = 1, LOOPER = 2, NUCL = 10, NUCL_LOOSE = 11, NUCL_KINK = 12, CONVERSION = 20, CONVERSION_LOOSE = 21, CONVERTED_BREMM = 22, K0_DECAY = 30, LAMBDA_DECAY = 31, LAMBDABAR_DECAY = 32, KPLUS_DECAY = 40, KMINUS_DECAY = 41, KPLUS_DECAY_LOOSE = 42, KMINUS_DECAY_LOOSE = 43, BSM_VERTEX = 100 } |
Public Member Functions | |
void | addElement (const TrackBaseRef &r, const Track &refTrack, const PFTrackHitFullInfo &hitInfo, VertexTrackType trackType=T_NOT_FROM_VERTEX, float w=1.0) |
Add a new track to the vertex. | |
const double | angle_io () const |
void | calcKinematics () |
void | cleanTracks () |
Clean the tracks collection and all the associated collections. | |
void | Dump (std::ostream &out=std::cout) const |
cout function | |
bool | isBSM () const |
bool | isConv () const |
bool | isConv_Loose () const |
bool | isConvertedBremm () const |
bool | isFake () const |
const bool | isIncomingTrack (const reco::TrackBaseRef &originalTrack) const |
Is primary or merged track. | |
bool | isK0 () const |
bool | isKminus () const |
bool | isKminus_Loose () const |
bool | isKplus () const |
bool | isKplus_Loose () const |
bool | isLambda () const |
bool | isLambdaBar () const |
bool | isLooper () const |
const bool | isMergedTrack (const reco::TrackBaseRef &originalTrack) const |
Is a secondary track was identified. | |
bool | isNucl () const |
bool | isNucl_Kink () const |
bool | isNucl_Loose () const |
const bool | isOutgoingTrack (const reco::TrackBaseRef &originalTrack) const |
Is secondary track. | |
const bool | isPrimaryTrack (const reco::TrackBaseRef &originalTrack) const |
Is a primary track was identified. | |
const bool | isSecondaryTrack (const reco::TrackBaseRef &originalTrack) const |
Is a secondary track was identified. | |
const bool | isThereMergedTracks () const |
If a merged track was identified. | |
const bool | isThereNotFromVertexTracks () const |
If there is a track which was not identified. | |
const bool | isTherePrimaryTracks () const |
-------- Provide useful information -------- /// | |
const bool | isThereSecondaryTracks () const |
If a secondary track was identified. | |
std::string | nameVertexType () const |
const int | nMergedTracks () const |
Number of merged tracks was identified. | |
const int | nNotFromVertexTracks () const |
Number of tracks which was not identified. | |
const int | nPrimaryTracks () const |
Number of primary tracks was identified. | |
const int | nSecondaryTracks () const |
Number of secondary tracks was identified. | |
const int | nTracks () const |
Number of tracks. | |
PFDisplacedVertex (reco::Vertex &) | |
Constructor from the reco::Vertex. | |
PFDisplacedVertex () | |
Default constructor. | |
const math::XYZVector | primaryDirection () const |
Primary Direction. | |
const math::XYZTLorentzVector | primaryMomentum (std::string massHypo="PI", bool useRefitted=true, double mass=0.0) const |
Momentum of primary or merged track calculated with a mass hypothesis. | |
const math::XYZTLorentzVector | primaryMomentum (M_Hypo massHypo, bool useRefitted=true, double mass=0.0) const |
Momentum of primary or merged track calculated with a mass hypothesis. | |
const double | primaryPt () const |
Momentum of primary or merged track calculated with a mass hypothesis. | |
const math::XYZTLorentzVector | secondaryMomentum (M_Hypo massHypo, bool useRefitted=true, double mass=0.0) const |
const math::XYZTLorentzVector | secondaryMomentum (std::string massHypo="PI", bool useRefitted=true, double mass=0.0) const |
const double | secondaryPt () const |
void | setPrimaryDirection (const math::XYZPoint &pvtx) |
void | setVertexType (VertexType vertexType) |
Set the type of this vertex. | |
const int | totalCharge () const |
Total Charge. | |
const PFTrackHitFullInfo | trackHitFullInfo (const reco::TrackBaseRef &originalTrack) const |
const std::vector < PFTrackHitFullInfo > | trackHitFullInfos () const |
const std::vector < VertexTrackType > | trackTypes () const |
VertexType | vertexType () |
Get the type of this vertex. | |
Private Member Functions | |
const double | getMass2 (M_Hypo, double) const |
Get the mass with a given hypothesis. | |
const bool | isThereKindTracks (VertexTrackType) const |
--------- TOOLS -------------- /// | |
const bool | isTrack (size_t itrk, VertexTrackType T) const |
const math::XYZTLorentzVector | momentum (M_Hypo massHypo, VertexTrackType, bool, double mass) const |
Common tool to calculate the momentum vector of tracks with a given Kind. | |
const math::XYZTLorentzVector | momentum (std::string, VertexTrackType, bool, double mass) const |
Common tool to calculate the momentum vector of tracks with a given Kind. | |
const int | nKindTracks (VertexTrackType) const |
Common tool used to get the number of tracks of a given Kind. | |
const size_t | trackPosition (const reco::TrackBaseRef &originalTrack) const |
Private Attributes | |
math::XYZTLorentzVector | defaultPrimaryMomentum_ |
math::XYZTLorentzVector | defaultSecondaryMomentum_ |
math::XYZVector | primaryDirection_ |
std::vector< PFTrackHitFullInfo > | trackHitFullInfos_ |
Information on the distance between track's hits and the Vertex. | |
std::vector< VertexTrackType > | trackTypes_ |
Types of the tracks associated to the vertex. | |
VertexType | vertexType_ |
-------- MEMBERS -------- /// |
Block of elements.
A DisplacedVertex is an extension of Vector with some additionnal informations tracks's hit-vertex distances, tracks types and the expected vertex type.
Definition at line 25 of file PFDisplacedVertex.h.
typedef std::pair<PFTrackHitInfo, PFTrackHitInfo> reco::PFDisplacedVertex::PFTrackHitFullInfo |
Definition at line 31 of file PFDisplacedVertex.h.
typedef std::pair<unsigned int, unsigned int> reco::PFDisplacedVertex::PFTrackHitInfo |
Information on the distance between track's hits and the Vertex.
Definition at line 30 of file PFDisplacedVertex.h.
Mass hypothesis enum.
Definition at line 34 of file PFDisplacedVertex.h.
{ M_CUSTOM, M_MASSLESS, M_PION, M_KAON, M_LAMBDA };
Classification of tracks according to the position with respect to the Vertex. A Merged track is a track which has at least two hits before and two hits after the vertex. It may come from a primary track merged with a low quality secondary track.
Definition at line 47 of file PFDisplacedVertex.h.
Classification of vertex according to different parameters such as the Number of tracks, the invariant mass etc...
ANY | |
FAKE | |
LOOPER | |
NUCL | |
NUCL_LOOSE | |
NUCL_KINK | |
CONVERSION | |
CONVERSION_LOOSE | |
CONVERTED_BREMM | |
K0_DECAY | |
LAMBDA_DECAY | |
LAMBDABAR_DECAY | |
KPLUS_DECAY | |
KMINUS_DECAY | |
KPLUS_DECAY_LOOSE | |
KMINUS_DECAY_LOOSE | |
BSM_VERTEX |
Definition at line 56 of file PFDisplacedVertex.h.
{ ANY = 0, FAKE = 1, LOOPER = 2, NUCL = 10, NUCL_LOOSE = 11, NUCL_KINK = 12, CONVERSION = 20, CONVERSION_LOOSE = 21, CONVERTED_BREMM = 22, K0_DECAY = 30, LAMBDA_DECAY = 31, LAMBDABAR_DECAY = 32, KPLUS_DECAY = 40, KMINUS_DECAY = 41, KPLUS_DECAY_LOOSE = 42, KMINUS_DECAY_LOOSE = 43, BSM_VERTEX = 100 };
PFDisplacedVertex::PFDisplacedVertex | ( | ) |
Default constructor.
Definition at line 9 of file PFDisplacedVertex.cc.
: Vertex(), vertexType_(ANY), primaryDirection_(0,0,0) {}
PFDisplacedVertex::PFDisplacedVertex | ( | reco::Vertex & | v | ) |
Constructor from the reco::Vertex.
Definition at line 14 of file PFDisplacedVertex.cc.
: Vertex(v), vertexType_(ANY), primaryDirection_(0,0,0) {}
void PFDisplacedVertex::addElement | ( | const TrackBaseRef & | r, |
const Track & | refTrack, | ||
const PFTrackHitFullInfo & | hitInfo, | ||
VertexTrackType | trackType = T_NOT_FROM_VERTEX , |
||
float | w = 1.0 |
||
) |
Add a new track to the vertex.
Definition at line 20 of file PFDisplacedVertex.cc.
References reco::Vertex::add(), trackHitFullInfos_, and trackTypes_.
Referenced by PFDisplacedVertexFinder::fitVertexFromSeed().
{ add(r, refTrack, w ); trackTypes_.push_back(trackType); trackHitFullInfos_.push_back(hitInfo); }
const double PFDisplacedVertex::angle_io | ( | ) | const |
Angle PrimaryVertex-DisplacedVertex (or primary track if there is) And secondary momentum
Definition at line 189 of file PFDisplacedVertex.cc.
References alignCSCRings::e, Pi, primaryDirection(), secondaryMomentum(), and mathSSE::sqrt().
Referenced by PFDisplacedVertexHelper::identifyVertex().
{ math::XYZTLorentzVector momentumSec = secondaryMomentum((string) "PI", true); math::XYZVector p_out = momentumSec.Vect(); math::XYZVector p_in = primaryDirection(); if (p_in.Mag2() < 1e-10) return -1; return acos(p_in.Dot(p_out)/sqrt(p_in.Mag2()*p_out.Mag2()))/TMath::Pi()*180.0; }
void reco::PFDisplacedVertex::calcKinematics | ( | ) | [inline] |
Definition at line 224 of file PFDisplacedVertex.h.
References defaultPrimaryMomentum_, defaultSecondaryMomentum_, momentum(), T_FROM_VERTEX, and T_TO_VERTEX.
Referenced by PFDisplacedVertexFinder::fitVertexFromSeed().
{ defaultPrimaryMomentum_ = momentum("PI", T_TO_VERTEX, false, 0.0); defaultSecondaryMomentum_ = momentum("PI", T_FROM_VERTEX, true, 0.0); }
void PFDisplacedVertex::cleanTracks | ( | ) |
Clean the tracks collection and all the associated collections.
Definition at line 29 of file PFDisplacedVertex.cc.
References reco::Vertex::removeTracks(), trackHitFullInfos_, and trackTypes_.
{ removeTracks(); trackTypes_.clear(); trackHitFullInfos_.clear(); }
void reco::PFDisplacedVertex::Dump | ( | std::ostream & | out = std::cout | ) | const |
cout function
const double PFDisplacedVertex::getMass2 | ( | M_Hypo | massHypo, |
double | mass | ||
) | const [private] |
Get the mass with a given hypothesis.
Definition at line 221 of file PFDisplacedVertex.cc.
References gather_cfg::cout, M_CUSTOM, M_KAON, M_LAMBDA, M_MASSLESS, M_PION, and scaleCards::mass.
Referenced by momentum().
{ // pion_mass = 0.1396 GeV double pion_mass2 = 0.0194; // k0_mass = 0.4976 GeV double kaon_mass2 = 0.2476; // lambda0_mass = 1.116 GeV double lambda_mass2 = 1.267; if (massHypo == M_PION) return pion_mass2; else if (massHypo == M_KAON) return kaon_mass2; else if (massHypo == M_LAMBDA) return lambda_mass2; else if (massHypo == M_MASSLESS) return 0; else if (massHypo == M_CUSTOM) return mass*mass; cout << "Warning: undefined mass hypothesis" << endl; return 0; }
bool reco::PFDisplacedVertex::isBSM | ( | ) | const [inline] |
Definition at line 267 of file PFDisplacedVertex.h.
References BSM_VERTEX, and vertexType_.
{ return vertexType_ == BSM_VERTEX;}
bool reco::PFDisplacedVertex::isConv | ( | ) | const [inline] |
Definition at line 257 of file PFDisplacedVertex.h.
References CONVERSION, and vertexType_.
{ return vertexType_ == CONVERSION;}
bool reco::PFDisplacedVertex::isConv_Loose | ( | ) | const [inline] |
Definition at line 258 of file PFDisplacedVertex.h.
References CONVERSION_LOOSE, and vertexType_.
{ return vertexType_ == CONVERSION_LOOSE;}
bool reco::PFDisplacedVertex::isConvertedBremm | ( | ) | const [inline] |
Definition at line 259 of file PFDisplacedVertex.h.
References CONVERTED_BREMM, and vertexType_.
{ return vertexType_ == CONVERTED_BREMM;}
bool reco::PFDisplacedVertex::isFake | ( | ) | const [inline] |
Tells whether a Vertex is fake, i.e. not a vertex made out of a proper fit with tracks. For a primary vertex, it could simply be the beam line.
Reimplemented from reco::Vertex.
Definition at line 252 of file PFDisplacedVertex.h.
References FAKE, and vertexType_.
Referenced by PFDisplacedVertexFinder::rejectAndLabelVertex().
{ return vertexType_ == FAKE;}
const bool reco::PFDisplacedVertex::isIncomingTrack | ( | const reco::TrackBaseRef & | originalTrack | ) | const [inline] |
Is primary or merged track.
Definition at line 158 of file PFDisplacedVertex.h.
References isTrack(), T_MERGED, T_TO_VERTEX, and trackPosition().
Referenced by PF_PU_AssoMapAlgos::FindNIVertex().
{ size_t itrk = trackPosition(originalTrack); return isTrack(itrk, T_MERGED) || isTrack(itrk, T_TO_VERTEX); }
bool reco::PFDisplacedVertex::isK0 | ( | ) | const [inline] |
Definition at line 260 of file PFDisplacedVertex.h.
References K0_DECAY, and vertexType_.
{ return vertexType_ == K0_DECAY;}
bool reco::PFDisplacedVertex::isKminus | ( | ) | const [inline] |
Definition at line 264 of file PFDisplacedVertex.h.
References KMINUS_DECAY, and vertexType_.
{ return vertexType_ == KMINUS_DECAY;}
bool reco::PFDisplacedVertex::isKminus_Loose | ( | ) | const [inline] |
Definition at line 266 of file PFDisplacedVertex.h.
References KMINUS_DECAY_LOOSE, and vertexType_.
{ return vertexType_ == KMINUS_DECAY_LOOSE;}
bool reco::PFDisplacedVertex::isKplus | ( | ) | const [inline] |
Definition at line 263 of file PFDisplacedVertex.h.
References KPLUS_DECAY, and vertexType_.
{ return vertexType_ == KPLUS_DECAY;}
bool reco::PFDisplacedVertex::isKplus_Loose | ( | ) | const [inline] |
Definition at line 265 of file PFDisplacedVertex.h.
References KPLUS_DECAY_LOOSE, and vertexType_.
{ return vertexType_ == KPLUS_DECAY_LOOSE;}
bool reco::PFDisplacedVertex::isLambda | ( | ) | const [inline] |
Definition at line 261 of file PFDisplacedVertex.h.
References LAMBDA_DECAY, and vertexType_.
{ return vertexType_ == LAMBDA_DECAY;}
bool reco::PFDisplacedVertex::isLambdaBar | ( | ) | const [inline] |
Definition at line 262 of file PFDisplacedVertex.h.
References LAMBDABAR_DECAY, and vertexType_.
{ return vertexType_ == LAMBDABAR_DECAY;}
bool reco::PFDisplacedVertex::isLooper | ( | ) | const [inline] |
Definition at line 253 of file PFDisplacedVertex.h.
References LOOPER, and vertexType_.
{ return vertexType_ == LOOPER;}
const bool reco::PFDisplacedVertex::isMergedTrack | ( | const reco::TrackBaseRef & | originalTrack | ) | const [inline] |
Is a secondary track was identified.
Definition at line 144 of file PFDisplacedVertex.h.
References isTrack(), T_MERGED, and trackPosition().
{ size_t itrk = trackPosition(originalTrack); return isTrack(itrk, T_MERGED); }
bool reco::PFDisplacedVertex::isNucl | ( | ) | const [inline] |
Definition at line 254 of file PFDisplacedVertex.h.
References NUCL, and vertexType_.
{ return vertexType_ == NUCL;}
bool reco::PFDisplacedVertex::isNucl_Kink | ( | ) | const [inline] |
Definition at line 256 of file PFDisplacedVertex.h.
References NUCL_KINK, and vertexType_.
{ return vertexType_ == NUCL_KINK;}
bool reco::PFDisplacedVertex::isNucl_Loose | ( | ) | const [inline] |
Definition at line 255 of file PFDisplacedVertex.h.
References NUCL_LOOSE, and vertexType_.
{ return vertexType_ == NUCL_LOOSE;}
const bool reco::PFDisplacedVertex::isOutgoingTrack | ( | const reco::TrackBaseRef & | originalTrack | ) | const [inline] |
Is secondary track.
Definition at line 165 of file PFDisplacedVertex.h.
References isTrack(), T_FROM_VERTEX, and trackPosition().
{ size_t itrk = trackPosition(originalTrack); return isTrack(itrk, T_FROM_VERTEX); }
const bool reco::PFDisplacedVertex::isPrimaryTrack | ( | const reco::TrackBaseRef & | originalTrack | ) | const [inline] |
Is a primary track was identified.
Definition at line 130 of file PFDisplacedVertex.h.
References isTrack(), T_TO_VERTEX, and trackPosition().
{ size_t itrk = trackPosition(originalTrack); return isTrack(itrk, T_TO_VERTEX); }
const bool reco::PFDisplacedVertex::isSecondaryTrack | ( | const reco::TrackBaseRef & | originalTrack | ) | const [inline] |
Is a secondary track was identified.
Definition at line 137 of file PFDisplacedVertex.h.
References isTrack(), T_FROM_VERTEX, and trackPosition().
{ size_t itrk = trackPosition(originalTrack); return isTrack(itrk, T_FROM_VERTEX); }
const bool PFDisplacedVertex::isThereKindTracks | ( | VertexTrackType | T | ) | const [private] |
--------- TOOLS -------------- ///
Common tool used to know if there are tracks of a given Kind
Definition at line 39 of file PFDisplacedVertex.cc.
References spr::find(), and trackTypes_.
Referenced by isThereMergedTracks(), isThereNotFromVertexTracks(), isTherePrimaryTracks(), isThereSecondaryTracks(), and primaryDirection().
{ vector <VertexTrackType>::const_iterator iter = find (trackTypes_.begin(), trackTypes_.end(), T); return (iter != trackTypes_.end()) ; }
const bool reco::PFDisplacedVertex::isThereMergedTracks | ( | ) | const [inline] |
If a merged track was identified.
Definition at line 115 of file PFDisplacedVertex.h.
References isThereKindTracks(), and T_MERGED.
Referenced by PF_PU_AssoMapAlgos::FindNIVertex(), and PFDisplacedVertexHelper::identifyVertex().
{return isThereKindTracks(T_MERGED);}
const bool reco::PFDisplacedVertex::isThereNotFromVertexTracks | ( | ) | const [inline] |
If there is a track which was not identified.
Definition at line 123 of file PFDisplacedVertex.h.
References isThereKindTracks(), and T_NOT_FROM_VERTEX.
{return isThereKindTracks(T_NOT_FROM_VERTEX);}
const bool reco::PFDisplacedVertex::isTherePrimaryTracks | ( | ) | const [inline] |
-------- Provide useful information -------- ///
If a primary track was identified
Definition at line 111 of file PFDisplacedVertex.h.
References isThereKindTracks(), and T_TO_VERTEX.
Referenced by PF_PU_AssoMapAlgos::FindNIVertex(), and PFDisplacedVertexHelper::identifyVertex().
{return isThereKindTracks(T_TO_VERTEX);}
const bool reco::PFDisplacedVertex::isThereSecondaryTracks | ( | ) | const [inline] |
If a secondary track was identified.
Definition at line 119 of file PFDisplacedVertex.h.
References isThereKindTracks(), and T_FROM_VERTEX.
{return isThereKindTracks(T_FROM_VERTEX);}
const bool reco::PFDisplacedVertex::isTrack | ( | size_t | itrk, |
VertexTrackType | T | ||
) | const [inline, private] |
Definition at line 300 of file PFDisplacedVertex.h.
References trackTypes_.
Referenced by isIncomingTrack(), isMergedTrack(), isOutgoingTrack(), isPrimaryTrack(), and isSecondaryTrack().
{ return trackTypes_[itrk] == T; }
const math::XYZTLorentzVector reco::PFDisplacedVertex::momentum | ( | std::string | , |
VertexTrackType | , | ||
bool | , | ||
double | mass | ||
) | const [private] |
Common tool to calculate the momentum vector of tracks with a given Kind.
Referenced by calcKinematics(), momentum(), primaryMomentum(), and secondaryMomentum().
const math::XYZTLorentzVector PFDisplacedVertex::momentum | ( | M_Hypo | massHypo, |
VertexTrackType | T, | ||
bool | useRefitted, | ||
double | mass | ||
) | const [private] |
Common tool to calculate the momentum vector of tracks with a given Kind.
Definition at line 130 of file PFDisplacedVertex.cc.
References getMass2(), i, momentum(), reco::Vertex::originalTrack(), P, p2, reco::Vertex::refittedTracks(), mathSSE::sqrt(), T_MERGED, T_TO_VERTEX, reco::Vertex::tracksSize(), trackTypes_, reco::Vertex::x(), reco::Vertex::y(), and reco::Vertex::z().
{ const double m2 = getMass2(massHypo, mass); math::XYZTLorentzVector P; for (size_t i = 0; i< tracksSize(); i++){ bool bType = (trackTypes_[i]== T); if (T == T_TO_VERTEX || T == T_MERGED) bType = (trackTypes_[i] == T_TO_VERTEX || trackTypes_[i] == T_MERGED); if ( bType ) { if (!useRefitted) { TrackBaseRef trackRef = originalTrack(refittedTracks()[i]); double p2 = trackRef->innerMomentum().Mag2(); P += math::XYZTLorentzVector (trackRef->momentum().x(), trackRef->momentum().y(), trackRef->momentum().z(), sqrt(m2 + p2)); } else { // cout << "m2 " << m2 << endl; double p2 = refittedTracks()[i].momentum().Mag2(); P += math::XYZTLorentzVector (refittedTracks()[i].momentum().x(), refittedTracks()[i].momentum().y(), refittedTracks()[i].momentum().z(), sqrt(m2 + p2)); } } } return P; }
std::string PFDisplacedVertex::nameVertexType | ( | ) | const |
Definition at line 88 of file PFDisplacedVertex.cc.
References ANY, BSM_VERTEX, CONVERSION, CONVERSION_LOOSE, CONVERTED_BREMM, FAKE, K0_DECAY, KMINUS_DECAY, KMINUS_DECAY_LOOSE, KPLUS_DECAY, KPLUS_DECAY_LOOSE, LAMBDA_DECAY, LAMBDABAR_DECAY, LOOPER, NUCL, NUCL_KINK, NUCL_LOOSE, and vertexType_.
{ switch (vertexType_){ case ANY: return "ANY"; case FAKE: return "FAKE"; case LOOPER: return "LOOPER"; case NUCL: return "NUCL"; case NUCL_LOOSE: return "NUCL_LOOSE"; case NUCL_KINK: return "NUCL_KINK"; case CONVERSION: return "CONVERSION"; case CONVERSION_LOOSE: return "CONVERSION_LOOSE"; case CONVERTED_BREMM: return "CONVERTED_BREMM"; case K0_DECAY: return "K0_DECAY"; case LAMBDA_DECAY: return "LAMBDA_DECAY"; case LAMBDABAR_DECAY: return "LAMBDABAR_DECAY"; case KPLUS_DECAY: return "KPLUS_DECAY"; case KMINUS_DECAY: return "KMINUS_DECAY"; case KPLUS_DECAY_LOOSE: return "KPLUS_DECAY_LOOSE"; case KMINUS_DECAY_LOOSE: return "KMINUS_DECAY_LOOSE"; case BSM_VERTEX: return "BSM_VERTEX"; default: return "?"; } return "?"; }
const int PFDisplacedVertex::nKindTracks | ( | VertexTrackType | T | ) | const [private] |
Common tool used to get the number of tracks of a given Kind.
Definition at line 48 of file PFDisplacedVertex.cc.
References prof2calltree::count, and trackTypes_.
Referenced by nMergedTracks(), nNotFromVertexTracks(), nPrimaryTracks(), and nSecondaryTracks().
{ return count ( trackTypes_.begin(), trackTypes_.end(), T); }
const int reco::PFDisplacedVertex::nMergedTracks | ( | ) | const [inline] |
Number of merged tracks was identified.
Definition at line 177 of file PFDisplacedVertex.h.
References nKindTracks(), and T_MERGED.
{return nKindTracks(T_MERGED);}
const int reco::PFDisplacedVertex::nNotFromVertexTracks | ( | ) | const [inline] |
Number of tracks which was not identified.
Definition at line 185 of file PFDisplacedVertex.h.
References nKindTracks(), and T_NOT_FROM_VERTEX.
{return nKindTracks(T_NOT_FROM_VERTEX);}
const int reco::PFDisplacedVertex::nPrimaryTracks | ( | ) | const [inline] |
Number of primary tracks was identified.
Definition at line 173 of file PFDisplacedVertex.h.
References nKindTracks(), and T_TO_VERTEX.
{return nKindTracks(T_TO_VERTEX);}
const int reco::PFDisplacedVertex::nSecondaryTracks | ( | ) | const [inline] |
Number of secondary tracks was identified.
Definition at line 181 of file PFDisplacedVertex.h.
References nKindTracks(), and T_FROM_VERTEX.
Referenced by PFDisplacedVertexHelper::identifyVertex().
{return nKindTracks(T_FROM_VERTEX);}
const int reco::PFDisplacedVertex::nTracks | ( | ) | const [inline] |
Number of tracks.
Definition at line 189 of file PFDisplacedVertex.h.
References trackTypes_.
Referenced by PFDisplacedVertexHelper::identifyVertex().
{return trackTypes_.size();}
const math::XYZVector PFDisplacedVertex::primaryDirection | ( | ) | const |
Primary Direction.
Definition at line 202 of file PFDisplacedVertex.cc.
References alignCSCRings::e, isThereKindTracks(), primaryDirection_, primaryMomentum(), secondaryMomentum(), mathSSE::sqrt(), T_MERGED, and T_TO_VERTEX.
Referenced by angle_io().
{ math::XYZTLorentzVector momentumPrim = primaryMomentum((string) "PI", true); math::XYZTLorentzVector momentumSec = secondaryMomentum((string) "PI", true); math::XYZVector p_in; if (( isThereKindTracks(T_TO_VERTEX) || isThereKindTracks(T_MERGED) ) && momentumPrim.E() > momentumSec.E()){ p_in = momentumPrim.Vect()/sqrt(momentumPrim.Vect().Mag2()+1e-10); } else { p_in = primaryDirection_; } return p_in; }
const math::XYZTLorentzVector reco::PFDisplacedVertex::primaryMomentum | ( | std::string | massHypo = "PI" , |
bool | useRefitted = true , |
||
double | mass = 0.0 |
||
) | const [inline] |
Momentum of primary or merged track calculated with a mass hypothesis.
Definition at line 203 of file PFDisplacedVertex.h.
References scaleCards::mass, momentum(), and T_TO_VERTEX.
Referenced by PF_PU_AssoMapAlgos::FindNIVertex(), PFDisplacedVertexHelper::identifyVertex(), and primaryDirection().
{return momentum(massHypo, T_TO_VERTEX, useRefitted, mass);}
const math::XYZTLorentzVector reco::PFDisplacedVertex::primaryMomentum | ( | M_Hypo | massHypo, |
bool | useRefitted = true , |
||
double | mass = 0.0 |
||
) | const [inline] |
Momentum of primary or merged track calculated with a mass hypothesis.
Definition at line 219 of file PFDisplacedVertex.h.
References scaleCards::mass, momentum(), and T_TO_VERTEX.
{return momentum(massHypo, T_TO_VERTEX, useRefitted, mass);}
const double reco::PFDisplacedVertex::primaryPt | ( | ) | const [inline] |
Momentum of primary or merged track calculated with a mass hypothesis.
Definition at line 234 of file PFDisplacedVertex.h.
References defaultSecondaryMomentum_.
{return defaultSecondaryMomentum_.Pt();}
const math::XYZTLorentzVector reco::PFDisplacedVertex::secondaryMomentum | ( | M_Hypo | massHypo, |
bool | useRefitted = true , |
||
double | mass = 0.0 |
||
) | const [inline] |
Momentum of secondary tracks calculated with a mass hypothesis. Some of those hypothesis are default: "PI" , "KAON", "LAMBDA", "MASSLESS", "CUSTOM" the value of custom shall be then provided in mass variable
Definition at line 213 of file PFDisplacedVertex.h.
References scaleCards::mass, momentum(), and T_FROM_VERTEX.
{return momentum(massHypo, T_FROM_VERTEX, useRefitted, mass);}
const math::XYZTLorentzVector reco::PFDisplacedVertex::secondaryMomentum | ( | std::string | massHypo = "PI" , |
bool | useRefitted = true , |
||
double | mass = 0.0 |
||
) | const [inline] |
Momentum of secondary tracks calculated with a mass hypothesis. Some of those hypothesis are default: "PI" , "KAON", "LAMBDA", "MASSLESS", "CUSTOM" the value of custom shall be then provided in mass variable
Definition at line 197 of file PFDisplacedVertex.h.
References scaleCards::mass, momentum(), and T_FROM_VERTEX.
Referenced by angle_io(), PFDisplacedVertexHelper::identifyVertex(), and primaryDirection().
{return momentum(massHypo, T_FROM_VERTEX, useRefitted, mass);}
const double reco::PFDisplacedVertex::secondaryPt | ( | ) | const [inline] |
Definition at line 230 of file PFDisplacedVertex.h.
References defaultPrimaryMomentum_.
{return defaultPrimaryMomentum_.Pt();}
void PFDisplacedVertex::setPrimaryDirection | ( | const math::XYZPoint & | pvtx | ) |
Estimate the direction of the vertex. This function produced a unitary vector. It is calculated the axis linking the primary vertex of the event pvtx to this vertex
Definition at line 78 of file PFDisplacedVertex.cc.
References alignCSCRings::e, reco::Vertex::position(), primaryDirection_, mathSSE::sqrt(), reco::Vertex::x(), reco::Vertex::y(), and reco::Vertex::z().
Referenced by PFDisplacedVertexFinder::fitVertexFromSeed().
{ primaryDirection_ = math::XYZVector(position().x(), position().y(), position().z()); math::XYZVector vtx(pvtx.x(), pvtx.y(), pvtx.z()); primaryDirection_ = primaryDirection_ - vtx; primaryDirection_ /= (sqrt(primaryDirection_.Mag2())+1e-10); }
void reco::PFDisplacedVertex::setVertexType | ( | VertexType | vertexType | ) | [inline] |
Set the type of this vertex.
Definition at line 92 of file PFDisplacedVertex.h.
References vertexType(), and vertexType_.
Referenced by PFDisplacedVertexFinder::rejectAndLabelVertex().
{vertexType_ = vertexType;}
const int PFDisplacedVertex::totalCharge | ( | ) | const |
Total Charge.
Definition at line 175 of file PFDisplacedVertex.cc.
References DeDxDiscriminatorTools::charge(), i, reco::Vertex::refittedTracks(), T_FROM_VERTEX, T_TO_VERTEX, reco::Vertex::tracksSize(), and trackTypes_.
{ int charge = 0; for (size_t i = 0; i< tracksSize(); i++){ if(trackTypes_[i] == T_TO_VERTEX) charge += refittedTracks()[i].charge(); else if(trackTypes_[i] == T_FROM_VERTEX) charge -= refittedTracks()[i].charge(); } return charge; }
const PFTrackHitFullInfo reco::PFDisplacedVertex::trackHitFullInfo | ( | const reco::TrackBaseRef & | originalTrack | ) | const [inline] |
Definition at line 150 of file PFDisplacedVertex.h.
References trackHitFullInfos_, and trackPosition().
{ size_t itrk = trackPosition(originalTrack); return trackHitFullInfos_[itrk]; }
const std::vector< PFTrackHitFullInfo > reco::PFDisplacedVertex::trackHitFullInfos | ( | ) | const [inline] |
Definition at line 101 of file PFDisplacedVertex.h.
References trackHitFullInfos_.
{return trackHitFullInfos_;}
const size_t PFDisplacedVertex::trackPosition | ( | const reco::TrackBaseRef & | originalTrack | ) | const [private] |
Definition at line 56 of file PFDisplacedVertex.cc.
References alignCSCRings::e, i, pos, reco::TrackBase::pt(), reco::Vertex::refittedTrack(), and reco::Vertex::refittedTracks().
Referenced by isIncomingTrack(), isMergedTrack(), isOutgoingTrack(), isPrimaryTrack(), isSecondaryTrack(), and trackHitFullInfo().
{ size_t pos = -1; const Track refittedTrack = PFDisplacedVertex::refittedTrack(originalTrack); std::vector<Track> refitTrks = refittedTracks(); for (size_t i = 0; i < refitTrks.size(); i++){ if ( fabs(refitTrks[i].pt() - refittedTrack.pt()) < 1.e-5 ){ pos = i; continue; } } // cout << "pos = " << pos << endl; return pos; }
const std::vector<VertexTrackType> reco::PFDisplacedVertex::trackTypes | ( | ) | const [inline] |
Definition at line 104 of file PFDisplacedVertex.h.
References trackTypes_.
Referenced by PFDisplacedVertexHelper::isKaonMass().
{return trackTypes_;}
VertexType reco::PFDisplacedVertex::vertexType | ( | ) | [inline] |
Get the type of this vertex.
Definition at line 99 of file PFDisplacedVertex.h.
References vertexType_.
Referenced by setVertexType().
{return vertexType_;}
Definition at line 318 of file PFDisplacedVertex.h.
Referenced by calcKinematics(), and secondaryPt().
Definition at line 319 of file PFDisplacedVertex.h.
Referenced by calcKinematics(), and primaryPt().
Definition at line 316 of file PFDisplacedVertex.h.
Referenced by primaryDirection(), and setPrimaryDirection().
std::vector< PFTrackHitFullInfo > reco::PFDisplacedVertex::trackHitFullInfos_ [private] |
Information on the distance between track's hits and the Vertex.
Definition at line 314 of file PFDisplacedVertex.h.
Referenced by addElement(), cleanTracks(), trackHitFullInfo(), and trackHitFullInfos().
std::vector< VertexTrackType > reco::PFDisplacedVertex::trackTypes_ [private] |
Types of the tracks associated to the vertex.
Definition at line 311 of file PFDisplacedVertex.h.
Referenced by addElement(), cleanTracks(), isThereKindTracks(), isTrack(), momentum(), nKindTracks(), nTracks(), totalCharge(), and trackTypes().
-------- MEMBERS -------- ///
This vertex type
Definition at line 308 of file PFDisplacedVertex.h.
Referenced by isBSM(), isConv(), isConv_Loose(), isConvertedBremm(), isFake(), isK0(), isKminus(), isKminus_Loose(), isKplus(), isKplus_Loose(), isLambda(), isLambdaBar(), isLooper(), isNucl(), isNucl_Kink(), isNucl_Loose(), nameVertexType(), setVertexType(), and vertexType().