All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Gaudi::ParticlePropertySvc Class Reference

This service provides access to particle properties. More...

#include <src/ParticlePropertySvc.h>

Inheritance diagram for Gaudi::ParticlePropertySvc:
Collaboration diagram for Gaudi::ParticlePropertySvc:

Public Types

typedef ParticlePropertymapped_type
 
typedef std::map< int,
mapped_type
MapID
 
typedef std::map< std::string,
mapped_type
MapName
 
typedef std::map< int,
mapped_type
MapStdHepID
 
typedef std::map< int,
mapped_type
MapPythiaID
 
typedef
IParticlePropertySvc::VectPP 
VectPP
 
typedef
IParticlePropertySvc::const_iterator 
const_iterator
 
typedef
IParticlePropertySvc::iterator 
iterator
 
typedef std::set
< ParticleProperty * > 
Set
 
- Public Types inherited from extends1< Service, IParticlePropertySvc >
typedef extends1 base_class
 Typedef to this class. More...
 
typedef extend_interfaces1
< IParticlePropertySvc
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from Service
typedef
Gaudi::PluginService::Factory2
< IService *, const
std::string &, ISvcLocator * > 
Factory
 
- Public Types inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
typedef CommonMessaging base_class
 
- Public Types inherited from implements3< IService, IProperty, IStateful >
typedef implements3 base_class
 Typedef to this class. More...
 
typedef extend_interfaces3
< IService, IProperty,
IStateful
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from extend_interfaces3< IService, IProperty, IStateful >
typedef mpl::fold< typename
IService::iid::iids::type,
typename mpl::fold< typename
IProperty::iid::iids::type,
typename
IStateful::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type, mpl::insert< mpl::_1,
mpl::_2 > >::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IInterface
enum  Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR }
 Return status. More...
 
typedef Gaudi::InterfaceId
< IInterface, 0, 0 > 
iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 
- Public Types inherited from extend_interfaces1< IParticlePropertySvc >
typedef
IParticlePropertySvc::iid::iids::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IParticlePropertySvc
typedef std::vector
< ParticleProperty * > 
VectPP
 
typedef VectPP::const_iterator const_iterator
 
typedef VectPP::iterator iterator
 

Public Member Functions

virtual StatusCode initialize ()
 Initialise the service. More...
 
virtual StatusCode finalize ()
 Finalise the service. More...
 
virtual StatusCode push_back (const std::string &particle, int geantId, int jetsetId, double charge, double mass, double tlife, const std::string &evtName, int pythiaId, double maxWidth)
 Create a new particle property. More...
 
virtual StatusCode push_back (ParticleProperty *pp)
 Add a new particle property. More...
 
virtual const_iterator begin () const
 Get a const reference to the beginning of the container. More...
 
virtual const_iterator end () const
 Get a const reference to the end of the container. More...
 
virtual int size () const
 Get the container size. More...
 
virtual ParticlePropertyfind (int geantId)
 Retrieve a property by geant3 id. More...
 
virtual ParticlePropertyfind (const std::string &name)
 Retrieve a property by particle name. More...
 
virtual ParticlePropertyfindByStdHepID (int stdHepId)
 Retrieve a property by StdHep id. More...
 
virtual ParticlePropertyfindByPythiaID (int pythiaID)
 Retrieve a property by Pythia id. More...
 
virtual StatusCode erase (int geantId)
 Erase a property by geant3 id. More...
 
virtual StatusCode erase (const std::string &name)
 Erase a property by particle name. More...
 
virtual StatusCode eraseByStdHepID (int stdHepId)
 Erase a property by StdHep id ??? More...
 
 ParticlePropertySvc (const std::string &name, ISvcLocator *svc)
 Standard Constructor. More...
 
virtual ~ParticlePropertySvc ()
 Destructor. More...
 
- Public Member Functions inherited from extends1< Service, IParticlePropertySvc >
 extends1 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments. More...
 
 extends1 (A1 a1, A2 a2)
 Templated constructor with 2 arguments. More...
 
 extends1 (A1 a1)
 Templated constructor with 1 argument. More...
 
 extends1 ()
 Default constructor. More...
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface. More...
 
virtual std::vector< std::string > getInterfaceNames () const
 Implementation of IInterface::getInterfaceNames. More...
 
virtual ~extends1 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from Service
virtual unsigned long release ()
 Release Interface instance. More...
 
virtual const std::string & name () const
 Retrieve name of the service. More...
 
virtual StatusCode configure ()
 Configuration (from OFFLINE to CONFIGURED). More...
 
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING). More...
 
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED). More...
 
virtual StatusCode terminate ()
 Initialization (from CONFIGURED to OFFLINE). More...
 
virtual Gaudi::StateMachine::State FSMState () const
 Get the current state. More...
 
virtual Gaudi::StateMachine::State targetFSMState () const
 When we are in the middle of a transition, get the state where the transition is leading us. More...
 
virtual StatusCode reinitialize ()
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More...
 
virtual StatusCode restart ()
 Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
 
virtual StatusCode sysInitialize ()
 Initialize Service. More...
 
virtual StatusCode sysStart ()
 Initialize Service. More...
 
virtual StatusCode sysStop ()
 Initialize Service. More...
 
virtual StatusCode sysFinalize ()
 Finalize Service. More...
 
virtual StatusCode sysReinitialize ()
 Re-initialize the Service. More...
 
virtual StatusCode sysRestart ()
 Re-initialize the Service. More...
 
virtual StatusCode setProperty (const Property &p)
 Set the property by property. More...
 
