~mwinter4/maus/ckov-reco

« back to all changes in this revision

Viewing changes to src/common_cpp/Recon/Global/DataStructureHelper.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:8080/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
/* Author: Peter Lane
 
18
 */
 
19
 
 
20
#ifndef COMMON_CPP_DATASTRUCTUREHELPER_HH
 
21
#define COMMON_CPP_DATASTRUCTUREHELPER_HH
 
22
 
 
23
#include <map>
 
24
#include <string>
 
25
#include <vector>
 
26
 
 
27
#include "TLorentzVector.h"
 
28
 
 
29
#include "src/common_cpp/Recon/Global/Detector.hh"
 
30
#include "src/common_cpp/DataStructure/Primary.hh"
 
31
#include "src/common_cpp/DataStructure/Global/PrimaryChain.hh"
 
32
#include "src/common_cpp/DataStructure/Global/ReconEnums.hh"
 
33
#include "src/common_cpp/DataStructure/Global/TrackPoint.hh"
 
34
#include "src/common_cpp/Optics/PhaseSpaceVector.hh"
 
35
#include "src/common_cpp/Simulation/MAUSPrimaryGeneratorAction.hh"
 
36
 
 
37
class MiceModule;
 
38
 
 
39
namespace MAUS {
 
40
namespace GlobalDS = ::MAUS::DataStructure::Global;
 
41
 
 
42
namespace recon {
 
43
namespace global {
 
44
 
 
45
class DataStructureHelper {
 
46
 public:
 
47
  ~DataStructureHelper() { }
 
48
  static const DataStructureHelper& GetInstance();
 
49
  std::vector<const MiceModule *> FindModulesByName(const MiceModule * module,
 
50
                                                    std::string name) const;
 
51
  double GetDetectorZPosition(const GlobalDS::DetectorPoint detector_id) const;
 
52
  void GetDetectorAttributes(const Json::Value& json_document,
 
53
                             DetectorMap& detectors)
 
54
                                      const;
 
55
  std::vector<MAUS::DataStructure::Global::PrimaryChain*>*
 
56
  GetPrimaryChains(const Json::Value& recon_event) const;
 
57
  MAUS::PhaseSpaceVector TrackPoint2PhaseSpaceVector(
 
58
      const MAUS::DataStructure::Global::TrackPoint& track_point) const;
 
59
  MAUS::DataStructure::Global::TrackPoint PhaseSpaceVector2TrackPoint(
 
60
      const MAUS::PhaseSpaceVector& vector,
 
61
      const double z,
 
62
      const MAUS::DataStructure::Global::PID particle_id) const;
 
63
  MAUS::Primary PGParticle2Primary(
 
64
      MAUS::MAUSPrimaryGeneratorAction::PGParticle& pgparticle) const;
 
65
 
 
66
  /*
 
67
  void GetGlobalRawTracks(const Json::Value& recon_event,
 
68
                          const DetectorMap& detectors,
 
69
                          std::vector<MAUS::recon::global::Track>& raw_tracks);
 
70
  void GetGlobalTracks(const Json::Value& recon_event,
 
71
                       const DetectorMap& detectors,
 
72
                       std::vector<MAUS::recon::global::Track>& raw_tracks);
 
73
  void GetGlobalTracks(const Json::Value& recon_event,
 
74
                       const std::string& json_node_name,
 
75
                       const DetectorMap& detectors,
 
76
                       std::vector<MAUS::recon::global::Track>& raw_tracks);
 
77
 
 
78
  Json::Value TrackToJson(const MAUS::recon::global::Track& track);
 
79
  GlobalTrackPoint TrackPointToGlobalTrackPoint(
 
80
      const MAUS::recon::global::TrackPoint& track_point);
 
81
  GlobalTrackPoint TrackPointToGlobalTrackPoint(
 
82
      const MAUS::recon::global::TrackPoint& track_point,
 
83
      const bool on_mass_shell);
 
84
  */
 
85
 protected:
 
86
  DataStructureHelper() { }
 
87
  CovarianceMatrix GetJsonCovarianceMatrix(
 
88
      const Json::Value& value) const;
 
89
};
 
90
 
 
91
}  // namespace global
 
92
}  // namespace recon
 
93
}  // namespace MAUS
 
94
 
 
95
#endif