ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
NSWL1::PadTriggerLookupTool Class Reference

#include <PadTriggerLookupTool.h>

Inheritance diagram for NSWL1::PadTriggerLookupTool:
Collaboration diagram for NSWL1::PadTriggerLookupTool:

Public Member Functions

 PadTriggerLookupTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~PadTriggerLookupTool ()=default
 
virtual StatusCode initialize () override
 
virtual void handle (const Incident &inc) override
 
virtual StatusCode lookup_pad_triggers (const std::vector< std::shared_ptr< PadData >> &pads, std::vector< std::unique_ptr< PadTrigger >> &triggers) override
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode loadCoincidenceTable (const std::string &)
 load the 4o4 coincidence table More...
 
StatusCode expandCoincidenceTable ()
 
StatusCode LookupSectorTriggers (const std::vector< std::shared_ptr< PadData >> &pads, int side, int sector, std::vector< std::unique_ptr< PadTrigger >> &triggers)
 
std::vector< std::vector< std::shared_ptr< PadData > > > selectWedgePatterns (const std::vector< std::shared_ptr< PadData >> &pads, int side, int sector, int multiplet) const
 
std::vector< std::shared_ptr< PadOfflineData > > fetchSectorPads (bool isSmall, int side=1, int sector=1)
 
std::vector< std::shared_ptr< PadOfflineData > > fetchSmallSectorPads (int side=1, int sector=1)
 
std::vector< std::shared_ptr< PadOfflineData > > fetchLargeSectorPads (int side=1, int sector=1)
 
std::pair< int, int > Lookup (std::vector< int >)
 
StatusCode printGeometry (const std::vector< std::shared_ptr< PadOfflineData >> &, std::ofstream &) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
Gaudi::Property< bool > m_dumpSectorGeometry {this, "DumpSectorGeometry", false, "Record sector pad geometry into an ASCII file (1L/1S by default). Use it for debugging"}
 
const std::vector< float > m_etaBandsLargeSector
 
const std::vector< float > m_etaBandsSmallSector
 
const MuonGM::MuonDetectorManagerm_detManager
 
std::unordered_map< std::vector< int >, std::pair< int, int >,hashPatternm_pats
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 38 of file PadTriggerLookupTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ PadTriggerLookupTool()

NSWL1::PadTriggerLookupTool::PadTriggerLookupTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 28 of file PadTriggerLookupTool.cxx.

28  :
32  m_detManager(nullptr) {
33  declareInterface<NSWL1::IPadTriggerLookupTool>(this);
34 }

◆ ~PadTriggerLookupTool()

virtual NSWL1::PadTriggerLookupTool::~PadTriggerLookupTool ( )
virtualdefault

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ expandCoincidenceTable()

StatusCode NSWL1::PadTriggerLookupTool::expandCoincidenceTable ( )
private

Definition at line 126 of file PadTriggerLookupTool.cxx.

