CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
reco::PFDisplacedVertex Class Reference

Block of elements. More...

#include <PFDisplacedVertex.h>

Inheritance diagram for reco::PFDisplacedVertex:
reco::Vertex

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. More...
 
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 Types inherited from reco::Vertex
enum  { dimension = 3 }
 error matrix dimension More...
 
enum  { size = dimension * ( dimension + 1 ) / 2 }
 matix size More...
 
typedef math::Error< dimension >
::type 
CovarianceMatrix
 covariance error matrix (3x3) More...
 
typedef math::Error< dimension >
::type 
Error
 covariance error matrix (3x3) More...
 
typedef unsigned int index
 index type More...
 
typedef math::XYZPoint Point
 point in the space More...
 
typedef std::vector
< TrackBaseRef >
::const_iterator 
trackRef_iterator
 The iteratator for the vector<TrackRef> More...
 

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. More...
 
const double angle_io () const
 
void calcKinematics ()
 
void cleanTracks ()
 Clean the tracks collection and all the associated collections. More...
 
void Dump (std::ostream &out=std::cout) const
 cout function More...
 
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. More...
 
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. More...
 
bool isNucl () const
 
bool isNucl_Kink () const
 
bool isNucl_Loose () const
 
const bool isOutgoingTrack (const reco::TrackBaseRef &originalTrack) const
 Is secondary track. More...
 
const bool isPrimaryTrack (const reco::TrackBaseRef &originalTrack) const
 Is a primary track was identified. More...
 
const bool isSecondaryTrack (const reco::TrackBaseRef &originalTrack) const
 Is a secondary track was identified. More...
 
const bool isThereMergedTracks () const
 If a merged track was identified. More...
 
const bool isThereNotFromVertexTracks () const
 If there is a track which was not identified. More...
 
const bool isTherePrimaryTracks () const
 --—— Provide useful information --—— /// More...
 
const bool isThereSecondaryTracks () const
 If a secondary track was identified. More...
 
std::string nameVertexType () const
 
const int nMergedTracks () const
 Number of merged tracks was identified. More...
 
const int nNotFromVertexTracks () const
 Number of tracks which was not identified. More...
 
const int nPrimaryTracks () const
 Number of primary tracks was identified. More...
 
const int nSecondaryTracks () const
 Number of secondary tracks was identified. More...
 
const int nTracks () const
 Number of tracks. More...
 
 PFDisplacedVertex ()
 Default constructor. More...
 
 PFDisplacedVertex (reco::Vertex &)
 Constructor from the reco::Vertex. More...
 
const math::XYZVector primaryDirection () const
 Primary Direction. More...
 
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. More...
 
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. More...
 
const double primaryPt () const
 Momentum of primary or merged track calculated with a mass hypothesis. More...
 
const math::XYZTLorentzVector secondaryMomentum (std::string massHypo="PI", bool useRefitted=true, double mass=0.0) const
 
