...
- open digi, recon, merit and relation files
reads digi to create two arrays of layer end trigger bits \ [tower\]\[layer\]\[face\] , one for CalLo and one for CalHiWiki Markup - open recon and loop on clusters, then for each cluter
- open the corresponding crystal collection
- check if any crystal end has more than 100 MeV (or whatever other threshold)
- if any, then look if the corresponding layer end has a trigger bit set
- if not so, fill in a map of missing trigger bits and add 1 to a so called "cal ghost number"
- for each cluster, the higher the ghost number, the higher the probability that it's a ghost... but it looks like that above 2, they're all ghosts.
...
In conclusion, this algorithm cannot be applied as is to flight data.
Ghost number and cluster classification
...