ATLAS Offline Software
Loading...
Searching...
No Matches
ForwardTracker/src/Collimator.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9namespace ForwardTracker {
10
11 Collimator::Collimator(double z, double xaperture, Side side):
12 m_label ("Collimator"),
13 m_side (side),
15 m_rearFace (z),
18 z),
19 m_xaperture(xaperture),
20 m_xouter ( std::numeric_limits<double>::max()),
21 m_xinner (-1*std::numeric_limits<double>::max())
22 {}
23
24 void Collimator::track(IParticle& particle) const {
25
26 particle.setBeamCoordinateShift(this);
27
28 if (particle.isOutOfAperture()) return;
29
30 if (this->isOutOfAperture(particle.transversePosition())) particle.setOutOfAperture(true);
31 }
32
33 std::string Collimator::str() const {
34
35 std::stringstream ost;
36
37 ost << "m_label " << m_label << "\n"
38 << "m_side " << m_side << "\n"
39 << "m_frontFace " << m_frontFace << "\n"
40 << "m_rearFace " << m_rearFace << "\n"
41 << "m_postion " << m_position << "\n"
42 << "m_xaperture " << m_xaperture << "\n"
43 << "m_xouter " << m_xouter << "\n"
44 << "m_xinner " << m_xinner << "\n";
45
46 return ost.str();
47 }
48
49 std::ostream& operator<<(std::ostream& os, const Collimator& coll) { os << coll.str(); return os; }
50}
#define y
#define x
#define z
#define max(a, b)
Definition cfImp.cxx:41
bool isOutOfAperture(const TransversePoint &p) const
virtual TransversePoint transversePosition() const =0
TransversePoint TransverseShift(double z)
std::ostream & operator<<(std::ostream &, const Beamline &)
STL namespace.