Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

No Format
aida.cloud2D(meta.getName()+" layer "+layer+" x vs y").fill(pos[0], pos[1]);

Wiki MarkupThis one line contains a lot of functionality, so merits some extra attention.
First, a cloud2D is a two-dimensional tuple. The cloud2D method of the AIDA object takes a string which is the title. We construct the title from the name of the tracker collection (obtained from the metadata via its getName() method) and add the layer number as well. For example, we might end up with a tuple titled *"TkrBarrHits layer 0 x vs y"* for the x,y hit position of SimTrackerHits on layer 0 of the collection TkrBarrHits. If this cloud does not already exist, it will be created, else the instance is returned. We then fill the tuple with the cloud2D fill() method, where pos\[0\] and pos\[1\] are understood to be the x and y position, respectively.

Here is an example plot showing the x vs y hit position for layer 0 of a silicon strip barrel detector:

Not too exciting, but now you know how to access the tracker hit information in an event.