EDepSimCombinationGenerator.hh
Go to the documentation of this file.
1 #ifndef EDepSim_CombinationGenerator_hh_Seen
2 #define EDepSim_CombinationGenerator_hh_Seen
3 
4 class G4Event;
5 #include <G4VPrimaryGenerator.hh>
6 
7 /// Copy the vertex position from the source to the destination
8 /// G4PrimaryVertex object. This has the effect of making the particles in
9 /// the vertices come from the same location (or vertex). This also has an
10 /// option to set the position of the destination vertex relative to the
11 /// source vertex. When this option is used, the source vertex position is
12 /// added to the destination vertex (i.e. if the source vertex is [10,10,10]
13 /// and the destination vertex is originally [1,1,1] the destination vertex
14 /// becomes [11,11,11].
15 namespace EDepSim {class CombinationGenerator;}
16 class EDepSim::CombinationGenerator: public G4VPrimaryGenerator {
17 public:
18  CombinationGenerator(int src, int dest, bool relative);
19  virtual ~CombinationGenerator();
20 
21  /// A pure virtual method to generate the actual primary particles which
22  /// must be implemented in each derived class.
23  virtual void GeneratePrimaryVertex(G4Event* evt);
24 
25  /// Return the name of this generator.
26  G4String GetName();
27 
28 private:
29  /// The index of the source vertex to copy from.
30  int fSource;
31 
32  /// The index of the destination vertex to copy to.
34 
35  /// A flag to indicate if the new vertex position is a direct copy of the
36  /// source, or simply relative to the source.
37  bool fRelative;
38 };
39 #endif
int fSource
The index of the source vertex to copy from.
int fDestination
The index of the destination vertex to copy to.
virtual void GeneratePrimaryVertex(G4Event *evt)
G4String GetName()
Return the name of this generator.
Construct a module from components.
Definition: TG4HitSegment.h:10
CombinationGenerator(int src, int dest, bool relative)
TCEvent evt
Definition: DataStructs.cxx:7