ATLAS Offline Software
MomentumConservation.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_MomentumConservation_H
6 #define G4UserActions_MomentumConservation_H
7 
8 #include "G4UserEventAction.hh"
9 #include "G4UserSteppingAction.hh"
11 
12 #include <iostream>
13 
14 namespace G4UA
15 {
16 
19  class MomentumConservation : public G4UserEventAction,
20  public G4UserSteppingAction,
21  public AthMessaging
22  {
23  public:
24 
26 
27  virtual void EndOfEventAction(const G4Event*) override;
28  virtual void UserSteppingAction(const G4Step*) override;
29 
30  private:
31 
33  double _sum_edep;
34 
36  double _sum_eesc;
37 
38  }; // class MomentumConservation
39 
40 } // namespace G4UA
41 
42 #endif
G4UA::MomentumConservation::MomentumConservation
MomentumConservation()
Definition: MomentumConservation.cxx:16
G4UA::MomentumConservation::UserSteppingAction
virtual void UserSteppingAction(const G4Step *) override
Definition: MomentumConservation.cxx:59
G4UA
for nSW
Definition: CalibrationDefaultProcessing.h:19
G4UA::MomentumConservation::_sum_edep
double _sum_edep
Sum of energy deposited in the detector.
Definition: MomentumConservation.h:33
G4UA::MomentumConservation::_sum_eesc
double _sum_eesc
Sum of energy escaping the detector (volume = 0)
Definition: MomentumConservation.h:36
G4UA::MomentumConservation::EndOfEventAction
virtual void EndOfEventAction(const G4Event *) override
Definition: MomentumConservation.cxx:21
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
G4UA::MomentumConservation
checks momentum conservation
Definition: MomentumConservation.h:22
AthMessaging.h