ATLAS Offline Software
SectorTriggerCandidate.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 #include <cassert>
9 #include <sstream>
10 
11 namespace NSWL1{
12 
14  const SingleWedgePadTrigger &outer){
15  m_wedgeTrigs.push_back(inner);
16  m_wedgeTrigs.push_back(outer);
17  }
18 
20  m_wedgeTrigs.push_back(innerOrOuterInTransition);
21  }
22 
24  assert(m_wedgeTrigs.size()>0); // cannot have any trig with any wedge
25  bool hasBothInnerOuter(m_wedgeTrigs.size()>1);
26  if(hasBothInnerOuter){
27  const SingleWedgePadTrigger &inner = m_wedgeTrigs[0];
28  const SingleWedgePadTrigger &outer = m_wedgeTrigs[1];
29  Polygon inner_overlap=SingleWedgePadTrigger::padOverlap3(inner.pads());
30  Polygon outer_overlap=SingleWedgePadTrigger::padOverlap3(outer.pads());
31  //project the outer overlap into first one's plane
32  float Z1=outer.pads()[0]->m_cornerXyz[1][2];
33  float Z0=inner.pads()[0]->m_cornerXyz[1][2];
34 
35  return largestIntersection(inner_overlap,Project(outer_overlap,Z1,Z0));
36  }
37  else{
39  }
40  }
41 
42 }
SectorTriggerCandidate.h
NSWL1::SingleWedgePadTrigger
Definition: SingleWedgePadTrigger.h:28
NSWL1::SectorTriggerCandidate::triggerRegion3
Polygon triggerRegion3() const
Definition: SectorTriggerCandidate.cxx:23
NSWL1::Polygon
boost::geometry::model::polygon< Vertex > Polygon
Definition: GeoUtils.h:18
NSWL1::largestIntersection
Polygon largestIntersection(const Polygon &p1, const Polygon &p2)
Definition: GeoUtils.cxx:80
NSWL1::SectorTriggerCandidate::SectorTriggerCandidate
SectorTriggerCandidate(const SingleWedgePadTrigger &inner, const SingleWedgePadTrigger &outer)
Definition: SectorTriggerCandidate.cxx:13
NSWL1::Project
Polygon Project(const Polygon &p, float Zinit, float Zfin)
Definition: GeoUtils.cxx:19
Trk::Z0
@ Z0
Definition: ParameterType.h:18
NSWL1::SectorTriggerCandidate::m_wedgeTrigs
std::vector< SingleWedgePadTrigger > m_wedgeTrigs
Definition: SectorTriggerCandidate.h:35
PadOfflineData.h
NSWL1::SingleWedgePadTrigger::pads
const std::vector< std::shared_ptr< PadOfflineData > > & pads() const
Definition: SingleWedgePadTrigger.h:72
NSWL1::SingleWedgePadTrigger::padOverlap3
static Polygon padOverlap3(const std::vector< std::shared_ptr< PadOfflineData >> &pads)
area that is overlapping between the pads that cause the trigger (pads are staggered)
Definition: SingleWedgePadTrigger.cxx:113
SingleWedgePadTrigger.h
NSWL1
A trigger trigger candidate for a stgc sector.
Definition: NSWL1Simulation.cxx:9