...
- open digi, recon, merit and relation files
Wiki Markup reads digi to create two arrays of layer end trigger bits \[tower\]\[layer\]\[face\] , one for CalLo and one for CalHi
- 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 aobve above 2, they're all ghosts.
- Basic version of the code: tagghosts.C
- Another version of the code, algorithm is the Johan's one, but output is a tree with number of tagged xtals and sum-of-energy of tagged xtals for the first 3 cluster tagghosts_v1.C.
Overlay energy for tagged cluster
I run the tagghosts_v1.C on the 100 AG-GR-v19r4p1gr14-OVL, and looked at the Overlay energy in the first and second cluster vs. the ghost-tagged energy.
The selection is just trigger and filter and CalNumClusters>0. I also required that there is at least 1 tagged xtals, if there are no such xtlas there is nothing to say.
Few details on the algorithm:
- There are two tagging options: conservative (if both xtal ends are ghost-like) and permissive (if at least one xtal end is ghost-like).
- I used 'permissive' since purity is high and efficiency is low (see below).
- The energy threshold for tagging a xtal end is set to 120 MeV (no good reason for this number, need to be optimized).
Here the plots for first and second cluster.
My conclusions are:
- Johan algorithm works fine!
- Clusters with at least one ghost-tagged xtal tend to have large overlay energy.
- It never happen that overlay energy is 0 and there is some ghost-tagged xtal. The 'purity' of such selection is ~1.
- Efficiency is low. We can't tag a good fraction of ghost clusters in this way.
- There are few events with low overlay energy and low ghost-tagged energy. After looking at event displays I think we can consider good cluster is the ghost-tagged energy is <~3%
- My suggestion for ghost tagging ghost clusters in "TagGhostNumXtals>0 && (TagGhostRawEnergySum/CalawEnergySum)> 0.03"
- We can include this algorithm just after clustering, and then tag ghost clusters. Not sure how we should use this info:
- Select best cluster only if non ghost-tagged - what happen if the best cluster is also a ghost (i.e. there are no other options?)?
- Use this info in tracking ( e.g. knowing that the direction is likely to be wrong). Need Tracy here...
Ghost number and cluster classification
...