Skip to content

Commit bdb6ff8

Browse files
author
Gianfranco Ingratta
committed
added comments to explain beam variables
1 parent bcb9898 commit bdb6ff8

File tree

1 file changed

+40
-14
lines changed

1 file changed

+40
-14
lines changed

duneanaobj/StandardRecord/SRBeamBranch.h

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,32 @@ namespace caf
1919
constexpr static float NaN = std::numeric_limits<float>::signaling_NaN();
2020

2121
public:
22+
/// @name beam variables
23+
/// @brief Quantities used to characterize the spill-by-spill beam quality.
24+
///
25+
/// These variables store measurements from multiple devices placed along the beam line.
26+
///
27+
/// - **POT (Protons on Target):** Measured by the toroids E:TRTGDT, E:TOR101, and E:TR101D.
28+
/// The POT value is given per pulse and includes a normalization factor of 1e12 so that
29+
/// users do not need to apply any additional scaling.
30+
///
31+
/// - **Horn Current:** Determined as a linear combination of four strip-line measurements
32+
/// (NSLINA, NSLINB, NSLINC, and NSLIND).
33+
/// The calculation follows the method described in
34+
/// <https://cdcvs.fnal.gov/redmine/projects/novaart/repository/svn/entry/trunk/IFDBSpillInfo/IFDBSpillInfo_module.cc#L685>.
35+
///
36+
/// - **Beam Position (Pre-target):** Measured by the monitors “121” and “TGT”, which provide
37+
/// the horizontal and vertical position of the beam, as well as its intensity, in the
38+
/// pre-target region for each of the six batches.
39+
///
40+
/// - **Beam Position (On target):** Computed as an intensity-weighted average of the
41+
/// measurements from the 121 and TGT monitors.
42+
///
43+
/// - **Beam Width (TGT location):** the MTGTDS device contains the readout voltages of
44+
/// horizontal and vertical wires (206 values, 48 horizontal + 48 vertical + additional values).
45+
/// The horizontal and vertical spread of the beam is obtained from a gaussian fit of the voltages
46+
/// as function of the wire postion
47+
///@{
2248
bool ismc; ///< data or simulated beam pulse?
2349

2450
bool isgoodpulse = true; ///< Was the pot for a pulse good? (only applicable to data)
@@ -27,25 +53,25 @@ namespace caf
2753
unsigned long int gpspulsetimesec = 0; ///< pulse time from GPS [s]
2854
unsigned long int gpspulsetimensec = 0; ///< pulse time from GPS [ns]
2955
signed long long int deltapulsetimensec = -9999999; ///< Delta time [ns]
30-
float pulsepot = NaN; ///< POT in pulse including factor of 1e12 so that a user does not have to apply this correction
31-
float potTOR101 = NaN; ///< POT as measured by the toroid E:TOR101
32-
float potTR101D = NaN; ///< POT as measured by the toroid E:TR101D
56+
float pulsepot = NaN; ///< POT as measured by the toroid E:TRTGDT device
57+
float potTOR101 = NaN; ///< POT as measured by the toroid E:TOR101 device
58+
float potTR101D = NaN; ///< POT as measured by the toroid E:TR101D device
3359
float hornI = NaN; ///< Horn current [kA]
34-
float hornDir = NaN; ///< Horn polarity
35-
std::vector<double> horizontalposTGT; ///< horizontal beam position as measured by E:HPTGT beam monitor
36-
std::vector<double> horizontalintTGT; ///< horizontal beam intensity as measured by E:HITGT beam monitor
37-
std::vector<double> horizontalpos121; ///< horizontal beam position as measured by E:HP121 beam monitor
38-
std::vector<double> verticalposTGT; ///< vertical beam position as measured by E:VPTGT beam monitor
39-
std::vector<double> verticalintTGT; ///< vertical beam intensity as measured by E:VITGT beam monitor
40-
std::vector<double> verticalpos121; ///< vertical beam position as measured by E:VP121 beam monitor
41-
std::vector<double> multiwireInfo; ///< measured beam intensity from horizontal and vertical wires from E:MTGTDS beam monitor
60+
float hornDir = NaN; ///< Horn polarity [V]
61+
float beamHwidth = NaN; ///< Beam horizontal width [mm]
62+
float beamVwidth = NaN; ///< Beam vertical width [mm]
63+
std::vector<double> horizontalposTGT; ///< horizontal beam position as measured by E:HPTGT device (7 values = 6 batches + 1 mean value) [mm]
64+
std::vector<double> horizontalintTGT; ///< horizontal beam intensity as measured by E:HITGT device (7 values = 6 batches + 1 mean value) []
65+
std::vector<double> horizontalpos121; ///< horizontal beam position as measured by E:HP121 device (7 values = 6 batches + 1 mean value) [mm]
66+
std::vector<double> verticalposTGT; ///< vertical beam position as measured by E:VPTGT device (7 values = 6 batches + 1 mean value) []
67+
std::vector<double> verticalintTGT; ///< vertical beam intensity as measured by E:VITGT device (7 values = 6 batches + 1 mean value) [mm]
68+
std::vector<double> verticalpos121; ///< vertical beam position as measured by E:VP121 device (7 values = 6 batches + 1 mean value) [mm]
69+
std::vector<double> multiwireInfo; ///< horizontal and vertical readout voltages measured by E:MTGTDS device (216 values) [a.u.]
4270

4371
bool isFHC() const { return hornI > 0; }; ///< Checks #hornI to see if the polarity is positive --> this is FHC
4472
bool is0HC() const { return std::abs(hornI) < 1; }; ///< Checks #hornI to see if the polarity is zero
4573
bool isRHC() const { return hornI < 0; } ///< Checks #hornI to see if the polarity is negative --> this is RHC
46-
47-
// someday when we have real beam we'll have beam parameters here to include.
48-
// this is just a reminder/placeholder for now.
74+
///@}
4975

5076
};
5177
}

0 commit comments

Comments
 (0)