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 | Friends
PFDisplacedVertexCandidateFinder Class Reference

#include <PFDisplacedVertexCandidateFinder.h>

Public Types

typedef
reco::PFDisplacedVertexCandidateCollection::const_iterator 
IBC
 
typedef std::list
< reco::TrackBaseRef >
::iterator 
IE
 
typedef std::list
< reco::TrackBaseRef >
::const_iterator 
IEC
 
typedef std::vector< bool > Mask
 Mask used to spot if a track is free or not. More...
 

Public Member Functions

void findDisplacedVertexCandidates ()
 -----— Main function which find vertices -----— /// More...
 
 PFDisplacedVertexCandidateFinder ()
 
void setDebug (bool debug)
 sets debug printout flag More...
 
void setInput (const edm::Handle< reco::TrackCollection > &trackh, const MagneticField *magField)
 
void setParameters (double dcaCut, double primaryVertexCut, double dcaPInnerHitCut, const edm::ParameterSet &ps_trk)
 ---—— Set different algo parameters —— /// More...
 
void setPrimaryVertex (edm::Handle< reco::VertexCollection > mainVertexHandle, edm::Handle< reco::BeamSpot > beamSpotHandle)
 
std::auto_ptr
< reco::PFDisplacedVertexCandidateCollection
transferVertexCandidates ()
 
const std::auto_ptr
< reco::PFDisplacedVertexCandidateCollection > & 
vertexCandidates () const
 
 ~PFDisplacedVertexCandidateFinder ()
 

Private Member Functions

IE associate (IE next, IE last, reco::PFDisplacedVertexCandidate &tempVertexCandidate)
 --—— Different steps of the finder algorithm --—— /// More...
 
GlobalTrajectoryParameters getGlobalTrajectoryParameters (const reco::Track *) const
 --—— TOOLS --—— // More...
 
bool goodPtResolution (const reco::TrackBaseRef &trackref) const
 Quality Criterion on the Pt resolution to select a Track. More...
 
bool isSelected (const reco::TrackBaseRef &trackref)
 
void link (const reco::TrackBaseRef &el1, const reco::TrackBaseRef &el2, double &dist, GlobalPoint &P, reco::PFDisplacedVertexCandidate::VertexLinkTest &linktest)
 Check whether 2 elements are linked and fill the link parameters. More...
 
void packLinks (reco::PFDisplacedVertexCandidate &vertexCandidate)
 

Private Attributes

double dcaCut_
 –— Algo parameters for the vertex finder -— /// More...
 
double dcaPInnerHitCut2_
 Maximum distance between the DCA Point and the inner hit of the track. More...
 
bool debug_
 if true, debug printouts activated More...
 
double dxy_
 
std::list< reco::TrackBaseRefeventTracks_
 The track refs. More...
 
std::vector
< GlobalTrajectoryParameters
eventTrackTrajectories_
 
const MagneticFieldmagField_
 
double nChi2_max_
 
double primaryVertexCut2_
 Do not reconstruct vertices wich are too close to the beam pipe. More...
 
double pt_min_
 
double pt_min_prim_
 
math::XYZPoint pvtx_
 
TwoTrackMinimumDistance theMinimum_
 
Mask trackMask_
 
std::auto_ptr
< reco::PFDisplacedVertexCandidateCollection
vertexCandidates_
 -----— Members -----— /// More...
 
unsigned vertexCandidatesSize_
 

Friends

std::ostream & operator<< (std::ostream &, const PFDisplacedVertexCandidateFinder &)
 

Detailed Description

Definition at line 24 of file PFDisplacedVertexCandidateFinder.h.

Member Typedef Documentation

typedef reco::PFDisplacedVertexCandidateCollection::const_iterator PFDisplacedVertexCandidateFinder::IBC

Definition at line 38 of file PFDisplacedVertexCandidateFinder.h.

Definition at line 36 of file PFDisplacedVertexCandidateFinder.h.

Definition at line 37 of file PFDisplacedVertexCandidateFinder.h.

typedef std::vector<bool> PFDisplacedVertexCandidateFinder::Mask

Mask used to spot if a track is free or not.

Definition at line 34 of file PFDisplacedVertexCandidateFinder.h.

Constructor & Destructor Documentation

PFDisplacedVertexCandidateFinder::PFDisplacedVertexCandidateFinder ( )

Definition at line 15 of file PFDisplacedVertexCandidateFinder.cc.

PFDisplacedVertexCandidateFinder::~PFDisplacedVertexCandidateFinder ( )

Definition at line 28 of file PFDisplacedVertexCandidateFinder.cc.

Member Function Documentation

