#include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
#include "SimDataFormats/Track/interface/SimTrack.h"
#include "FastSimulation/Particle/interface/RawParticle.h"
#include <vector>
#include <iosfwd>
#include "FastSimulation/Event/interface/FSimTrack.icc"
Go to the source code of this file.
Namespaces | |
namespace | HepMC |
Classes | |
class | FSimTrack |
A class that mimics SimTrack, with enhanced features. More... | |
Functions | |
std::ostream & | operator<< (std::ostream &o, const FSimTrack &t) |
std::ostream& operator<< | ( | std::ostream & | o, | |
const FSimTrack & | t | |||
) |
Definition at line 88 of file FSimTrack.cc.
References FSimTrack::daughter(), FSimTrack::ecalEntrance(), FSimTrack::endVertex(), SimTrack::genpartIndex(), i, FSimVertex::id(), FSimTrack::id(), k, FSimTrack::layer1Entrance(), FSimTrack::momentum(), FSimTrack::mother(), name, FSimTrack::nDaughters(), FSimTrack::noEndVertex(), FSimTrack::onEcal(), FSimTrack::onLayer1(), FSimTrack::particleInfo(), FSimVertex::position(), RawParticle::vertex(), and FSimTrack::vertex().
00088 { 00089 00090 std::string name = t.particleInfo() ? t.particleInfo()->name() : "Unknown"; 00091 XYZTLorentzVector momentum1 = t.momentum(); 00092 XYZVector vertex1 = t.vertex().position().Vect(); 00093 int vertexId1 = t.vertex().id(); 00094 00095 o.setf(std::ios::fixed, std::ios::floatfield); 00096 o.setf(std::ios::right, std::ios::adjustfield); 00097 00098 o << std::setw(4) << t.id() << " " 00099 << std::setw(4) << t.genpartIndex() << " " 00100 << name; 00101 00102 for(unsigned int k=0;k<11-name.length() && k<12; k++) o << " "; 00103 00104 o << std::setw(6) << std::setprecision(2) << momentum1.eta() << " " 00105 << std::setw(6) << std::setprecision(2) << momentum1.phi() << " " 00106 << std::setw(6) << std::setprecision(2) << momentum1.pt() << " " 00107 << std::setw(6) << std::setprecision(2) << momentum1.e() << " " 00108 << std::setw(4) << vertexId1 << " " 00109 << std::setw(6) << std::setprecision(1) << vertex1.x() << " " 00110 << std::setw(6) << std::setprecision(1) << vertex1.y() << " " 00111 << std::setw(6) << std::setprecision(1) << vertex1.z() << " " 00112 << std::setw(4) << t.mother().id() << " "; 00113 00114 if ( !t.noEndVertex() ) { 00115 XYZTLorentzVector vertex2 = t.endVertex().position(); 00116 int vertexId2 = t.endVertex().id(); 00117 00118 o << std::setw(4) << vertexId2 << " " 00119 << std::setw(6) << std::setprecision(2) << vertex2.eta() << " " 00120 << std::setw(6) << std::setprecision(2) << vertex2.phi() << " " 00121 << std::setw(5) << std::setprecision(1) << vertex2.pt() << " " 00122 << std::setw(6) << std::setprecision(1) << vertex2.z() << " "; 00123 for (int i=0; i<t.nDaughters(); ++i) 00124 o << std::setw(4) << t.daughter(i).id() << " "; 00125 00126 } else { 00127 00128 if ( t.onLayer1() ) { 00129 00130 XYZTLorentzVector vertex2 = t.layer1Entrance().vertex(); 00131 00132 o << std::setw(4) << -t.onLayer1() << " " 00133 << std::setw(6) << std::setprecision(2) << vertex2.eta() << " " 00134 << std::setw(6) << std::setprecision(2) << vertex2.phi() << " " 00135 << std::setw(5) << std::setprecision(1) << vertex2.pt() << " " 00136 << std::setw(6) << std::setprecision(1) << vertex2.z() << " " 00137 << std::setw(6) << std::setprecision(2) << t.layer1Entrance().pt() << " " 00138 << std::setw(6) << std::setprecision(2) << t.layer1Entrance().e() << " "; 00139 00140 } else if ( t.onEcal() ) { 00141 00142 XYZTLorentzVector vertex2 = t.ecalEntrance().vertex(); 00143 00144 o << std::setw(4) << -t.onEcal() << " " 00145 << std::setw(6) << std::setprecision(2) << vertex2.eta() << " " 00146 << std::setw(6) << std::setprecision(2) << vertex2.phi() << " " 00147 << std::setw(5) << std::setprecision(1) << vertex2.pt() << " " 00148 << std::setw(6) << std::setprecision(1) << vertex2.z() << " " 00149 << std::setw(6) << std::setprecision(2) << t.ecalEntrance().pt() << " " 00150 << std::setw(6) << std::setprecision(2) << t.ecalEntrance().e() << " "; 00151 } 00152 } 00153 return o; 00154 }