Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In order to make the PFA components as interchangeable as possible, we have adopted some conventions. These were discussed at the January 2005 Boulder simulation workshop. They will probably evolve slowly over time.

  • PFAs should be structured as a series of Drivers Drivers. This way, components can be swapped in and out easily.
  • When PFA Drivers need to communicate with each other, they should do it by storing objects or collections of objects in the event via the put() and get() methods.
  • Groups of hits should be stored as Map<Long,CalorimeterHit> (referred to as a "hitmap"). Each entry corresponds to one hit, giving the CellID and the hit itself.
  • Often, a Driver takes a hitmap as input, performs some operation on it, and produces a modified version of the hitmap as part of the output. The output hitmap should be a new, separate object (i.e. the original hitmap should be left unchanged at the end). Example code to read in and write out hitmaps is given below.
  • Clusters should be stored in the event as List<Cluster>.

...

Here are some example code snippets showing how to combine drivers to produce a PFA. These are written to be read by people rather than compilers, so they may need extra tweaks to run in practice. If you know of other patterns, or if you see that these examples have become out of date, please update them.

A very trivial PFA

See http://source.freehep.org/jcvsweb/ilc/LCSIM/vers/lcsim/src/org/lcsim/contrib/uiowa/template/TrivialPFA.java Image Removedin CVS for a worked implementation. Some other drivers in the same directory are referenced in the code.

...

Thanks to Guilherme, we have a digitisation simulation package called DigiSim which is available under org.lcsim.digisim. There is an example driver at org.lcsim.plugin.web.examples.DigiSimExample (source at: http://source.freehep.org/jcvsweb/ilc/LCSIM/vers/lcsim/src/org/lcsim/plugin/web/examples/DigiSimExample.javaImage Removed). Borrowing heavily from that, here is an example snippet showing how to use the output from DigiSim:

...

One nice feature of JAS3 is that when you open a file in org.lcsim mode, you can upload stuff to the event and have it appear in the org.lcsim Event Browser and the WIRED display (see: Displaying analysis objects with wired). But there are a few tricks to make this work:

...