CMS 3D CMS Logo

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

A block of tracks linked together. More...

#include <PFDisplacedVertexCandidate.h>

Classes

struct  VertexLink
 

Public Types

typedef std::map< float,
std::pair< int, int > > 
DistMap
 
typedef std::vector< float > DistVector
 
typedef std::map< unsigned int,
VertexLink
VertexLinkData
 
enum  VertexLinkTest { LINKTEST_DCA, LINKTEST_DUMMY, LINKTEST_ALL }
 

Public Member Functions

void addElement (const TrackBaseRef)
 add a track Reference to the current Candidate More...
 
void associatedElements (const unsigned i, const VertexLinkData &vertexLinkData, std::multimap< float, unsigned > &sortedAssociates, const VertexLinkTest test=LINKTEST_DCA) const
 associate 2 elements More...
 
const GlobalPoint dcaPoint (unsigned ie1, unsigned ie2) const
 
DistVector distVector () const
 
void Dump (std::ostream &out=std::cout) const
 cout function More...
 
const std::vector< TrackBaseRef > & elements () const
 
bool isValid () const
 A Vertex Candidate is valid if it has at least two tracks. More...
 
unsigned nTracks () const
 
 PFDisplacedVertexCandidate ()
 Default constructor. More...
 
DistMap r2Map () const
 --—— Provide useful information --—— /// More...
 
DistVector r2Vector () const
 
void setLink (unsigned i1, unsigned i2, const float dist, const GlobalPoint &dcaPoint, const VertexLinkTest test=LINKTEST_DCA)
 
const TrackBaseReftref (unsigned ie) const
 
const VertexLinkDatavertexLinkData () const
 

Private Member Functions

const float dist (unsigned ie1, unsigned ie2) const
 --—— Internal tools --—— /// More...
 
bool matrix2vector (unsigned i, unsigned j, unsigned &index) const
 
bool testLink (unsigned ie1, unsigned ie2) const
 test if a link between two tracks is valid: value_link =! -1 More...
 
unsigned vertexLinkDataSize () const
 --—— Storage of the information --—— /// More...
 

Private Attributes

std::vector< TrackBaseRefelements_
 --—— MEMBERS --—— /// More...
 
VertexLinkData vertexLinkData_
 map of links between tracks More...
 

Friends

std::ostream & operator<< (std::ostream &, const PFDisplacedVertexCandidate &)
 cout function More...
 

Detailed Description

A block of tracks linked together.

Author
Gouzevitch Maxime
Date
November 2009

A DisplacedVertexCandidate is a format produced by the DisplacedVertexCandidateFinder to hold a Collection of Refs to the tracks linked together by DCA. It contains:

Definition at line 29 of file PFDisplacedVertexCandidate.h.

Member Typedef Documentation

typedef std::map< float, std::pair<int,int> > reco::PFDisplacedVertexCandidate::DistMap

A type to provide the information about the position of DCA Points or values of DCA.

Definition at line 58 of file PFDisplacedVertexCandidate.h.

typedef std::vector< float > reco::PFDisplacedVertexCandidate::DistVector

Definition at line 59 of file PFDisplacedVertexCandidate.h.

Definition at line 54 of file PFDisplacedVertexCandidate.h.

Member Enumeration Documentation

Test used for the track linkind. For the moment only DCA is used, but other are possibles like distance between inner hits.

Enumerator
LINKTEST_DCA 
LINKTEST_DUMMY 
LINKTEST_ALL 

Definition at line 47 of file PFDisplacedVertexCandidate.h.

Constructor & Destructor Documentation

PFDisplacedVertexCandidate::PFDisplacedVertexCandidate ( )

Default constructor.

Definition at line 10 of file PFDisplacedVertexCandidate.cc.

Member Function Documentation

void PFDisplacedVertexCandidate::addElement ( const TrackBaseRef  element)

add a track Reference to the current Candidate

Definition at line 12 of file PFDisplacedVertexCandidate.cc.

void PFDisplacedVertexCandidate::associatedElements ( const unsigned  i,
const VertexLinkData vertexLinkData,
std::multimap< float, unsigned > &  sortedAssociates,
const VertexLinkTest  test = LINKTEST_DCA 
) const

associate 2 elements

Definition at line 49 of file PFDisplacedVertexCandidate.cc.

const GlobalPoint PFDisplacedVertexCandidate::dcaPoint ( unsigned  ie1,
unsigned  ie2 
) const
Returns
DCA point between two tracks

Definition at line 155 of file PFDisplacedVertexCandidate.cc.

const float PFDisplacedVertexCandidate::dist ( unsigned  ie1,
unsigned  ie2 
) const
private

--—— Internal tools --—— ///

Returns
distance of link between two tracks

Definition at line 178 of file PFDisplacedVertexCandidate.cc.

PFDisplacedVertexCandidate::DistVector PFDisplacedVertexCandidate::distVector ( ) const
Returns
the vector of DCA useful for DCA

Definition at line 136 of file PFDisplacedVertexCandidate.cc.

void PFDisplacedVertexCandidate::Dump ( std::ostream &  out = std::cout) const

cout function

Definition at line 238 of file PFDisplacedVertexCandidate.cc.

const std::vector< TrackBaseRef >& reco::PFDisplacedVertexCandidate::elements ( ) const
inline
Returns
the vector of Refs to tracks

Definition at line 110 of file PFDisplacedVertexCandidate.h.

References elements_.

111  {return elements_;}
std::vector< TrackBaseRef > elements_
--—— MEMBERS --—— ///
bool reco::PFDisplacedVertexCandidate::isValid ( void  ) const
inline

A Vertex Candidate is valid if it has at least two tracks.

Definition at line 101 of file PFDisplacedVertexCandidate.h.

References elements_.

Referenced by core.AutoHandle.AutoHandle::ReallyLoad().

102  {return elements_.size()>1;}
std::vector< TrackBaseRef > elements_
--—— MEMBERS --—— ///
bool PFDisplacedVertexCandidate::matrix2vector ( unsigned  i,
unsigned  j,
unsigned &  index 
) const
private

makes the correspondance between a 2d element matrix and the 1D vector which is the most compact way to store the matrix

Definition at line 212 of file PFDisplacedVertexCandidate.cc.

unsigned reco::PFDisplacedVertexCandidate::nTracks ( ) const
inline
Returns
the number of tracks associated to the candidate

Definition at line 114 of file PFDisplacedVertexCandidate.h.

References elements_.

115  {return elements_.size();}
std::vector< TrackBaseRef > elements_
--—— MEMBERS --—— ///
PFDisplacedVertexCandidate::DistMap PFDisplacedVertexCandidate::r2Map ( ) const

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

Returns
the map of Radius^2 to DCA Points

Definition at line 95 of file PFDisplacedVertexCandidate.cc.

PFDisplacedVertexCandidate::DistVector PFDisplacedVertexCandidate::r2Vector ( ) const
Returns
the vector of Radius^2 to DCA Points useful for FWLite

Definition at line 116 of file PFDisplacedVertexCandidate.cc.

void PFDisplacedVertexCandidate::setLink ( unsigned  i1,
unsigned  i2,
const float  dist,
const GlobalPoint dcaPoint,
const VertexLinkTest  test = LINKTEST_DCA 
)

set a link between elements of indices i1 and i2, of "distance" dist the link is set in the linkData vector provided as an argument. As indicated by the 'const' statement, 'this' is not modified.

Definition at line 17 of file PFDisplacedVertexCandidate.cc.

bool PFDisplacedVertexCandidate::testLink ( unsigned  ie1,
unsigned  ie2 
) const
private

test if a link between two tracks is valid: value_link =! -1

Definition at line 171 of file PFDisplacedVertexCandidate.cc.

const TrackBaseRef& reco::PFDisplacedVertexCandidate::tref ( unsigned  ie) const
inline
Returns
the reference to a given tracks

Definition at line 106 of file PFDisplacedVertexCandidate.h.

References elements_.

107  {return elements_[ie];}
std::vector< TrackBaseRef > elements_
--—— MEMBERS --—— ///
const VertexLinkData& reco::PFDisplacedVertexCandidate::vertexLinkData ( ) const
inline
Returns
the map of link data

Definition at line 119 of file PFDisplacedVertexCandidate.h.

References vertexLinkData_.

120  {return vertexLinkData_;}
VertexLinkData vertexLinkData_
map of links between tracks
unsigned PFDisplacedVertexCandidate::vertexLinkDataSize ( ) const
private

--—— Storage of the information --—— ///

Those are the tools from PFBlockAlgo

Returns
size of linkData_, calculated from the number of elements

Definition at line 202 of file PFDisplacedVertexCandidate.cc.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const PFDisplacedVertexCandidate  
)
friend

cout function

Member Data Documentation

std::vector< TrackBaseRef > reco::PFDisplacedVertexCandidate::elements_
private

--—— MEMBERS --—— ///

vector of refs to the associated tracks

Definition at line 153 of file PFDisplacedVertexCandidate.h.

Referenced by elements(), isValid(), nTracks(), and tref().

VertexLinkData reco::PFDisplacedVertexCandidate::vertexLinkData_
private

map of links between tracks

Definition at line 156 of file PFDisplacedVertexCandidate.h.

Referenced by vertexLinkData().