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