virtual StatusCode setProperty (const std::string &s)
 Set the property by string. More...
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Set the property by std::string. More...
 
virtual StatusCode getProperty (Property *p) const
 Get the property by property. More...
 
virtual const PropertygetProperty (const std::string &name) const
 Get the property by name. More...
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Get the property by std::string. More...
 
virtual const std::vector
< Property * > & 
getProperties () const
 Get list of properties. More...
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
 Service (const std::string &name, ISvcLocator *svcloc)
 Standard Constructor. More...
 
SmartIF< ISvcLocator > & serviceLocator () const
 Retrieve pointer to service locator. More...
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified for the job. More...
 
template<class T >
StatusCode service (const std::string &name, const T *&psvc, bool createIf=true) const
 Access a service by name, creating it if it doesn't already exist. More...
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 
template<class T >
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist. More...
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property. More...
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties. More...
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
- Public Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
 CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3)
 Templated constructor with 3 arguments. More...
 
 CommonMessaging (const A1 &a1, const A2 &a2)
 Templated constructor with 2 arguments. More...
 
 CommonMessaging (const A1 &a1)
 Templated constructor with 1 argument. More...
 
 CommonMessaging ()
 Default constructor. More...
 
virtual ~CommonMessaging ()
 Virtual destructor. More...
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
- Public Member Functions inherited from extend_interfaces3< IService, IProperty, IStateful >
virtual ~extend_interfaces3 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IService
 DeclareInterfaceID (IService, 3, 0)
 InterfaceID. More...
 
virtual ~IService ()
 virtual destructor More...
 
- Public Member Functions inherited from INamedInterface
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID. More...
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes). More...
 
- Public Member Functions inherited from IInterface
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IProperty
 DeclareInterfaceID (IProperty, 2, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from IStateful
 DeclareInterfaceID (IStateful, 1, 0)
 InterfaceID. More...
 
virtual ~IStateful ()
 
- Public Member Functions inherited from extend_interfaces1< IParticlePropertySvc >
virtual ~extend_interfaces1 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IParticlePropertySvc
 DeclareInterfaceID (IParticlePropertySvc, 3, 0)
 InterfaceID. More...
 
virtual ~IParticlePropertySvc ()
 virtual destructor More...
 

Protected Member Functions

const ParticlePropertyanti (const ParticleProperty *pp) const
 helper (protected) function to find an antiparticle for the given particle ID (StdHepID) More...
 
StatusCode setAntiParticles ()
 helper (protected) function to set the valid particle<–>antiparticle relations More...
 
StatusCode rebuild ()
 rebuild "the linear container" from the map More...
 
StatusCode erase (const ParticleProperty *pp)
 remove particle property from all maps More...
 
StatusCode parse (const std::string &file)
 parse the file More...
 
StatusCode parse ()
 Parses the file and fill all the maps. More...
 
StatusCode addParticles ()
 
bool diff (const ParticleProperty *o, const ParticleProperty *n, const MSG::Level l=MSG::DEBUG) const
 
- Protected Member Functions inherited from Service
virtual ~Service ()
 Standard Destructor. More...
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Private Types

typedef std::vector< std::string > Files
 
typedef std::vector< std::string > Particles
 

Private Attributes

std::string m_filename
 Filename of the particle properties file. More...
 
Files m_other
 additional file names More...
 
Particles m_particles
 
VectPP m_vectpp
 Vector of all particle properties. More...
 
MapID m_idmap
 Map for geant IDs. More...
 
MapName m_namemap
 Map for particle names. More...
 
MapStdHepID m_stdhepidmap
 Map for StdHep Ids. More...
 
MapPythiaID m_pythiaidmap
 Map for Pythia Ids. More...
 
Set m_owned
 
std::set< std::string > m_replaced
 
IFileAccessm_fileAccess
 

Additional Inherited Members

- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 
- Protected Attributes inherited from Service
IntegerProperty m_outputLevel
 Service output level. More...
 
Gaudi::StateMachine::State m_state
 Service state. More...
 
Gaudi::StateMachine::State m_targetState
 Service state. More...
 
- Protected Attributes inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
SmartIF< IMessageSvcm_msgsvc
 Pointer to the message service;. More...
 
std::auto_ptr< MsgStreamm_msgStream
 The predefined message stream. More...
 
bool m_streamWithService
 Flag to create a new MsgStream if it was created without the message service. More...
 

Detailed Description

This service provides access to particle properties.

The settable property of this service is the ParticlePropertiesFile, an ASCII file containing the list of properties for the particles. The default file is: "$PARAMFILESROOT/data/ParticleTable.txt" or if $PARAMFILESROOT is not defined "ParticleTable.txt"

Author
Iain Last
Gloria Corti 8/11/1999 change default file from $CDF/particle.cdf to $LHCBDBASE/cdf/particle.cdf on Unix and use environment variable also on WinNT Also introduce finding of particle by StdHepID
Vanya BELYAEV
Date
2006-09-22 1) Modified to add possibility to redefine properties of existing particles and to read additional files. New property "OtherFiles" (default is empty vector) is introduces. Service parsed additional files after the main one.
// read additional properties
ParticlePropertySvc.OtherFiles = {
"$SOMELOCATION1/file1.txt" ,
"$SOMELOCATION2/file2.txt"
} ;

2) Add possibility to modify only certain particles through the new property "Particles" (default is empty list), Each line is interpreted as a line in particle data table, e.g.

