~christopher-hunt08/maus/maus_integrated_kalman

« back to all changes in this revision

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

  • Committer: Durga Rajaram
  • Date: 2014-07-16 15:13:05 UTC
  • mfrom: (659.1.92 cand)
  • Revision ID: durga@fnal.gov-20140716151305-q27rv1y9p03v9lks
Tags: MAUS-v0.9, MAUS-v0.9.0
MAUS-v0.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#include "src/common_cpp/DataStructure/SciFiNoiseHit.hh"
43
43
#include "src/common_cpp/DataStructure/MCEvent.hh"
44
44
#include "src/common_cpp/DataStructure/Spill.hh"
 
45
#include "src/common_cpp/API/MapBase.hh"
45
46
#include "src/common_cpp/JsonCppProcessors/SpillProcessor.hh"
46
47
 
47
48
namespace MAUS {
48
49
 
49
 
class MapCppTrackerMCNoise {
 
50
class MapCppTrackerMCNoise : public MapBase<Data> {
50
51
  public:
51
52
  /** Constructor - initialises pointers to NULL */
52
53
  MapCppTrackerMCNoise();
54
55
  /** Constructor - deletes any allocated memory */
55
56
  ~MapCppTrackerMCNoise();
56
57
 
 
58
  private:
57
59
  /** Sets up the worker */
58
 
  bool birth(std::string argJsonConfigDocument);
 
60
  void _birth(const std::string& argJsonConfigDocument);
59
61
 
60
62
  /** Shuts down the worker */
61
 
  bool death();
 
63
  void _death();
62
64
 
63
 
  /** @brief Process JSON document
 
65
  /** @brief Process Data object
64
66
   *
65
 
   *  Receive a document with SciFi digits and returns
66
 
   *  a document with simulated noise digits added
 
67
   *  Receive a structure with SciFi digits and returns
 
68
   *  a structure with simulated noise digits added
67
69
   */
68
 
  std::string process(std::string document);
69
 
 
70
 
  /** Reads in json data to a Spill object */
71
 
  void read_in_json(std::string json_data);
72
 
 
73
 
  /** Saves digits to json. */
74
 
  void save_to_json(MAUS::Spill &spill);
 
70
  void _process(Data* data) const;
75
71
 
76
72
  /** @brief Simulates dark count
77
73
   *
78
74
   *  Check each SciFi channel for Dark PEs
79
75
   *  adds results to SciFiDigits
80
76
   */
81
 
  void dark_count(MAUS::Spill &spill);
 
77
  void dark_count(MAUS::Spill &spill) const;
82
78
 
83
79
  private:
84
80
  // MapCppMCNoise setup containers
85
 
  /// This should be the classname
86
 
  std::string _classname;
87
81
  /// This will contain the configuration
88
82
  Json::Value* _configJSON;
89
 
  /// This will contain the root value after parsing
90
 
  Json::Value* _spill_json;
91
83
  /// This will contain the root value before parsing
92
84
  std::string argJsonConfigDocument;
93
 
  /// This will contain the spill value
94
 
  Spill* _spill_cpp;
95
85
  /// This will contain all SciFi elements in MICE
96
86
  std::vector<const MiceModule*> SF_modules;
97
87
  /// Mean number of dark count PE
98
 
  double poisson_mean;
99
 
  ///  JsonCpp setup
100
 
  Json::Reader reader;
 
88
  double _poisson_mean;
101
89
};
102
90
} // end namespace
103
91