CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
RawParticle.cc File Reference
#include "FastSimulation/Particle/interface/ParticleTable.h"
#include "FastSimulation/Particle/interface/RawParticle.h"
#include <iostream>
#include <iomanip>
#include <cmath>

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &o, const RawParticle &p)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const RawParticle p 
)

Definition at line 231 of file RawParticle.cc.

References RawParticle::momentum(), python.connectstrParser::o, RawParticle::pid(), RawParticle::status(), and RawParticle::vertex().

231  {
232 
233  o.setf(std::ios::fixed, std::ios::floatfield);
234  o.setf(std::ios::right, std::ios::adjustfield);
235 
236 
237  o << std::setw(4) << std::setprecision(2) << p.pid() << " (";
238  o << std::setw(2) << std::setprecision(2) << p.status() << "): ";
239  o << std::setw(10) << std::setprecision(4) << p.momentum() << " ";
240  o << std::setw(10) << std::setprecision(4) << p.vertex();
241  return o;
242 
243 }
int status() const
get the particle status
Definition: RawParticle.h:266
int pid() const
get the HEP particle ID number
Definition: RawParticle.h:265
const XYZTLorentzVector & momentum() const
the momentum fourvector
Definition: RawParticle.h:286
const XYZTLorentzVector & vertex() const
the vertex fourvector
Definition: RawParticle.h:285