#include <RecoVertex/PrimaryVertexProducerAlgorithm/src/PrimaryVertexProducerAlgorithm.cc>
Public Member Functions | |
virtual PrimaryVertexProducerAlgorithm * | clone () const |
PrimaryVertexProducerAlgorithm (const edm::ParameterSet &) | |
virtual std::vector < TransientVertex > | vertices (const std::vector< reco::TransientTrack > &tracks, const reco::BeamSpot &beamSpot) const |
virtual std::vector < TransientVertex > | vertices (const std::vector< reco::TransientTrack > &tracks) const |
~PrimaryVertexProducerAlgorithm () | |
Private Attributes | |
bool | fapply_finder |
bool | fFailsafe |
double | fMinNdof |
bool | fUseBeamConstraint |
bool | fVerbose |
edm::ParameterSet | theConfig |
KalmanTrimmedVertexFinder | theFinder |
VertexFitter< 5 > * | theFitter |
TrackClusterizerInZ * | theTrackClusterizer |
TrackFilterForPVFindingBase * | theTrackFilter |
VertexCompatibleWithBeam | theVertexSelector |
Description: finds primary vertices, compatible with the beam line
Implementation: <Notes on="" implementation>="">
Definition at line 36 of file PrimaryVertexProducerAlgorithm.h.
PrimaryVertexProducerAlgorithm::PrimaryVertexProducerAlgorithm | ( | const edm::ParameterSet & | conf | ) | [explicit] |
Definition at line 22 of file PrimaryVertexProducerAlgorithm.cc.
References algorithm(), fapply_finder, fFailsafe, fMinNdof, fUseBeamConstraint, fVerbose, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), KalmanTrimmedVertexFinder::setParameters(), theFinder, theFitter, theTrackClusterizer, and theTrackFilter.
Referenced by clone().
: theConfig(conf), theVertexSelector(VertexDistanceXY(), conf.getParameter<edm::ParameterSet>("PVSelParameters").getParameter<double>("maxDistanceToBeam")) { edm::LogInfo("PVDebugInfo") << "PVSelParameters::maxDistanceToBeam = " << conf.getParameter<edm::ParameterSet>("PVSelParameters").getParameter<double>("maxDistanceToBeam") << "\n"; fUseBeamConstraint = conf.getParameter<bool>("useBeamConstraint"); fVerbose = conf.getUntrackedParameter<bool>("verbose", false); fMinNdof = conf.getParameter<double>("minNdof"); fFailsafe = true; //conf.getUntrackedParameter<bool>("failsafe",true); // select and configure the track selection std::string trackSelectionAlgorithm=conf.getParameter<edm::ParameterSet>("TkFilterParameters").getParameter<std::string>("algorithm"); if(trackSelectionAlgorithm=="filter"){ theTrackFilter= new TrackFilterForPVFinding( conf.getParameter<edm::ParameterSet>("TkFilterParameters") ); }else if (trackSelectionAlgorithm=="filterWithThreshold"){ theTrackFilter= new HITrackFilterForPVFinding(conf.getParameter<edm::ParameterSet>("TkFilterParameters")); }else{ throw VertexException("PrimaryVertexProducerAlgorithm: unknown track selection algorithm: " + trackSelectionAlgorithm); } // select and configure the track clusterizer std::string clusteringAlgorithm=conf.getParameter<edm::ParameterSet>("TkClusParameters").getParameter<std::string>("algorithm"); if (clusteringAlgorithm=="gap"){ theTrackClusterizer = new GapClusterizerInZ(conf.getParameter<edm::ParameterSet>("TkClusParameters").getParameter<edm::ParameterSet>("TkGapClusParameters")); }else if(clusteringAlgorithm=="DA"){ theTrackClusterizer = new DAClusterizerInZ(conf.getParameter<edm::ParameterSet>("TkClusParameters").getParameter<edm::ParameterSet>("TkDAClusParameters")); }else{ throw VertexException("PrimaryVertexProducerAlgorithm: unknown clustering algorithm: " + clusteringAlgorithm); } // select and configure the vertex fitter std::string algorithm = conf.getParameter<std::string>("algorithm"); fapply_finder = false; if (algorithm == "TrimmedKalmanFinder") { fapply_finder = true; theFinder.setParameters(conf.getParameter<edm::ParameterSet>("VtxFinderParameters")); } else if (algorithm=="KalmanVertexFitter") { theFitter=new KalmanVertexFitter(); } else if( algorithm=="AdaptiveVertexFitter") { theFitter=new AdaptiveVertexFitter(); } else { throw VertexException("PrimaryVertexProducerAlgorithm: unknown algorithm: " + algorithm); } edm::LogInfo("PVDebugInfo") << "Using " << algorithm << "\n"; edm::LogInfo("PVDebugInfo") << "beam-constraint " << fUseBeamConstraint << "\n"; edm::LogInfo("PVDebugInfo") << "PV producer algorithm initialization: done" << "\n"; }
PrimaryVertexProducerAlgorithm::~PrimaryVertexProducerAlgorithm | ( | ) |
Definition at line 85 of file PrimaryVertexProducerAlgorithm.cc.
References theFitter, theTrackClusterizer, and theTrackFilter.
{ if (theFitter) delete theFitter; if (theTrackFilter) delete theTrackFilter; if (theTrackClusterizer) delete theTrackClusterizer; }
virtual PrimaryVertexProducerAlgorithm* PrimaryVertexProducerAlgorithm::clone | ( | void | ) | const [inline, virtual] |
Clone method
Implements VertexReconstructor.
Definition at line 55 of file PrimaryVertexProducerAlgorithm.h.
References PrimaryVertexProducerAlgorithm().
{ return new PrimaryVertexProducerAlgorithm(*this); }
virtual std::vector<TransientVertex> PrimaryVertexProducerAlgorithm::vertices | ( | const std::vector< reco::TransientTrack > & | tracks | ) | const [virtual] |
Find primary vertices
Implements VertexReconstructor.
virtual std::vector<TransientVertex> PrimaryVertexProducerAlgorithm::vertices | ( | const std::vector< reco::TransientTrack > & | t, |
const reco::BeamSpot & | |||
) | const [virtual] |
Reconstruct vertices, exploiting the beamspot constraint for the primary vertex
Reimplemented from VertexReconstructor.
bool PrimaryVertexProducerAlgorithm::fapply_finder [private] |
Definition at line 72 of file PrimaryVertexProducerAlgorithm.h.
Referenced by PrimaryVertexProducerAlgorithm().
bool PrimaryVertexProducerAlgorithm::fFailsafe [private] |
Definition at line 73 of file PrimaryVertexProducerAlgorithm.h.
Referenced by PrimaryVertexProducerAlgorithm().
double PrimaryVertexProducerAlgorithm::fMinNdof [private] |
Definition at line 70 of file PrimaryVertexProducerAlgorithm.h.
Referenced by PrimaryVertexProducerAlgorithm().
bool PrimaryVertexProducerAlgorithm::fUseBeamConstraint [private] |
Definition at line 69 of file PrimaryVertexProducerAlgorithm.h.
Referenced by PrimaryVertexProducerAlgorithm().
bool PrimaryVertexProducerAlgorithm::fVerbose [private] |
Definition at line 68 of file PrimaryVertexProducerAlgorithm.h.
Referenced by PrimaryVertexProducerAlgorithm().
Definition at line 62 of file PrimaryVertexProducerAlgorithm.h.
Definition at line 65 of file PrimaryVertexProducerAlgorithm.h.
Referenced by PrimaryVertexProducerAlgorithm().
VertexFitter<5>* PrimaryVertexProducerAlgorithm::theFitter [private] |
Definition at line 71 of file PrimaryVertexProducerAlgorithm.h.
Referenced by PrimaryVertexProducerAlgorithm(), and ~PrimaryVertexProducerAlgorithm().
Definition at line 64 of file PrimaryVertexProducerAlgorithm.h.
Referenced by PrimaryVertexProducerAlgorithm(), and ~PrimaryVertexProducerAlgorithm().
Definition at line 63 of file PrimaryVertexProducerAlgorithm.h.
Referenced by PrimaryVertexProducerAlgorithm(), and ~PrimaryVertexProducerAlgorithm().
Definition at line 66 of file PrimaryVertexProducerAlgorithm.h.