CMS 3D CMS Logo

Functions
PFDisplacedVertexCandidateFinder.cc File Reference
#include <memory>
#include "RecoParticleFlow/PFTracking/interface/PFDisplacedVertexCandidateFinder.h"
#include "DataFormats/GeometryVector/interface/GlobalVector.h"
#include "DataFormats/Math/interface/deltaPhi.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

◆ operator<<()

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

Definition at line 333 of file PFDisplacedVertexCandidateFinder.cc.

References a, cuy::ib, eostools::move(), MillePedeFileConverter_cfg::out, Pi, DiDispStaMuonMonitor_cfi::pt, mathSSE::sqrt(), and PFDisplacedVertexCandidateFinder::vertexCandidates().

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