ATLAS Offline Software
Loading...
Searching...
No Matches
MuonChamberProjectionHelper.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5
7// //
8// Implementation of class MuonChamberProjectionHelper //
9// //
10// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
11// Initial version: January 2008 //
12// //
14
18#include "VP1Base/IVP1System.h"
19
20#include "GeoModelKernel/GeoVolumeCursor.h"
21#include "GeoModelKernel/GeoLogVol.h"
22#include "GeoModelKernel/GeoTrd.h"
23#include "GeoModelKernel/GeoShapeShift.h"
24#include "GeoModelKernel/GeoShapeUnion.h"
25#include "GeoModelKernel/GeoShapeIntersection.h"
26#include "GeoModelKernel/GeoShapeSubtraction.h"
28
29#include <map>
30
31//____________________________________________________________________
33public:
43 bool ensureInited();//Returns false if can't init.
44 bool init();//Returns false if can't init.
45
46 //MDT chambers:
48 public:
49 MDTChamberInfo(const Amg::Transform3D& l2g, const GeoTrd* t)
50 : localToGlobal(l2g), trd(t) {}
52 std::unique_ptr<Amg::Transform3D> globalToLocal;//Only created on demand - saving ~100KB in a typical job.
53 const GeoTrd * trd;
54 void ensureInitGlobalToLocal() { if (!globalToLocal) globalToLocal = std::make_unique<Amg::Transform3D>(localToGlobal.inverse()); }
55 };
56 std::map<GeoPVConstLink,MDTChamberInfo>::iterator itLastMDTChamberLookedUp{};
57 std::map<GeoPVConstLink,MDTChamberInfo> mdtchambervolinfo;//Map typically has around 1124 entries.
58 typedef std::map<GeoPVConstLink,MDTChamberInfo>::iterator ChamberInfoMapItr;
59 inline bool nameIsMDTChamber( const std::string& n );
60 bool getMDTChamberVolInfo(const GeoPVConstLink& mdtChamber,ChamberInfoMapItr& itChamberInfo, bool silent = false );
61 void getMDTChamberXAndZ(ChamberInfoMapItr& itChamberInfo, double & trdX, double & trdZ );
62
63 //Todo: CSC and TGC chambers also.
64
65
66 //Utility:
67 inline double pointToPlaneDistAlongLine( const Amg::Vector3D& point, const Amg::Vector3D& lineDirection,
68 const Amg::Vector3D& planePoint, const Amg::Vector3D& planeNormal );
69 void projectXZPointToTrdAlongYAxis( const double& x, const double& z,const GeoTrd* trd,
70 Amg::Vector3D & firstEndWall_point, Amg::Vector3D & secondEndWall_point );
71
72 static bool constrainPointToRectangleAlongLine( const double& trdX, const double& trdZ, const double& x0, const double& z0,
73 double& x1, double& z1 );//Moves x1,z1 towards x0,z0 so (x1,z1) ends up on edge of
74 //rectangle defined by |x|<=trdX && |z|<=trdZ. Returns false if
75 //not possible (i.e. line segment doesn't cross rectangle edges).
76 bool clip2DLineSegmentToRectangle( const double& rectX, const double& rectY,
77 double& x0, double& y0, double& x1, double& y1 );
78 //Given P0 = (x0,y0) and P1 = (x1,y1), we have to constrain the line
79 //segment P0-P1 to the rectangle R given by x<|rectX|, y<|rectY|.
80 //
81 //Returns false if length of clipped line segment is not positive
82 //(in that case, don't trust the returned values of the parameters).
83
84 const GeoTrd * findTRDInShape(const GeoShape * shape)
85 {
86 if (shape->typeID()==GeoTrd::getClassTypeID())
87 return static_cast<const GeoTrd*>(shape);
88 if (shape->typeID() == GeoShapeShift::getClassTypeID() ) {
89 const GeoShapeShift* theShift = static_cast<const GeoShapeShift*>(shape);
90 return findTRDInShape(theShift->getOp());
91 }
92 if (shape->typeID() == GeoShapeSubtraction::getClassTypeID() ) {
93 const GeoShapeSubtraction* theSubtraction = static_cast<const GeoShapeSubtraction*>(shape);
94 const GeoTrd * trd = findTRDInShape(theSubtraction->getOpA());
95 return trd ? trd : findTRDInShape(theSubtraction->getOpB());
96 }
97 if (shape->typeID() == GeoShapeUnion::getClassTypeID() ) {
98 const GeoShapeUnion* theUnion = static_cast<const GeoShapeUnion*>(shape);
99 const GeoTrd * trd = findTRDInShape(theUnion->getOpA());
100 return trd ? trd : findTRDInShape(theUnion->getOpB());
101 }
102 if (shape->typeID() == GeoShapeIntersection::getClassTypeID() ) {
103 const GeoShapeIntersection* theIntersection = static_cast<const GeoShapeIntersection*>(shape);
104 const GeoTrd * trd = findTRDInShape(theIntersection->getOpA());
105 return trd ? trd : findTRDInShape(theIntersection->getOpB());
106 }
107 return 0;
108 }
109
110};
111
112
113
114//____________________________________________________________________
116: VP1HelperClassBase(0,"MuonChamberProjectionHelper"), m_d(new Imp(this,detectorStore))
117{
118 if (!detectorStore)
119 message("ERROR: Received NULL detectorstore");
120}
121
122//____________________________________________________________________
124 : VP1HelperClassBase(0,"MuonChamberProjectionHelper"), m_d(new Imp(this,(sys?sys->detectorStore():0)))
125{
126 if (!sys)
127 message("ERROR: Received NULL system pointer (and thus can't get detector store pointer");
128 else if (!m_d->detectorStore)
129 message("ERROR: Could not get detectorStore pointer from system pointer");
130}
131
132//____________________________________________________________________
134{
135 Imp::ChamberInfoMapItr itMDT, itMDTE(m_d->mdtchambervolinfo.end());
136 for ( itMDT = m_d->mdtchambervolinfo.begin(); itMDT!=itMDTE; ++itMDT )
137 itMDT->second.trd->unref();
138 delete m_d;
139}
140
141
142//____________________________________________________________________
151
152//____________________________________________________________________
153inline bool MuonChamberProjectionHelper::Imp::nameIsMDTChamber( const std::string& n )
154{
155 //MDT chamber volumes starts with:
156 // Endcap: EI, EM, EO or EE
157 // Inner barrel: BI or BEE
158 // Middle barrel: BM
159 // Outer barrel:BO
160 if (n.size()<3)
161 return false;
162 if (n[0]=='E')
163 return n[1]=='I' || n[1]=='M' || n[1]=='O' || n[1]=='E';
164 if (n[0]=='B')
165 return n[1]=='I' || n[1]=='M' || n[1]=='O' || (n[1]=='E'&&n[2]=='E');
166 return false;
167}
168
169//____________________________________________________________________
171{
173 theclass->messageDebug("Warning: Can't init since muon geometry information is not present." );
174 return false;
175 }
176
177 VP1SGAccessHelper * sgaccess(0);
178 if (theclass->systemBase())
179 sgaccess = new VP1SGAccessHelper(theclass->systemBase());
180 else
181 sgaccess = new VP1SGAccessHelper(detectorStore);
182
183 //Locate the world volume if possible:
184 const GeoModelExperiment * theExpt;
185 if (!sgaccess->retrieve( theExpt, "ATLAS" )) {
186 theclass->message("MuonChamberProjectionHelper Error: Can't retrieve"
187 " the ATLAS GeoModelExperiment from detector store.");
188 delete sgaccess;
189 return false;
190 }
191 delete sgaccess;
192
193 PVConstLink world(theExpt->getPhysVol());
194 GeoVolumeCursor av(world);
195 const GeoLogVol * logvol(0);
196 const GeoShape * shape(0);
197 while (!av.atEnd()) {
198
199 if (av.getName()!="Muon") {
200 av.next();
201 continue;
202 }
203 Amg::Transform3D toptransform = av.getTransform();
204 GeoVolumeCursor av2(av.getVolume());
205 while (!av2.atEnd()) {
206 if (nameIsMDTChamber(av2.getName())) {
207 logvol = av2.getVolume()->getLogVol();
208 if (!logvol) {
209 theclass->message("MuonChamberProjectionHelper Error: Chamber has null logvol");
210 av2.next(); // increment volume cursor.
211 continue;
212 }
213 shape = logvol->getShape();
214 if (!shape) {
215 theclass->message("MuonChamberProjectionHelper Error: Chamber has null shape");
216 av2.next(); // increment volume cursor.
217 continue;
218 }
219 const GeoTrd * trd = findTRDInShape(shape);
220 if (trd) {
221 //Fixme: Test for nan's and clearly crazy numbers (if more than 1km for instance).
222 if ( trd->getZHalfLength()>0.0
223 && trd->getXHalfLength1() > 0.0
224 && trd->getXHalfLength2() > 0.0
225 && trd->getYHalfLength1() > 0.0
226 && trd->getYHalfLength2() > 0.0 ) {
227 trd->ref();
228 Amg::Transform3D geovolume_transf = av2.getTransform();
229 mdtchambervolinfo.insert(std::pair<const GeoPVConstLink,MDTChamberInfo>( av2.getVolume(), Imp::MDTChamberInfo(toptransform * geovolume_transf, trd) ));
230 } else {
231 theclass->message("MuonChamberProjectionHelper Error: Chamber trd has non-positive shape parameters!");
232 }
233 } else {
234 theclass->message("MuonChamberProjectionHelper Error: Chamber shape is not a GeoTrd, and is not a boolean with a Trd somewhere");
235 }
236 }
237 av2.next(); // increment volume cursor.
238 }
239 av.next(); // increment volume cursor.
240 }
241
242 if (mdtchambervolinfo.empty()) {
243 theclass->message("MuonChamberProjectionHelper Error: Found no MDT chambers");
244 return false;
245 }
246
248
249 return true;
250}
251
252//____________________________________________________________________
253bool MuonChamberProjectionHelper::isKnownMDTChamber( const GeoPVConstLink& mdtChamber )
254{
255 Imp::ChamberInfoMapItr itChamberInfo;
256 return m_d->getMDTChamberVolInfo( mdtChamber, itChamberInfo, true );
257}
258
259//____________________________________________________________________
261 const Amg::Vector3D & point, const Amg::Vector3D& lineDirection,
262 double& distanceToFirstEndPlane, double& distanceToSecondEndPlane,
263 const double& radius )
264{
265 Imp::ChamberInfoMapItr itChamberInfo;
266 if (!m_d->getMDTChamberVolInfo( mdtChamber, itChamberInfo ))
267 return false;
268
269 const GeoTrd * trd = itChamberInfo->second.trd;
270 double y1(trd->getYHalfLength1()), y2(trd->getYHalfLength2()), z(trd->getZHalfLength());
271
272 //Normals and points on ends (transformed from local to global coords):
273
274 Amg::Vector3D n1(0,+2*z,-(y2-y1));
275 Amg::Vector3D n2(0,-2*z,-(y2-y1));
276 n1 = itChamberInfo->second.localToGlobal.linear()* n1;
277 n2 = itChamberInfo->second.localToGlobal.linear()* n2;
278 const Amg::Vector3D p1(itChamberInfo->second.localToGlobal * Amg::Vector3D(0,y1,-z) );
279 const Amg::Vector3D p2(itChamberInfo->second.localToGlobal * Amg::Vector3D(0,-y1,-z) );
280
281 distanceToFirstEndPlane = m_d->pointToPlaneDistAlongLine(point,lineDirection,p1,n1);
282 if (distanceToFirstEndPlane < 0.0 )
283 return false;
284
285 distanceToSecondEndPlane = m_d->pointToPlaneDistAlongLine(point,lineDirection,p2,n2);
286 if (distanceToSecondEndPlane < 0.0 )
287 return false;
288
289 if (radius!=0.0) {
290 double r(fabs(radius)); //Map negative radii to positive.
291 Amg::Vector3D unitdir(lineDirection.unit());
292 double costheta1 = unitdir.dot(n1.unit());
293 double costheta2 = unitdir.dot(n2.unit());
294 //remember that tan(theta) = sqrt((1-cos^2(theta))/cos(theta))
295 distanceToFirstEndPlane += r*sqrt(fabs((1-costheta1*costheta1)/costheta1));
296 distanceToSecondEndPlane += r*sqrt(fabs((1-costheta2*costheta2)/costheta2));
297 }
298
299 return true;
300}
301//____________________________________________________________________
303 const Amg::Vector3D& planePoint, const Amg::Vector3D& planeNormal )
304{
305
306 double denominator(planeNormal.dot(lineDirection)*lineDirection.mag());
307 if (denominator==0.0) {
308 theclass->message("MuonChamberProjectionHelper Error: pointToPlaneDistAlongLine is undefined!");
309 return -1.0;
310 }
311 double numerator(planeNormal.x() * (planePoint.x() - point.x())
312 + planeNormal.y() * (planePoint.y() - point.y())
313 + planeNormal.z() * (planePoint.z() - point.z()));
314 return fabs(numerator/denominator);
315}
316
317//____________________________________________________________________
318bool MuonChamberProjectionHelper::Imp::getMDTChamberVolInfo( const GeoPVConstLink& mdtChamber,
320 bool silent ) {
321
322 if (!ensureInited())
323 return false;
324
325 if (itLastMDTChamberLookedUp->first == mdtChamber) {
326 itChamberInfo = itLastMDTChamberLookedUp;
327 return true;
328 }
329
330 itChamberInfo = mdtchambervolinfo.find(mdtChamber);
331 if (itChamberInfo == mdtchambervolinfo.end()) {
332 if (!silent)
333 theclass->message("MuonChamberProjectionHelper Error: Can't find MDT chamber among the "
334 +QString::number(mdtchambervolinfo.size())+" registered");
335 return false;
336 }
337
338 itLastMDTChamberLookedUp = itChamberInfo;
339
340 return true;
341}
342
343//____________________________________________________________________
344void MuonChamberProjectionHelper::Imp::getMDTChamberXAndZ(ChamberInfoMapItr& itChamberInfo, double & trdX, double & trdZ )
345{
346 const GeoTrd * trd = itChamberInfo->second.trd;
347 trdX = trd->getXHalfLength1();
348 trdZ = trd->getZHalfLength();
349 if ( trdX != trd->getXHalfLength2() ) {
350 theclass->message("MuonChamberProjectionHelper Warning: x1!=x2 in GeoTrd shape. Clippings etc. will be to a too large surface.");
351 if ( trdX < trd->getXHalfLength2() )
352 trdX = trd->getXHalfLength2();
353 }
354
355}
356
357//____________________________________________________________________
359 const Amg::Vector3D & pointA, const Amg::Vector3D & pointB,
360 Amg::Vector3D & firstEndWall_pointA, Amg::Vector3D & firstEndWall_pointB,
361 Amg::Vector3D & secondEndWall_pointA, Amg::Vector3D & secondEndWall_pointB,
362 bool& outsidechamber )
363{
364 Imp::ChamberInfoMapItr itChamberInfo;
365 if (!m_d->getMDTChamberVolInfo( mdtChamber, itChamberInfo ))
366 return false;
367
368 double trdX, trdZ;
369 m_d->getMDTChamberXAndZ(itChamberInfo, trdX, trdZ );
370
371 //Get local chamber coordinates, A and B, of pointA and pointB:
372 itChamberInfo->second.ensureInitGlobalToLocal();
373 Amg::Vector3D A((*(itChamberInfo->second.globalToLocal))*pointA), B((*(itChamberInfo->second.globalToLocal))*pointB);
374 double ax(A.x()), az(A.z()), bx(B.x()), bz(B.z());
375
376 //We basically have to project the line segment AB to the
377 //(x,z)-plane, and then constrain it to the rectangle given by
378 //x_i<|trdX|, z_i<|trdZ|.
379
380 outsidechamber = !(m_d->clip2DLineSegmentToRectangle( trdX, trdZ, ax, az, bx, bz ));
381 if (outsidechamber)
382 return true;
383
384 //Project the points to the end of the Trd:
385 m_d->projectXZPointToTrdAlongYAxis( ax, az,itChamberInfo->second.trd, firstEndWall_pointA, secondEndWall_pointA );
386 m_d->projectXZPointToTrdAlongYAxis( bx, bz,itChamberInfo->second.trd, firstEndWall_pointB, secondEndWall_pointB );
387
388 //Put points in global coordinates:
389 firstEndWall_pointA = itChamberInfo->second.localToGlobal * firstEndWall_pointA;
390 secondEndWall_pointA = itChamberInfo->second.localToGlobal * secondEndWall_pointA;
391 firstEndWall_pointB = itChamberInfo->second.localToGlobal * firstEndWall_pointB;
392 secondEndWall_pointB = itChamberInfo->second.localToGlobal * secondEndWall_pointB;
393
394 outsidechamber = false;
395 return true;
396}
397
398//____________________________________________________________________
399void MuonChamberProjectionHelper::Imp::projectXZPointToTrdAlongYAxis(const double& x, const double& z,const GeoTrd* trd,
400 Amg::Vector3D & firstEndWall_point, Amg::Vector3D & secondEndWall_point )
401{
402 const double epsilon(0.1);//100micron
403 const double trdY1(trd->getYHalfLength1()), trdY2(trd->getYHalfLength2());
404 const double y( trdY1 + 0.5*(1.0+z/trd->getZHalfLength())*(trdY2-trdY1) );
405 firstEndWall_point= Amg::Vector3D{ x,y+epsilon,z};
406 secondEndWall_point= Amg::Vector3D{x,-y-epsilon,z};
407}
408
409//____________________________________________________________________
411 const double& x0, const double& z0,
412 double& x1, double& z1 )
413{
414 //rectangle R : { (x,z) | abs(x)<=trdX && abs(z)<=trdZ }
415 //
416 //Returns false if segment from (x0,z0) to (x1,z1) doesn't cross R.
417
418 if ( x1 < -trdX ) {
419 if ( x0 < -trdX )
420 return false;
421 //Move (x1,z1) to x == -trdX line:
422 z1 += (-trdX-x1)*(z1-z0)/(x1-x0);
423 x1 = -trdX;
424 if (fabs(z1)>trdZ)
425 return constrainPointToRectangleAlongLine(trdX,trdZ,x0,z0,x1,z1);
426 }
427
428 if ( x1 > trdX ) {
429 if ( x0 > trdX )
430 return false;
431 //Move (x1,z1) to x == trdX line:
432 z1 += (trdX-x1)*(z1-z0)/(x1-x0);
433 x1 = trdX;
434 if (fabs(z1)>trdZ)
435 return constrainPointToRectangleAlongLine(trdX,trdZ,x0,z0,x1,z1);
436 }
437
438 if ( z1 < -trdZ ) {
439 if ( z0 < -trdZ )
440 return false;
441 //Move (x1,z1) to z == -trdZ line:
442 x1 += (-trdZ-z1)*(x1-x0)/(z1-z0);
443 z1 = -trdZ;
444 if (fabs(x1)>trdX)
445 return constrainPointToRectangleAlongLine(trdX,trdZ,x0,z0,x1,z1);
446 }
447
448 if ( z1 > trdZ ) {
449 if ( z0 > trdZ )
450 return false;
451 //Move (x1,z1) to z == trdZ line:
452 x1 += (trdZ-z1)*(x1-x0)/(z1-z0);
453 z1 = trdZ;
454 if (fabs(x1)>trdX)
455 return constrainPointToRectangleAlongLine(trdX,trdZ,x0,z0,x1,z1);
456 }
457
458 //We were actually inside all along:
459 return true;
460}
461
462//____________________________________________________________________
463bool MuonChamberProjectionHelper::clipLineSegmentToMDTChamber( const GeoPVConstLink& mdtChamber,
464 Amg::Vector3D & pointA, Amg::Vector3D & pointB, bool& outsidechamber,
465 const double & extradist )
466{
467 Imp::ChamberInfoMapItr itChamberInfo;
468 if (!m_d->getMDTChamberVolInfo( mdtChamber, itChamberInfo ))
469 return false;
470
471 double trdX, trdZ;
472 m_d->getMDTChamberXAndZ(itChamberInfo, trdX, trdZ );
473
474 trdX += extradist;
475 trdZ += extradist;
476
477 if (trdX<=0.0||trdZ<=0.0)//Extradist must have been negative - and so much that effective chamber dimensions are collapsed.
478 return false;
479
480 //Get local chamber coordinates, A and B, of pointA and pointB:
481 itChamberInfo->second.ensureInitGlobalToLocal();
482 Amg::Vector3D A((*(itChamberInfo->second.globalToLocal))*pointA), B((*(itChamberInfo->second.globalToLocal))*pointB);
483 double ax(A.x()), az(A.z()), bx(B.x()), bz(B.z());
484
485 //Clip x and z dimensions:
486 outsidechamber = !(m_d->clip2DLineSegmentToRectangle( trdX, trdZ, ax, az, bx, bz ));
487 if (outsidechamber)
488 return true;
489
490 double ay(A.y()), by(B.y());
491 //Fixme: We must also clip y dimensions!!
492
493 //Put results back into points and in global coordinates:
494 pointA = itChamberInfo->second.localToGlobal * Amg::Vector3D{ax,ay,az};
495 pointB = itChamberInfo->second.localToGlobal * Amg::Vector3D{bx,by,bz};
496 outsidechamber = false;
497 return true;
498
499}
500
501//____________________________________________________________________
502bool MuonChamberProjectionHelper::Imp::clip2DLineSegmentToRectangle( const double& rectX, const double& rectY,
503 double& x0, double& y0, double& x1, double& y1 )
504{
505 if ( fabs(x0)<=rectX && fabs(y0)<=rectY ) {
506 if ( fabs(x1)>rectX || fabs(y1)>rectY ) {
507 //P0 inside R, P1 outside R. We must change (x1,y1) so P0-P1 is inside R.
508 if (!constrainPointToRectangleAlongLine( rectX, rectY, x0, y0, x1, y1 ))
509 theclass->message("MuonChamberProjectionHelper Error: Should never happen (1)");
510 }
511 } else {
512 if ( fabs(x1)<=rectX && fabs(y1)<=rectY ) {
513 //Point P1 inside R, P0 outside R. We must change (x0,y0) so P0-P1 is inside R.
514 if (!constrainPointToRectangleAlongLine( rectX, rectY, x1, y1, x0, y0 ))
515 theclass->message("MuonChamberProjectionHelper Error: Should never happen (2)");
516 } else {
517 //Both points outside - but the line might still R!
518
519 //First attempt to put (x1,y1) on edge of R, by sliding towards P0
520 if (!constrainPointToRectangleAlongLine( rectX, rectY, x0, y0, x1, y1 )) {
521 //failed - thus P0-P1 doesn't intersect target rectangle.
522 return false;
523 }
524
525 //Now change (x0,y0) so P0-P1 is inside the target rectangle.
526 if (!constrainPointToRectangleAlongLine( rectX, rectY, x1, y1, x0, y0 ))
527 theclass->message("MuonChamberProjectionHelper Error: Should never happen (3)");
528 }
529 }
530
531 return true;
532
533}
static Double_t tc
#define y
#define x
#define z
GeoPhysVol * getPhysVol()
Destructor.
MDTChamberInfo(const Amg::Transform3D &l2g, const GeoTrd *t)
std::map< GeoPVConstLink, MDTChamberInfo > mdtchambervolinfo
Imp(MuonChamberProjectionHelper *tc, StoreGateSvc *ds)
std::map< GeoPVConstLink, MDTChamberInfo >::iterator ChamberInfoMapItr
const GeoTrd * findTRDInShape(const GeoShape *shape)
std::map< GeoPVConstLink, MDTChamberInfo >::iterator itLastMDTChamberLookedUp
void getMDTChamberXAndZ(ChamberInfoMapItr &itChamberInfo, double &trdX, double &trdZ)
bool clip2DLineSegmentToRectangle(const double &rectX, const double &rectY, double &x0, double &y0, double &x1, double &y1)
double pointToPlaneDistAlongLine(const Amg::Vector3D &point, const Amg::Vector3D &lineDirection, const Amg::Vector3D &planePoint, const Amg::Vector3D &planeNormal)
void projectXZPointToTrdAlongYAxis(const double &x, const double &z, const GeoTrd *trd, Amg::Vector3D &firstEndWall_point, Amg::Vector3D &secondEndWall_point)
bool getMDTChamberVolInfo(const GeoPVConstLink &mdtChamber, ChamberInfoMapItr &itChamberInfo, bool silent=false)
static bool constrainPointToRectangleAlongLine(const double &trdX, const double &trdZ, const double &x0, const double &z0, double &x1, double &z1)
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)
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="")
void message(const QString &) const
static bool hasMuonGeometry()
bool retrieve(const T *&, const QString &key) const
int r
Definition globals.cxx:22
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
hold the test vectors and ease the comparison