Machine Learning in PandaRoot GlueX-Panda Workshop G.Washington - - PowerPoint PPT Presentation

machine learning in pandaroot
SMART_READER_LITE
LIVE PREVIEW

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?


slide-1
SLIDE 1

Machine Learning in PandaRoot

GlueX-Panda Workshop G.Washington University, May 2019 Ralf Kliemt (GSI)

slide-2
SLIDE 2

Motivation

  • Machine Learning (ML) is about modelling data
  • Self-learning algorithms gain knowledge from data to

make predictions Why?

  • Gain computation speed in online scenarios
  • More precision, e.g. by respecting correlations
  • Let algorithms do the tedious tasks of recognising

patterns, structures, principal components etc.

2

slide-3
SLIDE 3

3

Which type of ML?

slide-4
SLIDE 4

4

Which type of ML?

slide-5
SLIDE 5

PANDA FPGA Sim Digi Local Reco Global Reco Event Building Event Selection Analysis Storage Paper Raw Data

  • nline
  • ffline

sim

Alignm. Calib.

ML Activities at PANDA

5

slide-6
SLIDE 6

PANDA FPGA Sim Digi Local Reco Global Reco Event Building Event Selection Analysis Storage Paper Raw Data

  • nline
  • ffline

sim

Alignm. Calib.

ML Activities at PANDA

6

slide-7
SLIDE 7

Key Concept

7

slide-8
SLIDE 8

Boosted Decision Tree (BDT)

8

  • Break down data by steps of decisions
  • Based on features in training data
  • Splitting by maximising information gain

—> Typical application: Classification for PID

slide-9
SLIDE 9

Artificial Neural Networks (ANN)

9

  • Transform data meaningfully
  • Learn iteratively
slide-10
SLIDE 10

A lot to choose from…

10

slide-11
SLIDE 11

11

A lot to choose from…

slide-12
SLIDE 12

Programming Frameworks & Packages

12

  • ROOT / TMVA
  • NumPy
  • TensorFlow (Deep Learning)
  • Keras (on top of TensorFlow with GPUs)
  • MLlib Apache Spark
  • Sci-Kit Learn
  • PyTorch (Deep Learning)
  • DL4J (Deep Learning, Java)
  • R Implementations

slide-13
SLIDE 13

Popular Choices

13

slide-14
SLIDE 14

Machine Learning for Forward Tracking

slide-15
SLIDE 15

15

Arti tific icia ial l Neural l Netw tworks: s:

Application

  • n to the FTS:
  • Create all possible combinations of hit pairs (adjacent

layers).

  • Train the network to predict if hit pairs are on the

same track or not.

  • Input observables:

1) Hit pair positions in x-z projection (vertical layers). 2) Drift radii (Isochrones). 3) Distance between hits.

  • Output:

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”

slide-16
SLIDE 16

16

A) first layers B) middle layers inside Magnet C) last layers A B C

ANN Tracking: Pattern Recognition with parallel layers

slide-17
SLIDE 17

17

ANN Tracking: Residuals including skewed layers

First promising results inside magnetic field

slide-18
SLIDE 18

18

RNN (LSTM) Tracking: Residuals including skewed layers

Next Step: Track Fitting with RNN - stay tuned

slide-19
SLIDE 19

Machine Learning for Particle Identification

slide-20
SLIDE 20

