25 conf.getParameter<edm::
ParameterSet>(
"PVSelParameters").getParameter<double>(
"maxDistanceToBeam"))
28 <<
"PVSelParameters::maxDistanceToBeam = "
40 if(trackSelectionAlgorithm==
"filter"){
42 }
else if (trackSelectionAlgorithm==
"filterWithThreshold"){
45 throw VertexException(
"PrimaryVertexProducerAlgorithm: unknown track selection algorithm: " + trackSelectionAlgorithm);
51 if (clusteringAlgorithm==
"gap"){
53 }
else if(clusteringAlgorithm==
"DA"){
56 throw VertexException(
"PrimaryVertexProducerAlgorithm: unknown clustering algorithm: " + clusteringAlgorithm);
62 if (algorithm ==
"TrimmedKalmanFinder") {
65 }
else if (algorithm==
"KalmanVertexFitter") {
67 }
else if( algorithm==
"AdaptiveVertexFitter") {
70 throw VertexException(
"PrimaryVertexProducerAlgorithm: unknown algorithm: " + algorithm);
74 <<
"Using " << algorithm <<
"\n";
79 <<
"PV producer algorithm initialization: done" <<
"\n";
97 std::vector<TransientVertex>
101 throw VertexException(
"PrimaryVertexProducerAlgorithm: cannot make a Primary Vertex without a beam spot constraint " );
107 return std::vector<TransientVertex>();
111 std::vector<TransientVertex>
117 if ( (beamVertexState.
error().
cxx() <= 0.) ||
118 (beamVertexState.
error().
cyy() <= 0.) ||
119 (beamVertexState.
error().
czz() <= 0.) ) {
127 std::vector<TransientVertex> pvs;
136 if (
fVerbose){
std::cout <<
" clustering returned "<< clusters.size() <<
" clusters from " << seltks.size() <<
" selected tracks" <<std::endl;}
140 std::vector<TransientVertex> pvCand;
142 for (std::vector< std::vector<reco::TransientTrack> >::const_iterator iclus
143 = clusters.begin(); iclus != clusters.end(); iclus++) {
148 if (
fVerbose){
std::cout <<
" constrained fit with "<< (*iclus).size() <<
" tracks" <<std::endl;}
154 else std::cout <<
"Invalid fitted vertex\n";
157 }
else if((*iclus).size()>1){
158 if (
fVerbose){
std::cout <<
" unconstrained fit with "<< (*iclus).size() <<
" tracks" << std::endl;}
165 else std::cout <<
"Invalid fitted vertex\n";
175 std::cout <<
"PrimaryVertexProducerAlgorithm::vertices candidates =" << pvCand.size() << std::endl;
182 for (std::vector<TransientVertex>::const_iterator ipv = pvCand.begin();
183 ipv != pvCand.end(); ipv++) {
185 std::cout <<
"PrimaryVertexProducerAlgorithm::vertices cand " << npv++ <<
" sel=" <<
186 (validBS &&
theVertexSelector(*ipv,beamVertexState)) <<
" z=" << ipv->position().z() << std::endl;
201 && ( (clusters.size()!=1) || ( (clusters.size()==1) && (clusters.begin()->size()<seltks.size())) )
214 <<
" tracks=" << seltks.size()
T getParameter(std::string const &) const
TrackClusterizerInZ * theTrackClusterizer
T getUntrackedParameter(std::string const &, T const &) const
< trclass="colgroup">< tdclass="colgroup"colspan=5 > Ecal cluster collections</td ></tr >< tr >< td >< ahref="classreco_1_1BasicCluster.html"> reco::BasicCluster</a ></td >< td >< ahref="DataFormats_EgammaReco.html"> reco::BasicClusterCollection</a ></td >< td >< ahref="#"> hybridSuperClusters</a ></td >< tdclass="description"> Basic clusters reconstructed with hybrid algorithm(barrel only)</td >< td >S.Rahatlou</td ></tr >< tr >< td >< a href
VertexCompatibleWithBeam theVertexSelector
~PrimaryVertexProducerAlgorithm()
virtual std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &tracks) const
VertexFitter< 5 > * theFitter
AlgebraicSymMatrix matrix() const
virtual std::vector< std::vector< reco::TransientTrack > > clusterize(const std::vector< reco::TransientTrack > &tracks) const =0
virtual std::vector< TransientVertex > vertices(const std::vector< reco::TransientTrack > &tracks) const
virtual CachingVertex< N > vertex(const std::vector< reco::TransientTrack > &tracks) const =0
float degreesOfFreedom() const
GlobalPoint position() const
virtual std::vector< reco::TransientTrack > select(const std::vector< reco::TransientTrack > &tracks) const =0
PrimaryVertexProducerAlgorithm(const edm::ParameterSet &)
void setParameters(const edm::ParameterSet &)
TrackFilterForPVFindingBase * theTrackFilter
KalmanTrimmedVertexFinder theFinder
GlobalError error() const