LDMX Software
PrimaryToEcalFilter.h
1#ifndef BIASING_PRIMARYTOECALFILTER_H
2#define BIASING_PRIMARYTOECALFILTER_H
3
4/*~~~~~~~~~~~~~~~~*/
5/* C++ StdLib */
6/*~~~~~~~~~~~~~~~~*/
7#include <string>
8
9/*~~~~~~~~~~~~~*/
10/* SimCore */
11/*~~~~~~~~~~~~~*/
12#include "SimCore/G4User/PtrRetrieval.h"
14
15/*~~~~~~~~~~~~~~~*/
16/* Framework */
17/*~~~~~~~~~~~~~~~*/
18#include "Framework/Logger.h"
19/*~~~~~~~~~~~~*/
20/* Geant4 */
21/*~~~~~~~~~~~~*/
22#include "G4EventManager.hh"
23#include "G4RunManager.hh"
24#include "G4Step.hh"
25
26// Forward declarations
27class G4Step;
28
29namespace biasing {
30
38 public:
46 PrimaryToEcalFilter(const std::string& name,
48
51
62 void stepping(const G4Step* step) override;
63
65 std::vector<simcore::TYPE> getTypes() override {
66 return {simcore::TYPE::STEPPING};
67 }
68
69 private:
71 double threshold_;
72
73}; // PrimaryToEcalFilter
74
75} // namespace biasing
76
77#endif // BIASING_PRIMARYTOECALFILTER_H
File holding UserAction prototype and supporting macro.
User stepping action used to filter events where the primary particle falls below a threshold before ...
void stepping(const G4Step *step) override
Only process if the track is a primary (parentID == 0) and if the event is not aborted and the partic...
std::vector< simcore::TYPE > getTypes() override
Retrieve the type of actions this class defines.
double threshold_
Energy [MeV] below which a primary should be vetoed.
PrimaryToEcalFilter(const std::string &name, framework::config::Parameters &parameters)
Constructor.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29
Interface that defines a user action.
Definition UserAction.h:47