ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
ForwardTracker::Particle Class Reference

#include <Particle.h>

Inheritance diagram for ForwardTracker::Particle:
Collaboration diagram for ForwardTracker::Particle:

Public Member Functions

 Particle ()
 
 Particle (double x, double y, double z, double px, double py, double pz, bool charge)
 
Point position () const
 
Pointposition ()
 
Point positionRelBeam () const
 
Point direction () const
 
Pointdirection ()
 
TransversePoint displacement () const
 
TransversePoint transversePosition () const
 
double z () const
 
double & z ()
 
double momentum () const
 
bool charged () const
 
bool isOutOfAperture () const
 
bool debug () const
 
void setBeamCoordinateShift (const TransversePoint &p)
 
void setBeamCoordinateShift (const IBeamElement *b)
 
void setOutOfAperture (bool out)
 
void setDebug (bool flag)
 
void addMsg (const std::string &msg)
 
void updatePositionFromDisplacement (const TransversePoint &disp)
 
std::string str () const
 
Pointdirection_nc ()
 

Private Attributes

Point m_position
 
TransversePoint m_beamCoordinateShift
 
double m_momentum
 
bool m_charged
 
Point m_direction
 
bool m_outOfAperture
 
bool m_debug
 
std::string m_msg
 

Detailed Description

Definition at line 17 of file ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h.

Constructor & Destructor Documentation

◆ Particle() [1/2]

ForwardTracker::Particle::Particle ( )

Definition at line 15 of file ForwardTracker/src/Particle.cxx.

15  :
16  m_position (0., 0., 0.),
17  m_momentum (0),
18  m_charged (false),
19  m_direction (Point(0., 0., 0.)),
20  m_outOfAperture(false),
21  m_debug (false)
22  {}

◆ Particle() [2/2]

ForwardTracker::Particle::Particle ( double  x,
double  y,
double  z,
double  px,
double  py,
double  pz,
bool  charge 
)

Definition at line 24 of file ForwardTracker/src/Particle.cxx.

24  :
25  m_position (x, y, z),
26  m_momentum (std::sqrt(px*px + py*py + pz*pz)),
30  m_debug (false)
31  {}

Member Function Documentation

◆ addMsg()

void ForwardTracker::Particle::addMsg ( const std::string &  msg)
inlinevirtual

◆ charged()

bool ForwardTracker::Particle::charged ( ) const
inlinevirtual

◆ debug()

bool ForwardTracker::Particle::debug ( ) const
inlinevirtual

Implements ForwardTracker::IParticle.

Definition at line 36 of file ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h.

36 { return m_debug; }

◆ direction() [1/2]

Point& ForwardTracker::Particle::direction ( )
inlinevirtual

◆ direction() [2/2]

Point ForwardTracker::Particle::direction ( ) const
inlinevirtual

◆ direction_nc()

Point& ForwardTracker::IParticle::direction_nc ( )
inlineinherited

Definition at line 46 of file ForwardDetectors/ForwardTracker/ForwardTracker/IParticle.h.

46 { return direction(); }

◆ displacement()

TransversePoint ForwardTracker::Particle::displacement ( ) const
inlinevirtual

◆ isOutOfAperture()

bool ForwardTracker::Particle::isOutOfAperture ( ) const
inlinevirtual

◆ momentum()

double ForwardTracker::Particle::momentum ( ) const
inlinevirtual

◆ position() [1/2]

Point& ForwardTracker::Particle::position ( )
inlinevirtual

◆ position() [2/2]

Point ForwardTracker::Particle::position ( ) const
inlinevirtual

◆ positionRelBeam()

Point ForwardTracker::Particle::positionRelBeam ( ) const
inlinevirtual

◆ setBeamCoordinateShift() [1/2]

void ForwardTracker::Particle::setBeamCoordinateShift ( const IBeamElement b)
inlinevirtual

Implements ForwardTracker::IParticle.

Definition at line 39 of file ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h.

39 { m_beamCoordinateShift = -1.*(b->position()).transverse(); }

◆ setBeamCoordinateShift() [2/2]

void ForwardTracker::Particle::setBeamCoordinateShift ( const TransversePoint p)
inlinevirtual

◆ setDebug()

void ForwardTracker::Particle::setDebug ( bool  flag)
inlinevirtual

◆ setOutOfAperture()

void ForwardTracker::Particle::setOutOfAperture ( bool  out)
inlinevirtual

Implements ForwardTracker::IParticle.

Definition at line 40 of file ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h.

40 { if (out) m_outOfAperture = true; } // once out, always out

