CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
NuclearInteractionEDProducer.h File Reference
#include <memory>
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/ESWatcher.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "MagneticField/Engine/interface/MagneticField.h"
#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
#include "RecoTracker/NuclearSeedGenerator/interface/TrajectoryToSeedMap.h"
#include "TrackingTools/Records/interface/TransientTrackRecord.h"
#include "DataFormats/VertexReco/interface/NuclearInteraction.h"

Go to the source code of this file.

Classes

class  NuclearInteractionEDProducer
 

Functions

void print (std::ostringstream &str, const reco::NuclearInteraction &nucl, const std::auto_ptr< NuclearVertexBuilder > &builder)
 

Function Documentation

void print ( std::ostringstream &  str,
const reco::NuclearInteraction nucl,
const std::auto_ptr< NuclearVertexBuilder > &  builder 
)

Definition at line 162 of file NuclearInteractionEDProducer.cc.

References ClosestApproachInRPhi::distance(), reco::NuclearInteraction::likelihood(), reco::Vertex::position(), reco::NuclearInteraction::primaryTrack(), reco::NuclearInteraction::secondaryTracks_begin(), reco::NuclearInteraction::secondaryTracks_end(), reco::NuclearInteraction::secondaryTracksSize(), reco::NuclearInteraction::seedsSize(), and reco::NuclearInteraction::vertex().

162  {
163  out<<"Nuclear Interaction with vertex position : (";
164  out<< nucl.vertex().position().x() << " , "
165  << nucl.vertex().position().y() << " , "
166  << nucl.vertex().position().z() << ")";
167  reco::TrackRef primTrack = (nucl.primaryTrack()).castTo<reco::TrackRef>();
168  out<<"\tLikelihood : " << nucl.likelihood() << std::endl;
169  out<<"\tPrimary Track : Pt = " << primTrack->pt() << " - Nhits = "
170  << primTrack->numberOfValidHits() << std::endl;
171  out << "\tNumber of seeds : " << nucl.seedsSize() << std::endl;
172  out << "\tNumber of secondary Tracks : " << nucl.secondaryTracksSize() << std::endl;
173  int it=0;
174  for( reco::NuclearInteraction::trackRef_iterator itr_=nucl.secondaryTracks_begin(); itr_ != nucl.secondaryTracks_end(); itr_++, it++) {
175  reco::TrackRef secTrack = (*itr_).castTo<reco::TrackRef>();
176  ClosestApproachInRPhi* theApproach = builder->closestApproach(primTrack, secTrack);
177  out << "\t\t Secondary track " << it << " : Pt = " << (*itr_)->pt()
178  << " - Nhits = " << (*itr_)->numberOfValidHits()
179  << " - Dist = " << theApproach->distance()
180  << " - chi2 = " << (*itr_)->normalizedChi2() << std::endl;
181  delete theApproach;
182  }
183  out << "----------------" << std::endl;
184 }
trackRef_iterator secondaryTracks_begin() const
first iterator over secondary tracks
const edm::RefToBase< reco::Track > & primaryTrack() const
return the base reference to the primary track
const Point & position() const
position
Definition: Vertex.h:93
int secondaryTracksSize() const
return the number of secondary tracks
reco::Vertex::trackRef_iterator trackRef_iterator
int seedsSize() const
return the number of seeds
double likelihood() const
return the likelihood ~ probability that the vertex is a real nuclear interaction ...
tuple out
Definition: dbtoconf.py:99
const reco::Vertex & vertex() const
return the vertex
trackRef_iterator secondaryTracks_end() const
last iterator over secondary tracks