Difference between revisions of "BCAL reconstruction 11/28/11"

From GlueXWiki
Jump to: navigation, search
(Single photon event sample)
(Cuts5)
 
(47 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Update==
+
==Summary==
* 1234 segmentation now an option in reconstruction code
+
* Two algorithms for BCAL reconstruction in sim-recon: KLOE algorithm (default), new algorithm (GlueX) by Matt S.
 +
* 1234 segmentation now an option in reconstruction code (for both algorithms)
 +
** 1234 now default, used for all plots on this page
 
* New algorithm comparable to or better than KLOE algorithm in most tests I tried
 
* New algorithm comparable to or better than KLOE algorithm in most tests I tried
 
** Single photon events: (much) better timing resolution, better angular resolution, same energy resolution, but more extraneous clusters
 
** Single photon events: (much) better timing resolution, better angular resolution, same energy resolution, but more extraneous clusters
** Single pi0 events: ~5% more pi0's reconstructed
+
** Single pi0 events: ~5% more pi0's reconstructed, better energy resolution
** b1pi events: slightly more pi0's reconstructed
+
** b1pi events: slightly more pi0's reconstructed, better energy resolution, slightly fewer extraneous clusters
* Will be checked in soon
+
* Issues
+
** pi0 reconstruction:
+
** better errors
+
** FCAL issues?
+
  
 
==Changes==
 
==Changes==
* More flexible DBCALGeometry allows 1234 summing (checked-in)
+
* Checked in:
* Change weighting when averaging quantities to form cluster
+
** More flexible DBCALGeometry allows 1234 summing
* Improve error estimation
+
** Change weighting when averaging quantities to form cluster
* Tune parameters
+
** Improve error estimation
* Fix various bugs
+
** Tune parameters
* Change in KLOE algorithm to min energy threshold of cluster to make the two algorithms match
+
** Fix various bugs
 +
** Change in KLOE algorithm to min energy threshold of cluster to make the two algorithms match
 +
* Not yet checked in
 +
** More changes to the way errors are calculated
 +
** Changes to clusterization
  
 
==Single photon event sample==
 
==Single photon event sample==
Line 35: Line 36:
 
'''KLOE collects more BCAL hits in a shower->less negative mean'''
 
'''KLOE collects more BCAL hits in a shower->less negative mean'''
  
Corrected energy resolution?
 
 
===Timing resolution===
 
===Timing resolution===
 +
For KLOE algorithm, shower time t is just weighted average of hit times (?).
 +
 +
For GlueX algorithm, t is time to inner radius.
 +
 +
Look at t0=t-t_travel, where t_travel is the time it takes for a photon to travel from center of target to shower position (x,y,z) (for KLOE algorithm) or to inner radius (GlueX algorithm)
 +
 +
 +
GlueX:
 +
 +
[[File:T0.svn8513.us.png]]
 +
 +
KLOE:
 +
 +
[[File:T0.svn8513.KLOE.png]]
 +
 +
'''new algorithm has much better timing resolutions'''
 +
* Mostly due to weighting average of hit times by E^2 (hit energy squared) rather than E
 +
* Averaging times at inner radius rather than at hit position doesn't make much difference
 +
 +
'''distributions above not centered at 0'''
 +
* not really sure why
  
 
===Angular resolution===
 
===Angular resolution===
 +
How well can we reconstruct shower theta (or equivalently z)?
 +
 +
GlueX:
 +
 +
[[File:Z res.svn8513.us.png]]
 +
 +
KLOE:
 +
 +
[[File:Z res.svn8513.KLOE.png]]
 +
 +
'''GlueX algorithm has better resolution'''
  
 
===Number of showers reconstructed===
 
===Number of showers reconstructed===
 +
 +
Average # of showers reconstructed:
 +
* GlueX: 1.39
 +
* KLOE: 1.05
 +
 +
'''New algorithm has more extraneous showers in the single photon sample.''' I think this is because this algorithm doesn't merge clusters that are close in phi but separated in theta. This is something that should be still be worked on, but doesn't seem urgent since this algorithm has fewer extraneous clusters in the more complicated event samples.
  
 
==Single pi0 event sample==
 
==Single pi0 event sample==
 
~64000 pi0's isolated from a bggen sample using extract_ptype_hddm plugin.
 
~64000 pi0's isolated from a bggen sample using extract_ptype_hddm plugin.
  
Again exclude any events with tracking hits.
+
Again we can use DBCALTruthShower info to include only events where the two decay photons make it to the BCAL. 33% of events meet these criteria. This excludes events with photon conversion and also excludes events where one or both of the photons end up the FCAL.
  
 
Hard to get an exact count of how many pi0's are reconstructed/reconstructable, so I tried two different methods.
 
Hard to get an exact count of how many pi0's are reconstructed/reconstructable, so I tried two different methods.
 
===Method 1===
 
===Method 1===
Use DTwoGammaFit to fit two photons to pi0 mass. The problem with this is that it relies on having correct errors, which we don't quite have yet.
+
Use DTwoGammaFit to fit all pairs of two photons to pi0 mass.
 +
 
 +
To get the correct errors, all particles are generated from the center of the target and the error on the vertex is set to 0.
 +
 
 +
Problems with this method:
 +
* it relies on having correct errors, which we don't quite have yet.
 +
* extraneous showers could produce spurious pi0 fits
  
 
Just count the number of events where there is a pi0 fit with confidence level > 10%.
 
Just count the number of events where there is a pi0 fit with confidence level > 10%.
  
* GlueX algorithm: 37163 good pi0 fits : 72% efficiency (excluding events with tracking hits)
+
* GlueX algorithm: 73% efficiency
* KLOE algorithm: 34322 good pi0 fits : 66% efficiency
+
* KLOE algorithm: 61% efficiency
 +
 
 +
GlueX algorithm has better pi0 energy resolution and angular resolution.
 +
 
 +
GlueX:
 +
 
 +
[[File:Cl.2BCALTruth.us.png]]
 +
 
 +
KlOE:
 +
 
 +
[[File:Cl.2BCALTruth.KLOE.png]]
 +
 
 +
The downward slope in the KLOE confidence level plot indicates that the errors are wrong and too few events will be accepted by the c.l. cut...
  
Energy and angular resolutions are roughly the same
 
 
===Method 2===
 
===Method 2===
 
Look at the two most energetic photons in an event. If the combined four-momentum falls "close" to the thrown pi0 four-momentum, count this a "good" reconstructed pi0.
 
Look at the two most energetic photons in an event. If the combined four-momentum falls "close" to the thrown pi0 four-momentum, count this a "good" reconstructed pi0.
  
* GlueX: 38342 good pi0's=74% efficiency
+
Problems
* KLOE: 36083 good pi0's=70% efficiency
+
* different definitions of "close" lead to different results
 +
efficiency:
 +
* GlueX: 79% efficiency
 +
* KLOE: 71% efficiency
 +
 
 +
GLuex has better angular, energy resolution
 +
 
 +
===Number of showers===
 +
For this subset of events, we should see exactly 2 BCAL Showers
 +
 
 +
GlueX:
 +
 
 +
[[File:Nshowers.2BCALTruth.us.png]]
 +
 
 +
KLOE:
 +
 
 +
[[File:Nshowers.2BCALTruth.KLOE.png]]
 +
 
 +
It's not really clear to me which algorithm is doing a better job...
 +
 
 
==b1pi event sample==
 
==b1pi event sample==
10000 b1pi events from genr8.
+
10000 b1pi events from genr8
 +
 
 +
Momentum of reconstructed photon depends on vertex, which is determined by tracking code. To avoid this complication, cheat and use the truth vertex when reconstructing photons.
  
 
Can count the number of reconstructed BCAL photons "close" to thrown photons.
 
Can count the number of reconstructed BCAL photons "close" to thrown photons.
* GlueX: 8266 "good" reconsructed BCAL photons/120
+
* GlueX: 9486 "good" reconsructed BCAL photons/12030 thrown BCAL photons=79%
* KLOE:
+
* KLOE: 9104/12030=76%
 +
 
 +
Avg. Number of BCAL showers:
 +
* GlueX: 5.8
 +
* KLOE: 6.0
 +
 
 +
Good matching pi0 (# of events that have a pi0 fit with prob>1% and "close" to the thrown pi0. Includes FCAL photons):
 +
* GlueX: 5695
 +
* KLOE: 5469
 +
 
 +
Try using DBCALTruthShower info:
 +
 
 +
Since the pi0's decay to photons prior to hdgeant, the two decay photons correspond to "primary" DBCALTruthShower's. The DBCALTruthShower corresponding to decay photons can be identified by their <tt>track</tt>.
 +
 
 +
Number of reconstructed DBCALShower's "close" (in E,z,phi) to a decay-photon-DBCALTruthShower:
 +
* GlueX: 6994/8101=86%
 +
* KLOE: 6693/8101=83%
 +
 
 +
For events with two "primary" DBCALTruthShower's from the pi0, # of events with a good reconstructed pi0 "close" to thrown pi0:
 +
* GlueX: 1195/1777=67%
 +
* KLOE: 1081/1777=61%
  
Vertex spread.
 
==334 Segmentation==
 
 
==Things==
 
==Things==
* Errors/pi0 kinfit funniness
+
* Further work on errors...
 
* Cluster overlap function tweaks -> better energy resolution
 
* Cluster overlap function tweaks -> better energy resolution
 
* Theta res distributions off-center
 
* Theta res distributions off-center
Line 78: Line 172:
 
* Extra showers at ~12 deg, low energy
 
* Extra showers at ~12 deg, low energy
 
* What is cluster rho good for?
 
* What is cluster rho good for?
 +
* Adding hits as associated objects...
 +
* FCAL issues?
 +
 +
==Cuts5==
 +
(need fancier way to determine resolutions?)
 +
===single photon===
 +
* (corrected) energy res better: .08724 vs. 09197
 +
* time res worse: 0.1605
 +
* z res worse: 2.059
 +
* nshowers better: 1.17
 +
===pi0===
 +
* method 1: slightly worse 15387
 +
* method 2: slightly worse 78%
 +
(could easily be due to
 +
nShowers distribution looks better, more 2 shower events, less 1shower events, less 3+shower events than both KLOE and GlueX
 +
===b1pi===
 +
* good photons: 8949
 +
* avg BCAL showers: 4.73
 +
* good matching pi0: 5451
 +
* E_res BCAL: .1748
 +
pi0 resolutions
 +
2truth showers info

Latest revision as of 17:02, 3 January 2012

Summary

  • Two algorithms for BCAL reconstruction in sim-recon: KLOE algorithm (default), new algorithm (GlueX) by Matt S.
  • 1234 segmentation now an option in reconstruction code (for both algorithms)
    • 1234 now default, used for all plots on this page
  • New algorithm comparable to or better than KLOE algorithm in most tests I tried
    • Single photon events: (much) better timing resolution, better angular resolution, same energy resolution, but more extraneous clusters
    • Single pi0 events: ~5% more pi0's reconstructed, better energy resolution
    • b1pi events: slightly more pi0's reconstructed, better energy resolution, slightly fewer extraneous clusters

Changes

  • Checked in:
    • More flexible DBCALGeometry allows 1234 summing
    • Change weighting when averaging quantities to form cluster
    • Improve error estimation
    • Tune parameters
    • Fix various bugs
    • Change in KLOE algorithm to min energy threshold of cluster to make the two algorithms match
  • Not yet checked in
    • More changes to the way errors are calculated
    • Changes to clusterization

Single photon event sample

  • 45000 events
    • energy uniformly distributed from .05-2.05 GeV
    • angles from 10.8-118
  • to exclude events with photon conversion, etc., only look at events with a "primary" DBCALTruthShower (81% of events)
  • all results with 1234 summing.

Efficiency

efficiency of reconstructing at least one shower with abs(phi-phi_thrown)<.06 rad: >99.5% for both algorithms.

Energy resolution

  • looking at "raw" energies of shower

energy resolution vs. thrown photon E

  • Glux: E res.svn8513.us.png
  • KLOE: E res.svn8513.KLOE.png

KLOE collects more BCAL hits in a shower->less negative mean

Timing resolution

For KLOE algorithm, shower time t is just weighted average of hit times (?).

For GlueX algorithm, t is time to inner radius.

Look at t0=t-t_travel, where t_travel is the time it takes for a photon to travel from center of target to shower position (x,y,z) (for KLOE algorithm) or to inner radius (GlueX algorithm)


GlueX:

T0.svn8513.us.png

KLOE:

T0.svn8513.KLOE.png

new algorithm has much better timing resolutions

  • Mostly due to weighting average of hit times by E^2 (hit energy squared) rather than E
  • Averaging times at inner radius rather than at hit position doesn't make much difference

distributions above not centered at 0

  • not really sure why

Angular resolution

How well can we reconstruct shower theta (or equivalently z)?

GlueX:

Z res.svn8513.us.png

KLOE:

Z res.svn8513.KLOE.png

GlueX algorithm has better resolution

Number of showers reconstructed

Average # of showers reconstructed:

  • GlueX: 1.39
  • KLOE: 1.05

New algorithm has more extraneous showers in the single photon sample. I think this is because this algorithm doesn't merge clusters that are close in phi but separated in theta. This is something that should be still be worked on, but doesn't seem urgent since this algorithm has fewer extraneous clusters in the more complicated event samples.

Single pi0 event sample

~64000 pi0's isolated from a bggen sample using extract_ptype_hddm plugin.

Again we can use DBCALTruthShower info to include only events where the two decay photons make it to the BCAL. 33% of events meet these criteria. This excludes events with photon conversion and also excludes events where one or both of the photons end up the FCAL.

Hard to get an exact count of how many pi0's are reconstructed/reconstructable, so I tried two different methods.

Method 1

Use DTwoGammaFit to fit all pairs of two photons to pi0 mass.

To get the correct errors, all particles are generated from the center of the target and the error on the vertex is set to 0.

Problems with this method:

  • it relies on having correct errors, which we don't quite have yet.
  • extraneous showers could produce spurious pi0 fits

Just count the number of events where there is a pi0 fit with confidence level > 10%.

  • GlueX algorithm: 73% efficiency
  • KLOE algorithm: 61% efficiency

GlueX algorithm has better pi0 energy resolution and angular resolution.

GlueX:

Cl.2BCALTruth.us.png

KlOE:

Cl.2BCALTruth.KLOE.png

The downward slope in the KLOE confidence level plot indicates that the errors are wrong and too few events will be accepted by the c.l. cut...

Method 2

Look at the two most energetic photons in an event. If the combined four-momentum falls "close" to the thrown pi0 four-momentum, count this a "good" reconstructed pi0.

Problems

  • different definitions of "close" lead to different results

efficiency:

  • GlueX: 79% efficiency
  • KLOE: 71% efficiency

GLuex has better angular, energy resolution

Number of showers

For this subset of events, we should see exactly 2 BCAL Showers

GlueX:

Nshowers.2BCALTruth.us.png

KLOE:

Nshowers.2BCALTruth.KLOE.png

It's not really clear to me which algorithm is doing a better job...

b1pi event sample

10000 b1pi events from genr8

Momentum of reconstructed photon depends on vertex, which is determined by tracking code. To avoid this complication, cheat and use the truth vertex when reconstructing photons.

Can count the number of reconstructed BCAL photons "close" to thrown photons.

  • GlueX: 9486 "good" reconsructed BCAL photons/12030 thrown BCAL photons=79%
  • KLOE: 9104/12030=76%

Avg. Number of BCAL showers:

  • GlueX: 5.8
  • KLOE: 6.0

Good matching pi0 (# of events that have a pi0 fit with prob>1% and "close" to the thrown pi0. Includes FCAL photons):

  • GlueX: 5695
  • KLOE: 5469

Try using DBCALTruthShower info:

Since the pi0's decay to photons prior to hdgeant, the two decay photons correspond to "primary" DBCALTruthShower's. The DBCALTruthShower corresponding to decay photons can be identified by their track.

Number of reconstructed DBCALShower's "close" (in E,z,phi) to a decay-photon-DBCALTruthShower:

  • GlueX: 6994/8101=86%
  • KLOE: 6693/8101=83%

For events with two "primary" DBCALTruthShower's from the pi0, # of events with a good reconstructed pi0 "close" to thrown pi0:

  • GlueX: 1195/1777=67%
  • KLOE: 1081/1777=61%

Things

  • Further work on errors...
  • Cluster overlap function tweaks -> better energy resolution
  • Theta res distributions off-center
  • Very forward particles energy calibration, general energy calibration scheme
  • Extra showers at ~12 deg, low energy
  • What is cluster rho good for?
  • Adding hits as associated objects...
  • FCAL issues?

Cuts5

(need fancier way to determine resolutions?)

single photon

  • (corrected) energy res better: .08724 vs. 09197
  • time res worse: 0.1605
  • z res worse: 2.059
  • nshowers better: 1.17

pi0

  • method 1: slightly worse 15387
  • method 2: slightly worse 78%

(could easily be due to nShowers distribution looks better, more 2 shower events, less 1shower events, less 3+shower events than both KLOE and GlueX

b1pi

  • good photons: 8949
  • avg BCAL showers: 4.73
  • good matching pi0: 5451
  • E_res BCAL: .1748

pi0 resolutions 2truth showers info