// redefine the properties of H_20 and H_30 particles:
ParticlePropertySvc.Particles = {
"H_20 88 35 0.0 120.0 9.4e-26 Higgs'0 35 0.0e+00" ,
"H_30 89 36 0.0 40.0 1.0e-12 A0 36 0.0e+00"
} ;

The replaces/modified particles are reported.

Definition at line 71 of file ParticlePropertySvc.h.

Member Typedef Documentation

typedef IParticlePropertySvc::const_iterator Gaudi::ParticlePropertySvc::const_iterator

Definition at line 81 of file ParticlePropertySvc.h.

typedef std::vector<std::string> Gaudi::ParticlePropertySvc::Files
private

Definition at line 182 of file ParticlePropertySvc.h.

typedef IParticlePropertySvc::iterator Gaudi::ParticlePropertySvc::iterator

Definition at line 82 of file ParticlePropertySvc.h.

typedef std::map< int, mapped_type > Gaudi::ParticlePropertySvc::MapID

Definition at line 76 of file ParticlePropertySvc.h.

typedef std::map< std::string, mapped_type > Gaudi::ParticlePropertySvc::MapName

Definition at line 77 of file ParticlePropertySvc.h.

typedef ParticleProperty* Gaudi::ParticlePropertySvc::mapped_type

Definition at line 75 of file ParticlePropertySvc.h.

typedef std::map< int, mapped_type > Gaudi::ParticlePropertySvc::MapPythiaID

Definition at line 79 of file ParticlePropertySvc.h.

typedef std::map< int, mapped_type > Gaudi::ParticlePropertySvc::MapStdHepID

Definition at line 78 of file ParticlePropertySvc.h.

typedef std::vector<std::string> Gaudi::ParticlePropertySvc::Particles
private

Definition at line 183 of file ParticlePropertySvc.h.

typedef std::set<ParticleProperty*> Gaudi::ParticlePropertySvc::Set

Definition at line 83 of file ParticlePropertySvc.h.

typedef IParticlePropertySvc::VectPP Gaudi::ParticlePropertySvc::VectPP

Definition at line 80 of file ParticlePropertySvc.h.

Constructor & Destructor Documentation

Gaudi::ParticlePropertySvc::ParticlePropertySvc ( const std::string &  name,
ISvcLocator svc 
)

Standard Constructor.

Parameters
nameString with service name
svcPointer to service locator interface
Todo:
: remove reference to LHCb-specific environment variable

Definition at line 44 of file ParticlePropertySvc.cpp.

46  : base_class( name, svc )
47  // the default name of input data file
48  , m_filename ( "ParticleTable.txt" )
49  , m_other ()
50  , m_particles ()
51  // storages :
52  , m_vectpp ()
53  , m_idmap ()
54  , m_namemap ()
55  , m_stdhepidmap()
56  , m_pythiaidmap()
57  //
58  , m_owned ()
59  , m_replaced ()
60  , m_fileAccess (0)
61 {
63  // Redefine the default name:
64  if( System::getEnv("PARAMFILESROOT", m_filename) )
65  {
66  m_filename += "/data/ParticleTable.txt";
67  }
68  //
69  declareProperty ( "ParticlePropertiesFile" , m_filename ) ;
70  declareProperty ( "OtherFiles" , m_other ) ;
71  declareProperty ( "Particles" , m_particles ) ;
72 }
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)
Definition: System.cpp:608
MapName m_namemap
Map for particle names.
Files m_other
additional file names
extends1 base_class
Typedef to this class.
Definition: extends.h:12
std::set< std::string > m_replaced
std::string m_filename
Filename of the particle properties file.
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
MapStdHepID m_stdhepidmap
Map for StdHep Ids.
MapID m_idmap
Map for geant IDs.
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Service.h:209
VectPP m_vectpp
Vector of all particle properties.
MapPythiaID m_pythiaidmap
Map for Pythia Ids.
Gaudi::ParticlePropertySvc::~ParticlePropertySvc ( )
virtual

Destructor.

destructor

Definition at line 76 of file ParticlePropertySvc.cpp.

77 {
78  for ( Set::iterator i = m_owned.begin(); i != m_owned.end() ; ++i )
79  { if ( 0 != *i ) { delete *i ; } }
80 }
list i
Definition: ana.py:128

Member Function Documentation

StatusCode Gaudi::ParticlePropertySvc::addParticles ( )
protected

Definition at line 479 of file ParticlePropertySvc.cpp.

