HannaPlusPlusModuleGuidelines
Zur Navigation springen
Zur Suche springen
Page maintainer: Andreas
| This page is not yet ready for use or review. It is assigned to Andreas. The page isn't being edited right this minute, so feel free to add any information you have about this subject. |
The following are a few guidelines to keep in mind when developing analysis modules for Hanna++. If you want your module to be useable by other analyzers, try to follow them:
- For new event selection modules (derived from uDSTVEventSelect) always provide a corresponding info class (derived from uDSTVEventInfo).
- If you are not happy with the implementation of an existing event selection module, implement your logic in a derived class.
- Use the same info class as the one used by the base class
- Try to use the cuts provided by the base class in the same way. Do not change the meaning of the cuts in your implementation. This way users can simply switch between different implementations without having to change the cut XML file.
- If you need additional cuts which are not provided by the base class, ask the author(s) of the base class to add them. This way one can switch between different implementations of the same task without having to modify the XML parameter files too much.
- If your analysis module depends on the output of another analysis module, do not derive your module from a module that serves a different task. Instead use daughter analysis modules. Example: For the DVCS analysis you need DIS events with exactly one charged track and exactly one untracked cluster in the calorimeter. One option would be to derive your dvcs event selection module from uDSTdisSelect (the standard DIS event selection module) and add your additional logic. However, if you want to use a different implementation of the underlying logic, you should use the DIS event selection class as a daughter module. This is not very good C++ style, but it gives certain advantages in the context of the analyses we are doing.
By using daughter analysis modules you give other potential users of your module the chance to change the type of the underlying module without having to recompile the code. - If you are using the daughter analysis module mechanism, please also provide a way to change the class name of the daughter analysis module in a simple way. The best way for this would be to pass the class name of the daughter module within the option string when creating the analysis module. Please see the constructor of uDSTdvcsSelectFS for details.