This page presents an attempt to use the trigger TEM diagnostic information to recognize calorimeter ghost signal.
Pass 8 Recon & Analysis Upgrades Weekly Meeting Agenda
Summary
- Code and method
- Overlay energy for tagged clusters (MonteCarlo AG)
- Efficiency with Periodic Triggers
- Effect on Flight Data IMPORTANT
- Ghost number and cluster classification
- Event display
...
- open digi, recon, merit and relation filesunmigrated-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 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 clusters (MonteCarlo AG)
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 looks 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).
...
- Johan algorithm works fine!
- Clusters with at least one ghost-tagged xtal tend to have large overlay energy.
- Only in one case the overlay energy is 0 and there is some ghost-tagged xtal (mostly connected to the energy threshold). The 'purity' of such selection is ~1.
- Efficiency is low. We can't tag a good fraction of ghost clusters in this way. (this was just the energy dependence of the efficiency, no request on min overlay energy here)
- 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 is "TagGhostNumXtals>0 && (TagGhostRawEnergySum/CalawEnergySumCalRawEnergySum)> 0.03"
- This is valid for permissive E >= 105 MeV.
- 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...
- Use in event-level analysis to select events with useless cal information (and treat them as tracker only if possible)
Efficiency with Periodic Triggers
I used the periodic triggers in the Calibration datasets (provided by Johan) to test the efficiency of a pure sample of ghosts.
The dataset used is Periodic_CalGhost, 50 files reprocessed with v19r4p1gr07 (not the latest, but the most recent in the DataCatalog ). It has a cut on Cal deposited energy > 5 MeV.
The efficiency plot is easy: number of events selected by "TagGhostNumXtals>0 && (TagGhostRawEnergySum/CalRawEnergySum)> 0.03" divided by the total number of events.
The the plots for the permissive case (left) and conservative case (right):
The max efficiency is ~84% is reached after RawEnergy ~ 3 GeV.
I checked the effect of the request of some fraction of ghost-tagged energy (if looked necessary from AG hand scan).
The scan from 0 to 3% is in the plot below:
The effect is on the high energy side (>10 GeV) and reduces the efficiency of few percents.
Effect on Flight Data
A test sample is selected in order to see the effect of tagging algorithm on real gamma-ray in flight data
I reprocessed the first 1.5M event of a single full run with a lot of Earth Limb in it: r0324551768
Digi/Recon/merit are taken from DataCatalog, so no pass8 reprocessing is applied (not important for this test).
A cut is applied to select good gamma rays:
"FswGamState==0 && TkrNumTracks > 0 && CalEnergyRaw > 5 && CalCsIRLn>4 && CTBCORE>0 && CTBBestEnergyProb>0.1 && CTBClassLevel>2 && FT1ZenithTheta>112 && FT1ZenithTheta<115"
Cal xtals are tagged with the most conservative algorithm described above: energy >120MeV and no cal_lo trigger in both xtal ends.
Top panel of plot below shows the distribution of (log10 of) deposited energy for:
all sample, events with at least 1 ghost-tagged xtal, events with at least 1 ghost-tagged xtal & > 50% of ghost-tagged energy fraction
Bottom panel of plot below shows the correlation between number of ghost-tagged xtals and ghost-tagged energy (zero suppressed)
It looks like that almost all good gamma events have at least one ghost-tagged xtal and even requiring a large ghost-tagged energy we select a large fraction of events
I also looked at a couple of events that are "ghosty" according to this algorithm:
they look like perfect gamma-ray in which also the old reconstruction works fine
Evt Id 130047 | Evt Id 333286 |
|
|
8 tagged xtals | 32 tagged xtals |
In conclusion, this algorithm cannot be applied to flight data.
Ghost number and cluster classification
...