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 334 of file PFDisplacedVertexCandidateFinder.cc.

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

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