Monte Carlo Event Reconstruction Implemented M

Monte Carlo Event Reconstruction Implemented
with Artificial Neural Networks
MASSACHUSETTS INSTITUTE
OF TECHNOLOGY
by
JUN 0 8 2011
Emma Elizabeth Tolley
Submitted to the Department of Physics
in partial fulfillment of the requirements for the degree of
LIBRARIES
ARCHWES
Bachelor of Science in Physics
at the
MASSACHUSETTS INSTITUTE OF TECHNOLOGY
June 2011
@ Massachusetts Institute of Technology 2011. All rights reserved.
A uthor .
.............................
Department of Physics
May 6, 2011
Certified by...
Richard Milner
Professor
Thesis Supervisor
Accepted by...
Nergis Mavalvala
Thesis Coordinator
2
Monte Carlo Event Reconstruction Implemented with
Artificial Neural Networks
by
Emma Elizabeth Tolley
Submitted to the Department of Physics
on May 6, 2011, in partial fulfillment of the
requirements for the degree of
Bachelor of Science in Physics
Abstract
I implemented event reconstruction of a Monte Carlo simulation using neural networks. The OLYMPUS Collaboration is using a Monte Carlo simulation of the
OLYMPUS particle detector to evaluate systematics and reconstruct events. This
simulation registers the passage of particles as 'hits' in the detector elements, which
can be used to determine event parameters such as momentum and direction. However, these hits are often obscured by noise. Using Geant4 and ROOT, I wrote a
program that uses artificial neural networks to separate track hits from noise and
reconstruct event parameters. The classification network successfully discriminates
between track hits and noise for 97.48% of events. The reconstruction networks determine the various event parameters to within 2-3%.
Thesis Supervisor: Richard Milner
Title: Professor
4
Acknowledgments
I would like to thank Dr. Douglas Hasell for teaching me how to use the Monte
Carlo simulation, answering my many questions regarding ROOT and Geant4, and
inspiring this thesis project. I would also like to thank Professor Richard Milner,
David Kelley, and Harley Zhang for their feedback on my thesis drafts.
6
Contents
1 Introduction
11
1.1
The OLYMPUS Experiment ......
1.2
The OLYMPUS Detector. .....
1.3
Monte Carlo Simulations . . . . . . . . . . . . . . . . . . . . . . . . .
.......................
11
.........................
12
2 Overview
15
2.1
Reconstruction
2.2
Neural Networks
2.3
13
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
2.2.1
Multilayer Perceptron
. . . . . . . . . . . . . . . . . . . . . .
18
2.2.2
Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
2.2.3
Structure
20
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Search Algorithm . . . ..
. . . . . . . . . . . . . . . . . . . . . . . .
3 Results
3.1
Classification
3.2
Reconstruction
20
23
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . ..
..
. . . . . . . ..
..
. . . . . ..
..
.. .. .
23
24
4 Conclusions
29
A Figures of Neural Network Reconstruction Accuracy
31
B Search Algorithm Code
39
8
List of Figures
1-1
Diagram of the detector as simulated by Geant4 .. . . . . . . . . . . .
2-1
Diagram of the relevant simulated detector elements with labeled reconstruction parameters. . . . . . . . . . . . . . . . . . . . . . . . . .
2-2
Diagram of code structure. . . . . . . . . . . . . . . . . . . . . . . . .
2-3
Diagram of the neural net structure used in this project.
2-4
Overfitting and underfitting, from [6]. . . . . . . . . . . . . . . . . . .
2-5
Depiction of the search process. . . . . . . . . . . . . . . . . . . . . .
3-1
Momentum reconstruction accuracy plotted against simulated momentum. . .....
3-2
......................
........
. . . . . . .
.....
Momentum azimuthal angle accuracy plotted against simulated azim uthal angle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3-3
Momentum polar angle accuracy plotted against simulated polar angle.
3-4 Z-coordinate reconstruction accuracy plotted against simulated Z. . .
Electron momentum reconstruction accuracy. .
. . . . . . . . . .
31
A-2 Proton momentum reconstruction accuracy. .
. . . . . . . . . .
32
A-3 Electron azimuthal angle reconstruction accuracy.
. . . . . . . . . .
33
A-4 Proton azimuthal angle reconstruction accuracy.
. . . . . . . . . .
34
A-5 Electron polar angle reconstruction accuracy.
. . . . . . . . . .
35
A-6 Proton polar angle reconstruction accuracy.
. . . . . . . . . .
36
A-7 Electron Z-coordinate reconstruction accuracy.
. . . . . . . . . .
37
A-8 Proton Z-coordinate reconstruction accuracy.
. . . . . . . . . .
38
A-i
10
Chapter 1
Introduction
1.1
The OLYMPUS Experiment
OLYMPUS is a nuclear physics experiment based at the Deutsches Elektronen-Synchrotron
(DESY) in Hamburg, Germany. The experiment uses the former BLAST detector
from the MIT-Bates Accelerator Center with some additional upgrades to measure
the ratio of the cross sections for electron-proton and positron-proton elastic scattering.
The electric and magnetic form factor ratio is important for understanding the
structure of the proton. The electric form factor describes a particle's electric charge
distribution in space, while the magnetic form factor describes the electric current
distribution. There are two methods used to measure this ratio [1]:
1. The Rosenbluth separation technique, which involves measuring cross sections
while varying the beam energy and scattering angle to separate the electric and
magnetic contributions.
2. Bombarding protons with a polarized electron beam and measuring the ratio
of the polarization components (parallel and perpendicular) of the recoiling
electrons.
In 2001 physicists at Jefferson Laboratory (JLAB) using the polarized electron
beam method discovered a discrepancy between their measurement of the electric and
magnetic form factor ratio and earlier data collected using the Rosenbluth method.
Previous experiments measuring this ratio found that its value was approximately
unity for a wide range of momentum transfer (usually denoted as
Q2),
consistent
with the model that electric and magnetic elastic form factors for the proton are
described by the same dipole distribution. However, the JLAB experiment found
that the ratio diverges from unity for large momentum transfers (especially when
Q2 > 1 GeV) [4].
This discrepancy may be due to two-photon exchange effects. It is possible that
the effects of multi-photon processes become more prominent at higher energies. The
Rosenbluth method is not sensitive to these multi-photon effects. The polarized beam
method is primarily sensitive to the single-photon exchange, but it is possible that
multi-photon exchange could have an effect at high energies [1].
If multi-photon processes do play a significant role in elastic proton-lepton scattering then physicists need to reevaluate the old data, extract better electric and
magnetic form factors, and construct a correct model of the nucleon.
1.2
The OLYMPUS Detector
The magnitude of the two-photon exchange can be determined by measuring the ratio
of the cross sections for electron-proton and positron-proton elastic scattering. The
cross sections will be measured with the OLYMPUS detector. The detector has many
individual components: the proton target set along the beam line, the Gas Electron
Multiplier (GEM) detectors and wire chambers used to track the flight of charged
particles, the time-of-flight (TOF) scintillator, and the electromagnets which impose
a strong magnetic field over the tracking devices. These components are shown in
Figure 1-1.
When an accelerated lepton collides with a proton in the target and
scatters into the detector, the various layers of devices can detect the location and
time of the particle as it passes through them. Knowing points along the particle's
path, one can reconstruct the initial collision parameters and ultimately the scattering
cross-section.
Beam Line
Figure 1-1: Diagram of the detector as simulated by Geant4.
Collaborators have moved the BLAST detector to DESY and begun re-assembly.
This includes re-wiring the wire chambers used to track the charged particles produced
by the reactions being studied and upgrading the electronics and readout systems.
1.3
Monte Carlo Simulations
In preparation for the experiment's run in 2012, detailed Monte Carlo simulations
of the detector and physics processes have been built using the Geant4 computer
package. Geant4 is an object-oriented simulation toolkit that can model:
"...the geometry of the system, the materials involved, the fundamental particles of interest, the generation of primary particles of events, the
tracking of particles through materials and external electromagnetic fields,
the physics processes governing particle interactions, the response of sensitive detector components, the generation of event data, the storage of
events and tracks, the visualisation of the detector and particle trajectories, and the capture for subsequent analysis of simulation data at different
levels of detail and refinement."
[3]
An accurate detector simulation has many uses. With this tool physicists can
study the systematics, signal noise, and possible background signals to optimize the
detector. The simulation will also be used to develop the reconstruction code that will
determine the initial parameters of the particle collisions. Geant4 generates particle
paths through the detector, models the particles' interactions with the various matter
in the detector, and generates 'hits' when particles pass through a sensitive detector
volume (such as a wire chamber). These hits can be used to reconstruct the origin,
momentum, and reaction variables of the particles in the detector. However, these
variables are obscured by noise and background events. Reconstruction will involve
pattern recognition and track fitting within the inhomogeneous magnetic field of
the experiment. The Monte Carlo studies will allow the required algorithms to be
developed before the actual detector begins operation.
Chapter 2
Overview
2.1
Reconstruction
I wrote a portion of the new particle track reconstruction code. The old reconstruction method went through two iterations of fit algorithms to reconstruct the event
parameters and disregarded false hits and noise. First, circles were fit to the wire
chamber hits to obtain a rough estimation of the event parameters. Using these estimations as a starting point, a more precise 'path-swimming' function was used to
determine more accurate parameters. Unfortunately, this reconstruction was very
slow, taking minutes to compute a few thousand events. Additionally the algorithms
completely disregarded background noise and false hits in the detector.
The use of neural networks to classify reconstruct tracks is much more efficient.
My neural network implementation will replace the circle-fitting portion of the old
reconstruction code. Trained neural networks can accurately separate track hits from
noise and efficiently reconstruct event parameters that can be used as a starting point
for more accurate 'path-swimming' fits.
The reconstruction program begins by loading the event data generated by the
main Monte Carlo simulation. For each event, the program analyzes hits in the right
and left chambers separately. Each set of wire chamber hits in a given event are sorted
into candidate particle tracks. The program searches through the sample space for
the most likely particle track, classifying each track as signal or noise using trained
neural networks. Signal tracks are passed to other neural networks that reconstruct
the various event parameters: momentum P, azimuthal angle 0, polar angle
4,
and
collision location in the proton target Z. These parameters are labeled in Figure 21. The classification decision, reconstructed parameters, and hits for each candidate
track are stored in a custom class for further manipulation by future elements of the
reconstruction program. A diagram of the program structure is shown in Figure 2-2.
Wire Chamber
Wire Chamber Planes
Beam Line
Proton Target
Figure 2-1: Diagram of the relevant simulated detector elements with labeled reconstruction parameters.
description
implementation
input
generates
>
pseudocode
OLYMPUS Monte Carlo
NeuralNetTrainerEP.C
trainClassifier()
MCa.rootl1
ElectronClassifier.Cxx
Value(hitl, hit2, hit3)
-
ProtonClassifier.Cxx
Value(hitl, hit2, hit3)
Reconstruction.C
class Hit
stores wire chamber hit
class Track
stores hits and reconstructed parameters
void run()
for (each MCData event)
left
track
searchForTracks(left
=
right track
=
hits)-------
searchForTracks(right hits)-----
Track* searchForTracks(hits)----------separate hits into mid, inner, outer layers
depth-first search through track candidates
for (each track candidate)
track = analyzeTrack(hitl, hit2, hit3)-if (track better than bestTrack)
-
-
I
-
I
-
bestTrack = track
return bestTrack
Track* analyzeTrack(hitl, hit2, hit3) -- - - check curvature to determine charge of particle
if (- charge)
electronProbability = Value(hit1, hit2, hit3) -if
|
||
-
(+ charge)
electronProbability = Value(hit1, hit2, hit3) - - - -reconstruct event parameters accordingly
Figure 2-2: Diagram of code structure.
Neural Networks
2.2
In its most general form, an artificial neural network is a directed graph of nodes.
Each node can take several inputs, but only produces one output. This output is
some function of the weighted sum of the inputs. The output is multiplied by some
weight, then passed to one or more other nodes in the network.
Multilayer Perceptron
2.2.1
The classification and reconstruction elements of the program use a specific type
of neural network known as the multilayer perceptron (MLP). I used the MLP implementation provided in the ROOT framework and written by C. Delaere [2]. A
simplified diagram of the structure of the networks used in the program is shown in
Figure 2-3.
An MLP has several defining features that set it apart from a regular neural
network [5]:
1. Fully connected. The outputs of all nodes in one layer feed to the inputs of each
node in the next.
2. Feed-forward. Inputs progress from layer-to-layer without any closed loops.
3. Weighted edges. Each input/output link is multiplied by an adjustable weight.
4. Sigmoid function.
To determine its output, each node computes a sigmoid
function of the weighted sum of its inputs. In this way, each node computes a
linear combination of the outputs of the previous layer.
2.2.2
Training
The network is trained through a process known as supervised learning. In supervised
learning, the training data consist of a set of paired input and output values. The
learning algorithm analyzes the training data and produces an empirical 'inferred'
function which should predict the correct output value for any valid input.
Hit 1
Hit 2
y2
z2
x3
Hit 3
y3
z3
Figure 2-3: Diagram of the neural net structure used in this project.
In an artificial neural network, the supervised neural network is implemented using
backpropogation. For a given training iteration, input is fed through the neural network. The difference between the observed and desired output is the error. Beginning
at the output and progressing backwards through the network (thus, backpropogation), the weights of the edges of the neural network are adjusted according to the
magnitude of the error output by the previous node [5].
Ultimately, the output is a linear combination of sigmoids, which can approximate
any continuous function. If the network is trained with signal data to output a value
of 1 and noise to output a value of 0, it can act as a classifying function which gives
the probability that the input is a signal [2].
There is no way to independently verify error in supervised learning algorithms.
As such, after the network is trained it is static. It can process new data, but will
not learn from the output.
X
Underfitting
Correct Fit
Overfitting
Figure 2-4: Overfitting and underfitting, from [6].
2.2.3
Structure
The internal structure of a neural network defines how well it can classify data. If
the hidden layers contain too few nodes, the network cannot be trained to match
complex functions. On the other hand, if the network is overly complex it will take a
long time to train and may succumb to overfitting. If the network is overfit it will not
generalize well from the training data to other valid input. Examples of overfitting
and underfitting functions are shown in Figure 2-4.
Some studies have shown that for N input nodes 2N hidden layer nodes are generally desirable. However, better performance can sometimes be obtained by overspecifying the number of parameters [6]. In this project, the networks take nine inputs,
have two hidden layers, one with twenty nodes and one with sixteen (for a total of
thirty-six hidden layer nodes), and produce one output.
2.3
Search Algorithm
The search algorithm divides event hits in a given wire chamber according to the
detection layer, evaluates every possible track configuration, and selects the best
electron or proton candidate. The search algorithm code is shown in Appendix B.
The search process is shown in Figure 2-5. In this example the inner layer has
one hit and the middle and outer layers have two hits each. There are four track
candidates total: abd, abe, acd, ace. Each track candidate will be evaluated by the
analyzeTrack () method. If the classifier network determines that there is a 90% or
greater probability that the track is an electron or proton, the track will be stored for
further comparisons. Ultimately the best electron or proton candidate is returned.
Figure 2-5: Depiction of the search process.
22
Chapter 3
Results
The performances of the classification and reconstruction networks were evaluated
on a 10,000 event data set produced by the Monte Carlo simulation. The neural
networks processed these data in fewer than fifteen seconds.
3.1
Classification
A 10,000 event data set will register hits in both wire chambers, but only events with
at least one hit in each of the three planes of the wire chamber can be identified as
tracks. 62.47% of all hit sets met this criteron and will be henceforth referred to as
detectable tracks. Not all detectable tracks contain a proton or electron; sometimes
the particle will graze the wire chamber and shower the volume with photons. These
false hits are also considered detectable tracks. Of these detectable tracks, 97.37%
contained a primary proton or electron.
The classifying neural networks determined that 89.44% of the detectable tracks
were primary proton or electron tracks. Of these identified tracks, 97.48% were correctly classified as primary protons or electrons. The other 2.52% were incorrectly
classified. The neural networks were able to identify 89.54% of all detectable protons
and electrons.
The identification threshold is the limiting factor in track detection. This threshold can be lowered to identify more of the detectable protons and electrons, but at
cost of losing classification and reconstruction accuracy.
Reconstruction
3.2
The results of parameter reconstruction implemented with neural networks can be
seen in Appendix A. The event parameters generated by the Monte Carlo are labeled
P, 0,
#,
and Z. The reconstructed values as determined by the neural networks are
labeled P', 0',
#', and
Z'. Key results are reproduced below.
Parameter
-
Figure
Pe
3.3%
A-i
P
2.3%
A-2
Oe
2.00
A-3
6,
1.30
A-4
#e
0.340
A-5
O,
0.35*
A-6
Ze
0.96 cm
A-7
Z,
1.1 cm
A-8
Comparable reconstruction results are achieved for both the proton and electron.
The networks can reconstruct the correlated P' and 0' with higher precision for the
proton than the electron.
While these reconstruction results are not precise enough to use alone, they are
suitable starting parameters for use by an accurate path-fitting algorithm.
Figure 3-1 shows how momentum reconstruction accuracy varies as a function of
simulated momentum. The vast majority of hits that are not correctly reconstructed
are the 3% of total hits that are not correctly identified as protons or electrons by
the classifying neural network.
Momentum reconstruction accuracy P - P' vs momentum P
2|0
0
1.5
0
0
00
0
00
0
0
00
1
0
0
0.5
0
00
00
0
0
0
000
0
0 0
0
0
0
060
0
0
0
00
0
0
0O*0.
0 000
000
so
00
*j"O'
0*
0
0
00
0
0
00
0
0
0
0
0
0
A1
0
0
0
-0.5
0
0
0
0
0
0
-1
-1.51'4
C
OO
0000
0
0
0
* Correctly classified track
0
o Incorrectly classified track
00
o
O
0.6
0.8I
I I I
I III I I I I I I I I I I I I I I I I I I I
1
1.2
P (GeV)
1.4
1.6
1.8
2
2.2
tP
Figure 3-1: Momentum reconstruction accuracy plotted against simulated momentum.
Figure 3-2 shows how azimuthal angle reconstruction accuracy varies as a function of simulated azimuthal angle. Poorly reconstructed hits have been incorrectly
classified. The complex structures seen in Figure 3-2 seem to indicate that the neural
network for these event parameters is overfitting the data. If this is the case, these
networks should be simplified so that the training algorithm will arrive at the correct
fit.
Azimuthal angle reconstruction accuracy e - e'vs azimuthal angle 0
1
0.5
-0.5
-1
0.2
0 (radians)
Figure 3-2: Momentum azimuthal angle accuracy plotted against simulated azimuthal
angle.
Figure 3-3 shows how polar angle reconstruction accuracy varies as a function of
simulated polar angle. Correctly classified hits are reconstructed well except at the
edges of the detector. This could be improved by adding more edge cases to the
neural network training data.
Polar angle reconstruction accuracy (p- <p' vs polar angle <p
g GFoo
0.6
00
0
0.41*
00
0.2
0
0
-
00
0
0
0*-
0
00
0 0
o %ooo
000O
0
-0.2
-0.4
9%
0
* 0
0
0*.
0
0
0
0
0
*0 0800
O
0
0
0
e Correctly classified track
o Incorrectly classified track
0
0
00016
i
i
i
'
1 .3*
',*1
.
1.2
1.3
*0
0
a 0
0
00
l
- D---W.
0
0
0
0
0000
00
0Co
-0.6
Ulpi
-
o*
000
0
0
0m 0
*) oo* -
0
0
1.4
1.5
.
mm
1.6
m....
.
1.7
.
l
1.8
. .
.
.
i
..
S
1.9
(p(radians)
Figure 3-3: Momentum polar angle accuracy plotted against simulated polar angle.
Figure 3-4 shows how Z-coordinate reconstruction accuracy varies as a function
of simulated Z. As with the polar angle reconstruction, correctly classified hits are
reconstructed well except along the edges of the detector. The current Monte Carlo
Event generator creates events with a triangular distribution in Z centered at Z = 0.
As such, there are few events generated at the edges -30 < Z < -20 and 30 > Z >
20, and few edge cases in the neural network training data. If the event generator
were changed to produce an even distribution in Z the training algorithm would give
more weight to edge cases and edge reconstruction could be improved.
Z-coordinate reconstruction accuracy Z - Z' vs Z
60
. 00 00o
0
0
00
0
00
00
0
0
00:%
0
0 0o
00
B a00
00
T--*
0
00
0 0
0
g
%
0
00
0I
so~~*
0
c
'-
-
o
(
0
0
00
W
0O WO
'o
0
q~~
00
(
0
0
0
0
do
08
0
0
0
0
~0pS
~
0
0
0
00
0.
-20
0
0
0
0
orclycasfe
track
o Incorrectly classified
0
I
0
e,-000
o
j
0
I~-
0(b
0~
a ~
-30
0
0
0
09 0% 000
9
0
-40
~
0 *
0
I
so
0
0e
000
o
-20
-60
0
-
S
0
00 0
I
-10
I
a
0
a
a
I
I
10
20
a
kraCK
a
a
I
a
30
Z(cm)
Figure 3-4: Z-coordinate reconstruction accuracy plotted against simulated Z.
Chapter 4
Conclusions
The classification neural network identifies 89.54% of the electrons and protons with
an error rate of 2.52%. The throughput could be improved by lowering the classification threshold, but this would raise the error rate.
The reconstruction networks determine the various event parameters to within
2-3%. Their precision could be improved by trimming the size of the networks to
avoid overfitting and including more edge cases in the training data.
There are two major ways that the code could be improved via nontrivial restructuring:
1. Considering that many of the event parameters are correlated, it may be more
efficient to have one neural network to reconstruct P, 9, <, and Z rather than
one network for each variable. This implementation would train faster and reconstruct more quickly that the current program. Additionally, the training
algorithm may converge on a more accurate inferred function. Such a network
would produce four outputs. As such, it would be significantly more complex
than the current networks, more difficult to determine optimal structure, and
more time-consuming train. Nevertheless, this implementation may be a worthwhile endeavor for further studies.
2. A simple way to improve reconstruction precision would be to include more
detector elements. The current program only considers the wire chamber hits
when classifying and reconstructing tracks. However, the actual OLYMPUS
experiment will use GEM, wire chamber, and TOF hits to reconstruct a particle
track. Adding additional inputs would constrain the parameter space of the
network, so additional hidden nodes might need to be added. With the current
neural network implementation it is very straightforward to incorporate hits
from other detector elements.
Further studies should consider incorporating
the GEM hits in analysis.
Ultimately, the program can classify and reconstruct 10,000 events in fewer than
fifteen seconds, a significant improvement over the old version of the code.
The
artificial neural networks work well as the first step in implementing full event reconstruction.
Appendix A
Figures of Neural Network
Reconstruction Accuracy
Electron Momentum Reconstruction
900
800
700
600
500
400
300
200
100
(P - P')/P
Figure A-1: Electron momentum reconstruction accuracy.
Proton Momentum Reconstruction
1800
Histogram Statistics
1600
mean = 0.0053
RMS = 0.088
1400
Gaussian Fit Parameters
X2
= 6.2
' = 0.023
1200
1000
800
600
400F-
200
.
II I I , , I I
-0.2
-0.1
I
.
0.1
.
.
.
.
.
0.2
(P - P')/P
Figure A-2: Proton momentum reconstruction accuracy.
.
0.3
Electron Azimuthal Angle Reconstruction
01-[
-10
i.J.
I
-8
i
1
-6
1
I
1
-4
1 1
-2
i
i
I
0
i
i
2
i
i
4
M
6
1.
8
10
e - 0' (degrees)
Figure A-3: Electron azimuthal angle reconstruction accuracy.
Proton Azimuthal Angle Reconstruction
0 - 0' (degrees)
Figure A-4: Proton azimuthal angle reconstruction accuracy.
Electron Polar Angle Reconstruction
1000
800
600
400
200
(p
- (p' (degrees)
Figure A-5: Electron polar angle reconstruction accuracy.
Proton Polar Angle Reconstruction
(p- <p' (degrees)
Figure A-6: Proton polar angle reconstruction accuracy.
Electron Z Reconstruction
1000
800
600
400
200
Z - Z' (cm)
Figure A-7: Electron Z-coordinate reconstruction accuracy.
Proton Z Reconstruction
Z - Z' (cm)
Figure A-8: Proton Z-coordinate reconstruction accuracy.
Appendix B
Search Algorithm Code
Track* searchForTracks(vector <Hit> hits){
Track * bestTrack = new Track ();
//
divide the hits according to chamber
vector<Hit> inner, mid, outer;
for (unsigned int i = 0; i < hits.size(); i++){
(hits [i] . getChamber () == 0 || hits [i] .getChamber() == 3)
if
inner.push-back(hits[i]);
else if
(hits[i] .getChamber()
==
1 || hits[i] .getChamber() == 4)
==
2 |1 hits [i] .getChamber(
mid.push-back(hits[i]);
else if
(hits [i] .getChamber()
==
5)
outer.push-back(hits[i]);
}
//
if
each chamber has at least one hit
//
search for the best possible particle track
if (inner.size(
> 0 && mid.size() > 0 && outer.size() > 0){
for (unsigned int i = 0; i < inner.size(; i++){
for (unsigned int
j=
for (unsigned int k
0;
j < mid.size(; j++){
0; k < outer.size(; k++){
Track * newTrack = analyzeTrack(inner[i], mid[j], outer[k]);
if ( (newTrack->getETrack() > bestTrack->getETrack()
&& newTrack->getETrackO
> .90)
|| (newTrack->getPTrack() > bestTrack->getPTrack()
&& newTrack->getPTrack() > .90))
bestTrack = newTrack;
return bestTrack;
}
Bibliography
[1] Y. C. Chen, A. Afanasev, S. J. Brodsky, C. E. Carlson, and M. Vanderhaeghen.
Partonic calculation of the two-photon exchange contribution to elastic electronproton scattering at large momentum transfer. Phys. Rev. Lett., 93(12):122301,
Sep 2004.
[2] C. Delaere. class tmultilayerperceptrons. root.cern.ch/root/html/ TMultiLayerPerceptron.html, April 2011.
[3] S. Agostinelli et. al. G4-a simulation toolkit. Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and
Associated Equipment, 506(3):250 - 303, 2003.
[4] 0. et. al. Gayou. Measurements of the elastic electromagnetic form factor ratio
jpgEp/gMp via polarization transfer. Phys. Rev. C, 64(3):038202, Aug 2001.
[5] S. Haykin. Neural Networks: A Comprehensive Foundation. Prentice Hall, second
edition, 1998.
[6] S. Lawrence, C. L. Giles, and A. C. Tsoi. What size neural network gives optimal
generalization? convergence properties of backpropagation. Technical report,
NEC Research Institute, Department of Electrical and Computer Engineering,
University of Queensland, St. Lucia 4072, Australia, 1996.