Machine Learning in PandaRoot
GlueX-Panda Workshop G.Washington University, May 2019 Ralf Kliemt (GSI)
Machine Learning in PandaRoot GlueX-Panda Workshop G.Washington - - PowerPoint PPT Presentation
Machine Learning in PandaRoot GlueX-Panda Workshop G.Washington University, May 2019 Ralf Kliemt (GSI) Motivation Machine Learning (ML) is about modelling data Self-learning algorithms gain knowledge from data to make predictions Why?
GlueX-Panda Workshop G.Washington University, May 2019 Ralf Kliemt (GSI)
make predictions Why?
patterns, structures, principal components etc.
2
3
4
PANDA FPGA Sim Digi Local Reco Global Reco Event Building Event Selection Analysis Storage Paper Raw Data
sim
Alignm. Calib.
5
PANDA FPGA Sim Digi Local Reco Global Reco Event Building Event Selection Analysis Storage Paper Raw Data
sim
Alignm. Calib.
6
7
8
—> Typical application: Classification for PID
9
10
11
12
13
15
Arti tific icia ial l Neural l Netw tworks: s:
Application
layers).
same track or not.
1) Hit pair positions in x-z projection (vertical layers). 2) Drift radii (Isochrones). 3) Distance between hits.
1) Probability that hit pair are on the same track. Connect hits that pass the probability cut (threshold).
e.g. probability(h1-h2)> threshold, and probability(h2-h3)> threshold, so h1, h2, h3 are on the same track.
03.April.2019 Page 9
Ma Machine Learning For Track Finding at PANDA A FTS
Institut für Kernphysik (IKP)
Wa Waleed Esmail, Tobias Stockmanns, and James Ritman On Behalf of the PANDA Collaboration
Contribution at “Connecting the Dots 2019”
16
A) first layers B) middle layers inside Magnet C) last layers A B C
ANN Tracking: Pattern Recognition with parallel layers
17
ANN Tracking: Residuals including skewed layers
First promising results inside magnetic field
18
RNN (LSTM) Tracking: Residuals including skewed layers
Next Step: Track Fitting with RNN - stay tuned
20
p [GeV/c] 2 4 6 E/p 0.2 0.4 0.6 0.8 1
1 10 10
EMC: E/p vs. p
p [GeV/c] 2 4 6 [rad]
C
Θ 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
1 10 10
C
Θ DRC:
p [GeV/c] 2 4 6 [rad]
C
Θ 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
1 10 10
C
Θ DSC:
p [GeV/c] 2 4 6 dE/dx [a.u.] 2 4 6 8 10 12 14 16 18
1 10 10
STT: dE/dx vs. p
p [GeV/c] 2 4 6 [cm]
iron
L 10 20 30 40 50 60 70 80
10 1 10
) µ
iron
MUO: L
p [GeV/c] 2 4 6 [cm]
iron
L 10 20 30 40 50 60 70 80
10 1 10
) µ
iron
MUO: L
(charged particles only)
21
P(~ x|h) = L(~ x|h) × P(h) P
h=e,µ,π,K,p
L(~ x|h) × P(h)
<latexit sha1_base64="3ZvoEMUZT2fNdKs/18Cr9fQEUpU=">ACSnicdVDPSxtBGJ2Nv2PV2B57GZRChB29aCXQGgvhXrYQqNCJoTZybfu4MzuMvOtGrb750kv7aXQg6f+BV56sJRenCQerNoHA4/3vsf3zYtyJS36/rVXm5tfWFxaXqmvlhb32hsvjyWE9ESmMnMScQtKptBDiQpOcgNcRwqOo7N3E/4HIyVWfoJxzkMND9NZSwFRycNGzxsnMQ5WX1OdnpsNhwUR4+kBhKDZaGzWSnKpktNFNS7TDMulAi+mixXLZ+tDKq/+lho1tv+1PQZ+S4J5sd8OL259X36Ew8Z3NspEoSFobi1/cDPcVByg1IoqOqsJBzcZPoe9oyt2qQTmtoqJvnDKicWbcS5FO1YeJkmtrxzpyk5pjYh97E/E5r19gfDAoZoXCKmYLYoLRTGjk17pSBoQqMaOcGku5WKhLs60bVfdyUEj7/8lBztoO9u5H18ZbMsMyeU2SJMEZJ90yXsSkh4R5Au5Ibfkt/fV+X98f7ORmvefeYV+Qe1+TsV/7iv</latexit>L(~ x|h) = Y
k
pk(~ x|h)
<latexit sha1_base64="woYPUKldMCmRspq6e3C9QClfum8=">AC3icbVC7SgNBFJ31GeNr1dJmSBiE3ZjoY0QTKGFRQTzgGxYZmdnk2FnH8zMBsOaXgQLf8TGQhFbP0A7f0acPIqYeODC4Zx7ufceJ2ZUSMP41hYWl5ZXVjNr2fWNza1tfWe3LqKEY1LDEYt40GCMBqSmqSkWbMCQocRhqOXxn6jR7hgkbhtezHpB2gTkg9ipFUkq3nLgtWj+D0ZnDbPTy1Yh65th/b/pRq63mjaIwA54k5Ifny+X3lx3r8rNr6l+VGOAlIKDFDQrRMI5btFHFJMSODrJUIEiPsow5pKRqigIh2OvplA+U4kIv4qpCUfq9ESKAiH6gaM6AyS7YtYbiv95rUR6J+2UhnEiSYjHi7yEQRnBYTDQpZxgyfqKIMypuhXiLuISxVfVoVgzr48T+qlonlULF2pNM7AGBmwD3KgAExwDMrgAlRBDWBwB57AC3jVHrRn7U17H7cuaJOZPfAH2scvmcmfKw=</latexit>k = MVD dE/dx, DRC thetaC …
Probability that a given track with parameters x corresponds to particle type h Combination of measurements:
Bayes: Machine Learning:
—> gain performance by considering correlations
22
Input:
e
∓,𝜌 ∓,𝜈 ∓,k ∓,p ∓
23
Boosted Decision Tree Artificial Neural Network
24
Boosted Decision Tree Artificial Neural Network
25
Boosted Decision Tree Artificial Neural Network
26
Boosted Decision Tree Artificial Neural Network
28
—> no “Jets” or similarly obvious features Solution: An online physics filter (“software trigger”)
Event Generation
Simulation & Reconstruction Event Filtering
→ Event Tagging
Global Trigger Tag
29
EvtGen
Physics Channel 1 Physics Channel 2 ... Physics Channel m
DPM
Background
Toy MC Full MC Trigger 1 Trigger n Trigger Decision (Logical OR) Trigger 2 ... Trigger 3
reduce bg. by 1/1000
30
Entries 15610
]
2
) [GeV/c
+
m(e 1 2 3 4 5 6 7
200 400 600 800 1000 1200 1400 1600 1800 2000 2200
Entries 15610
= 0.0% ∈
+
e → p p
Entries 25069
]
2
) [GeV/c
+
m(K 0.5 1 1.5 2 2.5 3
100 200 300 400 500
Entries 25069
= 0.8% ∈
+
K → φ
Entries 210195
]
2
) [GeV/c
+
K
S
m(K 1 2 3 4 5 6
500 1000 1500 2000 2500 3000 3500 4000
Entries 210195
= 3.4% ∈
+
K
S
K →
c
η
Entries 15610
]
2
) [GeV/c
+
m(e 1 2 3 4 5 6
200 400 600 800 1000 1200 1400 1600 1800
Entries 15610
= 0.0% ∈
+
e → ψ J/
Entries 6232
]
2
) [GeV/c
+
µ m( 1 2 3 4 5 6
20 40 60 80 100 120 140 160 180
Entries 6232
= 0.0% ∈ = 21.9%)
t
∈ (
+
µ → ψ J/
Entries 295962
]
2
) [GeV/c
+
π
1 2 3 4 5 6
2000 4000 6000 8000 10000
Entries 295962
= 7.2% ∈
+
π
→ D
Entries 224819
]
2
) [GeV/c
+
π
+
π
1 2 3 4 5 6
500 1000 1500 2000 2500 3000 3500 4000 4500
Entries 224819
= 8.6% ∈
+
π
+
π
→
+
D
Entries 74779
]
2
) [GeV/c
+
π
+
m(K 1 2 3 4 5 6
200 400 600 800 1000 1200 1400 1600
Entries 74779
= 2.8% ∈
+
π
+
K →
+ s
D
Entries 667078
]
2
) [GeV/c
m(p 0.5 1 1.5 2 2.5 3
1000 2000 3000 4000 5000 6000 7000 8000
Entries 667078
= 7.6% ∈
p → Λ
Entries 90669
]
2
) [GeV/c
+
π
1 2 3 4 5 6
200 400 600 800 1000 1200 1400
Entries 90669
= 5.2% ∈
+
π
→
c
Λ
DPM 2014
31
[GeV] s
2 2.5 3 3.5 4 4.5 5 5.5 6 0.1 0.2 0.3 0.4 0.5 0.6 0.7
e+e- φ
c
η (2e) ψ J/ ) µ (2 ψ J/ D
±
D
s
D Λ
c
Λ
Full MC - Efficiencies - all cuts (high suppression)
[GeV] s
2 2.5 3 3.5 4 4.5 5 5.5 6
10
10
10 1
mass cut only all cuts (high supression)
Full MC - Background fraction
suppression
Goal: BG suppression 1/1000 2014
32
—> output performance —> calculation speed
[GeV] s
2 2.5 3 3.5 4 4.5 5 5.5 6 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
φ D
±
D
s
D (2e) ψ J/ ) µ (2 ψ J/
c
η
+
e Λ
c
Λ
Efficiency - TMVA application
[GeV] s
2 2.5 3 3.5 4 4.5 5 5.5 6
10
10
10 1
Mass cut only TMVA application
Background fraction
CFMlpANN
Goal: BG suppression 1/1000
Signal efficiency
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Background rejection
0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
MVA Method: BDT SVM RuleFit MLP KNN TMlpANN Likelihood FDA_GA Fisher
Background rejection versus Signal efficiency
2014
33
FastSim - Principle Component Analysis - no GPU, yet
pp → D+D− → K−π+π+ D−(incl.) (& cc.)
<latexit sha1_base64="j/nYHFxr7hPc0Pmeo0J07vdFGDI=">ACR3icbVDLSgMxFM3Ud31VXboJFqUiHWZUHAj6kJwU8E+oNOWTJq2wUwSkoxShv6dG7fu/AU3LhRxafoAa+sNuZycy5JTigZ1cbzXp3UzOzc/MLiUnp5ZXVtPbOxWdIiVpgUsWBCVUKkCaOcFA01jFSkIigKGSmH95d9vfxAlKaC35muJLUItTltUYyMpRqZugyE1fvjiewFirY7BiklHuFV/eCqnh9nbuxR0vrBsJ1ZRz5HOWbuPgzOfhfMBXuWgBi7+41M1nO9QcFp4I9AFoyq0Mi8BE2B4hwgxnSup70tQSpAzFjPTSQayJRPgetUnVQo4iomvJIce3LVME7aEspsbOGDHJxIUad2NQuMkOnoSa1P/qdVY9M6rSWUy9gQjocXtWIGjYD9UGTKoIN61qAsKL2rRB3kELY2OjTNgR/8svToHTo+kfu4e1x9vxiFMci2AY7IAd8cALOwTUogCLA4Am8gQ/w6Tw786X8z20pzRzBb4UynB7BErn8=</latexit>Reaction:
Signal Background Total events 24713 52180 True selection 23555 50350 False selection 1158 1830 True selection rate 0.953 0.965
MC input
34
FullSim - Artificial Neural Network - training on GTX1080Ti
pp → D+D− → K−π+π+ D−(incl.) (& cc.)
<latexit sha1_base64="j/nYHFxr7hPc0Pmeo0J07vdFGDI=">ACR3icbVDLSgMxFM3Ud31VXboJFqUiHWZUHAj6kJwU8E+oNOWTJq2wUwSkoxShv6dG7fu/AU3LhRxafoAa+sNuZycy5JTigZ1cbzXp3UzOzc/MLiUnp5ZXVtPbOxWdIiVpgUsWBCVUKkCaOcFA01jFSkIigKGSmH95d9vfxAlKaC35muJLUItTltUYyMpRqZugyE1fvjiewFirY7BiklHuFV/eCqnh9nbuxR0vrBsJ1ZRz5HOWbuPgzOfhfMBXuWgBi7+41M1nO9QcFp4I9AFoyq0Mi8BE2B4hwgxnSup70tQSpAzFjPTSQayJRPgetUnVQo4iomvJIce3LVME7aEspsbOGDHJxIUad2NQuMkOnoSa1P/qdVY9M6rSWUy9gQjocXtWIGjYD9UGTKoIN61qAsKL2rRB3kELY2OjTNgR/8svToHTo+kfu4e1x9vxiFMci2AY7IAd8cALOwTUogCLA4Am8gQ/w6Tw786X8z20pzRzBb4UynB7BErn8=</latexit>Reaction:
MC input All mass spectra normalised to 1
35
panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRoot
https://cdash.gsi.de/index.php?project=PandaRoot
38
39
TString inputGenerator = "psi2s_Jpsi2pi_Jpsi_mumu.dec"; // "dpm" "ftf" or e.g. "box:type(211,1):p(1,1):tht(10,120):phi(0,360)" PndMasterRunSim *fRun = new PndMasterRunSim(); fRun->SetInput(inputGenerator); fRun->SetName("TGeant4"); fRun->SetOptions(""); fRun->SetParamAsciiFile("all.par"); fRun->SetBeamMom(7.0); fRun->SetStoreTraj(kTRUE); fRun->Setup("evtcomplete"); // file name prefix fRun->CreateGeometry(); fRun->SetGenerator(); fRun->AddSimTasks(); fRun->Init(); fRun->Run(1000); //nEvents fRun->Finish();
e.g. in macro/master Short ROOT macros to start simulations