~christopher-hunt08/maus/maus_integrated_kalman

« back to all changes in this revision

Viewing changes to src/map/MapCppTOFMCDigitizer/MapCppTOFMCDigitizer.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:
40
40
#include "TRandom.h"
41
41
#include "Config/MiceModule.hh"
42
42
#include "Utils/TOFCalibrationMap.hh"
 
43
#include "API/MapBase.hh"
43
44
 
44
45
namespace MAUS {
45
46
 
46
 
class MapCppTOFMCDigitizer {
 
47
class MapCppTOFMCDigitizer : public MapBase<Json::Value> {
47
48
 public:
48
 
  bool birth(std::string argJsonConfigDocument);
49
 
 
50
 
  bool death();
51
 
 
52
 
  std::string process(std::string document);
53
 
 
54
 
  bool check_sanity_mc(std::string document);
55
 
 
56
 
  double get_npe(double dist, double edep);
57
 
 
58
 
  std::vector<Json::Value> make_tof_digits(Json::Value hits);
59
 
 
60
 
  void findTriggerPixel(std::vector<Json::Value> _alldigits);
 
49
  MapCppTOFMCDigitizer();
 
50
 
 
51
 private:
 
52
  void _birth(const std::string& argJsonConfigDocument);
 
53
 
 
54
  void _death();
 
55
 
 
56
  void _process(Json::Value* data) const;
 
57
 
 
58
  Json::Value check_sanity_mc(Json::Value& document) const;
 
59
 
 
60
  double get_npe(double dist, double edep) const;
 
61
 
 
62
  std::vector<Json::Value> make_tof_digits(Json::Value hits,
 
63
                                           double gentime,
 
64
                                           Json::Value& root) const;
 
65
 
 
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;
63
70
 
64
 
  bool check_param(Json::Value* hit1, Json::Value* hit2);
 
71
  bool check_param(Json::Value* hit1, Json::Value* hit2) const;
65
72
 
66
73
 private:
67
74
  MiceModule* geo_module;
68
75
  std::vector<const MiceModule*> tof_modules;
69
76
 
70
 
  std::string _classname;
71
77
  Json::Value _configJSON;
72
 
  Json::Value root;
73
 
  Json::Reader reader;
74
 
  Json::Value mc;
75
 
  Json::Value digit;
76
78
 
77
79
  TOFCalibrationMap _map;
78
80
  std::map<int, std::string> _triggerhit_pixels;
79
 
  std::stringstream strig;
80
81
 
81
82
  std::vector<std::string> _stationKeys;
82
83
 
83
 
  double gentime;
84
84
  bool fDebug;
85
85
};
86
86
}