This is EM4T2K, using the expectation maximization algorithm to reconstruct events in the WAGASCI detector
For any comments, complaints, suggestions and further information, please send an email to philipp.windischhofer@gmail.com.
The purpose is to assess the feasibility of using the expectation maximization algorithm (as implemented in libgem
) for track finding in events recorded by the WAGASCI detector, and to compare the performance with that of the legacy algorithm used so far, which is based on a cellular automaton. This project consists of two main parts:
- reconstruction: takes as input a raw data file (containing real events or simulated MC events) and applies
libgem
to fit the tracks contained therein. It then saves the tracks into a ROOT tree, using the same format as the legacy reconstruction. - comparison: takes as input two processed files, the output of the legacy reconstruction algorithm, and the output of the
libgem
-based reconstruction. It uses different metrics to compare the quality of the reconstruction done with both methods.
- source the file
setup_env.sh
- compile the code by typing
make all
(Note: you may have to adapt the version of yourgcc
compiler in the Makefile, for development and initial testing,gcc 4.9
was used. You may also have to adapt the directory in whichlibgem
is installed. The default directory used is../libgem
.)
This will create two executables, reco
and comp
.
- the first step is to apply
libgem
to the track reconstruction. This part is handled byreco
. To run it on an input file containing the raw data (for example,WMMC_Run1_1_wNoise.root
), do
./reco WMMC_Run1_1_wNoise.root libgem_reco.root
The file libgem_reco.root
will then contain the reconstructed events.
- the next step is to run
comp
to compare this result against the output of the legacy reconstruction. For the input file used above, this information is contained inWMMC_Run1_1_wNoise_legacy_reco.root
. Thus, run
./comp WMMC_Run1_1_wNoise_legacy_reco.root libgem_reco.root
This will produce, draw and save several plots. By default, it generates the following output files:
number_tracks.pdf
: a 2D histogram comparing the number of tracks found bylibgem
and the legacy reconstruction codetrack_orientation.pdf
: for events where bothlibgem
and the legacy reconstruction fitted exactly one track, it shows the distribution of the angle between these two reconstructed tracksvertex_distance.pdf
: for events where bothlibgem
and the legacy reconstruction fitted exactly two tracks (i.e. the class of events having a unique intersection point), it computes and shows the distribution of the euclidean distance between the intersection points determined by the two methodsvertex_MC_distance.pdf
: for the same class of events, it computes and shows instead the euclidean distance between the vertex determined bylibgem
and the actual truth information
In order to add new metrics with which to compare different classes of events, you may want to update / extend the class EventReferee
. The method CompareEvents()
is called for each event that needs to be compared. The method Report()
is called once all events have been processed. This method is intended to carry out the relevant plotting operations at the end. The class EventMetrics
is supposed to contain any auxiliary methods needed to carry out the actual comparison.