23.05.2014 Views

Athena Developer Guide

Athena Developer Guide

Athena Developer Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Athena</strong><br />

Chapter 13 Framework services Version/Issue: 2.0.0<br />

13.5 The Particle Properties Service<br />

The Particle Property service is a utility to find information about a named particle’s Geant3 ID,<br />

Jetset/Pythia ID, Geant3 tracking type, charge, mass or lifetime. The database used by the service can<br />

be changed, but by default is the same as that used by the LHCb SICB program. Note that the units<br />

conform to the CLHEP convention, in particular MeV for masses and ns for lifetimes. Any comment to<br />

the contrary in the code is just a leftover which has been overlooked!<br />

13.5.1 Initialising and Accessing the Service<br />

This service is created by adding the following line in the Job Options file::<br />

// Create the particle properties service<br />

ApplicationMgr.ExtSvc += { "ParticlePropertySvc" };<br />

Listing 13.2 on page 96 shows how to access this service from within an algorithm.<br />

13.5.2 Service Properties<br />

The Particle Property Service currently only has one property: ParticlePropertiesFile. This<br />

string property is the name of the database file that should be used by the service to build up its list of<br />

particle properties. The default value of this property, on all platforms, is<br />

$LHCBDBASE/cdf/particle.cdf 1<br />

13.5.3 Service Interface<br />

The service implements the IParticlePropertySvc interface. In order to use it, clients must<br />

include the file GaudiKernel/IParticlePropertySvc.h.<br />

The service itself consists of one STL vector to access all of the existing particle properties, and three<br />

STL maps, one to map particles by name, one to map particles by Geant3 ID and one to map particles<br />

by stdHep ID.<br />

Although there are three maps, there is only one copy of each particle property and thus each property<br />

must have a unique particle name and a unique Geant3 ID. The third map does not contain all particles<br />

contained in the other two maps; this is because there are particles known to Geant but not to stdHep,<br />

such as Deuteron or Cerenkov. Although retrieving particles by name should be sufficient, the second<br />

and third maps are there because most often generated data stores a particle’s Geant3 ID or stdHep ID,<br />

and not the particle’s name. These maps speed up searches using the IDs.<br />

1. This is an LHCb specific file. A generic implementation will be available in a future release of <strong>Athena</strong><br />

page 107

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!