| Gustaaf Brooijmans
Fermilab, MS # 357 Tel: +1 (630) 840 4269 |
Last Update:
12/07/99 by Gustaaf Brooijmans |
If you're going to write a physicsTool
-
i.e. a level 3 tool that identifies physics objects like electrons, muons,
etc.- then this episode's for you
(but all others are too)!
For many reasons, among which writing out the level 3 results and the need for a standard method to compute relational values like invariant mass, the results from physicsTools need to be "stored" in a uniform way. We have therefore developed the L3PhysicsResults base class, which contains the objects each physics object should have. The results class for a specific physicsTool should inherit from L3PhysicsResults, as has been done for example in L3TauPhysicsResults (which can be found in package l3fTauTools - versions v00-02-04 and higher).
The main class of your physics tool, by the way, will inherit from the templated class physicsTool<T> (in package l3ftoolbase), where class T is your specific L3xxxPhysicsResults (substitute your object type for xxx). See for example L3TauHadronic in package l3fTauTools.
When you create your L3xxxPhysicsResults subclass, you will have to provide methods returning the values of your class' specific attributes, as well as the default constructor and a constructor from a pointer to a class of the same type. You also have to provide an ostream operator and a Set(L3PhysData * ) method to fill the results. We have chosen to pass a pointer to L3Physdata to minimize the number of arguments, as well as allowing to exploit polymorphism in the Set method in L3ToolResults (see below). (Note: you need to implement a class L3xxxData which inherits from L3PhysData and contains the attributes specific to your object).
Now, aside from the fact that your tool's main class inherits from physicsTool<L3xxxPhysicsResults>, how is your tool supposed to interact with the results classes? This functionality is provided by the templated L3ToolResults<L3xxxPhysicsResults>class.
Basically that's it. If you follow these few prescriptions, you don't have to worry about anything related to transmitting your results anymore.
As always,
if you have problems, questions or comments, feel free to contact
me.
GB 7-Dec-99
| Main Page | Next Episode |