require(bigints)

Pad Response Function

The surface charge density induced on the metal surface of the cathode pad plane, by a charge \(q\) at a distance \(x_0\) from the pad plane, is given by:

\[\sigma (y,z) = \epsilon_0 E_x(y,z)\]

\[where\]

\[E_x(y,z)=- \frac{qx_0}{2\pi\epsilon_0(x_0^2+y^2+z^2)^\frac{2}{3}}\] \[and\]

\[E_z=E_y=0\]

Integrating this charge density over the metal surface, gives the total charge \(Q\) induced on the cathode pad plane, as follows:

\[Q=\int_{-\infty}^\infty\int_{-\infty}^\infty\sigma(y,z)dydz = -q\]

Using this approach of integration over each pad

Remove entries with missing pad data:

## [1] "Removed 72305 entries"

Get a Look-Up Table for Tracks within Events:

events <- sapply(j,`[[`,"Event")
events <- as.numeric(events)

tracks <- sapply(j, `[[`,"track")
tracks <- as.numeric(tracks)

v0s <- sapply(j, `[[`,"V0TrackID")
v0s <- as.numeric(v0s)

pdg <- sapply(j, `[[`,"pdgCode")
pdg <- as.numeric(pdg)
detectors <- sapply(j, `[[`,"det0")

columns <- sapply(j, `[[`,"col0")

rows <- sapply(j,`[[`,"row0")

pads <- sapply(j,`[[`,"layer0")
look.up.table <- data.frame(cbind(events,tracks,v0s,pdg))
look.up.table$index <- 1:nrow(look.up.table)
require(dplyr)

look.up.table <- look.up.table %>%
  mutate(unique.id=paste0(events,"-",tracks)) %>%
  group_by(unique.id) %>%
  mutate(n=n()) %>%
  arrange(desc(n))
require(knitr)

kable(head(look.up.table,100))
events tracks v0s pdg index unique.id n
22000 0 4 211 64933 22000-0 10
22000 0 -35 -211 100964 22000-0 10
22000 0 -35 -211 140125 22000-0 10
22000 0 -15 -211 146038 22000-0 10
22000 0 -8 -211 327736 22000-0 10
22000 0 -55 -211 387895 22000-0 10
22000 0 4 211 430694 22000-0 10
22000 0 -14 11 514908 22000-0 10
22000 0 -32 -211 627609 22000-0 10
22000 0 -25 -211 680298 22000-0 10
11669 2 46 211 32602 11669-2 9
11669 2 50 211 35518 11669-2 9
29444 0 17 211 171661 29444-0 9
29444 0 25 211 191788 29444-0 9
29444 0 7 211 237843 29444-0 9
11669 2 11 211 342498 11669-2 9
29444 0 -19 -211 400717 29444-0 9
11669 2 -13 -211 434010 11669-2 9
29444 0 5 211 439252 29444-0 9
29444 0 4 211 446430 29444-0 9
11669 2 103 211 471207 11669-2 9
29444 0 -12 -211 536327 29444-0 9
11669 2 7 211 574877 11669-2 9
11669 2 -23 -211 606696 11669-2 9
29444 0 19 211 625602 29444-0 9
11669 2 -38 -211 658774 11669-2 9
29444 0 -27 -211 700306 29444-0 9
11669 2 -23 -211 714978 11669-2 9
17148 0 6 211 4105 17148-0 8
26644 2 -4 11 12132 26644-2 8
28273 5 -34 -211 38694 28273-5 8
26644 2 42 211 45028 26644-2 8
27630 2 100 211 48172 27630-2 8
19427 0 -282 -211 51193 19427-0 8
17148 0 -73 -211 64890 17148-0 8
28273 5 -23 -211 76524 28273-5 8
15154 1 24 211 79755 15154-1 8
33862 3 4 211 81426 33862-3 8
29214 0 17 -11 88168 29214-0 8
19427 0 12 211 95812 19427-0 8
467 1 17 211 100744 467-1 8
27630 2 42 -11 101015 27630-2 8
27630 2 32 211 109912 27630-2 8
467 1 38 211 132771 467-1 8
467 1 17 211 139907 467-1 8
27630 2 42 -11 140175 27630-2 8
28273 5 -57 11 141363 28273-5 8
467 1 1 211 149268 467-1 8
15154 1 19 211 149425 15154-1 8
27630 2 -27 -211 150842 27630-2 8
31005 1 5 211 165670 31005-1 8
33862 3 16 211 171710 33862-3 8
33862 3 142 -11 172094 33862-3 8
19427 0 -12 -211 173264 19427-0 8
29214 0 -50 -211 174475 29214-0 8
31005 1 5 211 179056 31005-1 8
28273 5 -21 -211 188537 28273-5 8
27630 2 45 211 206259 27630-2 8
15154 1 8 211 219784 15154-1 8
15154 1 8 211 230117 15154-1 8
29214 0 46 211 244912 29214-0 8
42684 1 -5 -211 261993 42684-1 8
26644 2 -42 -211 273799 26644-2 8
31005 1 66 -11 275519 31005-1 8
33862 3 179 211 302912 33862-3 8
42684 1 114 211 315214 42684-1 8
27630 2 -49 -211 315518 27630-2 8
28273 5 67 211 325192 28273-5 8
27630 2 20 211 336117 27630-2 8
17148 0 23 211 351355 17148-0 8
26644 2 -30 11 360903 26644-2 8
28273 5 33 211 363040 28273-5 8
28273 5 12 211 379137 28273-5 8
31005 1 19 211 383600 31005-1 8
31005 1 -76 -211 388396 31005-1 8
17148 0 36 211 409334 17148-0 8
33862 3 -5 -211 412010 33862-3 8
42684 1 114 211 413275 42684-1 8
19427 0 -12 -211 426433 19427-0 8
15154 1 21 211 428002 15154-1 8
17148 0 -73 -211 430653 17148-0 8
26644 2 -89 -211 437918 26644-2 8
42684 1 -17 -211 438097 42684-1 8
42684 1 -5 -211 440170 42684-1 8
17148 0 -7 -211 455330 17148-0 8
19427 0 24 211 465098 19427-0 8
33862 3 -150 -211 479360 33862-3 8
42684 1 -5 -211 481628 42684-1 8
29214 0 36 211 484798 29214-0 8
19427 0 5 211 488904 19427-0 8
33862 3 -24 -211 501165 33862-3 8
467 1 -44 -211 508527 467-1 8
467 1 -44 -211 522240 467-1 8
19427 0 -1 -211 549553 19427-0 8
26644 2 -14 -211 551685 26644-2 8
42684 1 7 -11 564312 42684-1 8
17148 0 -14 -211 581992 17148-0 8
467 1 1 211 593701 467-1 8
15154 1 19 211 593856 15154-1 8
31005 1 -59 -211 608925 31005-1 8