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"
49
class MapCppTrackerMCNoise {
50
class MapCppTrackerMCNoise : public MapBase<Data> {
51
52
/** Constructor - initialises pointers to NULL */
52
53
MapCppTrackerMCNoise();
54
55
/** Constructor - deletes any allocated memory */
55
56
~MapCppTrackerMCNoise();
57
59
/** Sets up the worker */
58
bool birth(std::string argJsonConfigDocument);
60
void _birth(const std::string& argJsonConfigDocument);
60
62
/** Shuts down the worker */
63
/** @brief Process JSON document
65
/** @brief Process Data object
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
68
std::string process(std::string document);
70
/** Reads in json data to a Spill object */
71
void read_in_json(std::string json_data);
73
/** Saves digits to json. */
74
void save_to_json(MAUS::Spill &spill);
70
void _process(Data* data) const;
76
72
/** @brief Simulates dark count
78
74
* Check each SciFi channel for Dark PEs
79
75
* adds results to SciFiDigits
81
void dark_count(MAUS::Spill &spill);
77
void dark_count(MAUS::Spill &spill) const;
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
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
102
90
} // end namespace