ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_DetElementsComparison.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRT_DetElementsComparison_h
6#define TRT_DetElementsComparison_h
7
9
10
11namespace InDet{
12
14 // Object function for ordering barrel pixels and silicons wafers
15 // in azimuthal angle order
17
19
20 public:
21
23 const InDetDD::TRT_BaseElement* e2)
24 {
25 const Amg::Transform3D& T1 = e1->surface().transform();
26 const Amg::Transform3D& T2 = e2->surface().transform();
27 double f1 = atan2(T1(1,0),T1(0,0));
28 double f2 = atan2(T2(1,0),T2(0,0));
29 return(f1<f2);
30 }
31 };
32
34 // Object function for ordering barrel pixels and silicons wafers
35 // in azimuthal angle and Z coordinates order
37
39
40 public:
41
43 const InDetDD::TRT_BaseElement* e2)
44 {
45 Amg::Vector3D p1 = e1->center();
46 Amg::Vector3D p2 = e2->center();
47 double f1 = atan2(p1.y(),p1.x());
48 double f2 = atan2(p2.y(),p2.x());
49 if(fabs(f1-f2)>.04) return(f1<f2);
50 return(p1.z()<p2.z());
51 }
52 };
53}
54#endif // TRT_DetElementsComparison_h
Virtual base class of TRT readout elements.
bool operator()(const InDetDD::TRT_BaseElement *e1, const InDetDD::TRT_BaseElement *e2)
bool operator()(const InDetDD::TRT_BaseElement *e1, const InDetDD::TRT_BaseElement *e2)
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Primary Vertex Finder.