LDMX Software
ldmx::BeamElectronTruth Class Reference

Represents the truth information on beam electrons at the target. More...

#include <BeamElectronTruth.h>

Public Member Functions

 BeamElectronTruth ()=default
 Class constructor.
 
virtual ~BeamElectronTruth ()
 Class destructor.
 
void clear ()
 Clear the data in the object.
 
void setX (double x)
 Set x coordinate of the found beam electron.
 
void setY (double y)
 Set y_ coordinate of the found beam electron.
 
void setZ (double z)
 Set z coordinate of the found beam electron.
 
void setXYZ (double x, double y, double z)
 Set all three spatial coordinates at once.
 
double getX ()
 Get x coordinate of the beam electron.
 
double getY ()
 Get y_ coordinate of the beam electron.
 
double getZ ()
 Get z_ coordinate of the beam electron.
 
void setBinnedX (double x)
 SetBinned x coordinate of the found beam electron.
 
void setBinnedY (double y)
 SetBinned y coordinate of the found beam electron.
 
void setBinnedXY (double x, double y)
 Set all three binned spatial coordinates at once.
 
double getBinnedX ()
 Get binned x coordinate of the beam electron.
 
double getBinnedY ()
 GetBinned y_ coordinate of the beam electron.
 
void setBarX (double x)
 Set x bar number of the found beam electron.
 
void setBarY (double y)
 Set y_ bar number of the found beam electron.
 
void setBarXY (double x, double y)
 Set both bar number coordinates at once.
 
double getBarX ()
 Get x bar number of the found beam electron.
 
double getBarY ()
 Get y_ bar number of the found beam electron.
 
void setThreeMomentum (double px, double py, double pz)
 Set the entire three-momentum at once.
 
double getPx ()
 Get px component of the beam electron momentum.
 
double getPy ()
 Get py component of the beam electron momentum.
 
double getPz ()
 Get pz component of the beam electron momentum.
 
bool operator< (BeamElectronTruth &rhs)
 some sorting operator is mandatory sort on hit Z coordinate
 

Private Member Functions

 ClassDef (BeamElectronTruth, 2)
 

Private Attributes

double x_ {-999}
 x-coordinate ("truth" resolution, but within merging tolerance)
 
double y_ {-999}
 y-coordinate ("truth" resolution, but within merging tolerance)
 