const math::XYZTLorentzVector secondaryMomentum (M_Hypo massHypo, 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. More...
 
const int totalCharge () const
 Total Charge. More...
 
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. More...
 
- Public Member Functions inherited from reco::Vertex
void add (const TrackBaseRef &r, float w=1.0)
 add a reference to a Track More...
 
void add (const TrackBaseRef &r, const Track &refTrack, float w=1.0)
 add the original a Track(reference) and the smoothed Track More...
 
double chi2 () const
 chi-squares More...
 
double covariance (int i, int j) const
 (i, j)-th element of error matrix, i, j = 0, ... 2 More...
 
CovarianceMatrix covariance () const
 return SMatrix More...
 
Error error () const
 return SMatrix More...
 
void fill (CovarianceMatrix &v) const
 fill SMatrix More...
 
bool hasRefittedTracks () const
 Checks whether refitted tracks are stored. More...
 
bool isFake () const
 
bool isValid () const
 Tells whether the vertex is valid. More...
 
double ndof () const
 
double normalizedChi2 () const
 chi-squared divided by n.d.o.f. More...
 
unsigned int nTracks (float minWeight=0.5) const
 Returns the number of tracks in the vertex with weight above minWeight. More...
 
TrackBaseRef originalTrack (const Track &refTrack) const
 
math::XYZTLorentzVectorD p4 (float mass=0.13957018, float minWeight=0.5) const
 Returns the four momentum of the sum of the tracks, assuming the given mass for the decay products. More...
 
const Pointposition () const
 position More...
 
Track refittedTrack (const TrackBaseRef &track) const
 
Track refittedTrack (const TrackRef &track) const
 
const std::vector< Track > & refittedTracks () const
 Returns the container of refitted tracks. More...
 
void removeTracks ()
 
trackRef_iterator tracks_begin () const
 first iterator over tracks More...
 
trackRef_iterator tracks_end () const
 last iterator over tracks More...
 
size_t tracksSize () const
 number of tracks More...
 
float trackWeight (const TrackBaseRef &r) const
 returns the weight with which a Track has contributed to the vertex-fit. More...
 
float trackWeight (const TrackRef &r) const
 returns the weight with which a Track has contributed to the vertex-fit. More...
 
 Vertex ()
 
 Vertex (const Point &, const Error &)
 Constructor for a fake vertex. More...
 
 Vertex (const Point &, const Error &, double chi2, double ndof, size_t size)
 constructor for a valid vertex, with all data More...
 
double x () const
 x coordinate More...
 
double xError () const
 error on x More...
 
double y () const
 y coordinate More...
 
double yError () const
 error on y More...
 
double z () const
 y coordinate More...
 
double zError () const
 error on z More...
 

Private Member Functions

const double getMass2 (M_Hypo, double) const
 Get the mass with a given hypothesis. More...
 
const bool isThereKindTracks (VertexTrackType) const
 ---—— TOOLS --------—— /// More...
 
const bool isTrack (size_t itrk, VertexTrackType T) const
 
const math::XYZTLorentzVector momentum (std::string, VertexTrackType, bool, double mass) const
 Common tool to calculate the momentum vector of tracks with a given Kind. More...
 
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. More...
 
const int nKindTracks (VertexTrackType) const
 Common tool used to get the number of tracks of a given Kind. More...
 
const size_t trackPosition (const reco::TrackBaseRef &originalTrack) const
 

Private Attributes

math::XYZTLorentzVector defaultPrimaryMomentum_
 
math::XYZTLorentzVector defaultSecondaryMomentum_
 
math::XYZVector primaryDirection_
 
std::vector< PFTrackHitFullInfotrackHitFullInfos_
 Information on the distance between track's hits and the Vertex. More...
 
std::vector< VertexTrackTypetrackTypes_
 Types of the tracks associated to the vertex. More...
 
VertexType vertexType_
 --—— MEMBERS --—— /// More...
 

Detailed Description

Block of elements.

Author
Maxime Gouzevitch
Date
November 2009

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 24 of file PFDisplacedVertex.h.

Member Typedef Documentation

Definition at line 30 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 29 of file PFDisplacedVertex.h.

Member Enumeration Documentation

Mass hypothesis enum.

Enumerator
M_CUSTOM 
M_MASSLESS 
M_PION 
M_KAON 
M_LAMBDA 

Definition at line 33 of file PFDisplacedVertex.h.

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.

Enumerator
T_NOT_FROM_VERTEX 
T_TO_VERTEX 
T_FROM_VERTEX 
T_MERGED 

Definition at line 46 of file PFDisplacedVertex.h.

Classification of vertex according to different parameters such as the Number of tracks, the invariant mass etc...

Enumerator
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 55 of file PFDisplacedVertex.h.

55  {
56  ANY = 0,
57  FAKE = 1,
58  LOOPER = 2,
59  NUCL = 10,
60  NUCL_LOOSE = 11,
61  NUCL_KINK = 12,
62  CONVERSION = 20,
63  CONVERSION_LOOSE = 21,
64  CONVERTED_BREMM = 22,
65  K0_DECAY = 30,
66  LAMBDA_DECAY = 31,
67  LAMBDABAR_DECAY = 32,
68  KPLUS_DECAY = 40,
69  KMINUS_DECAY = 41,
70  KPLUS_DECAY_LOOSE = 42,
71  KMINUS_DECAY_LOOSE = 43,
72  BSM_VERTEX = 100
73  };

Constructor & Destructor Documentation

PFDisplacedVertex::PFDisplacedVertex ( )

Default constructor.

Definition at line 9 of file PFDisplacedVertex.cc.

9  : Vertex(),
11  primaryDirection_(0,0,0)
12 {}
VertexType vertexType_
--—— MEMBERS --—— ///
math::XYZVector primaryDirection_
PFDisplacedVertex::PFDisplacedVertex ( reco::Vertex v)

Constructor from the reco::Vertex.

Definition at line 14 of file PFDisplacedVertex.cc.

14  : Vertex(v),
16  primaryDirection_(0,0,0)
17 {}
VertexType vertexType_
--—— MEMBERS --—— ///
math::XYZVector primaryDirection_

Member Function Documentation

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().

22  {
23  add(r, refTrack, w );
24  trackTypes_.push_back(trackType);
25  trackHitFullInfos_.push_back(hitInfo);
26 }
const double w
Definition: UKUtility.cc:23
void add(const TrackBaseRef &r, float w=1.0)
add a reference to a Track
std::vector< PFTrackHitFullInfo > trackHitFullInfos_
Information on the distance between track&#39;s hits and the Vertex.
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.
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 Dump(), and PFDisplacedVertexHelper::identifyVertex().

189  {
190  math::XYZTLorentzVector momentumSec = secondaryMomentum((string) "PI", true);
191 
192  math::XYZVector p_out = momentumSec.Vect();
193 
195 
196  if (p_in.Mag2() < 1e-10) return -1;
197  return acos(p_in.Dot(p_out)/sqrt(p_in.Mag2()*p_out.Mag2()))/TMath::Pi()*180.0;
198 
199 }
const double Pi
const math::XYZTLorentzVector secondaryMomentum(std::string massHypo="PI", bool useRefitted=true, double mass=0.0) const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
T sqrt(T t)
Definition: SSEVec.h:48
const math::XYZVector primaryDirection() const
Primary Direction.
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
void reco::PFDisplacedVertex::calcKinematics ( )
inline

Definition at line 223 of file PFDisplacedVertex.h.

References defaultPrimaryMomentum_, defaultSecondaryMomentum_, momentum(), T_FROM_VERTEX, and T_TO_VERTEX.

Referenced by PFDisplacedVertexFinder::fitVertexFromSeed().

223  {
224  defaultPrimaryMomentum_ = momentum("PI", T_TO_VERTEX, false, 0.0);
226  }
const math::XYZTLorentzVector momentum(std::string, VertexTrackType, bool, double mass) const
Common tool to calculate the momentum vector of tracks with a given Kind.
math::XYZTLorentzVector defaultPrimaryMomentum_
math::XYZTLorentzVector defaultSecondaryMomentum_
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_.

29  {
30 
31  removeTracks();
32  trackTypes_.clear();
33  trackHitFullInfos_.clear();
34 
35 }
std::vector< PFTrackHitFullInfo > trackHitFullInfos_
Information on the distance between track&#39;s hits and the Vertex.
void removeTracks()
Definition: Vertex.cc:64
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.
void PFDisplacedVertex::Dump ( std::ostream &  out = std::cout) const

cout function

Definition at line 241 of file PFDisplacedVertex.cc.

References angle_io(), reco::Vertex::chi2(), i, nameVertexType(), reco::Vertex::ndof(), nMergedTracks(), reco::Vertex::normalizedChi2(), nPrimaryTracks(), nSecondaryTracks(), nTracks(), chain::pattern, reco::Vertex::position(), primaryDirection(), primaryMomentum(), secondaryMomentum(), trackHitFullInfos(), and trackTypes().

241  {
242  if(! out ) return;
243 
244  out << "" << endl;
245  out << "==================== This is a Displaced Vertex type " <<
246  nameVertexType() << " ===============" << endl;
247 
248  out << " Vertex chi2 = " << chi2() << " ndf = " << ndof()<< " normalised chi2 = " << normalizedChi2()<< endl;
249 
250  out << " The vertex Fitted Position is: x = " << position().x()
251  << " y = " << position().y()
252  << " rho = " << position().rho()
253  << " z = " << position().z()
254  << endl;
255 
256  out<< "\t--- Structure --- " << endl;
257  out<< "Number of tracks: " << nTracks()
258  << " nPrimary " << nPrimaryTracks()
259  << " nMerged " << nMergedTracks()
260  << " nSecondary " << nSecondaryTracks() << endl;
261 
262  vector <PFDisplacedVertex::PFTrackHitFullInfo> pattern = trackHitFullInfos();
263  vector <PFDisplacedVertex::VertexTrackType> trackType = trackTypes();
264  for (unsigned i = 0; i < pattern.size(); i++){
265  out << "track " << i
266  << " type = " << trackType[i]
267  << " nHit BeforeVtx = " << pattern[i].first.first
268  << " AfterVtx = " << pattern[i].second.first
269  << " MissHit BeforeVtx = " << pattern[i].first.second
270  << " AfterVtx = " << pattern[i].second.second
271  << endl;
272  }
273 
274  math::XYZTLorentzVector mom_prim = primaryMomentum((string) "PI", true);
275  math::XYZTLorentzVector mom_sec = secondaryMomentum((string) "PI", true);
276 
277  // out << "Primary P:\t E " << setprecision(3) << setw(5) << mom_prim.E()
278  out << "Primary P:\t E " << mom_prim.E()
279  << "\tPt = " << mom_prim.Pt()
280  << "\tPz = " << mom_prim.Pz()
281  << "\tM = " << mom_prim.M()
282  << "\tEta = " << mom_prim.Eta()
283  << "\tPhi = " << mom_prim.Phi() << endl;
284 
285  out << "Secondary P:\t E " << mom_sec.E()
286  << "\tPt = " << mom_sec.Pt()
287  << "\tPz = " << mom_sec.Pz()
288  << "\tM = " << mom_sec.M()
289  << "\tEta = " << mom_sec.Eta()
290  << "\tPhi = " << mom_sec.Phi() << endl;
291 
292  out << " The vertex Direction is x = " << primaryDirection().x()
293  << " y = " << primaryDirection().y()
294  << " z = " << primaryDirection().z()
295  << " eta = " << primaryDirection().eta()
296  << " phi = " << primaryDirection().phi() << endl;
297 
298  out << " Angle_io = " << angle_io() << " deg" << endl << endl;
299 
300 }
int i
Definition: DBlmapReader.cc:9
const double angle_io() const
const std::vector< PFTrackHitFullInfo > trackHitFullInfos() const
const math::XYZTLorentzVector secondaryMomentum(std::string massHypo="PI", bool useRefitted=true, double mass=0.0) const
list pattern
Definition: chain.py:104
const Point & position() const
position
Definition: Vertex.h:106
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
const int nPrimaryTracks() const
Number of primary tracks was identified.
double chi2() const
chi-squares
Definition: Vertex.h:95
const std::vector< VertexTrackType > trackTypes() const
const math::XYZVector primaryDirection() const
Primary Direction.
double ndof() const
Definition: Vertex.h:102
tuple out
Definition: dbtoconf.py:99
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.
std::string nameVertexType() const
const int nMergedTracks() const
Number of merged tracks was identified.
double normalizedChi2() const
chi-squared divided by n.d.o.f.
Definition: Vertex.h:104
const int nSecondaryTracks() const
Number of secondary tracks was identified.
const int nTracks() const
Number of tracks.
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, and M_PION.

Referenced by momentum().

221  {
222 
223  // pion_mass = 0.1396 GeV
224  double pion_mass2 = 0.0194;
225  // k0_mass = 0.4976 GeV
226  double kaon_mass2 = 0.2476;
227  // lambda0_mass = 1.116 GeV
228  double lambda_mass2 = 1.267;
229 
230  if (massHypo == M_PION) return pion_mass2;
231  else if (massHypo == M_KAON) return kaon_mass2;
232  else if (massHypo == M_LAMBDA) return lambda_mass2;
233  else if (massHypo == M_MASSLESS) return 0;
234  else if (massHypo == M_CUSTOM) return mass*mass;
235 
236  cout << "Warning: undefined mass hypothesis" << endl;
237  return 0;
238 
239 }
tuple cout
Definition: gather_cfg.py:121
bool reco::PFDisplacedVertex::isBSM ( ) const
inline

Definition at line 266 of file PFDisplacedVertex.h.

References BSM_VERTEX, and vertexType_.

266 { return vertexType_ == BSM_VERTEX;}
VertexType vertexType_
--—— MEMBERS --—— ///
bool reco::PFDisplacedVertex::isConv ( ) const
inline

Definition at line 256 of file PFDisplacedVertex.h.

References CONVERSION, and vertexType_.

256 { return vertexType_ == CONVERSION;}
VertexType vertexType_
--—— MEMBERS --—— ///
bool reco::PFDisplacedVertex::isConv_Loose ( ) const
inline

Definition at line 257 of file PFDisplacedVertex.h.

References CONVERSION_LOOSE, and vertexType_.

257 { return vertexType_ == CONVERSION_LOOSE;}
VertexType vertexType_
--—— MEMBERS --—— ///
bool reco::PFDisplacedVertex::isConvertedBremm ( ) const
inline

Definition at line 258 of file PFDisplacedVertex.h.

References CONVERTED_BREMM, and vertexType_.

258 { return vertexType_ == CONVERTED_BREMM;}
VertexType vertexType_
--—— MEMBERS --—— ///
bool reco::PFDisplacedVertex::isFake ( ) const
inline

Definition at line 251 of file PFDisplacedVertex.h.

References FAKE, and vertexType_.

Referenced by PFDisplacedVertexFinder::rejectAndLabelVertex().

251 { return vertexType_ == FAKE;}
VertexType vertexType_
--—— MEMBERS --—— ///
const bool reco::PFDisplacedVertex::isIncomingTrack ( const reco::TrackBaseRef originalTrack) const
inline

Is primary or merged track.

Definition at line 157 of file PFDisplacedVertex.h.

References isTrack(), T_MERGED, T_TO_VERTEX, and trackPosition().

Referenced by PF_PU_AssoMapAlgos::FindNIVertex().

158  {
159  size_t itrk = trackPosition(originalTrack);
160  return isTrack(itrk, T_MERGED) || isTrack(itrk, T_TO_VERTEX);
161  }
const size_t trackPosition(const reco::TrackBaseRef &originalTrack) const
const bool isTrack(size_t itrk, VertexTrackType T) const
bool reco::PFDisplacedVertex::isK0 ( ) const
inline

Definition at line 259 of file PFDisplacedVertex.h.

References K0_DECAY, and vertexType_.

259 { return vertexType_ == K0_DECAY;}
VertexType vertexType_
--—— MEMBERS --—— ///
bool reco::PFDisplacedVertex::isKminus ( ) const
inline

Definition at line 263 of file PFDisplacedVertex.h.

References KMINUS_DECAY, and vertexType_.

263 { return vertexType_ == KMINUS_DECAY;}
VertexType vertexType_
--—— MEMBERS --—— ///
bool reco::PFDisplacedVertex::isKminus_Loose ( ) const
inline

Definition at line 265 of file PFDisplacedVertex.h.

References KMINUS_DECAY_LOOSE, and vertexType_.

bool reco::PFDisplacedVertex::isKplus ( ) const
inline

Definition at line 262 of file PFDisplacedVertex.h.

References KPLUS_DECAY, and vertexType_.

262 { return vertexType_ == KPLUS_DECAY;}
VertexType vertexType_
--—— MEMBERS --—— ///
bool reco::PFDisplacedVertex::isKplus_Loose ( ) const
inline

Definition at line 264 of file PFDisplacedVertex.h.

References KPLUS_DECAY_LOOSE, and vertexType_.

bool reco::PFDisplacedVertex::isLambda ( ) const
inline

Definition at line 260 of file PFDisplacedVertex.h.

References LAMBDA_DECAY, and vertexType_.

260 { return vertexType_ == LAMBDA_DECAY;}
VertexType vertexType_
--—— MEMBERS --—— ///
bool reco::PFDisplacedVertex::isLambdaBar ( ) const
inline

Definition at line 261 of file PFDisplacedVertex.h.

References LAMBDABAR_DECAY, and vertexType_.

261 { return vertexType_ == LAMBDABAR_DECAY;}
VertexType vertexType_
--—— MEMBERS --—— ///
bool reco::PFDisplacedVertex::isLooper ( ) const
inline

Definition at line 252 of file PFDisplacedVertex.h.

References LOOPER, and vertexType_.

252 { return vertexType_ == LOOPER;}
VertexType vertexType_
--—— MEMBERS --—— ///
const bool reco::PFDisplacedVertex::isMergedTrack ( const reco::TrackBaseRef originalTrack) const
inline

Is a secondary track was identified.

Definition at line 143 of file PFDisplacedVertex.h.

References isTrack(), T_MERGED, and trackPosition().

144  {
145  size_t itrk = trackPosition(originalTrack);
146  return isTrack(itrk, T_MERGED);
147  }
const size_t trackPosition(const reco::TrackBaseRef &originalTrack) const
const bool isTrack(size_t itrk, VertexTrackType T) const
bool reco::PFDisplacedVertex::isNucl ( ) const
inline

Definition at line 253 of file PFDisplacedVertex.h.

References NUCL, and vertexType_.

253 { return vertexType_ == NUCL;}
VertexType vertexType_
--—— MEMBERS --—— ///
bool reco::PFDisplacedVertex::isNucl_Kink ( ) const
inline

Definition at line 255 of file PFDisplacedVertex.h.

References NUCL_KINK, and vertexType_.

255 { return vertexType_ == NUCL_KINK;}
VertexType vertexType_
--—— MEMBERS --—— ///
bool reco::PFDisplacedVertex::isNucl_Loose ( ) const
inline

Definition at line 254 of file PFDisplacedVertex.h.

References NUCL_LOOSE, and vertexType_.

254 { return vertexType_ == NUCL_LOOSE;}
VertexType vertexType_
--—— MEMBERS --—— ///
const bool reco::PFDisplacedVertex::isOutgoingTrack ( const reco::TrackBaseRef originalTrack) const
inline

Is secondary track.

Definition at line 164 of file PFDisplacedVertex.h.

References isTrack(), T_FROM_VERTEX, and trackPosition().

165  {
166  size_t itrk = trackPosition(originalTrack);
167  return isTrack(itrk, T_FROM_VERTEX);
168  }
const size_t trackPosition(const reco::TrackBaseRef &originalTrack) const
const bool isTrack(size_t itrk, VertexTrackType T) const
const bool reco::PFDisplacedVertex::isPrimaryTrack ( const reco::TrackBaseRef originalTrack) const
inline

Is a primary track was identified.

Definition at line 129 of file PFDisplacedVertex.h.

References isTrack(), T_TO_VERTEX, and trackPosition().

130  {
131  size_t itrk = trackPosition(originalTrack);
132  return isTrack(itrk, T_TO_VERTEX);
133  }
const size_t trackPosition(const reco::TrackBaseRef &originalTrack) const
const bool isTrack(size_t itrk, VertexTrackType T) const
const bool reco::PFDisplacedVertex::isSecondaryTrack ( const reco::TrackBaseRef originalTrack) const
inline

Is a secondary track was identified.

Definition at line 136 of file PFDisplacedVertex.h.

References isTrack(), T_FROM_VERTEX, and trackPosition().

137  {
138  size_t itrk = trackPosition(originalTrack);
139  return isTrack(itrk, T_FROM_VERTEX);
140  }
const size_t trackPosition(const reco::TrackBaseRef &originalTrack) const
const bool isTrack(size_t itrk, VertexTrackType T) const
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().

39  {
40 
41  vector <VertexTrackType>::const_iterator iter =
42  find (trackTypes_.begin(), trackTypes_.end(), T);
43  return (iter != trackTypes_.end()) ;
44 
45 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
long double T
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.
const bool reco::PFDisplacedVertex::isThereMergedTracks ( ) const
inline

If a merged track was identified.

Definition at line 114 of file PFDisplacedVertex.h.

References isThereKindTracks(), and T_MERGED.

Referenced by PF_PU_AssoMapAlgos::FindNIVertex(), and PFDisplacedVertexHelper::identifyVertex().

115  {return isThereKindTracks(T_MERGED);}
const bool isThereKindTracks(VertexTrackType) const
---—— TOOLS --------—— ///
const bool reco::PFDisplacedVertex::isThereNotFromVertexTracks ( ) const
inline

If there is a track which was not identified.

Definition at line 122 of file PFDisplacedVertex.h.

References isThereKindTracks(), and T_NOT_FROM_VERTEX.

const bool isThereKindTracks(VertexTrackType) const
---—— TOOLS --------—— ///
const bool reco::PFDisplacedVertex::isTherePrimaryTracks ( ) const
inline

--—— Provide useful information --—— ///

If a primary track was identified

Definition at line 110 of file PFDisplacedVertex.h.

References isThereKindTracks(), and T_TO_VERTEX.

Referenced by PF_PU_AssoMapAlgos::FindNIVertex(), and PFDisplacedVertexHelper::identifyVertex().

111  {return isThereKindTracks(T_TO_VERTEX);}
const bool isThereKindTracks(VertexTrackType) const
---—— TOOLS --------—— ///
const bool reco::PFDisplacedVertex::isThereSecondaryTracks ( ) const
inline

If a secondary track was identified.

Definition at line 118 of file PFDisplacedVertex.h.

References isThereKindTracks(), and T_FROM_VERTEX.

const bool isThereKindTracks(VertexTrackType) const
---—— TOOLS --------—— ///
const bool reco::PFDisplacedVertex::isTrack ( size_t  itrk,
VertexTrackType  T 
) const
inlineprivate

Definition at line 299 of file PFDisplacedVertex.h.

References trackTypes_.

Referenced by isIncomingTrack(), isMergedTrack(), isOutgoingTrack(), isPrimaryTrack(), and isSecondaryTrack().

299  {
300  return trackTypes_[itrk] == T;
301  }
long double T
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.
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, reco::TrackBase::momentum(), 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().

130  {
131 
132  const double m2 = getMass2(massHypo, mass);
133 
134 
135 
137 
138  for (size_t i = 0; i< tracksSize(); i++){
139  bool bType = (trackTypes_[i]== T);
140  if (T == T_TO_VERTEX || T == T_MERGED)
141  bType = (trackTypes_[i] == T_TO_VERTEX || trackTypes_[i] == T_MERGED);
142 
143  if ( bType ) {
144 
145  if (!useRefitted) {
146 
148 
149  double p2 = trackRef->momentum().Mag2();
150  P += math::XYZTLorentzVector (trackRef->momentum().x(),
151  trackRef->momentum().y(),
152  trackRef->momentum().z(),
153  sqrt(m2 + p2));
154  } else {
155 
156  // cout << "m2 " << m2 << endl;
157 
158  double p2 = refittedTracks()[i].momentum().Mag2();
160  refittedTracks()[i].momentum().y(),
161  refittedTracks()[i].momentum().z(),
162  sqrt(m2 + p2));
163 
164 
165  }
166  }
167  }
168 
169  return P;
170 
171 }
const double getMass2(M_Hypo, double) const
Get the mass with a given hypothesis.
int i
Definition: DBlmapReader.cc:9
TrackBaseRef originalTrack(const Track &refTrack) const
Definition: Vertex.cc:86
double y() const
y coordinate
Definition: Vertex.h:110
#define P
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:628
const std::vector< Track > & refittedTracks() const
Returns the container of refitted tracks.
Definition: Vertex.h:149
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
T sqrt(T t)
Definition: SSEVec.h:48
double z() const
y coordinate
Definition: Vertex.h:112
double p2[4]
Definition: TauolaWrapper.h:90
double x() const
x coordinate
Definition: Vertex.h:108
const math::XYZTLorentzVector momentum(std::string, VertexTrackType, bool, double mass) const
Common tool to calculate the momentum vector of tracks with a given Kind.
long double T
size_t tracksSize() const
number of tracks
Definition: Vertex.cc:34
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.
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_.

Referenced by Dump().

88  {
89  switch (vertexType_){
90  case ANY: return "ANY";
91  case FAKE: return "FAKE";
92  case LOOPER: return "LOOPER";
93  case NUCL: return "NUCL";
94  case NUCL_LOOSE: return "NUCL_LOOSE";
95  case NUCL_KINK: return "NUCL_KINK";
96  case CONVERSION: return "CONVERSION";
97  case CONVERSION_LOOSE: return "CONVERSION_LOOSE";
98  case CONVERTED_BREMM: return "CONVERTED_BREMM";
99  case K0_DECAY: return "K0_DECAY";
100  case LAMBDA_DECAY: return "LAMBDA_DECAY";
101  case LAMBDABAR_DECAY: return "LAMBDABAR_DECAY";
102  case KPLUS_DECAY: return "KPLUS_DECAY";
103  case KMINUS_DECAY: return "KMINUS_DECAY";
104  case KPLUS_DECAY_LOOSE: return "KPLUS_DECAY_LOOSE";
105  case KMINUS_DECAY_LOOSE: return "KMINUS_DECAY_LOOSE";
106  case BSM_VERTEX: return "BSM_VERTEX";
107  default: return "?";
108  }
109  return "?";
110 }
VertexType vertexType_
--—— MEMBERS --—— ///
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().

48  {
49 
50  return count ( trackTypes_.begin(), trackTypes_.end(), T);
51 
52 }
long double T
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.
const int reco::PFDisplacedVertex::nMergedTracks ( ) const
inline

Number of merged tracks was identified.

Definition at line 176 of file PFDisplacedVertex.h.

References nKindTracks(), and T_MERGED.

Referenced by Dump().

177  {return nKindTracks(T_MERGED);}
const int nKindTracks(VertexTrackType) const
Common tool used to get the number of tracks of a given Kind.
const int reco::PFDisplacedVertex::nNotFromVertexTracks ( ) const
inline

Number of tracks which was not identified.

Definition at line 184 of file PFDisplacedVertex.h.

References nKindTracks(), and T_NOT_FROM_VERTEX.

185  {return nKindTracks(T_NOT_FROM_VERTEX);}
const int nKindTracks(VertexTrackType) const
Common tool used to get the number of tracks of a given Kind.
const int reco::PFDisplacedVertex::nPrimaryTracks ( ) const
inline

Number of primary tracks was identified.

Definition at line 172 of file PFDisplacedVertex.h.

References nKindTracks(), and T_TO_VERTEX.

Referenced by Dump().

173  {return nKindTracks(T_TO_VERTEX);}
const int nKindTracks(VertexTrackType) const
Common tool used to get the number of tracks of a given Kind.
const int reco::PFDisplacedVertex::nSecondaryTracks ( ) const
inline

Number of secondary tracks was identified.

Definition at line 180 of file PFDisplacedVertex.h.

References nKindTracks(), and T_FROM_VERTEX.

Referenced by Dump(), and PFDisplacedVertexHelper::identifyVertex().

181  {return nKindTracks(T_FROM_VERTEX);}
const int nKindTracks(VertexTrackType) const
Common tool used to get the number of tracks of a given Kind.
const int reco::PFDisplacedVertex::nTracks ( ) const
inline

Number of tracks.

Definition at line 188 of file PFDisplacedVertex.h.

References trackTypes_.

Referenced by Dump(), and PFDisplacedVertexHelper::identifyVertex().

188 {return trackTypes_.size();}
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.
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(), and Dump().

202  {
203 
204  math::XYZTLorentzVector momentumPrim = primaryMomentum((string) "PI", true);
205  math::XYZTLorentzVector momentumSec = secondaryMomentum((string) "PI", true);
206 
207  math::XYZVector p_in;
208 
210  momentumPrim.E() > momentumSec.E()){
211  p_in = momentumPrim.Vect()/sqrt(momentumPrim.Vect().Mag2()+1e-10);
212  } else {
213  p_in = primaryDirection_;
214  }
215 
216  return p_in;
217 }
const math::XYZTLorentzVector secondaryMomentum(std::string massHypo="PI", bool useRefitted=true, double mass=0.0) const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
const bool isThereKindTracks(VertexTrackType) const
---—— TOOLS --------—— ///
T sqrt(T t)
Definition: SSEVec.h:48
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
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.
math::XYZVector primaryDirection_
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 202 of file PFDisplacedVertex.h.

References momentum(), and T_TO_VERTEX.

Referenced by Dump(), PF_PU_AssoMapAlgos::FindNIVertex(), PFDisplacedVertexHelper::identifyVertex(), and primaryDirection().

204  {return momentum(massHypo, T_TO_VERTEX, useRefitted, mass);}
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 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 218 of file PFDisplacedVertex.h.

References momentum(), and T_TO_VERTEX.

220  {return momentum(massHypo, T_TO_VERTEX, useRefitted, mass);}
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 double reco::PFDisplacedVertex::primaryPt ( ) const
inline

Momentum of primary or merged track calculated with a mass hypothesis.

Definition at line 233 of file PFDisplacedVertex.h.

References defaultSecondaryMomentum_.

234  {return defaultSecondaryMomentum_.Pt();}
math::XYZTLorentzVector defaultSecondaryMomentum_
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 196 of file PFDisplacedVertex.h.

References momentum(), and T_FROM_VERTEX.

Referenced by angle_io(), Dump(), PFDisplacedVertexHelper::identifyVertex(), and primaryDirection().

198  {return momentum(massHypo, T_FROM_VERTEX, useRefitted, mass);}
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 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 212 of file PFDisplacedVertex.h.

References momentum(), and T_FROM_VERTEX.

214  {return momentum(massHypo, T_FROM_VERTEX, useRefitted, mass);}
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 double reco::PFDisplacedVertex::secondaryPt ( ) const
inline

Definition at line 229 of file PFDisplacedVertex.h.

References defaultPrimaryMomentum_.

230  {return defaultPrimaryMomentum_.Pt();}
math::XYZTLorentzVector defaultPrimaryMomentum_
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().

78  {
80  math::XYZVector vtx(pvtx.x(), pvtx.y(), pvtx.z());
81 
82  primaryDirection_ = primaryDirection_ - vtx;
83  primaryDirection_ /= (sqrt(primaryDirection_.Mag2())+1e-10);
84 }
double y() const
y coordinate
Definition: Vertex.h:110
const Point & position() const
position
Definition: Vertex.h:106
T sqrt(T t)
Definition: SSEVec.h:48
double z() const
y coordinate
Definition: Vertex.h:112
double x() const
x coordinate
Definition: Vertex.h:108
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
math::XYZVector primaryDirection_
void reco::PFDisplacedVertex::setVertexType ( VertexType  vertexType)
inline

Set the type of this vertex.

Definition at line 91 of file PFDisplacedVertex.h.

References vertexType(), and vertexType_.

Referenced by PFDisplacedVertexFinder::rejectAndLabelVertex().

VertexType vertexType_
--—— MEMBERS --—— ///
VertexType vertexType()
Get the type of this vertex.
const int PFDisplacedVertex::totalCharge ( ) const