480 {
481 
482  MsgStream log ( msgSvc() , name() ) ;
483  // loop over all "explicit" particles
484  for ( Particles::const_iterator ip = m_particles.begin() ;
485  m_particles.end() != ip ; ++ip )
486  {
487  const std::string item = *ip ;
488  std::istringstream input( item ) ;
489  // get the name
490  std::string p_name ;
491  int p_geant ;
492  int p_jetset ;
493  double p_charge ;
494  double p_mass ;
495  double p_ltime ;
496  std::string p_evtgen ;
497  int p_pythia ;
498  double p_maxwid ;
499  if ( input
500  >> p_name
501  >> p_geant
502  >> p_jetset
503  >> p_charge
504  >> p_mass
505  >> p_ltime
506  >> p_evtgen
507  >> p_pythia
508  >> p_maxwid )
509  {
510  log << MSG::ALWAYS
511  << " Add/Modify the particle: "
512  << " name='" << p_name << "'"
513  << " geant=" << p_geant
514  << " jetset=" << p_jetset
515  << " charge=" << p_charge
516  << " mass=" << p_mass
517  << " ltime=" << p_ltime
518  << " evtgen='" << p_evtgen << "'"
519  << " pythia=" << p_pythia
520  << " maxwid=" << p_maxwid << endmsg ;
521  //
523  ( p_name ,
524  p_geant ,
525  p_jetset ,
526  p_charge ,
527  p_mass * Gaudi::Units::GeV ,
528  p_ltime * Gaudi::Units::s ,
529  p_evtgen ,
530  p_pythia ,
531  p_maxwid * Gaudi::Units::GeV ) ;
532  if ( sc.isFailure() ) { return sc ; } // RETURN
533  }
534  else
535  {
536  log << MSG::ERROR
537  << " could not parse '" << item << "'" << endmsg ;
538  return StatusCode::FAILURE ; // RETURN
539  }
540  }
541  //
542  return StatusCode::SUCCESS ;
543 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
virtual StatusCode push_back(const std::string &particle, int geantId, int jetsetId, double charge, double mass, double tlife, const std::string &evtName, int pythiaId, double maxWidth)
Create a new particle property.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
tuple item
print s1,s2
Definition: ana.py:146
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
const ParticleProperty * Gaudi::ParticlePropertySvc::anti ( const ParticleProperty pp) const
protected

helper (protected) function to find an antiparticle for the given particle ID (StdHepID)

Helper (protected) function to find an antiparticle for the given particle ID (StdHepID)

Parameters
pppointer to particle property
Returns
pointer to antiparticle

Definition at line 415 of file ParticlePropertySvc.cpp.

416 {
417  if ( 0 == pp ) { return 0 ; }
418  const int ID = pp->pdgID() ;
419  const int antiID = -1 * ID ;
420  for ( const_iterator it = m_vectpp.begin() ; m_vectpp.end() != it ; ++it )
421  {
422  const ParticleProperty* ap = *it ;
423  if ( 0 == ap ) { continue ; } // CONTINUE
424  if ( antiID == ap->pdgID() ) { return ap ; } // RETURN
425  };
426  //
427  return pp ; // RETURN
428 }
int pdgID() const
Get the PDG (= JETSET) ID.
A trivial class to hold information about a single particle properties.
VectPP m_vectpp
Vector of all particle properties.
IParticlePropertySvc::const_iterator const_iterator
virtual const_iterator Gaudi::ParticlePropertySvc::begin ( ) const
inlinevirtual

Get a const reference to the beginning of the container.

Implements IParticlePropertySvc.

Definition at line 119 of file ParticlePropertySvc.h.

119 { return m_vectpp.begin() ; }
VectPP m_vectpp
Vector of all particle properties.
bool Gaudi::ParticlePropertySvc::diff ( const ParticleProperty o,
const ParticleProperty n,
const MSG::Level  l = MSG::DEBUG 
) const
protected

Definition at line 552 of file ParticlePropertySvc.cpp.

555 {
556  //
557  if ( o == n ) { return false ; }
558  //
559  MsgStream log ( msgSvc() , name() ) ;
560  log << l ;
561  if ( 0 == o || 0 == n )
562  {
563  log << MSG::WARNING << " ParticleProperty* point to NULL" << endmsg ;
564  return true ; // RETURN
565  }
566  //
567  bool result = false ;
568  if ( o -> particle () != n -> particle () )
569  {
570  result = true ;
571  log << " Name:'" << o -> particle () << "'/'" << n -> particle () << "'" ;
572  }
573  if ( o -> geantID () != n -> geantID () )
574  {
575  result = true ;
576  log << " G3ID:" << o -> geantID () << "/" << n -> geantID () << "'" ;
577  }
578  if ( o -> pdgID () != n -> pdgID () )
579  {
580  result = true ;
581  log << " PDGID:" << o -> pdgID () << "/" << n -> pdgID () << "'" ;
582  }
583  if ( o -> pythiaID () != n -> pythiaID () )
584  {
585  result = true ;
586  log << " PYID:" << o -> pythiaID () << "/" << n -> pythiaID () << "'" ;
587  }
588  if ( o -> charge () != n -> charge () )
589  {
590  result = true ;
591  log << " Q:" << o -> charge () << "/" << n -> charge () << "'" ;
592  }
593  if ( o -> mass () != n -> mass () )
594  {
595  result = true ;
596  log << " M:" << o -> mass () << "/" << n -> mass () << "'" ;
597  }
598  if ( o -> lifetime () != n -> lifetime () )
599  {
600  result = true ;
601  log << " T:" << o -> lifetime () << "/" << n -> lifetime () << "'" ;
602  }
603  if ( o -> evtGenName () != n -> evtGenName () )
604  {
605  result = true ;
606  log << " EvtGen:" << o -> evtGenName () << "/" << n -> evtGenName () << "'" ;
607  }
608  if ( o -> maxWidth () != n -> maxWidth () )
609  {
610  result = true ;
611  log << " WMAX:" << o -> maxWidth () << "/" << n -> maxWidth () << "'" ;
612  }
613  if ( result ) { log << endmsg ; }
614  //
615  return result ;
616 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
dictionary l
Definition: gaudirun.py:365
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
virtual const_iterator Gaudi::ParticlePropertySvc::end ( ) const
inlinevirtual

Get a const reference to the end of the container.

Implements IParticlePropertySvc.

Definition at line 121 of file ParticlePropertySvc.h.

121 { return m_vectpp.end() ; }
VectPP m_vectpp
Vector of all particle properties.
virtual StatusCode Gaudi::ParticlePropertySvc::erase ( int  geantId)
inlinevirtual

Erase a property by geant3 id.

Implements IParticlePropertySvc.

Definition at line 137 of file ParticlePropertySvc.h.

138  { return erase ( find ( geantId ) ) ; }
virtual ParticleProperty * find(int geantId)
Retrieve a property by geant3 id.
virtual StatusCode erase(int geantId)
Erase a property by geant3 id.
virtual StatusCode Gaudi::ParticlePropertySvc::erase ( const std::string &  name)
inlinevirtual

Erase a property by particle name.

Implements IParticlePropertySvc.

Definition at line 140 of file ParticlePropertySvc.h.

141  { return erase ( find ( name ) ) ; }
virtual ParticleProperty * find(int geantId)
Retrieve a property by geant3 id.
virtual StatusCode erase(int geantId)
Erase a property by geant3 id.
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
StatusCode Gaudi::ParticlePropertySvc::erase ( const ParticleProperty pp)
protected

remove particle property from all maps

Definition at line 285 of file ParticlePropertySvc.cpp.

286 {
287  if ( 0 == pp ) { return StatusCode::FAILURE ; }
288 
289  _remove_ ( m_idmap , pp ) ;
290  _remove_ ( m_namemap , pp ) ;
291  _remove_ ( m_stdhepidmap , pp ) ;
292  _remove_ ( m_pythiaidmap , pp ) ;
293  //
294  return rebuild() ;
295 }
StatusCode rebuild()
rebuild "the linear container" from the map
MapName m_namemap
Map for particle names.
MapStdHepID m_stdhepidmap
Map for StdHep Ids.
MapID m_idmap
Map for geant IDs.
MapPythiaID m_pythiaidmap
Map for Pythia Ids.
virtual StatusCode Gaudi::ParticlePropertySvc::eraseByStdHepID ( int  stdHepId)
inlinevirtual

Erase a property by StdHep id ???

Implements IParticlePropertySvc.

Definition at line 143 of file ParticlePropertySvc.h.

144  { return erase( findByStdHepID ( stdHepId ) ) ; }
virtual StatusCode erase(int geantId)
Erase a property by geant3 id.
virtual ParticleProperty * findByStdHepID(int stdHepId)
Retrieve a property by StdHep id.
StatusCode Gaudi::ParticlePropertySvc::finalize ( )
virtual

Finalise the service.

finalize

finalize the base class

Reimplemented from Service.

Definition at line 150 of file ParticlePropertySvc.cpp.

151 {
152  if ( !m_other.empty() )
153  {
154  MsgStream log( msgSvc() , name() ) ;
155  log << MSG::INFO
156  << "Additional Properties have been read from files: "
158  << endmsg ;
159  }
160 
161  if ( !m_replaced.empty() )
162  {
163  MsgStream log( msgSvc() , name() ) ;
164  log << MSG::ALWAYS
165  << "Properties have been redefined for "
166  << m_replaced.size() << " particles : "
168  << endmsg ;
169  }
170 
171  if (m_fileAccess) {
173  m_fileAccess = 0;
174  }
175 
177  return Service::finalize () ;
178 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:367
Files m_other
additional file names
std::set< std::string > m_replaced
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
virtual unsigned long release()=0
Release Interface instance.
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).
Definition: Service.cpp:199
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
virtual ParticleProperty* Gaudi::ParticlePropertySvc::find ( int  geantId)
inlinevirtual

Retrieve a property by geant3 id.

Implements IParticlePropertySvc.

Definition at line 125 of file ParticlePropertySvc.h.

126  { return m_idmap[ geantId ] ; }
MapID m_idmap
Map for geant IDs.
virtual ParticleProperty* Gaudi::ParticlePropertySvc::find ( const std::string &  name)
inlinevirtual

Retrieve a property by particle name.

Implements IParticlePropertySvc.

Definition at line 128 of file ParticlePropertySvc.h.

129  { return m_namemap[ name ] ; }
MapName m_namemap
Map for particle names.
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
virtual ParticleProperty* Gaudi::ParticlePropertySvc::findByPythiaID ( int  pythiaID)
inlinevirtual

Retrieve a property by Pythia id.

Implements IParticlePropertySvc.

Definition at line 134 of file ParticlePropertySvc.h.

135  { return m_pythiaidmap[ pythiaID ]; }
MapPythiaID m_pythiaidmap
Map for Pythia Ids.
virtual ParticleProperty* Gaudi::ParticlePropertySvc::findByStdHepID ( int  stdHepId)
inlinevirtual

Retrieve a property by StdHep id.

Implements IParticlePropertySvc.

Definition at line 131 of file ParticlePropertySvc.h.

132  { return m_stdhepidmap[ stdHepId ] ; }
MapStdHepID m_stdhepidmap
Map for StdHep Ids.
StatusCode Gaudi::ParticlePropertySvc::initialize ( )
virtual

Initialise the service.

initialize the service and setProperties

Reimplemented from Service.

Definition at line 84 of file ParticlePropertySvc.cpp.

85 {
87  if ( sc.isFailure() ) { return sc ; }
88 
89  MsgStream log( msgSvc() , name() ) ;
90 
91  sc = setProperties();
92  if ( sc.isFailure() )
93  {
94  log << MSG::ERROR << " Could not set the properties " << endmsg ;
95  return sc ;
96  }
97 
98 
99  sc = service("VFSSvc",m_fileAccess);
100  if ( sc.isFailure() )
101  {
102  log << MSG::ERROR << " Cannot retrieve the VFS service " << endmsg ;
103  return sc ;
104  }
105 
106  sc = parse();
107  if ( sc.isFailure() )
108  {
109  log << MSG::ERROR << " Could not parse the file " << endmsg ;
110  return sc ;
111  }
112  if ( !m_particles.empty() )
113  {
114  sc = addParticles () ;
115  if ( sc.isFailure() )
116  {
117  log << MSG::ERROR << " Could not treat particles! " << endmsg ;
118  return sc ;
119  }
120  }
121  log << MSG::DEBUG << "ParticleProperties parsed successfully" << endmsg;
122 
123  log << MSG::DEBUG << "Access properties" << endmsg;
124  // For debugging purposes print out the size of the internal maps
125  // particle name as key: all particles in database are present here
126  log << MSG::DEBUG << "NameMap size =" << m_namemap.size() << endmsg;
127  // Geant3 ID as key: all particles in database are present here
128  log << MSG::DEBUG << "GeantID Map size =" << m_idmap.size() << endmsg;
129  // StdHep ID as key: some particles have no valid StdHep ID
130  log << MSG::DEBUG << "StdHepID Map size =" << m_stdhepidmap.size()
131  << endmsg;
132  // Pythia ID as key: some particles are not defined in Pythia
133  log << MSG::DEBUG << "PythiaID Map size =" << m_pythiaidmap.size()
134  << endmsg;
135 
136  if ( !m_replaced.empty() )
137  {
138  log << MSG::INFO
139  << "Properties have been redefined for "
140  << m_replaced.size() << " particles : "
142  << endmsg ;
143  }
144 
145  return StatusCode::SUCCESS ;
146 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:367
MapName m_namemap
Map for particle names.
StatusCode parse()
Parses the file and fill all the maps.
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
std::set< std::string > m_replaced
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
StatusCode setProperties()
Method for setting declared properties to the values specified for the job.
Definition: Service.cpp:371
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
MapStdHepID m_stdhepidmap
Map for StdHep Ids.
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
Definition: Service.cpp:74
MapID m_idmap
Map for geant IDs.
StatusCode service(const std::string &name, const T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: Service.h:140
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
MapPythiaID m_pythiaidmap
Map for Pythia Ids.
StatusCode Gaudi::ParticlePropertySvc::parse ( const std::string &  file)
protected

parse the file

Todo:
: This PPS should be removed from Gaudi, if not, the parser must be improved

Definition at line 328 of file ParticlePropertySvc.cpp.

329 {
331 
332  MsgStream log( msgSvc(), name() );
333  char line[ 255 ];
334 
335  std::auto_ptr<std::istream> infileptr;
336  if (m_fileAccess) infileptr = m_fileAccess->open(file);
337 
338  if ( infileptr.get() == 0 )
339  {
340  log << MSG::ERROR << "Unable to open properties file : " << file
341  << endmsg;
342  return StatusCode::FAILURE ;
343  }
344 
345  std::istream &infile = *infileptr;
346  sc = StatusCode::SUCCESS;
347  log << MSG::INFO
348  << "Opened particle properties file : " << file << endmsg;
349 
350  while( infile )
351  {
352  // parse each line of the file (comment lines begin with # in the cdf
353  // file,
354  infile.getline( line, 255 );
355 
356  if ( line[0] == '#' ) continue;
357 
359 #ifdef WIN32
360 // Disable warning
361 // C4996: 'strtok': This function or variable may be unsafe.
362 #pragma warning(disable:4996)
363 #endif
364  std::string par, gid, jid, chg, mas, lif, evt, pyt, mwi ;
365  char* token = strtok( line, " " );
366  if ( token ) { par = token; token = strtok( NULL, " " );} else continue;
367  if ( token ) { gid = token; token = strtok( NULL, " " );} else continue;
368  if ( token ) { jid = token; token = strtok( NULL, " " );} else continue;
369  if ( token ) { chg = token; token = strtok( NULL, " " );} else continue;
370  if ( token ) { mas = token; token = strtok( NULL, " " );} else continue;
371  if ( token ) { lif = token; token = strtok( NULL, " " );} else continue;
372  if ( token ) { evt = token; token = strtok( NULL, " " );} else continue;
373  if ( token ) { pyt = token; token = strtok( NULL, " " );} else continue;
374  if ( token ) { mwi = token; token = strtok( NULL, " " );} else continue;
375  if ( token != NULL ) continue;
376 
377  // In SICb cdf file mass and lifetime units are GeV and sec, specify it so
378  // that they are converted to Gaudi units (MeV and ns)
379  double mass = atof( mas.c_str() ) * Gaudi::Units::GeV;
380  double tlife = atof( lif.c_str() ) * Gaudi::Units::s;
381  long ljid = atoi( jid.c_str() );
382  long lgid = atoi( gid.c_str() );
383  long lpyt = atoi( pyt.c_str() ) ;
384  double mW = atof( mwi.c_str() ) * Gaudi::Units::GeV ;
385 
386  // Change the particles that do not correspond to a pdg number
387  if ( ljid == 0 ) {
388  ljid = 10000000*lgid;
389  }
390 
391  // add a particle property
392  sc = push_back( par, lgid, ljid,
393  atof( chg.c_str() ), mass, tlife, evt, lpyt, mW ) ;
394  if ( sc.isFailure() )
395  {
396  log << MSG::ERROR
397  << "Error from ParticlePropertySvc::push_back for particle='"
398  << par << "'" << endmsg ;
399  }
400 
401  }
402 
403  //infile.close();
404 
405  return StatusCode::SUCCESS ;
406 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
virtual StatusCode push_back(const std::string &particle, int geantId, int jetsetId, double charge, double mass, double tlife, const std::string &evtName, int pythiaId, double maxWidth)
Create a new particle property.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
list file
Definition: ana.py:160
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
virtual std::auto_ptr< std::istream > open(const std::string &url)=0
Find the URL and returns an auto_ptr to an input stream interface of an object that can be used to re...
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
int line
Definition: ana.py:50
StatusCode Gaudi::ParticlePropertySvc::parse ( )
protected

Parses the file and fill all the maps.

Definition at line 299 of file ParticlePropertySvc.cpp.

300 {
301 
302  // parse "the main" file
303  StatusCode sc = parse ( m_filename ) ;
304  if ( sc.isFailure() ) { return sc ; }
305 
306  // parse "other" files
307  for ( Files::const_iterator file = m_other.begin() ;
308  m_other.end() != file ; ++file )
309  {
310  sc = parse ( *file ) ;
311  if ( sc.isFailure() ) { return sc ; }
312  }
313 
314  // Now check that the file format was consistent with what parser
315  // expected
316  if ( m_namemap.size() == 0 )
317  {
318  MsgStream log( msgSvc(), name() );
319  log << MSG::ERROR
320  << "Format of input file inconsistent with what expected"
321  << " - Check you are using ParticleData.txt" << endmsg;
322  return StatusCode::FAILURE;
323  }
324 
325  return sc;
326 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
MapName m_namemap
Map for particle names.
StatusCode parse()
Parses the file and fill all the maps.
Files m_other
additional file names
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
std::string m_filename
Filename of the particle properties file.
list file
Definition: ana.py:160
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode Gaudi::ParticlePropertySvc::push_back ( const std::string &  particle,
int  geantId,
int  jetsetId,
double  charge,
double  mass,
double  tlife,
const std::string &  evtName,
int  pythiaId,
double  maxWidth 
)
virtual

Create a new particle property.

Create a particle property and insert it in the maps.

Attention
ParticlePropertySvc IS the owner if this property! String name of the particle.
Parameters
geantIdGeant3 ID of the particle.
jetsetIdJetset ID of the particle.
chargeParticle charge (/e).
massParticle mass (GeV).
tlifeParticle lifetime (s).
evtNameString name of the particle in EvtGen.
pythiaIdPythia ID of the particle.
Returns
StatusCode - SUCCESS if the particle property was added.

Implements IParticlePropertySvc.

Definition at line 183 of file ParticlePropertySvc.cpp.

192 {
194  ( particle , geantId , jetsetId ,
195  charge , mass , tlife ,
196  evtName , pythiaId , maxWidth ) ;
197  //
198  m_owned.insert ( pp ) ;
199  //
200  return push_back( pp );
201 }
A trivial class to hold information about a single particle properties.
virtual StatusCode push_back(const std::string &particle, int geantId, int jetsetId, double charge, double mass, double tlife, const std::string &evtName, int pythiaId, double maxWidth)
Create a new particle property.
StatusCode Gaudi::ParticlePropertySvc::push_back ( ParticleProperty pp)
virtual

Add a new particle property.

Add a particle property.

Attention
ParticlePropertySvc is not the owner of this property!
Parameters
pp,aparticle property class.
Returns
StatusCode - SUCCESS if the particle property was added.

Implements IParticlePropertySvc.

Definition at line 205 of file ParticlePropertySvc.cpp.

206 {
207  if ( 0 == pp ) { return StatusCode::FAILURE ; }
208  //
209  { // try to add into Geant(3)ID map
210  const int ID = pp->geantID() ;
211  // is this already in the map?
212  MapID::const_iterator ifind = m_idmap.find( ID ) ;
213  if ( m_idmap.end() != ifind && 0 != m_idmap[ ID ])
214  {
215  diff ( ifind->second , pp ) ;
216  m_replaced.insert( m_idmap[ ID ]->particle() ) ;
217  }
218  // put it into the map
219  m_idmap[ ID ] = pp ;
220  }
221  //
222  { // try to add into Name map
223  const std::string& particle = pp->particle() ;
224  // is this already in the map?
225  MapName::const_iterator ifind = m_namemap.find( particle ) ;
226  if ( m_namemap.end() != ifind && 0 != m_namemap[ particle ] )
227  {
228  diff ( ifind->second , pp ) ;
229  m_replaced.insert( m_namemap[ particle ]->particle() ) ;
230  }
231  // put it into the map
232  m_namemap[ particle ] = pp ;
233  }
234  //
235  // add to StdHep map only if StdHep ID different from zero and if
236  // not Cerenkov (StdHep ID = gamma)
237  if ( 0 != pp->jetsetID() && "Tcherenkov" != pp->particle() )
238  { // try to add into StdHepID map
239  const int ID = pp->jetsetID() ;
240  // is this already in the map?
241  MapStdHepID::const_iterator ifind = m_stdhepidmap.find( ID ) ;
242  if ( m_stdhepidmap.end() != ifind && 0 != m_stdhepidmap[ ID ])
243  {
244  diff ( ifind->second , pp ) ;
245  m_replaced.insert( m_stdhepidmap[ ID ]->particle() ) ;
246  }
247  // put it into the map
248  m_stdhepidmap[ ID ] = pp ;
249  }
250  //
251  // add to Pythia map only if Pythia ID is different from
252  // zero ( StdHep id is always different from zero in this case )
253  if ( 0 != pp->pythiaID() &&
254  0 != pp->jetsetID() &&
255  "Tcherenkov" != pp->particle() )
256  { // try to add into PythiaID map
257  const int ID = pp->pythiaID() ;
258  // is this already in the map?
259  MapPythiaID::const_iterator ifind = m_pythiaidmap.find( ID ) ;
260  if ( m_pythiaidmap.end() != ifind && 0 != m_pythiaidmap[ ID ])
261  {
262  diff ( ifind->second , pp ) ;
263  m_replaced.insert( m_pythiaidmap[ ID ]->particle() ) ;
264  }
265  // put it into the map
266  m_pythiaidmap[ ID ] = pp ;
267  }
268  //
269  return rebuild() ;
270 }
StatusCode rebuild()
rebuild "the linear container" from the map
int geantID() const
Get the GEANT3 ID.
MapName m_namemap
Map for particle names.
std::set< std::string > m_replaced
int jetsetID() const
Get the JETSET(StdHep) ID.
MapStdHepID m_stdhepidmap
Map for StdHep Ids.
bool diff(const ParticleProperty *o, const ParticleProperty *n, const MSG::Level l=MSG::DEBUG) const
MapID m_idmap
Map for geant IDs.
const std::string & particle() const
Get the particle name.
int pythiaID() const
Get the Pythia ID.
MapPythiaID m_pythiaidmap
Map for Pythia Ids.
StatusCode Gaudi::ParticlePropertySvc::rebuild ( )
protected

rebuild "the linear container" from the map

Definition at line 461 of file ParticlePropertySvc.cpp.

462 {
463  Set local ;
464  m_vectpp.clear() ;
465  m_vectpp.reserve ( m_idmap.size() + 100 ) ;
466  // load information from maps into the set
467  _load_ ( m_idmap , local ) ;
468  _load_ ( m_namemap , local ) ;
469  _load_ ( m_stdhepidmap , local ) ;
470  _load_ ( m_pythiaidmap , local ) ;
471  // load information from set to the linear container vector
472  for ( Set::iterator i = local.begin() ; local.end() != i ; ++i )
473  { m_vectpp.push_back ( *i ) ; }
474  return setAntiParticles() ;
475 }
MapName m_namemap
Map for particle names.
MapStdHepID m_stdhepidmap
Map for StdHep Ids.
std::set< ParticleProperty * > Set
MapID m_idmap
Map for geant IDs.
StatusCode setAntiParticles()
helper (protected) function to set the valid particle<–>antiparticle relations
VectPP m_vectpp
Vector of all particle properties.
list i
Definition: ana.py:128
MapPythiaID m_pythiaidmap
Map for Pythia Ids.
StatusCode Gaudi::ParticlePropertySvc::setAntiParticles ( )
protected

helper (protected) function to set the valid particle<–>antiparticle relations

Returns
status code

Definition at line 435 of file ParticlePropertySvc.cpp.

436 {
437  // initialize particle<-->antiParticle relations
438  for ( iterator ip = m_vectpp.begin() ; m_vectpp.end() != ip ; ++ip )
439  {
440  ParticleProperty* pp = *ip ;
441  if ( 0 == pp ) { continue ; } // CONTINUE
442  const ParticleProperty* ap = anti ( pp ) ;
443  if ( 0 != ap ) { pp->setAntiParticle( ap ) ; }
444  }
445  return StatusCode::SUCCESS ;
446 }
A trivial class to hold information about a single particle properties.
const ParticleProperty * anti(const ParticleProperty *pp) const
helper (protected) function to find an antiparticle for the given particle ID (StdHepID) ...
void setAntiParticle(const ParticleProperty *p)
set the pointer to the antiparticle
VectPP m_vectpp
Vector of all particle properties.
IParticlePropertySvc::iterator iterator
virtual int Gaudi::ParticlePropertySvc::size ( ) const
inlinevirtual

Get the container size.

Implements IParticlePropertySvc.

Definition at line 123 of file ParticlePropertySvc.h.

123 { return m_vectpp.size() ; };
VectPP m_vectpp
Vector of all particle properties.

Member Data Documentation

IFileAccess* Gaudi::ParticlePropertySvc::m_fileAccess
private

Definition at line 200 of file ParticlePropertySvc.h.

std::string Gaudi::ParticlePropertySvc::m_filename
private

Filename of the particle properties file.

Definition at line 185 of file ParticlePropertySvc.h.

MapID Gaudi::ParticlePropertySvc::m_idmap
private

Map for geant IDs.

Definition at line 191 of file ParticlePropertySvc.h.

MapName Gaudi::ParticlePropertySvc::m_namemap
private

Map for particle names.

Definition at line 192 of file ParticlePropertySvc.h.

Files Gaudi::ParticlePropertySvc::m_other
private

additional file names

Definition at line 186 of file ParticlePropertySvc.h.

Set Gaudi::ParticlePropertySvc::m_owned
private

Definition at line 197 of file ParticlePropertySvc.h.

Particles Gaudi::ParticlePropertySvc::m_particles
private

Definition at line 188 of file ParticlePropertySvc.h.

MapPythiaID Gaudi::ParticlePropertySvc::m_pythiaidmap
private

Map for Pythia Ids.

Definition at line 194 of file ParticlePropertySvc.h.

std::set<std::string> Gaudi::ParticlePropertySvc::m_replaced
private

Definition at line 198 of file ParticlePropertySvc.h.

MapStdHepID Gaudi::ParticlePropertySvc::m_stdhepidmap
private

Map for StdHep Ids.

Definition at line 193 of file ParticlePropertySvc.h.

VectPP Gaudi::ParticlePropertySvc::m_vectpp
private

Vector of all particle properties.

Definition at line 190 of file ParticlePropertySvc.h.


The documentation for this class was generated from the following files: