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/>.
19
/** @class MapCppEMRPlaneHits
20
* Reconstruct TOF data and creat Slab hits
21
* by running over the TOF digits.
25
#ifndef _MAP_MAPCPPEMRPLANEHITS_H_
26
#define _MAP_MAPCPPEMRPLANEHITS_H_
30
#include <json/json.h>
37
#include "Utils/EMRChannelMap.hh"
38
#include "DataStructure/Data.hh"
39
#include "DataStructure/Spill.hh"
40
#include "DataStructure/ReconEvent.hh"
41
#include "DataStructure/DAQData.hh"
42
#include "DataStructure/EMRDaq.hh"
43
#include "DataStructure/DBBSpillData.hh"
44
#include "DataStructure/EMRBar.hh"
45
#include "DataStructure/EMRBarHit.hh"
46
#include "DataStructure/EMRPlaneHit.hh"
47
#include "DataStructure/EMREvent.hh"
51
typedef std::vector<MAUS::EMRBarHit> EMRBarHitsVector;
52
typedef std::vector<EMRBarHitsVector> EMRBarVector;
53
typedef std::vector<EMRBarVector> EMRPlaneVector;
54
typedef std::vector<EMRPlaneVector> EMREventVector_4;
65
#define NUM_DBB_PLANES 48
66
#define NUM_DBB_CHANNELS 61
68
typedef std::vector<EMRPlaneData> EMRPlaneHitsVector;
69
typedef std::vector<EMRPlaneHitsVector> EMREventVector_2;
71
class MapCppEMRPlaneHits {
75
/** @brief Sets up the worker
77
* @param argJsonConfigDocument a JSON document with
80
bool birth(std::string argJsonConfigDocument);
82
/** @brief Shutdowns the worker
84
* This takes no arguments and does nothing.
88
/** @brief process JSON document
90
* @param document ?????.
92
std::string process(std::string document);
94
/** @brief process the data object
98
void process(MAUS::Data *data);
102
void processDBB(MAUS::EMRDaq EMRdaq, int nPartTrigger);
103
void processFADC(MAUS::EMRDaq EMRdaq, int nPartTrigger);
104
void fill(MAUS::Spill *spill, int nPartTrigger);
106
void reset_data_tmp(int nPartEvts);
108
std::string _classname;
110
EMRChannelMap _emrMap;
112
int _trigger_window_lower;
113
int _trigger_window_upper;
115
EMREventVector_2 _emr_events_tmp2;
116
EMREventVector_4 _emr_events_tmp4;