Total Charge.

Definition at line 175 of file PFDisplacedVertex.cc.

References i, reco::Vertex::refittedTracks(), T_FROM_VERTEX, T_TO_VERTEX, reco::Vertex::tracksSize(), and trackTypes_.

175  {
176 
177  int charge = 0;
178 
179  for (size_t i = 0; i< tracksSize(); i++){
180  if(trackTypes_[i] == T_TO_VERTEX) charge += refittedTracks()[i].charge();
181  else if(trackTypes_[i] == T_FROM_VERTEX) charge -= refittedTracks()[i].charge();
182  }
183 
184  return charge;
185 }
int i
Definition: DBlmapReader.cc:9
const std::vector< Track > & refittedTracks() const
Returns the container of refitted tracks.
Definition: Vertex.h:149
size_t tracksSize() const
number of tracks
Definition: Vertex.cc:34
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.
const PFTrackHitFullInfo reco::PFDisplacedVertex::trackHitFullInfo ( const reco::TrackBaseRef originalTrack) const
inline

Definition at line 149 of file PFDisplacedVertex.h.

References trackHitFullInfos_, and trackPosition().

149  {
150  size_t itrk = trackPosition(originalTrack);
151  return trackHitFullInfos_[itrk];
152  }
const size_t trackPosition(const reco::TrackBaseRef &originalTrack) const
std::vector< PFTrackHitFullInfo > trackHitFullInfos_
Information on the distance between track&#39;s hits and the Vertex.
const std::vector< PFTrackHitFullInfo > reco::PFDisplacedVertex::trackHitFullInfos ( ) const
inline

