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> Chapter 14 Tools and ToolSvc Version/Issue: 2.0.0<br />

information is stored. For some specific Associators, in addition, it can depend on some algorithmic<br />

choices: consider as an example a physics analysis particle and a possible originating Monte Carlo<br />

particle where the associating discriminant could be the fractional number of hits used in the<br />

reconstruction of the tracks. An advantage of this approach is that the implementation of the navigation<br />

can be modified without affecting the reconstruction and analysis algorithms because it would affect<br />

only the associators. In addition short-cuts or complete navigational information can be provided to the<br />

user in a transparent way. By limiting the use of such associators to dedicated monitoring algorithms<br />

where the comparison between raw/reconstructed data and MC truth is done, one could ensure that the<br />

reconstruction and analysis code treat simulated and real data in an identical way.<br />

Associators must implement a common interface called IAssociator. An Associator base class<br />

providing at the same time common functionality and some facilities to help in the implementation of<br />

concrete Associators is provided. A first version of these classes is provided in the current release of<br />

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

14.4.1.1 The IAssociator Interface<br />

As already mentioned Associators must implement the IAssociator interface.<br />

In order for Associators to be retrieved from the ToolSvc only via the IAssociator interface, the<br />

interface itself inherits from the IAlgTool interface. While the implementation of the IAlgTool<br />

interface is done in the AlgTool base class, the implementation of the IAssociator interface is the<br />

full responsibility of concrete associators.<br />

The four methods of the IAssociator interface that a concrete Associator must implement are show<br />

in Listing 14.7<br />

Listing 14.7 Methods of the IAssociator Interface that must be implemented by concrete associators<br />

1: virtual StatusCode i_retrieveDirect( ContainedObject* objFrom,<br />

ContainedObject*& objTo,<br />

const CLID idFrom,<br />

const CLID idTo ) = 0;<br />

2: virtual StatusCode i_retrieveDirect( ContainedObject* objFrom,<br />

std::vector& vObjTo,<br />

const CLID idFrom,<br />

const CLID idTo ) = 0;<br />

3: virtual StatusCode i_retrieveInverse( ContainedObject* objFrom,<br />

ContainedObject*& objTo,<br />

const CLID idFrom,<br />

const CLID idTo) = 0;<br />

4: virtual StatusCode i_retrieveInverse( ContainedObject* objFrom,<br />

std::vector& vObjTo,<br />

const CLID idFrom,<br />

const CLID idTo) = 0;<br />

page 132<br />

Two i_retrieveDirect methods must be implemented for retrieving associated classes following<br />

the same direction as the links in the data: for example from reconstructed particles to Monte Carlo<br />

particles. The first parameter is a pointer to the object for which the associated Monte Carlo

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

Saved successfully!

Ooh no, something went wrong!