Loading...
Searching...
No Matches
Par04RunAction.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26#ifndef PAR04RUNACTION_HH
27#define PAR04RUNACTION_HH
28
29#include "G4UserRunAction.hh"
31#include <CLHEP/Units/SystemOfUnits.h> // for GeV
32#include <G4String.hh> // for G4String
33#include <G4ThreeVector.hh> // for G4ThreeVector
34#include <G4Types.hh> // for G4int
35#include <G4VUserPrimaryGeneratorAction.hh> // for G4VUserPrimaryGeneratorA...
36#include <string> // for basic_string
37#include "G4Event.hh" // for G4Event
38#include "G4ParticleGun.hh" // for G4ParticleGun
39#include "G4ParticleTable.hh" // for G4ParticleTable
40#include "G4SystemOfUnits.hh" // for GeV
41#include "Par04EventInformation.hh" // for Par04EventInformation
44class G4Run;
46
47/**
48 * @brief Run action
49 *
50 * Create analysis file and define control histograms for showers in detectors.
51 * Histograms are configured taking into account the dimensions of the readout mesh.
52 * Ntuple with hits is also stored. It contains energy of the primary particle,
53 * coordinates (cylindrical) of the hit and the deposited energy.
54 *
55 */
56
58{
59 public:
60 /// Constructor. Defines the histograms.
62 virtual ~Par04RunAction();
63
64 /// Open the file for the analysis
65 virtual void BeginOfRunAction(const G4Run*) final;
66 /// Write and close the file
67 virtual void EndOfRunAction(const G4Run*) final;
68
69 private:
70 /// Pointer to detector construction to retrieve the detector dimensions to
71 /// setup the histograms
73 /// Pointer to event action to save hits
75 /// Timer measurement
76 std::chrono::steady_clock::time_point fChronoStart;
77 std::chrono::steady_clock::time_point fChronoEnd;
78};
79
80#endif /* PAR04RUNACTION_HH */
Event action class for hits' analysis.
virtual void BeginOfRunAction(const G4Run *) final
Open the file for the analysis.
virtual ~Par04RunAction()
Par04EventAction * fEventAction
Pointer to event action to save hits.
virtual void EndOfRunAction(const G4Run *) final
Write and close the file.
Par04DetectorConstruction * fDetector
Pointer to detector construction to retrieve the detector dimensions to setup the histograms.
std::chrono::steady_clock::time_point fChronoEnd
std::chrono::steady_clock::time_point fChronoStart
Timer measurement.

Applications | User Support | Publications | Collaboration