Go to the documentation of this file.
   17 #include <boost/format.hpp> 
   42                                            const double mass, 
const double tlife, 
const double maxWidth,
 
   49     , m_maxWidth( maxWidth )
 
   66                                            const double mass, 
const double tlife, 
const double maxWidth )
 
   72     , m_maxWidth( maxWidth )
 
   74     , m_pythia( pid.pid() )
 
   86 #ifdef __INTEL_COMPILER             // Disable ICC remark 
   87 #  pragma warning( disable : 1572 ) // Floating-point equality and inequality comparisons are unreliable 
   88 #  pragma warning( push ) 
   91   if ( 0 == charge() ) {
 
   93   } 
else if ( 1.0 == charge() ) {
 
   95   } 
else if ( -1.0 == charge() ) {
 
   97   } 
else if ( 2.0 == charge() ) {
 
   99   } 
else if ( -2.0 == charge() ) {
 
  101   } 
else if ( 0.3 == charge() ) {
 
  103   } 
else if ( -0.3 == charge() ) {
 
  105   } 
else if ( 0.7 == charge() ) {
 
  107   } 
else if ( -0.7 == charge() ) {
 
  110     s << BF( 
" Q:%|+3.1f|," ) % float( charge() );
 
  112 #ifdef __INTEL_COMPILER // Re-enable ICC remark 
  113 #  pragma warning( pop ) 
  125     s << 
", lifetime: infinity  ";
 
  126   } 
else if ( 0 == lifeTime() ) {
 
  148   if ( evtGen() != 
name() ) { 
s << BF( 
", EvtGen: %|-10s|" ) % evtGen(); }
 
  150   if ( m_pid.pid() != pythia() ) { 
s << BF( 
", Pythia: %|-9d|" ) % pythia(); }
 
  178   if ( 0 != service ) {
 
  179     fmt += 
" | %|-4.4s| "; 
 
  180     hdr += 
" | %|-4.4s| "; 
 
  183   fmt += 
"| %|-18.18s|";  
 
  190   fmt += 
"| %|=10.4g| ";  
 
  191   fmt += 
"| %|=20.20s|";  
 
  192   fmt += 
" | %|=10d| |";  
 
  193   fmt += 
" %|=20.20d| |"; 
 
  195   hdr += 
"| %|=18.18s|";  
 
  196   hdr += 
"| %|=12.12s| "; 
 
  197   hdr += 
"| %|=4.4s| ";   
 
  198   hdr += 
"| %|=18.18s|";  
 
  200   hdr += 
"| %|=18.18s|"; 
 
  202   hdr += 
"| %|=10.10g| ";   
 
  203   hdr += 
"| %|=20.20s|";    
 
  204   hdr += 
" | %|=10.10s| |"; 
 
  205   hdr += 
" %|=20.20d| |";   
 
  208   header.exceptions( boost::io::all_error_bits ^ ( boost::io::too_many_args_bit | boost::io::too_few_args_bit ) );
 
  210   if ( service ) { 
header % 
"#"; }
 
  211   header % 
"Name" % 
"PdgID" % 
"Q" % 
"Mass" % 
"(c*)Tau/Gamma" % 
"MaxWidth" % 
"EvtGen" % 
"PythiaID" % 
"Antiparticle";
 
  217   for ( 
auto ip = particles.
begin(); particles.
end() != ip; ++ip ) {
 
  219     if ( 0 == 
pp ) { 
continue; }
 
  221     line.exceptions( boost::io::all_error_bits ^ ( boost::io::too_many_args_bit | boost::io::too_few_args_bit ) );
 
  223     if ( 0 != service ) {
 
  233         % 
pp->particleID().pid();   
 
  235 #ifdef __INTEL_COMPILER             // Disable ICC remark 
  236 #  pragma warning( disable : 1572 ) // Floating-point equality and inequality comparisons are unreliable 
  237 #  pragma warning( push ) 
  239     if ( 0 == 
pp->charge() ) {
 
  241     } 
else if ( 0.3 == 
pp->charge() ) {
 
  243     } 
else if ( -0.3 == 
pp->charge() ) {
 
  245     } 
else if ( 0.7 == 
pp->charge() ) {
 
  247     } 
else if ( -0.7 == 
pp->charge() ) {
 
  252 #ifdef __INTEL_COMPILER // Re-enable ICC remark 
  253 #  pragma warning( pop ) 
  269     const double ctau  = 
pp->ctau();
 
  270     const double width = 
pp->width();
 
  271     const double ltime = 
pp->lifetime();
 
  273       line % 
"stable" % 
"";
 
  296     line % 
pp->maxWidth() % 
pp->evtGen() % 
pp->pythia();
 
  302     } 
else if ( anti == 
pp ) {
 
  368     if ( 0 == 
pp ) { 
continue; }
 
  400   if ( 0 == p ) { 
return 0; }
 
  
 
std::string toString() const
simple method for conversion into the string
const std::string & name() const
Get the particle name.
const Gaudi::ParticleProperty * anti() const
get the pointer to the anti-particle
Gaudi::ParticleID abs(const Gaudi::ParticleID &p)
Return the absolute value for a PID.
ParticleProperty(const std::string &name, const Gaudi::ParticleID &pid, const double charge, const double mass, const double tlife, const double maxWidth, const std::string &evtgen, const int pythia)
full constructor, from all data (except the antiparticle )
std::ostream & fillStream(std::ostream &s) const
the standard (a'la Gaudi) printout of the object
GAUDI_API std::string printAsTable(const std::vector< const Gaudi::ParticleProperty * > &particles, const Gaudi::Interfaces::IParticlePropertySvc *service=0)
print a list of properties in a form of the table
GAUDI_API std::ostream & printAsTable_(const std::vector< const Gaudi::ParticleProperty * > &particles, std::ostream &stream, const Gaudi::Interfaces::IParticlePropertySvc *service=0)
print a list of properties in a form of the table
constexpr double micrometer
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
const Gaudi::ParticleID & particleID() const
get the particle ID
int pid() const
Retrieve the PDG ID.
std::ostream & operator<<(std::ostream &stream, const Gaudi::ParticleProperty &pp)
standard output operator to the stream
const Gaudi::ParticleID particleID(const size_t index, const Gaudi::Interfaces::IParticlePropertySvc *service)
the inverse mapping of the integer sequential number onto Gaudi::ParticleID object
std::ostream & toStream(ITERATOR first, ITERATOR last, std::ostream &s, const std::string &open, const std::string &close, const std::string &delim)
the helper function to print the sequence
virtual const ParticleProperty * find(const std::string &name) const =0
Retrieve an object by name:
void setAntiParticle(const ParticleProperty *p)
set the pointer to the antiparticle
bool selfcc() const
self-charge conjugated?
size_t index(const Gaudi::ParticleProperty *property, const Gaudi::Interfaces::IParticlePropertySvc *service)
helper utility for mapping of Gaudi::ParticleProperty object into non-negative integral sequential id...