~mwinter4/maus/ckov-reco

« back to all changes in this revision

Viewing changes to src/map/MapCppGlobalTrackReconstructor/MapCppGlobalTrackReconstructor.hh

  • Committer: Durga Rajaram
  • Date: 2014-01-14 07:07:02 UTC
  • mfrom: (659.1.80 relcand)
  • Revision ID: durga@fnal.gov-20140114070702-2l1fuj1w6rraw7xe
Tags: MAUS-v0.7.6
MAUS-v0.7.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of MAUS: http://micewww.pp.rl.ac.uk/projects/maus
 
2
 *
 
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.
 
7
 *
 
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.
 
12
 *
 
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/>.
 
15
 *
 
16
 */
 
17
 
 
18
#ifndef _SRC_MAP_MAPCPPGLOBALTRACKRECONSTRUCTOR_HH_
 
19
#define _SRC_MAP_MAPCPPGLOBALTRACKRECONSTRUCTOR_HH_
 
20
 
 
21
// C++ headers
 
22
#include <string>
 
23
#include <vector>
 
24
#include <map>
 
25
 
 
26
// external libraries
 
27
#include "TMinuit.h"
 
28
 
 
29
// G4MICE from legacy
 
30
#include "BeamTools/BTField.hh"
 
31
#include "Config/MiceModule.hh"
 
32
#include "Interface/Squeak.hh"
 
33
 
 
34
// MAUS
 
35
#include "DataStructure/GlobalEvent.hh"
 
36
#include "DataStructure/Global/ReconEnums.hh"
 
37
#include "DataStructure/Global/Track.hh"
 
38
#include "Recon/Global/Detector.hh"
 
39
 
 
40
namespace MAUS {
 
41
 
 
42
class OpticsModel;
 
43
class CovarianceMatrix;
 
44
 
 
45
namespace recon {
 
46
namespace global {
 
47
 
 
48
class TrackFitter;
 
49
 
 
50
}  // namespace global
 
51
}  // namespace recon
 
52
 
 
53
/** @class MapCppGlobalTrackReconstructor
 
54
 *  Reconstruct tracks at the desired longitudinal spacing using the desired
 
55
 *  track fitting method.
 
56
 */
 
57
class MapCppGlobalTrackReconstructor {
 
58
 public:
 
59
  /** @brief Allocates the global-scope Minuit instance used for minimization.
 
60
   */
 
61
  MapCppGlobalTrackReconstructor();
 
62
 
 
63
  /** @brief Destroys the *global* scope Minuit object
 
64
   *
 
65
   *  This takes no arguments.
 
66
   */
 
67
  ~MapCppGlobalTrackReconstructor();
 
68
 
 
69
  /** @brief Begin the startup procedure for TrackReconstructor
 
70
   *
 
71
   *
 
72
   *  @param config a JSON document with the configuration.
 
73
   */
 
74
  bool birth(std::string argJsonConfigDocument);
 
75
 
 
76
  /** @brief Shuts down the reconstructor
 
77
   *
 
78
   *  This takes no arguments
 
79
   */
 
80
  bool death();
 
81
 
 
82
  /** @brief Generate a list of reconstructed tracks.
 
83
   *
 
84
   *  This function takes a single spill and generates a list of tracks based
 
85
   *  on the desired method of recon.
 
86
   *
 
87
   * @param document a JSON document for a spill
 
88
   */
 
89
  std::string process(std::string document);
 
90
 
 
91
 private:
 
92
  Json::Value configuration_;
 
93
  OpticsModel * optics_model_;
 
94
  MAUS::recon::global::TrackFitter * track_fitter_;
 
95
 
 
96
  MAUS::recon::global::DetectorMap detectors_;
 
97
 
 
98
  static const std::string kClassname;
 
99
  BTField * electromagnetic_field_;
 
100
 
 
101
  void SetupOpticsModel();
 
102
  void SetupTrackFitter();
 
103
  void LoadRawTracks(
 
104
      GlobalEvent const * const global_event,
 
105
      MAUS::DataStructure::Global::TrackPArray & tracks) const;
 
106
  void InsertIntermediateTrackPoints(
 
107
      MAUS::DataStructure::Global::Track * track) const;
 
108
};
 
109
 
 
110
}  // namespace MAUS
 
111
 
 
112
#endif  // _SRC_MAP_MapCppGlobalTrackReconstructor_HH_