PID: Usual Observables

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

  • vs. p

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

  • vs. p

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

) µ

  • vs. p (

iron

MUO: L

p [GeV/c] 2 4 6 [cm]

iron

L 10 20 30 40 50 60 70 80

10 1 10

) µ

  • vs. p (non-

iron

MUO: L

(charged particles only)

slide-21
SLIDE 21

PID Approaches

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:

  • A. Boosted Decision Tree (BDT)
  • B. “Deep Learning” Artificial Neural Network (ANN)

—> gain performance by considering correlations

slide-22
SLIDE 22

Input Features

22

Input:

  • 𝑞𝑞→𝑌𝑌𝑍𝑍,
  • where X and Y =

e

∓,𝜌 ∓,𝜈 ∓,k ∓,p ∓

  • Beam momentum: 15GeV/c
slide-23
SLIDE 23

Performance Plots

23

Boosted Decision Tree Artificial Neural Network

slide-24
SLIDE 24

Confusion Matrices

24

Boosted Decision Tree Artificial Neural Network

slide-25
SLIDE 25

Pions

25

Boosted Decision Tree Artificial Neural Network

slide-26
SLIDE 26

Kaons

26

Boosted Decision Tree Artificial Neural Network

slide-27
SLIDE 27

Machine Learning for the Software Trigger

slide-28
SLIDE 28

Expected Data Rates

28

  • PANDA will run with a continuous beam
  • Event rates will be high, some events will overlap
  • Storage constraints in size & bandwidth
  • Data rate has to be reduced by 1/1000
  • No specific trigger on hardware possible
  • Event topology of signals similar to background 


—> no “Jets” or similarly obvious features Solution: An online physics filter (“software trigger”)

slide-29
SLIDE 29

Event Generation

  • Signal
  • Background

Simulation & Reconstruction Event Filtering

  • Combinatorics
  • Mass Window Selection
  • Trigger Specific Selection 


→ 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

Software Trigger

slide-30
SLIDE 30

Software Trigger - Cuts

30

  • Cut based approach, optimised on signal & bg. MC
  • Many observables taken into account
  • Correlations are not respected

Entries 15610

]

2

) [GeV/c

  • e

+

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

+

e → p p

Entries 25069

]

2

) [GeV/c

  • K

+

m(K 0.5 1 1.5 2 2.5 3

100 200 300 400 500

Entries 25069

= 0.8% ∈

  • K

+

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

  • e

+

m(e 1 2 3 4 5 6

200 400 600 800 1000 1200 1400 1600 1800

Entries 15610

= 0.0% ∈

  • e

+

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

+

π

  • m(K

1 2 3 4 5 6

2000 4000 6000 8000 10000

Entries 295962

= 7.2% ∈

+

π

  • K

→ D

Entries 224819

]

2

) [GeV/c

+

π

+

π

  • m(K

1 2 3 4 5 6

500 1000 1500 2000 2500 3000 3500 4000 4500

Entries 224819

= 8.6% ∈

+

π

+

π

  • K

+

D

Entries 74779

]

2

) [GeV/c

+

π

  • K

+

m(K 1 2 3 4 5 6

200 400 600 800 1000 1200 1400 1600

Entries 74779

= 2.8% ∈

+

π

  • K

+

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

+

π

  • m(pK

1 2 3 4 5 6

200 400 600 800 1000 1200 1400

Entries 90669

= 5.2% ∈

+

π

  • pK

c

Λ

DPM 2014

slide-31
SLIDE 31

Software Trigger - Cuts

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

  • 3

10

  • 2

10

  • 1

10 1

mass cut only all cuts (high supression)

Full MC - Background fraction

  • Trade-off between signal efficiency & background

suppression

  • Many channels = much feedthrough & cross-tagging

Goal: BG suppression 1/1000 2014

slide-32
SLIDE 32

Software Trigger - TMVA

32

  • First studies with many algorithms
  • Dependence on offered observables


—> 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

+

e Λ

c

Λ

Efficiency - TMVA application

[GeV] s

2 2.5 3 3.5 4 4.5 5 5.5 6

  • 3

10

  • 2

10

  • 1

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

slide-33
SLIDE 33

Software Trigger on GPU?

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

slide-34
SLIDE 34

Software Trigger on GPU

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

slide-35
SLIDE 35

Summary

  • Machine learning sees a comeback in physics
  • Many available libraries with fresh concepts
  • ML in algorithms under development:
  • Forward tracking
  • charged PID
  • Software trigger
  • Potential parts which may benefit from ML:
  • EMC cluster shape analysis
  • Event building
  • Physics analysis

35

slide-36
SLIDE 36

Thanks for your attention.

slide-37
SLIDE 37
slide-38
SLIDE 38

PandaRoot Communication

  • Code Repository: pandaatfair.githost.io
  • Issue tracker, including discussions
  • WiKi page:

panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRoot

  • Forums: forum.gsi.de & Slack: pandaroot.slack.com
  • Bi-weekly online meetings: Thu. 10-11
  • Dashboard:

https://cdash.gsi.de/index.php?project=PandaRoot

38

slide-39
SLIDE 39

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