Definition at line 100 of file PFDisplacedVertex.h.

References trackHitFullInfos_.

Referenced by Dump().

101  {return trackHitFullInfos_;}
std::vector< PFTrackHitFullInfo > trackHitFullInfos_
Information on the distance between track&#39;s hits and the Vertex.
const size_t PFDisplacedVertex::trackPosition ( const reco::TrackBaseRef originalTrack) const
private

Definition at line 56 of file PFDisplacedVertex.cc.

References alignCSCRings::e, i, EnergyCorrector::pt, reco::TrackBase::pt(), reco::Vertex::refittedTrack(), and reco::Vertex::refittedTracks().

Referenced by isIncomingTrack(), isMergedTrack(), isOutgoingTrack(), isPrimaryTrack(), isSecondaryTrack(), and trackHitFullInfo().

56  {
57 
58  size_t pos = -1;
59 
61 
62  std::vector<Track> refitTrks = refittedTracks();
63  for (size_t i = 0; i < refitTrks.size(); i++){
64  if ( fabs(refitTrks[i].pt() - refittedTrack.pt()) < 1.e-5 ){
65  pos = i;
66  continue;
67  }
68 
69  }
70  // cout << "pos = " << pos << endl;
71 
72  return pos;
73 
74 }
int i
Definition: DBlmapReader.cc:9
Track refittedTrack(const TrackBaseRef &track) const
const std::vector< Track > & refittedTracks() const
Returns the container of refitted tracks.
Definition: Vertex.h:149
double pt() const
track transverse momentum
Definition: TrackBase.h:574
const std::vector<VertexTrackType> reco::PFDisplacedVertex::trackTypes ( ) const
inline