PFDisplacedVertexCandidateFinder::IE PFDisplacedVertexCandidateFinder::associate ( IE  next,
IE  last,
reco::PFDisplacedVertexCandidate tempVertexCandidate 
)
private

--—— Different steps of the finder algorithm --—— ///

Recursive procedure to associate tracks together

Definition at line 129 of file PFDisplacedVertexCandidateFinder.cc.

void PFDisplacedVertexCandidateFinder::findDisplacedVertexCandidates ( )

-----— Main function which find vertices -----— ///

Definition at line 94 of file PFDisplacedVertexCandidateFinder.cc.

GlobalTrajectoryParameters PFDisplacedVertexCandidateFinder::getGlobalTrajectoryParameters ( const reco::Track track) const
private

--—— TOOLS --—— //

Allows to calculate the helix aproximation for a given track which may be then extrapolated to any point.

Definition at line 341 of file PFDisplacedVertexCandidateFinder.cc.

bool PFDisplacedVertexCandidateFinder::goodPtResolution ( const reco::TrackBaseRef trackref) const
private

Quality Criterion on the Pt resolution to select a Track.

Definition at line 361 of file PFDisplacedVertexCandidateFinder.cc.

Referenced by isSelected().

bool PFDisplacedVertexCandidateFinder::isSelected ( const reco::TrackBaseRef trackref)
inlineprivate

A function which gather the information if a track is available for vertexing

Definition at line 110 of file PFDisplacedVertexCandidateFinder.h.

References goodPtResolution().

111  { return goodPtResolution(trackref);}
bool goodPtResolution(const reco::TrackBaseRef &trackref) const
Quality Criterion on the Pt resolution to select a Track.
void PFDisplacedVertexCandidateFinder::link ( const reco::TrackBaseRef el1,
const reco::TrackBaseRef el2,
double &  dist,
GlobalPoint P,
reco::PFDisplacedVertexCandidate::VertexLinkTest linktest 
)
private

Check whether 2 elements are linked and fill the link parameters.

Definition at line 226 of file PFDisplacedVertexCandidateFinder.cc.

void PFDisplacedVertexCandidateFinder::packLinks ( reco::PFDisplacedVertexCandidate vertexCandidate)
private

Compute missing links in the displacedVertexCandidates (the recursive procedure does not build all links)

Definition at line 299 of file PFDisplacedVertexCandidateFinder.cc.

void PFDisplacedVertexCandidateFinder::setDebug ( bool  debug)
inline

sets debug printout flag

Definition at line 56 of file PFDisplacedVertexCandidateFinder.h.

References debug, and debug_.

56 {debug_ = debug;}
#define debug
Definition: HDRShower.cc:19
bool debug_
if true, debug printouts activated
void PFDisplacedVertexCandidateFinder::setInput ( const edm::Handle< reco::TrackCollection > &  trackh,
const MagneticField magField 
)

Set the imput collection of tracks and calculate their trajectory parameters the Global Trajectory Parameters

Definition at line 60 of file PFDisplacedVertexCandidateFinder.cc.

void PFDisplacedVertexCandidateFinder::setParameters ( double  dcaCut,
double  primaryVertexCut,
double  dcaPInnerHitCut,
const edm::ParameterSet ps_trk 
)
inline

---—— Set different algo parameters —— ///

Sets algo parameters for the vertex candidate finder

Definition at line 44 of file PFDisplacedVertexCandidateFinder.h.

References dcaCut_, dcaPInnerHitCut2_, dxy_, edm::ParameterSet::getParameter(), nChi2_max_, primaryVertexCut2_, pt_min_, and pt_min_prim_.

45  {
46  dcaCut_ = dcaCut;
47  primaryVertexCut2_ = primaryVertexCut*primaryVertexCut;
48  dcaPInnerHitCut2_ = dcaPInnerHitCut*dcaPInnerHitCut;
49  nChi2_max_ = ps_trk.getParameter<double>("nChi2_max");
50  pt_min_ = ps_trk.getParameter<double>("pt_min");
51  pt_min_prim_ = ps_trk.getParameter<double>("pt_min_prim");
52  dxy_ = ps_trk.getParameter<double>("dxy");
53  }
T getParameter(std::string const &) const
double dcaCut_
–— Algo parameters for the vertex finder -— ///
double primaryVertexCut2_
Do not reconstruct vertices wich are too close to the beam pipe.
double dcaPInnerHitCut2_
Maximum distance between the DCA Point and the inner hit of the track.
void PFDisplacedVertexCandidateFinder::setPrimaryVertex ( edm::Handle< reco::VertexCollection mainVertexHandle,
edm::Handle< reco::BeamSpot beamSpotHandle 
)

