ATLAS Offline Software
SingleWedgePadTrigger.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 
8 #ifndef NSW_SINGLEPADWEDGETRIGGER_H
9 #define NSW_SINGLEPADWEDGETRIGGER_H
10 
13 
14 
15 #include "Math/Vector2D.h"
16 
17 #include <string>
18 #include <vector>
19 
27 namespace NSWL1 {
29 
30  public:
31  struct EtaPhi{ // just to have better naming than std::pair
32  int ieta, iphi;
33  EtaPhi(int e, int p) : ieta(e), iphi(p) {}
34  std::string str() const;
35  private : EtaPhi(); // avoid gratuitous default constructor
36  };
37  struct EtaPhiHalf : EtaPhi { EtaPhiHalf(int e, int p) : EtaPhi(e,p){} }; // just to avoid mistakes
39 
46  static bool areInnerOuterConsistent(const EtaPhiHalf &inner,
47  const EtaPhiHalf &outer);
48  static EtaPhiHalf bandIndices(const EtaPhiHalf &inner, const EtaPhiHalf &outer);
50  static Polygon padOverlap3(const std::vector<std::shared_ptr<PadOfflineData>> & pads);
51 
52  public:
53  SingleWedgePadTrigger(const std::string &pattern,
54  const std::vector<std::shared_ptr<PadOfflineData>> &pads,
55  const std::vector<size_t> &padIndices);
56  const std::string& pattern() const {return m_pattern;}
57  const std::vector<size_t>& padIndices() const {return m_padIndices;}
58  EtaPhiHalf halfPadCoordinates() const;
60  bool isSmallSector() const;
61  bool isLargeSector() const { return !isSmallSector(); }
63 
67  bool isInTransitionRegion(const std::pair<double,double>& Zratio) const;
68  bool is4outOf4Layers() const { return (m_pads.size()==4); }
69  bool is3outOf4Layers() const { return (m_pads.size()==3); }
71  bool alreadyCombined() const { return m_alreadyCombined; }
72  const std::vector<std::shared_ptr<PadOfflineData>>& pads() const {return m_pads;}
73  private:
74  std::string m_pattern;
76  std::vector<size_t> m_padIndices;
77  std::vector<std::shared_ptr<PadOfflineData>> m_pads;
79  }; // end class SingleWedgePadTrigger
80 
81 } // end namespace nsw
82 
83 #endif
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
NSWL1::SingleWedgePadTrigger::isLargeSector
bool isLargeSector() const
Definition: SingleWedgePadTrigger.h:61
TriggerTypes.h
NSWL1::SingleWedgePadTrigger::m_pads
std::vector< std::shared_ptr< PadOfflineData > > m_pads
Definition: SingleWedgePadTrigger.h:77
NSWL1::SingleWedgePadTrigger::is3outOf4Layers
bool is3outOf4Layers() const
Definition: SingleWedgePadTrigger.h:69
NSWL1::SingleWedgePadTrigger::m_padIndices
std::vector< size_t > m_padIndices
Definition: SingleWedgePadTrigger.h:76
NSWL1::SingleWedgePadTrigger
Definition: SingleWedgePadTrigger.h:28
NSWL1::SingleWedgePadTrigger::isInTransitionRegion
bool isInTransitionRegion(const std::pair< double, double > &Zratio) const
determine whether we are in the transition region
Definition: SingleWedgePadTrigger.cxx:80
GeoUtils.h
NSWL1::Polygon
boost::geometry::model::polygon< Vertex > Polygon
Definition: GeoUtils.h:18
NSWL1::SingleWedgePadTrigger::pattern
const std::string & pattern() const
Definition: SingleWedgePadTrigger.h:56
NSWL1::SingleWedgePadTrigger::isSmallSector
bool isSmallSector() const
use the first pad to determine whether it's a small/large sector
Definition: SingleWedgePadTrigger.cxx:72
NSWL1::SingleWedgePadTrigger::EtaPhiHalf
Definition: SingleWedgePadTrigger.h:37
NSWL1::SingleWedgePadTrigger::m_alreadyCombined
bool m_alreadyCombined
flag to keep track of whether this has already been combined w/ another wedge
Definition: SingleWedgePadTrigger.h:78
NSWL1::SingleWedgePadTrigger::padIndices
const std::vector< size_t > & padIndices() const
Definition: SingleWedgePadTrigger.h:57
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
NSWL1::SingleWedgePadTrigger::EtaPhi::ieta
int ieta
Definition: SingleWedgePadTrigger.h:32
NSWL1::SingleWedgePadTrigger::alreadyCombined
bool alreadyCombined() const
Definition: SingleWedgePadTrigger.h:71
NSWL1::SingleWedgePadTrigger::EtaPhiHalf::EtaPhiHalf
EtaPhiHalf(int e, int p)
Definition: SingleWedgePadTrigger.h:37
NSWL1::SingleWedgePadTrigger::EtaPhi
Definition: SingleWedgePadTrigger.h:31
NSWL1::SingleWedgePadTrigger::bandIndices
static EtaPhiHalf bandIndices(const EtaPhiHalf &inner, const EtaPhiHalf &outer)
Definition: SingleWedgePadTrigger.cxx:169
NSWL1::SingleWedgePadTrigger::setCombined
SingleWedgePadTrigger & setCombined()
Definition: SingleWedgePadTrigger.h:70
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
NSWL1::SingleWedgePadTrigger::EtaPhi::iphi
int iphi
Definition: SingleWedgePadTrigger.h:32
NSWL1::SingleWedgePadTrigger::areInnerOuterConsistent
static bool areInnerOuterConsistent(const EtaPhiHalf &inner, const EtaPhiHalf &outer)
Determine whether two single-wedge triggers are consistent with each other.
Definition: SingleWedgePadTrigger.cxx:158
NSWL1::SingleWedgePadTrigger::halfPadCoordinates
EtaPhiHalf halfPadCoordinates() const
Definition: SingleWedgePadTrigger.cxx:35
NSWL1::SingleWedgePadTrigger::m_halfPadIndices
EtaPhiHalf m_halfPadIndices
Definition: SingleWedgePadTrigger.h:75
NSWL1::SingleWedgePadTrigger::EtaPhi::EtaPhi
EtaPhi(int e, int p)
Definition: SingleWedgePadTrigger.h:33
NSWL1::SingleWedgePadTrigger::pads
const std::vector< std::shared_ptr< PadOfflineData > > & pads() const
Definition: SingleWedgePadTrigger.h:72
NSWL1::SingleWedgePadTrigger::SingleWedgePadTrigger
SingleWedgePadTrigger(const std::string &pattern, const std::vector< std::shared_ptr< PadOfflineData >> &pads, const std::vector< size_t > &padIndices)
Definition: SingleWedgePadTrigger.cxx:19
NSWL1::SingleWedgePadTrigger::is4outOf4Layers
bool is4outOf4Layers() const
Definition: SingleWedgePadTrigger.h:68
NSWL1::SingleWedgePadTrigger::m_pattern
std::string m_pattern
Definition: SingleWedgePadTrigger.h:74
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
NSWL1::SingleWedgePadTrigger::EtaPhi::str
std::string str() const
Definition: SingleWedgePadTrigger.cxx:29
NSWL1
A trigger trigger candidate for a stgc sector.
Definition: NSWL1Simulation.cxx:9
NSWL1::SingleWedgePadTrigger::EtaPhi::EtaPhi
EtaPhi()