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_MAPCPPGLOBALRAWTRACKS_HH_
19
#define _SRC_MAP_MAPCPPGLOBALRAWTRACKS_HH_
30
#include "Config/MiceModule.hh"
31
#include "Interface/Squeak.hh"
34
#include "DataStructure/Global/Track.hh"
35
#include "Recon/Global/Detector.hh"
36
#include "Recon/Global/Particle.hh"
40
class CovarianceMatrix;
44
class SciFiTrackPoint;
46
namespace DataStructure {
57
/** @class MapCppGlobalRawTracks
58
* Reconstruct tracks at the desired longitudinal spacing using the desired
59
* track fitting method.
61
class MapCppGlobalRawTracks {
63
/** @brief Allocates the global-scope Minuit instance used for minimization.
65
MapCppGlobalRawTracks();
67
/** @brief Destroys the *global* scope Minuit object
69
* This takes no arguments.
71
~MapCppGlobalRawTracks();
73
/** @brief Begin the startup procedure for TrackReconstructor
76
* @param config a JSON document with the configuration.
78
bool birth(std::string argJsonConfigDocument);
80
/** @brief Shuts down the reconstructor
82
* This takes no arguments
86
/** @brief Generate a list of reconstructed tracks.
88
* This function takes a single spill and generates a list of tracks based
89
* on the desired method of recon.
91
* @param document a JSON document for a spill
93
std::string process(std::string document);
96
MAUS::recon::global::DetectorMap detectors_;
99
static const std::string kClassname;
101
// ************************
102
// Data Loading Functions
103
// ************************
105
void AssembleRawTracks(MAUS::ReconEvent * recon_event,
106
MAUS::GlobalEvent * global_event);
108
MAUS::recon::global::DetectorMap LoadDetectorConfiguration();
111
MAUS::ReconEvent const * const recon_event,
112
MAUS::DataStructure::Global::TrackPArray & tof_tracks);
114
void PopulateTOFTrackPoint(
115
const MAUS::recon::global::Detector & detector,
116
const std::vector<TOFSpacePoint>::const_iterator & tof_space_point,
117
const double slab_width,
118
const size_t number_of_slabs,
119
MAUS::DataStructure::Global::TrackPoint * track_point);
121
double FindEnergy(const double mass,
122
const double delta_z,
123
const double delta_t) const;
125
double TOFSlabEnergyLoss(const double beta, const double mass) const;
126
double TOFMeanStoppingPower(const double beta, const double mass) const;
128
void LoadSciFiTracks(
129
MAUS::ReconEvent const * const recon_event,
130
MAUS::DataStructure::Global::TrackPArray & sci_fi_tracks);
132
void PopulateSciFiTrackPoint(
133
const MAUS::recon::global::Detector & detector,
134
const std::vector<SciFiTrackPoint *>::const_iterator & scifi_track_point,
135
MAUS::DataStructure::Global::TrackPoint * track_point);
138
// ***********************************
139
// Particle Identification Functions
140
// ***********************************
142
MAUS::DataStructure::Global::PID IdentifyParticle(const double beta);
144
double Beta(MAUS::DataStructure::Global::PID pid, const double momentum);
149
#endif // _SRC_MAP_MapCppGlobalRawTracks_HH_