ATLAS Offline Software
ScoringPlane.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef G4UserActions_ScoringPlane_H
6 #define G4UserActions_ScoringPlane_H
7 
8 #include "G4UserRunAction.hh"
9 #include "G4UserSteppingAction.hh"
10 #include "G4UserEventAction.hh"
11 
12 #include <string>
13 #include <memory>
14 
15 // Forward declarations
16 class TTree;
17 
18 namespace G4UA
19 {
20 
23  class ScoringPlane : public G4UserRunAction,
24  public G4UserSteppingAction,
25  public G4UserEventAction
26  {
27 
28  public:
29 
30  struct Config
31  {
32  double plane=22600;
33  int pkill=0;
34  std::string fname="ufo.root";
35  };
36 
37  ScoringPlane(const Config& config);
38  ~ScoringPlane();
39  virtual void BeginOfRunAction(const G4Run*) override;
40  virtual void EndOfRunAction(const G4Run*) override;
41  virtual void UserSteppingAction(const G4Step*) override;
42  virtual void BeginOfEventAction(const G4Event*) override;
43  virtual void EndOfEventAction(const G4Event*) override;
44  private:
46 
47  std::unique_ptr<TTree> m_tree0;
48  std::unique_ptr<TTree> m_tree1;
49 
50  int m_evt;
51  int m_ntr;
52 
53  int m_pdg;
54  double m_cha;
55  double m_ene;
56  double m_vx;
57  double m_vy;
58  double m_vz;
59  double m_x0;
60  double m_y0;
61  double m_z0;
62  double m_t0;
63  double m_px0;
64  double m_py0;
65  double m_pz0;
66  double m_x1;
67  double m_y1;
68  double m_z1;
69  double m_t1;
70  double m_px1;
71  double m_py1;
72  double m_pz1;
73  double m_x;
74  double m_y;
75  double m_z;
76 
77  }; // class ScoringPlane
78 
79 } // namespace G4UA
80 
81 #endif
G4UA::ScoringPlane::m_py1
double m_py1
Definition: ScoringPlane.h:71
G4UA::ScoringPlane::Config::pkill
int pkill
Definition: ScoringPlane.h:33
G4UA::ScoringPlane::m_z1
double m_z1
Definition: ScoringPlane.h:68
G4UA::ScoringPlane::m_x
double m_x
Definition: ScoringPlane.h:73
G4UA::ScoringPlane::m_pdg
int m_pdg
Definition: ScoringPlane.h:53
G4UA::ScoringPlane::EndOfEventAction
virtual void EndOfEventAction(const G4Event *) override
Definition: ScoringPlane.cxx:146
G4UA::ScoringPlane::m_pz1
double m_pz1
Definition: ScoringPlane.h:72
G4UA::ScoringPlane::m_x0
double m_x0
Definition: ScoringPlane.h:59
G4UA::ScoringPlane::~ScoringPlane
~ScoringPlane()
Definition: ScoringPlane.cxx:30
G4UA::ScoringPlane::m_y0
double m_y0
Definition: ScoringPlane.h:60
G4UA::ScoringPlane::m_ene
double m_ene
Definition: ScoringPlane.h:55
G4UA
for nSW
Definition: CalibrationDefaultProcessing.h:19
G4UA::ScoringPlane::m_evt
int m_evt
Definition: ScoringPlane.h:50
G4UA::ScoringPlane::m_ntr
int m_ntr
Definition: ScoringPlane.h:51
G4UA::ScoringPlane::m_vz
double m_vz
Definition: ScoringPlane.h:58
G4UA::ScoringPlane::m_vx
double m_vx
Definition: ScoringPlane.h:56
G4UA::ScoringPlane::m_x1
double m_x1
Definition: ScoringPlane.h:66
G4UA::ScoringPlane::m_px1
double m_px1
Definition: ScoringPlane.h:70
G4UA::ScoringPlane::m_config
Config m_config
Definition: ScoringPlane.h:45
G4UA::ScoringPlane::m_y1
double m_y1
Definition: ScoringPlane.h:67
G4UA::ScoringPlane::m_t0
double m_t0
Definition: ScoringPlane.h:62
G4UA::ScoringPlane::Config::plane
double plane
Definition: ScoringPlane.h:32
G4UA::ScoringPlane::EndOfRunAction
virtual void EndOfRunAction(const G4Run *) override
Definition: ScoringPlane.cxx:77
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
G4UA::ScoringPlane::BeginOfRunAction
virtual void BeginOfRunAction(const G4Run *) override
Definition: ScoringPlane.cxx:34
G4UA::ScoringPlane::Config
Definition: ScoringPlane.h:31
G4UA::ScoringPlane::m_y
double m_y
Definition: ScoringPlane.h:74
G4UA::ScoringPlane::m_tree0
std::unique_ptr< TTree > m_tree0
Definition: ScoringPlane.h:47
G4UA::ScoringPlane::BeginOfEventAction
virtual void BeginOfEventAction(const G4Event *) override
Definition: ScoringPlane.cxx:140
G4UA::ScoringPlane::m_z
double m_z
Definition: ScoringPlane.h:75
G4UA::ScoringPlane::ScoringPlane
ScoringPlane(const Config &config)
Definition: ScoringPlane.cxx:18
G4UA::ScoringPlane
Definition: ScoringPlane.h:26
G4UA::ScoringPlane::m_z0
double m_z0
Definition: ScoringPlane.h:61
G4UA::ScoringPlane::m_cha
double m_cha
Definition: ScoringPlane.h:54
G4UA::ScoringPlane::m_t1
double m_t1
Definition: ScoringPlane.h:69
G4UA::ScoringPlane::m_px0
double m_px0
Definition: ScoringPlane.h:63
G4UA::ScoringPlane::m_tree1
std::unique_ptr< TTree > m_tree1
Definition: ScoringPlane.h:48
G4UA::ScoringPlane::Config::fname
std::string fname
Definition: ScoringPlane.h:34
G4UA::ScoringPlane::UserSteppingAction
virtual void UserSteppingAction(const G4Step *) override
Definition: ScoringPlane.cxx:86
G4UA::ScoringPlane::m_vy
double m_vy
Definition: ScoringPlane.h:57
G4UA::ScoringPlane::m_pz0
double m_pz0
Definition: ScoringPlane.h:65
G4UA::ScoringPlane::m_py0
double m_py0
Definition: ScoringPlane.h:64