ATLAS Offline Software
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 
9 namespace ForwardTracker {
10 
11  Collimator::Collimator(double z, double xaperture, Side side):
12  m_label ("Collimator"),
13  m_side (side),
14  m_frontFace(z),
15  m_rearFace (z),
16  m_position (TransverseShift(z).x(),
17  TransverseShift(z).y(),
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 
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 }
ForwardTracker::Collimator::m_xaperture
double m_xaperture
Definition: ForwardTracker/ForwardTracker/Collimator.h:48
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
ForwardTracker::TransverseShift
TransversePoint TransverseShift(double z)
Definition: TransverseShift.cxx:13
python.trigbs_prescaleL1.ost
ost
Definition: trigbs_prescaleL1.py:104
max
#define max(a, b)
Definition: cfImp.cxx:41
ForwardTracker::Collimator
Definition: ForwardTracker/ForwardTracker/Collimator.h:19
ForwardTracker::Collimator::str
std::string str() const
Definition: ForwardTracker/src/Collimator.cxx:33
ForwardTracker::IParticle::transversePosition
virtual TransversePoint transversePosition() const =0
ForwardTracker::Collimator::m_xinner
double m_xinner
Definition: ForwardTracker/ForwardTracker/Collimator.h:50
x
#define x
ForwardTracker::Collimator::m_xouter
double m_xouter
Definition: ForwardTracker/ForwardTracker/Collimator.h:49
ForwardTracker::Collimator::m_side
Side m_side
Definition: ForwardTracker/ForwardTracker/Collimator.h:44
IParticle.h
ForwardTracker::operator<<
std::ostream & operator<<(std::ostream &, const Beamline &)
Definition: ForwardTracker/src/Beamline.cxx:105
TransverseShift.h
TRT::Hit::side
@ side
Definition: HitInfo.h:83
ForwardTracker::Collimator::Collimator
Collimator(double, double, Side)
Definition: ForwardTracker/src/Collimator.cxx:11
z
#define z
ForwardTracker::Collimator::m_label
std::string m_label
Definition: ForwardTracker/ForwardTracker/Collimator.h:43
ForwardTracker::Collimator::m_frontFace
double m_frontFace
Definition: ForwardTracker/ForwardTracker/Collimator.h:45
Side
Definition: WaferTree.h:36
Collimator.h
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
ForwardTracker::IParticle
Definition: ForwardDetectors/ForwardTracker/ForwardTracker/IParticle.h:16
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
ForwardTracker::Collimator::track
void track(IParticle &) const
Definition: ForwardTracker/src/Collimator.cxx:24
ForwardTracker::Collimator::m_rearFace
double m_rearFace
Definition: ForwardTracker/ForwardTracker/Collimator.h:46
ForwardTracker::Collimator::isOutOfAperture
bool isOutOfAperture(const TransversePoint &p) const
Definition: ForwardTracker/ForwardTracker/Collimator.h:52
y
#define y
ForwardTracker::Collimator::m_position
Point m_position
Definition: ForwardTracker/ForwardTracker/Collimator.h:47
ForwardTracker
Definition: ForwardTracker/ForwardTracker/Beamline.h:12