Hits matching Science Board Meeting 07 / 12 / 2016 Laura Zambelli - - PowerPoint PPT Presentation

hits matching
SMART_READER_LITE
LIVE PREVIEW

Hits matching Science Board Meeting 07 / 12 / 2016 Laura Zambelli - - PowerPoint PPT Presentation

Hits matching Science Board Meeting 07 / 12 / 2016 Laura Zambelli for the LAPP group 1 MC truth / Rec. hit matching - Code available in src/hitrecon.cc - Provides good (accurate & efficient) hit matching in most cases But if tracks are


slide-1
SLIDE 1

Science Board Meeting 07 / 12 / 2016 Laura Zambelli for the LAPP group

Hits matching

1

slide-2
SLIDE 2

MC truth / Rec. hit matching

2

  • Code available in src/hitrecon.cc
  • Provides good (accurate & efficient) hit matching in most cases

But if tracks are too vertical, matching is either not good or do not work [seg. fault] Two reasons :

  • philosophy of the code (see next slides)
  • true hits are found, stored and organized in fixed size containers → can lead to seg. faults for busy events
slide-3
SLIDE 3

MC truth / Rec. hit matching code philosophy

True hits are stored in a container like hits[crm][channel][nf][8] (one per view)

  • 1. Loop on all voxels (= truth) and merge together hits with same view, crm, channel, tstart, pid


[one voxel is created per step in VMC, and one step length is 1mm, so several energy depositions 
 within one time/channel bin are possible]

  • 2. Fill the hits container in sorted time
  • 3. Loop and merge hits together if they have a time difference ≤ gap


→ From Elisabetta’s SB presentation a gap = 6 time bins is optimal [24/02/16]

  • 4. Reconstruct hits
  • 5. Loop on reconstructed hits

Loop on true hits if the time difference Δt = |tstart(recHit) - tstart(trueHit)| < 10 compute the normalized charge difference: ΔQ = {QTot(trueHit) - QTot(recHit)}/QTot(trueHit) → Match together rec and true hits for the lowest ΔQ value nf (<20) per hits 0 : Nhits, 1: tstart, charge from µ± (2), e± (3), γ (4), π0 (5), π± (6), else (7) → hits[crm][channel][0][0] stores the number of hits on this line

3

slide-4
SLIDE 4

MC truth / Rec. hit matching for vertical tracks

Simulation of CR tracks in the 6x6x6 detector Black : Reconstructed hits with a matching truth information Red : Unmatched hits Matching efficiency : View 0 : 16986 matched out of 17731 hits [95.7%] View 1 : 14970 matched out of 16134 hits [92.8%]

4

→ Clear problem for vertical tracks

slide-5
SLIDE 5

MC truth / Rec. hit matching for vertical tracks

Simulation of a CR tracks in the 6x6x6 [ZOOM] Black : Reconstructed hits with a matching truth information Red : Unmatched hits

5

Along the channel, all true hits are merged together (here gap = 6) →only the first rec. hit on the channel is matched to the merged true hits → QTot(true hit) >> QTot (rec hit) for this particular matched hit → ΔQ value is biased

Q ∆

1 − 0.8 − 0.6 − 0.4 − 0.2 − 0.2 0.4 0.6 0.8 1 1 10

2

10

3

10

recmchit_v0_CRM0

Not sure what’s the problem here

slide-6
SLIDE 6

MC truth / Rec. hit matching - alternative algorithm

6

In order to avoid the segmentation faults on certain events, I wrote an alternative hit matching algorithm It follows a similar philosophy, and true hits are stored in a vector

  • 1. loop on all voxel, merge together voxels at same time, position and pid.
  • 2. sort the vector by increasing view, crm, channel and time
  • 3. merge hits together if their time difference is ≤ gap value
  • 4. match reconstructed and true hits if their starting time is ≤ Δ t value
  • 5. if several true hits could be associated, select the one with lowest ΔQ value
slide-7
SLIDE 7

MC truth / Rec. hit matching - Matching Efficiency

7

0.945 0.95 0.955 0.96 0.965

View 0

gap

4 5 6 7 8 9 10 11

tdiff

6 8 10 12 14 16 18 20

View 0

0.92 0.925 0.93 0.935 0.94

View 1

gap

4 5 6 7 8 9 10 11

tdiff

6 8 10 12 14 16 18 20

View 1

Reconstruction of the same CR event. gap and Δt values varied At gap = 6 and Δt = 10 (★), very similar results as the svn code

