Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
PadTriggerLogicOfflineTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "GaudiKernel/ConcurrencyFlags.h"
7 
9 #include <mutex>
10 
11 namespace NSWL1 {
12 //------------------------------------------------------------------------------
13 PadTriggerLogicOfflineTool::PadTriggerLogicOfflineTool(const std::string& type, const std::string& name, const IInterface* parent) :
15  m_etaBandsLargeSector(BandsInEtaLargeSector),
16  m_etaBandsSmallSector(BandsInEtaSmallSector),
17  m_tdrLogic()
18  {
19  declareInterface<NSWL1::IPadTriggerLogicTool>(this);
20  }
21 
23  ATH_MSG_DEBUG( "initializing " << name() );
24  ATH_MSG_DEBUG( name() << " configuration:");
25 
26  // retrieve the MuonDetectormanager
28 
29  return StatusCode::SUCCESS;
30 }
31 
33  SG::ReadCondHandle<MuonGM::MuonDetectorManager> detManager{m_detManagerKey, Gaudi::Hive::currentContext()};
34  const MuonGM::sTgcReadoutElement* rdoEl = detManager->getsTgcReadoutElement(pod.Identity());
35  const Trk::PlaneSurface &surface = rdoEl->surface(pod.Identity());
36  std::array<Amg::Vector2D, 4> local_pad_corners{make_array<Amg::Vector2D, 4>(Amg::Vector2D::Zero())};
37  //From MuonPadDesign... read pad local corners
38  rdoEl->padCorners(pod.Identity(),local_pad_corners);
39  Amg::Vector3D pad_corner_global;
40  for(unsigned int i=0; i<4; i++) {
41  surface.localToGlobal(local_pad_corners.at(i), pad_corner_global, pad_corner_global);
42  pod.m_cornerXyz[i][0] = pad_corner_global.x();
43  pod.m_cornerXyz[i][1] = pad_corner_global.y();
44  pod.m_cornerXyz[i][2] = pad_corner_global.z();
45  }
46 }
47 
49 std::vector<std::shared_ptr<PadData>> filterByMultiplet(const std::vector<std::shared_ptr<PadData>> &pads_in, const int multiplet){
50  std::vector<std::shared_ptr<PadData>> pads_out;
51  pads_out.reserve(0.5*pads_in.size()); // educated guess (half inner multiplet, half outer multiplet)
52  for(const auto& p : pads_in)
53  if(p->multipletId()==multiplet)
54  pads_out.push_back(p);
55  return pads_out;
56 }
58 std::vector<std::shared_ptr<PadData>> filterByGasGap(const std::vector<std::shared_ptr<PadData>> &pads_in, const int gasgap){
59  std::vector<std::shared_ptr<PadData>> pads_out;
60  pads_out.reserve(0.25*pads_in.size()); // educated guess (4 gas gaps)
61  for(const auto& p : pads_in)
62  if(p->gasGapId()==gasgap)
63  pads_out.push_back(p);
64  return pads_out;
65 }
66 
67 std::vector<std::unique_ptr<PadTrigger>> PadTriggerLogicOfflineTool::build4of4SingleWedgeTriggers(const std::vector<std::shared_ptr<PadData>> &pads) {
68  std::vector<std::unique_ptr<PadTrigger>> triggers;
69  for(const auto& p0 : filterByGasGap(pads, 1)){
70  int p0ieta = p0->padEtaId();
71  int p0iphi = p0->padPhiId();
72  for(const auto& p1 : filterByGasGap(pads, 2)){
73  int p1ieta = p1->padEtaId();
74  int p1iphi = p1->padPhiId();
75  bool p0_p1_match = ((p1ieta == p0ieta || p1ieta == p0ieta+1 ) &&
76  (p1iphi == p0iphi || p1iphi == p0iphi+1 ) );
77  if(not p0_p1_match) continue;
78  for(const auto& p2 :filterByGasGap(pads, 3) ){
79  int p2ieta = p2->padEtaId();
80  int p2iphi = p2->padPhiId();
81  bool p1_p2_match = ((p2ieta == p1ieta || p2ieta == p1ieta+1 ) &&
82  (p2iphi == p1iphi || p2iphi == p1iphi+1 ) );
83  if(not p1_p2_match) continue;
84  for(const auto& p3 : filterByGasGap(pads, 4)){
85  int p3ieta = p3->padEtaId();
86  int p3iphi = p3->padPhiId();
87  bool p2_p3_match = ((p3ieta == p2ieta || p3ieta == p2ieta+1 ) &&
88  (p3iphi == p2iphi || p3iphi == p2iphi+1 ) );
89  if(p2_p3_match){
90  auto trg=std::make_unique<PadTrigger>();
91  trg->m_pads.push_back(p0);
92  trg->m_pads.push_back(p1);
93  trg->m_pads.push_back(p2);
94  trg->m_pads.push_back(p3);
95  triggers.push_back(std::move(trg));
96  }
97  } // for(p3)
98  } // for(p2)
99  } // for(p1)
100  } // for(p0)
101  return triggers;
102 }
103 
104 
105 StatusCode PadTriggerLogicOfflineTool::compute_pad_triggers(const std::vector<std::shared_ptr<PadData>>& pads,
106  std::vector<std::unique_ptr<PadTrigger>> &triggers) const
107 {
108  if(!m_isInitialized) {fillPhiTable();}
109  ATH_MSG_DEBUG(" <N> receiving "<<pads.size()<<" pad data");
110  ATH_MSG_DEBUG("calling compute_pad_triggers() (pads.size() "<<pads.size()<<")");
111  for(const auto& pad : pads){
112  ATH_MSG_DEBUG(" <N> building trig from pad "
113  <<" side "<<pad->sideId()<<""
114  <<", sector "<<pad->sectorId()
115  <<", sector type "<<pad->sectorType()
116  <<", module "<<pad->moduleId()
117  <<", multiplet "<<pad->multipletId()
118  <<", gas gap "<<pad->gasGapId()
119  <<", pad eta "<<pad->padEtaId()
120  <<", pad phi "<<pad->padPhiId());
121  }
122  for(const size_t side : SIDES){
123  for(const size_t sector : SECTORS){
124  std::vector<std::shared_ptr<PadData>> sector_pads;
125  std::copy_if(pads.begin(), pads.end(),
126  back_inserter(sector_pads),
127  [&](const std::shared_ptr<PadData>& p) { return (p->sideId()==static_cast<int>(side) &&
128  (2*p->sectorId()-1-p->sectorType())==static_cast<int>(sector));});
129 
130  if(!sector_pads.empty()){
131  const std::shared_ptr<PadData> firstPad = sector_pads[0];
132  ATH_MSG_DEBUG("<N> side "
133  <<(firstPad->sideId()==0?"A":"C")
134  <<" trigger sector "<< (2*firstPad->sectorId()-1-firstPad->sectorType())
135  <<" : "<<sector_pads.size()<<" pads");
136  if(m_useSimple4of4) {
137  const int innerMultiplet(1), outerMultiplet(2); // DG-2015-10-07 move to enum?
138  std::vector<std::shared_ptr<PadData>> padsInner(filterByMultiplet(sector_pads, innerMultiplet));
139  std::vector<std::shared_ptr<PadData>> padsOuter(filterByMultiplet(sector_pads, outerMultiplet));
140  std::vector<std::unique_ptr<PadTrigger>> triggersInner = build4of4SingleWedgeTriggers(padsInner);
141  std::vector<std::unique_ptr<PadTrigger>> triggersOuter = build4of4SingleWedgeTriggers(padsOuter);
142  ATH_MSG_DEBUG("found "
143  <<triggersInner.size()<<" inner triggers"
144  <<" and "
145  <<triggersOuter.size()<<" outer triggers");
146  triggers.reserve(triggers.size() + triggersInner.size()+triggersOuter.size());
147 
148  triggers.insert(triggers.end(),std::make_move_iterator(triggersInner.begin()),std::make_move_iterator(triggersInner.end()));
149  triggers.insert(triggers.end(),std::make_move_iterator(triggersOuter.begin()),std::make_move_iterator(triggersOuter.end()));
150  }
151  else {
152  std::vector<std::shared_ptr<PadOfflineData>> trgpads;
153  for(const auto& p : sector_pads){
154  auto pod=std::dynamic_pointer_cast<PadOfflineData> (p);
156  trgpads.emplace_back(std::move(pod));
157  }
158  const std::vector<SectorTriggerCandidate> candidates = m_tdrLogic.buildSectorTriggers(trgpads,m_Zratio);
159  int index=0;
160  for( const auto& st : candidates){
161  auto p=std::make_unique<PadTrigger>(convert(st));
162  p->m_triggerindex=index;
163  if (p->m_pads.empty()) continue;//don't record null triggers (rejected or empty)
164  triggers.push_back(std::move(p));
165  index++;
166  }
167  ATH_MSG_DEBUG("found " << candidates.size() << " triggers using the tdr logic");
168  }
169  } // if(sector_pads)
170  } // for(sector)
171  } // for(side)
172  return StatusCode::SUCCESS;
173 }
174 //------------------------------------------------------------------------------
175 
176 int PadTriggerLogicOfflineTool::ROI2BandId(const float EtaTrigAtCenter, const int SectorType) const {
177 
178  switch(SectorType){
179  case(1): //L
180  if(EtaTrigAtCenter < m_etaBandsLargeSector.back() || EtaTrigAtCenter > m_etaBandsLargeSector.front()) return -999;
181  for(unsigned int i=0;i<m_etaBandsLargeSector.size();i++){
182  if(EtaTrigAtCenter < m_etaBandsLargeSector.at(i) && EtaTrigAtCenter > m_etaBandsLargeSector.at(i+1) ) return i;
183  }
184  break;
185 
186  case(0): //S
187  if(EtaTrigAtCenter < m_etaBandsSmallSector.back() || EtaTrigAtCenter > m_etaBandsSmallSector.front()) return -999;
188  for(unsigned int i=0;i<m_etaBandsSmallSector.size();i++){
189  if(EtaTrigAtCenter < m_etaBandsSmallSector.at(i) && EtaTrigAtCenter > m_etaBandsSmallSector.at(i+1) ) return i;
190  }
191  break;
192 
193  default:
194  ATH_MSG_FATAL(" Unexpected SectorType="<<SectorType);
195  break;
196  }
197  return -999;
198 }
199 
200 //------------------------------------------------------------------------------
202 
203  PadTrigger pt;
204  const Polygon roi=stc.triggerRegion3();
205  Vertex trgCntr=centroid(roi);
206  SingleWedgePadTrigger innertrg = stc.wedgeTrigs().at(0);
207 
208  //*********** assign central etaphi cordinates of the triggering region *****************
209  const float xcntr=coordinate<0>(trgCntr);
210  const float ycntr=coordinate<1>(trgCntr);
211  const float zcntr=innertrg.pads().at(0)->m_cornerXyz[1][2];
212  ROOT::Math::XYZVector trigVector(xcntr,ycntr,zcntr);
213  const float etaTrig=trigVector.Eta();
214  const float phiTrig=trigVector.Phi();
215  pt.m_eta = etaTrig;
216  pt.m_phi = phiTrig;
217 
218  /*
219  ===== Recipe for projecting eta of the trigger centroid to the axis of symmetry on a sector =======
220  */
221  //**************************************************************************************
222  auto pad0=innertrg.pads().at(0);
223  Identifier idt(pad0->id());
224  SG::ReadCondHandle<MuonGM::MuonDetectorManager> detManager{m_detManagerKey, Gaudi::Hive::currentContext()};
225  const Trk::PlaneSurface &surf = detManager->getsTgcReadoutElement(idt)->surface(idt);
226  Amg::Vector3D global_trgCoordinates(xcntr,ycntr,zcntr);
227  Amg::Vector2D local_trgCoordinates;
228  surf.globalToLocal(global_trgCoordinates,Amg::Vector3D(),local_trgCoordinates);
229 
230  float yloc_trg=local_trgCoordinates.y();
231  Amg::Vector2D local_trgCoordinateOnAxis(0,yloc_trg);
232  Amg::Vector3D global_trgCoordinateProjectedOnAxis;
233  surf.localToGlobal(local_trgCoordinateOnAxis, Amg::Vector3D(),global_trgCoordinateProjectedOnAxis);
234  ROOT::Math::XYZVector trgVectorProjectedOnAxis(global_trgCoordinateProjectedOnAxis.x(),global_trgCoordinateProjectedOnAxis.y(),global_trgCoordinateProjectedOnAxis.z());
235  float etaProjected=trgVectorProjectedOnAxis.Eta();
236  int secType=pad0->sectorType();
237  int matchedBandId=ROI2BandId(std::abs(etaProjected),secType);
238  pt.m_bandid = (matchedBandId < 0) ? 0 : matchedBandId+2;// Y.R Bands start from 2
239  if(pt.m_bandid == 0) ATH_MSG_WARNING("PadTrigger out of current eta bands");
240 
241  /* ======== End of band Id matching and assignment ======================= */
242 
243  pt.m_multiplet_id = pad0->multipletId();
244  pt.m_eta_id = innertrg.halfPadCoordinates().ieta;//this is meaningless and shoiuld be removed
245  pt.m_isSmall= int(innertrg.isSmallSector());
246 
247  //************** assign extrema of the trigger region coordinates in eta-phi and some other variables for offline analysis **************
248  std::vector<std::pair<float,float>> trg_etaphis;
249  for(const auto& v : boost::geometry::exterior_ring(roi)){
250  const float xcurr=coordinate<0>(v);
251  const float ycurr=coordinate<1>(v);
252  const float zcurr=zcntr;
253  const float etacurr=eta(xcurr,ycurr,zcurr);
254  const float phicurr=phi(xcurr,ycurr,zcurr);
255  trg_etaphis.emplace_back(etacurr,phicurr);
256  }
257  const auto trg_phiminmax=std::minmax_element(trg_etaphis.begin(),trg_etaphis.end(),[](
258  const std::pair<float,float>& l,const std::pair<float,float>& r){return l.second<r.second;}
259  );
260  float trgEtaMin=0;
261  float trgEtaMax=0;
262 
263  if(pt.m_isSmall && matchedBandId > 0){
264  trgEtaMin=m_etaBandsSmallSector.at(matchedBandId+1);
265  trgEtaMax=m_etaBandsSmallSector.at(matchedBandId);
266  } else if(!pt.m_isSmall && matchedBandId > 0) {
267  trgEtaMin=m_etaBandsLargeSector.at(matchedBandId+1);
268  trgEtaMax=m_etaBandsLargeSector.at(matchedBandId);
269  }
270 
271  pt.m_etamin=trgEtaMin;
272  pt.m_etamax=trgEtaMax;
273  pt.m_phimin=(trg_phiminmax.first)->second;
274  pt.m_phimax=(trg_phiminmax.second)->second;
275  pt.m_moduleIdInner=-1;
276  pt.m_moduleIdOuter=-1;
277 
278  if(stc.wedgeTrigs().size()==2){//double wedge trigger
279  pt.m_moduleIdInner=stc.wedgeTrigs().at(0).pads().at(0)->moduleId();
280  pt.m_moduleIdOuter=stc.wedgeTrigs().at(1).pads().at(1)->moduleId();
281  }
282  else{
283  int multId0=stc.wedgeTrigs().at(0).pads().at(0)->multipletId();
284  if( multId0==1){
285  pt.m_moduleIdInner=stc.wedgeTrigs().at(0).pads().at(0)->moduleId();
286  }
287  else{
288  pt.m_moduleIdOuter=stc.wedgeTrigs().at(0).pads().at(0)->moduleId();
289  }
290  //one of the module Ids remain as -1 /single wedge trigger
291  }
292 
293  //****************************************************************************************
294 
295  for(const SingleWedgePadTrigger& swt : stc.wedgeTrigs()){
296  int currwedge=swt.pads().at(0)->multipletId();
297  std::vector<float> trglocalminY;
298  std::vector<float> trglocalmaxY;
299  std::vector<int> trgSelectedLayers;
300  std::vector<int> trgSelectedBands;
301  std::vector<int> trgPadPhiIndices;
302  std::vector<int> trgPadEtaIndices;
303  std::vector< std::shared_ptr<PadData>> trgPads;
304  for(const auto &p : swt.pads()){
305  const float padZ=p->m_cornerXyz[0][2];
306  Identifier Id( p->id());
307  const Trk::PlaneSurface &padsurface = detManager->getsTgcReadoutElement(Id)->surface(Id);
308  float Phi=p->stationPhiAngle();
309 
310  //Find the radial boundaries of the band within the sector axis
311  float Rmin=std::abs(padZ*std::tan(2*std::atan(-1*std::exp(pt.m_etamax))) );
312  float Rmax=std::abs(padZ*std::tan(2*std::atan(-1*std::exp(pt.m_etamin))) );
313  float xmin=Rmin*std::cos(Phi);
314  float ymin=Rmin*std::sin(Phi);
315  float xmax=Rmax*std::cos(Phi);
316  float ymax=Rmax*std::sin(Phi);
317 
318  Amg::Vector3D global_trgMinOnAxis(xmin,ymin,padZ);
319  Amg::Vector3D global_trgMaxOnAxis(xmax,ymax,padZ);
320 
321  Amg::Vector2D local_trgMinOnAxis;
322  Amg::Vector2D local_trgMaxOnAxis;
323  padsurface.globalToLocal(global_trgMinOnAxis,Amg::Vector3D(),local_trgMinOnAxis);
324  padsurface.globalToLocal(global_trgMaxOnAxis,Amg::Vector3D(),local_trgMaxOnAxis);
325 
326  float bandLocalMaxY=local_trgMaxOnAxis.y();
327  float bandLocalMinY=local_trgMinOnAxis.y();
328 
329  trglocalminY.push_back(bandLocalMinY);
330  trglocalmaxY.push_back(bandLocalMaxY);
331  trgSelectedLayers.push_back(p->gasGapId());
332  trgSelectedBands.push_back(matchedBandId+2);
333  trgPadPhiIndices.push_back(p->padPhiId());
334  trgPadEtaIndices.push_back(p->padEtaId());
335  trgPads.push_back(p);
336  pt.m_pads.push_back(p);
337  } // eof for(p) pads
338  //assign variables / wedgewise
339  if(currwedge==1){
340  pt.m_trglocalminYInner=trglocalminY;
341  pt.m_trglocalmaxYInner=trglocalmaxY;
342  pt.m_trgSelectedLayersInner=trgSelectedLayers;
343  pt.m_trgSelectedBandsInner=trgSelectedBands;
344  pt.m_trgPadPhiIndicesInner=trgPadPhiIndices;
345  pt.m_trgPadEtaIndicesInner=trgPadEtaIndices;
346  pt.m_padsInner=trgPads;
347  }
348  if(currwedge==2){
349  pt.m_trglocalminYOuter=trglocalminY;
350  pt.m_trglocalmaxYOuter=trglocalmaxY;
351  pt.m_trgSelectedLayersOuter=trgSelectedLayers;
352  pt.m_trgSelectedBandsOuter=trgSelectedBands;
353  pt.m_trgPadPhiIndicesOuter=trgPadPhiIndices;
354  pt.m_trgPadEtaIndicesOuter=trgPadEtaIndices;
355  pt.m_padsOuter=trgPads;
356  }
357 
358  trglocalminY.clear();
359  trglocalmaxY.clear();
360  trgSelectedLayers.clear();
361  trgSelectedBands.clear();
362  trgPadPhiIndices.clear();
363  trgPadEtaIndices.clear();
364  trgPads.clear();
365  } // eof for (swt) single wedge trigger
366 
367  //Assignment of Phi Id using 6 bits slicing
368  Identifier padIdentifier(pt.m_pads.at(0)->id() );
369  IdentifierHash moduleHashId;
370  const IdContext ModuleContext = detManager->stgcIdHelper()->module_context();
371 
372  //get the module Identifier using the pad's
373  detManager->stgcIdHelper()->get_hash( padIdentifier, moduleHashId, &ModuleContext );
374  float stationPhiMin=0.0;
375  float stationPhiMax=0.0;
376  if (!m_isInitialized){fillPhiTable();}
377  std::map<IdentifierHash,std::pair<double,double>>::const_iterator itPhi = m_phiTable.find(moduleHashId);
378  if (itPhi != m_phiTable.end()) {
379  stationPhiMin=(*itPhi).second.first;
380  stationPhiMax=(*itPhi).second.second;
381  }
382  else {
383  ATH_MSG_WARNING("Could not find the hash Id: " << moduleHashId << " in the map");
384  }
385 
386  float trgPhiCntr=pt.m_phi;
387  int nPhiSlices=1<<m_phiIdBits;//6 bits for Phi Id; i.e interval of [0,....63]
388 
389  // special treatment for the last phi region
390  if ( stationPhiMax > M_PI && trgPhiCntr<0 ) {
391  trgPhiCntr=2*M_PI-fabs(trgPhiCntr);
392  }
393 
394  if ( trgPhiCntr<stationPhiMin || trgPhiCntr>stationPhiMax ) {
395  ATH_MSG_WARNING("Trigger phi: " << trgPhiCntr << " outside the station. Min, max: " << stationPhiMin << " " << stationPhiMax );
396  }
397 
398  float step=(stationPhiMax-stationPhiMin)/nPhiSlices;
399  for( int i=0;i<nPhiSlices;i++){
400  if(stationPhiMin+i*step>=trgPhiCntr){
401  pt.m_phi_id=i;
402  break;
403  }
404  }
405  return pt;
406 }
407 
408  // fill the map with the phi ranges
410 
411  std::lock_guard guard{m_mutex};
412  if (m_isInitialized) {
413  return;
414  }
415  SG::ReadCondHandle<MuonGM::MuonDetectorManager> detManager{m_detManagerKey, Gaudi::Hive::currentContext()};
416  const sTgcIdHelper* helper = detManager->stgcIdHelper();
417 
418  std::vector<Identifier>::const_iterator idfirst = helper->module_begin();
419  std::vector<Identifier>::const_iterator idlast = helper->module_end();
420 
421  const IdContext ModuleContext = helper->module_context();
422 
423  for ( std::vector<Identifier>::const_iterator i=idfirst ; i!=idlast ; ++i ) {
424 
425  Identifier Id = *i;
426  IdentifierHash hashId;
427 
428  helper->get_hash( Id, hashId, &ModuleContext );
429 
430  const MuonGM::sTgcReadoutElement* module = detManager->getsTgcReadoutElement(Id);
431  if (!module) continue;
432  char sector_l = module->getStationName().substr(2,1)=="L" ? 'L' : 'S';
433 
434  Amg::Vector3D pos = module->center();
435  double swidth = module->getSsize();
436  double lwidth = module->getLongSsize();
437 
438  double ycutout = module->getDesign(1, sTgcIdHelper::sTgcChannelTypes::Strip)->yCutout();
439  double length = module->getRsize();
440  double moduleR = pos.perp();
441  double dphi1 = std::atan( (0.5*lwidth)/(moduleR+0.5*length) );
442  double dphi2 = std::atan( (0.5*swidth)/(moduleR-0.5*length) );
443 
444  double dphi = ( dphi1 > dphi2 ? dphi1 : dphi2 );
445  if ( ycutout > 0 ) {
446  double rcutout = moduleR+0.5*length - ycutout;
447  double dphicutout = std::atan( (0.5*lwidth)/rcutout );
448  if ( dphi < dphicutout ) dphi = dphicutout;
449  }
450  double phimin = pos.phi()-dphi;
451  double phimax = pos.phi()+dphi;
452 
453  if ( phimin > M_PI ) phimin -= 2*M_PI;
454  if ( phimin < -M_PI ) phimin += 2*M_PI;
455 
456  std::pair<double,double> phiRange(phimin,phimax);
457  m_phiTable[hashId]=phiRange;
458 
459  if((sector_l=='L' && m_Zratio.first==0) || (sector_l=='S' && m_Zratio.second==0)) {
460  double ratio=1/pos.z();
461  Id=helper->multilayerID(Id,2);
462  const MuonGM::sTgcReadoutElement* module2 = detManager->getsTgcReadoutElement(Id);
463  Amg::Vector3D pos2 = module2->center();
464  ratio*=pos2.z();
465  if(sector_l=='L') m_Zratio.first=ratio;
466  else if(sector_l=='S') m_Zratio.second=ratio;
467  }
468  }
469  m_isInitialized = true;
470  }
471 
472 
473 } // NSWL1
MuonGM::sTgcReadoutElement::padCorners
bool padCorners(const Identifier &id, std::array< Amg::Vector2D, 4 > &corners) const
pad corners
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:358
NSWL1::PadTriggerLogicOfflineTool::m_tdrLogic
L1TdrStgcTriggerLogic m_tdrLogic
Definition: PadTriggerLogicOfflineTool.h:103
beamspotman.r
def r
Definition: beamspotman.py:676
Trk::PlaneSurface::globalToLocal
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specified for PlaneSurface: GlobalToLocal method without dynamic memory allocation - boolean checks i...
Definition: PlaneSurface.cxx:215
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
NSWL1::eta
float eta(float x, float y, float z)
Definition: GeoUtils.cxx:9
ymin
double ymin
Definition: listroot.cxx:63
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
NSWL1::PadTriggerLogicOfflineTool::ROI2BandId
int ROI2BandId(const float EtaTrigAtCenter, const int SectorType) const
Definition: PadTriggerLogicOfflineTool.cxx:176
NSWL1::SIDES
const std::vector< size_t > SIDES
Definition: tdr_compat_enum.h:20
sTgcIdHelper.h
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
NSWL1::filterByGasGap
std::vector< std::shared_ptr< PadData > > filterByGasGap(const std::vector< std::shared_ptr< PadData >> &pads_in, const int gasgap)
! helper function: copy pads with a given gas gap
Definition: PadTriggerLogicOfflineTool.cxx:58
NSWL1::filterByMultiplet
std::vector< std::shared_ptr< PadData > > filterByMultiplet(const std::vector< std::shared_ptr< PadData >> &pads_in, const int multiplet)
! helper function: copy pads with a given multiplet
Definition: PadTriggerLogicOfflineTool.cxx:49
MuonGM::MuonClusterReadoutElement::center
virtual const Amg::Vector3D & center() const override
Return the center of the element.
Definition: MuonClusterReadoutElement.h:125
NSWL1::SingleWedgePadTrigger
Definition: SingleWedgePadTrigger.h:28
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
NSWL1::SectorTriggerCandidate::triggerRegion3
Polygon triggerRegion3() const
Definition: SectorTriggerCandidate.cxx:23
index
Definition: index.py:1
drawFromPickle.candidates
candidates
Definition: drawFromPickle.py:271
NSWL1::Vertex
boost::geometry::model::d2::point_xy< double > Vertex
Definition: GeoUtils.h:17
PadTriggerLogicOfflineTool.h
NSWL1::BandsInEtaLargeSector
const std::vector< float > BandsInEtaLargeSector
Definition: sTGCTriggerBandsInEta.h:16
NSWL1::BandsInEtaSmallSector
const std::vector< float > BandsInEtaSmallSector
Definition: sTGCTriggerBandsInEta.h:111
NSWL1::Polygon
boost::geometry::model::polygon< Vertex > Polygon
Definition: GeoUtils.h:18
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
test_pyathena.pt
pt
Definition: test_pyathena.py:11
NSWL1::PadTriggerLogicOfflineTool::compute_pad_triggers
virtual StatusCode compute_pad_triggers(const std::vector< std::shared_ptr< PadData >> &pads, std::vector< std::unique_ptr< PadTrigger >> &triggers) const override
Log a message using the Athena controlled logging system.
Definition: PadTriggerLogicOfflineTool.cxx:105
M_PI
#define M_PI
Definition: ActiveFraction.h:11
NSWL1::PadTriggerLogicOfflineTool::PadTriggerLogicOfflineTool
PadTriggerLogicOfflineTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: PadTriggerLogicOfflineTool.cxx:13
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
NSWL1::SingleWedgePadTrigger::isSmallSector
bool isSmallSector() const
use the first pad to determine whether it's a small/large sector
Definition: SingleWedgePadTrigger.cxx:72
Phi
@ Phi
Definition: RPCdef.h:8
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
python.TrigTLAMonitorAlgorithm.triggers
triggers
Definition: TrigTLAMonitorAlgorithm.py:196
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
MuonGM::MuonClusterReadoutElement::surface
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
Definition: MuonClusterReadoutElement.h:123
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
TRT::Hit::side
@ side
Definition: HitInfo.h:83
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
python.PyAthena.module
module
Definition: PyAthena.py:131
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
NSWL1::SingleWedgePadTrigger::EtaPhi::ieta
int ieta
Definition: SingleWedgePadTrigger.h:32
lumiFormat.i
int i
Definition: lumiFormat.py:85
xmin
double xmin
Definition: listroot.cxx:60
NSWL1::PadOfflineData
class modeling the pad hit fragment for the NSW L1 offline simulation
Definition: PadOfflineData.h:36
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
NSWL1::PadTriggerLogicOfflineTool::fillPhiTable
void fillPhiTable() const
Definition: PadTriggerLogicOfflineTool.cxx:409
python.LArMinBiasAlgConfig.int
int
Definition: LArMinBiasAlgConfig.py:59
MuonGM::sTgcReadoutElement
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:30
NSWL1::PadOfflineData::Identity
Identifier Identity() const
methods for retrieving the bare data
Definition: PadOfflineData.cxx:30
NSWL1::SECTORS
const std::vector< size_t > SECTORS
Definition: tdr_compat_enum.h:19
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
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
NSWL1::PadTriggerLogicOfflineTool::initialize
virtual StatusCode initialize() override
Definition: PadTriggerLogicOfflineTool.cxx:22
NSWL1::PadTriggerLogicOfflineTool::convert
PadTrigger convert(const SectorTriggerCandidate &t) const
from TDR-style SectorTriggerCandidate to PadTrigger
Definition: PadTriggerLogicOfflineTool.cxx:201
NSWL1::PadTriggerLogicOfflineTool::build4of4SingleWedgeTriggers
static std::vector< std::unique_ptr< PadTrigger > > build4of4SingleWedgeTriggers(const std::vector< std::shared_ptr< PadData >> &pads)
Definition: PadTriggerLogicOfflineTool.cxx:67
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
sTgcIdHelper
Definition: sTgcIdHelper.h:55
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
NSWL1::PadTriggerLogicOfflineTool::m_etaBandsLargeSector
const std::vector< float > m_etaBandsLargeSector
get the output tree from the athena histogram service
Definition: PadTriggerLogicOfflineTool.h:87
NSWL1::PadOfflineData::m_cornerXyz
float m_cornerXyz[4][3]
Definition: PadOfflineData.h:73
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
NSWL1::SectorTriggerCandidate
Definition: SectorTriggerCandidate.h:26
NSWL1::PadTriggerLogicOfflineTool::m_etaBandsSmallSector
const std::vector< float > m_etaBandsSmallSector
Definition: PadTriggerLogicOfflineTool.h:88
SectorType
SectorType
Definition: sTGCenumeration.h:39
python.PyAthena.v
v
Definition: PyAthena.py:154
NSWL1::PadTrigger
Holder of the pad trigger information.
Definition: PadTrigger.h:26
DeMoScan.index
string index
Definition: DeMoScan.py:364
python.compareTCTs.ratio
ratio
Definition: compareTCTs.py:295
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
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
Trk::PlaneSurface
Definition: PlaneSurface.h:64
NSWL1::SingleWedgePadTrigger::halfPadCoordinates
EtaPhiHalf halfPadCoordinates() const
Definition: SingleWedgePadTrigger.cxx:35
xmax
double xmax
Definition: listroot.cxx:61
NSWL1::SectorTriggerCandidate::wedgeTrigs
const std::vector< SingleWedgePadTrigger > & wedgeTrigs() const
Definition: SectorTriggerCandidate.h:31
NSWL1::PadTriggerLogicOfflineTool::fillGeometricInformation
void fillGeometricInformation(PadOfflineData &) const
Definition: PadTriggerLogicOfflineTool.cxx:32
NSWL1::PadTriggerLogicOfflineTool::m_phiIdBits
Gaudi::Property< int > m_phiIdBits
Definition: PadTriggerLogicOfflineTool.h:98
Rmin
double Rmin
Definition: LArDetectorConstructionTBEC.cxx:56
LArCellBinning.step
step
Definition: LArCellBinning.py:158
NSWL1::SingleWedgePadTrigger::pads
const std::vector< std::shared_ptr< PadOfflineData > > & pads() const
Definition: SingleWedgePadTrigger.h:72
LArCellBinning.phiRange
phiRange
Filling Phi ranges.
Definition: LArCellBinning.py:107
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
AthAlgTool
Definition: AthAlgTool.h:26
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
Trk::PlaneSurface::localToGlobal
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for PlaneSurface: LocalToGlobal method without dynamic memory allocation.
Definition: PlaneSurface.cxx:204
TRTCalib_cfilter.p3
p3
Definition: TRTCalib_cfilter.py:132
NSWL1::phi
float phi(float x, float y, float z)
Definition: GeoUtils.cxx:14
NSWL1::PadTriggerLogicOfflineTool::m_useSimple4of4
Gaudi::Property< bool > m_useSimple4of4
Definition: PadTriggerLogicOfflineTool.h:99
NSWL1
A trigger trigger candidate for a stgc sector.
Definition: NSWL1Simulation.cxx:7
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
NSWL1::centroid
Vertex centroid(const Polygon &p)
Definition: GeoUtils.cxx:59
TRTCalib_cfilter.p0
p0
Definition: TRTCalib_cfilter.py:129
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
ymax
double ymax
Definition: listroot.cxx:64
NSWL1::PadTriggerLogicOfflineTool::m_detManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_detManagerKey
Definition: PadTriggerLogicOfflineTool.h:95
Identifier
Definition: IdentifierFieldParser.cxx:14