1
/* This file is part of MAUS: http://micewww.pp.rl.ac.uk:8080/projects/maus
3
* MAUS is free software: you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License as published by
5
* the Free Software Foundation, either version 3 of the License, or
6
* (at your option) any later version.
8
* MAUS is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with MAUS. If not, see <http://www.gnu.org/licenses/>.
18
/** @class MapCppGlobalPID
19
* Perform PID on incoming global tracks.
23
#ifndef _SRC_MAP_MAPCPPGLOBALPID_H_
24
#define _SRC_MAP_MAPCPPGLOBALPID_H_
30
#include <json/json.h>
40
#include "Interface/Squeak.hh"
41
#include "Config/MiceModule.hh"
42
#include "src/common_cpp/Utils/CppErrorHandler.hh"
43
#include "src/common_cpp/Utils/JsonWrapper.hh"
45
#include "src/common_cpp/DataStructure/Spill.hh"
46
#include "src/common_cpp/JsonCppProcessors/SpillProcessor.hh"
48
#include "DataStructure/Global/Track.hh"
50
#include "src/common_cpp/Recon/Global/PIDBase.hh"
51
#include "src/common_cpp/Recon/Global/PIDVarA.hh"
56
class MapCppGlobalPID {
58
/** Constructor, setting the internal variable #_classname */
61
/** @brief Sets up the worker
63
* @param argJsonConfigDocument a JSON document with
66
bool birth(std::string argJsonConfigDocument);
68
/** @brief Shutdowns the worker
70
* This takes no arguments and does nothing
74
/** @brief process JSON document
76
* Receive a document with global tracks, perform PID functons
77
* and return tracks with PID set
78
* @param document a line/spill from the JSON input
80
std::string process(std::string) const;
85
/// This will contain the configuration
86
Json::Value _configJSON;
91
/// Mapper name, useful for tracking results...
92
std::string _classname;
95
std::vector<MAUS::recon::global::PIDBase*> _pid_vars;
97
/// Hypotheses to test PID variables against
98
std::vector<std::string> _hypotheses;
100
/// File that holds PDFs
103
/// The current spill
106
/// File containing PDFs for use in PID
107
std::string PDF_file;
108
}; // Don't forget this trailing colon!!!!