CMS 3D CMS Logo

Functions

CMSSW_4_4_3_patch1/src/RecoVertex/NuclearInteractionProducer/plugins/NuclearInteractionEDProducer.cc File Reference

#include "RecoVertex/NuclearInteractionProducer/interface/NuclearInteractionEDProducer.h"
#include "TrackingTools/PatternTools/interface/TrajTrackAssociation.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "DataFormats/VertexReco/interface/NuclearInteractionFwd.h"
#include "RecoVertex/NuclearInteractionProducer/interface/NuclearVertexBuilder.h"
#include "RecoVertex/NuclearInteractionProducer/interface/NuclearLikelihood.h"
#include "FWCore/Framework/interface/EventSetup.h"

Go to the source code of this file.

Functions

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

Function Documentation

void print ( std::ostringstream &  out,
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().

                                                                                                                          {
   out<<"Nuclear Interaction with vertex position : (";
   out<< nucl.vertex().position().x() << " , "
      << nucl.vertex().position().y() << " , "
      << nucl.vertex().position().z() << ")";
   reco::TrackRef primTrack = (nucl.primaryTrack()).castTo<reco::TrackRef>();
   out<<"\tLikelihood : " << nucl.likelihood() << std::endl;
   out<<"\tPrimary Track : Pt = " << primTrack->pt() << "  - Nhits = "
      << primTrack->numberOfValidHits() << std::endl;
   out << "\tNumber of seeds : " << nucl.seedsSize() << std::endl;
   out << "\tNumber of secondary Tracks : " << nucl.secondaryTracksSize() << std::endl;
   int it=0;
   for( reco::NuclearInteraction::trackRef_iterator itr_=nucl.secondaryTracks_begin(); itr_ != nucl.secondaryTracks_end(); itr_++, it++) {
                reco::TrackRef secTrack = (*itr_).castTo<reco::TrackRef>();
                ClosestApproachInRPhi* theApproach = builder->closestApproach(primTrack, secTrack);
                out << "\t\t Secondary track " << it << " : Pt = " << (*itr_)->pt() 
                    << " - Nhits = " << (*itr_)->numberOfValidHits()
                    << " - Dist = " << theApproach->distance()
                    << " - chi2 = " << (*itr_)->normalizedChi2() << std::endl;
                delete theApproach;
      }
   out << "----------------" << std::endl;
}