Belle II Software development
StackingAction.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <globals.hh>
12#include <G4UserStackingAction.hh>
13
14namespace Belle2 {
19
20 namespace Simulation {
21
25 class StackingAction : public G4UserStackingAction {
26
27 public:
28
31
34
36 virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack);
37
39 virtual void NewStage();
40
42 virtual void PrepareNewEvent();
43
45 void setPropagatedPhotonFraction(double fraction) { m_photonFraction = fraction; };
46
47
48 private:
49
51
52 };
53
54 } // Simulation namespace
55
57} // Belle2 namespace
StackingAction()
The StackingAction constructor.
virtual void NewStage()
Function that is called at each event when "urgent" stack is empty.
double m_photonFraction
The fraction of Cerenkov photons which will be kept and propagated.
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack)
Function that classifies new tracks.
~StackingAction()
The StackingAction destructor.
virtual void PrepareNewEvent()
Function called at begining of event.
void setPropagatedPhotonFraction(double fraction)
Set fraction of Cerenkov photons that are actually propagated.
Abstract base class for different kinds of events.