ATLAS Offline Software
Loading...
Searching...
No Matches
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
14namespace 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
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
virtual void UserSteppingAction(const G4Step *) override
double _sum_edep
Sum of energy deposited in the detector.
double _sum_eesc
Sum of energy escaping the detector (volume = 0)
virtual void EndOfEventAction(const G4Event *) override