OpDetSorter.h
Go to the documentation of this file.
1 #ifndef GEO_OPDETSORTER_H
2 #define GEO_OPDETSORTER_H
3 
4 
6 
7 namespace geo {
8 
9  //----------------------------------------------------------------------------
10  inline bool sortorderOpDet(const OpDetGeo& t1, const OpDetGeo& t2)
11  {
12  double xyz1[3] = {0.}, xyz2[3] = {0.};
13  double local[3] = {0.};
14  t1.LocalToWorld(local, xyz1);
15  t2.LocalToWorld(local, xyz2);
16 
17  if(xyz1[0]!=xyz2[0])
18  return xyz1[0]>xyz2[0];
19  else if(xyz1[2]!=xyz2[2])
20  return xyz1[2]>xyz2[2];
21  else
22  return xyz1[1]>xyz2[1];
23  }
24 
25 }
26 #endif // GEO_OPDETSORTER_H
bool sortorderOpDet(const OpDetGeo &t1, const OpDetGeo &t2)
Definition: OpDetSorter.h:10
Encapsulate the geometry of an optical detector.
LArSoft geometry interface.
Definition: ChannelGeo.h:16
void LocalToWorld(const double *opdet, double *world) const
Transform point from local optical detector frame to world frame.
Definition: OpDetGeo.h:112