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 MAUSTrackingAction
19
* Geant4 calls this class before/after tracks propogated
21
* Collect the steps from MAUSSteppingAction, then create
22
* tracks in the datastructure.
26
#ifndef _SRC_COMMON_SIMULATION_MAUSTRACKINGACTION_H_
27
#define _SRC_COMMON_SIMULATION_MAUSTRACKINGACTION_H_
29
#include <sstream> // combining strings and numbers
31
#include <json/json.h> // for datastructure
33
#include <G4Track.hh> // arg to tracking action
34
#include <G4UserTrackingAction.hh> // inherit from
36
#include "MAUSSteppingAction.hh" // static method to grab steps
41
class MAUSTrackingAction : public G4UserTrackingAction {
43
/** @brief Add a new track to the stepping action and fill with some
46
void PreUserTrackingAction(const G4Track*);
48
/** @brief Put the final momentum of the track into the spill data
50
void PostUserTrackingAction(const G4Track*);
53
} // ends MAUS namespace
55
#endif // _SRC_COMMON_SIMULATION_MAUSTRACKINGACTION_H_