★ ★

slide-8
SLIDE 8

MC truth / Rec. hit matching - ΔQ mean

8

0.004 − 0.003 − 0.002 − 0.001 − 0.001 0.002 0.003 0.004

View 0 - CRM 0

gap

4 5 6 7 8 9 10 11

tdiff

6 8 10 12 14 16 18 20

View 0 - CRM 0

0.012 0.014 0.016 0.018 0.02 0.022 0.024

View 0 - CRM 1

gap

4 5 6 7 8 9 10 11

tdiff

6 8 10 12 14 16 18 20

View 0 - CRM 1

0.006 0.008 0.01 0.012 0.014 0.016 0.018

View 0 - CRM 2

gap

4 5 6 7 8 9 10 11

tdiff

6 8 10 12 14 16 18 20

View 0 - CRM 2

0.004 − 0.002 − 0.002 0.004 0.006 0.008 0.01

View 0 - CRM 4

gap

4 5 6 7 8 9 10 11

tdiff

6 8 10 12 14 16 18 20

View 0 - CRM 4

gap and Δt values varied At gap = 6 and Δt = 10(★), very similar results as the svn code Reconstruction of the same CR event. ΔQ = {QTot(trueHit) - QTot(recHit)}/QTot(trueHit)

★ ★ ★ ★

slide-9
SLIDE 9

MC truth / Rec. hit matching - ΔQ rms

9

0.08 0.082 0.084 0.086 0.088 0.09

View 0 - CRM 0

gap

4 5 6 7 8 9 10 11

tdiff

6 8 10 12 14 16 18 20

View 0 - CRM 0

0.16 0.162 0.164 0.166 0.168 0.17 0.172 0.174

View 0 - CRM 1

gap

4 5 6 7 8 9 10 11

tdiff

6 8 10 12 14 16 18 20

View 0 - CRM 1

0.124 0.126 0.128 0.13 0.132 0.134 0.136

View 0 - CRM 2

gap

4 5 6 7 8 9 10 11

tdiff

6 8 10 12 14 16 18 20

View 0 - CRM 2

0.078 0.08 0.082 0.084 0.086 0.088 0.09 0.092 0.094 0.096

View 0 - CRM 4

gap

4 5 6 7 8 9 10 11

tdiff

6 8 10 12 14 16 18 20

View 0 - CRM 4

ΔQ = {QTot(trueHit) - QTot(recHit)}/QTot(trueHit) gap and Δt values varied At gap = 6 and Δt = 10 (★), very similar results as the svn code Reconstruction of the same CR event.

★ ★ ★ ★

slide-10
SLIDE 10

On gap and Δt cuts

10

time

995 1000 1005 1010 1015 1020 1025 1030 1035 1040 10

2

10

time

1000 1010 1020 1030 1040 1050 1060 10

2

10

two peaks 10 time bins apart → makes 2 hits. two peaks 9 time bins apart → makes 1 hit. Red : Input hits [as true hits] Black : Shaped distributions [as measured hits] NB : Here both input peaks have the same charge. If charges are different, the minimum time difference to distinguish two charge deposition is larger.

time [us]

5 10 15 20 25 30 35 40 45 50

mV

1 2 3 4 5 6 7 8 9

ETHZ preAmp response Function

Any deposition at the CRP is shaped by the electronics (modeled by a convolution between the deposition and the pre-amplifier response function) →Any deposition within 9 time bins will be inseparable I changed the code philosophy:

  • No more true hits merging [gap = 0]
  • Any true hits from tstart(recHit) - Δt to tpeak(recHit) is matched to the reconstructed hit
slide-11
SLIDE 11

MC truth / Rec. hit matching - gap = 0

11

tdiff

8 10 12 14 16 18

Matching Efficiency

0.9988 0.999 0.9992 0.9994 0.9996 0.9998 1

View 1

  • View 0

0.928

  • 0.957

svn :

Matching efficiency - same CR events

slide-12
SLIDE 12

MC truth / Rec. hit matching - ΔQ mean

12

tdiff

8 10 12 14 16 18

mean

0.015 − 0.01 − 0.005 − 0.005 0.01

CRM 0

0.0054

  • 0.0007

svn : View 1

  • View 0

CRM 0

tdiff

8 10 12 14 16 18

mean

0.06 − 0.05 − 0.04 − 0.03 − 0.02 − 0.01 − 0.01 0.02 0.03

CRM 1

0.0245

  • 0.0217

