1
/* This file is part of MAUS: http://micewww.pp.rl.ac.uk/projects/maus
3
* MAUS is free software: you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License as published by
5
* the Free Software Foundation, either version 3 of the License, or
6
* (at your option) any later version.
8
* MAUS is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with MAUS. If not, see <http://www.gnu.org/licenses/>.
18
#ifndef _SRC_MAP_MAPCPPGLOBALTRACKRECONSTRUCTOR_HH_
19
#define _SRC_MAP_MAPCPPGLOBALTRACKRECONSTRUCTOR_HH_
30
#include "BeamTools/BTField.hh"
31
#include "Config/MiceModule.hh"
32
#include "Interface/Squeak.hh"
35
#include "DataStructure/GlobalEvent.hh"
36
#include "DataStructure/Global/ReconEnums.hh"
37
#include "DataStructure/Global/Track.hh"
38
#include "Recon/Global/Detector.hh"
43
class CovarianceMatrix;
53
/** @class MapCppGlobalTrackReconstructor
54
* Reconstruct tracks at the desired longitudinal spacing using the desired
55
* track fitting method.
57
class MapCppGlobalTrackReconstructor {
59
/** @brief Allocates the global-scope Minuit instance used for minimization.
61
MapCppGlobalTrackReconstructor();
63
/** @brief Destroys the *global* scope Minuit object
65
* This takes no arguments.
67
~MapCppGlobalTrackReconstructor();
69
/** @brief Begin the startup procedure for TrackReconstructor
72
* @param config a JSON document with the configuration.
74
bool birth(std::string argJsonConfigDocument);
76
/** @brief Shuts down the reconstructor
78
* This takes no arguments
82
/** @brief Generate a list of reconstructed tracks.
84
* This function takes a single spill and generates a list of tracks based
85
* on the desired method of recon.
87
* @param document a JSON document for a spill
89
std::string process(std::string document);
92
Json::Value configuration_;
93
OpticsModel * optics_model_;
94
MAUS::recon::global::TrackFitter * track_fitter_;
96
MAUS::recon::global::DetectorMap detectors_;
98
static const std::string kClassname;
99
BTField * electromagnetic_field_;
101
void SetupOpticsModel();
102
void SetupTrackFitter();
104
GlobalEvent const * const global_event,
105
MAUS::DataStructure::Global::TrackPArray & tracks) const;
106
void InsertIntermediateTrackPoints(
107
MAUS::DataStructure::Global::Track * track) const;
112
#endif // _SRC_MAP_MapCppGlobalTrackReconstructor_HH_