◆ str()

std::string ForwardTracker::Particle::str ( ) const
virtual

Implements ForwardTracker::IParticle.

Definition at line 33 of file ForwardTracker/src/Particle.cxx.

33  {
34 
35  std::ostringstream ost;
36 
37  ost << " pos" << m_position
38  << " dir" << m_direction
39  << " mom " << m_momentum
40  << " prb" << this->positionRelBeam()
41  << " q " << m_charged
42  << " lost " << m_outOfAperture;
43 
44  if (not m_msg.empty()) ost << "\n msg " << m_msg;
45 
46  return ost.str();
47  }

◆ transversePosition()

TransversePoint ForwardTracker::Particle::transversePosition ( ) const
inlinevirtual

◆ updatePositionFromDisplacement()

void ForwardTracker::Particle::updatePositionFromDisplacement ( const TransversePoint disp)
inlinevirtual

Implements ForwardTracker::IParticle.

Definition at line 44 of file ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h.

44  {
45 
46  m_position[0] = disp[0] - m_beamCoordinateShift[0]; // when the displacement from the magnet center is equal to the distance from the beam axis,
47  m_position[1] = disp[1] - m_beamCoordinateShift[1]; // particle position position is 0 in global coordinates.
48  }

◆ z() [1/2]

double& ForwardTracker::Particle::z ( )
inlinevirtual

Implements ForwardTracker::IParticle.

Definition at line 32 of file ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h.

32 { return m_position[2]; }

◆ z() [2/2]

double ForwardTracker::Particle::z ( ) const
inlinevirtual

Implements ForwardTracker::IParticle.

Definition at line 31 of file ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h.

31 { return m_position.z(); }

Member Data Documentation

◆ m_beamCoordinateShift

TransversePoint ForwardTracker::Particle::m_beamCoordinateShift
private

◆ m_charged

bool ForwardTracker::Particle::m_charged
private

◆ m_debug

bool ForwardTracker::Particle::m_debug
private

◆ m_direction

Point ForwardTracker::Particle::m_direction
private

◆ m_momentum

double ForwardTracker::Particle::m_momentum
private

◆ m_msg

std::string ForwardTracker::Particle::m_msg
private

◆ m_outOfAperture

bool ForwardTracker::Particle::m_outOfAperture
private

◆ m_position

Point ForwardTracker::Particle::m_position
private

The documentation for this class was generated from the following files:
ForwardTracker::Particle::m_outOfAperture
bool m_outOfAperture
Definition: ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h:59
python.trigbs_prescaleL1.ost
ost
Definition: trigbs_prescaleL1.py:104
test_pyathena.px
px
Definition: test_pyathena.py:18
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
ForwardTracker::Particle::m_momentum
double m_momentum
Definition: ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h:56
ForwardTracker::Particle::m_direction
Point m_direction
Definition: ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h:58
x
#define x
Point
ChargedTracksWeightFilter::Spline::Point Point
Definition: ChargedTracksWeightFilter.cxx:11
ForwardTracker::Particle::z
double z() const
Definition: ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h:31
ForwardTracker::Particle::positionRelBeam
Point positionRelBeam() const
Definition: ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h:26
ForwardTracker::Particle::m_msg
std::string m_msg
Definition: ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h:61
ForwardTracker::Point::z
double z() const
Definition: ForwardTracker/ForwardTracker/Point.h:24
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ForwardTracker::Point::perp2
double perp2() const
Definition: ForwardTracker/ForwardTracker/Point.h:25
master.flag
bool flag
Definition: master.py:29
ForwardTracker::IParticle::direction
virtual Point direction() const =0
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
Amg::py
@ py
Definition: GeoPrimitives.h:39
ForwardTracker::Point::transverse
TransversePoint transverse() const
Definition: ForwardTracker/ForwardTracker/Point.h:28
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
ForwardTracker::Particle::m_charged
bool m_charged
Definition: ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h:57
ForwardTracker::Particle::m_debug
bool m_debug
Definition: ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h:60
ForwardTracker::Particle::charged
bool charged() const
Definition: ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h:34
y
#define y
ForwardTracker::Particle::m_beamCoordinateShift
TransversePoint m_beamCoordinateShift
Definition: ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h:55
ForwardTracker::ForwardTrackerConstants::beamPipeRadius2
static const double beamPipeRadius2
Definition: ForwardTrackerConstants.h:19
ForwardTracker::Particle::m_position
Point m_position
Definition: ForwardDetectors/ForwardTracker/ForwardTracker/Particle.h:54
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7