/* This file is part of MAUS: http://micewww.pp.rl.ac.uk:8080/projects/maus * * MAUS is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * MAUS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MAUS. If not, see . * */ /** @class MapCppTrackerRecon * Digitize events by running Tracker electronics simulation. * */ #ifndef _SRC_MAP_MAPCPPTrackerDigits_H_ #define _SRC_MAP_MAPCPPTrackerDigits_H_ // C headers #include #include #include // C++ headers #include #include #include #include #include // Other headers #include "Interface/Squeak.hh" #include "Config/MiceModule.hh" #include "src/common_cpp/Utils/CppErrorHandler.hh" #include "src/common_cpp/Utils/JsonWrapper.hh" #include "src/common_cpp/DataStructure/Spill.hh" #include "src/common_cpp/DataStructure/SciFiEvent.hh" #include "src/common_cpp/Recon/SciFi/RealDataDigitization.hh" #include "src/common_cpp/DataStructure/SciFiDigit.hh" namespace MAUS { class MapCppTrackerDigits { public: MapCppTrackerDigits(); ~MapCppTrackerDigits(); /** Sets up the worker * * \param argJsonConfigDocument a JSON document with * the configuration. */ bool birth(std::string argJsonConfigDocument); /** Shutdowns the worker * * This takes no arguments and does nothing */ bool death(); /** process JSON document * * Receive a document with MC hits and return * a document with digits * \param document a line/spill from the JSON input */ std::string process(std::string document); void read_in_json(std::string json_data); void save_to_json(MAUS::Spill *spill); private: /// This should be the classname std::string _classname; /// This will contain the configuration Json::Value _configJSON; /// This will contain the root value after parsing Json::Value _json_root; Json::Value* _spill_json; Spill* _spill_cpp; /// JsonCpp setup Json::Reader reader; /// Cut value for npe. double minPE; /// Vector with the MICE SciFi Modules. std::vector modules; int SciFiRunRecon; }; // Don't forget this trailing colon!!!! #endif } // ~namespace MAUS