40
40
#include "TRandom.h"
41
41
#include "Config/MiceModule.hh"
42
42
#include "Utils/TOFCalibrationMap.hh"
43
#include "API/MapBase.hh"
46
class MapCppTOFMCDigitizer {
47
class MapCppTOFMCDigitizer : public MapBase<Json::Value> {
48
bool birth(std::string argJsonConfigDocument);
52
std::string process(std::string document);
54
bool check_sanity_mc(std::string document);
56
double get_npe(double dist, double edep);
58
std::vector<Json::Value> make_tof_digits(Json::Value hits);
60
void findTriggerPixel(std::vector<Json::Value> _alldigits);
49
MapCppTOFMCDigitizer();
52
void _birth(const std::string& argJsonConfigDocument);
56
void _process(Json::Value* data) const;
58
Json::Value check_sanity_mc(Json::Value& document) const;
60
double get_npe(double dist, double edep) const;
62
std::vector<Json::Value> make_tof_digits(Json::Value hits,
64
Json::Value& root) const;
66
std::string findTriggerPixel(std::vector<Json::Value> _alldigits) const;
61
67
Json::Value fill_tof_evt(int evnum, int snum,
62
std::vector<Json::Value> _alldigits);
68
std::vector<Json::Value> _alldigits,
69
std::string strig) const;
64
bool check_param(Json::Value* hit1, Json::Value* hit2);
71
bool check_param(Json::Value* hit1, Json::Value* hit2) const;
67
74
MiceModule* geo_module;
68
75
std::vector<const MiceModule*> tof_modules;
70
std::string _classname;
71
77
Json::Value _configJSON;
77
79
TOFCalibrationMap _map;
78
80
std::map<int, std::string> _triggerhit_pixels;
79
std::stringstream strig;
81
82
std::vector<std::string> _stationKeys;