ATLAS Offline Software
Loading...
Searching...
No Matches
FPTracker/src/Plane.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "FPTracker/Plane.h"
9#include <cmath>
10#include <sstream>
11#include <cassert>
12namespace FPTracker{
13
14 const std::string Plane::s_label="Plane";
15 std::string Plane::label() const{return s_label;}
16
17 //Plane::Plane(double zpos, double xinnerp, const Magnet* mp, int side):
18 Plane::Plane(double zpos, Side side):
19 m_position( 0., 0., 0. ), m_side(side)
20 {
21 assert(zpos >= 0.);
22 zpos = side == beam2 ? -zpos:zpos;
24 m_position = Point(shift.x(), shift.y(), zpos);
25
26 }
27
29 IBeamElement::ConstPtr_t pbe( new Plane(*this) );
30 return pbe;
31 }
32
33 double Plane::frontFace() const{return m_position.z();}
34 double Plane::rearFace() const{return m_position.z();}
35 double Plane::zabspos() const{return std::fabs(m_position.z());}
36 double Plane::zsignedpos() const{return m_position.z();}
38 Side Plane::side() const{return m_side;}
39
40
41 void Plane::track(IParticle& particle) const
42 {
43 particle.setBeamCoordinateShift(this);
44 if (particle.isOutOfAperture()){return;}
45 if (particle.displacement().mag2() > FPTrackerConstants::beamPipeRadius2){
46 particle.setOutOfAperture(true);
47 }
48
49 }
50
52 {
53 return this->track(particle);
54 }
55
56 std::string Plane::str() const {
57 std::ostringstream ost;
58 ost<<"\n-- Plane --\n";
59 ost<<" position "<<m_position<<'\n';
60 ost<<" side "<<m_side<<'\n';
61 return ost.str();
62 }
63
64 bool Plane::isEndElement() const{return true;}
65
66std::ostream& operator<<(std::ostream& os, const Plane& p){
67 os<<p.str();
68 return os;
69 }
70}
ChargedTracksWeightFilter::Spline::Point Point
static const double beamPipeRadius2
std::shared_ptr< const IBeamElement > ConstPtr_t
static const std::string s_label
std::string str() const
void calibrate(IParticle &)
double zsignedpos() const
void track(IParticle &) const
IBeamElement::ConstPtr_t clone() const
std::string label() const
std::ostream & operator<<(std::ostream &os, const Beamline &bl)
TransversePoint beamlineXPosition(double z)