CMS 3D CMS Logo

Functions
PFDisplacedVertexCandidateFinder.cc File Reference
#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

◆ operator<<()

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

Definition at line 345 of file PFDisplacedVertexCandidateFinder.cc.

345  {
346  if (!out)
347  return out;
348 
349  out << "====== Particle Flow Block Algorithm ======= ";
350  out << endl;
351  out << "number of unassociated elements : " << a.eventTracks_.size() << endl;
352  out << endl;
353 
354  out << " Tracks selection based on " << std::endl;
355  out << " pvtx_ = " << a.pvtx_ << std::endl;
356  out << " fabs(dxy) < " << a.dxy_ << " and pt < " << a.pt_min_prim_ << std::endl;
357  out << " nChi2 < " << a.nChi2_max_ << " and pt < " << a.pt_min_ << std::endl;
358 
359  out << endl;
360 
361  for (PFDisplacedVertexCandidateFinder::IEC ie = a.eventTracks_.begin(); ie != a.eventTracks_.end(); ie++) {
362  double pt = (*ie).get()->pt();
363 
364  math::XYZPoint Pi = (*ie).get()->innerPosition();
365  math::XYZPoint Po = (*ie).get()->outerPosition();
366 
367  double innermost_radius = sqrt(Pi.x() * Pi.x() + Pi.y() * Pi.y() + Pi.z() * Pi.z());
368  double outermost_radius = sqrt(Po.x() * Po.x() + Po.y() * Po.y() + Po.z() * Po.z());
369  double innermost_rho = sqrt(Pi.x() * Pi.x() + Pi.y() * Pi.y());
370  double outermost_rho = sqrt(Po.x() * Po.x() + Po.y() * Po.y());
371 
372  out << "ie = " << (*ie).key() << " pt = " << pt << " innermost hit radius = " << innermost_radius
373  << " rho = " << innermost_rho << " outermost hit radius = " << outermost_radius << " rho = " << outermost_rho
374  << endl;
375  }
376 
377  const std::unique_ptr<reco::PFDisplacedVertexCandidateCollection>& vertexCandidates = std::move(a.vertexCandidates());
378 
379  if (!vertexCandidates.get()) {
380  out << "vertexCandidates already transfered" << endl;
381  } else {
382  out << "number of vertexCandidates : " << vertexCandidates->size() << endl;
383  out << endl;
384 
385  for (PFDisplacedVertexCandidateFinder::IBC ib = vertexCandidates->begin(); ib != vertexCandidates->end(); ib++)
386  ib->Dump();
387  }
388 
389  return out;
390 }

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

DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
a
double a
Definition: hdecay.h:119
cuy.ib
ib
Definition: cuy.py:662
PFDisplacedVertexCandidateFinder::IBC
reco::PFDisplacedVertexCandidateCollection::const_iterator IBC
Definition: PFDisplacedVertexCandidateFinder.h:35
eostools.move
def move(src, dest)
Definition: eostools.py:511
PFDisplacedVertexCandidateFinder::IEC
std::list< reco::TrackBaseRef >::const_iterator IEC
Definition: PFDisplacedVertexCandidateFinder.h:34
Pi
const double Pi
Definition: CosmicMuonParameters.h:18
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31