126  {//There we append 3o4s to the lookup table itself...
127 
128  std::unordered_map<std::vector<int>,std::pair<int,int> ,hashPattern> derivedCoincidencePatterns;
129 
130  std::vector<int> innerIndices(4);
131  std::vector<int> outerIndices(4);
132  std::vector<int> allIndices(8);
133  std::iota(innerIndices.begin(), innerIndices.begin() + 4, 0);
134  std::iota(outerIndices.begin(), outerIndices.begin() + 4, 4);
135  std::iota(allIndices.begin(),allIndices.begin()+8,0);
136 
137  for(const auto& kv : m_pats){
138  int bandid=kv.second.first;
139  int phiid=kv.second.second;
140  for(int in : innerIndices ){
141  std::vector<int> pattern=kv.first;//copy
142  if(pattern.at(in)==nullPadNumber || pattern.at(in+4)==nullPadNumber){
143  continue;
144  }
145  pattern.at(in)=nullPadNumber;
146  for(int out :outerIndices){
147  int thispattern=pattern.at(out);
149  derivedCoincidencePatterns[pattern]=std::pair<int,int>(bandid,phiid);
150  pattern.at(out)=thispattern;//revert the change for the next one
151  }
152  }
153 
154  for(int i : allIndices){
155  std::vector<int> pattern=kv.first;//copy
156  pattern.at(i)=nullPadNumber;
157  derivedCoincidencePatterns[pattern]=std::pair<int,int>(bandid,phiid);
158  }
159  }
160 
161  m_pats.insert(derivedCoincidencePatterns.begin(),derivedCoincidencePatterns.end());
162  ATH_MSG_DEBUG(" Picked up "<<m_pats.size()<<" pad coincidences");
163  return StatusCode::SUCCESS;
164 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ fetchLargeSectorPads()

std::vector< std::shared_ptr< PadOfflineData > > NSWL1::PadTriggerLookupTool::fetchLargeSectorPads ( int  side = 1,
int  sector = 1 
)
private

Definition at line 457 of file PadTriggerLookupTool.cxx.

457  {
458  return fetchSectorPads(false,side,sector);
459  }

◆ fetchSectorPads()

std::vector< std::shared_ptr< PadOfflineData > > NSWL1::PadTriggerLookupTool::fetchSectorPads ( bool  isSmall,
int  side = 1,
int  sector = 1 
)
private

Definition at line 401 of file PadTriggerLookupTool.cxx.

401  {
402 
403  std::vector<std::shared_ptr<PadOfflineData>> sectorPads;
404  std::vector<Identifier> padIds;
405 
406  for(const Identifier& modId : m_idHelperSvc->stgcIdHelper().idVector() ){
407  int ModuleSide=1?m_idHelperSvc->stgcIdHelper().stationEta(modId)>0 :0;
408  int ModuleSect=m_idHelperSvc->stgcIdHelper().stationPhi(modId);
409  bool SectType=m_idHelperSvc->stgcIdHelper().isSmall(modId);
410  if(ModuleSide!=SIDE || ModuleSect !=SECTOR || SectType!=isSmall) continue;//grab only sector modules selected by the method args
411  std::vector<Identifier> all_channels;
412  m_idHelperSvc->stgcIdHelper().idChannels(modId,all_channels);
413 
414  std::vector<Identifier> pad_channels;
415  const sTgcIdHelper* idHelper = &m_idHelperSvc->stgcIdHelper();
416  std::copy_if(all_channels.begin(),all_channels.end(),std::back_inserter(pad_channels),
417  [idHelper](const Identifier& id){
418  int chanType=idHelper->channelType(id);
419  return chanType==0;
420  }
421  );
422  padIds.insert(padIds.end(),pad_channels.begin(),pad_channels.end());
423 
424  }
425 
426  for(Identifier id : padIds){
427  int multilayer=m_idHelperSvc->stgcIdHelper().multilayer(id);
428  int gasgap=m_idHelperSvc->stgcIdHelper().gasGap(id);
429 
430  int channeltype=m_idHelperSvc->stgcIdHelper().channelType(id);
432  const MuonGM::MuonPadDesign* mpd=rdoEl->getPadDesign(id);
433  int padEtaMinFromDesign=mpd->padEtaMin;
434  int padEtaMaxFromDesign=mpd->padEtaMax;
435  int nPadCols=mpd->nPadColumns;
436 
437  int thisEta=m_idHelperSvc->stgcIdHelper().padEta(id);
438  int thisPhi=m_idHelperSvc->stgcIdHelper().padPhi(id);
439 
440  int nPadRowsFromDesign=padEtaMaxFromDesign-padEtaMinFromDesign;
441  if( thisEta>nPadRowsFromDesign || thisPhi > nPadCols ) continue;
442 
443  Identifier pid=m_idHelperSvc->stgcIdHelper().padID(id, multilayer, gasgap, channeltype, thisEta, thisPhi);
444  auto pad=std::make_shared<PadOfflineData>(pid, 0, 0, m_detManager);
445  pad->fillGeometricInformation();
446  sectorPads.push_back(pad);
447  }
448  return sectorPads;
449  }

◆ fetchSmallSectorPads()

std::vector< std::shared_ptr< PadOfflineData > > NSWL1::PadTriggerLookupTool::fetchSmallSectorPads ( int  side = 1,
int  sector = 1 
)
private

Definition at line 454 of file PadTriggerLookupTool.cxx.

454  {
455  return fetchSectorPads(true,side,sector);
456  }

◆ handle()

void NSWL1::PadTriggerLookupTool::handle ( const Incident &  inc)
overridevirtual

Definition at line 57 of file PadTriggerLookupTool.cxx.

57  {
58 
59  if( inc.type()==IncidentType::BeginEvent ) {
60  return;
61  }
62 
63 
64  return;
65 }

◆ initialize()

StatusCode NSWL1::PadTriggerLookupTool::initialize ( )
overridevirtual

Definition at line 36 of file PadTriggerLookupTool.cxx.

36  {
37  ATH_MSG_DEBUG( "initializing " << name() );
38  ATH_MSG_DEBUG( name() << " configuration:");
40  ATH_CHECK(loadCoincidenceTable("TriggerPatterns.dat") );
42  ATH_MSG_DEBUG(" Will dump 3D pad geometry / sector");
43  std::ofstream padGeoFile("NSWSectorPadsGeoDump.dat");//use local variables in order not to contaminate members
44  //grab full sector pads
45  std::vector<std::shared_ptr<PadOfflineData>> smallSectorPads=fetchSmallSectorPads();
46  std::vector<std::shared_ptr<PadOfflineData>> largeSectorPads=fetchLargeSectorPads();
47  ATH_CHECK(printGeometry(largeSectorPads,padGeoFile) );
48  ATH_CHECK(printGeometry(smallSectorPads,padGeoFile) );
49  padGeoFile.close();
50 
51  }
52  ATH_CHECK(m_idHelperSvc.retrieve());
53  return StatusCode::SUCCESS;
54 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& NSWL1::IPadTriggerLookupTool::interfaceID ( )
inlinestaticinherited

Definition at line 26 of file IPadTriggerLookupTool.h.

26  {
27  static const InterfaceID IID_IPadTriggerLookupTool("NSWL1::IPadTriggerLookupTool", 1 ,0);
28  return IID_IPadTriggerLookupTool;
29  }

◆ loadCoincidenceTable()

StatusCode NSWL1::PadTriggerLookupTool::loadCoincidenceTable ( const std::string &  padCoincidenceFileName)
private

load the 4o4 coincidence table

Definition at line 94 of file PadTriggerLookupTool.cxx.

94  {
95 
96  std::string file = PathResolver::find_file (padCoincidenceFileName, "DATAPATH");
97  ATH_MSG_DEBUG("Loading coincidence table from "<<file);
98  std::ifstream infile(file.c_str());
99  if(!infile){
100  ATH_MSG_FATAL("Can't open file " << file);
101  return StatusCode::FAILURE;
102  }
103  std::string line;
104  while( getline( infile, line ) ){
105 
106  std::stringstream iss( line );
107  int number;
108  std::vector<int> fullPattern;
109  while ( iss >> number ){
110  fullPattern.push_back( number );
111  }
112  //strip pads and band-phiId parts off
113  //The first 8 elements are coincidence patterns the remaining two and band and phi ids
114  std::vector<int> padsOnlyPattern(fullPattern.begin(), fullPattern.begin() + 8);
115  std::vector<int> bandAndPhiId(fullPattern.begin()+8, fullPattern.begin() + 10);
116  int bandId=bandAndPhiId.at(0);
117  int phiId=bandAndPhiId.at(1);
118  m_pats[padsOnlyPattern]=std::pair<int,int>(bandId,phiId);
119  }
120 
122  ATH_MSG_DEBUG(" Load "<<m_pats.size()<<" coincidence patterns...");
123  return StatusCode::SUCCESS;
124 }

◆ Lookup()

std::pair< int, int > NSWL1::PadTriggerLookupTool::Lookup ( std::vector< int >  patt)
private

Definition at line 487 of file PadTriggerLookupTool.cxx.

487  {
488  auto pos=m_pats.find(patt);//should be consant in time
489  if( pos != m_pats.end() ){//if something is found from this pattern then return it
490  return pos->second;
491  }
492 
493  //if nothing is found yet, check if the pattern is 4o4+4o4 or 3o4+3o4 + ... etc
494  //if 3o4+3o4 return (-1,-1) i.e nothing to lookup up furthermore
495  //else if 4o4+4o4 or 4o4+3o4 or vice versa continue lookup by removing layers from 4o4s ...
496  int nullCountInner=std::count(patt.begin(),patt.begin()+4,nullPadNumber);
497  int nullCountOuter=std::count(patt.begin()+4,patt.end(),nullPadNumber);
498  if(nullCountInner+nullCountOuter==2) return std::pair<int,int>(-1,-1);
499  if( nullCountInner ==0 ){//outer is then 3o4, dont touch outer, remove layers from inner + lookup
500  for(int i :{0,1,2,3}){
501  int valueOnLayer=patt.at(i);
502  patt.at(i)=nullPadNumber;//removes layer
503  auto pos=m_pats.find(patt);
504  if( pos!=m_pats.end() ) return pos->second;
505  patt.at(i)=valueOnLayer;//add the layer back
506  }
507  }
508  if( nullCountOuter ==0 ){// inner is then 3o4 dont touch inner, remove layers from outer+lookup
509  for(int i :{4,5,6,7}){
510  int valueOnLayer=patt.at(i);
511  patt.at(i)=nullPadNumber;//removes layer
512  auto pos=m_pats.find(patt);
513  if( pos!=m_pats.end() ) return pos->second;
514  patt.at(i)=valueOnLayer;//add the layer back
515  }
516  }
517  return std::pair<int,int>(-1,-1);
518  }

◆ lookup_pad_triggers()

StatusCode NSWL1::PadTriggerLookupTool::lookup_pad_triggers ( const std::vector< std::shared_ptr< PadData >> &  pads,
std::vector< std::unique_ptr< PadTrigger >> &  triggers 
)
overridevirtual

Implements NSWL1::IPadTriggerLookupTool.

Definition at line 67 of file PadTriggerLookupTool.cxx.

69 {
70  std::set<int> activeSides;
71  std::set<int> activeSectors;
72  //use sector numbers {1,2,3,.....16}
73  std::for_each(pads.begin(),pads.end(),[&](const std::shared_ptr<PadData>& p){
74  activeSides.insert(p->sideId() );
75  activeSectors.insert(p->triggerSectorNumber());
76  }
77  );
78 
79  //use only active sectors selected by the pads / event
80  for(const int side : activeSides){//0:C 1:A
81  for(const int sector : activeSectors){//{1...16} odd:L even:S
83  }
84  }
85  //now you have gathered all the triggers from all sides/sectors..
86  //fill some geometric info for strip selection. the info is sent to the strip
87  //(currently using band eta-design from Y.R)
88  //However it must be removed from the code once xml file is fixed for bands-strips
89 
90  return StatusCode::SUCCESS;
91 }

◆ LookupSectorTriggers()

StatusCode NSWL1::PadTriggerLookupTool::LookupSectorTriggers ( const std::vector< std::shared_ptr< PadData >> &  pads,
int  side,
int  sector,
std::vector< std::unique_ptr< PadTrigger >> &  triggers 
)
private

Definition at line 309 of file PadTriggerLookupTool.cxx.

309  {
310  const int STGCINNER=1;
311  const int STGCOUTER=2;
312  auto inOutModuleMatch=[](const std::vector<std::shared_ptr<PadData>>& inM,const std::vector<std::shared_ptr<PadData>>& outM)->bool{
313  for(const auto& in : inM){
314  for(const auto& out : outM){
315  if(in->padNumber()!=nullPadNumber && out->padNumber()!=nullPadNumber ){
316  //if youre not sure what these numbers are here and all around see PadOfflineData::padNumber()
317  return out->padNumber()/1000-in->padNumber()/1000 <=1;
318  }
319  }
320  }
321  return false;
322  };
323 
324  std::vector<std::pair<int,int> > uniqueBandPhiIds;//just to keep track of the unique triggers found within this lookup call
325  std::vector<std::vector<std::shared_ptr<PadData>> > innerPatterns=selectWedgePatterns(pads, side, sector,STGCINNER);
326  std::vector<std::vector<std::shared_ptr<PadData>> > outerPatterns=selectWedgePatterns(pads, side, sector,STGCOUTER);
327  if(innerPatterns.empty()){
328  ATH_MSG_WARNING(" No hit patterns found / inner wedge");
329  return StatusCode::SUCCESS;
330  }
331  if(outerPatterns.empty()){
332  ATH_MSG_WARNING(" No hit patterns found / outer wedge");
333  return StatusCode::SUCCESS;
334  }
335 
336  for(const std::vector<std::shared_ptr<PadData>>& inner: innerPatterns){
337  for(const std::vector<std::shared_ptr<PadData>>& outer: outerPatterns){
338  //concatenate the two if modules match then Lookup
339  if(! inOutModuleMatch(inner,outer)) continue;
340  std::vector<std::shared_ptr<PadData>> combinedInOut;
341  combinedInOut.insert(combinedInOut.end(),inner.begin(),inner.end());
342  combinedInOut.insert(combinedInOut.end(),outer.begin(),outer.end());
343  //convert set of pads into numbers as in the LUT
344  std::vector<int> pads2Numbers;
345  std::transform(combinedInOut.begin(),combinedInOut.end(),std::back_inserter(pads2Numbers),[](const std::shared_ptr<PadData>& p){ return p->padNumber();});
346  std::pair<int,int> lookupValue=Lookup(pads2Numbers);
347  if(lookupValue.first<0) continue;//{ //no trigger is found yet
348  //append pads to triggers + fill in unique triggers
349  //if band and phi id found is already in the list of sector triggers do not add it to the list
350  //uniqueness defined by sideId /sectorId /bandId /phiId (!!!not only band and phiIds !!!)
351  auto trgpos=std::find_if(triggers.begin(),triggers.end(),
352  [&lookupValue,&side,&sector](const std::unique_ptr<PadTrigger>&tr){
353  return tr->bandId() == lookupValue.second &&
354  tr->phiId() == lookupValue.first &&
355  tr->triggerSectorNumber() == sector &&
356  tr->sideId() == side;
357  });
358  if( trgpos != triggers.end() ) continue;//trigger already exists int the list ... skip
359  uniqueBandPhiIds.push_back(lookupValue);
360  //otherwise instantiate a trigger and append to the list
361  auto trigger=std::make_unique<PadTrigger>();//TODO : PadTrigger needs to be rewriten as a proper class.using a C struct is too messy
362  std::copy(combinedInOut.begin(),combinedInOut.begin()+4,std::back_inserter(trigger->m_padsInner));
363  std::copy(combinedInOut.begin()+4,combinedInOut.end(),std::back_inserter(trigger->m_padsOuter));
364  std::copy(combinedInOut.begin(),combinedInOut.end(),std::back_inserter(trigger->m_pads));
365  trigger->m_bandid=lookupValue.second;
366  trigger->m_phi_id=lookupValue.first;
367  int triggerSectorType=trigger->firstPad()->sectorType();//S:0/1:L
368  switch(triggerSectorType){
369  case(0)://S
370  //Y.R says band ids should start from 2, so to convert it to a C index subtract 2 from bandId
371  //See the header file sTGCTriggerBandsInEta (strip channels<--> bands must be implmeneted in the XML and this eta mased matching must be abandoned. The existing XML values are wrong)
372  trigger->m_etamin=m_etaBandsSmallSector.at(trigger->bandId()-1);
373  trigger->m_etamax=m_etaBandsSmallSector.at(trigger->bandId()-2);
374  break;
375  case(1)://L
376  // The same subtraction likewise for L as well
377  trigger->m_etamin=m_etaBandsLargeSector.at(trigger->bandId()-1);
378  trigger->m_etamax=m_etaBandsLargeSector.at(trigger->bandId()-2);
379  break;
380 
381  default:
382  ATH_MSG_FATAL("Unable to determine trigger sector type");
383  break;
384  }
385  triggers.push_back(std::move(trigger));
386  }
387  }
388 
389  ATH_MSG_DEBUG("Found "<<uniqueBandPhiIds.size()<<" unique triggers from LUT");
390  //Upto this point no geometry is used ... i.e no pad corners , no tower roi , no overlap area etc ....
391  //In principle band id should be suficient to select strips . But we dont have the band configuration in the XML yet ...
392  //so we have to stick to the eta-based strip selection for now ....
393 
394  return StatusCode::SUCCESS;
395 
396  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ printGeometry()

StatusCode NSWL1::PadTriggerLookupTool::printGeometry ( const std::vector< std::shared_ptr< PadOfflineData >> &  ,
std::ofstream &   
) const
private

Definition at line 461 of file PadTriggerLookupTool.cxx.

461  {
462  const static std::vector<int> vertexordering={0,1,3,2};
463  if(! ofile.is_open()){
464  ATH_MSG_FATAL("File is not open!");
465  }
466  auto dumpPadGeometry=[&ofile](const std::shared_ptr<PadOfflineData>& p)->void{
467  Vertices padVertices;
468  for(int i=0;i<4;i++){//four corners
469  int index=vertexordering.at(i);
470  float x=p->m_cornerXyz[index][0];
471  float y=p->m_cornerXyz[index][1];
472  Vertex vtx(x,y);
473  padVertices.push_back(std::move(vtx));
474  }
475  std::string secType= p->sectorType()==1 ? "LARGE": "SMALL";
476  float layerZ=p->m_cornerXyz[0][2];
477  Polygon padPolygon=buildPolygon(padVertices);
478  std::stringstream ss;
479  ss<<secType<<" multilayer="<<p->multipletId()<<" module="<<p->moduleId()<<" layer="<<p->gasGapId()<<" layerZ="<<layerZ<<" iEta="<<p->padEtaId()<<" iPhi="<<p->padPhiId()<<" <--> "<<boost::geometry::wkt(padPolygon)<<std::endl;
480  ofile<<ss.rdbuf();
481  };
482  std::for_each(pads.begin(),pads.end(),dumpPadGeometry);
483  return StatusCode::SUCCESS;
484 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ selectWedgePatterns()

std::vector< std::vector< std::shared_ptr< PadData > > > NSWL1::PadTriggerLookupTool::selectWedgePatterns ( const std::vector< std::shared_ptr< PadData >> &  pads,
int  side,
int  sector,
int  multiplet 
) const
private

Definition at line 182 of file PadTriggerLookupTool.cxx.

182  {
183 
184  //first filter w.r.t inner/outer
185  std::vector<std::shared_ptr<PadData> > padsInThisWedge;
186  //Within logic we have sectors numbered as {1,2,3....16} : A/C
187  auto wedgeSelector=[=](const std::shared_ptr<PadData>& pad)->bool{
188  return pad->sideId() == side &&
189  pad->triggerSectorNumber() == sector &&
190  pad->multipletId() == wedge;
191  };
192  //filter pads within this sector / wedge
193  std::copy_if(pads.begin(),pads.end(),std::back_inserter(padsInThisWedge),[=]( const std::shared_ptr<PadData>& pad){ return wedgeSelector(pad);} );
194  //too many pad hits might cause a performance issue . 100 pads ~ 100/4 ~ 25 pad hits per layer !!!!
195  if(padsInThisWedge.size()>100){
196  ATH_MSG_WARNING("Too many pad hits: ("<<padsInThisWedge.size()<<")pad hits on side= "<<side<<" sector="<<sector<<" wedge="<<wedge);
197  }
198  //classify pads now layerwise
199  std::vector<std::shared_ptr<PadData> > padsOnLayer1;
200  std::vector<std::shared_ptr<PadData> > padsOnLayer2;
201  std::vector<std::shared_ptr<PadData> > padsOnLayer3;
202  std::vector<std::shared_ptr<PadData> > padsOnLayer4;
203  std::copy_if(padsInThisWedge.begin(),padsInThisWedge.end(),std::back_inserter(padsOnLayer1),[](const std::shared_ptr<PadData>& pad){ return pad->gasGapId()==1;} );
204  std::copy_if(padsInThisWedge.begin(),padsInThisWedge.end(),std::back_inserter(padsOnLayer2),[](const std::shared_ptr<PadData>& pad){ return pad->gasGapId()==2;} );
205  std::copy_if(padsInThisWedge.begin(),padsInThisWedge.end(),std::back_inserter(padsOnLayer3),[](const std::shared_ptr<PadData>& pad){ return pad->gasGapId()==3;} );
206  std::copy_if(padsInThisWedge.begin(),padsInThisWedge.end(),std::back_inserter(padsOnLayer4),[](const std::shared_ptr<PadData>& pad){ return pad->gasGapId()==4;} );
207 
208  //build all possible combinations with pad/layer
209  std::vector<std::vector<std::shared_ptr<PadData> >> padCombinationsInWedge;
210  //if we have more than 1 layer missing reject / returns an empty list
211  std::vector< size_t> nHitsLayerWise={ padsOnLayer1.size(),padsOnLayer2.size(),padsOnLayer3.size(),padsOnLayer4.size() };
212  if( std::count(nHitsLayerWise.begin(),nHitsLayerWise.end(),0)>1){
213  ATH_MSG_WARNING("Not enough layer hits to build a pattern at side="<<side<<" sector="<<sector);
214  return padCombinationsInWedge;//returns empty
215  }
216  //assigns a vector of {nullPad} (size 1) on a layer if it has no hits
217  auto addEmptyLayerIfAny=[]( std::vector<std::shared_ptr<PadData> >& layerPads)->void{
218  if(layerPads.empty()){
219  std::vector<std::shared_ptr<PadData>> emptyLayer;
220  std::shared_ptr<PadData> nullPad=std::make_shared<PadOfflineData>(Identifier(0), 0, 0, nullptr);//do not change the null pointer !
221  emptyLayer.push_back(nullPad);
222  layerPads=emptyLayer;
223  }
224  };
225 
226  addEmptyLayerIfAny(padsOnLayer1);
227  addEmptyLayerIfAny(padsOnLayer2);
228  addEmptyLayerIfAny(padsOnLayer3);
229  addEmptyLayerIfAny(padsOnLayer4);
230  //The neighborhood, in ieta and iphi, can be spanned by 1 at max in both directions (logic)
231  //Obviously , do not apply logic or any other kind of check if one layer is missing
232 
233  auto padBinaryLogic=[](const std::shared_ptr<PadData>& padNext,const std::shared_ptr<PadData>& padPrev)->bool{//compares two pads on consecutive layers
234  if(padNext->padNumber()==nullPadNumber || padPrev->padNumber() == nullPadNumber) return true;
235  else{
236  return std::abs(padNext->padNumber()-padPrev->padNumber() )==1 ||
237  std::abs(padNext->padNumber() -padPrev->padNumber() )==18 ||
238  std::abs(padNext->padNumber() -padPrev->padNumber() )==19 ||
239  std::abs(padNext->padNumber() -padPrev->padNumber() )==17 ||
240  (padNext->padNumber() -padPrev->padNumber() ==0);
241  }
242  };
243 
244  //given a set of pads check if all is within the same module...
245  auto allInSameModule=[](const std::vector<std::shared_ptr<PadData>>& pads)->bool{
246  if(pads.size()!=4) return false;//no need to check again here but extra protection doesnt hurt
247  int moduleIdFirst;
248  int ctr=0;
249  for(const std::shared_ptr<PadData>& pad : pads){
250  if(pad->padNumber()==nullPadNumber) continue;//ignore missing layer
251  if(ctr==0){
252  moduleIdFirst=pad->moduleId();
253  ctr++;
254  continue;
255  }
256  if(pad->moduleId()!=moduleIdFirst) return false;
257 
258  }
259  return true;
260  };
261  //Given a set of pads/module/wedge check if the given pad configuration satisfies the logic
262  //for 4 layer hit patterns use the 2-bits weak logic.
263  //if you want to scan all the legit triggers use full logic (with 3 bits for 4 layer hits!)
264  auto padTowerLogic=[&padBinaryLogic,&allInSameModule](const std::vector<std::shared_ptr<PadData>>& pads)->bool{
265  std::bitset<3> layerbits;//holds 0-->1 1-->2 2-->3 logic / transitions across consecutive layers
266  //==== check all pads have same module ids =====
267  if(not allInSameModule(pads)) return false;
268  for(unsigned i=0;i<4;i++){
269  if( padBinaryLogic(pads.at(i),pads.at(i+1)) ) layerbits.set(i); //sets bits 0 ,1 and 2 (layer transitions 0->1 1->2 2->3 )
270  if(i==2) break;
271  }
272  // for 3o4s the logic bits must be 1,1,1
273  //for 4o4s the bits must have at least two bits set (1 layer fault tolerance, to acount for noise as discussed with Y.R, E.K and Riccardo to mimic the hardware)
274  bool is4o4= true ? std::count_if(pads.begin(),pads.end(),[](const std::shared_ptr<PadData>& p){ return p->padNumber()==nullPadNumber;})==0 : false;
275  if(is4o4){
276  return layerbits.count()>=2;
277  }
278  else{//3o4
279  return layerbits.count()==3;
280  }
281  };
282  //as we are using pads/sector but not pads/module this will boost performance by eliminating meaningless pad combinations across different modules
283  auto sameModule=[](const std::shared_ptr<PadData>& padNext,const std::shared_ptr<PadData>& padPrev )->bool{
284  if(padNext->padNumber()==nullPadNumber || padPrev->padNumber() == nullPadNumber) return true;
285  else return (padNext->padNumber()/1000 == padPrev->padNumber()/1000);
286  /*
287  No need to check sector/side matching as the whole thing runs on per unique sector
288  */
289  };
290 
291  //We can remove the entire "allInSameModule" check as we do module checks with sameModule in nested loops (Gal spotted this)
292  for(const std::shared_ptr<PadData>& pad1 : padsOnLayer1 ){
293  for(const std::shared_ptr<PadData>& pad2 : padsOnLayer2 ){
294  if( !sameModule(pad2,pad1) ) continue;
295  for(const std::shared_ptr<PadData>& pad3 : padsOnLayer3 ){
296  if( !sameModule(pad3,pad2) ) continue;
297  for(const std::shared_ptr<PadData>& pad4 : padsOnLayer4 ){
298  if( !sameModule(pad4,pad3) ) continue;
299  std::vector<std::shared_ptr<PadData>> patt={pad1,pad2,pad3,pad4};
300  if(! padTowerLogic(patt) ) continue;
301  padCombinationsInWedge.emplace_back(std::vector<std::shared_ptr<PadData> >({pad1,pad2,pad3,pad4}) );
302  }
303  }
304  }
305  }
306  return padCombinationsInWedge;
307  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detManager

const MuonGM::MuonDetectorManager* NSWL1::PadTriggerLookupTool::m_detManager
private

Definition at line 63 of file PadTriggerLookupTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dumpSectorGeometry

Gaudi::Property<bool> NSWL1::PadTriggerLookupTool::m_dumpSectorGeometry {this, "DumpSectorGeometry", false, "Record sector pad geometry into an ASCII file (1L/1S by default). Use it for debugging"}
private

Definition at line 52 of file PadTriggerLookupTool.h.

◆ m_etaBandsLargeSector

const std::vector<float> NSWL1::PadTriggerLookupTool::m_etaBandsLargeSector
private

Definition at line 58 of file PadTriggerLookupTool.h.

◆ m_etaBandsSmallSector

const std::vector<float> NSWL1::PadTriggerLookupTool::m_etaBandsSmallSector
private

Definition at line 59 of file PadTriggerLookupTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> NSWL1::PadTriggerLookupTool::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 51 of file PadTriggerLookupTool.h.

◆ m_pats

std::unordered_map<std::vector<int>,std::pair<int,int> ,hashPattern> NSWL1::PadTriggerLookupTool::m_pats
private

Definition at line 70 of file PadTriggerLookupTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
NSWL1::PadTriggerLookupTool::m_dumpSectorGeometry
Gaudi::Property< bool > m_dumpSectorGeometry
Definition: PadTriggerLookupTool.h:52
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
mergePhysValFiles.pattern
pattern
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:26
MuonGM::MuonPadDesign
Parameters defining the design of the readout sTGC pads.
Definition: MuonPadDesign.h:40
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
checkFileSG.line
line
Definition: checkFileSG.py:75
NSWL1::PadTriggerLookupTool::selectWedgePatterns
std::vector< std::vector< std::shared_ptr< PadData > > > selectWedgePatterns(const std::vector< std::shared_ptr< PadData >> &pads, int side, int sector, int multiplet) const
Definition: PadTriggerLookupTool.cxx:182
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
run.infile
string infile
Definition: run.py:13
PathResolver::find_file
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Definition: PathResolver.cxx:251
NSWL1::PadTriggerLookupTool::m_etaBandsSmallSector
const std::vector< float > m_etaBandsSmallSector
Definition: PadTriggerLookupTool.h:59
index
Definition: index.py:1
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
NSWL1::Vertex
boost::geometry::model::d2::point_xy< double > Vertex
Definition: GeoUtils.h:17
NSWL1::BandsInEtaLargeSector
const std::vector< float > BandsInEtaLargeSector
Definition: sTGCTriggerBandsInEta.h:16
NSWL1::BandsInEtaSmallSector
const std::vector< float > BandsInEtaSmallSector
Definition: sTGCTriggerBandsInEta.h:111
validation.ofile
ofile
Definition: validation.py:96
NSWL1::Polygon
boost::geometry::model::polygon< Vertex > Polygon
Definition: GeoUtils.h:18
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
makeHists.thisPhi
thisPhi
Definition: makeHists.py:127
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
NSWL1::PadTriggerLookupTool::expandCoincidenceTable
StatusCode expandCoincidenceTable()
Definition: PadTriggerLookupTool.cxx:126
NSWL1::PadTriggerLookupTool::m_detManager
const MuonGM::MuonDetectorManager * m_detManager
Definition: PadTriggerLookupTool.h:63
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.TrigTLAMonitorAlgorithm.triggers
triggers
Definition: TrigTLAMonitorAlgorithm.py:196
x
#define x
NSWL1::PadTriggerLookupTool::fetchSectorPads
std::vector< std::shared_ptr< PadOfflineData > > fetchSectorPads(bool isSmall, int side=1, int sector=1)
Definition: PadTriggerLookupTool.cxx:401
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
TRT::Hit::side
@ side
Definition: HitInfo.h:83
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
NSWL1::PadTriggerLookupTool::printGeometry
StatusCode printGeometry(const std::vector< std::shared_ptr< PadOfflineData >> &, std::ofstream &) const
Definition: PadTriggerLookupTool.cxx:461
MuonGM::MuonPadDesign::padEtaMax
int padEtaMax
Definition: MuonPadDesign.h:47
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonGM::sTgcReadoutElement
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:30
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
file
TFile * file
Definition: tile_monitor.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AnalysisUtils::copy_if
Out copy_if(In first, const In &last, Out res, const Pred &p)
Definition: IFilterUtils.h:30
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
NSWL1::PadTriggerLookupTool::loadCoincidenceTable
StatusCode loadCoincidenceTable(const std::string &)
load the 4o4 coincidence table
Definition: PadTriggerLookupTool.cxx:94
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
find_tgc_unfilled_channelids.all_channels
all_channels
Definition: find_tgc_unfilled_channelids.py:18
NSWL1::nullPadNumber
const int nullPadNumber
Definition: tdr_compat_enum.h:21
NSWL1::PadTriggerLookupTool::m_pats
std::unordered_map< std::vector< int >, std::pair< int, int >,hashPattern > m_pats
Definition: PadTriggerLookupTool.h:70
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
python.selection.number
number
Definition: selection.py:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
sTgcIdHelper
Definition: sTgcIdHelper.h:55
MuonGM::MuonPadDesign::nPadColumns
int nPadColumns
Definition: MuonPadDesign.h:69
NSWL1::PadTriggerLookupTool::Lookup
std::pair< int, int > Lookup(std::vector< int >)
Definition: PadTriggerLookupTool.cxx:487
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
NSWL1::PadTriggerLookupTool::m_etaBandsLargeSector
const std::vector< float > m_etaBandsLargeSector
Definition: PadTriggerLookupTool.h:58
DeMoScan.index
string index
Definition: DeMoScan.py:364
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
h
NSWL1::PadTriggerLookupTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: PadTriggerLookupTool.h:51
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
calibdata.copy
bool copy
Definition: calibdata.py:27
MuonGM::sTgcReadoutElement::getPadDesign
const MuonPadDesign * getPadDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:285
SIDE
SIDE
Definition: CellClusterLinkTool.h:52
MuonGM::MuonDetectorManager::getsTgcReadoutElement
const sTgcReadoutElement * getsTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:259
NSWL1::PadTriggerLookupTool::fetchSmallSectorPads
std::vector< std::shared_ptr< PadOfflineData > > fetchSmallSectorPads(int side=1, int sector=1)
Definition: PadTriggerLookupTool.cxx:454
NSWL1::PadTriggerLookupTool::fetchLargeSectorPads
std::vector< std::shared_ptr< PadOfflineData > > fetchLargeSectorPads(int side=1, int sector=1)
Definition: PadTriggerLookupTool.cxx:457
dqt_zlumi_alleff_HIST.ctr
ctr
Definition: dqt_zlumi_alleff_HIST.py:193
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
NSWL1::Vertices
std::vector< Vertex > Vertices
Definition: GeoUtils.h:19
MuonGM::MuonPadDesign::padEtaMin
int padEtaMin
Definition: MuonPadDesign.h:46
fitman.k
k
Definition: fitman.py:528
NSWL1::buildPolygon
Polygon buildPolygon(const Vertices &pts)
Definition: GeoUtils.cxx:44
NSWL1::PadTriggerLookupTool::LookupSectorTriggers
StatusCode LookupSectorTriggers(const std::vector< std::shared_ptr< PadData >> &pads, int side, int sector, std::vector< std::unique_ptr< PadTrigger >> &triggers)
Definition: PadTriggerLookupTool.cxx:309
Identifier
Definition: IdentifierFieldParser.cxx:14