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 "TrackingTools/PatternTools/interface/TrajTrackAssociation.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 163 of file NuclearInteractionEDProducer.cc.

References 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().

163  {
164  out<<"Nuclear Interaction with vertex position : (";
165  out<< nucl.vertex().position().x() << " , "
166  << nucl.vertex().position().y() << " , "
167  << nucl.vertex().position().z() << ")";
168  reco::TrackRef primTrack = (nucl.primaryTrack()).castTo<reco::TrackRef>();
169  out<<"\tLikelihood : " << nucl.likelihood() << std::endl;
170  out<<"\tPrimary Track : Pt = " << primTrack->pt() << " - Nhits = "
171  << primTrack->numberOfValidHits() << std::endl;
172  out << "\tNumber of seeds : " << nucl.seedsSize() << std::endl;
173  out << "\tNumber of secondary Tracks : " << nucl.secondaryTracksSize() << std::endl;
174  int it=0;
175  for( reco::NuclearInteraction::trackRef_iterator itr_=nucl.secondaryTracks_begin(); itr_ != nucl.secondaryTracks_end(); itr_++, it++) {
176  reco::TrackRef secTrack = (*itr_).castTo<reco::TrackRef>();
177  ClosestApproachInRPhi* theApproach = builder->closestApproach(primTrack, secTrack);
178  out << "\t\t Secondary track " << it << " : Pt = " << (*itr_)->pt()
179  << " - Nhits = " << (*itr_)->numberOfValidHits()
180  << " - Dist = " << theApproach->distance()
181  << " - chi2 = " << (*itr_)->normalizedChi2() << std::endl;
182  delete theApproach;
183  }
184  out << "----------------" << std::endl;
185 }
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:92
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