EDepSimVPositionGenerator.hh
Go to the documentation of this file.
1 #ifndef EDepSim_VPositionGenerator_hh_seen
2 #define EDepSim_VPositionGenerator_hh_seen
3 
4 #include <G4String.hh>
5 #include <G4LorentzVector.hh>
6 
7 /// A base class used by ND20PrimaryGenerator to select candiate vertex
8 /// positions. Classes derived from EDepSim::VPositionGenerator are responsible
9 /// for returning new candidate positions that are passed to
10 /// EDepSim::VKinematicsGenerator by the EDepSim::PrimaryGenerator object. Each call
11 /// to EDepSim::VKinematicsGenerator will create a new "unique" primary vertex;
12 /// however, it may ignore the candidate position. The derived classes must
13 /// override two (pure virtual) EDepSim::VPositionGenerator methods. The
14 /// EDepSim::VPositionGenerator::GetPosition() must return a G4LorentzVector
15 /// object which the xyz components filled. The time component will be filled
16 /// later by a EDepSim::VTimeGenerator derived object. The
17 /// EDepSim::VPosition::ForcePosition() method must return a boolean to flag
18 /// whether the EDepSim::PrimaryGenerator should override the position selected by
19 /// EDepSim::VKinematicsGenerator with the one returned by
20 /// EDepSim::VPositionGenerator::GetPosition(). The ForcePosition methods should
21 /// generally return true.
22 namespace EDepSim {class VPositionGenerator;}
24 public:
25  VPositionGenerator(const G4String& name) : fName(name) {}
26  virtual ~VPositionGenerator() {}
27 
28  /// Return the candidate position for the primary vertex.
29  virtual G4LorentzVector GetPosition() = 0;
30 
31  /// Return true if this position should be forced for the primary vertex
32  /// (should generally return true).
33  virtual bool ForcePosition() = 0;
34 
35  /// Return the name of the generator.
36  G4String GetName() const {return fName;}
37 
38 private:
39  /// The name of the generator.
40  G4String fName;
41 
42 };
43 #endif
static QCString name
Definition: declinfo.cpp:673
virtual bool ForcePosition()=0
G4String fName
The name of the generator.
Construct a module from components.
Definition: TG4HitSegment.h:10
virtual G4LorentzVector GetPosition()=0
Return the candidate position for the primary vertex.
VPositionGenerator(const G4String &name)
G4String GetName() const
Return the name of the generator.