ATLAS Offline Software
L1TdrStgcTriggerLogic.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef NSW_L1TDRSTGCTRIGGERLOGIC_H
6 #define NSW_L1TDRSTGCTRIGGERLOGIC_H
7 
12 
13 
14 #include <string>
15 #include <vector>
16 #include "TRandom.h"
17 
18 
19 namespace NSWL1 {
20 
48 
49  public:
50 
51  L1TdrStgcTriggerLogic();//get svc from parent class
63  std::vector<SectorTriggerCandidate> buildSectorTriggers(const std::vector<std::shared_ptr<PadOfflineData>> &pads, const std::pair<double,double>& Zratio) const;
65  std::vector< size_t > removeRandomPadIndices(const std::vector< size_t > &padIndices) const;
73  std::array<std::string_view, 10> sTGC_triggerPatternsEtaUp() const;
74  std::array<std::string_view, 10> sTGC_triggerPatternsEtaDown() const;
75  std::array<std::string_view, 16> sTGC_triggerPatternsPhiUp() const;
76  std::array<std::string_view, 16> sTGC_triggerPatternsPhiDown() const;
77  std::array<std::string_view, 10> sTGC_triggerPatternsPhiDownUp() const;
78  std::array<std::string_view, 10> sTGC_triggerPatternsPhiUpDown() const;
79 
80  bool hitPattern(const std::shared_ptr<PadOfflineData> &firstPad, const std::shared_ptr<PadOfflineData> &otherPad, std::string &pattern) const;
81  bool hitPattern(const int iEta0, const int iPhi0, const int iEta1, const int iPhi1, std::string &pattern) const;
82  std::vector< SingleWedgePadTrigger > buildSingleWedgeTriggers(const std::vector<std::shared_ptr<PadOfflineData>> &pads,
83  const std::vector< size_t > &padIndicesLayer0,
84  const std::vector< size_t > &padIndicesLayer1,
85  const std::vector< size_t > &padIndicesLayer2,
86  const std::vector< size_t > &padIndicesLayer3,
87  bool isLayer1, bool isLayer2,
88  bool isLayer3, bool isLayer4) const;
89  std::vector< SingleWedgePadTrigger > build34swt(const std::vector<std::shared_ptr<PadOfflineData>> &pads,
90  const std::vector< size_t > &padIndicesLayer0,
91  const std::vector< size_t > &padIndicesLayer1,
92  const std::vector< size_t > &padIndicesLayer2,
93  const std::vector< size_t > &padIndicesLayer3) const;
94  std::vector< SingleWedgePadTrigger > build44swt(const std::vector<std::shared_ptr<PadOfflineData>> &pads,
95  const std::vector< size_t > &padIndicesLayer0,
96  const std::vector< size_t > &padIndicesLayer1,
97  const std::vector< size_t > &padIndicesLayer2,
98  const std::vector< size_t > &padIndicesLayer3) const;
99 
100  private:
101  std::vector<size_t> filterByLayer(const std::vector<std::shared_ptr<PadOfflineData>> &pads,
102  const std::vector<size_t> &padSelectedIndices,
103  int layer) const;
104  std::vector<size_t> filterByMultiplet(const std::vector<std::shared_ptr<PadOfflineData>> &pads,
105  const std::vector<size_t> &padSelectedIndices,
106  int multiplet) const;
107  };
108 } // end namespace NSWL1
109 #endif // NSW_L1TDRSTGCTRIGGERLOGIC_H
mergePhysValFiles.pattern
pattern
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:26
NSWL1::L1TdrStgcTriggerLogic::build44swt
std::vector< SingleWedgePadTrigger > build44swt(const std::vector< std::shared_ptr< PadOfflineData >> &pads, const std::vector< size_t > &padIndicesLayer0, const std::vector< size_t > &padIndicesLayer1, const std::vector< size_t > &padIndicesLayer2, const std::vector< size_t > &padIndicesLayer3) const
Definition: L1TdrStgcTriggerLogic.cxx:306
NSWL1::L1TdrStgcTriggerLogic::sTGC_triggerPatternsPhiUp
std::array< std::string_view, 16 > sTGC_triggerPatternsPhiUp() const
Definition: L1TdrStgcTriggerLogic.cxx:446
TriggerTypes.h
NSWL1::L1TdrStgcTriggerLogic::removeRandomPadIndices
std::vector< size_t > removeRandomPadIndices(const std::vector< size_t > &padIndices) const
simulate efficiency by dropping random pads (their indices)
Definition: L1TdrStgcTriggerLogic.cxx:278
SectorTriggerCandidate.h
NSWL1::L1TdrStgcTriggerLogic::buildSingleWedgeTriggers
std::vector< SingleWedgePadTrigger > buildSingleWedgeTriggers(const std::vector< std::shared_ptr< PadOfflineData >> &pads, const std::vector< size_t > &padIndicesLayer0, const std::vector< size_t > &padIndicesLayer1, const std::vector< size_t > &padIndicesLayer2, const std::vector< size_t > &padIndicesLayer3, bool isLayer1, bool isLayer2, bool isLayer3, bool isLayer4) const
Definition: L1TdrStgcTriggerLogic.cxx:57
NSWL1::L1TdrStgcTriggerLogic::sTGC_triggerPatternsPhiDown
std::array< std::string_view, 16 > sTGC_triggerPatternsPhiDown() const
Definition: L1TdrStgcTriggerLogic.cxx:452
NSWL1::L1TdrStgcTriggerLogic::build34swt
std::vector< SingleWedgePadTrigger > build34swt(const std::vector< std::shared_ptr< PadOfflineData >> &pads, const std::vector< size_t > &padIndicesLayer0, const std::vector< size_t > &padIndicesLayer1, const std::vector< size_t > &padIndicesLayer2, const std::vector< size_t > &padIndicesLayer3) const
Definition: L1TdrStgcTriggerLogic.cxx:289
NSWL1::L1TdrStgcTriggerLogic::sTGC_triggerPatternsPhiDownUp
std::array< std::string_view, 10 > sTGC_triggerPatternsPhiDownUp() const
Definition: L1TdrStgcTriggerLogic.cxx:463
NSWL1::L1TdrStgcTriggerLogic::L1TdrStgcTriggerLogic
L1TdrStgcTriggerLogic()
Definition: L1TdrStgcTriggerLogic.cxx:23
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
NSWL1::L1TdrStgcTriggerLogic::sTGC_triggerPatternsEtaUp
std::array< std::string_view, 10 > sTGC_triggerPatternsEtaUp() const
trigger patterns that will be stored in the lookup table
Definition: L1TdrStgcTriggerLogic.cxx:436
NSWL1::L1TdrStgcTriggerLogic::hitPattern
bool hitPattern(const std::shared_ptr< PadOfflineData > &firstPad, const std::shared_ptr< PadOfflineData > &otherPad, std::string &pattern) const
Definition: L1TdrStgcTriggerLogic.cxx:27
NSWL1::L1TdrStgcTriggerLogic::sTGC_triggerPatternsEtaDown
std::array< std::string_view, 10 > sTGC_triggerPatternsEtaDown() const
Definition: L1TdrStgcTriggerLogic.cxx:441
NSWL1::L1TdrStgcTriggerLogic::buildSectorTriggers
std::vector< SectorTriggerCandidate > buildSectorTriggers(const std::vector< std::shared_ptr< PadOfflineData >> &pads, const std::pair< double, double > &Zratio) const
main function to compute trigger candidates
Definition: L1TdrStgcTriggerLogic.cxx:342
NSWL1::L1TdrStgcTriggerLogic::filterByMultiplet
std::vector< size_t > filterByMultiplet(const std::vector< std::shared_ptr< PadOfflineData >> &pads, const std::vector< size_t > &padSelectedIndices, int multiplet) const
Definition: L1TdrStgcTriggerLogic.cxx:482
AthMessaging.h
NSWL1::L1TdrStgcTriggerLogic
Initial version of the stgc pad trigger logic.
Definition: L1TdrStgcTriggerLogic.h:47
SingleWedgePadTrigger.h
NSWL1::L1TdrStgcTriggerLogic::sTGC_triggerPatternsPhiUpDown
std::array< std::string_view, 10 > sTGC_triggerPatternsPhiUpDown() const
Definition: L1TdrStgcTriggerLogic.cxx:458
NSWL1
A trigger trigger candidate for a stgc sector.
Definition: NSWL1Simulation.cxx:9
NSWL1::L1TdrStgcTriggerLogic::filterByLayer
std::vector< size_t > filterByLayer(const std::vector< std::shared_ptr< PadOfflineData >> &pads, const std::vector< size_t > &padSelectedIndices, int layer) const
Definition: L1TdrStgcTriggerLogic.cxx:470