Definition at line 165 of file InclusiveVertexFinder.h.
References funct::abs(), ecalDrivenElectronSeedsParameters_cff::beamSpot, tthelpers::buildTT(), TemplatedInclusiveVertexFinder< InputContainer, VTX >::clusterizer, fastPrimaryVertexProducer_cfi::clusters, gather_cfg::cout, reco::Vertex::covariance(), dir, VertexDistance3D::distance(), VertexDistanceXY::distance(), Vector3DBase< T, FrameTag >::dot(), reco::TransientTrack::dtErrorExt(), reco::TrackBase::dz(), Measurement1D::error(), TemplatedInclusiveVertexFinder< InputContainer, VTX >::fitterRatio, TemplatedInclusiveVertexFinder< InputContainer, VTX >::fitterSigmacut, TemplatedInclusiveVertexFinder< InputContainer, VTX >::fitterTini, edm::EventSetup::get(), mps_fire::i, edm::isFinite(), reco::TransientTrack::isValid(), TransientVertex::isValid(), TemplatedInclusiveVertexFinder< InputContainer, VTX >::maxLIP, TemplatedInclusiveVertexFinder< InputContainer, VTX >::maxNTracks, TemplatedInclusiveVertexFinder< InputContainer, VTX >::maxTimeSig, eostools::move(), reco::Vertex::position(), funct::pow(), jets_cff::primaryVertices, MetAnalyzer::pv(), reco::TransientTrack::setBeamSpot(), Measurement1D::significance(), mathSSE::sqrt(), pfDeepBoostedJetPreprocessParams_cfi::sv, reco::Vertex::t(), reco::TransientTrack::timeExt(), TemplatedInclusiveVertexFinder< InputContainer, VTX >::token_beamSpot, TemplatedInclusiveVertexFinder< InputContainer, VTX >::token_primaryVertex, TemplatedInclusiveVertexFinder< InputContainer, VTX >::token_tracks, HiIsolationCommonParameters_cff::track, reco::TransientTrack::track(), TemplatedInclusiveVertexFinder< InputContainer, VTX >::trackFilter(), l1t::tracks, groupFilesInBlocks::tt, csvLumiCalc::unit, Vector3DBase< T, FrameTag >::unit(), reco::Unknown, svhelper::updateVertexTime(), TemplatedInclusiveVertexFinder< InputContainer, VTX >::useVertexFitter, TemplatedInclusiveVertexFinder< InputContainer, VTX >::useVertexReco, findQualityFiles::v, Measurement1D::value(), AdaptiveVertexFitter::vertex(), TemplatedInclusiveVertexFinder< InputContainer, VTX >::vertexMinAngleCosine, TemplatedInclusiveVertexFinder< InputContainer, VTX >::vertexMinDLen2DSig, TemplatedInclusiveVertexFinder< InputContainer, VTX >::vertexMinDLenSig, electrons_cff::vertices, badGlobalMuonTaggersAOD_cff::vtx, TemplatedInclusiveVertexFinder< InputContainer, VTX >::vtxReco, and w.
Referenced by TemplatedInclusiveVertexFinder< InputContainer, VTX >::fillDescriptions().
167 using namespace reco;
194 auto recoVertices = std::make_unique<Product>();
195 if(primaryVertices->size()!=0) {
200 std::vector<TransientTrack> tts;
202 for(
typename InputContainer::const_iterator
track = tracks->begin();
207 if(!
tt.isValid())
continue;
214 auto dtSig =
std::abs(
tt.timeExt() - pv.
t())/tError;
217 tt.setBeamSpot(*beamSpot);
220 std::vector<TracksClusteringFromDisplacedSeed::Cluster>
clusters =
clusterizer->clusters(pv,tts);
224 for(
unsigned int i = 0;
i < 7;
i++) {
225 for(
unsigned int j = 0; j < 7; j++) {
238 std::cout <<
"CLUSTERS " << clusters.size() << std::endl;
241 for(std::vector<TracksClusteringFromDisplacedSeed::Cluster>::iterator cluster = clusters.begin();
242 cluster != clusters.end(); ++cluster,++
i)
244 if(cluster->tracks.size() < 2 || cluster->tracks.size() >
maxNTracks )
246 std::vector<TransientVertex>
vertices;
248 vertices =
vtxReco->vertices(cluster->tracks, bs);
252 singleFitVertex = theAdaptiveFitter.vertex(cluster->tracks,cluster->seedPoint);
254 vertices.push_back(singleFitVertex);
259 for(
auto&
vtx : vertices) {
264 for(std::vector<TransientVertex>::const_iterator
v = vertices.begin();
265 v != vertices.end(); ++
v) {
270 std::cout <<
"V chi2/n: " <<
v->normalisedChiSquared() <<
" ndof: " <<
v->degreesOfFreedom() ;
273 std::cout <<
" pos: " << vv.position() <<
" error: " <<vv.xError() <<
" " << vv.yError() <<
" " << vv.zError() << std::endl;
274 std::cout <<
" time: " << vv.time() <<
" error: " << vv.tError() << std::endl;
277 std::vector<reco::TransientTrack> ts =
v->originalTracks();
278 for(std::vector<reco::TransientTrack>::const_iterator i = ts.begin();
279 i != ts.end(); ++
i) {
280 float w =
v->trackWeight(*i);
281 if (w > 0.5) dir+=i->impactPointState().globalDirection();
283 std::cout <<
"\t[" << (*i).track().pt() <<
": " 284 << (*i).track().eta() <<
", " 285 << (*i).track().phi() <<
"], " 289 GlobalPoint sv((*v).position().x(),(*v).position().y(),(*v).position().z());
295 recoVertices->push_back(*
v);
306 std::cout <<
"Final put " << recoVertices->size() << std::endl;
math::Error< dimension >::type CovarianceMatrix
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
std::unique_ptr< VertexReconstructor > vtxReco
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
const Point & position() const
position
Measurement1D distance(const GlobalPoint &vtx1Position, const GlobalError &vtx1PositionError, const GlobalPoint &vtx2Position, const GlobalError &vtx2PositionError) const override
std::unique_ptr< TracksClusteringFromDisplacedSeed > clusterizer
Measurement1D distance(const GlobalPoint &vtx1Position, const GlobalError &vtx1PositionError, const GlobalPoint &vtx2Position, const GlobalError &vtx2PositionError) const override
Abs< T >::type abs(const T &t)
double vertexMinAngleCosine
edm::EDGetTokenT< InputContainer > token_tracks
bool trackFilter(const reco::Track &track) const
Vector3DBase unit() const
double significance() const
double vertexMinDLen2DSig
void updateVertexTime(TransientVertex &vtx)
edm::EDGetTokenT< reco::BeamSpot > token_beamSpot
edm::EDGetTokenT< reco::VertexCollection > token_primaryVertex
reco::TransientTrack buildTT(edm::Handle< reco::TrackCollection > &tracks, edm::ESHandle< TransientTrackBuilder > &trackbuilder, unsigned int k)
Power< A, B >::type pow(const A &a, const B &b)
double t() const
t coordinate