CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/DataFormats/ParticleFlowReco/src/PFRecTrack.cc

Go to the documentation of this file.
00001 #include "DataFormats/ParticleFlowReco/interface/PFRecTrack.h"
00002 #include "Math/GenVector/PositionVector3D.h" 
00003 #include "DataFormats/Math/interface/Point3D.h" 
00004 // #include "FWCore/MessageLogger/interface/MessageLogger.h"
00005 
00006 using namespace reco;
00007 
00008 
00009 PFRecTrack::PFRecTrack() :
00010   PFTrack(),
00011   algoType_(PFRecTrack::Unknown),
00012   trackId_(-1),
00013   STIP_(-99.)
00014 {}
00015 
00016 
00017 
00018 PFRecTrack::PFRecTrack(double charge, 
00019                        AlgoType_t algoType, 
00020                        int trackId, 
00021                        const reco::TrackRef& trackRef ) : 
00022   PFTrack(charge), 
00023   algoType_(algoType),
00024   trackId_(trackId), 
00025   trackRef_(trackRef),
00026   STIP_(-99.)
00027 {}
00028 
00029 
00030 
00031 PFRecTrack::PFRecTrack(double charge, AlgoType_t algoType) : 
00032   PFTrack(charge), 
00033   algoType_(algoType),
00034   trackId_(-1),
00035   STIP_(-99.)
00036 {}
00037   
00038 
00039 std::ostream& reco::operator<<(std::ostream& out, 
00040                                const PFRecTrack& track) {  
00041   if (!out) return out;  
00042   
00043   const reco::PFTrajectoryPoint& closestApproach = 
00044     track.trajectoryPoint(reco::PFTrajectoryPoint::ClosestApproach);
00045   
00046   out << "Reco track charge = " << track.charge() 
00047       << ", type = " << track.algoType()
00048       << ", Pt = " << closestApproach.momentum().Pt() 
00049       << ", P = " << closestApproach.momentum().P() << std::endl
00050       << "\tR0 = " << closestApproach.position().Rho()
00051       <<" Z0 = " << closestApproach.position().Z() << std::endl
00052       << "\tnumber of tracker measurements = " 
00053       << track.nTrajectoryMeasurements() << std::endl
00054       <<"\tnumber of points total = "
00055       << track.trajectoryPoints_.size()<< std::endl;
00056 
00057   for(unsigned i=0; i<track.trajectoryPoints_.size(); i++) 
00058     out<<track.trajectoryPoints_[i]<<std::endl;
00059 
00060 
00061   return out;
00062 }