ATLAS Offline Software
Loading...
Searching...
No Matches
FPTracker::Collimator Class Reference

#include <Collimator.h>

Inheritance diagram for FPTracker::Collimator:
Collaboration diagram for FPTracker::Collimator:

Public Types

typedef std::shared_ptr< CollimatorPtr_t
typedef std::vector< Ptr_tContainer_t
typedef std::shared_ptr< const IBeamElementConstPtr_t
typedef Container_t::iterator Iter_t
typedef Container_t::const_iterator ConstIter_t
typedef std::list< Ptr_tList_t
typedef List_t::iterator ListIter_t
typedef List_t::const_iterator ConstListIter_t

Public Member Functions

 Collimator (double, double, Side)
IBeamElement::ConstPtr_t clone () const
double frontFace () const
double rearFace () const
double zabspos () const
double zsignedpos () const
Side side () const
Point position () const
std::string label () const
std::string str () const
bool isEndElement () const
void track (IParticle &) const
void calibrate (IParticle &)

Private Member Functions

bool isOutOfAperture (const TransversePoint &) const

Private Attributes

Point m_position
double m_xaperture
double m_xouter
double m_xinner
Side m_side

Static Private Attributes

static const std::string s_label ="Collimator"

Detailed Description

Definition at line 20 of file FPTracker/FPTracker/Collimator.h.

Member Typedef Documentation

◆ ConstIter_t

typedef Container_t::const_iterator FPTracker::IBeamElement::ConstIter_t
inherited

Definition at line 45 of file FPTracker/FPTracker/IBeamElement.h.

◆ ConstListIter_t

typedef List_t::const_iterator FPTracker::IBeamElement::ConstListIter_t
inherited

Definition at line 49 of file FPTracker/FPTracker/IBeamElement.h.

◆ ConstPtr_t

typedef std::shared_ptr< const IBeamElement > FPTracker::IBeamElement::ConstPtr_t
inherited

Definition at line 40 of file FPTracker/FPTracker/IBeamElement.h.

◆ Container_t

typedef std::vector< Ptr_t > FPTracker::Collimator::Container_t

Definition at line 41 of file FPTracker/FPTracker/Collimator.h.

◆ Iter_t

typedef Container_t::iterator FPTracker::IBeamElement::Iter_t
inherited

Definition at line 44 of file FPTracker/FPTracker/IBeamElement.h.

◆ List_t

typedef std::list< Ptr_t > FPTracker::IBeamElement::List_t
inherited

Definition at line 47 of file FPTracker/FPTracker/IBeamElement.h.

◆ ListIter_t

typedef List_t::iterator FPTracker::IBeamElement::ListIter_t
inherited

Definition at line 48 of file FPTracker/FPTracker/IBeamElement.h.

◆ Ptr_t

typedef std::shared_ptr< Collimator > FPTracker::Collimator::Ptr_t

Definition at line 40 of file FPTracker/FPTracker/Collimator.h.

Constructor & Destructor Documentation

◆ Collimator()

FPTracker::Collimator::Collimator ( double zpos,
double xaperture,
Side side )

Definition at line 20 of file FPTracker/src/Collimator.cxx.

20 :
22 beamlineXPosition(zpos).x(),
23 beamlineXPosition(zpos).y(),
24 zpos
25 ),
26 m_xaperture(xaperture),
27 m_xouter( std::numeric_limits<double>::max() ),
28 m_xinner( -1*std::numeric_limits<double>::max() ),
30 {
31 }
#define y
#define x
TransversePoint beamlineXPosition(double z)

Member Function Documentation

◆ calibrate()

void FPTracker::Collimator::calibrate ( IParticle & particle)
virtual

Implements FPTracker::IBeamElement.

Definition at line 78 of file FPTracker/src/Collimator.cxx.

79 {
80 // the collimator jaws start wide open.
81 this->track(particle);
82 double partX =particle.position().x();
83 m_xouter = partX+m_xaperture;
84 m_xinner = partX-m_xaperture;
85
86 }
void track(IParticle &) const
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses

◆ clone()

IBeamElement::ConstPtr_t FPTracker::Collimator::clone ( ) const
virtual

Implements FPTracker::IBeamElement.

Definition at line 33 of file FPTracker/src/Collimator.cxx.