Definition at line 103 of file PFDisplacedVertex.h.

References trackTypes_.

Referenced by Dump(), and PFDisplacedVertexHelper::isKaonMass().

104  {return trackTypes_;}
std::vector< VertexTrackType > trackTypes_
Types of the tracks associated to the vertex.
VertexType reco::PFDisplacedVertex::vertexType ( )
inline

Get the type of this vertex.

Definition at line 98 of file PFDisplacedVertex.h.

References vertexType_.

Referenced by setVertexType().

98 {return vertexType_;}
VertexType vertexType_
--—— MEMBERS --—— ///

Member Data Documentation

math::XYZTLorentzVector reco::PFDisplacedVertex::defaultPrimaryMomentum_
private

Definition at line 317 of file PFDisplacedVertex.h.

Referenced by calcKinematics(), and secondaryPt().

math::XYZTLorentzVector reco::PFDisplacedVertex::defaultSecondaryMomentum_
private

Definition at line 318 of file PFDisplacedVertex.h.

Referenced by calcKinematics(), and primaryPt().

math::XYZVector reco::PFDisplacedVertex::primaryDirection_
private

Definition at line 315 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 313 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 310 of file PFDisplacedVertex.h.

Referenced by addElement(), cleanTracks(), isThereKindTracks(), isTrack(), momentum(), nKindTracks(), nTracks(), totalCharge(), and trackTypes().

VertexType reco::PFDisplacedVertex::vertexType_
private