ATLAS Offline Software
cyl_geom.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #define CY_GEOM_CPP
7 
8 namespace JetGeom {
10  // helper function for findConvexHull
11  point_list_t::iterator it_prev = hull.end();--it_prev;
12  point_list_t::iterator it_pprev = it_prev; --it_pprev;
13  line_t l(*it_pprev, *it_prev);
14  // std::cout << " hull : "<< hull.size()<< " p.phi ="<<p.second <<std::endl;
15  // std::cout << " "<< (*it_prev).first<< " " << (*it_prev).second << std::endl;
16  // std::cout << " "<< (*it_pprev).first << " "<<(*it_pprev).second << std::endl;
17  // std::cout << " -> "<< p.first << " "<< p.second << std::endl;
18  if ( ! l.is_left(p) && (hull.size()>2)){
19  //std::cout << " is right !" << std::endl;
20  hull.pop_back(); // remove last
21  testHullLine(hull, p);
22  }else{
23  //std::cout << " is left !" << std::endl;
24  hull.push_back(p);
25  }
26 }
27 void listToSet(point_list_t &inList, point_set_t &outSet){
28  point_list_t::iterator it = inList.begin();
29  point_list_t::iterator itE = inList.end();
30  point_set_t::iterator s_it = outSet.begin();
31  for(; it!=itE; ++it){
32  s_it = outSet.insert(s_it, *it);
33  }
34 }
35 
36 }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
JetGeom::listToSet
void listToSet(point_list_t &inList, point_set_t &outSet)
Definition: cyl_geom.cxx:27
skel.it
it
Definition: skel.GENtoEVGEN.py:396
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
JetGeom::point_list_t
std::list< point_t > point_list_t
Definition: cyl_geom.h:32
TruthTest.itE
itE
Definition: TruthTest.py:25
JetGeom::point_set_t
Definition: cyl_geom.h:29
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
JetGeom::testHullLine
void testHullLine(point_list_t &hull, point_t p)
Definition: cyl_geom.cxx:9
JetGeom::point_t
Very basic point objects.
Definition: cyl_geom.h:25
JetGeom
A collection of routines for geometric tasks in 2D and on a cylinder.
Definition: cyl_geom.h:22
cyl_geom.h
JetGeom::line_t
Definition: cyl_geom.h:37