double z_ {-9999}
 z-coordinate ("truth" resolution, in practice, set to taget z-coord = 0
 
double binned_x_ {-999}
 x-coordinate (with TS resolution)
 
double binned_y_ {-999}
 y-coordinate (with TS resolution)
 
double bar_x_ {-1}
 TS vertical bar number overlapping with x-coordinate.
 
double bar_y_ {-1}
 TS horizontal bar number overlapping with y-coordinate.
 
double px_ {-999}
 momentum x-component
 
double py_ {-999}
 momentum y-component
 
double pz_ {-999}
 momentum z-component
 

Friends

std::ostream & operator<< (std::ostream &o, const BeamElectronTruth &d)
 Print a description of this object.
 

Detailed Description

Represents the truth information on beam electrons at the target.

Definition at line 24 of file BeamElectronTruth.h.

Constructor & Destructor Documentation

◆ ~BeamElectronTruth()

virtual ldmx::BeamElectronTruth::~BeamElectronTruth ( )
inlinevirtual

Class destructor.

Definition at line 34 of file BeamElectronTruth.h.

34{};

Member Function Documentation

◆ clear()

void ldmx::BeamElectronTruth::clear ( )

Clear the data in the object.

Definition at line 9 of file BeamElectronTruth.cxx.

9 {
10 x_ = -999;
11 y_ = -999;
12 z_ = -999;
13 px_ = -999;
14 py_ = -999;
15 pz_ = -999;
16 binned_x_ = -999;
17 binned_y_ = -999;
18}
double binned_x_
x-coordinate (with TS resolution)
double pz_
momentum z-component
double px_
momentum x-component
double py_
momentum y-component
double binned_y_
y-coordinate (with TS resolution)
double z_
z-coordinate ("truth" resolution, in practice, set to taget z-coord = 0
double x_
x-coordinate ("truth" resolution, but within merging tolerance)
double y_
y-coordinate ("truth" resolution, but within merging tolerance)

References binned_x_, binned_y_, px_, py_, pz_, x_, y_, and z_.

◆ getBarX()

double ldmx::BeamElectronTruth::getBarX ( )
inline

Get x bar number of the found beam electron.

Returns
x The x (vertical) bar number of the found beam electron.

Definition at line 159 of file BeamElectronTruth.h.

159{ return bar_x_; }
double bar_x_
TS vertical bar number overlapping with x-coordinate.

References bar_x_.

Referenced by recon::BeamElectronLocator::produce().

◆ getBarY()

double ldmx::BeamElectronTruth::getBarY ( )
inline

Get y_ bar number of the found beam electron.

Returns
y_ The y_ (horizontal) bar number of the found beam electron.

Definition at line 165 of file BeamElectronTruth.h.

165{ return bar_y_; }
double bar_y_
TS horizontal bar number overlapping with y-coordinate.

References bar_y_.

Referenced by recon::BeamElectronLocator::produce().

◆ getBinnedX()

double ldmx::BeamElectronTruth::getBinnedX ( )
inline

Get binned x coordinate of the beam electron.

Returns
x The x coordinate of the found beam electron.

Definition at line 123 of file BeamElectronTruth.h.

123{ return binned_x_; }

References binned_x_.

◆ getBinnedY()

double ldmx::BeamElectronTruth::getBinnedY ( )
inline

GetBinned y_ coordinate of the beam electron.

Returns
y_ The y_ coordinate of the found beam electron.

Definition at line 129 of file BeamElectronTruth.h.

129{ return binned_y_; }

References binned_y_.

◆ getPx()

double ldmx::BeamElectronTruth::getPx ( )
inline

Get px component of the beam electron momentum.

Returns
px The px component of the beam electron momentum.

Definition at line 181 of file BeamElectronTruth.h.

181{ return px_; }

References px_.

◆ getPy()

double ldmx::BeamElectronTruth::getPy ( )
inline

Get py component of the beam electron momentum.

Returns
py The py component of the beam electron momentum.

Definition at line 187 of file BeamElectronTruth.h.

187{ return py_; }

References py_.

◆ getPz()

double ldmx::BeamElectronTruth::getPz ( )
inline

Get pz component of the beam electron momentum.

Returns
pz The pz component of the beam electron momentum.

Definition at line 193 of file BeamElectronTruth.h.

193{ return pz_; }

References pz_.

◆ getX()

double ldmx::BeamElectronTruth::getX ( )
inline

Get x coordinate of the beam electron.

Returns
x The x coordinate of the found beam electron.

Definition at line 81 of file BeamElectronTruth.h.

81{ return x_; }

References x_.

◆ getY()

double ldmx::BeamElectronTruth::getY ( )
inline

Get y_ coordinate of the beam electron.

Returns
y_ The y_ coordinate of the found beam electron.

Definition at line 87 of file BeamElectronTruth.h.

87{ return y_; }

References y_.

◆ getZ()

double ldmx::BeamElectronTruth::getZ ( )
inline

Get z_ coordinate of the beam electron.

Returns
z_ The z_ coordinate of the found beam electron.

Definition at line 93 of file BeamElectronTruth.h.

93{ return z_; }

References z_.

Referenced by operator<().

◆ operator<()

bool ldmx::BeamElectronTruth::operator< ( BeamElectronTruth & rhs)
inline

some sorting operator is mandatory sort on hit Z coordinate

Definition at line 199 of file BeamElectronTruth.h.

199{ return this->getZ() < rhs.getZ(); }
double getZ()
Get z_ coordinate of the beam electron.

References getZ().

◆ setBarX()

void ldmx::BeamElectronTruth::setBarX ( double x)
inline

Set x bar number of the found beam electron.

Parameters
xThe x (vertical) bar number of the found beam electron.

Definition at line 137 of file BeamElectronTruth.h.

137{ bar_x_ = x; }

References bar_x_.

Referenced by recon::BeamElectronLocator::produce().

◆ setBarXY()

void ldmx::BeamElectronTruth::setBarXY ( double x,
double y )
inline

Set both bar number coordinates at once.

Parameters
xThe x (vertical) bar number of the found beam electron.
yThe y (horizontal) bar number of the found beam electron.

Definition at line 150 of file BeamElectronTruth.h.

150 {
151 bar_x_ = x;
152 bar_y_ = y;
153 }

References bar_x_, and bar_y_.

◆ setBarY()

void ldmx::BeamElectronTruth::setBarY ( double y)
inline

Set y_ bar number of the found beam electron.

Parameters
y_The y_ (horizontal) bar number of the found beam electron.

Definition at line 143 of file BeamElectronTruth.h.

143{ bar_y_ = y; }

References bar_y_.

Referenced by recon::BeamElectronLocator::produce().

◆ setBinnedX()

void ldmx::BeamElectronTruth::setBinnedX ( double x)
inline

SetBinned x coordinate of the found beam electron.

Parameters
xThe x coordinate of the found beam electron.

Definition at line 101 of file BeamElectronTruth.h.

101{ binned_x_ = x; }

References binned_x_.

Referenced by recon::BeamElectronLocator::produce().

◆ setBinnedXY()

void ldmx::BeamElectronTruth::setBinnedXY ( double x,
double y )
inline

Set all three binned spatial coordinates at once.

Parameters
xThe binned x coordinate of the found beam electron.
yThe binned y coordinate of the found beam electron.

Definition at line 114 of file BeamElectronTruth.h.

114 {
115 binned_x_ = x;
116 binned_y_ = y;
117 }

References binned_x_, and binned_y_.

◆ setBinnedY()

void ldmx::BeamElectronTruth::setBinnedY ( double y)
inline

SetBinned y coordinate of the found beam electron.

Parameters
yThe y coordinate of the found beam electron.

Definition at line 107 of file BeamElectronTruth.h.

107{ binned_y_ = y; }

References binned_y_.

Referenced by recon::BeamElectronLocator::produce().

◆ setThreeMomentum()

void ldmx::BeamElectronTruth::setThreeMomentum ( double px,
double py,
double pz )

Set the entire three-momentum at once.

Parameters
pxThe x component of the three-momentum
pyThe y component of the three-momentum
pzThe z component of the three-momentum

◆ setX()

void ldmx::BeamElectronTruth::setX ( double x)
inline

Set x coordinate of the found beam electron.

Parameters
xThe x coordinate of the found beam electron.

Definition at line 50 of file BeamElectronTruth.h.

50{ x_ = x; }

References x_.

◆ setXYZ()

void ldmx::BeamElectronTruth::setXYZ ( double x,
double y,
double z )
inline

Set all three spatial coordinates at once.

Parameters
xThe x coordinate of the found beam electron.
yThe y coordinate of the found beam electron.
zThe z coordinate of the found beam electron.

Definition at line 71 of file BeamElectronTruth.h.

71 {
72 x_ = x;
73 y_ = y;
74 z_ = z;
75 }

References x_, y_, and z_.

Referenced by recon::BeamElectronLocator::produce().

◆ setY()

void ldmx::BeamElectronTruth::setY ( double y)
inline

Set y_ coordinate of the found beam electron.

Parameters
y_The y_ coordinate of the found beam electron.

Definition at line 56 of file BeamElectronTruth.h.

56{ y_ = y; }

References y_.

◆ setZ()

void ldmx::BeamElectronTruth::setZ ( double z)
inline

Set z coordinate of the found beam electron.

Parameters
zThe z coordinate of the found beam electron.

Definition at line 62 of file BeamElectronTruth.h.

62{ z_ = z; }

References z_.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & o,
const BeamElectronTruth & d )
friend

Print a description of this object.

Definition at line 19 of file BeamElectronTruth.cxx.

19 {
20 return o << " { " << "(x_: " << c.x_ << ", y_: " << c.y_ << ", z_: " << c.z_
21 << "); (binned X: " << c.binned_x_ << ", binned Y: " << c.binned_y_
22 << "); (px: " << c.px_ << ", py: " << c.py_ << ", pz: " << c.pz_
23 << ")";
24}

Member Data Documentation

◆ bar_x_

double ldmx::BeamElectronTruth::bar_x_ {-1}
private

TS vertical bar number overlapping with x-coordinate.

Definition at line 221 of file BeamElectronTruth.h.

221{-1};

Referenced by getBarX(), setBarX(), and setBarXY().

◆ bar_y_

double ldmx::BeamElectronTruth::bar_y_ {-1}
private

TS horizontal bar number overlapping with y-coordinate.

Definition at line 224 of file BeamElectronTruth.h.

224{-1};

Referenced by getBarY(), setBarXY(), and setBarY().

◆ binned_x_

double ldmx::BeamElectronTruth::binned_x_ {-999}
private

x-coordinate (with TS resolution)

Definition at line 215 of file BeamElectronTruth.h.

215{-999};

Referenced by clear(), getBinnedX(), setBinnedX(), and setBinnedXY().

◆ binned_y_

double ldmx::BeamElectronTruth::binned_y_ {-999}
private

y-coordinate (with TS resolution)

Definition at line 218 of file BeamElectronTruth.h.

218{-999};

Referenced by clear(), getBinnedY(), setBinnedXY(), and setBinnedY().

◆ px_

double ldmx::BeamElectronTruth::px_ {-999}
private

momentum x-component

Definition at line 227 of file BeamElectronTruth.h.

227{-999};

Referenced by clear(), and getPx().

◆ py_

double ldmx::BeamElectronTruth::py_ {-999}
private

momentum y-component

Definition at line 229 of file BeamElectronTruth.h.

229{-999};

Referenced by clear(), and getPy().

◆ pz_

double ldmx::BeamElectronTruth::pz_ {-999}
private

momentum z-component

Definition at line 231 of file BeamElectronTruth.h.

231{-999};

Referenced by clear(), and getPz().

◆ x_

double ldmx::BeamElectronTruth::x_ {-999}
private

x-coordinate ("truth" resolution, but within merging tolerance)

Definition at line 205 of file BeamElectronTruth.h.

205{-999};

Referenced by clear(), getX(), setX(), and setXYZ().

◆ y_

double ldmx::BeamElectronTruth::y_ {-999}
private

y-coordinate ("truth" resolution, but within merging tolerance)

Definition at line 208 of file BeamElectronTruth.h.

208{-999};

Referenced by clear(), getY(), setXYZ(), and setY().

◆ z_

double ldmx::BeamElectronTruth::z_ {-9999}
private

z-coordinate ("truth" resolution, in practice, set to taget z-coord = 0

Definition at line 212 of file BeamElectronTruth.h.

212{-9999};

Referenced by clear(), getZ(), setXYZ(), and setZ().


The documentation for this class was generated from the following files: