ATLAS Offline Software
Loading...
Searching...
No Matches
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
29class StoreGateSvc;
30class IVP1System;
31
33public:
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
93private:
94
95 //It is illegal to copy/assign a MuonChamberProjectionHelper:
98
99 class Imp;
101
102};
103
104#endif
bool isKnownMDTChamber(const GeoPVConstLink &mdtChamber)
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)
MuonChamberProjectionHelper(StoreGateSvc *detectorStore)
bool getDistancesToMDTChamberWallsAlongLine(const GeoPVConstLink &mdtChamber, const Amg::Vector3D &point, const Amg::Vector3D &lineDirection, double &distanceToFirstEndPlane, double &distanceToSecondEndPlane, const double &radius=0.0)
MuonChamberProjectionHelper(const MuonChamberProjectionHelper &)
static Amg::Vector3D & applyTransformToVector(const Amg::Transform3D &m, Amg::Vector3D &v)
MuonChamberProjectionHelper & operator=(const MuonChamberProjectionHelper &)
bool clipLineSegmentToMDTChamber(const GeoPVConstLink &mdtChamber, Amg::Vector3D &pointA, Amg::Vector3D &pointB, bool &outsidechamber, const double &extradist=0.0)
The Athena Transient Store API.
VP1HelperClassBase(IVP1System *sys=0, QString helpername="")
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D