ATLAS Offline Software
MuonChamberProjectionHelper.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 // //
8 // Header file for class MuonChamberProjectionHelper //
9 // //
10 // Description: ... //
11 // //
12 // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
13 // Initial version: January 2008 //
14 // //
16 
17 #ifndef MUONCHAMBERPROJECTIONHELPER_H
18 #define MUONCHAMBERPROJECTIONHELPER_H
19 
21 
25 //
26 #include "GeoModelKernel/GeoVPhysVol.h"
27 
28 
29 class StoreGateSvc;
30 class IVP1System;
31 
33 public:
34 
35  MuonChamberProjectionHelper( StoreGateSvc * detectorStore );//All messages to stdout
36  MuonChamberProjectionHelper( IVP1System * sys );//Use this constructor to get messages in gui
38 
40  // To figure out if a given PV link is to an mdt chamber:
41  //
42  bool isKnownMDTChamber( const GeoPVConstLink& mdtChamber );
43 
44 
46  // To figure out how long drift-circles one must construct in order to project them on the end of the chambers:
47  // * If radius is not 0.0, then the returned distances will be
48  // increased, such as to be the maximum value that one would get if
49  // calculating the distance of all the points on the circumference
50  // of the drift-circle of the given radius, around "point".
51  // * Returns false in case of problems.
52  //
53  bool getDistancesToMDTChamberWallsAlongLine( const GeoPVConstLink& mdtChamber,
54  const Amg::Vector3D & point, const Amg::Vector3D& lineDirection,
55  double& distanceToFirstEndPlane, double& distanceToSecondEndPlane,
56  const double& radius = 0.0 );
58 
60  // To project tracks/segments (line segment from pointA to pointB)
61  // onto chamber ends.
62  // * Sets outsidechamber to true in case projection falls entirely
63  // outside chamber (dont use returned points in that case).
64  // * Returns false in case of problems.
65  //
66  bool projectAndConstrainLineSegmentToMDTChamberEndWalls( const GeoPVConstLink& mdtChamber,
67  const Amg::Vector3D & pointA, const Amg::Vector3D & pointB,
68  Amg::Vector3D & firstEndWall_pointA, Amg::Vector3D & firstEndWall_pointB,
69  Amg::Vector3D & secondEndWall_pointA, Amg::Vector3D & secondEndWall_pointB,
70  bool& outsidechamber );
72 
74  //
75  // Clips the line segment from A to B to the volume of a given MDT chamber
76  // * "extradist" effectively extends the chamber dimensions in order to
77  // let the resulting line segment extend slightly outside the
78  // chamber ( negative values are allowed ).
79  // * Sets outsidechamber to true in case line segment falls entirely
80  // outside chamber (dont use returned points in that case).
81  // * Returns false in case of problems.
82  //
83  bool clipLineSegmentToMDTChamber( const GeoPVConstLink& mdtChamber,
84  Amg::Vector3D & pointA, Amg::Vector3D & pointB, bool& outsidechamber,
85  const double & extradist = 0.0 );
86  //FIXME: Right now we do not clip in the y dimensions!!!
88 
89 
90 
91  static Amg::Vector3D& applyTransformToVector( const Amg::Transform3D& m, Amg::Vector3D& v);//Fixme: Better place for this?
92 
93 private:
94 
95  //It is illegal to copy/assign a MuonChamberProjectionHelper:
98 
99  class Imp;
100  Imp * m_d;
101 
102 };
103 
104 #endif
MuonChamberProjectionHelper
Definition: MuonChamberProjectionHelper.h:32
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
MuonChamberProjectionHelper::~MuonChamberProjectionHelper
~MuonChamberProjectionHelper()
Definition: MuonChamberProjectionHelper.cxx:134
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
GeoPrimitives.h
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
IVP1System
Definition: IVP1System.h:36
MuonChamberProjectionHelper::clipLineSegmentToMDTChamber
bool clipLineSegmentToMDTChamber(const GeoPVConstLink &mdtChamber, Amg::Vector3D &pointA, Amg::Vector3D &pointB, bool &outsidechamber, const double &extradist=0.0)
Definition: MuonChamberProjectionHelper.cxx:482
MuonChamberProjectionHelper::MuonChamberProjectionHelper
MuonChamberProjectionHelper(StoreGateSvc *detectorStore)
Definition: MuonChamberProjectionHelper.cxx:116
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonChamberProjectionHelper::projectAndConstrainLineSegmentToMDTChamberEndWalls
bool projectAndConstrainLineSegmentToMDTChamberEndWalls(const GeoPVConstLink &mdtChamber, const Amg::Vector3D &pointA, const Amg::Vector3D &pointB, Amg::Vector3D &firstEndWall_pointA, Amg::Vector3D &firstEndWall_pointB, Amg::Vector3D &secondEndWall_pointA, Amg::Vector3D &secondEndWall_pointB, bool &outsidechamber)
Definition: MuonChamberProjectionHelper.cxx:373
MuonChamberProjectionHelper::operator=
MuonChamberProjectionHelper & operator=(const MuonChamberProjectionHelper &)
VP1HelperClassBase
Definition: VP1HelperClassBase.h:28
CLHEPtoEigenConverter.h
MuonChamberProjectionHelper::Imp
Definition: MuonChamberProjectionHelper.cxx:32
VP1HelperClassBase.h
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
MuonChamberProjectionHelper::isKnownMDTChamber
bool isKnownMDTChamber(const GeoPVConstLink &mdtChamber)
Definition: MuonChamberProjectionHelper.cxx:268
python.PyAthena.v
v
Definition: PyAthena.py:157
MuonChamberProjectionHelper::getDistancesToMDTChamberWallsAlongLine
bool getDistancesToMDTChamberWallsAlongLine(const GeoPVConstLink &mdtChamber, const Amg::Vector3D &point, const Amg::Vector3D &lineDirection, double &distanceToFirstEndPlane, double &distanceToSecondEndPlane, const double &radius=0.0)
Definition: MuonChamberProjectionHelper.cxx:275
GeoPrimitivesHelpers.h
MuonChamberProjectionHelper::MuonChamberProjectionHelper
MuonChamberProjectionHelper(const MuonChamberProjectionHelper &)
MuonChamberProjectionHelper::applyTransformToVector
static Amg::Vector3D & applyTransformToVector(const Amg::Transform3D &m, Amg::Vector3D &v)
Definition: MuonChamberProjectionHelper.cxx:143
MuonChamberProjectionHelper::m_d
Imp * m_d
Definition: MuonChamberProjectionHelper.h:99