svn : View 1

  • View 0

CRM 1

tdiff

8 10 12 14 16 18

mean

0.05 − 0.04 − 0.03 − 0.02 − 0.01 − 0.01 0.02

CRM 2

0.0359

  • 0.0131

svn : View 1

  • View 0

CRM 2

tdiff

8 10 12 14 16 18

mean

0.008 − 0.006 − 0.004 − 0.002 − 0.002 0.004 0.006 0.008 0.01 0.012

CRM 3

0.0020

  • 0.0024

svn : View 1

  • View 0

CRM 3

ΔQ mean distribution - same CR events ΔQ = {QTot(trueHit) - QTot(recHit)}/QTot(trueHit)

slide-13
SLIDE 13

MC truth / Rec. hit matching - ΔQ rms

13

tdiff

8 10 12 14 16 18

rms

0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12

CRM 0

0.0984

  • 0.0720

svn : View 1

  • View 0

CRM 0

tdiff

8 10 12 14 16 18

rms

0.12 0.13 0.14 0.15 0.16 0.17 0.18

CRM 1

0.1648

  • 0.1591

svn : View 1

  • View 0

CRM 1

tdiff

8 10 12 14 16 18

rms

0.11 0.12 0.13 0.14 0.15 0.16 0.17

CRM 2

0.1567

  • 0.1171

svn : View 1

  • View 0

CRM 2

tdiff

8 10 12 14 16 18

rms

0.05 0.055 0.06 0.065 0.07 0.075 0.08 0.085 0.09

CRM 3

0.0782

  • 0.0805

svn : View 1

  • View 0

CRM 3

ΔQ rms distribution - same CR events ΔQ = {QTot(trueHit) - QTot(recHit)}/QTot(trueHit)

slide-14
SLIDE 14

MC truth / Rec. hit matching - bad match

14

Black : Reconstructed hits with a matching truth information Green : ‘Badly’ matched hits (|ΔQ| > 0.4) [gap = 0, Δt = 15 time bins]

slide-15
SLIDE 15

time bin 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 charge

2 −

10

1 −

10 1 10

2

10

3

10

MC truth / Rec. hit matching

15

Black : Reconstructed hits with a matching truth information Green : ‘Badly’ matched hits (|ΔQ| > 0.4) Black : Measured hits Red : true hits (gap = 0) Blue : true hits (gap = 6)

  • n channel 467 = 145.93 cm

focus on a bad match case

slide-16
SLIDE 16

MC truth / Rec. hit matching

16

time bin 5600 5650 5700 5750 5800 charge 10

2

10

3

10

Red : True hits (no gap, pedestal added) Gray : QScan simulation, shaping turned off → Original deposition retrieved Black : Measured hits (= red shaped by QScan) Blue : red distribution shaped offline hit 1 hit 2 hit 3 The hit finding algorithm finds 3 hits

tstart tpeak

slide-17
SLIDE 17

MC truth / Rec. hit matching - bad match example

17

time bin 5600 5650 5700 5750 5800 charge 10

2

10

3

10

Black : Measured hits Blue : true hits (gap = 6) hit 1 hit 2 hit 3 unmatched unmatched ΔQ = 0.74 Charge between tstart(recHit) -10 to tstart(recHit) +10 is matched to the hit

slide-18
SLIDE 18

MC truth / Rec. hit matching - bad match example

18

time bin 5600 5650 5700 5750 5800 charge 10

2

10

3

10

some true hits are not matched ΔQ = 0.04 ΔQ = -0.58 ΔQ = -0.98 hit 1 hit 2 hit 3 Black : Measured hits Red : true hits (no gap) any true charge between tstart(recHit) -15 to tpeak(recHit) is matched to the hit

slide-19
SLIDE 19

Further studies performed …

19

… but can’t be shown today as the ccin2p3 is down since yesterday [sps] Algorithm tested on simulations of

  • 1 GeV electrons
  • 1 GeV muons
  • 2 GeV pions
  • 5 GeV muons

All generated with random directions in the 666 detector

  • Vertical 5 GeV muons with where only the multiple scattering interaction is allowed
slide-20
SLIDE 20

Prospects

20

  • In order to improve the hit matching for nearly vertical tracks a alternative code has been
  • developed. But for most of the cases, both codes have very similar results!
  • Both codes runs at similar speed
  • Improvement of the hit matching algorithm to minimize the amount of bad matches foreseen
  • Test the hit finding and matching when some noise is added in the simulation.