DUNE StandardRecord
Base object for DUNE analysis files (CAFs)
SRBeamBranch.h
Go to the documentation of this file.
1 
6 #ifndef DUNEANAOBJ_SRBEAMBRANCH_H
7 #define DUNEANAOBJ_SRBEAMBRANCH_H
8 
9 #include <cmath>
10 #include <limits>
11 
12 namespace caf
13 {
15  {
16  private:
17  // save on typing below
18  constexpr static float NaN = std::numeric_limits<float>::signaling_NaN();
19 
20  public:
21  bool ismc;
22 
23  bool isgoodpulse = true;
24  unsigned long int pulsetimesec = 0;
25  unsigned long int pulsetimensec = 0;
26  unsigned long int gpspulsetimesec = 0;
27  unsigned long int gpspulsetimensec = 0;
28  signed long long int deltapulsetimensec = -9999999;
29  float pulsepot = NaN;
30  float hornI = NaN;
31 
32  bool isFHC() const { return hornI > 0; };
33  bool is0HC() const { return std::abs(hornI) < 1; };
34  bool isRHC() const { return hornI < 0; }
35 
36  // someday when we have real beam we'll have beam parameters here to include.
37  // this is just a reminder/placeholder for now.
38 
39  };
40 }
41 
42 #endif //DUNEANAOBJ_SRBEAMBRANCH_H
Definition: SRBeamBranch.h:15
signed long long int deltapulsetimensec
Delta time [ns].
Definition: SRBeamBranch.h:28
unsigned long int gpspulsetimesec
pulse time from GPS [s]
Definition: SRBeamBranch.h:26
bool is0HC() const
Checks hornI to see if the polarity is positive --> this is FHC.
Definition: SRBeamBranch.h:33
float hornI
Horn current [kA].
Definition: SRBeamBranch.h:30
bool isgoodpulse
Was the pot for a pulse good? (only applicable to data)
Definition: SRBeamBranch.h:23
bool ismc
data or simulated beam pulse?
Definition: SRBeamBranch.h:21
unsigned long int gpspulsetimensec
pulse time from GPS [ns]
Definition: SRBeamBranch.h:27
float pulsepot
POT in pulse including factor of 1e12 so that a user does not have to apply this correction.
Definition: SRBeamBranch.h:29
unsigned long int pulsetimesec
pulse time in seconds [s]
Definition: SRBeamBranch.h:24
unsigned long int pulsetimensec
pulse time in nanoseconds [ns]
Definition: SRBeamBranch.h:25
bool isRHC() const
Checks hornI to see if the polarity is zero.
Definition: SRBeamBranch.h:34
Common Analysis Files.
Definition: SRBeamBranch.h:13