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(), 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);
258 for(
auto&
vtx : vertices) {
262 for(std::vector<TransientVertex>::const_iterator
v = vertices.begin();
263 v != vertices.end(); ++
v) {
268 std::cout <<
"V chi2/n: " <<
v->normalisedChiSquared() <<
" ndof: " <<
v->degreesOfFreedom() ;
271 std::cout <<
" pos: " << vv.position() <<
" error: " <<vv.xError() <<
" " << vv.yError() <<
" " << vv.zError() << std::endl;
272 std::cout <<
" time: " << vv.time() <<
" error: " << vv.tError() << std::endl;
275 std::vector<reco::TransientTrack> ts =
v->originalTracks();
276 for(std::vector<reco::TransientTrack>::const_iterator i = ts.begin();
277 i != ts.end(); ++
i) {
278 float w =
v->trackWeight(*i);
279 if (w > 0.5) dir+=i->impactPointState().globalDirection();
281 std::cout <<
"\t[" << (*i).track().pt() <<
": " 282 << (*i).track().eta() <<
", " 283 << (*i).track().phi() <<
"], " 287 GlobalPoint sv((*v).position().x(),(*v).position().y(),(*v).position().z());
292 recoVertices->push_back(*
v);
302 std::cout <<
"Final put " << recoVertices->size() << std::endl;
math::Error< dimension >::type CovarianceMatrix
std::auto_ptr< TracksClusteringFromDisplacedSeed > clusterizer
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
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
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
std::auto_ptr< VertexReconstructor > vtxReco
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