CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
PFDisplacedVertexCandidateFinder.cc File Reference
#include <memory>
#include "RecoParticleFlow/PFTracking/interface/PFDisplacedVertexCandidateFinder.h"
#include "DataFormats/GeometryVector/interface/GlobalVector.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "MagneticField/Engine/interface/MagneticField.h"

Go to the source code of this file.

Functions

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

Function Documentation

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

Definition at line 332 of file PFDisplacedVertexCandidateFinder.cc.

References PFDisplacedVertexCandidateFinder::dxy_, PFDisplacedVertexCandidateFinder::eventTracks_, cuy::ib, eostools::move(), PFDisplacedVertexCandidateFinder::nChi2_max_, submitPVResolutionJobs::out, Pi, DiDispStaMuonMonitor_cfi::pt, PFDisplacedVertexCandidateFinder::pt_min_, PFDisplacedVertexCandidateFinder::pt_min_prim_, PFDisplacedVertexCandidateFinder::pvtx_, mathSSE::sqrt(), and PFDisplacedVertexCandidateFinder::vertexCandidates().

332  {
333  if (!out)
334  return out;
335 
336  out << "====== Particle Flow Block Algorithm ======= ";
337  out << endl;
338  out << "number of unassociated elements : " << a.eventTracks_.size() << endl;
339  out << endl;
340 
341  out << " Tracks selection based on " << std::endl;
342  out << " pvtx_ = " << a.pvtx_ << std::endl;
343  out << " std::abs(dxy) < " << a.dxy_ << " and pt < " << a.pt_min_prim_ << std::endl;
344  out << " nChi2 < " << a.nChi2_max_ << " and pt < " << a.pt_min_ << std::endl;
345 
346  out << endl;
347 
348  for (PFDisplacedVertexCandidateFinder::IEC ie = a.eventTracks_.begin(); ie != a.eventTracks_.end(); ie++) {
349  double pt = (*ie).get()->pt();
350 
351  math::XYZPoint Pi = (*ie).get()->innerPosition();
352  math::XYZPoint Po = (*ie).get()->outerPosition();
353 
354  double innermost_radius = sqrt(Pi.x() * Pi.x() + Pi.y() * Pi.y() + Pi.z() * Pi.z());
355  double outermost_radius = sqrt(Po.x() * Po.x() + Po.y() * Po.y() + Po.z() * Po.z());
356  double innermost_rho = sqrt(Pi.x() * Pi.x() + Pi.y() * Pi.y());
357  double outermost_rho = sqrt(Po.x() * Po.x() + Po.y() * Po.y());
358 
359  out << "ie = " << (*ie).key() << " pt = " << pt << " innermost hit radius = " << innermost_radius
360  << " rho = " << innermost_rho << " outermost hit radius = " << outermost_radius << " rho = " << outermost_rho
361  << endl;
362  }
363 
364  const std::unique_ptr<reco::PFDisplacedVertexCandidateCollection>& vertexCandidates = std::move(a.vertexCandidates());
365 
366  if (!vertexCandidates.get()) {
367  out << "vertexCandidates already transfered" << endl;
368  } else {
369  out << "number of vertexCandidates : " << vertexCandidates->size() << endl;
370  out << endl;
371 
372  for (PFDisplacedVertexCandidateFinder::IBC ib = vertexCandidates->begin(); ib != vertexCandidates->end(); ib++)
373  ib->Dump();
374  }
375 
376  return out;
377 }
const double Pi
int ib
Definition: cuy.py:661
const std::unique_ptr< reco::PFDisplacedVertexCandidateCollection > & vertexCandidates() const
std::list< reco::TrackBaseRef > eventTracks_
The track refs.
T sqrt(T t)
Definition: SSEVec.h:19
def move
Definition: eostools.py:511
reco::PFDisplacedVertexCandidateCollection::const_iterator IBC
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::list< reco::TrackBaseRef >::const_iterator IEC