33 {
35 return pbe;
36 }
Collimator(double, double, Side)
std::shared_ptr< const IBeamElement > ConstPtr_t

◆ frontFace()

double FPTracker::Collimator::frontFace ( ) const
virtual

Implements FPTracker::IBeamElement.

Definition at line 38 of file FPTracker/src/Collimator.cxx.

38{ return m_position.z(); }

◆ isEndElement()

bool FPTracker::Collimator::isEndElement ( ) const
virtual

Implements FPTracker::IBeamElement.

Definition at line 57 of file FPTracker/src/Collimator.cxx.

57{ return false; }

◆ isOutOfAperture()

bool FPTracker::Collimator::isOutOfAperture ( const TransversePoint & point) const
private

Definition at line 59 of file FPTracker/src/Collimator.cxx.

59 {
60 double xp = point.x();
61 return (xp>m_xouter or xp<m_xinner);
62 }

◆ label()

std::string FPTracker::Collimator::label ( ) const
virtual

Implements FPTracker::IBeamElement.

Definition at line 44 of file FPTracker/src/Collimator.cxx.

44{ return s_label; }

◆ position()

Point FPTracker::Collimator::position ( ) const
virtual

Implements FPTracker::IBeamElement.

Definition at line 42 of file FPTracker/src/Collimator.cxx.

42{ return m_position; }

◆ rearFace()

double FPTracker::Collimator::rearFace ( ) const
virtual

Implements FPTracker::IBeamElement.

Definition at line 39 of file FPTracker/src/Collimator.cxx.

39{ return m_position.z(); }

◆ side()

Side FPTracker::Collimator::side ( ) const
virtual

Implements FPTracker::IBeamElement.

Definition at line 43 of file FPTracker/src/Collimator.cxx.

43{ return m_side; }

◆ str()

std::string FPTracker::Collimator::str ( ) const
virtual

Implements FPTracker::IBeamElement.

Definition at line 46 of file FPTracker/src/Collimator.cxx.

46 {
47 std::stringstream ost;
48 ost <<"-- Collimator --"<<'\n'
49 <<"postion " <<m_position<<'\n'
50 <<"xouter " <<m_xouter<<'\n'
51 <<"xinner " <<m_xinner<<'\n'
52 <<"xaperture " <<m_xaperture<<'\n'
53 <<"side " <<m_side<<'\n';
54 return ost.str();
55 }

◆ track()

void FPTracker::Collimator::track ( IParticle & particle) const
virtual

Implements FPTracker::IBeamElement.

Definition at line 64 of file FPTracker/src/Collimator.cxx.

65 {
66
67 particle.setBeamCoordinateShift(this);
68
69 if (particle.isOutOfAperture()){return;}
70
71 if ( isOutOfAperture( particle.transversePosition() ) )
72 {
73 particle.setOutOfAperture(true);
74 }
75
76 }
bool isOutOfAperture(const TransversePoint &) const

◆ zabspos()

double FPTracker::Collimator::zabspos ( ) const
virtual

Implements FPTracker::IBeamElement.

Definition at line 40 of file FPTracker/src/Collimator.cxx.

40{ return std::fabs(m_position.z()); }

◆ zsignedpos()

double FPTracker::Collimator::zsignedpos ( ) const
virtual

Implements FPTracker::IBeamElement.

Definition at line 41 of file FPTracker/src/Collimator.cxx.

41{ return m_position.z(); }

Member Data Documentation

◆ m_position

Point FPTracker::Collimator::m_position
private

Definition at line 46 of file FPTracker/FPTracker/Collimator.h.

◆ m_side

Side FPTracker::Collimator::m_side
private

Definition at line 50 of file FPTracker/FPTracker/Collimator.h.

◆ m_xaperture

double FPTracker::Collimator::m_xaperture
private

Definition at line 47 of file FPTracker/FPTracker/Collimator.h.

◆ m_xinner

double FPTracker::Collimator::m_xinner
private

Definition at line 49 of file FPTracker/FPTracker/Collimator.h.

◆ m_xouter

double FPTracker::Collimator::m_xouter
private

Definition at line 48 of file FPTracker/FPTracker/Collimator.h.

◆ s_label

const std::string FPTracker::Collimator::s_label ="Collimator"
staticprivate

Definition at line 45 of file FPTracker/FPTracker/Collimator.h.


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