Definition at line 39 of file PFDisplacedVertexCandidateFinder.cc.

std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > PFDisplacedVertexCandidateFinder::transferVertexCandidates ( )
inline
Returns
auto_ptr to collection of DisplacedVertexCandidates

Definition at line 65 of file PFDisplacedVertexCandidateFinder.h.

References vertexCandidates_.

65 {return vertexCandidates_;}
std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > vertexCandidates_
-----— Members -----— ///
const std::auto_ptr< reco::PFDisplacedVertexCandidateCollection >& PFDisplacedVertexCandidateFinder::vertexCandidates ( ) const
inline

Definition at line 67 of file PFDisplacedVertexCandidateFinder.h.

References vertexCandidates_.

68  {return vertexCandidates_;}
std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > vertexCandidates_
-----— Members -----— ///

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const PFDisplacedVertexCandidateFinder a 
)
friend

Definition at line 398 of file PFDisplacedVertexCandidateFinder.cc.

Member Data Documentation

double PFDisplacedVertexCandidateFinder::dcaCut_
private

–— Algo parameters for the vertex finder -— ///

Distance of minimal approach below which two tracks are considered as linked together

Definition at line 138 of file PFDisplacedVertexCandidateFinder.h.

Referenced by setParameters().

double PFDisplacedVertexCandidateFinder::dcaPInnerHitCut2_
private

Maximum distance between the DCA Point and the inner hit of the track.

Definition at line 142 of file PFDisplacedVertexCandidateFinder.h.

Referenced by setParameters().

bool PFDisplacedVertexCandidateFinder::debug_
private

if true, debug printouts activated

Definition at line 163 of file PFDisplacedVertexCandidateFinder.h.

Referenced by setDebug().

double PFDisplacedVertexCandidateFinder::dxy_
private

Definition at line 151 of file PFDisplacedVertexCandidateFinder.h.

Referenced by setParameters().

std::list< reco::TrackBaseRef > PFDisplacedVertexCandidateFinder::eventTracks_
private

The track refs.

Definition at line 123 of file PFDisplacedVertexCandidateFinder.h.

std::vector< GlobalTrajectoryParameters > PFDisplacedVertexCandidateFinder::eventTrackTrajectories_
private

The Trajectories vector allow to calculate snd to store only once the track trajectory parameters

Definition at line 132 of file PFDisplacedVertexCandidateFinder.h.

const MagneticField* PFDisplacedVertexCandidateFinder::magField_
private

Definition at line 166 of file PFDisplacedVertexCandidateFinder.h.

double PFDisplacedVertexCandidateFinder::nChi2_max_
private

Tracks preselection to reduce the combinatorics in PFDisplacedVertexCandidates this cuts are repeated then in a smarter way in the PFDisplacedVertexFinder be sure you are consistent between them

Definition at line 147 of file PFDisplacedVertexCandidateFinder.h.

Referenced by setParameters().

double PFDisplacedVertexCandidateFinder::primaryVertexCut2_
private

Do not reconstruct vertices wich are too close to the beam pipe.

Definition at line 140 of file PFDisplacedVertexCandidateFinder.h.

Referenced by setParameters().

double PFDisplacedVertexCandidateFinder::pt_min_
private

Definition at line 148 of file PFDisplacedVertexCandidateFinder.h.

Referenced by setParameters().

double PFDisplacedVertexCandidateFinder::pt_min_prim_
private

Definition at line 150 of file PFDisplacedVertexCandidateFinder.h.

Referenced by setParameters().

math::XYZPoint PFDisplacedVertexCandidateFinder::pvtx_
private

Definition at line 160 of file PFDisplacedVertexCandidateFinder.h.

TwoTrackMinimumDistance PFDisplacedVertexCandidateFinder::theMinimum_
private

Definition at line 158 of file PFDisplacedVertexCandidateFinder.h.

Mask PFDisplacedVertexCandidateFinder::trackMask_
private

The trackMask allows to keep the information on the tracks which are still free and those which are already used or disabled.

Definition at line 129 of file PFDisplacedVertexCandidateFinder.h.

std::auto_ptr< reco::PFDisplacedVertexCandidateCollection > PFDisplacedVertexCandidateFinder::vertexCandidates_
private

-----— Members -----— ///

Definition at line 119 of file PFDisplacedVertexCandidateFinder.h.

Referenced by transferVertexCandidates(), and vertexCandidates().

unsigned PFDisplacedVertexCandidateFinder::vertexCandidatesSize_
private

Max number of expected vertexCandidates in the event Used to allocate the memory and avoid multiple copy

Definition at line 155 of file PFDisplacedVertexCandidateFinder.h.