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/>.
20
#include "Interface/Squeak.hh"
22
#include "Recon/Global/ImportCkovRecon.hh"
28
void ImportCkovRecon::process(const MAUS::CkovEvent &ckov_event,
29
MAUS::GlobalEvent* global_event,
30
std::string mapper_name) {
32
for (size_t i = 0; i < ckov_event.GetCkovDigitArraySize(); ++i) {
33
CkovDigit ckov_digit = ckov_event.GetCkovDigitArrayElement(i);
34
CkovA ckovA = ckov_digit.GetCkovA();
35
MAUS::DataStructure::Global::SpacePoint* GlobalCkovASpacePoint =
36
new MAUS::DataStructure::Global::SpacePoint();
37
GlobalCkovASpacePoint->
38
set_detector(MAUS::DataStructure::Global::kCherenkovA);
39
GlobalCkovASpacePoint->set_num_photoelectrons(ckovA.GetNumberOfPes());
40
CkovB ckovB = ckov_digit.GetCkovB();
41
MAUS::DataStructure::Global::SpacePoint* GlobalCkovBSpacePoint =
42
new MAUS::DataStructure::Global::SpacePoint();
43
GlobalCkovBSpacePoint->
44
set_detector(MAUS::DataStructure::Global::kCherenkovB);
45
GlobalCkovBSpacePoint->set_num_photoelectrons(ckovB.GetNumberOfPes());
47
global_event->add_space_point(GlobalCkovASpacePoint);
48
global_event->add_space_point(GlobalCkovBSpacePoint);
52
} // ~namespace global