EDepSimSpillTimeGenerator.hh
Go to the documentation of this file.
1 #ifndef EDepSim_SpillTimeGenerator_hh_seen
2 #define EDepSim_SpillTimeGenerator_hh_seen
3 
4 #include <vector>
5 
7 
8 /// Generate an interaction time according to the spill parameters. This
9 /// object is created using the EDepSim::SpillTimeFactory where the spill
10 /// parameters can be set (there is more documentation there). The time of
11 /// the interaction is adjusted for the neutrino travel time.
12 namespace EDepSim {class SpillTimeGenerator;}
14 public:
15  /// Create the generatory. The name is for documentation, the spillTime
16  /// gives the start time of the first bunch at the center of the EDepSim::
17  /// hall, the bunchSeparation is the time between bunch starts, and the
18  /// bunchLength is the time length of a bunch with respect to it's start
19  /// time.
20  SpillTimeGenerator(G4String name,
21  double spillTime,
22  double bunchSeparation,
23  double bunchLength,
24  const std::vector<double>& bunchPower);
25  virtual ~SpillTimeGenerator();
26 
27  /// Return the time of the event to be generated.
28  double GetTime(const G4LorentzVector& vertex);
29 
30  /// Flag if the time should be forced. This tells the calling routine
31  /// that the time returned by this generator should override any times
32  /// found in the original vertex. This returns true, so that the
33  /// generated spill time overrides the interaction time.
34  virtual bool ForceTime();
35 
36 private:
37  /// The time that the neutrinos are crossing (0,0,0).
38  double fSpillTime;
39 
40  /// The time between bunch starts.
42 
43  /// The length of a bunch. This is the gaussian width of the bunch.
44  double fBunchLength;
45 
46  /// The power in each bunch.
47  std::vector<double> fBunchPower;
48 
49  /// The maximum power in a bunch.
50  double fMaxPower;
51 };
52 #endif
static QCString name
Definition: declinfo.cpp:673
double fBunchSeparation
The time between bunch starts.
double fBunchLength
The length of a bunch. This is the gaussian width of the bunch.
SpillTimeGenerator(G4String name, double spillTime, double bunchSeparation, double bunchLength, const std::vector< double > &bunchPower)
Construct a module from components.
Definition: TG4HitSegment.h:10
double fMaxPower
The maximum power in a bunch.
double fSpillTime
The time that the neutrinos are crossing (0,0,0).
double GetTime(const G4LorentzVector &vertex)
Return the time of the event to be generated.
std::vector< double > fBunchPower
The power in each bunch.
vertex reconstruction