ATLAS Offline Software
TgcRawDataMonitorAlgorithm.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include "TObjArray.h"
11 
12 namespace {
13  // Cut values on pt bein exploited throughout the monitoring
14  constexpr double pt_30_cut = 30. * Gaudi::Units::GeV;
15  constexpr double pt_15_cut = 15. * Gaudi::Units::GeV;
16  constexpr double pt_10_cut = 10. * Gaudi::Units::GeV;
17  constexpr double pt_4_cut = 4. * Gaudi::Units::GeV;
18 
20  constexpr double barrel_end = 1.05;
21  constexpr double eifi_boundary = 1.3;
22  constexpr double endcap_end = 1.9;
23  constexpr double trigger_end = 2.4;
24 
26  constexpr int number_of_trigger_sectors_endcap = 48;
27  constexpr int number_of_trigger_sectors_forward = 24;
28 
29  // offset for better drawing
30  constexpr double tgc_coin_phi_small_offset = 0.0001;
31 
32  // NSW-related parameters
33  constexpr double nsw_rmax = 5000;
34  constexpr double nsw_rmin = 900;
35  constexpr double nsw_z = 7824.46;
36  constexpr double nsw_rindex_div = 255;
37  constexpr double nsw_rindex_step = ( nsw_rmax - nsw_rmin ) / nsw_rindex_div;
38 }
39 TgcRawDataMonitorAlgorithm::TgcRawDataMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator) :
40  AthMonitorAlgorithm(name, pSvcLocator) {
41 }
42 
44  ATH_MSG_DEBUG("initialize()");
59 
60  ATH_CHECK(m_extrapolator.retrieve(DisableTool{m_extrapolator.empty()}));
61  ATH_CHECK(m_tgcMonTool.retrieve(DisableTool{m_tgcMonTool.empty()}));
62  ATH_CHECK(m_muonSelectionTool.retrieve(DisableTool{m_muonSelectionTool.empty()}));
63  ATH_CHECK(m_GoodRunsListSelectorTool.retrieve(DisableTool{m_GoodRunsListSelectorTool.empty()}));
64 
65  ATH_CHECK(m_L1MenuKey.initialize()); // ReadHandleKey, but DetStore (so renounce)
68 
69  m_extZposition.push_back(m_M1_Z);
70  m_extZposition.push_back(m_M2_Z);
71  m_extZposition.push_back(m_M3_Z);
72  m_extZposition.push_back(m_EI_Z);
73  m_extZposition.push_back(m_FI_Z);
74  m_extZposition.push_back(-m_M1_Z);
75  m_extZposition.push_back(-m_M2_Z);
76  m_extZposition.push_back(-m_M3_Z);
77  m_extZposition.push_back(-m_EI_Z);
78  m_extZposition.push_back(-m_FI_Z);
79 
80 
81  if(m_ctpDecMonList!=""){
82  m_CtpDecMonObj.clear();
83  TString Str = m_ctpDecMonList.value();// format="Tit:L1_MU20_Run3,Mul:1,HLT:HLT_mu26_ivarmedium_L1MU20,RPC:6,TGC:12FCH;"
84  std::unique_ptr<TObjArray> monTrigs( Str.Tokenize(";") );
85  for(int i = 0 ; i < monTrigs->GetEntries() ; i++){
86  TString monTrig = monTrigs->At(i)->GetName();
87  if(monTrig.IsNull())continue;
88  CtpDecMonObj monObj;
89  monObj.trigItem = monObj.title = "dummy";
90  monObj.rpcThr=monObj.tgcThr=monObj.multiplicity=0;
91  monObj.tgcF=monObj.tgcC=monObj.tgcH=monObj.rpcR=monObj.rpcM=false;
92  std::unique_ptr<TObjArray> monElement( monTrig.Tokenize(",") );
93  for(int j = 0 ; j < monElement->GetEntries() ; j++){
94  std::string sysItem = monElement->At(j)->GetName();
95  if(sysItem.empty())continue;
96  std::string item = sysItem.substr(4,sysItem.size());// remove "Tit:", "CTP:", "HLT:", "RPC:", "TGC:"
97  if(sysItem.starts_with( "Tit")){
98  monObj.title = item;
99  }else if(sysItem.starts_with( "Mul")){
100  monObj.multiplicity = std::atoi(item.data());
101  }else if(sysItem.starts_with( "CTP")|| sysItem.starts_with( "HLT")){
102  monObj.trigItem = item;
103  }else if(sysItem.starts_with( "RPC")){
104  monObj.rpcThr = std::atoi(item.data());
105  monObj.rpcR = (item.find('R')!=std::string::npos);
106  monObj.rpcM = (item.find('M')!=std::string::npos);
107  }else if(sysItem.starts_with( "TGC")){
108  monObj.tgcThr = std::atoi(item.data());
109  monObj.tgcF = (item.find('F')!=std::string::npos);
110  monObj.tgcC = (item.find('C')!=std::string::npos);
111  monObj.tgcH = (item.find('H')!=std::string::npos);
112  }
113  }
114  m_CtpDecMonObj.push_back(monObj);
115  }
116  }
117 
118  if(m_thrPatternList!=""){
119  m_thrMonList.clear();
120  TString Str = m_thrPatternList.value();
121  std::unique_ptr<TObjArray> arr( Str.Tokenize(",") );
122  for(int i = 0 ; i < arr->GetEntries() ; i++){
123  std::string name = arr->At(i)->GetName();
124  if(!name.starts_with( "MU"))continue;
125  m_thrMonList.insert(name);
126  }
127  }
128 
129  if(m_maskChannelFileName!=""){
130  ATH_MSG_INFO("Opening mask channel file: " << m_maskChannelFileName);
131  std::ifstream fi(m_maskChannelFileName);
132  if(fi){
133  std::string str;
134  while(getline(fi,str)){
135  m_maskChannelList.insert(str);
136  }
137  }
138  ATH_MSG_INFO("Number of mask channels = " << m_maskChannelList.size());
139  fi.close();
140  }
141 
142  return StatusCode::SUCCESS;
143 }
144 
145 StatusCode
147  // Print out all available muon triggers
148  // This is to be used when making a list of triggers
149  // to be monitored, and writted in .py config file
150  // The defult should be FALSE
152  ATH_MSG_DEBUG("printAvailableMuonTriggers");
153  if( getTrigDecisionTool().empty() ){
154  ATH_MSG_ERROR("TDT is not availeble");
155  return StatusCode::FAILURE;
156  }else{
157  std::set<std::string> available_muon_triggers;
158  auto chainGroup = getTrigDecisionTool()->getChainGroup(".*");
159  if( chainGroup != nullptr ){
160  auto triggerList = chainGroup->getListOfTriggers();
161  if( !triggerList.empty() ){
162  for(const auto &trig : triggerList) {
163  std::string thisTrig = trig;
164  if( thisTrig.find("mu")==std::string::npos && thisTrig.find("MU")==std::string::npos)continue;
165  if(getTrigDecisionTool()->getNavigationFormat() == "TriggerElement") { // run 2 access
166  auto fc = getTrigDecisionTool()->features(thisTrig.data(),TrigDefs::alsoDeactivateTEs);
167  for(const auto& comb : fc.getCombinations()){
168  auto initRoIs = comb.get<TrigRoiDescriptor>("initialRoI",TrigDefs::alsoDeactivateTEs);
169  for(const auto& roi : initRoIs){
170  if( roi.empty() )continue;
171  if( roi.cptr()==nullptr ) continue;
172  // found an available muon trigger here
173  available_muon_triggers.insert(thisTrig);
174  }
175  }
176  }else{ // run 3 access
177  auto initialRoIs = getTrigDecisionTool()->features<TrigRoiDescriptorCollection>(thisTrig.data(), TrigDefs::includeFailedDecisions, "", TrigDefs::lastFeatureOfType, "initialRoI");
178  for(const auto& roiLinkInfo : initialRoIs) {
179  if( !roiLinkInfo.isValid() )continue;
180  auto roiEL = roiLinkInfo.link;
181  if( !roiEL.isValid() )continue;
182  auto roi = *roiEL;
183  if( roi==nullptr ) continue;
184  // found an available muon trigger here
185  available_muon_triggers.insert(thisTrig);
186  }
187  }
188  }
189  }
190  }
191  for(const auto& trig : available_muon_triggers){
192  ATH_MSG_INFO("Available Muon Trigger: " << trig);
193  }
194  }
195  }
196  return StatusCode::SUCCESS;
197 }
198 
199 std::set<std::string>
202  ATH_MSG_DEBUG("Preparing trigger information");
203  std::set<std::string> list_of_single_muon_triggers;
204  if ( !getTrigDecisionTool().empty() ){
205  auto chainGroup = getTrigDecisionTool()->getChainGroup("HLT_.*");
206  if( chainGroup != nullptr ){
207  auto triggerList = chainGroup->getListOfTriggers();
208  if( !triggerList.empty() ){
209  for(const auto &trig : triggerList) {
210  if( trig.find("HLT_mu") != 0 )continue; // muon trigger
211  if( trig.find('-') != std::string::npos )continue; // vetoing topo item
212  if( trig.find("L1MU") == std::string::npos )continue; // RoI-seedeed L1 muon trigger
213  if( trig.find("mu") != trig.rfind("mu") )continue; // mu occurrence only once -> single muon trigger
214  if( trig.find("MU") != trig.rfind("MU") )continue; // MU occurrence only once -> single muon trigger
215  list_of_single_muon_triggers.insert( trig );
216  }
217  }
218  }
219  }
220  return list_of_single_muon_triggers;
221 }
222 
223 const xAOD::Vertex*
224 TgcRawDataMonitorAlgorithm::getPrimaryVertex( const EventContext& ctx) const{
225  const xAOD::Vertex* primVertex = nullptr;
226  if(!m_PrimaryVertexContainerKey.empty()){
228  if(primVtxContainer.isValid()){
229  for(const auto vtx : *primVtxContainer){
230  if(vtx->vertexType() == xAOD::VxType::VertexType::PriVtx){
231  primVertex = vtx;
232  break;
233  }
234  }
235  }
236  }
237  return primVertex;
238 }
239 
240 std::vector<TgcRawDataMonitorAlgorithm::TimedMuonRoI>
241 TgcRawDataMonitorAlgorithm::getRegionsOfInterest( const EventContext& ctx) const {
242 std::vector<TimedMuonRoI> AllBCMuonRoIs;
243  if (m_anaMuonRoI) {
244  ATH_MSG_DEBUG("Getting MuonRoI pointer");
245  /* raw LVL1MuonRoIs distributions */
246  bool isRun3 = false;
247  if (!m_MuonRoIContainerKey.empty()){
249  if(handle.isValid()) {
250  for(const auto roi : *handle.cptr()){
251  isRun3 = roi->isRun3();
252  TimedMuonRoI myMuonRoI(roi);// current BC
253  AllBCMuonRoIs.push_back(myMuonRoI);
254  }
255  }
256  }
257  if(isRun3){
258  if(!m_MuonRoIContainerBCm2Key.empty()){
260  if(handle.isValid()) {
261  for(const auto roi : *handle.cptr()){
262  TimedMuonRoI myMuonRoI(roi,-2);
263  AllBCMuonRoIs.push_back(myMuonRoI);
264  }
265  }
266  }
267  if(!m_MuonRoIContainerBCm1Key.empty()){
269  if(handle.isValid()) {
270  for(const auto roi : *handle.cptr()){
271  TimedMuonRoI myMuonRoI(roi,-1);
272  AllBCMuonRoIs.push_back(myMuonRoI);
273  }
274  }
275  }
276  if(!m_MuonRoIContainerBCp1Key.empty()){
278  if(handle.isValid()) {
279  for(const auto roi : *handle.cptr()){
280  TimedMuonRoI myMuonRoI(roi,+1);
281  AllBCMuonRoIs.push_back(myMuonRoI);
282  }
283  }
284  }
285  if(!m_MuonRoIContainerBCp2Key.empty()){
287  if(handle.isValid()) {
288  for(const auto roi : *handle.cptr()){
289  const TimedMuonRoI myMuonRoI(roi,+2);
290  AllBCMuonRoIs.push_back(myMuonRoI);
291  }
292  }
293  }
294  }
295  }
296  return AllBCMuonRoIs;
297 }
298 
299 void
300 TgcRawDataMonitorAlgorithm::fillRoiHistograms(const std::vector<TgcRawDataMonitorAlgorithm::TimedMuonRoI> & roiVec, const EventContext& ctx) const{
302  if( not roiVec.empty() ){
303  ATH_MSG_DEBUG("Filling MuonRoI-only histograms");
304  MonVariables roi_variables;
305  auto roi_bcid = Monitored::Scalar<int>("roi_bcid", GetEventInfo(ctx)->bcid());
306  roi_variables.push_back(roi_bcid);
307  auto roi_pileup = Monitored::Scalar<int>("roi_pileup", lbAverageInteractionsPerCrossing(ctx));
308  roi_variables.push_back(roi_pileup);
309  auto roi_lumiBlock = Monitored::Scalar<int>("roi_lumiBlock", GetEventInfo(ctx)->lumiBlock());
310  roi_variables.push_back(roi_lumiBlock);
311  auto roi_timing = Monitored::Collection("roi_timing", roiVec, [](const TimedMuonRoI& m) {
312  return m.timing;
313  });
314  roi_variables.push_back(roi_timing);
315  auto roi_currentBC = Monitored::Collection("roi_currentBC", roiVec, [](const TimedMuonRoI& m) {
316  return m.timing==0;
317  });
318  roi_variables.push_back(roi_currentBC);
319  auto roi_previousBC = Monitored::Collection("roi_previousBC", roiVec, [](const TimedMuonRoI& m) {
320  return m.timing==-1;
321  });
322  roi_variables.push_back(roi_previousBC);
323  auto roi_nextBC = Monitored::Collection("roi_nextBC", roiVec, [](const TimedMuonRoI& m) {
324  return m.timing==+1;
325  });
326  roi_variables.push_back(roi_nextBC);
327  auto roi_roiNumber = Monitored::Collection("roi_roiNumber", roiVec, [](const TimedMuonRoI& m) {
328  return m.muonRoI->getRoI();
329  });
330  roi_variables.push_back(roi_roiNumber);
331  auto roi_sector = Monitored::Collection("roi_sector", roiVec, [](const TimedMuonRoI& m) {
332  return (m.muonRoI->getHemisphere() == xAOD::MuonRoI::Positive)?(m.muonRoI->getSectorID()+1):(-1 * m.muonRoI->getSectorID()-1);
333  });
334  roi_variables.push_back(roi_sector);
335  auto roi_sectorAbs = Monitored::Collection("roi_sectorAbs", roiVec, [](const TimedMuonRoI& m) {
336  return m.muonRoI->getSectorID()+1;
337  });
338  roi_variables.push_back(roi_sectorAbs);
339  auto roi_sector_wBW3Coin = Monitored::Collection("roi_sector_wBW3Coin", roiVec, [](const TimedMuonRoI& m) {
340  return (m.muonRoI->getBW3Coincidence()) ? ((m.muonRoI->getHemisphere() == xAOD::MuonRoI::Positive)?(m.muonRoI->getSectorID()+1):(-1 * m.muonRoI->getSectorID()-1)) : (-999);
341  });
342  roi_variables.push_back(roi_sector_wBW3Coin);
343  auto roi_sector_wInnerCoin = Monitored::Collection("roi_sector_wInnerCoin", roiVec, [](const TimedMuonRoI& m) {
344  return (m.muonRoI->getInnerCoincidence()) ? ((m.muonRoI->getHemisphere() == xAOD::MuonRoI::Positive)?(m.muonRoI->getSectorID()+1):(-1 * m.muonRoI->getSectorID()-1)) : (-999);
345  });
346  roi_variables.push_back(roi_sector_wInnerCoin);
347  auto roi_eta = Monitored::Collection("roi_eta", roiVec, [](const TimedMuonRoI& m) {
348  return m.muonRoI->eta();
349  });
350  roi_variables.push_back(roi_eta);
351  auto roi_eta_rpc = Monitored::Collection("roi_eta_rpc", roiVec, [](const TimedMuonRoI& m) {
352  return (m.muonRoI->getSource() == xAOD::MuonRoI::Barrel)?(m.muonRoI->eta()):(-10);
353  });
354  roi_variables.push_back(roi_eta_rpc);
355  auto roi_eta_tgc = Monitored::Collection("roi_eta_tgc", roiVec, [](const TimedMuonRoI& m) {
356  return (m.muonRoI->getSource() != xAOD::MuonRoI::Barrel)?(m.muonRoI->eta()):(-10);
357  });
358  roi_variables.push_back(roi_eta_tgc);
359  auto roi_wInnerCoinEtaUpTo1p3 = Monitored::Collection("roi_wInnerCoinEtaUpTo1p3", roiVec, [](const TimedMuonRoI& m) {
360  return (m.muonRoI->getSource() != xAOD::MuonRoI::Barrel && std::abs(m.muonRoI->eta()) < 1.3 && m.muonRoI->getInnerCoincidence());
361  });
362  roi_variables.push_back(roi_wInnerCoinEtaUpTo1p3);
363  auto roi_wInnerCoinEtaBeyond1p3 = Monitored::Collection("roi_wInnerCoinEtaBeyond1p3", roiVec, [](const TimedMuonRoI& m) {
364  return (m.muonRoI->getSource() != xAOD::MuonRoI::Barrel && std::abs(m.muonRoI->eta()) > 1.3 && m.muonRoI->getInnerCoincidence());
365  });
366  roi_variables.push_back(roi_wInnerCoinEtaBeyond1p3);
367  auto roi_eta_wInnerCoin = Monitored::Collection("roi_eta_wInnerCoin", roiVec, [](const TimedMuonRoI& m) {
368  return (m.muonRoI->getInnerCoincidence() && m.muonRoI->getSource() != xAOD::MuonRoI::Barrel)?(m.muonRoI->eta()):(-10);
369  });
370  roi_variables.push_back(roi_eta_wInnerCoin);
371  auto roi_eta_wBW3Coin = Monitored::Collection("roi_eta_wBW3Coin", roiVec, [](const TimedMuonRoI& m) {
372  return (m.muonRoI->getBW3Coincidence() && m.muonRoI->getSource() != xAOD::MuonRoI::Barrel)?(m.muonRoI->eta()):(-10);
373  });
374  roi_variables.push_back(roi_eta_wBW3Coin);
375  auto roi_eta_wInnerCoinVeto = Monitored::Collection("roi_eta_wInnerCoinVeto", roiVec, [](const TimedMuonRoI& m) {
376  return (!m.muonRoI->getInnerCoincidence() && m.muonRoI->getSource() != xAOD::MuonRoI::Barrel)?(m.muonRoI->eta()):(-10);
377  });
378  roi_variables.push_back(roi_eta_wInnerCoinVeto);
379  auto roi_eta_wBW3CoinVeto = Monitored::Collection("roi_eta_wBW3CoinVeto", roiVec, [](const TimedMuonRoI& m) {
380  return (!m.muonRoI->getBW3Coincidence() && m.muonRoI->getSource() != xAOD::MuonRoI::Barrel)?(m.muonRoI->eta()):(-10);
381  });
382  roi_variables.push_back(roi_eta_wBW3CoinVeto);
383  auto roi_phi = Monitored::Collection("roi_phi", roiVec, [](const TimedMuonRoI& m) {
384  return m.muonRoI->phi();
385  });
386  roi_variables.push_back(roi_phi);
387  auto roi_phi_sideA = Monitored::Collection("roi_phi_sideA", roiVec, [](const TimedMuonRoI& m) {
388  return ( (m.muonRoI->getHemisphere() == xAOD::MuonRoI::Positive)?(m.muonRoI->phi()):(-10) );
389  });
390  roi_variables.push_back(roi_phi_sideA);
391  auto roi_phi_sideC = Monitored::Collection("roi_phi_sideC", roiVec, [](const TimedMuonRoI& m) {
392  return ( (m.muonRoI->getHemisphere() == xAOD::MuonRoI::Negative)?(m.muonRoI->phi()):(-10) );
393  });
394  roi_variables.push_back(roi_phi_sideC);
395  auto roi_phi_rpc = Monitored::Collection("roi_phi_rpc", roiVec, [](const TimedMuonRoI& m) {
396  return (m.muonRoI->getSource() == xAOD::MuonRoI::Barrel) ? m.muonRoI->phi() : -10;
397  });
398  roi_variables.push_back(roi_phi_rpc);
399  auto roi_phi_tgc = Monitored::Collection("roi_phi_tgc", roiVec, [](const TimedMuonRoI& m) {
400  return (m.muonRoI->getSource() != xAOD::MuonRoI::Barrel) ? m.muonRoI->phi() : -10;
401  });
402  roi_variables.push_back(roi_phi_tgc);
403  auto roi_phi_wInnerCoin = Monitored::Collection("roi_phi_wInnerCoin", roiVec, [](const TimedMuonRoI& m) {
404  return (m.muonRoI->getInnerCoincidence() && m.muonRoI->getSource() != xAOD::MuonRoI::Barrel)?(m.muonRoI->phi()):(-10);;
405  });
406  roi_variables.push_back(roi_phi_wInnerCoin);
407  auto roi_phi_wBW3Coin = Monitored::Collection("roi_phi_wBW3Coin", roiVec, [](const TimedMuonRoI& m) {
408  return (m.muonRoI->getBW3Coincidence() && m.muonRoI->getSource() != xAOD::MuonRoI::Barrel)?(m.muonRoI->phi()):(-10);;
409  });
410  roi_variables.push_back(roi_phi_wBW3Coin);
411  auto roi_phi_wInnerCoinVeto = Monitored::Collection("roi_phi_wInnerCoinVeto", roiVec, [](const TimedMuonRoI& m) {
412  return (!m.muonRoI->getInnerCoincidence() && m.muonRoI->getSource() != xAOD::MuonRoI::Barrel)?(m.muonRoI->phi()):(-10);;
413  });
414  roi_variables.push_back(roi_phi_wInnerCoinVeto);
415  auto roi_phi_wBW3CoinVeto = Monitored::Collection("roi_phi_wBW3CoinVeto", roiVec, [](const TimedMuonRoI& m) {
416  return (!m.muonRoI->getBW3Coincidence() && m.muonRoI->getSource() != xAOD::MuonRoI::Barrel)?(m.muonRoI->phi()):(-10);;
417  });
418  roi_variables.push_back(roi_phi_wBW3CoinVeto);
419  auto roi_phi_wBW3Coin_sideA = Monitored::Collection("roi_phi_wBW3Coin_sideA", roiVec, [](const TimedMuonRoI& m) {
420  return (m.muonRoI->getBW3Coincidence() && m.muonRoI->getHemisphere() == xAOD::MuonRoI::Positive)?(m.muonRoI->phi()):(-10);;
421  });
422  roi_variables.push_back(roi_phi_wBW3Coin_sideA);
423  auto roi_phi_wBW3Coin_sideC = Monitored::Collection("roi_phi_wBW3Coin_sideC", roiVec, [](const TimedMuonRoI& m) {
424  return (m.muonRoI->getBW3Coincidence() && m.muonRoI->getHemisphere() == xAOD::MuonRoI::Negative)?(m.muonRoI->phi()):(-10);;
425  });
426  roi_variables.push_back(roi_phi_wBW3Coin_sideC);
427  auto roi_phi_wBW3CoinVeto_sideA = Monitored::Collection("roi_phi_wBW3CoinVeto_sideA", roiVec, [](const TimedMuonRoI& m) {
428  return (!m.muonRoI->getBW3Coincidence() && m.muonRoI->getHemisphere() == xAOD::MuonRoI::Positive)?(m.muonRoI->phi()):(-10);;
429  });
430  roi_variables.push_back(roi_phi_wBW3CoinVeto_sideA);
431  auto roi_phi_wBW3CoinVeto_sideC = Monitored::Collection("roi_phi_wBW3CoinVeto_sideC", roiVec, [](const TimedMuonRoI& m) {
432  return (!m.muonRoI->getBW3Coincidence() && m.muonRoI->getHemisphere() == xAOD::MuonRoI::Negative)?(m.muonRoI->phi()):(-10);;
433  });
434  roi_variables.push_back(roi_phi_wBW3CoinVeto_sideC);
435  auto roi_thr = Monitored::Collection("roi_thr", roiVec, [](const TimedMuonRoI& m) {
436  return m.muonRoI->getThrNumber();
437  });
438  roi_variables.push_back(roi_thr);
439  auto roi_rpc = Monitored::Collection("roi_rpc", roiVec, [](const TimedMuonRoI& m) {
440  return m.muonRoI->getSource() == xAOD::MuonRoI::Barrel;
441  });
442  roi_variables.push_back(roi_rpc);
443  auto roi_tgc = Monitored::Collection("roi_tgc", roiVec, [](const TimedMuonRoI& m) {
444  return m.muonRoI->getSource() != xAOD::MuonRoI::Barrel;
445  });
446  roi_variables.push_back(roi_tgc);
447  auto roi_barrel = Monitored::Collection("roi_barrel", roiVec, [](const TimedMuonRoI& m) {
448  return m.muonRoI->getSource() == xAOD::MuonRoI::Barrel;
449  });
450  roi_variables.push_back(roi_barrel);
451  auto roi_endcap = Monitored::Collection("roi_endcap", roiVec, [](const TimedMuonRoI& m) {
452  return m.muonRoI->getSource() == xAOD::MuonRoI::Endcap;
453  });
454  roi_variables.push_back(roi_endcap);
455  auto roi_forward = Monitored::Collection("roi_forward", roiVec, [](const TimedMuonRoI& m) {
456  return m.muonRoI->getSource() == xAOD::MuonRoI::Forward;
457  });
458  roi_variables.push_back(roi_forward);
459  auto roi_phi_barrel = Monitored::Collection("roi_phi_barrel", roiVec, [](const TimedMuonRoI& m) {
460  return (m.muonRoI->getSource() == xAOD::MuonRoI::Barrel) ? m.muonRoI->phi() : -10;
461  });
462  roi_variables.push_back(roi_phi_barrel);
463  auto roi_phi_endcap = Monitored::Collection("roi_phi_endcap", roiVec, [](const TimedMuonRoI& m) {
464  return (m.muonRoI->getSource() == xAOD::MuonRoI::Endcap) ? m.muonRoI->phi() : -10;
465  });
466  roi_variables.push_back(roi_phi_endcap);
467  auto roi_phi_forward = Monitored::Collection("roi_phi_forward", roiVec, [](const TimedMuonRoI& m) {
468  return (m.muonRoI->getSource() == xAOD::MuonRoI::Forward) ? m.muonRoI->phi() : -10;
469  });
470  roi_variables.push_back(roi_phi_forward);
471  auto roi_sideA = Monitored::Collection("roi_sideA", roiVec, [](const TimedMuonRoI& m) {
472  return m.muonRoI->getHemisphere() == xAOD::MuonRoI::Positive;
473  });
474  roi_variables.push_back(roi_sideA);
475  auto roi_sideC = Monitored::Collection("roi_sideC", roiVec, [](const TimedMuonRoI& m) {
476  return m.muonRoI->getHemisphere() == xAOD::MuonRoI::Negative;
477  });
478  roi_variables.push_back(roi_sideC);
479  auto thrmask1 = Monitored::Collection("thrmask1", roiVec, [](const TimedMuonRoI& m) {
480  return m.muonRoI->getThrNumber() == 1;
481  });
482  roi_variables.push_back(thrmask1);
483  auto thrmask2 = Monitored::Collection("thrmask2", roiVec, [](const TimedMuonRoI& m) {
484  return m.muonRoI->getThrNumber() == 2;
485  });
486  roi_variables.push_back(thrmask2);
487  auto thrmask3 = Monitored::Collection("thrmask3", roiVec, [](const TimedMuonRoI& m) {
488  return m.muonRoI->getThrNumber() == 3;
489  });
490  roi_variables.push_back(thrmask3);
491  auto thrmask4 = Monitored::Collection("thrmask4", roiVec, [](const TimedMuonRoI& m) {
492  return m.muonRoI->getThrNumber() == 4;
493  });
494  roi_variables.push_back(thrmask4);
495  auto thrmask5 = Monitored::Collection("thrmask5", roiVec, [](const TimedMuonRoI& m) {
496  return m.muonRoI->getThrNumber() == 5;
497  });
498  roi_variables.push_back(thrmask5);
499  auto thrmask6 = Monitored::Collection("thrmask6", roiVec, [](const TimedMuonRoI& m) {
500  return m.muonRoI->getThrNumber() == 6;
501  });
502  roi_variables.push_back(thrmask6);
503  auto thrmask7 = Monitored::Collection("thrmask7", roiVec, [](const TimedMuonRoI& m) {
504  return m.muonRoI->getThrNumber() == 7;
505  });
506  roi_variables.push_back(thrmask7);
507  auto thrmask8 = Monitored::Collection("thrmask8", roiVec, [](const TimedMuonRoI& m) {
508  return m.muonRoI->getThrNumber() == 8;
509  });
510  roi_variables.push_back(thrmask8);
511  auto thrmask9 = Monitored::Collection("thrmask9", roiVec, [](const TimedMuonRoI& m) {
512  return m.muonRoI->getThrNumber() == 9;
513  });
514  roi_variables.push_back(thrmask9);
515  auto thrmask10 = Monitored::Collection("thrmask10", roiVec, [](const TimedMuonRoI& m) {
516  return m.muonRoI->getThrNumber() == 10;
517  });
518  roi_variables.push_back(thrmask10);
519  auto thrmask11 = Monitored::Collection("thrmask11", roiVec, [](const TimedMuonRoI& m) {
520  return m.muonRoI->getThrNumber() == 11;
521  });
522  roi_variables.push_back(thrmask11);
523  auto thrmask12 = Monitored::Collection("thrmask12", roiVec, [](const TimedMuonRoI& m) {
524  return m.muonRoI->getThrNumber() == 12;
525  });
526  roi_variables.push_back(thrmask12);
527  auto thrmask13 = Monitored::Collection("thrmask13", roiVec, [](const TimedMuonRoI& m) {
528  return m.muonRoI->getThrNumber() == 13;
529  });
530  roi_variables.push_back(thrmask13);
531  auto thrmask14 = Monitored::Collection("thrmask14", roiVec, [](const TimedMuonRoI& m) {
532  return m.muonRoI->getThrNumber() == 14;
533  });
534  roi_variables.push_back(thrmask14);
535  auto thrmask15 = Monitored::Collection("thrmask15", roiVec, [](const TimedMuonRoI& m) {
536  return m.muonRoI->getThrNumber() == 15;
537  });
538  roi_variables.push_back(thrmask15);
539  auto roi_charge = Monitored::Collection("roi_charge", roiVec, [](const TimedMuonRoI& m) {
540  return (m.muonRoI->getCharge()==xAOD::MuonRoI::Neg)?(-1):((m.muonRoI->getCharge()==xAOD::MuonRoI::Pos)?(+1):(0));
541  });
542  roi_variables.push_back(roi_charge);
543  auto roi_bw3coin = Monitored::Collection("roi_bw3coin",roiVec,[](const TimedMuonRoI& m) {
544  return m.muonRoI->getBW3Coincidence();
545  });
546  roi_variables.push_back(roi_bw3coin);
547  auto roi_bw3coinveto = Monitored::Collection("roi_bw3coinveto",roiVec,[](const TimedMuonRoI& m) {
548  return !m.muonRoI->getBW3Coincidence() && m.muonRoI->getSource()!=xAOD::MuonRoI::Barrel;
549  });
550  roi_variables.push_back(roi_bw3coinveto);
551  auto roi_innercoin = Monitored::Collection("roi_innercoin",roiVec,[](const TimedMuonRoI& m) {
552  return m.muonRoI->getInnerCoincidence();
553  });
554  roi_variables.push_back(roi_innercoin);
555  auto roi_innveto = Monitored::Collection("roi_innveto",roiVec,[](const TimedMuonRoI& m) {
556  return !m.muonRoI->getInnerCoincidence() && m.muonRoI->getSource()!=xAOD::MuonRoI::Barrel;
557  });
558  roi_variables.push_back(roi_innveto);
559  auto roi_goodmf = Monitored::Collection("roi_goodmf",roiVec,[](const TimedMuonRoI& m) {
560  return m.muonRoI->getGoodMF();
561  });
562  roi_variables.push_back(roi_goodmf);
563  auto roi_badmf = Monitored::Collection("roi_badmf",roiVec,[](const TimedMuonRoI& m){
564  return !m.muonRoI->getGoodMF() && m.muonRoI->getSource()!=xAOD::MuonRoI::Barrel;
565  });
566  roi_variables.push_back(roi_badmf);
567  auto roi_ismorecand = Monitored::Collection("roi_ismorecand",roiVec,[](const TimedMuonRoI& m){
568  return m.muonRoI->isMoreCandInRoI();
569  });
570  roi_variables.push_back(roi_ismorecand);
571  auto roi_posCharge = Monitored::Collection("roi_posCharge",roiVec,[](const TimedMuonRoI& m){
572  return m.muonRoI->getCharge()==xAOD::MuonRoI::Pos;
573  });
574  roi_variables.push_back(roi_posCharge);
575  auto roi_negCharge = Monitored::Collection("roi_negCharge",roiVec,[](const TimedMuonRoI& m){
576  return m.muonRoI->getCharge()==xAOD::MuonRoI::Neg;
577  });
578  roi_variables.push_back(roi_negCharge);
579  fill(m_packageName, roi_variables);
580  ATH_MSG_DEBUG("End filling MuonRoI-only histograms");
581  }
582 }
583 
584 void
585 TgcRawDataMonitorAlgorithm::fillHistogramsAfterTriggerDecision(std::vector<TgcRawDataMonitorAlgorithm::TimedMuonRoI> & roiVec) const {
587  if ( !getTrigDecisionTool().empty() && roiVec.size()>0 && m_monitorTriggerMultiplicity ) {
588  ATH_MSG_DEBUG("Filling histograms for MuonRoIs after trigger decision");
589  for(const auto& monObj : m_CtpDecMonObj){
590  std::set<unsigned int> allCands;
591  std::set<unsigned int> ctpMuonCands;
592  std::set<unsigned int> inputMuonCands;
593  // collecting roiWords out of the CTP decision
594  bool isRun2Legacy = false;
595  if(getTrigDecisionTool()->getNavigationFormat() == "TriggerElement") { // run 2 access
596  isRun2Legacy = true;
597  if(monObj.title.find("Run2Legacy")==std::string::npos) continue;
598  auto fc = getTrigDecisionTool()->features(monObj.trigItem.data(),TrigDefs::alsoDeactivateTEs);
599  for(const auto& comb : fc.getCombinations()){
600  auto initRoIs = comb.get<TrigRoiDescriptor>("initialRoI",TrigDefs::alsoDeactivateTEs);
601  for(const auto& roi : initRoIs){
602  if( roi.empty() )continue;
603  if( roi.cptr()==nullptr ) continue;
604  ctpMuonCands.insert(roi.cptr()->roiWord());
605  allCands.insert(roi.cptr()->roiWord());
606  }
607  }
608  }else{ // run 3 access
609  auto initialRoIs = getTrigDecisionTool()->features<TrigRoiDescriptorCollection>(monObj.trigItem.data(), TrigDefs::includeFailedDecisions, "", TrigDefs::lastFeatureOfType, "initialRoI");
610  for(const auto& roiLinkInfo : initialRoIs) {
611  if( !roiLinkInfo.isValid() )continue;
612  auto roiEL = roiLinkInfo.link;
613  if( !roiEL.isValid() )continue;
614  auto roi = *roiEL;
615  if( roi==nullptr ) continue;
616  ctpMuonCands.insert(roi->roiWord());
617  allCands.insert(roi->roiWord());
618  }
619  }
620  // collecting roiWords out of RPC/TGC
621  bool isRun3 = false;
622  for(const auto& allBcMuonRoI : roiVec){
623  const xAOD::MuonRoI* roi = allBcMuonRoI.muonRoI;
624  isRun3 = roi->isRun3();
625  if(roi->getSource()==xAOD::MuonRoI::Barrel){
626  if(roi->getThrNumber()<monObj.rpcThr)continue;
627  if(monObj.rpcM && !roi->isMoreCandInRoI())continue;
628  }else{
629  if(roi->getThrNumber()<monObj.tgcThr)continue;
630  if(monObj.tgcF && !roi->getBW3Coincidence())continue;
631  if(monObj.tgcC && !roi->getInnerCoincidence())continue;
632  if(monObj.tgcH && !roi->getGoodMF())continue;
633  }
634  inputMuonCands.insert(roi->roiWord());
635  allCands.insert(roi->roiWord());
636  }
637  if(!isRun3 && isRun2Legacy && monObj.title.find("Run2Legacy")==std::string::npos)continue; // Run2Legacy
638  if(!isRun3 && !isRun2Legacy && (monObj.title.find("Run2Legacy")!=std::string::npos||monObj.title.find("Run3")!=std::string::npos))continue; // Run2
639  if(isRun3 && monObj.title.find("Run3")==std::string::npos)continue; // Run3
640 
641  if(ctpMuonCands.size()==0 && inputMuonCands.size()<monObj.multiplicity)continue;
642 
643  std::vector<int> roiMatching_CTPin;
644  std::vector<int> roiMatching_CTPout;
645 
646  std::vector<double> roi_Eta;
647  std::vector<double> roi_Phi;
648  std::vector<double> roi_dRmin;
649  std::vector<double> roi_pTdiff;
650  std::vector<int> roi_ThrNum;
651  std::vector<int> roi_Charge;
652  std::vector<int> roi_BW3Coin;
653  std::vector<int> roi_InnerCoin;
654  std::vector<int> roi_GoodMF;
655  std::vector<int> roi_IsMoreCandInRoI;
656  std::vector<int> roi_PhiOverlap;
657  std::vector<int> roi_EtaOverlap;
658  std::vector<int> roi_isVetoed;
659  std::vector<bool> roi_inOk_outOk;
660  std::vector<bool> roi_inOk_outNg;
661  std::vector<bool> roi_inNg_outOk;
662 
663  for(const auto& allBcMuonRoI : roiVec){ // scan all MuonRoIs
664  const xAOD::MuonRoI* roi = allBcMuonRoI.muonRoI;
665  bool ctp_in = inputMuonCands.find(roi->roiWord())!=inputMuonCands.end();
666  bool ctp_out = ctpMuonCands.find(roi->roiWord())!=ctpMuonCands.end();
667  if(!ctp_in && !ctp_out)continue;
668  roiMatching_CTPin.push_back(ctp_in?1:0);
669  roiMatching_CTPout.push_back(ctp_out?1:0);
670  double dRmin = 1000;
671  double pTdiff = -15;
672  for(const auto& allBcMuonRoI2 : roiVec){ // scan all the other MuonRoIs to check the isolation
673  const xAOD::MuonRoI* roi2 = allBcMuonRoI2.muonRoI;
674  if(roi == roi2)continue;
675  double dr = xAOD::P4Helpers::deltaR(roi->eta(),roi->phi(),roi2->eta(),roi2->phi());
676  if(dr < dRmin){
677  dRmin = dr;
678  pTdiff = roi2->getThrNumber() - roi->getThrNumber();
679  }
680  }
681  // adjust the value so that the value can be in the histgram range
682  if(dRmin>999) dRmin = -0.05;
683  else if(dRmin>1.0) dRmin = 0.95;
684  roi_Eta.push_back(roi->eta());
685  roi_Phi.push_back(roi->phi());
686  roi_dRmin.push_back(dRmin);
687  roi_pTdiff.push_back(pTdiff);
688  roi_ThrNum.push_back((roi->getSource()==xAOD::MuonRoI::Barrel)?(roi->getThrNumber()):(-roi->getThrNumber()));
689  roi_Charge.push_back((roi->getCharge()==xAOD::MuonRoI::Neg)?(-1):((roi->getCharge()==xAOD::MuonRoI::Pos)?(+1):(0)));
690  roi_BW3Coin.push_back((roi->getSource()!=xAOD::MuonRoI::Barrel)?roi->getBW3Coincidence():-1);
691  roi_InnerCoin.push_back((roi->getSource()!=xAOD::MuonRoI::Barrel)?roi->getInnerCoincidence():-1);
692  roi_GoodMF.push_back((roi->getSource()!=xAOD::MuonRoI::Barrel)?roi->getGoodMF():-1);
693  roi_IsMoreCandInRoI.push_back((roi->getSource()==xAOD::MuonRoI::Barrel)?roi->isMoreCandInRoI():-1);
694  roi_PhiOverlap.push_back((roi->getSource()==xAOD::MuonRoI::Barrel)?roi->getPhiOverlap():-1);
695  roi_EtaOverlap.push_back(roi->getEtaOverlap());
696  roi_isVetoed.push_back(roi->isVetoed());
697  roi_inOk_outOk.push_back( ctp_in && ctp_out );
698  roi_inOk_outNg.push_back( ctp_in && !ctp_out );
699  roi_inNg_outOk.push_back( !ctp_in && ctp_out );
700  }
701 
702  MonVariables ctpMonVariables;
703  auto val_roiMatching_CTPin = Monitored::Collection("roiMatching_CTPin", roiMatching_CTPin);
704  auto val_roiMatching_CTPout = Monitored::Collection("roiMatching_CTPout", roiMatching_CTPout);
705 
706  auto val_ctpMultiplicity = Monitored::Scalar<int>("ctpMultiplicity",ctpMuonCands.size());
707  auto val_rawMultiplicity = Monitored::Scalar<int>("rawMultiplicity",inputMuonCands.size());
708  auto val_countDiff = Monitored::Scalar<int>("countDiff",ctpMuonCands.size()-inputMuonCands.size());
709 
710  auto val_roi_Eta = Monitored::Collection("Eta",roi_Eta);
711  auto val_roi_Phi = Monitored::Collection("Phi",roi_Phi);
712  auto val_roi_dRmin = Monitored::Collection("dRmin",roi_dRmin);
713  auto val_roi_pTdiff = Monitored::Collection("pTdiff",roi_pTdiff);
714  auto val_roi_ThrNum = Monitored::Collection("ThrNum",roi_ThrNum);
715  auto val_roi_Charge = Monitored::Collection("Charge",roi_Charge);
716  auto val_roi_BW3Coin = Monitored::Collection("BW3Coin",roi_BW3Coin);
717  auto val_roi_InnerCoin = Monitored::Collection("InnerCoin",roi_InnerCoin);
718  auto val_roi_GoodMF = Monitored::Collection("GoodMF",roi_GoodMF);
719  auto val_roi_IsMoreCandInRoI = Monitored::Collection("IsMoreCandInRoI",roi_IsMoreCandInRoI);
720  auto val_roi_PhiOverlap = Monitored::Collection("PhiOverlap",roi_PhiOverlap);
721  auto val_roi_EtaOverlap = Monitored::Collection("EtaOverlap",roi_EtaOverlap);
722  auto val_roi_isVetoed = Monitored::Collection("isVetoed",roi_isVetoed);
723  auto val_roi_inOk_outOk = Monitored::Collection("inOk_outOk",roi_inOk_outOk);
724  auto val_roi_inOk_outNg = Monitored::Collection("inOk_outNg",roi_inOk_outNg);
725  auto val_roi_inNg_outOk = Monitored::Collection("inNg_outOk",roi_inNg_outOk);
726 
727  ctpMonVariables.push_back(val_roiMatching_CTPin);
728  ctpMonVariables.push_back(val_roiMatching_CTPout);
729  ctpMonVariables.push_back(val_ctpMultiplicity);
730  ctpMonVariables.push_back(val_rawMultiplicity);
731  ctpMonVariables.push_back(val_countDiff);
732  ctpMonVariables.push_back(val_roi_Eta);
733  ctpMonVariables.push_back(val_roi_Phi);
734  ctpMonVariables.push_back(val_roi_dRmin);
735  ctpMonVariables.push_back(val_roi_pTdiff);
736  ctpMonVariables.push_back(val_roi_ThrNum);
737  ctpMonVariables.push_back(val_roi_Charge);
738  ctpMonVariables.push_back(val_roi_BW3Coin);
739  ctpMonVariables.push_back(val_roi_InnerCoin);
740  ctpMonVariables.push_back(val_roi_GoodMF);
741  ctpMonVariables.push_back(val_roi_IsMoreCandInRoI);
742  ctpMonVariables.push_back(val_roi_PhiOverlap);
743  ctpMonVariables.push_back(val_roi_EtaOverlap);
744  ctpMonVariables.push_back(val_roi_isVetoed);
745  ctpMonVariables.push_back(val_roi_inOk_outOk);
746  ctpMonVariables.push_back(val_roi_inOk_outNg);
747  ctpMonVariables.push_back(val_roi_inNg_outOk);
748  fill(m_packageName + monObj.title, ctpMonVariables);
749  }
750  ATH_MSG_DEBUG("End filling histograms for MuonRoIs after trigger decision");
751  }
753 }
754 
755 
757  ATH_MSG_DEBUG("fillHistograms()");
758 
759  if( !m_GoodRunsListSelectorTool.empty() ){
760  int runNumber = GetEventInfo(ctx)->runNumber();
761  int lumiBlockNr = GetEventInfo(ctx)->lumiBlock();
762  if(m_GoodRunsListSelectorTool->getGRLCollection()->IsEmpty()){
763  ATH_MSG_ERROR("Empty GRL");
764  return StatusCode::FAILURE;
765  }
766  bool pass = m_GoodRunsListSelectorTool->getGRLCollection()->HasRunLumiBlock(runNumber,lumiBlockNr);
767  if(pass){
768  ATH_MSG_DEBUG("passing GRL: run=" << runNumber << " lb=" << lumiBlockNr);
769  }else{
770  ATH_MSG_DEBUG("failed GRL: run=" << runNumber << " lb=" << lumiBlockNr);
771  return StatusCode::SUCCESS;
772  }
773  }
774 
775  if( !m_streamerFilter.empty() ) {
777  const unsigned int passBits = getTrigDecisionTool()->isPassedBits(m_streamerFilter);
778  const bool expressPass = passBits & TrigDefs::Express_passed;
779  if(!expressPass){
780  ATH_MSG_DEBUG("failed expressPass");
781  return StatusCode::SUCCESS;
782  }
783  }
784  bool pass = getTrigDecisionTool()->isPassed(m_streamerFilter,TrigDefs::Physics);
785  if(pass){
786  ATH_MSG_DEBUG("passing StreamerFilter: " << m_streamerFilter );
787  }else{
788  ATH_MSG_DEBUG("failed StreamerFilter: " << m_streamerFilter );
789  return StatusCode::SUCCESS;
790  }
791  }
792  if (auto sc = printOutAvailableMuonTriggers();not sc.isSuccess()) return sc;
793  auto list_of_single_muon_triggers = checkTriggerInfo();
794 
796 
797  const xAOD::Vertex* primVertex = getPrimaryVertex(ctx);
798 
799  double primaryVertexZ = (primVertex!=nullptr)?(primVertex->z()):(-999);
800  // define common monitoring variables //
801  auto mon_bcid = Monitored::Scalar<int>("mon_bcid", GetEventInfo(ctx)->bcid());
802  auto mon_pileup = Monitored::Scalar<int>("mon_pileup", lbAverageInteractionsPerCrossing(ctx));
803  auto mon_lb = Monitored::Scalar<int>("mon_lb", GetEventInfo(ctx)->lumiBlock());
804  auto mon_primvtx_z=Monitored::Scalar<double>("mon_primvtx_z",primaryVertexZ);
805 
806  fill(m_packageName+"_Common", mon_bcid, mon_pileup, mon_lb, mon_primvtx_z);
808  std::vector<TimedMuonRoI> AllBCMuonRoIs = getRegionsOfInterest(ctx);
809  fillRoiHistograms(AllBCMuonRoIs, ctx);
811  fillHistogramsAfterTriggerDecision(AllBCMuonRoIs);
812 
813 
815  std::map<const xAOD::MuonRoI*,std::set<std::string>> roiAndMenu;
816  std::map<std::string,std::vector<const xAOD::MuonRoI*>> menuAndRoIs;
817  fillMuonRoisInThresholdPattern(roiAndMenu, menuAndRoIs, AllBCMuonRoIs, ctx);
819 
821  std::vector < const xAOD::Muon* > oflmuons;
822  std::set < const xAOD::Muon* > biasedMuons;
823  std::vector < TimedMuon > mymuons;
824  std::map < std::string, std::vector< ExtPos > > extpositions;
825  std::vector< ExtPos > extpositions_pivot;
826  std::vector<double> deltaR_muons;
827  std::vector<double> deltaR_muons_roi;
828  std::vector<double> deltaR_muons_hlt;
829  std::vector<double> muon2pv_dz;
830  std::vector<double> muon2pv_dca;
831  std::vector<double> mymuon2pv_dz;
832  std::vector<double> mymuon2pv_dca;
833  if (m_anaOfflMuon) {
835  if (!muons.isValid()) {
836  ATH_MSG_ERROR("Failed to get xAOD::MuonContainer");
837  return StatusCode::SUCCESS;
838  }
839  ATH_MSG_DEBUG("Filling offline muon-related histograms");
840  for (const auto muon : *muons) {
841  // skip if muon is empty
842  if (muon == nullptr) continue;
843  // standard quality cuts for muons
844  if (muon->pt() < 1000.) continue;
845  // minimum requirements
846  if ( muon->author() > xAOD::Muon::Author::MuidSA )continue;
847  if ( muon->muonType() > xAOD::Muon::MuonType::MuonStandAlone )continue;
848  // very loose-quality muons
849  oflmuons.push_back(muon);
850  // selectable requirements
851  double dz=-999,dca=-999;
852  if( dataType() != DataType_t::cosmics ){
853  if(m_useMuonSelectorTool && !m_muonSelectionTool->accept(*muon)) continue;
854  if(m_useOnlyCombinedMuons && muon->muonType()!=xAOD::Muon::MuonType::Combined) continue;
856  if(!m_PrimaryVertexContainerKey.empty()){
857  if(primVertex==nullptr)continue;
858  auto trackParticle = muon->primaryTrackParticle();
859  if(trackParticle!=nullptr){
860  dz = trackParticle->z0() - primVertex->z();
861  dca = trackParticle->d0();
862  }
863  muon2pv_dz.push_back(dz);
864  muon2pv_dca.push_back(dca);
865  if( std::abs(dz-m_muonToPVdzOffset) > m_muonToPVdz )continue;
866  if( std::abs(dca) > m_muonToPVdca )continue;
867  }
868  }
869  // initialize for muon-isolation check
870  bool isolated = true;
871  // initialize for tag-and-probe check
872  bool probeOK = true;
873  if( m_TagAndProbe ) probeOK = false; // t&p should be performed
874  if( dataType() == DataType_t::cosmics ) probeOK = true; // won't performa t&p for cosmics because no enough muons
875  // OK, let's start looking at the second muons
876  for(const auto muon2 : *muons){
877  // skip if muon is empty
878  if (muon2 == nullptr) continue;
879 
880  // skip the same muon candidate
881  if( muon == muon2 )continue;
882 
883  // skip possible mismeasured muons
884  if( muon2->pt() < 1000. ) continue;
885 
886  // minimum requirements on muon quality
887  if ( muon2->author() > xAOD::Muon::Author::MuidSA )continue;
888  if ( muon2->muonType() > xAOD::Muon::MuonType::MuonStandAlone )continue;
889 
890  // tag muon to be only in the other region, barrel or endcap, to remove possible bias from the same region
892  ( (std::abs(muon->eta()) < barrel_end && std::abs(muon2->eta()) < barrel_end) ||
893  (std::abs(muon->eta()) > barrel_end && std::abs(muon2->eta()) > barrel_end) ) )continue;
894 
895  // isolation calculation
896  double dr_muons = xAOD::P4Helpers::deltaR(muon,muon2,false);
897  deltaR_muons.push_back(dr_muons);
898  if( dr_muons < m_isolationWindow ) isolated = false;
899 
900  // no need to check further if probeOK is already True
901  // 0) if muon-orthogonal triggers are avaialble/fired
902  // 1) if we don't use tag-and-probe
903  // 2) if TrigDecTool is not available
904  // 3) if the second muon matches the trigger requirement
905  if(probeOK)continue;
906 
907  // loop over the single muon triggers if at least one of them matches this second muon
908  for (const auto &trigName : list_of_single_muon_triggers) {
909  if(m_doExpressProcessing){ // check the express_express bit
910  const unsigned int passBits = getTrigDecisionTool()->isPassedBits(trigName.data());
911  const bool expressPass = passBits & TrigDefs::Express_passed;
912  if(!expressPass)continue;
913  }
914  // check if this particular tirgger has fired in this event
915  if (!getTrigDecisionTool()->isPassed(trigName.data(),TrigDefs::Physics)) continue;
916  ATH_MSG_DEBUG("This muon trigger, " << trigName << ", is fired in this event!!");
917  // check if this second muon matches the HLT muon trigger
918  if(getTrigDecisionTool()->getNavigationFormat() == "TriggerElement") { // run 2 access
919  ATH_MSG_DEBUG("Trying Run2-style feature access");
920  auto fc = getTrigDecisionTool()->features(trigName.data(),TrigDefs::Physics);
921  for(const auto& comb : fc.getCombinations()){
922  if(!comb.active())continue;
923  auto MuFeatureContainers = comb.get<xAOD::MuonContainer>("MuonEFInfo",TrigDefs::Physics);
924  for(const auto& mucont : MuFeatureContainers){
925  if(mucont.empty())continue;
926  if(mucont.te()==nullptr)continue;
927  if(!mucont.te()->getActiveState())continue;
928  for(const auto hltmu : *mucont.cptr()){
929  if (hltmu == nullptr) continue; // skip if hltmu is empty
930  if (hltmu->pt() < 1000.)continue; // skip if pT is very small
931  double dr = xAOD::P4Helpers::deltaR(muon2,hltmu,false);
932  deltaR_muons_hlt.push_back(dr);
933  if( dr < m_trigMatchWindow ){
934  probeOK = true;
935  ATH_MSG_DEBUG("Trigger matched: "<<trigName<<" dR=" << dr );
936  biasedMuons.insert(muon2);
937  }
938  }// end loop of mucont.cptr()
939  }// end loop of MuonFeatureContainers
940  }//end loop of Combinations
941  }else{ // run 3 access
942  ATH_MSG_DEBUG("Trying Run3-style feature access");
943  auto features = getTrigDecisionTool()->features < xAOD::MuonContainer > (trigName.data(), TrigDefs::Physics, "HLT_MuonsCB_RoI");
944  for (const auto& aaa : features) {
945  if (!aaa.isValid()) continue;
946  auto hltmu_link = aaa.link;
947  if (!hltmu_link.isValid()) continue;
948  auto hltmu = *hltmu_link;
949  if (hltmu == nullptr) continue; // skip if hltmu is empty
950  if (hltmu->pt() < 1000.)continue; // skip if pT is very small
951  double dr = xAOD::P4Helpers::deltaR(muon2,hltmu,false);
952  deltaR_muons_hlt.push_back(dr);
953  if( dr < m_trigMatchWindow ){
954  probeOK = true;
955  ATH_MSG_DEBUG("Trigger matched: "<<trigName<<" dR=" << dr );
956  biasedMuons.insert(muon2);
957  }
958  } // end loop of features
959  } // end IF Run2 or Run3 feature access
960  } // end loop of single muon triggers
961  // check if the second muon matches the single muon trigger
962  if(!probeOK) continue;
963  ATH_MSG_DEBUG("Basic Tag-and-Probe is OK");
964  // check further if this muon pair satisfies Z->mumu criteria
965  if( m_TagAndProbeZmumu && muon->charge() != muon2->charge() ){
966  double m2 = 2. * muon->pt() * muon2->pt() * ( std::cosh(muon->eta() - muon2->eta()) - std::cos(muon->phi() - muon2->phi()) );
967  double m = (m2>0.) ? ( std::sqrt(m2) ) : (0.);
968  double mdiff = std::abs( m - m_zMass );
969  probeOK = mdiff < m_zMassWindow;
970  ATH_MSG_DEBUG("Checking Zmumu cut: " << probeOK);
971  }
972  ATH_MSG_DEBUG("Final condition of probleOK for this muon is: " << probeOK);
973  if(probeOK) break; // no need to check further if probeOK is already True
974  } // end loop of the second muons
975  // check if the isolation requirement is OK
976  if(m_requireIsolated && !isolated)continue;
977  // check if the tag-and-probe requirement is OK
978  if(!probeOK)continue;
979 
980  TimedMuon mymuon;
981  /* fill basic info */
982  mymuon.muon = muon;
983  /* fill extrapolation info (only to TGC) */
984  if ( std::abs(muon->eta()) > 0.5 // only endcap region
985  && muon->pt() > m_pTCutOnExtrapolation ) { // only reasonably-high pT muons
986  for (const auto &z : m_extZposition) {
987  if( muon->eta()<0 && z>0 )continue;
988  if( muon->eta()>0 && z<0 )continue;
989  xAOD::Muon::TrackParticleType trkPtclType;
990  if(m_useIDTrackForExtrapolation){ trkPtclType = xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle;
991  }else if(m_useMSTrackForExtrapolation){trkPtclType = xAOD::Muon::TrackParticleType::MuonSpectrometerTrackParticle;
992  }else if(m_useCBTrackForExtrapolation){trkPtclType = xAOD::Muon::TrackParticleType::CombinedTrackParticle;
993  }else if(m_useExtMSTrackForExtrapolation){trkPtclType = xAOD::Muon::TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle;
994  }else if(m_useMSOnlyExtMSTrackForExtrapolation){trkPtclType = xAOD::Muon::TrackParticleType::MSOnlyExtrapolatedMuonSpectrometerTrackParticle;
995  }else{ trkPtclType = xAOD::Muon::TrackParticleType::Primary; } // default is Primary (i.e. same as muonType )
996  auto trackParticle = (m_useDirectPrimaryTrackForExtrapolation) ? muon->primaryTrackParticle() : muon->trackParticle( trkPtclType );
997  if(trackParticle==nullptr)continue;
998  auto matrix = std::make_unique<Amg::Transform3D>();
999  matrix->setIdentity();
1000  matrix->translation().z() = z;
1001  auto disc = std::make_unique < Trk::DiscSurface > (*matrix,
1004  const Trk::BoundaryCheck boundaryCheck = true;
1005  const auto extTrkParams = m_extrapolator->extrapolate(ctx,
1006  trackParticle->perigeeParameters(),
1007  *disc,
1009  boundaryCheck,
1010  Trk::muon);
1011  if(extTrkParams != nullptr){
1012  if( std::abs(extTrkParams->position().z() - z) > 10. )continue; // wrong extrapolation
1013  ExtPos ext;
1014  ext.extPosZ = z;
1015  ext.extPos = extTrkParams->position();
1016  ext.extVec = extTrkParams->momentum();
1017  Amg::Vector3D extVec(extTrkParams->position().x(),extTrkParams->position().y(),z);
1018  ext.passedChambers = m_tgcMonTool->getPassedChambers(extVec);
1019  ext.muon = muon;
1020  if( std::abs( std::abs(z) - m_M3_Z ) < 10. && // trigger pivot plane (i.e. M3)
1021  std::abs( muon->eta() ) > 1.05 &&
1022  std::abs( muon->eta() ) < 2.40){ // only endcap
1023  extpositions_pivot.push_back(ext);
1024  }
1025  for(const auto& cham : ext.passedChambers){
1026  extpositions[cham].push_back(ext);
1027  }
1028  }
1029  }
1030  }
1031  /* L1Muon RoI matching */
1032  mymuon.matchedL1Charge=false;
1033  mymuon.passBW3Coin=false;
1034  mymuon.passInnerCoin=false;
1035  mymuon.passGoodMF=false;
1036  mymuon.passIsMoreCandInRoI=false;
1037  double max_dr = getMatchingWindow(mymuon.muon);
1038  if (AllBCMuonRoIs.size()==0) {
1039  ATH_MSG_DEBUG("No RoI matching possible as no container has been retrieved");
1040  mymuons.push_back(mymuon);
1041  continue;
1042  }
1043  for(const auto& allBcMuonRoI : AllBCMuonRoIs){
1044  const xAOD::MuonRoI* roi = allBcMuonRoI.muonRoI;
1045  double dr = xAOD::P4Helpers::deltaR(*muon,roi->eta(),roi->phi(),false);
1046  deltaR_muons_roi.push_back(dr);
1047  if( dr < max_dr ){
1048  if(roiAndMenu.count(roi)>0)mymuon.matchedL1Items.insert( roiAndMenu[roi].begin(), roiAndMenu[roi].end() );
1049  mymuon.matchedL1ThrExclusive.insert( roi->getThrNumber() );
1050  if(roi->getSource()!=xAOD::MuonRoI::Barrel)mymuon.matchedL1ThrExclusiveTGC.insert( roi->getThrNumber() );
1051  if(muon->charge()<0 && roi->getCharge()==xAOD::MuonRoI::Neg)mymuon.matchedL1Charge|=true;
1052  else if(muon->charge()>0 && roi->getCharge()==xAOD::MuonRoI::Pos)mymuon.matchedL1Charge|=true;
1053  mymuon.passBW3Coin|=roi->getBW3Coincidence();
1054  mymuon.passInnerCoin|=roi->getInnerCoincidence();
1055  mymuon.passGoodMF|=roi->getGoodMF();
1056  mymuon.passIsMoreCandInRoI|=roi->isMoreCandInRoI();
1057  }
1058  }
1059  for (int ithr = 1; ithr <= 15 ; ++ithr) { // TGC thresholds from 1 up to 15
1060  for (const auto &thr : mymuon.matchedL1ThrExclusive) {
1061  if (thr >= ithr) {
1062  mymuon.matchedL1ThrInclusive.insert(ithr);
1063  break;
1064  }
1065  }
1066  for (const auto &thr : mymuon.matchedL1ThrExclusiveTGC) {
1067  if (thr >= ithr) {
1068  mymuon.matchedL1ThrInclusiveTGC.insert(ithr);
1069  break;
1070  }
1071  }
1072  }
1073  /* store TimedMuon */
1074  mymuons.push_back(mymuon);
1075  mymuon2pv_dz.push_back(dz);
1076  mymuon2pv_dca.push_back(dca);
1077  }
1078 
1079 
1080  auto oflmuon_num=Monitored::Scalar<int>("oflmuon_num",(*muons).size());
1081  auto oflmuon_muonType=Monitored::Collection("oflmuon_muonType",*muons,[](const xAOD::Muon*m){return m->muonType();});
1082  auto oflmuon_author=Monitored::Collection("oflmuon_author",*muons,[](const xAOD::Muon*m){return m->author();});
1083  auto oflmuon_quality=Monitored::Collection("oflmuon_quality",*muons,[](const xAOD::Muon*m){return m->quality();});
1084  auto oflmuon_pt=Monitored::Collection("oflmuon_pt",*muons,[](const xAOD::Muon*m){return m->pt() / Gaudi::Units::GeV;});
1085  auto oflmuon_eta=Monitored::Collection("oflmuon_eta",*muons,[](const xAOD::Muon*m){return m->eta();});
1086  auto oflmuon_phi=Monitored::Collection("oflmuon_phi",*muons,[](const xAOD::Muon*m){return m->phi();});
1087  auto oflmuon_pvdz=Monitored::Collection("oflmuon_pvdz",muon2pv_dz);
1088  auto oflmuon_pvdca=Monitored::Collection("oflmuon_pvdca",muon2pv_dca);
1089 
1090  auto oflmuon_probe_num=Monitored::Scalar<int>("oflmuon_probe_num",mymuons.size());
1091  auto oflmuon_probe_muonType=Monitored::Collection("oflmuon_probe_muonType",mymuons,[](const TimedMuon&m){return m.muon->muonType();});
1092  auto oflmuon_probe_author=Monitored::Collection("oflmuon_probe_author",mymuons,[](const TimedMuon&m){return m.muon->author();});
1093  auto oflmuon_probe_quality=Monitored::Collection("oflmuon_probe_quality",mymuons,[](const TimedMuon&m){return m.muon->quality();});
1094  auto oflmuon_probe_pt=Monitored::Collection("oflmuon_probe_pt",mymuons,[](const TimedMuon&m){return m.muon->pt() / Gaudi::Units::GeV;});
1095  auto oflmuon_probe_eta=Monitored::Collection("oflmuon_probe_eta",mymuons,[](const TimedMuon&m){return m.muon->eta();});
1096  auto oflmuon_probe_phi=Monitored::Collection("oflmuon_probe_phi",mymuons,[](const TimedMuon&m){return m.muon->phi();});
1097  auto oflmuon_probe_pvdz=Monitored::Collection("oflmuon_probe_pvdz",mymuon2pv_dz);
1098  auto oflmuon_probe_pvdca=Monitored::Collection("oflmuon_probe_pvdca",mymuon2pv_dca);
1099 
1100  auto oflmuon_deltaR=Monitored::Collection("oflmuon_deltaR",deltaR_muons);
1101  auto oflmuon_deltaR_roi=Monitored::Collection("oflmuon_deltaR_roi",deltaR_muons_roi);
1102  auto oflmuon_deltaR_hlt=Monitored::Collection("oflmuon_deltaR_hlt",deltaR_muons_hlt);
1103 
1104 
1105  fill(m_packageName+"_Muon",
1106  oflmuon_num,oflmuon_muonType,oflmuon_author,oflmuon_quality,oflmuon_pt,oflmuon_eta,oflmuon_phi,oflmuon_pvdz,oflmuon_pvdca,
1107  oflmuon_probe_num,oflmuon_probe_muonType,oflmuon_probe_author,oflmuon_probe_quality,oflmuon_probe_pt,oflmuon_probe_eta,oflmuon_probe_phi,oflmuon_probe_pvdz,oflmuon_probe_pvdca,
1108  oflmuon_deltaR, oflmuon_deltaR_roi, oflmuon_deltaR_hlt
1109  );
1110 
1111 
1112 
1113  MonVariables oflmuon_variables;
1114  oflmuon_variables.push_back(oflmuon_num);
1115  oflmuon_variables.push_back(oflmuon_muonType);
1116  oflmuon_variables.push_back(oflmuon_author);
1117  oflmuon_variables.push_back(oflmuon_quality);
1118  oflmuon_variables.push_back(oflmuon_pt);
1119  oflmuon_variables.push_back(oflmuon_eta);
1120  oflmuon_variables.push_back(oflmuon_phi);
1121 
1122 
1123  auto muon_charge = Monitored::Collection("muon_charge",mymuons,[](const TimedMuon& m){
1124  return m.muon->charge();
1125  });
1126  oflmuon_variables.push_back(muon_charge);
1127  auto muon_chargePos = Monitored::Collection("muon_chargePos",mymuons,[](const TimedMuon& m){
1128 return (m.muon->charge()>0);
1129  });
1130  oflmuon_variables.push_back(muon_chargePos);
1131  auto muon_chargeNeg = Monitored::Collection("muon_chargeNeg",mymuons,[](const TimedMuon& m){
1132  return (m.muon->charge()<0);
1133  });
1134  oflmuon_variables.push_back(muon_chargeNeg);
1135  auto muon_eta4gev = Monitored::Collection("muon_eta4gev",mymuons,[](const TimedMuon& m){
1136  return (m.muon->pt()>pt_4_cut)?m.muon->eta():-10;
1137  });
1138  oflmuon_variables.push_back(muon_eta4gev);
1139  auto muon_phi4gev = Monitored::Collection("muon_phi4gev",mymuons,[](const TimedMuon& m){
1140  return (m.muon->pt()>pt_4_cut)?m.muon->phi():-10;
1141  });
1142  oflmuon_variables.push_back(muon_phi4gev);
1143  auto muon_phi4gev_1p05eta1p3 = Monitored::Collection("muon_phi4gev_1p05eta1p3",mymuons,[](const TimedMuon& m){
1144  return (m.muon->pt()>pt_4_cut && std::abs(m.muon->eta())>barrel_end && std::abs(m.muon->eta())<eifi_boundary)?m.muon->phi():-10;
1145  });
1146  oflmuon_variables.push_back(muon_phi4gev_1p05eta1p3);
1147  auto muon_phi4gev_1p05eta1p3A = Monitored::Collection("muon_phi4gev_1p05eta1p3A",mymuons,[](const TimedMuon& m){
1148  return (m.muon->pt()>pt_4_cut && std::abs(m.muon->eta())>barrel_end && std::abs(m.muon->eta())<eifi_boundary && m.muon->eta()>0)?m.muon->phi():-10;
1149  });
1150  oflmuon_variables.push_back(muon_phi4gev_1p05eta1p3A);
1151  auto muon_phi4gev_1p05eta1p3C = Monitored::Collection("muon_phi4gev_1p05eta1p3C",mymuons,[](const TimedMuon& m){
1152  return (m.muon->pt()>pt_4_cut && std::abs(m.muon->eta())>barrel_end && std::abs(m.muon->eta())<eifi_boundary && m.muon->eta()<0)?m.muon->phi():-10;
1153  });
1154  oflmuon_variables.push_back(muon_phi4gev_1p05eta1p3C);
1155  auto muon_phi4gev_1p3eta2p4 = Monitored::Collection("muon_phi4gev_1p3eta2p4",mymuons,[](const TimedMuon& m){
1156  return (m.muon->pt()>pt_4_cut && std::abs(m.muon->eta())>eifi_boundary && std::abs(m.muon->eta())<trigger_end)?m.muon->phi():-10;
1157  });
1158  oflmuon_variables.push_back(muon_phi4gev_1p3eta2p4);
1159  auto muon_phi4gev_1p3eta2p4A = Monitored::Collection("muon_phi4gev_1p3eta2p4A",mymuons,[](const TimedMuon& m){
1160  return (m.muon->pt()>pt_4_cut && std::abs(m.muon->eta())>eifi_boundary && std::abs(m.muon->eta())<trigger_end && m.muon->eta()>0)?m.muon->phi():-10;
1161  });
1162  oflmuon_variables.push_back(muon_phi4gev_1p3eta2p4A);
1163  auto muon_phi4gev_1p3eta2p4C = Monitored::Collection("muon_phi4gev_1p3eta2p4C",mymuons,[](const TimedMuon& m){
1164  return (m.muon->pt()>pt_4_cut && std::abs(m.muon->eta())>eifi_boundary && std::abs(m.muon->eta())<trigger_end && m.muon->eta()<0)?m.muon->phi():-10;
1165  });
1166  oflmuon_variables.push_back(muon_phi4gev_1p3eta2p4C);
1167  auto muon_phi4gev_rpc = Monitored::Collection("muon_phi4gev_rpc",mymuons,[](const TimedMuon& m){
1168  return (std::abs(m.muon->eta()) < barrel_end && m.muon->pt() > pt_4_cut) ? m.muon->phi() : -10;
1169  });
1170  oflmuon_variables.push_back(muon_phi4gev_rpc);
1171  auto muon_phi4gev_rpcA = Monitored::Collection("muon_phi4gev_rpcA",mymuons,[](const TimedMuon& m){
1172  return (std::abs(m.muon->eta()) < barrel_end && m.muon->pt() > pt_4_cut && m.muon->eta() > 0) ? m.muon->phi() : -10;
1173  });
1174  oflmuon_variables.push_back(muon_phi4gev_rpcA);
1175  auto muon_phi4gev_rpcC = Monitored::Collection("muon_phi4gev_rpcC",mymuons,[](const TimedMuon& m){
1176  return (std::abs(m.muon->eta()) < barrel_end && m.muon->pt() > pt_4_cut && m.muon->eta() < 0) ? m.muon->phi() : -10;
1177  });
1178  oflmuon_variables.push_back(muon_phi4gev_rpcC);
1179  auto muon_phi4gev_tgc = Monitored::Collection("muon_phi4gev_tgc",mymuons,[](const TimedMuon& m){
1180  return (std::abs(m.muon->eta()) > barrel_end && std::abs(m.muon->eta()) < trigger_end && m.muon->pt() > pt_4_cut) ? m.muon->phi() : -10;
1181  });
1182  oflmuon_variables.push_back(muon_phi4gev_tgc);
1183  auto muon_phi4gev_tgcA = Monitored::Collection("muon_phi4gev_tgcA",mymuons,[](const TimedMuon& m){
1184  return (std::abs(m.muon->eta()) > barrel_end && std::abs(m.muon->eta()) < trigger_end && m.muon->pt() > pt_4_cut && m.muon->eta() > 0) ? m.muon->phi() : -10;
1185  });
1186  oflmuon_variables.push_back(muon_phi4gev_tgcA);
1187  auto muon_phi4gev_tgcC = Monitored::Collection("muon_phi4gev_tgcC",mymuons,[](const TimedMuon& m){
1188  return (std::abs(m.muon->eta()) > barrel_end && std::abs(m.muon->eta()) < trigger_end && m.muon->pt() > pt_4_cut && m.muon->eta() < 0) ? m.muon->phi() : -10;
1189  });
1190  oflmuon_variables.push_back(muon_phi4gev_tgcC);
1191  auto muon_phi0gev_tgc = Monitored::Collection("muon_phi0gev_tgc",mymuons,[](const TimedMuon& m){
1192  return (std::abs(m.muon->eta()) > barrel_end && std::abs(m.muon->eta()) < trigger_end) ? m.muon->phi() : -10;
1193  });
1194  oflmuon_variables.push_back(muon_phi0gev_tgc);
1195  auto muon_phi0gev_tgcA = Monitored::Collection("muon_phi0gev_tgcA",mymuons,[](const TimedMuon& m){
1196  return (std::abs(m.muon->eta()) > barrel_end && std::abs(m.muon->eta()) < trigger_end && m.muon->eta() > 0) ? m.muon->phi() : -10;
1197  });
1198  oflmuon_variables.push_back(muon_phi0gev_tgcA);
1199  auto muon_phi0gev_tgcC = Monitored::Collection("muon_phi0gev_tgcC",mymuons,[](const TimedMuon& m){
1200  return (std::abs(m.muon->eta()) > barrel_end && std::abs(m.muon->eta()) < trigger_end && m.muon->eta() < 0) ? m.muon->phi() : -10;
1201  });
1202  oflmuon_variables.push_back(muon_phi0gev_tgcC);
1203  auto muon_eta = Monitored::Collection("muon_eta", mymuons, [](const TimedMuon &m) {
1204  return (m.muon->pt() > pt_30_cut) ? m.muon->eta() : -10;
1205  });
1206  oflmuon_variables.push_back(muon_eta);
1207  auto muon_phi = Monitored::Collection("muon_phi", mymuons, [](const TimedMuon &m) {
1208  return (m.muon->pt() > pt_30_cut) ? m.muon->phi() : -10;
1209  });
1210  oflmuon_variables.push_back(muon_phi);
1211  auto muon_phi_rpc = Monitored::Collection("muon_phi_rpc", mymuons, [](const TimedMuon &m) {
1212  return (std::abs(m.muon->eta()) < barrel_end && m.muon->pt() > pt_30_cut) ? m.muon->phi() : -10;
1213  });
1214  oflmuon_variables.push_back(muon_phi_rpc);
1215  auto muon_phi_rpcA = Monitored::Collection("muon_phi_rpcA", mymuons, [](const TimedMuon &m) {
1216  return (std::abs(m.muon->eta()) < barrel_end && m.muon->pt() > pt_30_cut && m.muon->eta()>0) ? m.muon->phi() : -10;
1217  });
1218  oflmuon_variables.push_back(muon_phi_rpcA);
1219  auto muon_phi_rpcC = Monitored::Collection("muon_phi_rpcC", mymuons, [](const TimedMuon &m) {
1220  return (std::abs(m.muon->eta()) < barrel_end && m.muon->pt() > pt_30_cut && m.muon->eta()<0) ? m.muon->phi() : -10;
1221  });
1222  oflmuon_variables.push_back(muon_phi_rpcC);
1223  auto muon_phi_tgc = Monitored::Collection("muon_phi_tgc", mymuons, [](const TimedMuon &m) {
1224  return (std::abs(m.muon->eta()) > barrel_end && std::abs(m.muon->eta()) < trigger_end && m.muon->pt() > pt_30_cut) ? m.muon->phi() : -10;
1225  });
1226  oflmuon_variables.push_back(muon_phi_tgc);
1227  auto muon_phi_tgcA = Monitored::Collection("muon_phi_tgcA", mymuons, [](const TimedMuon &m) {
1228  return (std::abs(m.muon->eta()) > barrel_end && std::abs(m.muon->eta()) < trigger_end && m.muon->pt() > pt_30_cut && m.muon->eta()>0) ? m.muon->phi() : -10;
1229  });
1230  oflmuon_variables.push_back(muon_phi_tgcA);
1231  auto muon_phi_tgcC = Monitored::Collection("muon_phi_tgcC", mymuons, [](const TimedMuon &m) {
1232  return (std::abs(m.muon->eta()) > barrel_end && std::abs(m.muon->eta()) < trigger_end && m.muon->pt() > pt_30_cut && m.muon->eta()<0) ? m.muon->phi() : -10;
1233  });
1234  oflmuon_variables.push_back(muon_phi_tgcC);
1235  auto muon_pt_rpc = Monitored::Collection("muon_pt_rpc", mymuons, [](const TimedMuon &m) {
1236  return (std::abs(m.muon->eta()) < barrel_end) ? m.muon->pt() / Gaudi::Units::GeV : -10;
1237  });
1238  oflmuon_variables.push_back(muon_pt_rpc);
1239  auto muon_pt_tgc = Monitored::Collection("muon_pt_tgc", mymuons, [](const TimedMuon &m) {
1240  return (std::abs(m.muon->eta()) > barrel_end && std::abs(m.muon->eta()) < trigger_end) ? m.muon->pt() / Gaudi::Units::GeV : -10;
1241  });
1242  oflmuon_variables.push_back(muon_pt_tgc);
1243  auto muon_barrel = Monitored::Collection("muon_barrel", mymuons, [](const TimedMuon &m) {
1244  return (std::abs(m.muon->eta()) < barrel_end);
1245  });
1246  oflmuon_variables.push_back(muon_barrel);
1247  auto muon_endcap = Monitored::Collection("muon_endcap", mymuons, [](const TimedMuon &m) {
1248  return (std::abs(m.muon->eta()) > barrel_end && std::abs(m.muon->eta()) < endcap_end);
1249  });
1250  oflmuon_variables.push_back(muon_endcap);
1251  auto muon_forward = Monitored::Collection("muon_forward", mymuons, [](const TimedMuon &m) {
1252  return (std::abs(m.muon->eta()) > endcap_end && std::abs(m.muon->eta()) < trigger_end);
1253  });
1254  oflmuon_variables.push_back(muon_forward);
1255  auto muon_l1passThr1TGC = Monitored::Collection("muon_l1passThr1TGC", mymuons, [](const TimedMuon &m) {
1256  return m.matchedL1ThrInclusiveTGC.find(1) != m.matchedL1ThrInclusiveTGC.end();
1257  });
1258  oflmuon_variables.push_back(muon_l1passThr1TGC);
1259  auto muon_l1passThr1 = Monitored::Collection("muon_l1passThr1", mymuons, [](const TimedMuon &m) {
1260  return m.matchedL1ThrInclusive.find(1) != m.matchedL1ThrInclusive.end();
1261  });
1262  oflmuon_variables.push_back(muon_l1passThr1);
1263  auto muon_l1passThr2 = Monitored::Collection("muon_l1passThr2", mymuons, [](const TimedMuon &m) {
1264  return m.matchedL1ThrInclusive.find(2) != m.matchedL1ThrInclusive.end();
1265  });
1266  oflmuon_variables.push_back(muon_l1passThr2);
1267  auto muon_l1passThr3 = Monitored::Collection("muon_l1passThr3", mymuons, [](const TimedMuon &m) {
1268  return m.matchedL1ThrInclusive.find(3) != m.matchedL1ThrInclusive.end();
1269  });
1270  oflmuon_variables.push_back(muon_l1passThr3);
1271  auto muon_l1passThr4 = Monitored::Collection("muon_l1passThr4", mymuons, [](const TimedMuon &m) {
1272  return m.matchedL1ThrInclusive.find(4) != m.matchedL1ThrInclusive.end();
1273  });
1274  oflmuon_variables.push_back(muon_l1passThr4);
1275  auto muon_l1passThr5 = Monitored::Collection("muon_l1passThr5", mymuons, [](const TimedMuon &m) {
1276  return m.matchedL1ThrInclusive.find(5) != m.matchedL1ThrInclusive.end();
1277  });
1278  oflmuon_variables.push_back(muon_l1passThr5);
1279  auto muon_l1passThr6 = Monitored::Collection("muon_l1passThr6", mymuons, [](const TimedMuon &m) {
1280  return m.matchedL1ThrInclusive.find(6) != m.matchedL1ThrInclusive.end();
1281  });
1282  oflmuon_variables.push_back(muon_l1passThr6);
1283  auto muon_l1passThr7 = Monitored::Collection("muon_l1passThr7", mymuons, [](const TimedMuon &m) {
1284  return m.matchedL1ThrInclusive.find(7) != m.matchedL1ThrInclusive.end();
1285  });
1286  oflmuon_variables.push_back(muon_l1passThr7);
1287  auto muon_l1passThr8 = Monitored::Collection("muon_l1passThr8", mymuons, [](const TimedMuon &m) {
1288  return m.matchedL1ThrInclusive.find(8) != m.matchedL1ThrInclusive.end();
1289  });
1290  oflmuon_variables.push_back(muon_l1passThr8);
1291  auto muon_l1passThr9 = Monitored::Collection("muon_l1passThr9", mymuons, [](const TimedMuon &m) {
1292  return m.matchedL1ThrInclusive.find(9) != m.matchedL1ThrInclusive.end();
1293  });
1294  oflmuon_variables.push_back(muon_l1passThr9);
1295  auto muon_l1passThr10 = Monitored::Collection("muon_l1passThr10", mymuons, [](const TimedMuon &m) {
1296  return m.matchedL1ThrInclusive.find(10) != m.matchedL1ThrInclusive.end();
1297  });
1298  oflmuon_variables.push_back(muon_l1passThr10);
1299  auto muon_l1passThr11 = Monitored::Collection("muon_l1passThr11", mymuons, [](const TimedMuon &m) {
1300  return m.matchedL1ThrInclusive.find(11) != m.matchedL1ThrInclusive.end();
1301  });
1302  oflmuon_variables.push_back(muon_l1passThr11);
1303  auto muon_l1passThr12 = Monitored::Collection("muon_l1passThr12", mymuons, [](const TimedMuon &m) {
1304  return m.matchedL1ThrInclusive.find(12) != m.matchedL1ThrInclusive.end();
1305  });
1306  oflmuon_variables.push_back(muon_l1passThr12);
1307  auto muon_l1passThr13 = Monitored::Collection("muon_l1passThr13", mymuons, [](const TimedMuon &m) {
1308  return m.matchedL1ThrInclusive.find(13) != m.matchedL1ThrInclusive.end();
1309  });
1310  oflmuon_variables.push_back(muon_l1passThr13);
1311  auto muon_l1passThr14 = Monitored::Collection("muon_l1passThr14", mymuons, [](const TimedMuon &m) {
1312  return m.matchedL1ThrInclusive.find(14) != m.matchedL1ThrInclusive.end();
1313  });
1314  oflmuon_variables.push_back(muon_l1passThr14);
1315  auto muon_l1passThr15 = Monitored::Collection("muon_l1passThr15", mymuons, [](const TimedMuon &m) {
1316  return m.matchedL1ThrInclusive.find(15) != m.matchedL1ThrInclusive.end();
1317  });
1318  oflmuon_variables.push_back(muon_l1passThr15);
1319  auto muon_l1passCharge = Monitored::Collection("muon_l1passCharge",mymuons,[](const TimedMuon& m){
1320  return m.matchedL1Charge;
1321  });
1322  oflmuon_variables.push_back(muon_l1passCharge);
1323  auto muon_l1passBW3Coin = Monitored::Collection("muon_l1passBW3Coin",mymuons,[](const TimedMuon& m){
1324  return m.passBW3Coin;
1325  });
1326  oflmuon_variables.push_back(muon_l1passBW3Coin);
1327  auto muon_l1passBW3CoinVeto = Monitored::Collection("muon_l1passBW3CoinVeto",mymuons,[](const TimedMuon& m){
1328  return !m.passBW3Coin;
1329  });
1330  oflmuon_variables.push_back(muon_l1passBW3CoinVeto);
1331  auto muon_l1passInnerCoin = Monitored::Collection("muon_l1passInnerCoin",mymuons,[](const TimedMuon& m){
1332  return m.passInnerCoin;
1333  });
1334  oflmuon_variables.push_back(muon_l1passInnerCoin);
1335  auto muon_l1passInnerCoinVeto = Monitored::Collection("muon_l1passInnerCoinVeto",mymuons,[](const TimedMuon& m){
1336  return !m.passInnerCoin;
1337  });
1338  oflmuon_variables.push_back(muon_l1passInnerCoinVeto);
1339  auto muon_l1passGoodMF = Monitored::Collection("muon_l1passGoodMF",mymuons,[](const TimedMuon& m){
1340  return m.passGoodMF;
1341  });
1342  oflmuon_variables.push_back(muon_l1passGoodMF);
1343  auto muon_l1passBadMF = Monitored::Collection("muon_l1passBadMF",mymuons,[](const TimedMuon& m){
1344  return !m.passGoodMF;
1345  });
1346  oflmuon_variables.push_back(muon_l1passBadMF);
1347  auto muon_l1passIsMoreCandInRoI = Monitored::Collection("muon_l1passIsMoreCandInRoI",mymuons,[](const TimedMuon& m){
1348  return m.passIsMoreCandInRoI;
1349  });
1350  oflmuon_variables.push_back(muon_l1passIsMoreCandInRoI);
1351  fill(m_packageName, oflmuon_variables);
1352 
1353  ATH_MSG_DEBUG("End filling offline muon-related histograms");
1354  }
1356  fillThresholdPatternHistograms(menuAndRoIs, mymuons, ctx);
1357 
1359  fillTgcPrdHistograms(mon_bcid, mon_pileup, mon_lb, extpositions,ctx);
1361 
1362 
1364  if(m_anaTgcCoin){
1368  if (!tgcCoinCurr.isValid() || !tgcCoinNext.isValid() || !tgcCoinPrev.isValid()) {
1369  ATH_MSG_WARNING("Couldn't get TGC Coin Data");
1370  }else{
1371  ATH_MSG_DEBUG("Filling TGC CoinData histograms");
1372  std::map<int, SG::ReadHandle<Muon::TgcCoinDataContainer> > tgcCoin;
1373  tgcCoin[-1] = tgcCoinPrev;
1374  tgcCoin[0] = tgcCoinCurr;
1375  tgcCoin[+1] = tgcCoinNext;
1378  if(tgcCoinNextNext.isValid())tgcCoin[+2] = tgcCoinNextNext;
1379  }
1380  std::vector< TgcTrig > tgcTrigMap_SL;
1381  std::vector< TgcTrig > tgcTrigMap_SL_Endcap;
1382  std::vector< TgcTrig > tgcTrigMap_SL_Forward;
1383  std::vector< TgcTrig > tgcTrigMap_HPT_Wire;
1384  std::vector< TgcTrig > tgcTrigMap_HPT_Endcap_Wire;
1385  std::vector< TgcTrig > tgcTrigMap_HPT_Forward_Wire;
1386  std::vector< TgcTrig > tgcTrigMap_HPT_Strip;
1387  std::vector< TgcTrig > tgcTrigMap_HPT_Endcap_Strip;
1388  std::vector< TgcTrig > tgcTrigMap_HPT_Forward_Strip;
1389  std::vector< TgcTrig > tgcTrigMap_LPT_Wire;
1390  std::vector< TgcTrig > tgcTrigMap_LPT_Endcap_Wire;
1391  std::vector< TgcTrig > tgcTrigMap_LPT_Forward_Wire;
1392  std::vector< TgcTrig > tgcTrigMap_LPT_Strip;
1393  std::vector< TgcTrig > tgcTrigMap_LPT_Endcap_Strip;
1394  std::vector< TgcTrig > tgcTrigMap_LPT_Forward_Strip;
1395  std::vector< TgcTrig > tgcTrigMap_EIFI_Wire;
1396  std::vector< TgcTrig > tgcTrigMap_EIFI_Endcap_Wire;
1397  std::vector< TgcTrig > tgcTrigMap_EIFI_Forward_Wire;
1398  std::vector< TgcTrig > tgcTrigMap_EIFI_Strip;
1399  std::vector< TgcTrig > tgcTrigMap_EIFI_Endcap_Strip;
1400  std::vector< TgcTrig > tgcTrigMap_EIFI_Forward_Strip;
1401  std::vector< TgcTrigTile > tgcTrigTileMap;
1402  std::vector< TgcTrigNsw > tgcTrigNswMap;
1403  std::vector< TgcTrigRpc > tgcTrigRpcMap;
1404  std::vector< TgcTrigEifi > tgcTrigEifiMap;
1405  std::map<TString, TgcTrigNsw > tgcTrigNswMapUnique;
1406  std::vector<int> multiplicity_endcap(number_of_trigger_sectors_endcap*2+1); // both A and C sides, plus one empty bin
1407  std::vector<int> multiplicity_forward(number_of_trigger_sectors_forward*2+1); // both A and C sides, plus one empty bin
1408  std::vector<int> sectors_endcap(number_of_trigger_sectors_endcap*2+1); // both A and C sides, plus one empty bin
1409  std::vector<int> sectors_forward(number_of_trigger_sectors_forward*2+1); // both A and C sides, plus one empty bin
1410  std::iota(sectors_endcap.begin(),sectors_endcap.end(),-number_of_trigger_sectors_endcap);
1411  std::iota(sectors_forward.begin(),sectors_forward.end(),-number_of_trigger_sectors_forward);
1412  int n_TgcCoin_detElementIsNull = 0;
1413  int n_TgcCoin_postOutPtrIsNull = 0;
1414  for (auto thisCoin : tgcCoin) {
1415  int bunch = thisCoin.first;
1416  for (const auto tgccnt : *(thisCoin.second)) {
1417  for (const auto data : *tgccnt) {
1418  if ( data->detectorElementOut() == nullptr ) n_TgcCoin_detElementIsNull++;
1419  if ( data->posOutPtr() == nullptr ) n_TgcCoin_postOutPtrIsNull++;
1420 
1421  int slsector = (data->isForward()) ? ( data->phi() % number_of_trigger_sectors_forward + 1) : ( (data->phi() + 1) % number_of_trigger_sectors_endcap + 1); // translation from the phi index to trigger sector
1422  if(!data->isAside()) slsector *= -1;
1423 
1424  if(data->type() == Muon::TgcCoinData::TYPE_UNKNOWN){ // inner muon detectors (EI/FI/Tile/NSW/RPCBIS78)
1425  if (data->isInner() && data->isStrip()) { // RPC-BIS78
1426  TgcTrigRpc rpcCoin;
1427  rpcCoin.slSector = slsector;
1429  rpcCoin.bunch = bunch;
1430  rpcCoin.currBc = (bunch==0);
1435  tgcTrigRpcMap.push_back(rpcCoin);
1436  } else if (data->isInner() && !data->isStrip()) { // NSW
1437  TgcTrigNsw nswCoin;
1438  nswCoin.slSector = slsector;
1440  int boardID = (std::abs(nswCoin.slSector)-1) / 2 + 1; // 1..24 (1..12)
1441  nswCoin.slInputIndex = (boardID-1) * 6 + nswCoin.slInput;
1442  nswCoin.isAside = data->isAside();
1443  nswCoin.isForward = data->isForward();
1445  nswCoin.bunch = bunch;
1446  nswCoin.currBc = (bunch==0);
1450  if(nswCoin.R!=0 && nswCoin.Phi!=0){
1451  tgcTrigNswMap.push_back(nswCoin);
1452  TString uniqueinfo = Form("%d:%d:%d:%d:%d:%d:%d:%d",nswCoin.slSector,nswCoin.slInput,nswCoin.slInputIndex,nswCoin.isAside,nswCoin.isForward,nswCoin.R,nswCoin.Phi,nswCoin.deltaTheta);
1453  if(tgcTrigNswMapUnique.find(uniqueinfo)==tgcTrigNswMapUnique.end()){
1454  nswCoin.bcmask = 0x1 << (1-bunch);
1455  tgcTrigNswMapUnique[uniqueinfo] = nswCoin;
1456  }else{
1457  tgcTrigNswMapUnique[uniqueinfo].bcmask |= 0x1 << (1-bunch);
1458  }
1459  }
1460  } else if (!data->isInner() && data->isStrip()) { // TMDB
1461  TgcTrigTile tileCoin;
1462  tileCoin.slSector = slsector;
1464  tileCoin.bunch = bunch;
1465  tileCoin.currBc = (bunch==0);
1467  if(tileCoin.tmdbDecisions!=0)
1468  tgcTrigTileMap.push_back(tileCoin);
1469  } else if (!data->isInner() && !data->isStrip()) { // EI
1470  TgcTrigEifi eifiCoin;
1471  eifiCoin.slSector = slsector;
1472  eifiCoin.bunch = bunch;
1473  eifiCoin.currBc = (bunch==0);
1474  tgcTrigEifiMap.push_back(eifiCoin);
1475  }
1476  }
1477 
1478  if ( data->detectorElementOut() == nullptr ||
1479  data->posOutPtr() == nullptr )continue; // to avoid FPE
1480  TgcTrig tgcTrig;
1481  tgcTrig.lb = GetEventInfo(ctx)->lumiBlock();
1482  const Amg::Vector3D &posIn = data->globalposIn();
1483  tgcTrig.x_In = posIn[0];
1484  tgcTrig.y_In = posIn[1];
1485  tgcTrig.z_In = posIn[2];
1486  const Amg::Vector3D &posOut = data->globalposOut();
1487  tgcTrig.x_Out = posOut[0];
1488  tgcTrig.y_Out = posOut[1];
1489  tgcTrig.z_Out = posOut[2];
1490  tgcTrig.eta = posOut.eta();
1491  tgcTrig.phi = posOut.phi();
1492  tgcTrig.width_In = data->widthIn();
1493  tgcTrig.width_Out = data->widthOut();
1494  if (data->type() == Muon::TgcCoinData::TYPE_SL) {
1495  const Amg::MatrixX &matrix = data->errMat();
1496  tgcTrig.width_R = matrix(0, 0);
1497  tgcTrig.width_Phi = matrix(1, 1);
1498 
1499  tgcTrig.muonMatched = 0;
1500  for(const auto& ext : extpositions_pivot){
1501  if(ext.muon->pt() < m_pTCutOnTrigExtrapolation.value() )continue;
1502  if(data->isAside() && ext.extPos.z()<0)continue;
1503  if(!data->isAside()&& ext.extPos.z()>0)continue;
1504  if( Amg::deltaR(posOut,ext.extPos) > m_l1trigMatchWindowPt15 )continue;
1505  tgcTrig.muonMatched = 1;
1506  break;
1507  }
1508 
1509  tgcTrig.loosemuonMatched = 0;
1510  for (const auto& muon : oflmuons) {
1511  double max_dr = getMatchingWindow(muon);
1512  double dr = xAOD::P4Helpers::deltaR(*muon,tgcTrig.eta,tgcTrig.phi,false);
1513  if( dr > max_dr )continue;
1514  tgcTrig.loosemuonMatched = 1;
1515  break;
1516  }
1517 
1518  tgcTrig.isBiased = 0;
1519  for(const auto& muon : biasedMuons){
1520  double max_dr = getMatchingWindow(muon);
1521  double dr = xAOD::P4Helpers::deltaR(*muon,tgcTrig.eta,tgcTrig.phi,false);
1522  if( dr > max_dr )continue;
1523  tgcTrig.isBiased = 1;
1524  break;
1525  }
1526  // real1: if biasedMuons.size()==1, reject biased muon
1527  // real2: if biasedMuons.size()>=2, use any muons.
1528  // fake: just reject biased muons
1529  if(biasedMuons.size()>=2) tgcTrig.isBiased = 0;
1530 
1531  } else {
1532  tgcTrig.width_R = 0.;
1533  tgcTrig.width_Phi = 0.;
1534  }
1535  int etaout = 0;
1536  int etain = 0;
1537  const Identifier tcdidout = data->channelIdOut();
1538  if (tcdidout.is_valid()) {
1539  etaout = std::abs(int(m_idHelperSvc->tgcIdHelper().stationEta(tcdidout)));
1540  }
1541  const Identifier tcdidin = data->channelIdIn();
1542  if (tcdidin.is_valid()) {
1543  etain = std::abs(int(m_idHelperSvc->tgcIdHelper().stationEta(tcdidin)));
1544  }
1545  tgcTrig.etaout = etaout;
1546  tgcTrig.etain = etain;
1547  tgcTrig.isAside = data->isAside();
1548  tgcTrig.isForward = data->isForward();
1549  tgcTrig.isStrip = data->isStrip();
1550  tgcTrig.isInner = data->isInner();
1551  tgcTrig.isPositiveDeltaR = data->isPositiveDeltaR();
1552  tgcTrig.type = data->type();
1553  tgcTrig.trackletId = data->trackletId();
1554  tgcTrig.trackletIdStrip = data->trackletIdStrip();
1555  tgcTrig.sector = slsector;
1556  tgcTrig.roi = data->roi();
1557  tgcTrig.pt = data->pt();
1558  tgcTrig.delta = data->delta();
1559  tgcTrig.sub = data->sub();
1560  tgcTrig.veto = data->veto();
1561  tgcTrig.bunch = bunch;
1562  tgcTrig.bcid = (GetEventInfo(ctx)->bcid() & 0xF);
1563  tgcTrig.inner = data->inner();
1564  if( !data->isInner() ){
1565  if (data->type() == Muon::TgcCoinData::TYPE_SL && !data->isForward()) {
1566  tgcTrigMap_SL_Endcap.push_back(tgcTrig);
1567  tgcTrigMap_SL.push_back(tgcTrig);
1568  multiplicity_endcap[ slsector + number_of_trigger_sectors_endcap ]++;
1569  }else if (data->type() == Muon::TgcCoinData::TYPE_SL && data->isForward()) {
1570  tgcTrigMap_SL_Forward.push_back(tgcTrig);
1571  tgcTrigMap_SL.push_back(tgcTrig);
1572  multiplicity_forward[ slsector + number_of_trigger_sectors_forward ]++;
1573  }else if(data->type() == Muon::TgcCoinData::TYPE_HIPT && !data->isForward()){
1574  if(tgcTrig.isStrip){
1575  tgcTrigMap_HPT_Endcap_Strip.push_back(tgcTrig);
1576  tgcTrigMap_HPT_Strip.push_back(tgcTrig);
1577  }else{
1578  tgcTrigMap_HPT_Endcap_Wire.push_back(tgcTrig);
1579  tgcTrigMap_HPT_Wire.push_back(tgcTrig);
1580  }
1581  }else if(data->type() == Muon::TgcCoinData::TYPE_HIPT && data->isForward()){
1582  if(tgcTrig.isStrip){
1583  tgcTrigMap_HPT_Forward_Strip.push_back(tgcTrig);
1584  tgcTrigMap_HPT_Strip.push_back(tgcTrig);
1585  }else{
1586  tgcTrigMap_HPT_Forward_Wire.push_back(tgcTrig);
1587  tgcTrigMap_HPT_Wire.push_back(tgcTrig);
1588  }
1589  }else if(data->type() == Muon::TgcCoinData::TYPE_TRACKLET && !data->isForward()){
1590  if(tgcTrig.isStrip){
1591  tgcTrigMap_LPT_Endcap_Strip.push_back(tgcTrig);
1592  tgcTrigMap_LPT_Strip.push_back(tgcTrig);
1593  }else{
1594  tgcTrigMap_LPT_Endcap_Wire.push_back(tgcTrig);
1595  tgcTrigMap_LPT_Wire.push_back(tgcTrig);
1596  }
1597  }else if(data->type() == Muon::TgcCoinData::TYPE_TRACKLET && data->isForward()){
1598  if(tgcTrig.isStrip){
1599  tgcTrigMap_LPT_Forward_Strip.push_back(tgcTrig);
1600  tgcTrigMap_LPT_Strip.push_back(tgcTrig);
1601  }else{
1602  tgcTrigMap_LPT_Forward_Wire.push_back(tgcTrig);
1603  tgcTrigMap_LPT_Wire.push_back(tgcTrig);
1604  }
1605  }else if(data->type() == Muon::TgcCoinData::TYPE_TRACKLET_EIFI && !data->isForward()){
1606  if(tgcTrig.isStrip){
1607  tgcTrigMap_EIFI_Endcap_Strip.push_back(tgcTrig);
1608  tgcTrigMap_EIFI_Strip.push_back(tgcTrig);
1609  }else{
1610  tgcTrigMap_EIFI_Endcap_Wire.push_back(tgcTrig);
1611  tgcTrigMap_EIFI_Wire.push_back(tgcTrig);
1612  }
1613  }else if(data->type() == Muon::TgcCoinData::TYPE_TRACKLET_EIFI && data->isForward()){
1614  if(tgcTrig.isStrip){
1615  tgcTrigMap_EIFI_Forward_Strip.push_back(tgcTrig);
1616  tgcTrigMap_EIFI_Strip.push_back(tgcTrig);
1617  }else{
1618  tgcTrigMap_EIFI_Forward_Wire.push_back(tgcTrig);
1619  tgcTrigMap_EIFI_Wire.push_back(tgcTrig);
1620  }
1621  }
1622  }else{ // inner coincidence, i.e. EI/FI/Tile/BIS78/NSW
1623 
1624  }
1625  }
1626  }
1627  }
1628 
1629 
1630  for(auto& sl : tgcTrigMap_SL){
1631  if( sl.bunch != 0 )continue;
1632  for(auto& inner : tgcTrigRpcMap){
1633  if( sl.isForward == 1 )break;
1634  if( sl.sector != inner.slSector )continue;
1635  inner.roiEta = sl.eta;
1636  inner.roiPhi = sl.phi;
1637  inner.roiNum = sl.roi;
1638  inner.deltaBcid = (sl.bunch==0 && sl.muonMatched==1 && sl.isBiased==0) ? (inner.bcid - sl.bcid) : -999;
1639  inner.deltaTiming = (sl.bunch==0 && sl.muonMatched==1 && sl.isBiased==0) ? (inner.bunch - sl.bunch) : -999;
1640  inner.goodBcid0 = inner.deltaBcid==0;
1641  inner.goodBcid1 = (std::abs(inner.deltaBcid)<=1 || (16-std::abs(inner.deltaBcid))<=1);
1642  inner.goodBcid2 = (std::abs(inner.deltaBcid)<=2 || (16-std::abs(inner.deltaBcid))<=2);
1643  inner.goodTiming = (inner.bunch==sl.bunch && sl.bunch==0 && sl.muonMatched==1 && sl.isBiased==0);
1644  sl.rpc.push_back(&inner);
1645  }
1646  for(auto& inner : tgcTrigNswMap){
1647  if( sl.sector != inner.slSector )continue;
1648  if( sl.isForward != inner.isForward )continue;
1649  inner.deltaR = inner.R - std::abs(getNswRindexFromEta(sl.eta));
1650  inner.roiEta = sl.eta;
1651  inner.roiPhi = sl.phi;
1652  inner.roiNum = sl.roi;
1653  if( std::abs(inner.deltaR) < m_NswDeltaRCut ){
1654  inner.deltaBcid = (sl.bunch==0 && sl.muonMatched==1 && sl.isBiased==0) ? (inner.bcid - sl.bcid) : -999;
1655  inner.deltaTiming = (sl.bunch==0 && sl.muonMatched==1 && sl.isBiased==0) ? (inner.bunch - sl.bunch) : -999;
1656  inner.goodBcid0 = inner.deltaBcid==0;
1657  inner.goodBcid1 = (std::abs(inner.deltaBcid)<=1 || (16-std::abs(inner.deltaBcid))<=1);
1658  inner.goodBcid2 = (std::abs(inner.deltaBcid)<=2 || (16-std::abs(inner.deltaBcid))<=2);
1659  inner.goodTiming = (inner.bunch==sl.bunch && sl.bunch==0 && sl.muonMatched==1 && sl.isBiased==0);
1660  sl.nsw.push_back(&inner);
1661  }
1662  }
1663  for(auto& inner : tgcTrigNswMapUnique){
1664  if( sl.sector != inner.second.slSector )continue;
1665  if( sl.isForward != inner.second.isForward )continue;
1666  inner.second.deltaR = inner.second.R - std::abs(getNswRindexFromEta(sl.eta));
1667  inner.second.roiEta = sl.eta;
1668  inner.second.roiPhi = sl.phi;
1669  inner.second.roiNum = sl.roi;
1670  if( std::abs(inner.second.deltaR) < m_NswDeltaRCut ){
1671  inner.second.deltaBcid = (sl.bunch==0 && sl.muonMatched==1 && sl.isBiased==0) ? (inner.second.bcid - sl.bcid) : -999;
1672  inner.second.deltaTiming = (sl.bunch==0 && sl.muonMatched==1 && sl.isBiased==0) ? (inner.second.bunch - sl.bunch) : -999;
1673  inner.second.goodBcid0 = inner.second.deltaBcid==0;
1674  inner.second.goodBcid1 = (std::abs(inner.second.deltaBcid)<=1 || (16-std::abs(inner.second.deltaBcid))<=1);
1675  inner.second.goodBcid2 = (std::abs(inner.second.deltaBcid)<=2 || (16-std::abs(inner.second.deltaBcid))<=2);
1676  inner.second.goodTiming = (inner.second.bunch==sl.bunch && sl.bunch==0 && sl.muonMatched==1 && sl.isBiased==0);
1677  sl.nsw_unique.push_back(&inner.second);
1678  }
1679  }
1680  for(auto& inner : tgcTrigTileMap){
1681  if( sl.isForward == 1 )break;
1682  if( sl.sector != inner.slSector )continue;
1683  inner.roiEta = sl.eta;
1684  inner.roiPhi = sl.phi;
1685  inner.roiNum = sl.roi;
1686  inner.deltaBcid = (sl.bunch==0 && sl.muonMatched==1 && sl.isBiased==0) ? (inner.bcid - sl.bcid) : -999;
1687  inner.deltaTiming = (sl.bunch==0 && sl.muonMatched==1 && sl.isBiased==0) ? (inner.bunch - sl.bunch) : -999;
1688  inner.goodBcid0 = inner.deltaBcid==0;
1689  inner.goodBcid1 = (std::abs(inner.deltaBcid)<=1 || (16-std::abs(inner.deltaBcid))<=1);
1690  inner.goodBcid2 = (std::abs(inner.deltaBcid)<=2 || (16-std::abs(inner.deltaBcid))<=2);
1691  inner.goodTiming = (inner.bunch==sl.bunch && sl.bunch==0 && sl.muonMatched==1 && sl.isBiased==0);
1692  sl.tile.push_back(&inner);
1693  }
1694  for(auto& inner : tgcTrigEifiMap){
1695  if( sl.isForward == 1 )break;
1696  if( sl.sector != inner.slSector )continue;
1697  inner.roiEta = sl.eta;
1698  inner.roiPhi = sl.phi;
1699  inner.roiNum = sl.roi;
1700  inner.deltaTiming = (sl.bunch==0 && sl.muonMatched==1 && sl.isBiased==0) ? (inner.bunch - sl.bunch) : -999;
1701  inner.goodTiming = (inner.bunch==sl.bunch && sl.bunch==0 && sl.muonMatched==1 && sl.isBiased==0);
1702  sl.eifi.push_back(&inner);
1703  }
1704  }
1705 
1706  std::vector< TgcTrigTile > tgcTrigTileMap_allmods;
1707  for(auto& inner : tgcTrigTileMap){
1708  if(inner.roiNum<0)continue;
1709  for(int i = 0 ; i < 12 ; i++){
1710  TgcTrigTile inner2 = inner;
1711  if((inner.tmdbDecisions>>i) & 0x1){
1712  inner2.tmdbDecisions = (i+3)%3 + 1;
1713  tgcTrigTileMap_allmods.push_back(inner2);
1714  }
1715  }
1716  }
1717 
1718 
1719 
1720  MonVariables tgcCoin_variables;
1721  tgcCoin_variables.push_back(mon_bcid);
1722  tgcCoin_variables.push_back(mon_pileup);
1723  tgcCoin_variables.push_back(mon_lb);
1724 
1725  auto mon_nTgcCoin_detElementIsNull = Monitored::Scalar<int>("nTgcCoinDetElementIsNull", n_TgcCoin_detElementIsNull);
1726  auto mon_nTgcCoin_postOutPtrIsNull = Monitored::Scalar<int>("nTgcCoinPostOutPtrIsNull", n_TgcCoin_postOutPtrIsNull);
1727  auto mon_sectors_endcap = Monitored::Collection("trigger_sectors_endcap", sectors_endcap);
1728  auto mon_sectors_forward = Monitored::Collection("trigger_sectors_forward", sectors_forward);
1729  auto mon_multiplicity_endcap = Monitored::Collection("trigger_multiplicity_endcap", multiplicity_endcap);
1730  auto mon_multiplicity_forward = Monitored::Collection("trigger_multiplicity_forward", multiplicity_forward);
1731  tgcCoin_variables.emplace_back(mon_nTgcCoin_detElementIsNull);
1732  tgcCoin_variables.emplace_back(mon_nTgcCoin_postOutPtrIsNull);
1733  tgcCoin_variables.emplace_back(mon_sectors_endcap);
1734  tgcCoin_variables.emplace_back(mon_sectors_forward);
1735  tgcCoin_variables.emplace_back(mon_multiplicity_endcap);
1736  tgcCoin_variables.emplace_back(mon_multiplicity_forward);
1737 
1738 
1739  std::vector<Monitored::ObjectsCollection<std::vector<TgcTrig>, double>> vo_coin;
1740  vo_coin.reserve(38 * 21);
1741 
1742  fillTgcCoin("SL",tgcTrigMap_SL,vo_coin,tgcCoin_variables);
1743  fillTgcCoin("SL_Endcap",tgcTrigMap_SL_Endcap,vo_coin,tgcCoin_variables);
1744  fillTgcCoin("SL_Forward",tgcTrigMap_SL_Forward,vo_coin,tgcCoin_variables);
1745  fillTgcCoin("HPT_Wire",tgcTrigMap_HPT_Wire,vo_coin,tgcCoin_variables);
1746  fillTgcCoin("HPT_Endcap_Wire",tgcTrigMap_HPT_Endcap_Wire,vo_coin,tgcCoin_variables);
1747  fillTgcCoin("HPT_Forward_Wire",tgcTrigMap_HPT_Forward_Wire,vo_coin,tgcCoin_variables);
1748  fillTgcCoin("HPT_Strip",tgcTrigMap_HPT_Strip,vo_coin,tgcCoin_variables);
1749  fillTgcCoin("HPT_Endcap_Strip",tgcTrigMap_HPT_Endcap_Strip,vo_coin,tgcCoin_variables);
1750  fillTgcCoin("HPT_Forward_Strip",tgcTrigMap_HPT_Forward_Strip,vo_coin,tgcCoin_variables);
1751  fillTgcCoin("LPT_Wire",tgcTrigMap_LPT_Wire,vo_coin,tgcCoin_variables);
1752  fillTgcCoin("LPT_Endcap_Wire",tgcTrigMap_LPT_Endcap_Wire,vo_coin,tgcCoin_variables);
1753  fillTgcCoin("LPT_Forward_Wire",tgcTrigMap_LPT_Forward_Wire,vo_coin,tgcCoin_variables);
1754  fillTgcCoin("LPT_Strip",tgcTrigMap_LPT_Strip,vo_coin,tgcCoin_variables);
1755  fillTgcCoin("LPT_Endcap_Strip",tgcTrigMap_LPT_Endcap_Strip,vo_coin,tgcCoin_variables);
1756  fillTgcCoin("LPT_Forward_Strip",tgcTrigMap_LPT_Forward_Strip,vo_coin,tgcCoin_variables);
1757  fillTgcCoin("EIFI_Wire",tgcTrigMap_EIFI_Wire,vo_coin,tgcCoin_variables);
1758  fillTgcCoin("EIFI_Endcap_Wire",tgcTrigMap_EIFI_Endcap_Wire,vo_coin,tgcCoin_variables);
1759  fillTgcCoin("EIFI_Forward_Wire",tgcTrigMap_EIFI_Forward_Wire,vo_coin,tgcCoin_variables);
1760  fillTgcCoin("EIFI_Strip",tgcTrigMap_EIFI_Strip,vo_coin,tgcCoin_variables);
1761  fillTgcCoin("EIFI_Endcap_Strip",tgcTrigMap_EIFI_Endcap_Strip,vo_coin,tgcCoin_variables);
1762  fillTgcCoin("EIFI_Forward_Strip",tgcTrigMap_EIFI_Forward_Strip,vo_coin,tgcCoin_variables);
1763 
1764  std::vector<Monitored::ObjectsCollection<std::vector<ExtTrigInfo>, double>> vo_exttriginfo;
1765  vo_exttriginfo.reserve(13 * 5);
1766  std::vector<ExtTrigInfo> extTrigInfo_SL;
1767  std::vector<ExtTrigInfo> extTrigInfo_HPT_Wire;
1768  std::vector<ExtTrigInfo> extTrigInfo_HPT_Strip;
1769  std::vector<ExtTrigInfo> extTrigInfo_LPT_Wire;
1770  std::vector<ExtTrigInfo> extTrigInfo_LPT_Strip;
1771  fillTgcCoinEff("SL",tgcTrigMap_SL,extpositions_pivot,extTrigInfo_SL,vo_exttriginfo,tgcCoin_variables);
1772  fillTgcCoinEff("HPT_Wire",tgcTrigMap_HPT_Wire,extpositions_pivot,extTrigInfo_HPT_Wire,vo_exttriginfo,tgcCoin_variables);
1773  fillTgcCoinEff("HPT_Strip",tgcTrigMap_HPT_Strip,extpositions_pivot,extTrigInfo_HPT_Strip,vo_exttriginfo,tgcCoin_variables);
1774  fillTgcCoinEff("LPT_Wire",tgcTrigMap_LPT_Wire,extpositions_pivot,extTrigInfo_LPT_Wire,vo_exttriginfo,tgcCoin_variables);
1775  fillTgcCoinEff("LPT_Strip",tgcTrigMap_LPT_Strip,extpositions_pivot,extTrigInfo_LPT_Strip,vo_exttriginfo,tgcCoin_variables);
1776 
1777  // TGC
1778  auto coin_inner_tgc_roi=Monitored::Collection("coin_inner_tgc_roi",tgcTrigMap_SL,[](const TgcTrig&m){
1779  return m.roi;
1780  });
1781  tgcCoin_variables.push_back(coin_inner_tgc_roi);
1782  auto coin_inner_tgc_sector=Monitored::Collection("coin_inner_tgc_sector",tgcTrigMap_SL,[](const TgcTrig&m){
1783  return (m.bunch==0 && m.muonMatched==1 && m.isBiased==0) ? (m.sector) : -999;
1784  });
1785  tgcCoin_variables.push_back(coin_inner_tgc_sector);
1786  auto coin_inner_tgc_fake_sector=Monitored::Collection("coin_inner_tgc_fake_sector",tgcTrigMap_SL,[](const TgcTrig&m){
1787  return (m.bunch==0 && m.muonMatched==0 && m.loosemuonMatched==0 && m.isBiased==0) ? (m.sector) : -999;
1788  });
1789  tgcCoin_variables.push_back(coin_inner_tgc_fake_sector);
1790 
1791  auto coin_inner_tgc_eta=Monitored::Collection("coin_inner_tgc_eta",tgcTrigMap_SL,[](const TgcTrig&m){
1792  return (m.bunch==0 && m.muonMatched==1 && m.isBiased==0) ? (m.eta) : -999;
1793  });
1794  tgcCoin_variables.push_back(coin_inner_tgc_eta);
1795  auto coin_inner_tgc_phi=Monitored::Collection("coin_inner_tgc_phi",tgcTrigMap_SL,[](const TgcTrig&m){
1796  return (m.bunch==0 && m.muonMatched==1 && m.isBiased==0) ? (m.phi) : -999;
1797  });
1798  tgcCoin_variables.push_back(coin_inner_tgc_phi);
1799 
1800  auto coin_inner_tgc_fake_eta=Monitored::Collection("coin_inner_tgc_fake_eta",tgcTrigMap_SL,[](const TgcTrig&m){
1801  return (m.bunch==0 && m.muonMatched==0 && m.loosemuonMatched==0 && m.isBiased==0) ? (m.eta) : -999;
1802  });
1803  tgcCoin_variables.push_back(coin_inner_tgc_fake_eta);
1804  auto coin_inner_tgc_fake_phi=Monitored::Collection("coin_inner_tgc_fake_phi",tgcTrigMap_SL,[](const TgcTrig&m){
1805  return (m.bunch==0 && m.muonMatched==0 && m.loosemuonMatched==0 && m.isBiased==0) ? (m.phi) : -999;
1806  });
1807  tgcCoin_variables.push_back(coin_inner_tgc_fake_phi);
1808 
1809  auto coin_inner_tgc_forward=Monitored::Collection("coin_inner_tgc_forward",tgcTrigMap_SL,[](const TgcTrig&m){
1810  return m.isForward==1;
1811  });
1812  tgcCoin_variables.push_back(coin_inner_tgc_forward);
1813  auto coin_inner_tgc_endcap=Monitored::Collection("coin_inner_tgc_endcap",tgcTrigMap_SL,[](const TgcTrig&m){
1814  return m.isForward==0;
1815  });
1816  tgcCoin_variables.push_back(coin_inner_tgc_endcap);
1817  auto coin_inner_tgc_etaupto1p3=Monitored::Collection("coin_inner_tgc_etaupto1p3",tgcTrigMap_SL,[](const TgcTrig&m){
1818  return std::abs(m.eta) < 1.3;
1819  });
1820  tgcCoin_variables.push_back(coin_inner_tgc_etaupto1p3);
1821  auto coin_inner_tgc_etafrom1p3_endcap=Monitored::Collection("coin_inner_tgc_etafrom1p3_endcap",tgcTrigMap_SL,[](const TgcTrig&m){
1822  return std::abs(m.eta) > 1.3 && m.isForward==0;
1823  });
1824  tgcCoin_variables.push_back(coin_inner_tgc_etafrom1p3_endcap);
1825 
1826  auto coin_inner_tgc_coinflagEifi=Monitored::Collection("coin_inner_tgc_coinflagEifi",tgcTrigMap_SL,[](const TgcTrig&m){
1827  return (((m.pt>>CoinFlagEI)&0x1)!=0) ? 1.0 : 0.0;
1828  });
1829  tgcCoin_variables.push_back(coin_inner_tgc_coinflagEifi);
1830  auto coin_inner_tgc_coinflagTile=Monitored::Collection("coin_inner_tgc_coinflagTile",tgcTrigMap_SL,[](const TgcTrig&m){
1831  return (((m.pt>>CoinFlagTile)&0x1)!=0) ? 1.0 : 0.0;
1832  });
1833  tgcCoin_variables.push_back(coin_inner_tgc_coinflagTile);
1834  auto coin_inner_tgc_coinflagRpc=Monitored::Collection("coin_inner_tgc_coinflagRpc",tgcTrigMap_SL,[](const TgcTrig&m){
1835  return (((m.pt>>CoinFlagRPC)&0x1)!=0) ? 1.0 : 0.0;
1836  });
1837  tgcCoin_variables.push_back(coin_inner_tgc_coinflagRpc);
1838  auto coin_inner_tgc_coinflagNsw=Monitored::Collection("coin_inner_tgc_coinflagNsw",tgcTrigMap_SL,[](const TgcTrig&m){
1839  return (((m.pt>>CoinFlagNSW)&0x1)!=0) ? 1.0 : 0.0;
1840  });
1841  tgcCoin_variables.push_back(coin_inner_tgc_coinflagNsw);
1842  auto coin_inner_tgc_coinflagC=Monitored::Collection("coin_inner_tgc_coinflagC",tgcTrigMap_SL,[](const TgcTrig&m){
1843  return (((m.pt>>CoinFlagC)&0x1)!=0) ? 1.0 : 0.0;
1844  });
1845  tgcCoin_variables.push_back(coin_inner_tgc_coinflagC);
1846 
1847  // RPC
1848  auto coin_inner_tgc_anyBcRpc=Monitored::Collection("coin_inner_tgc_anyBcRpc",tgcTrigMap_SL,[](const TgcTrig&m) -> double{
1849  return (m.rpc.size()>0);
1850  });
1851  tgcCoin_variables.push_back(coin_inner_tgc_anyBcRpc);
1852  auto coin_inner_tgc_prevBcRpc=Monitored::Collection("coin_inner_tgc_prevBcRpc",tgcTrigMap_SL,[](const TgcTrig&m){
1853  for(const auto& inner : m.rpc){
1854  if(inner->bunch == -1) return 1.;
1855  }
1856  return 0.;
1857  });
1858  tgcCoin_variables.push_back(coin_inner_tgc_prevBcRpc);
1859  auto coin_inner_tgc_currBcRpc=Monitored::Collection("coin_inner_tgc_currBcRpc",tgcTrigMap_SL,[](const TgcTrig&m){
1860  for(const auto& inner : m.rpc){
1861  if(inner->bunch == 0) return 1.;
1862  }
1863  return 0.;
1864  });
1865  tgcCoin_variables.push_back(coin_inner_tgc_currBcRpc);
1866  auto coin_inner_tgc_currBcRpc_goodBcid0=Monitored::Collection("coin_inner_tgc_currBcRpc_goodBcid0",tgcTrigMap_SL,[](const TgcTrig&m){
1867  for(const auto& inner : m.rpc){
1868  if(inner->bunch == 0 && inner->goodBcid0 == 1) return 1.;
1869  }
1870  return 0.;
1871  });
1872  tgcCoin_variables.push_back(coin_inner_tgc_currBcRpc_goodBcid0);
1873  auto coin_inner_tgc_currBcRpc_goodBcid1=Monitored::Collection("coin_inner_tgc_currBcRpc_goodBcid1",tgcTrigMap_SL,[](const TgcTrig&m){
1874  for(const auto& inner : m.rpc){
1875  if(inner->bunch == 0 && inner->goodBcid1 == 1) return 1.;
1876  }
1877  return 0.;
1878  });
1879  tgcCoin_variables.push_back(coin_inner_tgc_currBcRpc_goodBcid1);
1880  auto coin_inner_tgc_currBcRpc_goodBcid2=Monitored::Collection("coin_inner_tgc_currBcRpc_goodBcid2",tgcTrigMap_SL,[](const TgcTrig&m){
1881  for(const auto& inner : m.rpc){
1882  if(inner->bunch == 0 && inner->goodBcid2 == 1) return 1.;
1883  }
1884  return 0.;
1885  });
1886  tgcCoin_variables.push_back(coin_inner_tgc_currBcRpc_goodBcid2);
1887  auto coin_inner_tgc_nextBcRpc=Monitored::Collection("coin_inner_tgc_nextBcRpc",tgcTrigMap_SL,[](const TgcTrig&m){
1888  for(const auto& inner : m.rpc){
1889  if(inner->bunch == 1) return 1.;
1890  }
1891  return 0.;
1892  });
1893  tgcCoin_variables.push_back(coin_inner_tgc_nextBcRpc);
1894  auto coin_inner_tgc_nextnextBcRpc=Monitored::Collection("coin_inner_tgc_nextnextBcRpc",tgcTrigMap_SL,[](const TgcTrig&m){
1895  for(const auto& inner : m.rpc){
1896  if(inner->bunch == 2) return 1.;
1897  }
1898  return 0.;
1899  });
1900  tgcCoin_variables.push_back(coin_inner_tgc_nextnextBcRpc);
1901 
1902  auto coin_inner_tgc_prevBcRpc_goodBcid0=Monitored::Collection("coin_inner_tgc_prevBcRpc_goodBcid0",tgcTrigMap_SL,[](const TgcTrig&m){
1903  for(const auto& inner : m.rpc){
1904  if(inner->bunch == -1 && inner->goodBcid0 == 1) return 1.;
1905  }
1906  return 0.;
1907  });
1908  tgcCoin_variables.push_back(coin_inner_tgc_prevBcRpc_goodBcid0);
1909  auto coin_inner_tgc_nextBcRpc_goodBcid0=Monitored::Collection("coin_inner_tgc_nextBcRpc_goodBcid0",tgcTrigMap_SL,[](const TgcTrig&m){
1910  for(const auto& inner : m.rpc){
1911  if(inner->bunch == 1 && inner->goodBcid0 == 1) return 1.;
1912  }
1913  return 0.;
1914  });
1915  tgcCoin_variables.push_back(coin_inner_tgc_nextBcRpc_goodBcid0);
1916  auto coin_inner_tgc_nextnextBcRpc_goodBcid0=Monitored::Collection("coin_inner_tgc_nextnextBcRpc_goodBcid0",tgcTrigMap_SL,[](const TgcTrig&m){
1917  for(const auto& inner : m.rpc){
1918  if(inner->bunch == 2 && inner->goodBcid0 == 1) return 1.;
1919  }
1920  return 0.;
1921  });
1922  tgcCoin_variables.push_back(coin_inner_tgc_nextnextBcRpc_goodBcid0);
1923 
1924  // NSW
1925  auto coin_inner_tgc_anyBcNsw=Monitored::Collection("coin_inner_tgc_anyBcNsw",tgcTrigMap_SL,[](const TgcTrig&m) -> double{
1926  return (m.nsw.size()>0);
1927  });
1928  tgcCoin_variables.push_back(coin_inner_tgc_anyBcNsw);
1929  auto coin_inner_tgc_prevBcNsw=Monitored::Collection("coin_inner_tgc_prevBcNsw",tgcTrigMap_SL,[](const TgcTrig&m){
1930  for(const auto& inner : m.nsw){
1931  if(inner->bunch == -1) return 1.;
1932  }
1933  return 0.;
1934  });
1935  tgcCoin_variables.push_back(coin_inner_tgc_prevBcNsw);
1936  auto coin_inner_tgc_currBcNsw=Monitored::Collection("coin_inner_tgc_currBcNsw",tgcTrigMap_SL,[](const TgcTrig&m){
1937  for(const auto& inner : m.nsw){
1938  if(inner->bunch == 0) return 1.;
1939  }
1940  return 0.;
1941  });
1942  tgcCoin_variables.push_back(coin_inner_tgc_currBcNsw);
1943  auto coin_inner_tgc_currBcNsw_goodBcid0=Monitored::Collection("coin_inner_tgc_currBcNsw_goodBcid0",tgcTrigMap_SL,[](const TgcTrig&m){
1944  for(const auto& inner : m.nsw){
1945  if(inner->bunch == 0 && inner->goodBcid0 == 1) return 1.;
1946  }
1947  return 0.;
1948  });
1949  tgcCoin_variables.push_back(coin_inner_tgc_currBcNsw_goodBcid0);
1950  auto coin_inner_tgc_currBcNsw_goodBcid1=Monitored::Collection("coin_inner_tgc_currBcNsw_goodBcid1",tgcTrigMap_SL,[](const TgcTrig&m){
1951  for(const auto& inner : m.nsw){
1952  if(inner->bunch == 0 && inner->goodBcid1 == 1) return 1.;
1953  }
1954  return 0.;
1955  });
1956  tgcCoin_variables.push_back(coin_inner_tgc_currBcNsw_goodBcid1);
1957  auto coin_inner_tgc_currBcNsw_goodBcid2=Monitored::Collection("coin_inner_tgc_currBcNsw_goodBcid2",tgcTrigMap_SL,[](const TgcTrig&m){
1958  for(const auto& inner : m.nsw){
1959  if(inner->bunch == 0 && inner->goodBcid2 == 1) return 1.;
1960  }
1961  return 0.;
1962  });
1963  tgcCoin_variables.push_back(coin_inner_tgc_currBcNsw_goodBcid2);
1964  auto coin_inner_tgc_nextBcNsw=Monitored::Collection("coin_inner_tgc_nextBcNsw",tgcTrigMap_SL,[](const TgcTrig&m){
1965  for(const auto& inner : m.nsw){
1966  if(inner->bunch == 1) return 1.;
1967  }
1968  return 0.;
1969  });
1970  tgcCoin_variables.push_back(coin_inner_tgc_nextBcNsw);
1971  auto coin_inner_tgc_nextnextBcNsw=Monitored::Collection("coin_inner_tgc_nextnextBcNsw",tgcTrigMap_SL,[](const TgcTrig&m){
1972  for(const auto& inner : m.nsw){
1973  if(inner->bunch == 2) return 1.;
1974  }
1975  return 0.;
1976  });
1977  tgcCoin_variables.push_back(coin_inner_tgc_nextnextBcNsw);
1978 
1979  auto coin_inner_tgc_prevBcNsw_goodBcid0=Monitored::Collection("coin_inner_tgc_prevBcNsw_goodBcid0",tgcTrigMap_SL,[](const TgcTrig&m){
1980  for(const auto& inner : m.nsw){
1981  if(inner->bunch == -1 && inner->goodBcid0 == 1) return 1.;
1982  }
1983  return 0.;
1984  });
1985  tgcCoin_variables.push_back(coin_inner_tgc_prevBcNsw_goodBcid0);
1986  auto coin_inner_tgc_nextBcNsw_goodBcid0=Monitored::Collection("coin_inner_tgc_nextBcNsw_goodBcid0",tgcTrigMap_SL,[](const TgcTrig&m){
1987  for(const auto& inner : m.nsw){
1988  if(inner->bunch == 1 && inner->goodBcid0 == 1) return 1.;
1989  }
1990  return 0.;
1991  });
1992  tgcCoin_variables.push_back(coin_inner_tgc_nextBcNsw_goodBcid0);
1993  auto coin_inner_tgc_nextnextBcNsw_goodBcid0=Monitored::Collection("coin_inner_tgc_nextnextBcNsw_goodBcid0",tgcTrigMap_SL,[](const TgcTrig&m){
1994  for(const auto& inner : m.nsw){
1995  if(inner->bunch == 2 && inner->goodBcid0 == 1) return 1.;
1996  }
1997  return 0.;
1998  });
1999  tgcCoin_variables.push_back(coin_inner_tgc_nextnextBcNsw_goodBcid0);
2000  auto coin_inner_tgc_Nsw_bcmask1=Monitored::Collection("coin_inner_tgc_Nsw_bcmask1",tgcTrigMap_SL,[](const TgcTrig&m){
2001  for(const auto& inner : m.nsw_unique){
2002  if(inner->bcmask==1) return 1.;
2003  }
2004  return 0.;
2005  });
2006  tgcCoin_variables.push_back(coin_inner_tgc_Nsw_bcmask1);
2007  auto coin_inner_tgc_Nsw_bcmask2=Monitored::Collection("coin_inner_tgc_Nsw_bcmask2",tgcTrigMap_SL,[](const TgcTrig&m){
2008  for(const auto& inner : m.nsw_unique){
2009  if(inner->bcmask==2) return 1.;
2010  }
2011  return 0.;
2012  });
2013  tgcCoin_variables.push_back(coin_inner_tgc_Nsw_bcmask2);
2014  auto coin_inner_tgc_Nsw_bcmask3=Monitored::Collection("coin_inner_tgc_Nsw_bcmask3",tgcTrigMap_SL,[](const TgcTrig&m){
2015  for(const auto& inner : m.nsw_unique){
2016  if(inner->bcmask==3) return 1.;
2017  }
2018  return 0.;
2019  });
2020  tgcCoin_variables.push_back(coin_inner_tgc_Nsw_bcmask3);
2021  auto coin_inner_tgc_Nsw_bcmask4=Monitored::Collection("coin_inner_tgc_Nsw_bcmask4",tgcTrigMap_SL,[](const TgcTrig&m){
2022  for(const auto& inner : m.nsw_unique){
2023  if(inner->bcmask==4) return 1.;
2024  }
2025  return 0.;
2026  });
2027  tgcCoin_variables.push_back(coin_inner_tgc_Nsw_bcmask4);
2028  auto coin_inner_tgc_Nsw_bcmask5=Monitored::Collection("coin_inner_tgc_Nsw_bcmask5",tgcTrigMap_SL,[](const TgcTrig&m){
2029  for(const auto& inner : m.nsw_unique){
2030  if(inner->bcmask==5) return 1.;
2031  }
2032  return 0.;
2033  });
2034  tgcCoin_variables.push_back(coin_inner_tgc_Nsw_bcmask5);
2035  auto coin_inner_tgc_Nsw_bcmask6=Monitored::Collection("coin_inner_tgc_Nsw_bcmask6",tgcTrigMap_SL,[](const TgcTrig&m){
2036  for(const auto& inner : m.nsw_unique){
2037  if(inner->bcmask==6) return 1.;
2038  }
2039  return 0.;
2040  });
2041  tgcCoin_variables.push_back(coin_inner_tgc_Nsw_bcmask6);
2042  auto coin_inner_tgc_Nsw_bcmask7=Monitored::Collection("coin_inner_tgc_Nsw_bcmask7",tgcTrigMap_SL,[](const TgcTrig&m){
2043  for(const auto& inner : m.nsw_unique){
2044  if(inner->bcmask==7) return 1.;
2045  }
2046  return 0.;
2047  });
2048  tgcCoin_variables.push_back(coin_inner_tgc_Nsw_bcmask7);
2049 
2050  // Tile
2051  auto coin_inner_tgc_anyBcTile=Monitored::Collection("coin_inner_tgc_anyBcTile",tgcTrigMap_SL,[](const TgcTrig&m) -> double{
2052  return (m.tile.size()>0);
2053  });
2054  tgcCoin_variables.push_back(coin_inner_tgc_anyBcTile);
2055  auto coin_inner_tgc_prevBcTile=Monitored::Collection("coin_inner_tgc_prevBcTile",tgcTrigMap_SL,[](const TgcTrig&m){
2056  for(const auto& inner : m.tile){
2057  if(inner->bunch == -1) return 1.;
2058  }
2059  return 0.;
2060  });
2061  tgcCoin_variables.push_back(coin_inner_tgc_prevBcTile);
2062  auto coin_inner_tgc_currBcTile=Monitored::Collection("coin_inner_tgc_currBcTile",tgcTrigMap_SL,[](const TgcTrig&m){
2063  for(const auto& inner : m.tile){
2064  if(inner->bunch == 0) return 1.;
2065  }
2066  return 0.;
2067  });
2068  tgcCoin_variables.push_back(coin_inner_tgc_currBcTile);
2069  auto coin_inner_tgc_currBcTile_goodBcid0=Monitored::Collection("coin_inner_tgc_currBcTile_goodBcid0",tgcTrigMap_SL,[](const TgcTrig&m){
2070  for(const auto& inner : m.tile){
2071  if(inner->bunch == 0 && inner->goodBcid0 == 1) return 1.;
2072  }
2073  return 0.;
2074  });
2075  tgcCoin_variables.push_back(coin_inner_tgc_currBcTile_goodBcid0);
2076  auto coin_inner_tgc_currBcTile_goodBcid1=Monitored::Collection("coin_inner_tgc_currBcTile_goodBcid1",tgcTrigMap_SL,[](const TgcTrig&m){
2077  for(const auto& inner : m.tile){
2078  if(inner->bunch == 0 && inner->goodBcid1 == 1) return 1.;
2079  }
2080  return 0.;
2081  });
2082  tgcCoin_variables.push_back(coin_inner_tgc_currBcTile_goodBcid1);
2083  auto coin_inner_tgc_currBcTile_goodBcid2=Monitored::Collection("coin_inner_tgc_currBcTile_goodBcid2",tgcTrigMap_SL,[](const TgcTrig&m){
2084  for(const auto& inner : m.tile){
2085  if(inner->bunch == 0 && inner->goodBcid2 == 1) return 1.;
2086  }
2087  return 0.;
2088  });
2089  tgcCoin_variables.push_back(coin_inner_tgc_currBcTile_goodBcid2);
2090  auto coin_inner_tgc_nextBcTile=Monitored::Collection("coin_inner_tgc_nextBcTile",tgcTrigMap_SL,[](const TgcTrig&m){
2091  for(const auto& inner : m.tile){
2092  if(inner->bunch == 1) return 1.;
2093  }
2094  return 0.;
2095  });
2096  tgcCoin_variables.push_back(coin_inner_tgc_nextBcTile);
2097  auto coin_inner_tgc_nextnextBcTile=Monitored::Collection("coin_inner_tgc_nextnextBcTile",tgcTrigMap_SL,[](const TgcTrig&m){
2098  for(const auto inner : m.tile){
2099  if(inner->bunch == 2) return 1.;
2100  }
2101  return 0.;
2102  });
2103  tgcCoin_variables.push_back(coin_inner_tgc_nextnextBcTile);
2104 
2105  auto coin_inner_tgc_prevBcTile_goodBcid0=Monitored::Collection("coin_inner_tgc_prevBcTile_goodBcid0",tgcTrigMap_SL,[](const TgcTrig&m){
2106  for(const auto& inner : m.tile){
2107  if(inner->bunch == -1 && inner->goodBcid0 == 1) return 1.;
2108  }
2109  return 0.;
2110  });
2111  tgcCoin_variables.push_back(coin_inner_tgc_prevBcTile_goodBcid0);
2112  auto coin_inner_tgc_nextBcTile_goodBcid0=Monitored::Collection("coin_inner_tgc_nextBcTile_goodBcid0",tgcTrigMap_SL,[](const TgcTrig&m){
2113  for(const auto& inner : m.tile){
2114  if(inner->bunch == 1 && inner->goodBcid0 == 1) return 1.;
2115  }
2116  return 0.;
2117  });
2118  tgcCoin_variables.push_back(coin_inner_tgc_nextBcTile_goodBcid0);
2119  auto coin_inner_tgc_nextnextBcTile_goodBcid0=Monitored::Collection("coin_inner_tgc_nextnextBcTile_goodBcid0",tgcTrigMap_SL,[](const TgcTrig&m){
2120  for(const auto inner : m.tile){
2121  if(inner->bunch == 2 && inner->goodBcid0 == 1) return 1.;
2122  }
2123  return 0.;
2124  });
2125  tgcCoin_variables.push_back(coin_inner_tgc_nextnextBcTile_goodBcid0);
2126 
2127  // EIFI
2128  auto coin_inner_tgc_anyBcEifi=Monitored::Collection("coin_inner_tgc_anyBcEifi",tgcTrigMap_SL,[](const TgcTrig&m) -> double{
2129  return (m.eifi.size()>0);
2130  });
2131  tgcCoin_variables.push_back(coin_inner_tgc_anyBcEifi);
2132  auto coin_inner_tgc_prevBcEifi=Monitored::Collection("coin_inner_tgc_prevBcEifi",tgcTrigMap_SL,[](const TgcTrig&m){
2133  for(const auto& inner : m.eifi){
2134  if(inner->bunch == -1) return 1.;
2135  }
2136  return 0.;
2137  });
2138  tgcCoin_variables.push_back(coin_inner_tgc_prevBcEifi);
2139  auto coin_inner_tgc_currBcEifi=Monitored::Collection("coin_inner_tgc_currBcEifi",tgcTrigMap_SL,[](const TgcTrig&m){
2140  for(const auto& inner : m.eifi){
2141  if(inner->bunch == 0) return 1.;
2142  }
2143  return 0.;
2144  });
2145  tgcCoin_variables.push_back(coin_inner_tgc_currBcEifi);
2146  auto coin_inner_tgc_nextBcEifi=Monitored::Collection("coin_inner_tgc_nextBcEifi",tgcTrigMap_SL,[](const TgcTrig&m){
2147  for(const auto& inner : m.eifi){
2148  if(inner->bunch == 1) return 1.;
2149  }
2150  return 0.;
2151  });
2152  tgcCoin_variables.push_back(coin_inner_tgc_nextBcEifi);
2153  auto coin_inner_tgc_nextnextBcEifi=Monitored::Collection("coin_inner_tgc_nextnextBcEifi",tgcTrigMap_SL,[](const TgcTrig&m){
2154  for(const auto inner : m.eifi){
2155  if(inner->bunch == 2) return 1.;
2156  }
2157  return 0.;
2158  });
2159  tgcCoin_variables.push_back(coin_inner_tgc_nextnextBcEifi);
2160 
2161 
2162  // RPC BIS78 inner coincidence
2163  auto coin_inner_rpc_slSector=Monitored::Collection("coin_inner_rpc_slSector",tgcTrigRpcMap,[](const TgcTrigRpc&m){
2164  return m.slSector;
2165  });
2166  tgcCoin_variables.push_back(coin_inner_rpc_slSector);
2167  auto coin_inner_rpc_slSector_goodTiming=Monitored::Collection("coin_inner_rpc_slSector_goodTiming",tgcTrigRpcMap,[](const TgcTrigRpc&m){
2168  return (m.goodTiming) ? m.slSector : -999;
2169  });
2170  tgcCoin_variables.push_back(coin_inner_rpc_slSector_goodTiming);
2171  auto coin_inner_rpc_roiEta=Monitored::Collection("coin_inner_rpc_roiEta",tgcTrigRpcMap,[](const TgcTrigRpc&m){
2172  return m.roiEta;
2173  });
2174  tgcCoin_variables.push_back(coin_inner_rpc_roiEta);
2175  auto coin_inner_rpc_roiPhi=Monitored::Collection("coin_inner_rpc_roiPhi",tgcTrigRpcMap,[](const TgcTrigRpc&m){
2176  return m.roiPhi;
2177  });
2178  tgcCoin_variables.push_back(coin_inner_rpc_roiPhi);
2179  auto coin_inner_rpc_roiNum=Monitored::Collection("coin_inner_rpc_roiNum",tgcTrigRpcMap,[](const TgcTrigRpc&m){
2180  return m.roiNum;
2181  });
2182  tgcCoin_variables.push_back(coin_inner_rpc_roiNum);
2183  auto coin_inner_rpc_deltaBcid=Monitored::Collection("coin_inner_rpc_deltaBcid",tgcTrigRpcMap,[](const TgcTrigRpc&m){
2184  return m.deltaBcid;
2185  });
2186  tgcCoin_variables.push_back(coin_inner_rpc_deltaBcid);
2187  auto coin_inner_rpc_deltaTiming=Monitored::Collection("coin_inner_rpc_deltaTiming",tgcTrigRpcMap,[](const TgcTrigRpc&m){
2188  return m.deltaTiming;
2189  });
2190  tgcCoin_variables.push_back(coin_inner_rpc_deltaTiming);
2191  auto coin_inner_rpc_rpcEta=Monitored::Collection("coin_inner_rpc_rpcEta",tgcTrigRpcMap,[](const TgcTrigRpc&m){
2192  return m.rpcEta;
2193  });
2194  tgcCoin_variables.push_back(coin_inner_rpc_rpcEta);
2195  auto coin_inner_rpc_rpcPhi=Monitored::Collection("coin_inner_rpc_rpcPhi",tgcTrigRpcMap,[](const TgcTrigRpc&m){
2196  return m.rpcPhi;
2197  });
2198  tgcCoin_variables.push_back(coin_inner_rpc_rpcPhi);
2199  auto coin_inner_rpc_rpcDEta=Monitored::Collection("coin_inner_rpc_rpcDEta",tgcTrigRpcMap,[](const TgcTrigRpc&m){
2200  return m.rpcDEta;
2201  });
2202  tgcCoin_variables.push_back(coin_inner_rpc_rpcDEta);
2203  auto coin_inner_rpc_rpcDPhi=Monitored::Collection("coin_inner_rpc_rpcDPhi",tgcTrigRpcMap,[](const TgcTrigRpc&m){
2204  return m.rpcDPhi;
2205  });
2206  tgcCoin_variables.push_back(coin_inner_rpc_rpcDPhi);
2207  auto coin_inner_rpc_currBc=Monitored::Collection("coin_inner_rpc_currBc",tgcTrigRpcMap,[](const TgcTrigRpc&m){
2208  return m.currBc;
2209  });
2210  tgcCoin_variables.push_back(coin_inner_rpc_currBc);
2211  auto coin_inner_rpc_goodBcid0=Monitored::Collection("coin_inner_rpc_goodBcid0",tgcTrigRpcMap,[](const TgcTrigRpc&m){
2212  return m.goodBcid0;
2213  });
2214  tgcCoin_variables.push_back(coin_inner_rpc_goodBcid0);
2215  auto coin_inner_rpc_goodBcid1=Monitored::Collection("coin_inner_rpc_goodBcid1",tgcTrigRpcMap,[](const TgcTrigRpc&m){
2216  return m.goodBcid1;
2217  });
2218  tgcCoin_variables.push_back(coin_inner_rpc_goodBcid1);
2219  auto coin_inner_rpc_goodBcid2=Monitored::Collection("coin_inner_rpc_goodBcid2",tgcTrigRpcMap,[](const TgcTrigRpc&m){
2220  return m.goodBcid2;
2221  });
2222  tgcCoin_variables.push_back(coin_inner_rpc_goodBcid2);
2223  auto coin_inner_rpc_goodTiming=Monitored::Collection("coin_inner_rpc_goodTiming",tgcTrigRpcMap,[](const TgcTrigRpc&m){
2224  return m.goodTiming;
2225  });
2226  tgcCoin_variables.push_back(coin_inner_rpc_goodTiming);
2227 
2228 
2229  // NSW inner coincidence
2230  auto coin_inner_nsw_deltaR=Monitored::Collection("coin_inner_nsw_deltaR",tgcTrigNswMap,[](const TgcTrigNsw&m){
2231  return m.deltaR;
2232  });
2233  tgcCoin_variables.push_back(coin_inner_nsw_deltaR);
2234  auto coin_inner_nsw_slSector=Monitored::Collection("coin_inner_nsw_slSector",tgcTrigNswMap,[](const TgcTrigNsw&m){
2235  return m.slSector;
2236  });
2237  tgcCoin_variables.push_back(coin_inner_nsw_slSector);
2238  auto coin_inner_nsw_slSector_goodTiming=Monitored::Collection("coin_inner_nsw_slSector_goodTiming",tgcTrigNswMap,[](const TgcTrigNsw&m){
2239  return (m.goodTiming) ? m.slSector : -999;
2240  });
2241  tgcCoin_variables.push_back(coin_inner_nsw_slSector_goodTiming);
2242  auto coin_inner_nsw_slSector_endcap=Monitored::Collection("coin_inner_nsw_slSector_endcap",tgcTrigNswMap,[](const TgcTrigNsw&m){
2243  return (std::abs(m.roiEta)>1.3 && m.isForward==0) ? m.slSector : -999;
2244  });
2245  tgcCoin_variables.push_back(coin_inner_nsw_slSector_endcap);
2246  auto coin_inner_nsw_slSector_forward=Monitored::Collection("coin_inner_nsw_slSector_forward",tgcTrigNswMap,[](const TgcTrigNsw&m){
2247  return (m.isForward==1) ? m.slSector : -999;
2248  });
2249  tgcCoin_variables.push_back(coin_inner_nsw_slSector_forward);
2250  auto coin_inner_nsw_slSector_goodTiming_endcap=Monitored::Collection("coin_inner_nsw_slSector_goodTiming_endcap",tgcTrigNswMap,[](const TgcTrigNsw&m){
2251  return (std::abs(m.roiEta)>1.3 && m.isForward==0 && m.goodTiming) ? m.slSector : -999;
2252  });
2253  tgcCoin_variables.push_back(coin_inner_nsw_slSector_goodTiming_endcap);
2254  auto coin_inner_nsw_slSector_goodTiming_forward=Monitored::Collection("coin_inner_nsw_slSector_goodTiming_forward",tgcTrigNswMap,[](const TgcTrigNsw&m){
2255  return (m.isForward==1 && m.goodTiming) ? m.slSector : -999;
2256  });
2257  tgcCoin_variables.push_back(coin_inner_nsw_slSector_goodTiming_forward);
2258  auto coin_inner_nsw_roiEta=Monitored::Collection("coin_inner_nsw_roiEta",tgcTrigNswMap,[](const TgcTrigNsw&m){
2259  return m.roiEta;
2260  });
2261  tgcCoin_variables.push_back(coin_inner_nsw_roiEta);
2262  auto coin_inner_nsw_roiPhi=Monitored::Collection("coin_inner_nsw_roiPhi",tgcTrigNswMap,[](const TgcTrigNsw&m){
2263  return m.roiPhi;
2264  });
2265  tgcCoin_variables.push_back(coin_inner_nsw_roiPhi);
2266  auto coin_inner_nsw_roiNum=Monitored::Collection("coin_inner_nsw_roiNum",tgcTrigNswMap,[](const TgcTrigNsw&m){
2267  return m.roiNum;
2268  });
2269  tgcCoin_variables.push_back(coin_inner_nsw_roiNum);
2270  auto coin_inner_nsw_deltaBcid=Monitored::Collection("coin_inner_nsw_deltaBcid",tgcTrigNswMap,[](const TgcTrigNsw&m){
2271  return m.deltaBcid;
2272  });
2273  tgcCoin_variables.push_back(coin_inner_nsw_deltaBcid);
2274  auto coin_inner_nsw_deltaTiming=Monitored::Collection("coin_inner_nsw_deltaTiming",tgcTrigNswMap,[](const TgcTrigNsw&m){
2275  return m.deltaTiming;
2276  });
2277  tgcCoin_variables.push_back(coin_inner_nsw_deltaTiming);
2278  auto coin_inner_nsw_R=Monitored::Collection("coin_inner_nsw_R",tgcTrigNswMap,[](const TgcTrigNsw&m){
2279  return m.R;
2280  });
2281  tgcCoin_variables.push_back(coin_inner_nsw_R);
2282  auto coin_inner_nsw_Phi=Monitored::Collection("coin_inner_nsw_Phi",tgcTrigNswMap,[](const TgcTrigNsw&m){
2283  return m.Phi;
2284  });
2285  tgcCoin_variables.push_back(coin_inner_nsw_Phi);
2286  auto coin_inner_nsw_deltaTheta=Monitored::Collection("coin_inner_nsw_deltaTheta",tgcTrigNswMap,[](const TgcTrigNsw&m){
2287  return m.deltaTheta;
2288  });
2289  tgcCoin_variables.push_back(coin_inner_nsw_deltaTheta);
2290  auto coin_inner_nsw_isForward=Monitored::Collection("coin_inner_nsw_isForward",tgcTrigNswMap,[](const TgcTrigNsw&m){
2291  return m.isForward==1;
2292  });
2293  tgcCoin_variables.push_back(coin_inner_nsw_isForward);
2294  auto coin_inner_nsw_isEndcap=Monitored::Collection("coin_inner_nsw_isEndcap",tgcTrigNswMap,[](const TgcTrigNsw&m){
2295  return m.isForward==0;
2296  });
2297  tgcCoin_variables.push_back(coin_inner_nsw_isEndcap);
2298  auto coin_inner_nsw_currBc=Monitored::Collection("coin_inner_nsw_currBc",tgcTrigNswMap,[](const TgcTrigNsw&m){
2299  return m.currBc;
2300  });
2301  tgcCoin_variables.push_back(coin_inner_nsw_currBc);
2302  auto coin_inner_nsw_endcap_currBc=Monitored::Collection("coin_inner_nsw_endcap_currBc",tgcTrigNswMap,[](const TgcTrigNsw&m){
2303  return (m.isForward==0 && m.currBc==1);
2304  });
2305  tgcCoin_variables.push_back(coin_inner_nsw_endcap_currBc);
2306  auto coin_inner_nsw_forward_currBc=Monitored::Collection("coin_inner_nsw_forward_currBc",tgcTrigNswMap,[](const TgcTrigNsw&m){
2307  return (m.isForward==1 && m.currBc==1);
2308  });
2309  tgcCoin_variables.push_back(coin_inner_nsw_forward_currBc);
2310  auto coin_inner_nsw_goodBcid0=Monitored::Collection("coin_inner_nsw_goodBcid0",tgcTrigNswMap,[](const TgcTrigNsw&m){
2311  return m.goodBcid0;
2312  });
2313  tgcCoin_variables.push_back(coin_inner_nsw_goodBcid0);
2314  auto coin_inner_nsw_goodBcid1=Monitored::Collection("coin_inner_nsw_goodBcid1",tgcTrigNswMap,[](const TgcTrigNsw&m){
2315  return m.goodBcid1;
2316  });
2317  tgcCoin_variables.push_back(coin_inner_nsw_goodBcid1);
2318  auto coin_inner_nsw_goodBcid2=Monitored::Collection("coin_inner_nsw_goodBcid2",tgcTrigNswMap,[](const TgcTrigNsw&m){
2319  return m.goodBcid2;
2320  });
2321  tgcCoin_variables.push_back(coin_inner_nsw_goodBcid2);
2322  auto coin_inner_nsw_goodTiming=Monitored::Collection("coin_inner_nsw_goodTiming",tgcTrigNswMap,[](const TgcTrigNsw&m){
2323  return m.goodTiming;
2324  });
2325  tgcCoin_variables.push_back(coin_inner_nsw_goodTiming);
2326 
2327  auto coin_inner_nsw_slInputIndex=Monitored::Collection("coin_inner_nsw_slInputIndex",tgcTrigNswMap,[](const TgcTrigNsw&m){
2328  return m.slInputIndex;
2329  });
2330  tgcCoin_variables.push_back(coin_inner_nsw_slInputIndex);
2331  auto coin_inner_nsw_slInputIndex_AEndcap=Monitored::Collection("coin_inner_nsw_slInputIndex_AEndcap",tgcTrigNswMap,[](const TgcTrigNsw&m){
2332  return (m.isAside==1 && m.isForward==0) ? m.slInputIndex : -999;
2333  });
2334  tgcCoin_variables.push_back(coin_inner_nsw_slInputIndex_AEndcap);
2335  auto coin_inner_nsw_slInputIndex_CEndcap=Monitored::Collection("coin_inner_nsw_slInputIndex_CEndcap",tgcTrigNswMap,[](const TgcTrigNsw&m){
2336  return (m.isAside==0 && m.isForward==0) ? m.slInputIndex : -999;
2337  });
2338  tgcCoin_variables.push_back(coin_inner_nsw_slInputIndex_CEndcap);
2339  auto coin_inner_nsw_slInputIndex_AForward=Monitored::Collection("coin_inner_nsw_slInputIndex_AForward",tgcTrigNswMap,[](const TgcTrigNsw&m){
2340  return (m.isAside==1 && m.isForward==1) ? m.slInputIndex : -999;
2341  });
2342  tgcCoin_variables.push_back(coin_inner_nsw_slInputIndex_AForward);
2343  auto coin_inner_nsw_slInputIndex_CForward=Monitored::Collection("coin_inner_nsw_slInputIndex_CForward",tgcTrigNswMap,[](const TgcTrigNsw&m){
2344  return (m.isAside==0 && m.isForward==1) ? m.slInputIndex : -999;
2345  });
2346  tgcCoin_variables.push_back(coin_inner_nsw_slInputIndex_CForward);
2347 
2348  auto coin_inner_nsw_goodTimingBcid0=Monitored::Collection("coin_inner_nsw_goodTimingBcid0",tgcTrigNswMap,[](const TgcTrigNsw&m){
2349  return (m.goodTiming==1 && m.goodBcid0==1);
2350  });
2351  tgcCoin_variables.push_back(coin_inner_nsw_goodTimingBcid0);
2352  auto coin_inner_nsw_goodTimingBcid1=Monitored::Collection("coin_inner_nsw_goodTimingBcid1",tgcTrigNswMap,[](const TgcTrigNsw&m){
2353  return (m.goodTiming==1 && m.goodBcid1==1);
2354  });
2355  tgcCoin_variables.push_back(coin_inner_nsw_goodTimingBcid1);
2356  auto coin_inner_nsw_goodTimingBcid2=Monitored::Collection("coin_inner_nsw_goodTimingBcid2",tgcTrigNswMap,[](const TgcTrigNsw&m){
2357  return (m.goodTiming==1 && m.goodBcid2==1);
2358  });
2359  tgcCoin_variables.push_back(coin_inner_nsw_goodTimingBcid2);
2360  auto coin_inner_nsw_BcPrev=Monitored::Collection("coin_inner_nsw_BcPrev",tgcTrigNswMap,[](const TgcTrigNsw&m){
2361  return m.deltaTiming==-1;
2362  });
2363  tgcCoin_variables.push_back(coin_inner_nsw_BcPrev);
2364  auto coin_inner_nsw_BcCurr=Monitored::Collection("coin_inner_nsw_BcCurr",tgcTrigNswMap,[](const TgcTrigNsw&m){
2365  return m.deltaTiming==0;
2366  });
2367  tgcCoin_variables.push_back(coin_inner_nsw_BcCurr);
2368  auto coin_inner_nsw_BcNext=Monitored::Collection("coin_inner_nsw_BcNext",tgcTrigNswMap,[](const TgcTrigNsw&m){
2369  return m.deltaTiming==1;
2370  });
2371  tgcCoin_variables.push_back(coin_inner_nsw_BcNext);
2372  auto coin_inner_nsw_BcNextNext=Monitored::Collection("coin_inner_nsw_BcNextNext",tgcTrigNswMap,[](const TgcTrigNsw&m){
2373  return m.deltaTiming==2;
2374  });
2375  tgcCoin_variables.push_back(coin_inner_nsw_BcNextNext);
2376 
2377  // Tile inner coincidence
2378  auto coin_inner_tile_slSector=Monitored::Collection("coin_inner_tile_slSector",tgcTrigTileMap,[](const TgcTrigTile&m){
2379  return m.slSector;
2380  });
2381  tgcCoin_variables.push_back(coin_inner_tile_slSector);
2382  auto coin_inner_tile_slSector_goodTiming=Monitored::Collection("coin_inner_tile_slSector_goodTiming",tgcTrigTileMap,[](const TgcTrigTile&m){
2383  return (m.goodTiming) ? m.slSector : -999;
2384  });
2385  tgcCoin_variables.push_back(coin_inner_tile_slSector_goodTiming);
2386  auto coin_inner_tile_roiEta=Monitored::Collection("coin_inner_tile_roiEta",tgcTrigTileMap,[](const TgcTrigTile&m){
2387  return m.roiEta;
2388  });
2389  tgcCoin_variables.push_back(coin_inner_tile_roiEta);
2390  auto coin_inner_tile_roiPhi=Monitored::Collection("coin_inner_tile_roiPhi",tgcTrigTileMap,[](const TgcTrigTile&m){
2391  return m.roiPhi;
2392  });
2393  tgcCoin_variables.push_back(coin_inner_tile_roiPhi);
2394  auto coin_inner_tile_roiNum=Monitored::Collection("coin_inner_tile_roiNum",tgcTrigTileMap,[](const TgcTrigTile&m){
2395  return m.roiNum;
2396  });
2397  tgcCoin_variables.push_back(coin_inner_tile_roiNum);
2398  auto coin_inner_tile_deltaBcid=Monitored::Collection("coin_inner_tile_deltaBcid",tgcTrigTileMap,[](const TgcTrigTile&m){
2399  return m.deltaBcid;
2400  });
2401  tgcCoin_variables.push_back(coin_inner_tile_deltaBcid);
2402  auto coin_inner_tile_deltaTiming=Monitored::Collection("coin_inner_tile_deltaTiming",tgcTrigTileMap,[](const TgcTrigTile&m){
2403  return m.deltaTiming;
2404  });
2405  tgcCoin_variables.push_back(coin_inner_tile_deltaTiming);
2406  auto coin_inner_tile_tmdbDecisions=Monitored::Collection("coin_inner_tile_tmdbDecisions",tgcTrigTileMap,[](const TgcTrigTile&m){
2407  return m.tmdbDecisions;
2408  });
2409  tgcCoin_variables.push_back(coin_inner_tile_tmdbDecisions);
2410  auto coin_inner_tile_currBc=Monitored::Collection("coin_inner_tile_currBc",tgcTrigTileMap,[](const TgcTrigTile&m){
2411  return m.currBc;
2412  });
2413  tgcCoin_variables.push_back(coin_inner_tile_currBc);
2414  auto coin_inner_tile_goodBcid0=Monitored::Collection("coin_inner_tile_goodBcid0",tgcTrigTileMap,[](const TgcTrigTile&m){
2415  return m.goodBcid0;
2416  });
2417  tgcCoin_variables.push_back(coin_inner_tile_goodBcid0);
2418  auto coin_inner_tile_goodBcid1=Monitored::Collection("coin_inner_tile_goodBcid1",tgcTrigTileMap,[](const TgcTrigTile&m){
2419  return m.goodBcid1;
2420  });
2421  tgcCoin_variables.push_back(coin_inner_tile_goodBcid1);
2422  auto coin_inner_tile_goodBcid2=Monitored::Collection("coin_inner_tile_goodBcid2",tgcTrigTileMap,[](const TgcTrigTile&m){
2423  return m.goodBcid2;
2424  });
2425  tgcCoin_variables.push_back(coin_inner_tile_goodBcid2);
2426  auto coin_inner_tile_goodTiming=Monitored::Collection("coin_inner_tile_goodTiming",tgcTrigTileMap,[](const TgcTrigTile&m){
2427  return m.goodTiming;
2428  });
2429  tgcCoin_variables.push_back(coin_inner_tile_goodTiming);
2430  // Tile inner coincidence (modified decisions)
2431  auto coin_inner_tile2_slSector=Monitored::Collection("coin_inner_tile2_slSector",tgcTrigTileMap_allmods,[](const TgcTrigTile&m){
2432  return m.slSector;
2433  });
2434  tgcCoin_variables.push_back(coin_inner_tile2_slSector);
2435  auto coin_inner_tile2_currBc=Monitored::Collection("coin_inner_tile2_currBc",tgcTrigTileMap_allmods,[](const TgcTrigTile&m){
2436  return m.currBc;
2437  });
2438  tgcCoin_variables.push_back(coin_inner_tile2_currBc);
2439  auto coin_inner_tile2_tmdbDecisions=Monitored::Collection("coin_inner_tile2_tmdbDecisions",tgcTrigTileMap_allmods,[](const TgcTrigTile&m){
2440  return m.tmdbDecisions;
2441  });
2442  tgcCoin_variables.push_back(coin_inner_tile2_tmdbDecisions);
2443 
2444  // EIFI inner coincidence
2445  auto coin_inner_eifi_slSector_goodTiming=Monitored::Collection("coin_inner_eifi_slSector_goodTiming",tgcTrigEifiMap,[](const TgcTrigEifi&m){
2446  return (m.goodTiming) ? m.slSector : -999;
2447  });
2448  tgcCoin_variables.push_back(coin_inner_eifi_slSector_goodTiming);
2449  auto coin_inner_eifi_slSector=Monitored::Collection("coin_inner_eifi_slSector",tgcTrigEifiMap,[](const TgcTrigEifi&m){
2450  return m.slSector;
2451  });
2452  tgcCoin_variables.push_back(coin_inner_eifi_slSector);
2453  auto coin_inner_eifi_roiEta=Monitored::Collection("coin_inner_eifi_roiEta",tgcTrigEifiMap,[](const TgcTrigEifi&m){
2454  return m.roiEta;
2455  });
2456  tgcCoin_variables.push_back(coin_inner_eifi_roiEta);
2457  auto coin_inner_eifi_roiPhi=Monitored::Collection("coin_inner_eifi_roiPhi",tgcTrigEifiMap,[](const TgcTrigEifi&m){
2458  return m.roiPhi;
2459  });
2460  tgcCoin_variables.push_back(coin_inner_eifi_roiPhi);
2461  auto coin_inner_eifi_roiNum=Monitored::Collection("coin_inner_eifi_roiNum",tgcTrigEifiMap,[](const TgcTrigEifi&m){
2462  return m.roiNum;
2463  });
2464  tgcCoin_variables.push_back(coin_inner_eifi_roiNum);
2465  auto coin_inner_eifi_deltaTiming=Monitored::Collection("coin_inner_eifi_deltaTiming",tgcTrigEifiMap,[](const TgcTrigEifi&m){
2466  return m.deltaTiming;
2467  });
2468  tgcCoin_variables.push_back(coin_inner_eifi_deltaTiming);
2469  auto coin_inner_eifi_currBc=Monitored::Collection("coin_inner_eifi_currBc",tgcTrigEifiMap,[](const TgcTrigEifi&m){
2470  return m.currBc;
2471  });
2472  tgcCoin_variables.push_back(coin_inner_eifi_currBc);
2473  auto coin_inner_eifi_goodTiming=Monitored::Collection("coin_inner_eifi_goodTiming",tgcTrigEifiMap,[](const TgcTrigEifi&m){
2474  return m.goodTiming;
2475  });
2476  tgcCoin_variables.push_back(coin_inner_eifi_goodTiming);
2477 
2478 
2479  fill(m_packageName+"_TgcCoin", tgcCoin_variables);
2480 
2481  ATH_MSG_DEBUG("End filling TGC CoinData histograms");
2482  }
2483  }
2484 
2486  ATH_MSG_DEBUG("Done fillHistograms()");
2487  return StatusCode::SUCCESS;
2488 }
2489 
2491  const std::vector<TgcTrig>& tgcTrigs,
2492  std::vector<Monitored::ObjectsCollection<std::vector<TgcTrig>, double>>& varowner,
2493  MonVariables& variables) const {
2494  varowner.push_back(Monitored::Collection(type+"_coin_lb",tgcTrigs,[](const TgcTrig&m){return m.lb;}));
2495  variables.push_back(varowner.back());
2496  varowner.push_back(Monitored::Collection(type+"_coin_eta",tgcTrigs,[](const TgcTrig&m){return m.eta;}));
2497  variables.push_back(varowner.back());
2498  varowner.push_back(Monitored::Collection(type+"_coin_phi",tgcTrigs,[](const TgcTrig&m){return m.phi + tgc_coin_phi_small_offset;}));
2499  variables.push_back(varowner.back());
2500  varowner.push_back(Monitored::Collection(type+"_coin_bunch",tgcTrigs,[](const TgcTrig&m){return m.bunch;}));
2501  variables.push_back(varowner.back());
2502  varowner.push_back(Monitored::Collection(type+"_coin_roi",tgcTrigs,[](const TgcTrig&m){return m.roi;}));
2503  variables.push_back(varowner.back());
2504  varowner.push_back(Monitored::Collection(type+"_coin_sector",tgcTrigs,[](const TgcTrig&m){return m.sector;}));
2505  variables.push_back(varowner.back());
2506  varowner.push_back(Monitored::Collection(type+"_coin_pt",tgcTrigs,[](const TgcTrig&m){return m.pt & 0xF;}));
2507  variables.push_back(varowner.back());
2508  varowner.push_back(Monitored::Collection(type+"_coin_CoinFlagQ",tgcTrigs,[](const TgcTrig&m){return m.isPositiveDeltaR;}));
2509  variables.push_back(varowner.back());
2510  varowner.push_back(Monitored::Collection(type+"_coin_CoinFlagQpos",tgcTrigs,[](const TgcTrig&m){return m.isPositiveDeltaR==0;}));
2511  variables.push_back(varowner.back());
2512  varowner.push_back(Monitored::Collection(type+"_coin_CoinFlagQneg",tgcTrigs,[](const TgcTrig&m){return m.isPositiveDeltaR==1;}));
2513  variables.push_back(varowner.back());
2514  varowner.push_back(Monitored::Collection(type+"_coin_CoinFlags",tgcTrigs,[](const TgcTrig&m){return (m.pt>>CoinFlags)&0x7;}));
2515  variables.push_back(varowner.back());
2516  varowner.push_back(Monitored::Collection(type+"_coin_CoinFlagF",tgcTrigs,[](const TgcTrig&m){return (m.pt>>CoinFlagF)&0x1;}));
2517  variables.push_back(varowner.back());
2518  varowner.push_back(Monitored::Collection(type+"_coin_CoinFlagC",tgcTrigs,[](const TgcTrig&m){return (m.pt>>CoinFlagC)&0x1;}));
2519  variables.push_back(varowner.back());
2520  varowner.push_back(Monitored::Collection(type+"_coin_CoinFlagH",tgcTrigs,[](const TgcTrig&m){return (m.pt>>CoinFlagH)&0x1;}));
2521  variables.push_back(varowner.back());
2522  varowner.push_back(Monitored::Collection(type+"_coin_InnerCoinType",tgcTrigs,[](const TgcTrig&m){return (m.pt>>InnerCoinFlags)&0xF;}));
2523  variables.push_back(varowner.back());
2524  varowner.push_back(Monitored::Collection(type+"_coin_CoinFlagEI",tgcTrigs,[](const TgcTrig&m){return (m.pt>>CoinFlagEI)&0x1;}));
2525  variables.push_back(varowner.back());
2526  varowner.push_back(Monitored::Collection(type+"_coin_CoinFlagTile",tgcTrigs,[](const TgcTrig&m){return (m.pt>>CoinFlagTile)&0x1;}));
2527  variables.push_back(varowner.back());
2528  varowner.push_back(Monitored::Collection(type+"_coin_CoinFlagRPC",tgcTrigs,[](const TgcTrig&m){return (m.pt>>CoinFlagRPC)&0x1;}));
2529  variables.push_back(varowner.back());
2530  varowner.push_back(Monitored::Collection(type+"_coin_CoinFlagNSW",tgcTrigs,[](const TgcTrig&m){return (m.pt>>CoinFlagNSW)&0x1;}));
2531  variables.push_back(varowner.back());
2532  varowner.push_back(Monitored::Collection(type+"_coin_veto",tgcTrigs,[](const TgcTrig&m){return m.veto;}));
2533  variables.push_back(varowner.back());
2534  varowner.push_back(Monitored::Collection(type+"_coin_veto_sector",tgcTrigs,[](const TgcTrig&m){return (m.veto==1)?(m.sector):(-1);}));
2535  variables.push_back(varowner.back());
2536  varowner.push_back(Monitored::Collection(type+"_coin_veto_roi",tgcTrigs,[](const TgcTrig&m){return (m.veto==1)?(m.roi):(-1);}));
2537  variables.push_back(varowner.back());
2538  varowner.push_back(Monitored::Collection(type+"_coin_isPositiveDeltaR",tgcTrigs,[](const TgcTrig&m){return m.isPositiveDeltaR;}));
2539  variables.push_back(varowner.back());
2540  varowner.push_back(Monitored::Collection(type+"_coin_cutmask_pt1",tgcTrigs,[](const TgcTrig&m){return ((m.pt&0xF)==1);}));
2541  variables.push_back(varowner.back());
2542  varowner.push_back(Monitored::Collection(type+"_coin_cutmask_pt2",tgcTrigs,[](const TgcTrig&m){return ((m.pt&0xF)==2);}));
2543  variables.push_back(varowner.back());
2544  varowner.push_back(Monitored::Collection(type+"_coin_cutmask_pt3",tgcTrigs,[](const TgcTrig&m){return ((m.pt&0xF)==3);}));
2545  variables.push_back(varowner.back());
2546  varowner.push_back(Monitored::Collection(type+"_coin_cutmask_pt4",tgcTrigs,[](const TgcTrig&m){return ((m.pt&0xF)==4);}));
2547  variables.push_back(varowner.back());
2548  varowner.push_back(Monitored::Collection(type+"_coin_cutmask_pt5",tgcTrigs,[](const TgcTrig&m){return ((m.pt&0xF)==5);}));
2549  variables.push_back(varowner.back());
2550  varowner.push_back(Monitored::Collection(type+"_coin_cutmask_pt6",tgcTrigs,[](const TgcTrig&m){return ((m.pt&0xF)==6);}));
2551  variables.push_back(varowner.back());
2552  varowner.push_back(Monitored::Collection(type+"_coin_cutmask_pt7",tgcTrigs,[](const TgcTrig&m){return ((m.pt&0xF)==7);}));
2553  variables.push_back(varowner.back());
2554  varowner.push_back(Monitored::Collection(type+"_coin_cutmask_pt8",tgcTrigs,[](const TgcTrig&m){return ((m.pt&0xF)==8);}));
2555  variables.push_back(varowner.back());
2556  varowner.push_back(Monitored::Collection(type+"_coin_cutmask_pt9",tgcTrigs,[](const TgcTrig&m){return ((m.pt&0xF)==9);}));
2557  variables.push_back(varowner.back());
2558  varowner.push_back(Monitored::Collection(type+"_coin_cutmask_pt10",tgcTrigs,[](const TgcTrig&m){return ((m.pt&0xF)==10);}));
2559  variables.push_back(varowner.back());
2560  varowner.push_back(Monitored::Collection(type+"_coin_cutmask_pt11",tgcTrigs,[](const TgcTrig&m){return ((m.pt&0xF)==11);}));
2561  variables.push_back(varowner.back());
2562  varowner.push_back(Monitored::Collection(type+"_coin_cutmask_pt12",tgcTrigs,[](const TgcTrig&m){return ((m.pt&0xF)==12);}));
2563  variables.push_back(varowner.back());
2564  varowner.push_back(Monitored::Collection(type+"_coin_cutmask_pt13",tgcTrigs,[](const TgcTrig&m){return ((m.pt&0xF)==13);}));
2565  variables.push_back(varowner.back());
2566  varowner.push_back(Monitored::Collection(type+"_coin_cutmask_pt14",tgcTrigs,[](const TgcTrig&m){return ((m.pt&0xF)==14);}));
2567  variables.push_back(varowner.back());
2568  varowner.push_back(Monitored::Collection(type+"_coin_cutmask_pt15",tgcTrigs,[](const TgcTrig&m){return ((m.pt&0xF)==15);}));
2569  variables.push_back(varowner.back());
2570 }
2572  const std::vector<TgcTrig>& tgcTrigs,
2573  const std::vector<ExtPos>& extpositions_pivot,
2574  std::vector<ExtTrigInfo>& extTrigInfoVec,
2575  std::vector<Monitored::ObjectsCollection<std::vector<ExtTrigInfo>, double>>& varowner,
2576  MonVariables& variables) const {
2577  for(const auto& ext : extpositions_pivot){
2578  if(ext.muon->pt() < m_pTCutOnTrigExtrapolation.value() )continue;
2579  bool matched = false;
2580  bool matchedQ = false;
2581  bool matchedF = false;
2582  bool matchedC = false;
2583  bool matchedH = false;
2584  bool matchedEI = false;
2585  bool matchedTile = false;
2586  bool matchedRPC = false;
2587  bool matchedNSW = false;
2588  for(const auto& tgcTrig : tgcTrigs){
2589  if(tgcTrig.bunch!=0)continue; // only the current bunch
2590  if(tgcTrig.isAside==1 && ext.extPos.z()<0)continue;
2591  if(tgcTrig.isAside==0 && ext.extPos.z()>0)continue;
2592  if(tgcTrig.type == Muon::TgcCoinData::TYPE_SL){
2593  const Amg::Vector3D posOut(tgcTrig.x_Out,tgcTrig.y_Out,tgcTrig.z_Out);
2594  if( Amg::deltaR(posOut,ext.extPos) > m_l1trigMatchWindowPt15 )continue;
2595  }else{
2596  TVector2 vec(tgcTrig.x_Out,tgcTrig.y_Out);
2597  double deltaPhi = vec.DeltaPhi( TVector2(ext.extPos.x(), ext.extPos.y()) );
2598  double deltaR = vec.Mod() - TVector2(ext.extPos.x(), ext.extPos.y()).Mod();
2599  if( std::abs(deltaPhi) > m_dPhiCutOnM3 || std::abs(deltaR) > m_dRCutOnM3 )continue;
2600  }
2601  matched |= 1;
2602  int charge = (tgcTrig.isPositiveDeltaR==0) ? (-1) : (+1);
2603  matchedQ |= (ext.muon->charge()*charge>0);
2604  matchedF |= (tgcTrig.pt>>CoinFlagF) & 0x1;
2605  matchedC |= (tgcTrig.pt>>CoinFlagC) & 0x1;
2606  matchedH |= (tgcTrig.pt>>CoinFlagH) & 0x1;
2607  matchedEI |= (tgcTrig.pt>>CoinFlagEI) & 0x1;
2608  matchedTile |= (tgcTrig.pt>>CoinFlagTile) & 0x1;
2609  matchedRPC |= (tgcTrig.pt>>CoinFlagRPC) & 0x1;
2610  matchedNSW |= (tgcTrig.pt>>CoinFlagNSW) & 0x1;
2611  }
2612  ExtTrigInfo extTrigInfo;
2613  extTrigInfo.eta = ext.extPos.eta();
2614  extTrigInfo.phi = ext.extPos.phi();
2615  extTrigInfo.matched = matched;
2616  extTrigInfo.matchedQ = matchedQ;
2617  extTrigInfo.matchedF = matchedF;
2618  extTrigInfo.matchedC = matchedC;
2619  extTrigInfo.matchedH = matchedH;
2620  extTrigInfo.matchedEI = matchedEI;
2621  extTrigInfo.matchedTile = matchedTile;
2622  extTrigInfo.matchedRPC = matchedRPC;
2623  extTrigInfo.matchedNSW = matchedNSW;
2624  extTrigInfoVec.push_back(extTrigInfo);
2625  }
2626  varowner.push_back(Monitored::Collection(type+"_coin_ext_eta",extTrigInfoVec,[](const ExtTrigInfo&m){return m.eta;}));
2627  variables.push_back(varowner.back());
2628  varowner.push_back(Monitored::Collection(type+"_coin_ext_phi",extTrigInfoVec,[](const ExtTrigInfo&m){return m.phi;}));
2629  variables.push_back(varowner.back());
2630  varowner.push_back(Monitored::Collection(type+"_coin_ext_matched",extTrigInfoVec,[](const ExtTrigInfo&m){return m.matched;}));
2631  variables.push_back(varowner.back());
2632  varowner.push_back(Monitored::Collection(type+"_coin_ext_matched_eta",extTrigInfoVec,[](const ExtTrigInfo&m){return (m.matched)?m.eta:(-10);}));
2633  variables.push_back(varowner.back());
2634  varowner.push_back(Monitored::Collection(type+"_coin_ext_matched_phi",extTrigInfoVec,[](const ExtTrigInfo&m){return (m.matched)?m.phi:(-10);}));
2635  variables.push_back(varowner.back());
2636  varowner.push_back(Monitored::Collection(type+"_coin_ext_matched_CoinFlagQ",extTrigInfoVec,[](const ExtTrigInfo&m){return m.matchedQ;}));
2637  variables.push_back(varowner.back());
2638  varowner.push_back(Monitored::Collection(type+"_coin_ext_matched_CoinFlagF",extTrigInfoVec,[](const ExtTrigInfo&m){return m.matchedF;}));
2639  variables.push_back(varowner.back());
2640  varowner.push_back(Monitored::Collection(type+"_coin_ext_matched_CoinFlagC",extTrigInfoVec,[](const ExtTrigInfo&m){return m.matchedC;}));
2641  variables.push_back(varowner.back());
2642  varowner.push_back(Monitored::Collection(type+"_coin_ext_matched_CoinFlagH",extTrigInfoVec,[](const ExtTrigInfo&m){return m.matchedH;}));
2643  variables.push_back(varowner.back());
2644  varowner.push_back(Monitored::Collection(type+"_coin_ext_matched_CoinFlagEI",extTrigInfoVec,[](const ExtTrigInfo&m){return m.matchedEI;}));
2645  variables.push_back(varowner.back());
2646  varowner.push_back(Monitored::Collection(type+"_coin_ext_matched_CoinFlagTile",extTrigInfoVec,[](const ExtTrigInfo&m){return m.matchedTile;}));
2647  variables.push_back(varowner.back());
2648  varowner.push_back(Monitored::Collection(type+"_coin_ext_matched_CoinFlagRPC",extTrigInfoVec,[](const ExtTrigInfo&m){return m.matchedRPC;}));
2649  variables.push_back(varowner.back());
2650  varowner.push_back(Monitored::Collection(type+"_coin_ext_matched_CoinFlagNSW",extTrigInfoVec,[](const ExtTrigInfo&m){return m.matchedNSW;}));
2651  variables.push_back(varowner.back());
2652 }
2654  double theta = 2.0 * std::atan( std::exp(-1.0 * std::abs(eta)) );
2655  double r = std::tan( theta ) * nsw_z;
2656  double rindex = (r - nsw_rmin) / nsw_rindex_step;
2657  return rindex;
2658 }
2660  // matching window
2661  double max_dr = 999;
2662  double pt = muon->pt();
2663  if (pt > pt_15_cut) max_dr = m_l1trigMatchWindowPt15;
2664  else if (pt > pt_10_cut) max_dr = m_l1trigMatchWindowPt10a + m_l1trigMatchWindowPt10b * pt / Gaudi::Units::GeV;
2666  return max_dr;
2667 }
2668 
2669 void
2670 TgcRawDataMonitorAlgorithm::fillThresholdPatternHistograms(std::map<std::string,std::vector<const xAOD::MuonRoI*>> & menuAndRoIs, const std::vector < TimedMuon > & mymuons, const EventContext & ctx) const {
2672  for(const auto& item : m_thrMonList){
2673  std::vector<bool> passed;
2674  passed.reserve(mymuons.size());
2675  for(const auto& mymuon : mymuons){
2676  passed.push_back( mymuon.matchedL1Items.find(item) != mymuon.matchedL1Items.end() );
2677  }
2678  auto passed_rois = menuAndRoIs[item];
2679 
2680  MonVariables thrMonVariables;
2681 
2682  auto lumiBlock_l1item = Monitored::Scalar<int>(Form("lumiBlock_l1item_%s",item.data()),GetEventInfo(ctx)->lumiBlock());
2683  thrMonVariables.push_back(lumiBlock_l1item);
2684 
2685  auto muon_passed_l1item = Monitored::Collection(Form("muon_passed_l1item_%s",item.data()),passed);
2686  thrMonVariables.push_back(muon_passed_l1item);
2687 
2688  auto muon_eta_l1item=Monitored::Collection(Form("muon_eta_l1item_%s",item.data()),mymuons,[](const TimedMuon&m){
2689  return (m.muon->pt() > pt_30_cut) ? m.muon->eta() : -10;
2690  });
2691  thrMonVariables.push_back(muon_eta_l1item);
2692  auto muon_phi_l1item=Monitored::Collection(Form("muon_phi_l1item_%s",item.data()),mymuons,[](const TimedMuon&m){
2693  return (m.muon->pt() > pt_30_cut) ? m.muon->phi() : -10;
2694  });
2695  thrMonVariables.push_back(muon_phi_l1item);
2696  auto muon_pt_rpc_l1item=Monitored::Collection(Form("muon_pt_rpc_l1item_%s",item.data()),mymuons,[](const TimedMuon&m){
2697  return (std::abs(m.muon->eta()) < barrel_end) ? m.muon->pt() / Gaudi::Units::GeV : -10;
2698  });
2699  thrMonVariables.push_back(muon_pt_rpc_l1item);
2700  auto muon_pt_tgc_l1item=Monitored::Collection(Form("muon_pt_tgc_l1item_%s",item.data()),mymuons,[](const TimedMuon&m){
2701  return (std::abs(m.muon->eta()) > barrel_end && std::abs(m.muon->eta()) < trigger_end) ? m.muon->pt() / Gaudi::Units::GeV : -10;
2702  });
2703  thrMonVariables.push_back(muon_pt_tgc_l1item);
2704  auto muon_phi_rpc_l1item=Monitored::Collection(Form("muon_phi_rpc_l1item_%s",item.data()),mymuons,[](const TimedMuon&m){
2705  return (std::abs(m.muon->eta()) < barrel_end && m.muon->pt() > pt_30_cut) ? m.muon->phi() : -10;
2706  });
2707  thrMonVariables.push_back(muon_phi_rpc_l1item);
2708  auto muon_phi_tgc_l1item=Monitored::Collection(Form("muon_phi_tgc_l1item_%s",item.data()),mymuons,[](const TimedMuon&m){
2709  return (std::abs(m.muon->eta()) > barrel_end && std::abs(m.muon->eta()) < trigger_end && m.muon->pt() > pt_30_cut) ? m.muon->phi() : -10;
2710  });
2711  thrMonVariables.push_back(muon_phi_tgc_l1item);
2712 
2713  auto l1item_roi_eta=Monitored::Collection(Form("l1item_roi_eta_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m){return m->eta();});
2714  thrMonVariables.push_back(l1item_roi_eta);
2715  auto l1item_roi_phi=Monitored::Collection(Form("l1item_roi_phi_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m){return m->phi();});
2716  thrMonVariables.push_back(l1item_roi_phi);
2717  auto l1item_roi_phi_rpc=Monitored::Collection(Form("l1item_roi_phi_rpc_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m){
2718  return (m->getSource()==xAOD::MuonRoI::Barrel)?(m->phi()):(-10);
2719  });
2720  auto l1item_roi_phi_tgc=Monitored::Collection(Form("l1item_roi_phi_tgc_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m){
2721  return (m->getSource()!=xAOD::MuonRoI::Barrel)?(m->phi()):(-10);
2722  });
2723  thrMonVariables.push_back(l1item_roi_phi_tgc);
2724 
2725  auto l1item_roi_phi_barrel=Monitored::Collection(Form("l1item_roi_phi_barrel_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m){
2726  return (m->getSource() == xAOD::MuonRoI::Barrel) ? m->phi() : -10;
2727  });
2728  thrMonVariables.push_back(l1item_roi_phi_barrel);
2729  auto l1item_roi_phi_endcap=Monitored::Collection(Form("l1item_roi_phi_endcap_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m){
2730  return (m->getSource() == xAOD::MuonRoI::Endcap) ? m->phi() : -10;
2731  });
2732  thrMonVariables.push_back(l1item_roi_phi_endcap);
2733  auto l1item_roi_phi_forward=Monitored::Collection(Form("l1item_roi_phi_forward_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m){
2734  return (m->getSource() == xAOD::MuonRoI::Forward) ? m->phi() : -10;
2735  });
2736  thrMonVariables.push_back(l1item_roi_phi_forward);
2737  auto l1item_roi_sideA=Monitored::Collection(Form("l1item_roi_sideA_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m){
2738  return m->getHemisphere() == xAOD::MuonRoI::Positive;
2739  });
2740  thrMonVariables.push_back(l1item_roi_sideA);
2741  auto l1item_roi_sideC=Monitored::Collection(Form("l1item_roi_sideC_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m){
2742  return m->getHemisphere() == xAOD::MuonRoI::Negative;
2743  });
2744  thrMonVariables.push_back(l1item_roi_sideC);
2745 
2746  auto l1item_roi_roiNumber=Monitored::Collection(Form("l1item_roi_roiNumber_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m){
2747  return m->getRoI();
2748  });
2749  thrMonVariables.push_back(l1item_roi_roiNumber);
2750 
2751  auto l1item_roi_sector = Monitored::Collection(Form("l1item_roi_sector_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m) {
2752  return (m->getHemisphere() == xAOD::MuonRoI::Positive)?(m->getSectorID()+1):(-1 * m->getSectorID()-1);
2753  });
2754  thrMonVariables.push_back(l1item_roi_sector);
2755  auto l1item_roi_barrel = Monitored::Collection(Form("l1item_roi_barrel_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m) {
2756  return m->getSource() == xAOD::MuonRoI::Barrel;
2757  });
2758  thrMonVariables.push_back(l1item_roi_barrel);
2759  auto l1item_roi_endcap = Monitored::Collection(Form("l1item_roi_endcap_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m) {
2760  return m->getSource() == xAOD::MuonRoI::Endcap;
2761  });
2762  thrMonVariables.push_back(l1item_roi_endcap);
2763  auto l1item_roi_forward = Monitored::Collection(Form("l1item_roi_forward_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m) {
2764  return m->getSource() == xAOD::MuonRoI::Forward;
2765  });
2766  thrMonVariables.push_back(l1item_roi_forward);
2767  auto l1item_roi_thrNumber=Monitored::Collection(Form("l1item_roi_thrNumber_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m){
2768  return m->getThrNumber();
2769  });
2770  thrMonVariables.push_back(l1item_roi_thrNumber);
2771 
2772  auto l1item_roi_ismorecand=Monitored::Collection(Form("l1item_roi_ismorecand_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m){
2773  return (m->getSource()==xAOD::MuonRoI::Barrel)?(m->isMoreCandInRoI()):(-1);
2774  });
2775  thrMonVariables.push_back(l1item_roi_ismorecand);
2776  auto l1item_roi_bw3coin=Monitored::Collection(Form("l1item_roi_bw3coin_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m){
2777  return (m->getSource()!=xAOD::MuonRoI::Barrel)?(m->getBW3Coincidence()):(-1);
2778  });
2779  thrMonVariables.push_back(l1item_roi_bw3coin);
2780  auto l1item_roi_innercoin=Monitored::Collection(Form("l1item_roi_innercoin_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m){
2781  return (m->getSource()!=xAOD::MuonRoI::Barrel)?(m->getInnerCoincidence()):(-1);
2782  });
2783  thrMonVariables.push_back(l1item_roi_innercoin);
2784  auto l1item_roi_goodmf=Monitored::Collection(Form("l1item_roi_goodmf_%s",item.data()),passed_rois,[](const xAOD::MuonRoI*m){
2785  return (m->getSource()!=xAOD::MuonRoI::Barrel)?(m->getGoodMF()):(-1);
2786  });
2787  thrMonVariables.push_back(l1item_roi_goodmf);
2788 
2789  fill(m_packageName + item.data(), thrMonVariables);
2790  }
2791  }
2793 }
2794 
2795 void
2796 TgcRawDataMonitorAlgorithm::fillTgcPrdHistograms(Monitored::Scalar<int> & mon_bcid, Monitored::Scalar<int> & mon_pileup, Monitored::Scalar<int> & mon_lb,std::map <std::string, std::vector< ExtPos>> & extpositions, const EventContext & ctx) const{
2797  if (m_anaTgcPrd) {
2798  ATH_MSG_DEBUG("m_anaTgcPrd = True");
2800  const MuonGM::MuonDetectorManager* muonMgr = DetectorManagerHandle.cptr();
2802  std::map<const xAOD::Muon*, std::set<std::string>> map_muon_and_tgchits;
2803  if(tgcPrd.isValid() && muonMgr!=nullptr){
2804  ATH_MSG_DEBUG("Filling TGC PRD histograms");
2805  const TgcIdHelper &tgcIdHelper = m_idHelperSvc->tgcIdHelper();
2806  std::vector < TGC::TgcHit > tgcHits;
2807  std::map<std::string, std::vector<TGC::TgcHit>> tgcHitsMap;
2808  for (const auto tgccnt : *tgcPrd) {
2809  for (const auto data : *tgccnt) {
2810  const MuonGM::TgcReadoutElement *element = data->detectorElement();
2811  const Identifier id = data->identify();
2812  const int gasGap = tgcIdHelper.gasGap(id);
2813  const int channel = tgcIdHelper.channel(id);
2814  const bool isStrip = tgcIdHelper.isStrip(id);
2815  const Amg::Vector3D &pos = isStrip ? element->stripPos(gasGap, channel) : element->wireGangPos(gasGap, channel);
2816  const double shortWidth = (isStrip)?(element->stripShortWidth(gasGap, channel)):(element->gangShortWidth(gasGap, channel));
2817  const double longWidth = (isStrip)?(element->stripLongWidth(gasGap, channel)):(element->gangLongWidth(gasGap, channel));
2818  const double length = (isStrip)?(element->stripLength()):(element->gangRadialLength(gasGap, channel));
2819  const int bcmask = data->getBcBitMap();
2820  TGC::TgcHit tgcHit(pos[0],pos[1],pos[2],
2821  shortWidth,longWidth, length,
2822  isStrip,gasGap,channel,tgcIdHelper.stationEta(id),tgcIdHelper.stationPhi(id),tgcIdHelper.stationName(id),
2823  bcmask);
2824  if(extpositions.find(tgcHit.cham_name())!=extpositions.end()){
2825  for(auto& cham : extpositions[tgcHit.cham_name()]){
2826  double newX = cham.extPos.x() + cham.extVec.x() / cham.extVec.z() * ( tgcHit.Z() - cham.extPos.z() );
2827  double newY = cham.extPos.y() + cham.extVec.y() / cham.extVec.z() * ( tgcHit.Z() - cham.extPos.z() );
2828  Identifier id2 = muonMgr->tgcIdHelper()->elementID(tgcHit.StationName(), tgcHit.StationEta(), tgcHit.StationPhi());
2829 
2830  auto detEle = muonMgr->getTgcReadoutElement(id2);
2831  double chamPhi = detEle->center().phi();
2832  TVector2 extPos(newX,newY);
2833  TVector2 hitPos(tgcHit.X(),tgcHit.Y());
2834  TVector2 rot_extPos = extPos.Rotate(-chamPhi + M_PI/2.);
2835  TVector2 rot_hitPos = hitPos.Rotate(-chamPhi + M_PI/2.);
2836  double res = (tgcHit.isStrip())? std::sin( rot_extPos.DeltaPhi( rot_hitPos ) ) * rot_extPos.Mod(): rot_hitPos.Y() - rot_extPos.Y();
2837  tgcHit.addResidual( cham.muon, res );
2838  if( std::abs(res) < m_residualWindow ){
2839  cham.chambersHasHit.insert(tgcHit.type_name());
2840  map_muon_and_tgchits[cham.muon].insert(tgcHit.channel_name());
2841  }
2842  }
2843  }
2844  tgcHits.push_back(tgcHit);
2845  tgcHitsMap[tgcHit.cham_name() + ( (tgcHit.isStrip())?("S"):("W") )].push_back(tgcHit); // <- chamber-by-chamber residual plots
2846  tgcHitsMap[tgcHit.type_name()].push_back(tgcHit); // <- gap-by-gap channel occupancy plots
2847  }
2848  }
2849 
2850  std::map<std::string, std::vector<int>> tgcHitPhiMap;
2851  std::map<std::string, std::vector<int>> tgcHitEtaMap;
2852  std::map<std::string, std::vector<int>> tgcHitPhiMapGlobal;
2853  std::map<std::string, std::vector<int>> tgcHitPhiMapOnline;
2854  std::map<std::string, std::vector<int>> tgcHitEtaMapOnline;
2855  std::map<std::string, std::vector<int>> tgcHitPhiMapGlobalOnline;
2856  std::map<std::string, std::vector<int>> tgcHitTiming;
2857  std::map<std::string, std::vector<int>> tgcHitPhiMapGlobalWithTrack;
2858  std::map<std::string, std::vector<int>> tgcHitTimingWithTrack;
2859  std::map<const std::string, std::vector<TGC::TgcHit>> tgcHitBCMaskMap;
2860  std::vector <int> vec_bw24sectors; // 1..12 BW-A, -1..-12 BW-C
2861  std::vector <int> vec_bw24sectors_wire;
2862  std::vector <int> vec_bw24sectors_strip;
2863  std::vector <int> vec_bwfulleta; // 0(Forward), 1..4(M1), 1..5(M2,M3)
2864  std::vector <int> vec_bwfulleta_wire;
2865  std::vector <int> vec_bwfulleta_strip;
2866  std::vector <int> vec_bwtiming;
2867  std::vector <int> vec_bwtiming_wire;
2868  std::vector <int> vec_bwtiming_strip;
2869  std::vector <int> vec_bw24sectors_wTrack; // 1..12 BW-A, -1..-12 BW-C
2870  std::vector <int> vec_bw24sectors_wire_wTrack;
2871  std::vector <int> vec_bw24sectors_strip_wTrack;
2872  std::vector <int> vec_bwfulleta_wTrack; // 0(Forward), 1..4(M1), 1..5(M2,M3)
2873  std::vector <int> vec_bwfulleta_wire_wTrack;
2874  std::vector <int> vec_bwfulleta_strip_wTrack;
2875  std::vector <int> vec_bwtiming_wTrack;
2876  std::vector <int> vec_bwtiming_wire_wTrack;
2877  std::vector <int> vec_bwtiming_strip_wTrack;
2878  for(const auto& tgcHit : tgcHits){
2879  bool hasAssociatedGoodMuonTrack = false;
2880  for(const auto& res : tgcHit.residuals()){
2881  const xAOD::Muon* muon = res.first;
2882  if(map_muon_and_tgchits[muon].find(tgcHit.channel_name()) == map_muon_and_tgchits[muon].end()) continue;
2883  int nWhits = 0;
2884  int nShits = 0;
2885  for(const auto& chamHasHit : map_muon_and_tgchits[muon]){
2886  if( chamHasHit.find(tgcHit.gap_name()) != std::string::npos ) continue; // skipping the same gap
2887  if( chamHasHit.find("M04") != std::string::npos ) continue; // skipping EI/FI
2888  if( chamHasHit.find('W') != std::string::npos ) nWhits++;
2889  if( chamHasHit.find('S') != std::string::npos ) nShits++;
2890  }
2891  if(nWhits < m_nHitsInOtherBWTGCWire) continue;
2892  if(nShits < m_nHitsInOtherBWTGCStrip) continue;
2893  hasAssociatedGoodMuonTrack = true;
2894  break;
2895  }
2896 
2897  // debugging purpose: should be False by default
2898  if(m_dumpFullChannelList)ATH_MSG_INFO("TGCHIT: " << tgcHit.channel_name());
2899 
2900  // BCID analysis for TGC TTCrx delay scan
2901  if(hasAssociatedGoodMuonTrack) tgcHitBCMaskMap[tgcHit.channel_name()].push_back(tgcHit);
2902 
2903  std::string station_name = Form("%sM%02d%s",(tgcHit.iSide()==TGC::TGCSIDE::TGCASIDE)?("A"):("C"),tgcHit.iM(),(tgcHit.isStrip())?("S"):("W"));
2904  int phimap_index = 0;
2905  int etamap_index = 0;
2906  int phimap_global_index = 0; // no empty bins compare to the above index
2907  m_tgcMonTool->getMapIndex(tgcHit,etamap_index,phimap_index,phimap_global_index );
2908  int phimap_index_online = 0;
2909  int etamap_index_online = 0;
2910  int phimap_global_index_online = 0;
2911  m_tgcMonTool->getMapIndexOnline(tgcHit.type_name(),etamap_index_online,phimap_index_online,phimap_global_index_online );
2912  std::string wire_or_strip = (tgcHit.type_name().size()==16) ? Form("%c_%s",tgcHit.type_name()[0],(tgcHit.type_name()[15]=='W')?("wire"):("strip")) : "null";
2913  for(int bunch = -1 ; bunch <= +1 ; bunch++){
2914  if(bunch==-1 && (tgcHit.bcmask()&Muon::TgcPrepData::BCBIT_PREVIOUS)==0)continue;
2915  if(bunch== 0 && (tgcHit.bcmask()&Muon::TgcPrepData::BCBIT_CURRENT)==0)continue;
2916  if(bunch==+1 && (tgcHit.bcmask()&Muon::TgcPrepData::BCBIT_NEXT)==0)continue;
2917  tgcHitPhiMap[station_name].push_back(phimap_index);
2918  tgcHitEtaMap[station_name].push_back(etamap_index);
2919  tgcHitPhiMapGlobal[station_name].push_back(phimap_global_index);
2920  tgcHitTiming[station_name].push_back(bunch);
2921  tgcHitPhiMapOnline[wire_or_strip].push_back(phimap_index_online);
2922  tgcHitEtaMapOnline[wire_or_strip].push_back(etamap_index_online);
2923  tgcHitPhiMapGlobalOnline[wire_or_strip].push_back(phimap_global_index_online);
2924  if(hasAssociatedGoodMuonTrack){
2925  tgcHitPhiMapGlobalWithTrack[station_name].push_back(phimap_global_index);
2926  tgcHitTimingWithTrack[station_name].push_back(bunch);
2927  }
2928 
2929  if(tgcHit.iM()!=4){
2930  vec_bw24sectors.push_back((tgcHit.iSide()==TGC::TGCSIDE::TGCASIDE)?(tgcHit.iSec()):(-tgcHit.iSec()));
2931  vec_bwfulleta.push_back(tgcHit.iEta());
2932  vec_bwtiming.push_back(bunch);
2933  if(hasAssociatedGoodMuonTrack){
2934  vec_bw24sectors_wTrack.push_back((tgcHit.iSide()==TGC::TGCSIDE::TGCASIDE)?(tgcHit.iSec()):(-tgcHit.iSec()));
2935  vec_bwfulleta_wTrack.push_back(tgcHit.iEta());
2936  vec_bwtiming_wTrack.push_back(bunch);
2937  }
2938  if(tgcHit.isStrip()){
2939  vec_bw24sectors_strip.push_back((tgcHit.iSide()==TGC::TGCSIDE::TGCASIDE)?(tgcHit.iSec()):(-tgcHit.iSec()));
2940  vec_bwfulleta_strip.push_back(tgcHit.iEta());
2941  vec_bwtiming_strip.push_back(bunch);
2942  if(hasAssociatedGoodMuonTrack){
2943  vec_bw24sectors_strip_wTrack.push_back((tgcHit.iSide()==TGC::TGCSIDE::TGCASIDE)?(tgcHit.iSec()):(-tgcHit.iSec()));
2944  vec_bwfulleta_strip_wTrack.push_back(tgcHit.iEta());
2945  vec_bwtiming_strip_wTrack.push_back(bunch);
2946  }
2947  }else{
2948  vec_bw24sectors_wire.push_back((tgcHit.iSide()==TGC::TGCSIDE::TGCASIDE)?(tgcHit.iSec()):(-tgcHit.iSec()));
2949  vec_bwfulleta_wire.push_back(tgcHit.iEta());
2950  vec_bwtiming_wire.push_back(bunch);
2951  if(hasAssociatedGoodMuonTrack){
2952  vec_bw24sectors_wire_wTrack.push_back((tgcHit.iSide()==TGC::TGCSIDE::TGCASIDE)?(tgcHit.iSec()):(-tgcHit.iSec()));
2953  vec_bwfulleta_wire_wTrack.push_back(tgcHit.iEta());
2954  vec_bwtiming_wire_wTrack.push_back(bunch);
2955  }
2956  }
2957  }
2958  }
2959  }
2960 
2961  ATH_MSG_DEBUG("filling hit_variables");
2962 
2963  MonVariables hit_variables;
2964  hit_variables.push_back(mon_bcid);
2965  hit_variables.push_back(mon_pileup);
2966  hit_variables.push_back(mon_lb);
2967 
2968  auto hit_n = Monitored::Scalar<int>("hit_n", tgcHits.size());
2969  hit_variables.push_back(hit_n);
2970 
2971  auto hit_bcmask=Monitored::Collection("hit_bcmask",tgcHits,[](const TGC::TgcHit&m){return m.bcmask();});
2972  hit_variables.push_back(hit_bcmask);
2973 
2974  auto hit_sideA=Monitored::Collection("hit_sideA",tgcHits,[](const TGC::TgcHit&m){return m.Z()>0;});
2975  hit_variables.push_back(hit_sideA);
2976 
2977  auto hit_sideC=Monitored::Collection("hit_sideC",tgcHits,[](const TGC::TgcHit&m){return m.Z() < 0;});
2978  hit_variables.push_back(hit_sideC);
2979 
2980  auto hit_bw24sectors=Monitored::Collection("hit_bw24sectors",vec_bw24sectors,[](const int&m){return m;});
2981  hit_variables.push_back(hit_bw24sectors);
2982  auto hit_bw24sectors_strip=Monitored::Collection("hit_bw24sectors_strip",vec_bw24sectors_strip,[](const int&m){return m;});
2983  hit_variables.push_back(hit_bw24sectors_strip);
2984  auto hit_bw24sectors_wire=Monitored::Collection("hit_bw24sectors_wire",vec_bw24sectors_wire,[](const int&m){return m;});
2985  hit_variables.push_back(hit_bw24sectors_wire);
2986  auto hit_bwfulleta=Monitored::Collection("hit_bwfulleta",vec_bwfulleta,[](const int&m){return m;});
2987  hit_variables.push_back(hit_bwfulleta);
2988  auto hit_bwfulleta_strip=Monitored::Collection("hit_bwfulleta_strip",vec_bwfulleta_strip,[](const int&m){return m;});
2989  hit_variables.push_back(hit_bwfulleta_strip);
2990  auto hit_bwfulleta_wire=Monitored::Collection("hit_bwfulleta_wire",vec_bwfulleta_wire,[](const int&m){return m;});
2991  hit_variables.push_back(hit_bwfulleta_wire);
2992  auto hit_bwtiming=Monitored::Collection("hit_bwtiming",vec_bwtiming,[](const int&m){return m;});
2993  hit_variables.push_back(hit_bwtiming);
2994  auto hit_bwtiming_strip=Monitored::Collection("hit_bwtiming_strip",vec_bwtiming_strip,[](const int&m){return m;});
2995  hit_variables.push_back(hit_bwtiming_strip);
2996  auto hit_bwtiming_wire=Monitored::Collection("hit_bwtiming_wire",vec_bwtiming_wire,[](const int&m){return m;});
2997  hit_variables.push_back(hit_bwtiming_wire);
2998 
2999  auto hit_bw24sectors_wTrack=Monitored::Collection("hit_bw24sectors_wTrack",vec_bw24sectors_wTrack,[](const int&m){return m;});
3000  hit_variables.push_back(hit_bw24sectors_wTrack);
3001  auto hit_bw24sectors_strip_wTrack=Monitored::Collection("hit_bw24sectors_strip_wTrack",vec_bw24sectors_strip_wTrack,[](const int&m){return m;});
3002  hit_variables.push_back(hit_bw24sectors_strip_wTrack);
3003  auto hit_bw24sectors_wire_wTrack=Monitored::Collection("hit_bw24sectors_wire_wTrack",vec_bw24sectors_wire_wTrack,[](const int&m){return m;});
3004  hit_variables.push_back(hit_bw24sectors_wire_wTrack);
3005  auto hit_bwfulleta_wTrack=Monitored::Collection("hit_bwfulleta_wTrack",vec_bwfulleta_wTrack,[](const int&m){return m;});
3006  hit_variables.push_back(hit_bwfulleta_wTrack);
3007  auto hit_bwfulleta_strip_wTrack=Monitored::Collection("hit_bwfulleta_strip_wTrack",vec_bwfulleta_strip_wTrack,[](const int&m){return m;});
3008  hit_variables.push_back(hit_bwfulleta_strip_wTrack);
3009  auto hit_bwfulleta_wire_wTrack=Monitored::Collection("hit_bwfulleta_wire_wTrack",vec_bwfulleta_wire_wTrack,[](const int&m){return m;});
3010  hit_variables.push_back(hit_bwfulleta_wire_wTrack);
3011  auto hit_bwtiming_wTrack=Monitored::Collection("hit_bwtiming_wTrack",vec_bwtiming_wTrack,[](const int&m){return m;});
3012  hit_variables.push_back(hit_bwtiming_wTrack);
3013  auto hit_bwtiming_strip_wTrack=Monitored::Collection("hit_bwtiming_strip_wTrack",vec_bwtiming_strip_wTrack,[](const int&m){return m;});
3014  hit_variables.push_back(hit_bwtiming_strip_wTrack);
3015  auto hit_bwtiming_wire_wTrack=Monitored::Collection("hit_bwtiming_wire_wTrack",vec_bwtiming_wire_wTrack,[](const int&m){return m;});
3016  hit_variables.push_back(hit_bwtiming_wire_wTrack);
3017 
3018  std::vector<Monitored::ObjectsCollection<std::vector<int>, double>> varowner;
3019  varowner.reserve(tgcHitPhiMap.size() * 2 + tgcHitPhiMapGlobal.size() * 2 + tgcHitPhiMapOnline.size() * 3 + tgcHitPhiMapGlobalWithTrack.size() * 2);
3020  for (const auto &phimap : tgcHitPhiMap) {
3021  varowner.push_back(Monitored::Collection(Form("hit_x_%s",phimap.first.data()),tgcHitEtaMap[phimap.first],[](const int&m){return m;}));
3022  hit_variables.push_back(varowner.back());
3023  varowner.push_back(Monitored::Collection(Form("hit_y_%s", phimap.first.data()),phimap.second,[](const int&m){return m;}));
3024  hit_variables.push_back(varowner.back());
3025  }
3026  for (const auto &phimap : tgcHitPhiMapOnline) {
3027  varowner.push_back(Monitored::Collection(Form("hit_online_x_%s",phimap.first.data()),tgcHitEtaMapOnline[phimap.first],[](const int&m){return m;}));
3028  hit_variables.push_back(varowner.back());
3029  varowner.push_back(Monitored::Collection(Form("hit_online_y_%s", phimap.first.data()),phimap.second,[](const int&m){return m;}));
3030  hit_variables.push_back(varowner.back());
3031  varowner.push_back(Monitored::Collection(Form("hit_online_glblphi_%s", phimap.first.data()),tgcHitPhiMapGlobalOnline[phimap.first],[](const int&m){return m;}));
3032  hit_variables.push_back(varowner.back());
3033  }
3034 
3035  for (const auto &phimap : tgcHitPhiMapGlobal) {
3036  varowner.push_back(Monitored::Collection(Form("hit_glblphi_%s", phimap.first.data()),phimap.second,[](const int&m){return m;}));
3037  hit_variables.push_back(varowner.back());
3038  varowner.push_back(Monitored::Collection(Form("hit_bunch_%s", phimap.first.data()),tgcHitTiming[phimap.first],[](const int&m){return m;}));
3039  hit_variables.push_back(varowner.back());
3040  }
3041  for (const auto &phimap : tgcHitPhiMapGlobalWithTrack) {
3042  varowner.push_back(Monitored::Collection(Form("hit_glblphi_wTrack_%s", phimap.first.data()),phimap.second,[](const int&m){return m;}));
3043  hit_variables.push_back(varowner.back());
3044  varowner.push_back(Monitored::Collection(Form("hit_bunch_wTrack_%s", phimap.first.data()),tgcHitTimingWithTrack[phimap.first],[](const int&m){return m;}));
3045  hit_variables.push_back(varowner.back());
3046  }
3047 
3048  // BCMask plots (for TTCrx gate delay scan)
3049  std::map<std::string, std::vector<int>> tgcHitBCMaskGlobalIndex;
3050  std::map<std::string, std::vector<int>> tgcHitBCMask;
3051  std::map<std::string, std::vector<int>> tgcHitBCMaskBWSectors;
3052  std::map<std::string, std::vector<int>> tgcHitBCMaskForBWSectors;
3053  for(const auto& channelNameAndBCMask : tgcHitBCMaskMap){
3054  if(m_maskChannelList.find(channelNameAndBCMask.first)!=m_maskChannelList.end())continue; // skipping problematic channels
3055  std::string chamberNameWithWS = channelNameAndBCMask.first.substr(0,16); // e.g. A01M01f01E01L01W
3056  int thisChannel = std::atoi( channelNameAndBCMask.first.substr(18,3).data() ); // e.g. 001 of "Ch001"
3057  std::string prev1ChannelName = Form("%sCh%03d",chamberNameWithWS.data(),thisChannel-1);
3058  std::string next1ChannelName = Form("%sCh%03d",chamberNameWithWS.data(),thisChannel+1);
3059  // vetoing if neighboring channels have hits to avoid cross-talk effect
3060  if(tgcHitBCMaskMap.find(prev1ChannelName)!=tgcHitBCMaskMap.end())continue;
3061  if(tgcHitBCMaskMap.find(next1ChannelName)!=tgcHitBCMaskMap.end())continue;
3062  std::string cham_name = channelNameAndBCMask.first.substr(0,12); // e.g. A01M01f01E01
3063  int iLay = std::atoi( channelNameAndBCMask.first.substr(13,2).data() );
3064  TGC::TgcChamber cham; cham.initChamber(cham_name);
3065  int phimap_index = 0;
3066  int etamap_index = 0;
3067  int phimap_global_index = 0;
3068  if(!m_tgcMonTool->getMapIndex(cham,iLay,etamap_index,phimap_index,phimap_global_index ))continue;
3069  std::string station_name = Form("%sM%02d%s",(cham.iSide()==TGC::TGCSIDE::TGCASIDE)?("A"):("C"),cham.iM(),channelNameAndBCMask.first.substr(15,1).data());
3070  for(const auto& tgcHit : channelNameAndBCMask.second){
3071  tgcHitBCMaskGlobalIndex[station_name].push_back(phimap_global_index);
3072  tgcHitBCMask[station_name].push_back(tgcHit.bcmask());
3073  if(cham.iM()!=4){
3074  tgcHitBCMaskBWSectors["All"].push_back( (cham.iSide()==TGC::TGCSIDE::TGCASIDE)?( +1 * cham.iSec() ):(-1 * cham.iSec()) );
3075  tgcHitBCMaskForBWSectors["All"].push_back(tgcHit.bcmask());
3076  if(chamberNameWithWS.find('W')!=std::string::npos){
3077  tgcHitBCMaskBWSectors["Wire"].push_back( (cham.iSide()==TGC::TGCSIDE::TGCASIDE)?( +1 * cham.iSec() ):(-1 * cham.iSec()) );
3078  tgcHitBCMaskForBWSectors["Wire"].push_back(tgcHit.bcmask());
3079  }else{
3080  tgcHitBCMaskBWSectors["Strip"].push_back( (cham.iSide()==TGC::TGCSIDE::TGCASIDE)?( +1 * cham.iSec() ):(-1 * cham.iSec()) );
3081  tgcHitBCMaskForBWSectors["Strip"].push_back(tgcHit.bcmask());
3082  }
3083  }
3084  }
3085  }
3086  std::vector<Monitored::ObjectsCollection<std::vector<int>, double>> varowner_bcmask;
3087  varowner_bcmask.reserve(tgcHitBCMask.size() * 2 + tgcHitBCMaskBWSectors.size() * 2);
3088  for(const auto& chamType : tgcHitBCMaskBWSectors){
3089  varowner_bcmask.push_back(Monitored::Collection(Form("hit_bcmask_bw24sectors_%s",chamType.first.data()),chamType.second,[](const int&m){return m;}));
3090  hit_variables.push_back(varowner_bcmask.back());
3091  varowner_bcmask.push_back(Monitored::Collection(Form("hit_bcmask_for_bw24sectors_%s",chamType.first.data()),tgcHitBCMaskForBWSectors[chamType.first],[](const int&m){return m;}));
3092  hit_variables.push_back(varowner_bcmask.back());
3093  }
3094  for(const auto& stationNameAndBCMask : tgcHitBCMask){
3095  varowner_bcmask.push_back(Monitored::Collection(Form("hit_bcmask_glblphi_%s",stationNameAndBCMask.first.data()),tgcHitBCMaskGlobalIndex[stationNameAndBCMask.first],[](const int&m){return m;}));
3096  hit_variables.push_back(varowner_bcmask.back());
3097  varowner_bcmask.push_back(Monitored::Collection(Form("hit_bcmask_%s",stationNameAndBCMask.first.data()),stationNameAndBCMask.second,[](const int&m){return m;}));
3098  hit_variables.push_back(varowner_bcmask.back());
3099  }
3100 
3101  // gap-by-gap efficiency by track extrapolation
3102  ATH_MSG_DEBUG("preparing for efficiency plots");
3103  std::map<std::string, std::vector<double>> tgcEffPhiMap_Denominator;
3104  std::map<std::string, std::vector<double>> tgcEffEtaMap_Denominator;
3105  std::map<std::string, std::vector<double>> tgcEffPhiMapGlobal_Denominator;
3106  std::map<std::string, std::vector<double>> tgcEffPhiMap_Numerator;
3107  std::map<std::string, std::vector<double>> tgcEffEtaMap_Numerator;
3108  std::map<std::string, std::vector<double>> tgcEffPhiMapGlobal_Numerator;
3109  std::map<std::string, std::vector<double>> tgcEffPhiMapOnline_Denominator;
3110  std::map<std::string, std::vector<double>> tgcEffEtaMapOnline_Denominator;
3111  std::map<std::string, std::vector<double>> tgcEffPhiMapGlobalOnline_Denominator;
3112  std::map<std::string, std::vector<double>> tgcEffPhiMapOnline_Numerator;
3113  std::map<std::string, std::vector<double>> tgcEffEtaMapOnline_Numerator;
3114  std::map<std::string, std::vector<double>> tgcEffPhiMapGlobalOnline_Numerator;
3115  std::map<std::string, std::vector<double>> tgcEffMapExtX;
3116  std::map<std::string, std::vector<double>> tgcEffMapExtY;
3117  std::map<std::string, std::vector<double>> tgcEffMapHasHit;
3118  for(const auto& exts : extpositions){
3119  const std::string& cham_name = exts.first;
3120  TGC::TgcChamber cham; cham.initChamber(cham_name);
3121  // local-coordinate x'-y'
3122  Identifier id2 = muonMgr->tgcIdHelper()->elementID(cham.StationName(), cham.StationEta(), cham.StationPhi());
3123  auto detEle = muonMgr->getTgcReadoutElement(id2);
3124  for(const auto& ext : exts.second){ // how often tracks are extrapolated to this chamber surface,e.i. denominator
3125  Amg::Vector3D extPosLocal = detEle->transform().inverse() * ext.extPos;
3126  Amg::Vector3D extVecLocal = detEle->transform().inverse() * ext.extVec;
3127  for(int iLay = 1 ; iLay <= 3 ; iLay++){
3128  int phimap_index = 0;
3129  int etamap_index = 0;
3130  int phimap_global_index = 0;
3131  if(!m_tgcMonTool->getMapIndex(cham,iLay,etamap_index,phimap_index,phimap_global_index ))continue;
3132 
3133  double newX = extPosLocal.x() - extVecLocal.x() / extVecLocal.z() * extPosLocal.z();
3134  double newY = extPosLocal.y() - extVecLocal.y() / extVecLocal.z() * extPosLocal.z();
3135  for(int iSorW = 0 ; iSorW < 2 ; iSorW++){
3136  if(cham.iM()==1 && iLay==2 && iSorW==0)continue;
3137  std::string gap_name = Form("%sL%02d",cham_name.data(),iLay);
3138  std::string type_name = Form("%sL%02d%s",cham_name.data(),iLay,(iSorW==0)?("S"):("W"));
3139  int nWhits = 0;
3140  int nShits = 0;
3141  for(const auto& chamHasHit : map_muon_and_tgchits[ext.muon]){
3142  if( chamHasHit.find(gap_name) != std::string::npos ) continue; // skipping the same gap
3143  if( chamHasHit.find("M04") != std::string::npos ) continue; // skipping EI/FI
3144  if( chamHasHit.find('W') != std::string::npos ) nWhits++;
3145  if( chamHasHit.find('S') != std::string::npos ) nShits++;
3146  }
3147  if(nWhits < m_nHitsInOtherBWTGCWire)continue;
3148  if(nShits < m_nHitsInOtherBWTGCStrip)continue;
3149  std::string station_name = Form("%sM%02d%s",(cham.iSide()==TGC::TGCSIDE::TGCASIDE)?("A"):("C"),cham.iM(),(iSorW==0)?("S"):("W"));
3150  int phimap_index_online = 0;
3151  int etamap_index_online = 0;
3152  int phimap_global_index_online = 0;
3153  m_tgcMonTool->getMapIndexOnline(type_name,etamap_index_online,phimap_index_online,phimap_global_index_online );
3154  std::string wire_or_strip = (type_name.size()==16) ? Form("%c_%s",type_name[0],(type_name[15]=='W')?("wire"):("strip")) : ("null");
3155  tgcEffPhiMap_Denominator[station_name].push_back(phimap_index);
3156  tgcEffEtaMap_Denominator[station_name].push_back(etamap_index);
3157  tgcEffPhiMapGlobal_Denominator[station_name].push_back(phimap_global_index);
3158  tgcEffPhiMapOnline_Denominator[wire_or_strip].push_back(phimap_index_online);
3159  tgcEffEtaMapOnline_Denominator[wire_or_strip].push_back(etamap_index_online);
3160  tgcEffPhiMapGlobalOnline_Denominator[wire_or_strip].push_back(phimap_global_index_online);
3161  tgcEffMapExtX[type_name].push_back(newX);
3162  tgcEffMapExtY[type_name].push_back(newY);
3163  double hitExist = 0;
3164  if( ext.chambersHasHit.find(type_name) != ext.chambersHasHit.end()) hitExist=1;
3165  tgcEffPhiMap_Numerator[station_name].push_back(hitExist);
3166  tgcEffEtaMap_Numerator[station_name].push_back(hitExist);
3167  tgcEffPhiMapGlobal_Numerator[station_name].push_back(hitExist);
3168  tgcEffPhiMapOnline_Numerator[wire_or_strip].push_back(hitExist);
3169  tgcEffEtaMapOnline_Numerator[wire_or_strip].push_back(hitExist);
3170  tgcEffPhiMapGlobalOnline_Numerator[wire_or_strip].push_back(hitExist);
3171  tgcEffMapHasHit[type_name].push_back(hitExist);
3172 
3173  }
3174  }
3175  }
3176  }
3177 
3178  std::vector<Monitored::ObjectsCollection<std::vector<double>, double>> varowner_hiteff;
3179  std::vector<Monitored::ObjectsCollection<std::vector<TGC::TgcHit>, double>> varowner_eachchamber;
3180  std::vector<Monitored::ObjectsCollection<std::vector<double>, double>> varowner_eachchamber_double;
3181  std::map<std::string,std::vector<double>> cham_and_res;
3182 
3184 
3185  ATH_MSG_DEBUG("hit efficiency plots");
3186  varowner_hiteff.reserve(tgcEffPhiMap_Denominator.size() * 4 + tgcEffPhiMapGlobal_Denominator.size() * 2 + tgcEffMapHasHit.size() * 3 + tgcEffPhiMapOnline_Denominator.size() * 6);
3187  for (const auto &phimap : tgcEffPhiMap_Denominator) {
3188  varowner_hiteff.push_back(Monitored::Collection(Form("hit_effden_x_%s",phimap.first.data()),tgcEffEtaMap_Denominator[phimap.first],[](const double&m){return m;}));
3189  hit_variables.push_back(varowner_hiteff.back());
3190  varowner_hiteff.push_back(Monitored::Collection(Form("hit_effden_y_%s", phimap.first.data()),tgcEffPhiMap_Denominator[phimap.first],[](const double&m){return m;}));
3191  hit_variables.push_back(varowner_hiteff.back());
3192  varowner_hiteff.push_back(Monitored::Collection(Form("hit_effnum_x_%s",phimap.first.data()),tgcEffEtaMap_Numerator[phimap.first],[](const double&m){return m;}));
3193  hit_variables.push_back(varowner_hiteff.back());
3194  varowner_hiteff.push_back(Monitored::Collection(Form("hit_effnum_y_%s", phimap.first.data()),tgcEffPhiMap_Numerator[phimap.first],[](const double&m){return m;}));
3195  hit_variables.push_back(varowner_hiteff.back());
3196  }
3197  for (const auto &phimap : tgcEffPhiMapGlobal_Denominator) {
3198  varowner_hiteff.push_back(Monitored::Collection(Form("hit_glblphi_effden_%s", phimap.first.data()),tgcEffPhiMapGlobal_Denominator[phimap.first],[](const double&m){return m;}));
3199  hit_variables.push_back(varowner_hiteff.back());
3200  varowner_hiteff.push_back(Monitored::Collection(Form("hit_glblphi_effnum_%s", phimap.first.data()),tgcEffPhiMapGlobal_Numerator[phimap.first],[](const double&m){return m;}));
3201  hit_variables.push_back(varowner_hiteff.back());
3202  }
3203  for (const auto &phimap : tgcEffPhiMapOnline_Denominator) {
3204  varowner_hiteff.push_back(Monitored::Collection(Form("hit_online_effden_x_%s",phimap.first.data()),tgcEffEtaMapOnline_Denominator[phimap.first],[](const double&m){return m;}));
3205  hit_variables.push_back(varowner_hiteff.back());
3206  varowner_hiteff.push_back(Monitored::Collection(Form("hit_online_effden_y_%s", phimap.first.data()),tgcEffPhiMapOnline_Denominator[phimap.first],[](const double&m){return m;}));
3207  hit_variables.push_back(varowner_hiteff.back());
3208  varowner_hiteff.push_back(Monitored::Collection(Form("hit_online_effnum_x_%s",phimap.first.data()),tgcEffEtaMapOnline_Numerator[phimap.first],[](const double&m){return m;}));
3209  hit_variables.push_back(varowner_hiteff.back());
3210  varowner_hiteff.push_back(Monitored::Collection(Form("hit_online_effnum_y_%s", phimap.first.data()),tgcEffPhiMapOnline_Numerator[phimap.first],[](const double&m){return m;}));
3211  hit_variables.push_back(varowner_hiteff.back());
3212  varowner_hiteff.push_back(Monitored::Collection(Form("hit_online_glblphi_effden_%s", phimap.first.data()),tgcEffPhiMapGlobalOnline_Denominator[phimap.first],[](const double&m){return m;}));
3213  hit_variables.push_back(varowner_hiteff.back());
3214  varowner_hiteff.push_back(Monitored::Collection(Form("hit_online_glblphi_effnum_%s", phimap.first.data()),tgcEffPhiMapGlobalOnline_Numerator[phimap.first],[](const double&m){return m;}));
3215  hit_variables.push_back(varowner_hiteff.back());
3216  }
3217  for(const auto& hiteffmap : tgcEffMapHasHit){
3218  varowner_hiteff.push_back(Monitored::Collection(Form("hit_localX_effden_%s", hiteffmap.first.data()),tgcEffMapExtX[hiteffmap.first],[](const double&m){return m;}));
3219  hit_variables.push_back(varowner_hiteff.back());
3220  varowner_hiteff.push_back(Monitored::Collection(Form("hit_localY_effden_%s", hiteffmap.first.data()),tgcEffMapExtY[hiteffmap.first],[](const double&m){return m;}));
3221  hit_variables.push_back(varowner_hiteff.back());
3222  varowner_hiteff.push_back(Monitored::Collection(Form("hit_effnum_%s", hiteffmap.first.data()),tgcEffMapHasHit[hiteffmap.first],[](const double&m){return m;}));
3223  hit_variables.push_back(varowner_hiteff.back());
3224  }
3225 
3226  ATH_MSG_DEBUG("gap-by-gap occupancy plots and residual plots");
3227  varowner_eachchamber.reserve(tgcHitsMap.size());
3228  varowner_eachchamber_double.reserve(tgcHitsMap.size());
3229  for (const auto &tgcHitMap : tgcHitsMap) {
3230  auto chanName = tgcHitMap.first;
3231  if(chanName.find('L')!=std::string::npos){ // individual gaps
3232  varowner_eachchamber.push_back(Monitored::Collection(Form("hit_on_%s",chanName.data()),tgcHitMap.second,[](const TGC::TgcHit&m){return m.channel();}));
3233  hit_variables.push_back(varowner_eachchamber.back());
3234  }else{ // only summed over the gaps
3235  for(const auto&tgcHit:tgcHitMap.second){
3236  for(const auto&tgcRes:tgcHit.residuals()){
3237  cham_and_res[chanName].push_back(tgcRes.second);
3238  }
3239  }
3240  varowner_eachchamber_double.push_back(Monitored::Collection(Form("hit_residual_on_%s",chanName.data()),cham_and_res[chanName],[](const double&m){return m;}));
3241  hit_variables.push_back(varowner_eachchamber_double.back());
3242  }
3243  }
3244 
3245  }
3246 
3247  ATH_MSG_DEBUG("before fill for hits");
3248  fill(m_packageName+"_TgcHit", hit_variables);
3249  ATH_MSG_DEBUG("End filling TGC PRD histograms");
3250  }else{
3251  ATH_MSG_WARNING("Couldn't get TGC PRD");
3252  }
3253  }
3254 }
3255 
3256 void
3257 TgcRawDataMonitorAlgorithm::fillMuonRoisInThresholdPattern(std::map<const xAOD::MuonRoI*,std::set<std::string>> &roiAndMenu, std::map<std::string,std::vector<const xAOD::MuonRoI*>> & menuAndRoIs, std::vector<TimedMuonRoI> & AllBCMuonRoIs, const EventContext & ctx) const {
3258 
3259  if(m_monitorThresholdPatterns && AllBCMuonRoIs.size()>0 ){
3260  ATH_MSG_DEBUG("Filling histograms for MuonRoIs in thresholdPattern");
3262  SG::ReadDecorHandle<xAOD::MuonRoIContainer,uint64_t> thrPatternAcc = SG::makeHandle<uint64_t>(m_thresholdPatternsKey, ctx);
3263  if(l1Menu.isValid() && thrPatternAcc.isPresent() && thrPatternAcc.isAvailable()){
3264  for(const auto& item : m_thrMonList){
3265  ATH_MSG_DEBUG("Item = " << item);
3266  bool ok = false;
3267  for(const auto& m : l1Menu->thresholdNames()){
3268  ATH_MSG_DEBUG("item = " << m);
3269  if( m == item ){
3270  ok = true;
3271  break;
3272  }
3273  }
3274  if(!ok){
3275  ATH_MSG_DEBUG("skipping " << item);
3276  continue;
3277  }
3278  ATH_MSG_DEBUG("continue checking " << item);
3279  const TrigConf::L1Threshold& thr = l1Menu->threshold(item.data());
3280  std::vector<const xAOD::MuonRoI*> passed_rois;
3281  for(const auto& allBcMuonRoI : AllBCMuonRoIs){
3282  if(allBcMuonRoI.timing!=0)continue; // only current BC
3283  const xAOD::MuonRoI* roi = allBcMuonRoI.muonRoI;
3284  const uint64_t thrPattern = thrPatternAcc(*roi);
3285  bool passed = ( thrPattern & (1 << thr.mapping()) );
3286  if(passed){
3287  passed_rois.push_back(roi);
3288  ATH_MSG_DEBUG("This RoI passed "<< item <<", roiWord=" << roi->roiWord() << ", thrNumber=" << roi->getThrNumber() << " eta=" << roi->eta() << " phi=" << roi->phi());
3289  if(roiAndMenu.count(roi)==0){
3290  std::set<std::string> items;
3291  roiAndMenu.insert(std::make_pair(roi,items));
3292  }
3293  roiAndMenu[roi].insert(item);
3294  }
3295  }
3296  menuAndRoIs.insert(std::make_pair(item,passed_rois));
3297  }
3298  }
3299  ATH_MSG_DEBUG("End filling histograms for MuonRoIs in thresholdPattern");
3300  }
3301 }
3302 
3303 
3304 
TgcRawDataMonitorAlgorithm::TgcTrigNsw::isForward
int isForward
Definition: TgcRawDataMonitorAlgorithm.h:121
TgcRawDataMonitorAlgorithm::m_tgcMonTool
ToolHandle< ITgcRawDataMonitorTool > m_tgcMonTool
Definition: TgcRawDataMonitorAlgorithm.h:331
TgcRawDataMonitorAlgorithm::m_TgcCoinDataContainerNextBCKey
SG::ReadHandleKey< Muon::TgcCoinDataContainer > m_TgcCoinDataContainerNextBCKey
Definition: TgcRawDataMonitorAlgorithm.h:249
TgcRawDataMonitorAlgorithm::m_useCBTrackForExtrapolation
BooleanProperty m_useCBTrackForExtrapolation
Definition: TgcRawDataMonitorAlgorithm.h:282
TGC::TgcHit::isStrip
const bool & isStrip() const
Definition: TgcHit.h:62
TgcRawDataMonitorAlgorithm::TgcTrigTile::bunch
int bunch
Definition: TgcRawDataMonitorAlgorithm.h:107
TgcRawDataMonitorAlgorithm::m_l1trigMatchWindowPt0a
DoubleProperty m_l1trigMatchWindowPt0a
Definition: TgcRawDataMonitorAlgorithm.h:276
TgcRawDataMonitorAlgorithm::TgcTrigRpc
Definition: TgcRawDataMonitorAlgorithm.h:138
TgcRawDataMonitorAlgorithm::m_TagAndProbeZmumu
BooleanProperty m_TagAndProbeZmumu
Definition: TgcRawDataMonitorAlgorithm.h:262
TgcRawDataMonitorAlgorithm::m_L1MenuKey
SG::ReadHandleKey< TrigConf::L1Menu > m_L1MenuKey
Definition: TgcRawDataMonitorAlgorithm.h:233
TgcRawDataMonitorAlgorithm::TimedMuon::muon
const xAOD::Muon * muon
Definition: TgcRawDataMonitorAlgorithm.h:50
beamspotman.r
def r
Definition: beamspotman.py:676
TGC::TgcChamber::initChamber
void initChamber(const std::string &chamber_name)
Definition: TgcChamber.cxx:8
TrigConf::L1Threshold::mapping
unsigned int mapping() const
Accessor to the mapping number The mapping is unique within a type.
Definition: L1ThresholdBase.h:163
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
Muon::TgcCoinData::INNER_RPC_DPHI_BITSHIFT
static constexpr uint32_t INNER_RPC_DPHI_BITSHIFT
Definition: TgcCoinData.h:252
Muon::TgcPrepData::BCBIT_NEXT
@ BCBIT_NEXT
Definition: TgcPrepData.h:97
TgcRawDataMonitorAlgorithm::TgcTrigTile
Definition: TgcRawDataMonitorAlgorithm.h:98
TgcRawDataMonitorAlgorithm::TgcTrig::x_Out
double x_Out
Definition: TgcRawDataMonitorAlgorithm.h:172
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
MuonGM::MuonClusterReadoutElement::transform
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
Definition: MuonClusterReadoutElement.h:124
TgcRawDataMonitorAlgorithm::m_nHitsInOtherBWTGCStrip
IntegerProperty m_nHitsInOtherBWTGCStrip
Definition: TgcRawDataMonitorAlgorithm.h:306
TgcRawDataMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: TgcRawDataMonitorAlgorithm.cxx:756
TgcRawDataMonitorAlgorithm::fillMuonRoisInThresholdPattern
void fillMuonRoisInThresholdPattern(std::map< const xAOD::MuonRoI *, std::set< std::string >> &, std::map< std::string, std::vector< const xAOD::MuonRoI * >> &, std::vector< TimedMuonRoI > &AllBCMuonRoIs, const EventContext &ctx) const
Definition: TgcRawDataMonitorAlgorithm.cxx:3257
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
TgcRawDataMonitorAlgorithm::MonVariables
std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > MonVariables
Definition: TgcRawDataMonitorAlgorithm.h:316
AthMonitorAlgorithm::dataType
DataType_t dataType() const
Accessor functions for the data type.
Definition: AthMonitorAlgorithm.h:221
TgcRawDataMonitorAlgorithm::m_fillGapByGapHistograms
BooleanProperty m_fillGapByGapHistograms
Definition: TgcRawDataMonitorAlgorithm.h:266
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
TgcRawDataMonitorAlgorithm::TgcTrigTile::slSector
int slSector
Definition: TgcRawDataMonitorAlgorithm.h:99
xAOD::MuonRoI_v1::getPhiOverlap
bool getPhiOverlap() const
Returns whether there's overlap between barrel sectors.
Definition: MuonRoI_v1.cxx:234
xAOD::MuonRoI_v1::Endcap
@ Endcap
The muon candidate was detected in the endcap region.
Definition: MuonRoI_v1.h:35
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
Muon::TgcCoinData::INNER_TILE_BCID_BITSHIFT
static constexpr uint32_t INNER_TILE_BCID_BITSHIFT
Definition: TgcCoinData.h:270
TgcRawDataMonitorAlgorithm::m_useIDTrackForExtrapolation
BooleanProperty m_useIDTrackForExtrapolation
Definition: TgcRawDataMonitorAlgorithm.h:280
python.SystemOfUnits.m2
int m2
Definition: SystemOfUnits.py:92
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
TGC::TgcChamber::cham_name
const std::string & cham_name() const
Definition: TgcChamber.h:43
Muon::TgcCoinData::INNER_RPC_DETA_BIT
static constexpr uint32_t INNER_RPC_DETA_BIT
Definition: TgcCoinData.h:251
TgcRawDataMonitorAlgorithm::CtpDecMonObj::trigItem
std::string trigItem
Definition: TgcRawDataMonitorAlgorithm.h:210
xAOD::MuonRoI_v1::getInnerCoincidence
bool getInnerCoincidence() const
Returns whether or not there was an inner coincidence in the TGC.
Definition: MuonRoI_v1.cxx:299
checkCoolLatestUpdate.variables
variables
Definition: checkCoolLatestUpdate.py:13
TgcRawDataMonitorAlgorithm::m_l1trigMatchWindowPt15
DoubleProperty m_l1trigMatchWindowPt15
Definition: TgcRawDataMonitorAlgorithm.h:273
TGC::TgcChamber::iSec
const int & iSec() const
Definition: TgcChamber.h:46
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
TgcRawDataMonitorAlgorithm::m_TagAndProbe
BooleanProperty m_TagAndProbe
Definition: TgcRawDataMonitorAlgorithm.h:261
TgcRawDataMonitorAlgorithm::TgcTrig::etain
double etain
Definition: TgcRawDataMonitorAlgorithm.h:177
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Muon::TgcPrepData::BCBIT_CURRENT
@ BCBIT_CURRENT
Definition: TgcPrepData.h:97
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
TGRLCollection.h
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
TgcIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: TgcIdHelper.cxx:642
Muon::TgcCoinData::INNER_RPC_BCID_BIT
static constexpr uint32_t INNER_RPC_BCID_BIT
Definition: TgcCoinData.h:257
TgcRawDataMonitorAlgorithm::CtpDecMonObj::rpcR
bool rpcR
Definition: TgcRawDataMonitorAlgorithm.h:221
MuonGM::MuonClusterReadoutElement::center
virtual const Amg::Vector3D & center() const override
Return the center of the element.
Definition: MuonClusterReadoutElement.h:125
TgcRawDataMonitorAlgorithm::m_MuonRoIContainerBCm2Key
SG::ReadHandleKey< xAOD::MuonRoIContainer > m_MuonRoIContainerBCm2Key
Definition: TgcRawDataMonitorAlgorithm.h:241
TgcRawDataMonitorAlgorithm::CoinFlagF
@ CoinFlagF
Definition: TgcRawDataMonitorAlgorithm.h:38
TgcRawDataMonitorAlgorithm::TgcTrig::bunch
int bunch
Definition: TgcRawDataMonitorAlgorithm.h:197
TGC::TgcChamber::StationName
const int & StationName() const
Definition: TgcChamber.h:50
TgcRawDataMonitorAlgorithm::m_requireIsolated
BooleanProperty m_requireIsolated
Definition: TgcRawDataMonitorAlgorithm.h:279
TgcRawDataMonitorAlgorithm::m_streamerFilter
StringProperty m_streamerFilter
Definition: TgcRawDataMonitorAlgorithm.h:237
xAOD::MuonRoI_v1::Neg
@ Neg
Candidate is a mu- from a TGC sector.
Definition: MuonRoI_v1.h:45
TgcIdHelper
Definition: TgcIdHelper.h:50
TgcRawDataMonitorAlgorithm::CtpDecMonObj::title
std::string title
Definition: TgcRawDataMonitorAlgorithm.h:211
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
TGC::TgcHit::channel_name
const std::string & channel_name() const
Definition: TgcHit.h:71
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
xAODP4Helpers.h
TgcRawDataMonitorAlgorithm::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
Definition: TgcRawDataMonitorAlgorithm.h:333
TgcRawDataMonitorAlgorithm::ExtTrigInfo::matchedF
double matchedF
Definition: TgcRawDataMonitorAlgorithm.h:90
TgcRawDataMonitorAlgorithm::m_MuonRoIContainerBCp2Key
SG::ReadHandleKey< xAOD::MuonRoIContainer > m_MuonRoIContainerBCp2Key
Definition: TgcRawDataMonitorAlgorithm.h:244
TgcRawDataMonitorAlgorithm::m_MuonContainerKey
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainerKey
Definition: TgcRawDataMonitorAlgorithm.h:239
TgcRawDataMonitorAlgorithm::TimedMuon::matchedL1Items
std::set< std::string > matchedL1Items
Definition: TgcRawDataMonitorAlgorithm.h:58
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
TgcRawDataMonitorAlgorithm::m_MuonRoIContainerBCp1Key
SG::ReadHandleKey< xAOD::MuonRoIContainer > m_MuonRoIContainerBCp1Key
Definition: TgcRawDataMonitorAlgorithm.h:243
TgcRawDataMonitorAlgorithm::TgcTrig::z_Out
double z_Out
Definition: TgcRawDataMonitorAlgorithm.h:174
TgcRawDataMonitorAlgorithm::fillThresholdPatternHistograms
void fillThresholdPatternHistograms(std::map< std::string, std::vector< const xAOD::MuonRoI * >> &menuAndRoIs, const std::vector< TimedMuon > &mymuons, const EventContext &ctx) const
Definition: TgcRawDataMonitorAlgorithm.cxx:2670
TgcRawDataMonitorAlgorithm::TgcTrig::loosemuonMatched
int loosemuonMatched
Definition: TgcRawDataMonitorAlgorithm.h:200
TgcRawDataMonitorAlgorithm.h
TgcRawDataMonitorAlgorithm::m_M1_Z
DoubleProperty m_M1_Z
Definition: TgcRawDataMonitorAlgorithm.h:291
TgcRawDataMonitorAlgorithm::m_l1trigMatchWindowPt10a
DoubleProperty m_l1trigMatchWindowPt10a
Definition: TgcRawDataMonitorAlgorithm.h:274
TgcRawDataMonitorAlgorithm::TgcTrigEifi::currBc
int currBc
Definition: TgcRawDataMonitorAlgorithm.h:164
TgcRawDataMonitorAlgorithm::m_l1trigMatchWindowPt0b
DoubleProperty m_l1trigMatchWindowPt0b
Definition: TgcRawDataMonitorAlgorithm.h:277
TgcRawDataMonitorAlgorithm::TgcTrigNsw::Phi
int Phi
Definition: TgcRawDataMonitorAlgorithm.h:127
TgcRawDataMonitorAlgorithm::TgcTrig::eta
double eta
Definition: TgcRawDataMonitorAlgorithm.h:175
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
TgcRawDataMonitorAlgorithm::m_TgcCoinDataContainerNextNextBCKey
SG::ReadHandleKey< Muon::TgcCoinDataContainer > m_TgcCoinDataContainerNextNextBCKey
Definition: TgcRawDataMonitorAlgorithm.h:250
TgcRawDataMonitorAlgorithm::TimedMuon::matchedL1ThrExclusiveTGC
std::set< int > matchedL1ThrExclusiveTGC
Definition: TgcRawDataMonitorAlgorithm.h:55
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
TgcRawDataMonitorAlgorithm::m_residualWindow
DoubleProperty m_residualWindow
Definition: TgcRawDataMonitorAlgorithm.h:302
TgcRawDataMonitorAlgorithm::m_useExtMSTrackForExtrapolation
BooleanProperty m_useExtMSTrackForExtrapolation
Definition: TgcRawDataMonitorAlgorithm.h:283
TgcRawDataMonitorAlgorithm::TgcTrig::veto
int veto
Definition: TgcRawDataMonitorAlgorithm.h:196
Muon::TgcCoinData::INNER_RPC_PHI_BITSHIFT
static constexpr uint32_t INNER_RPC_PHI_BITSHIFT
Definition: TgcCoinData.h:248
AthMonitorAlgorithm::getTrigDecisionTool
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool() const
Get the trigger decision tool member.
Definition: AthMonitorAlgorithm.cxx:189
test_pyathena.pt
pt
Definition: test_pyathena.py:11
xAOD::MuonRoI_v1::getCharge
Charge getCharge() const
Returns the charge sign of the muon candidate.
Definition: MuonRoI_v1.cxx:264
TgcRawDataMonitorAlgorithm::TgcTrigRpc::bunch
int bunch
Definition: TgcRawDataMonitorAlgorithm.h:150
M_PI
#define M_PI
Definition: ActiveFraction.h:11
xAOD::passBits
passBits
Definition: TrigPassBits_v1.cxx:115
TGC::TgcHit::X
const double & X() const
Definition: TgcHit.h:56
SG::ReadDecorHandle::isPresent
bool isPresent() const
Is the referenced container present in SG?
TgcRawDataMonitorAlgorithm::ExtTrigInfo::matchedQ
double matchedQ
Definition: TgcRawDataMonitorAlgorithm.h:89
xAOD::MuonRoI_v1::eta
float eta() const
The pseudorapidity ( ) of the muon candidate.
TgcRawDataMonitorAlgorithm::m_endcapPivotPlaneMinimumRadius
DoubleProperty m_endcapPivotPlaneMinimumRadius
Definition: TgcRawDataMonitorAlgorithm.h:299
TgcRawDataMonitorAlgorithm::TgcTrigNsw::isAside
int isAside
Definition: TgcRawDataMonitorAlgorithm.h:122
TgcRawDataMonitorAlgorithm::m_l1trigMatchWindowPt10b
DoubleProperty m_l1trigMatchWindowPt10b
Definition: TgcRawDataMonitorAlgorithm.h:275
MuonGM::TgcReadoutElement::stripLength
double stripLength() const
Returns the length of each strip which is equal to the height of the chamber.
TgcRawDataMonitorAlgorithm::TimedMuon
Definition: TgcRawDataMonitorAlgorithm.h:49
TgcRawDataMonitorAlgorithm::TimedMuon::matchedL1ThrExclusive
std::set< int > matchedL1ThrExclusive
Definition: TgcRawDataMonitorAlgorithm.h:54
Monitored::ObjectsCollection
Monitoring of object collections (internal)
Definition: MonitoredCollection.h:19
Muon::TgcCoinData::TYPE_TRACKLET
@ TYPE_TRACKLET
Definition: TgcCoinData.h:50
Muon::TgcCoinData::INNER_NSW_BCID_BITSHIFT
static constexpr uint32_t INNER_NSW_BCID_BITSHIFT
Definition: TgcCoinData.h:240
TrigRoiDescriptor
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
Definition: TrigRoiDescriptor.h:56
TgcRawDataMonitorAlgorithm::TgcTrigTile::bcid
int bcid
Definition: TgcRawDataMonitorAlgorithm.h:106
Trk::alongMomentum
@ alongMomentum
Definition: PropDirection.h:20
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
TgcRawDataMonitorAlgorithm::TgcTrigNsw::slSector
int slSector
Definition: TgcRawDataMonitorAlgorithm.h:115
TGC::TgcHit::Y
const double & Y() const
Definition: TgcHit.h:57
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
TgcRawDataMonitorAlgorithm::TgcTrigNsw::bunch
int bunch
Definition: TgcRawDataMonitorAlgorithm.h:130
TgcRawDataMonitorAlgorithm::m_monitorThresholdPatterns
BooleanProperty m_monitorThresholdPatterns
Definition: TgcRawDataMonitorAlgorithm.h:235
TgcRawDataMonitorAlgorithm::ExtTrigInfo::matchedNSW
double matchedNSW
Definition: TgcRawDataMonitorAlgorithm.h:96
TgcRawDataMonitorAlgorithm::getMatchingWindow
double getMatchingWindow(const xAOD::Muon *muon) const
Definition: TgcRawDataMonitorAlgorithm.cxx:2659
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
MuonIdHelper::stationName
int stationName(const Identifier &id) const
Definition: MuonIdHelper.cxx:800
TgcRawDataMonitorAlgorithm::TgcTrigNsw::bcmask
int bcmask
Definition: TgcRawDataMonitorAlgorithm.h:136
TgcRawDataMonitorAlgorithm::m_TgcPrepDataContainerKey
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_TgcPrepDataContainerKey
Definition: TgcRawDataMonitorAlgorithm.h:246
TgcRawDataMonitorAlgorithm::m_maskChannelFileName
StringProperty m_maskChannelFileName
Definition: TgcRawDataMonitorAlgorithm.h:308
TgcRawDataMonitorAlgorithm::m_MuonRoIContainerKey
SG::ReadHandleKey< xAOD::MuonRoIContainer > m_MuonRoIContainerKey
Definition: TgcRawDataMonitorAlgorithm.h:240
TgcRawDataMonitorAlgorithm::TgcTrig::width_R
double width_R
Definition: TgcRawDataMonitorAlgorithm.h:181
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
TrigConf::L1Menu::thresholdNames
std::vector< std::string > thresholdNames() const
List of L1 thresholds names.
Definition: L1Menu.cxx:242
TgcRawDataMonitorAlgorithm::TgcTrigRpc::rpcEta
int rpcEta
Definition: TgcRawDataMonitorAlgorithm.h:145
TgcRawDataMonitorAlgorithm::TgcTrigRpc::rpcDPhi
int rpcDPhi
Definition: TgcRawDataMonitorAlgorithm.h:148
Muon::TgcCoinData::INNER_RPC_DETA_BITSHIFT
static constexpr uint32_t INNER_RPC_DETA_BITSHIFT
Definition: TgcCoinData.h:250
TgcRawDataMonitorAlgorithm::TimedMuon::matchedL1ThrInclusiveTGC
std::set< int > matchedL1ThrInclusiveTGC
Definition: TgcRawDataMonitorAlgorithm.h:57
empty
bool empty(TH1 *h)
Definition: computils.cxx:295
TgcRawDataMonitorAlgorithm::m_zMassWindow
DoubleProperty m_zMassWindow
Definition: TgcRawDataMonitorAlgorithm.h:298
Identifier::is_valid
bool is_valid() const
Check if id is in a valid state.
TgcRawDataMonitorAlgorithm::TgcTrigNsw::R
int R
Definition: TgcRawDataMonitorAlgorithm.h:126
TgcRawDataMonitorAlgorithm::fillRoiHistograms
void fillRoiHistograms(const std::vector< TgcRawDataMonitorAlgorithm::TimedMuonRoI > &roiVec, const EventContext &ctx) const
Definition: TgcRawDataMonitorAlgorithm.cxx:300
TgcRawDataMonitorAlgorithm::TimedMuonRoI
Definition: TgcRawDataMonitorAlgorithm.h:41
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
TgcRawDataMonitorAlgorithm::m_useDirectPrimaryTrackForExtrapolation
BooleanProperty m_useDirectPrimaryTrackForExtrapolation
Definition: TgcRawDataMonitorAlgorithm.h:285
TgcRawDataMonitorAlgorithm::m_MuonRoIContainerBCm1Key
SG::ReadHandleKey< xAOD::MuonRoIContainer > m_MuonRoIContainerBCm1Key
Definition: TgcRawDataMonitorAlgorithm.h:242
Muon::TgcCoinData::INNER_RPC_DPHI_BIT
static constexpr uint32_t INNER_RPC_DPHI_BIT
Definition: TgcCoinData.h:253
TgcRawDataMonitorAlgorithm::m_muonToPVdca
DoubleProperty m_muonToPVdca
Definition: TgcRawDataMonitorAlgorithm.h:255
Muon::TgcCoinData::INNER_NSW_INPUT_BITSHIFT
static constexpr uint32_t INNER_NSW_INPUT_BITSHIFT
Definition: TgcCoinData.h:242
TgcRawDataMonitorAlgorithm::m_muonToPVdzOffset
DoubleProperty m_muonToPVdzOffset
Definition: TgcRawDataMonitorAlgorithm.h:254
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
MuonGM::TgcReadoutElement::wireGangPos
Amg::Vector3D wireGangPos(const Identifier &id) const
Returns the global position of a wireGang.
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
Muon::TgcCoinData::INNER_NSW_DTHETA_BIT
static constexpr uint32_t INNER_NSW_DTHETA_BIT
Definition: TgcCoinData.h:233
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
TgcRawDataMonitorAlgorithm::m_pTCutOnExtrapolation
DoubleProperty m_pTCutOnExtrapolation
Definition: TgcRawDataMonitorAlgorithm.h:289
TgcRawDataMonitorAlgorithm::m_tagMuonInDifferentSystem
BooleanProperty m_tagMuonInDifferentSystem
Definition: TgcRawDataMonitorAlgorithm.h:263
TgcRawDataMonitorAlgorithm::m_PrimaryVertexContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_PrimaryVertexContainerKey
Definition: TgcRawDataMonitorAlgorithm.h:251
TgcRawDataMonitorAlgorithm::TgcTrig::width_Out
double width_Out
Definition: TgcRawDataMonitorAlgorithm.h:180
TgcRawDataMonitorAlgorithm::TimedMuon::matchedL1ThrInclusive
std::set< int > matchedL1ThrInclusive
Definition: TgcRawDataMonitorAlgorithm.h:56
TgcRawDataMonitorAlgorithm::TgcTrigRpc::rpcDEta
int rpcDEta
Definition: TgcRawDataMonitorAlgorithm.h:147
TgcIdHelper::channel
int channel(const Identifier &id) const override
Definition: TgcIdHelper.cxx:649
TgcRawDataMonitorAlgorithm::m_GoodRunsListSelectorTool
ToolHandle< IGoodRunsListSelectorTool > m_GoodRunsListSelectorTool
Definition: TgcRawDataMonitorAlgorithm.h:329
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
TgcRawDataMonitorAlgorithm::CoinFlagRPC
@ CoinFlagRPC
Definition: TgcRawDataMonitorAlgorithm.h:38
TgcRawDataMonitorAlgorithm::TgcTrig
Definition: TgcRawDataMonitorAlgorithm.h:167
TgcRawDataMonitorAlgorithm::TimedMuon::matchedL1Charge
bool matchedL1Charge
Definition: TgcRawDataMonitorAlgorithm.h:59
TGC::TgcHit::Z
const double & Z() const
Definition: TgcHit.h:58
MuonGM::MuonDetectorManager::getTgcReadoutElement
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:247
InDet::ExclusiveOrigin::Primary
@ Primary
Definition: InDetTrackTruthOriginDefs.h:163
TgcRawDataMonitorAlgorithm::TgcTrigNsw::bcid
int bcid
Definition: TgcRawDataMonitorAlgorithm.h:129
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
TgcRawDataMonitorAlgorithm::CtpDecMonObj::tgcF
bool tgcF
Definition: TgcRawDataMonitorAlgorithm.h:218
TgcRawDataMonitorAlgorithm::CtpDecMonObj::multiplicity
long unsigned int multiplicity
Definition: TgcRawDataMonitorAlgorithm.h:212
CxxUtils::vec
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
Definition: vec.h:207
PyPoolBrowser.item
item
Definition: PyPoolBrowser.py:129
TgcRawDataMonitorAlgorithm::TgcTrig::roi
int roi
Definition: TgcRawDataMonitorAlgorithm.h:192
xAOD::MuonRoI_v1::isRun3
bool isRun3() const
Returns extra flag at end of RoI word indicating that it's in Run3 format.
Definition: MuonRoI_v1.cxx:328
TgcRawDataMonitorAlgorithm::m_anaOfflMuon
BooleanProperty m_anaOfflMuon
Definition: TgcRawDataMonitorAlgorithm.h:267
TgcRawDataMonitorAlgorithm::TgcTrig::isBiased
int isBiased
Definition: TgcRawDataMonitorAlgorithm.h:201
TgcRawDataMonitorAlgorithm::ExtTrigInfo::matchedRPC
double matchedRPC
Definition: TgcRawDataMonitorAlgorithm.h:95
TgcRawDataMonitorAlgorithm::m_useMSOnlyExtMSTrackForExtrapolation
BooleanProperty m_useMSOnlyExtMSTrackForExtrapolation
Definition: TgcRawDataMonitorAlgorithm.h:284
xAOD::MuonRoI_v1::isMoreCandInRoI
bool isMoreCandInRoI() const
Returns if there were other muons detected in the same RoI.
Definition: MuonRoI_v1.cxx:174
TgcRawDataMonitorAlgorithm::m_useMSTrackForExtrapolation
BooleanProperty m_useMSTrackForExtrapolation
Definition: TgcRawDataMonitorAlgorithm.h:281
TgcRawDataMonitorAlgorithm::m_CtpDecMonObj
std::vector< CtpDecMonObj > m_CtpDecMonObj
Definition: TgcRawDataMonitorAlgorithm.h:312
xAOD::MuonRoI_v1::isVetoed
bool isVetoed() const
Returns the veto flag for the candidate.
Definition: MuonRoI_v1.cxx:319
TgcRawDataMonitorAlgorithm::TgcTrig::type
int type
Definition: TgcRawDataMonitorAlgorithm.h:188
TgcRawDataMonitorAlgorithm::CoinFlagC
@ CoinFlagC
Definition: TgcRawDataMonitorAlgorithm.h:38
Muon::TgcPrepData::BCBIT_PREVIOUS
@ BCBIT_PREVIOUS
Definition: TgcPrepData.h:97
TgcRawDataMonitorAlgorithm::TgcTrig::width_Phi
double width_Phi
Definition: TgcRawDataMonitorAlgorithm.h:182
TgcRawDataMonitorAlgorithm::m_NswDeltaRCut
DoubleProperty m_NswDeltaRCut
Definition: TgcRawDataMonitorAlgorithm.h:309
MuonGM::TgcReadoutElement::gangLongWidth
double gangLongWidth(int gasGap, int gang) const
Returns the length of the most top wire in the gang.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:86
Muon::TgcCoinData::TYPE_HIPT
@ TYPE_HIPT
Definition: TgcCoinData.h:51
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TgcRawDataMonitorAlgorithm::TgcTrig::isAside
int isAside
Definition: TgcRawDataMonitorAlgorithm.h:183
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
id2
HWIdentifier id2
Definition: LArRodBlockPhysicsV0.cxx:562
TgcRawDataMonitorAlgorithm::ExtTrigInfo::matchedEI
double matchedEI
Definition: TgcRawDataMonitorAlgorithm.h:93
TgcRawDataMonitorAlgorithm::m_pTCutOnTrigExtrapolation
DoubleProperty m_pTCutOnTrigExtrapolation
Definition: TgcRawDataMonitorAlgorithm.h:290
TgcRawDataMonitorAlgorithm::TgcTrigRpc::rpcPhi
int rpcPhi
Definition: TgcRawDataMonitorAlgorithm.h:146
lumiFormat.i
int i
Definition: lumiFormat.py:85
TgcRawDataMonitorAlgorithm::m_FI_Z
DoubleProperty m_FI_Z
Definition: TgcRawDataMonitorAlgorithm.h:295
TgcRawDataMonitorAlgorithm::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: TgcRawDataMonitorAlgorithm.h:231
TgcRawDataMonitorAlgorithm::CoinFlagH
@ CoinFlagH
Definition: TgcRawDataMonitorAlgorithm.h:38
z
#define z
TgcRawDataMonitorAlgorithm::TgcTrigRpc::slSector
int slSector
Definition: TgcRawDataMonitorAlgorithm.h:139
xAOD::P4Helpers::deltaR
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi
Definition: xAODP4Helpers.h:150
TgcRawDataMonitorAlgorithm::ExtTrigInfo::matchedH
double matchedH
Definition: TgcRawDataMonitorAlgorithm.h:92
Muon::TgcCoinData::INNER_TILE_MODULE_BIT
static constexpr uint32_t INNER_TILE_MODULE_BIT
Definition: TgcCoinData.h:269
TgcRawDataMonitorAlgorithm::m_zMass
DoubleProperty m_zMass
Definition: TgcRawDataMonitorAlgorithm.h:297
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TgcRawDataMonitorAlgorithm::TgcTrigEifi::bunch
int bunch
Definition: TgcRawDataMonitorAlgorithm.h:163
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TgcRawDataMonitorAlgorithm::m_maskChannelList
std::set< std::string > m_maskChannelList
Definition: TgcRawDataMonitorAlgorithm.h:314
MuonGM::TgcReadoutElement::gangShortWidth
double gangShortWidth(int gasGap, int gang) const
Returns the length of the most bottom wire in the gang.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:79
TgcRawDataMonitorAlgorithm::m_thresholdPatternsKey
SG::ReadDecorHandleKey< xAOD::MuonRoIContainer > m_thresholdPatternsKey
Definition: TgcRawDataMonitorAlgorithm.h:234
TgcRawDataMonitorAlgorithm::m_useOnlyCombinedMuons
BooleanProperty m_useOnlyCombinedMuons
Definition: TgcRawDataMonitorAlgorithm.h:286
TgcRawDataMonitorAlgorithm::TimedMuon::passGoodMF
bool passGoodMF
Definition: TgcRawDataMonitorAlgorithm.h:62
TgcRawDataMonitorAlgorithm::TimedMuon::passIsMoreCandInRoI
bool passIsMoreCandInRoI
Definition: TgcRawDataMonitorAlgorithm.h:63
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
TgcRawDataMonitorAlgorithm::TgcTrigTile::currBc
int currBc
Definition: TgcRawDataMonitorAlgorithm.h:108
xAOD::MuonRoI_v1
Class describing a LVL1 muon region of interest.
Definition: MuonRoI_v1.h:29
MuonGM::TgcReadoutElement
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:42
TgcRawDataMonitorAlgorithm::m_EI_Z
DoubleProperty m_EI_Z
Definition: TgcRawDataMonitorAlgorithm.h:294
Muon::TgcCoinData::INNER_RPC_ETA_BITSHIFT
static constexpr uint32_t INNER_RPC_ETA_BITSHIFT
Bit info in int inner for the RPC inner-coincidence.
Definition: TgcCoinData.h:246
TgcRawDataMonitorAlgorithm::m_muonSelectionTool
ToolHandle< CP::IMuonSelectionTool > m_muonSelectionTool
Definition: TgcRawDataMonitorAlgorithm.h:332
xAOD::MuonRoI_v1::getSource
RoISource getSource() const
Returns the system that detected the muon candidate.
Definition: MuonRoI_v1.cxx:202
Muon::TgcCoinData::INNER_TILE_MODULE_BITSHIFT
static constexpr uint32_t INNER_TILE_MODULE_BITSHIFT
Bit info in int inner for the Tile inner-coincidence.
Definition: TgcCoinData.h:268
Muon::TgcCoinData::INNER_NSW_DTHETA_BITSHIFT
static constexpr uint32_t INNER_NSW_DTHETA_BITSHIFT
Definition: TgcCoinData.h:232
TgcRawDataMonitorAlgorithm::m_packageName
StringProperty m_packageName
Definition: TgcRawDataMonitorAlgorithm.h:257
MuonGM::TgcReadoutElement::gangRadialLength
double gangRadialLength(int gasGap, int gang) const
Returns the length of the wire gang along the radial direction [pitch x N_{wire}^{gang}].
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:72
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TgcRawDataMonitorAlgorithm::m_doExpressProcessing
BooleanProperty m_doExpressProcessing
Definition: TgcRawDataMonitorAlgorithm.h:256
TgcRawDataMonitorAlgorithm::CtpDecMonObj::tgcThr
int tgcThr
Definition: TgcRawDataMonitorAlgorithm.h:214
TgcRawDataMonitorAlgorithm::m_ctpDecMonList
StringProperty m_ctpDecMonList
Definition: TgcRawDataMonitorAlgorithm.h:258
MakeFileForMJB.ext
string ext
Definition: Moriond2016/MakeFileForMJB.py:41
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
TgcRawDataMonitorAlgorithm::m_endcapPivotPlaneMaximumRadius
DoubleProperty m_endcapPivotPlaneMaximumRadius
Definition: TgcRawDataMonitorAlgorithm.h:300
xAOD::Vertex_v1::z
float z() const
Returns the z position.
TGC::TgcHit::type_name
const std::string & type_name() const
Definition: TgcHit.h:70
AthMonitorAlgorithm::fill
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by reference.
TgcRawDataMonitorAlgorithm::TgcTrig::trackletId
int trackletId
Definition: TgcRawDataMonitorAlgorithm.h:189
TgcRawDataMonitorAlgorithm::CoinFlagEI
@ CoinFlagEI
Definition: TgcRawDataMonitorAlgorithm.h:38
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
TgcRawDataMonitorAlgorithm::CoinFlagTile
@ CoinFlagTile
Definition: TgcRawDataMonitorAlgorithm.h:38
Muon::TgcCoinData::INNER_RPC_BCID_BITSHIFT
static constexpr uint32_t INNER_RPC_BCID_BITSHIFT
Definition: TgcCoinData.h:256
TgcRawDataMonitorAlgorithm::m_anaMuonRoI
BooleanProperty m_anaMuonRoI
Definition: TgcRawDataMonitorAlgorithm.h:271
TgcRawDataMonitorAlgorithm::TgcTrig::muonMatched
int muonMatched
Definition: TgcRawDataMonitorAlgorithm.h:199
Trk::muon
@ muon
Definition: ParticleHypothesis.h:28
AthMonitorAlgorithm::GetEventInfo
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
Definition: AthMonitorAlgorithm.cxx:107
Muon::TgcCoinData::TYPE_UNKNOWN
@ TYPE_UNKNOWN
Definition: TgcCoinData.h:53
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
TgcIdHelper::isStrip
int isStrip(const Identifier &id) const
isStrip corresponds to measuresPhi
Definition: TgcIdHelper.cxx:645
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Muon::TgcCoinData::INNER_NSW_PHI_BIT
static constexpr uint32_t INNER_NSW_PHI_BIT
Definition: TgcCoinData.h:231
Trk::Combined
@ Combined
Definition: TrackSummaryTool.h:32
AthMonitorAlgorithm::DataType_t::cosmics
@ cosmics
TgcIdHelper::elementID
Identifier elementID(int stationName, int stationEta, int stationPhi) const
Definition: TgcIdHelper.cxx:556
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:810
TgcRawDataMonitorAlgorithm::TgcTrig::width_In
double width_In
Definition: TgcRawDataMonitorAlgorithm.h:179
MuonGM::TgcReadoutElement::stripPos
Amg::Vector3D stripPos(int gasGap, int strip) const
Returns the global position of a strip.
TGC::TgcChamber
Definition: TgcChamber.h:10
TgcRawDataMonitorAlgorithm::getNswRindexFromEta
double getNswRindexFromEta(const double &eta) const
Definition: TgcRawDataMonitorAlgorithm.cxx:2653
xAOD::MuonRoI_v1::Barrel
@ Barrel
The muon candidate was detected in the barrel region.
Definition: MuonRoI_v1.h:34
TgcRawDataMonitorAlgorithm::TgcTrigNsw::currBc
int currBc
Definition: TgcRawDataMonitorAlgorithm.h:131
xAOD::MuonRoI_v1::Negative
@ Negative
The candidate came from the -z side (side C)
Definition: MuonRoI_v1.h:41
dumpTgcDigiThreshold.isStrip
list isStrip
Definition: dumpTgcDigiThreshold.py:33
MuonGM::TgcReadoutElement::stripLongWidth
double stripLongWidth(int, int) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:162
MuonGM::MuonDetectorManager::tgcIdHelper
const TgcIdHelper * tgcIdHelper() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:238
TgcRawDataMonitorAlgorithm::m_dPhiCutOnM3
DoubleProperty m_dPhiCutOnM3
Definition: TgcRawDataMonitorAlgorithm.h:303
TgcRawDataMonitorAlgorithm::CoinFlags
@ CoinFlags
Definition: TgcRawDataMonitorAlgorithm.h:39
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TgcRawDataMonitorAlgorithm::TgcTrigRpc::bcid
int bcid
Definition: TgcRawDataMonitorAlgorithm.h:149
TgcRawDataMonitorAlgorithm::m_dumpFullChannelList
BooleanProperty m_dumpFullChannelList
Definition: TgcRawDataMonitorAlgorithm.h:307
TgcRawDataMonitorAlgorithm::m_dRCutOnM3
DoubleProperty m_dRCutOnM3
Definition: TgcRawDataMonitorAlgorithm.h:304
TrigConf::L1Menu::threshold
const TrigConf::L1Threshold & threshold(const std::string &thresholdName) const
Access to L1Threshold by name.
Definition: L1Menu.cxx:279
TgcRawDataMonitorAlgorithm::CtpDecMonObj::tgcC
bool tgcC
Definition: TgcRawDataMonitorAlgorithm.h:219
TgcRawDataMonitorAlgorithm::m_TgcCoinDataContainerPrevBCKey
SG::ReadHandleKey< Muon::TgcCoinDataContainer > m_TgcCoinDataContainerPrevBCKey
Definition: TgcRawDataMonitorAlgorithm.h:247
charge
double charge(const T &p)
Definition: AtlasPID.h:756
TgcRawDataMonitorAlgorithm::m_printAvailableMuonTriggers
BooleanProperty m_printAvailableMuonTriggers
Definition: TgcRawDataMonitorAlgorithm.h:260
TgcRawDataMonitorAlgorithm::m_thrPatternList
StringProperty m_thrPatternList
Definition: TgcRawDataMonitorAlgorithm.h:236
TgcRawDataMonitorAlgorithm::TgcTrig::isInner
int isInner
Definition: TgcRawDataMonitorAlgorithm.h:186
Muon::TgcCoinData::INNER_NSW_R_BITSHIFT
static constexpr uint32_t INNER_NSW_R_BITSHIFT
Bit info in int inner for the NSW inner-coincidence.
Definition: TgcCoinData.h:228
TgcRawDataMonitorAlgorithm::TgcTrig::inner
int inner
Definition: TgcRawDataMonitorAlgorithm.h:198
python.ElectronD3PDObject.matched
matched
Definition: ElectronD3PDObject.py:138
TgcRawDataMonitorAlgorithm::TimedMuon::passInnerCoin
bool passInnerCoin
Definition: TgcRawDataMonitorAlgorithm.h:61
MuonParameters::MuidSA
@ MuidSA
Definition: MuonParamDefs.h:59
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
TGC::TgcHit::addResidual
void addResidual(const xAOD::Muon *m, const double v)
Definition: TgcHit.h:73
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:805
item
Definition: ItemListSvc.h:43
Muon::TgcCoinData::INNER_NSW_BCID_BIT
static constexpr uint32_t INNER_NSW_BCID_BIT
Definition: TgcCoinData.h:241
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
TgcRawDataMonitorAlgorithm::TgcTrig::isStrip
int isStrip
Definition: TgcRawDataMonitorAlgorithm.h:185
AthMonitorAlgorithm::lbAverageInteractionsPerCrossing
virtual float lbAverageInteractionsPerCrossing(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the average mu, i.e.
Definition: AthMonitorAlgorithm.cxx:222
TgcRawDataMonitorAlgorithm::TgcTrigRpc::currBc
int currBc
Definition: TgcRawDataMonitorAlgorithm.h:151
TGC::TgcChamber::StationEta
const int & StationEta() const
Definition: TgcChamber.h:51
TgcRawDataMonitorAlgorithm::m_anaTgcPrd
BooleanProperty m_anaTgcPrd
Definition: TgcRawDataMonitorAlgorithm.h:264
TgcRawDataMonitorAlgorithm::TgcTrig::pt
int pt
Definition: TgcRawDataMonitorAlgorithm.h:193
MuonGM::TgcReadoutElement::stripShortWidth
double stripShortWidth(int, int) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:150
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
TgcRawDataMonitorAlgorithm::ExtTrigInfo::phi
double phi
Definition: TgcRawDataMonitorAlgorithm.h:87
Muon::TgcCoinData::INNER_RPC_ETA_BIT
static constexpr uint32_t INNER_RPC_ETA_BIT
Definition: TgcCoinData.h:247
TGC::TgcChamber::iM
const int & iM() const
Definition: TgcChamber.h:47
AthMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: AthMonitorAlgorithm.cxx:18
TgcRawDataMonitorAlgorithm::ExtTrigInfo
Definition: TgcRawDataMonitorAlgorithm.h:85
TgcRawDataMonitorAlgorithm::TgcTrigNsw::slInputIndex
int slInputIndex
Definition: TgcRawDataMonitorAlgorithm.h:117
TgcRawDataMonitorAlgorithm::TgcTrig::isForward
int isForward
Definition: TgcRawDataMonitorAlgorithm.h:184
MuonParameters::MuidCo
@ MuidCo
Definition: MuonParamDefs.h:60
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
xAOD::thrPattern
thrPattern
Definition: EmTauRoI_v2.cxx:60
TgcRawDataMonitorAlgorithm::TgcTrig::phi
double phi
Definition: TgcRawDataMonitorAlgorithm.h:176
Amg::deltaR
double deltaR(const Amg::Vector3D &v1, const Amg::Vector3D &v2)
Definition: GeoPrimitivesHelpers.h:122
TgcRawDataMonitorAlgorithm::m_isolationWindow
DoubleProperty m_isolationWindow
Definition: TgcRawDataMonitorAlgorithm.h:278
TgcRawDataMonitorAlgorithm::TgcTrigEifi::slSector
int slSector
Definition: TgcRawDataMonitorAlgorithm.h:158
TgcRawDataMonitorAlgorithm::ExtPos
Definition: TgcRawDataMonitorAlgorithm.h:75
python.testIfMatch.matrix
matrix
Definition: testIfMatch.py:66
TgcRawDataMonitorAlgorithm::m_useMuonSelectorTool
BooleanProperty m_useMuonSelectorTool
Definition: TgcRawDataMonitorAlgorithm.h:288
TgcRawDataMonitorAlgorithm::TgcRawDataMonitorAlgorithm
TgcRawDataMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TgcRawDataMonitorAlgorithm.cxx:39
TgcRawDataMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: TgcRawDataMonitorAlgorithm.cxx:43
TgcRawDataMonitorAlgorithm::m_anaTgcCoin
BooleanProperty m_anaTgcCoin
Definition: TgcRawDataMonitorAlgorithm.h:265
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
TgcRawDataMonitorAlgorithm::TgcTrig::etaout
double etaout
Definition: TgcRawDataMonitorAlgorithm.h:178
TgcRawDataMonitorAlgorithm::ExtTrigInfo::matchedC
double matchedC
Definition: TgcRawDataMonitorAlgorithm.h:91
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:50
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TgcRawDataMonitorAlgorithm::CtpDecMonObj::rpcThr
int rpcThr
Definition: TgcRawDataMonitorAlgorithm.h:213
Muon::TgcCoinData::TYPE_SL
@ TYPE_SL
Definition: TgcCoinData.h:52
TrigRoiDescriptorCollection
Definition: TrigRoiDescriptorCollection.h:21
Trk::BoundaryCheck
Definition: BoundaryCheck.h:51
TgcRawDataMonitorAlgorithm::fillTgcCoinEff
void fillTgcCoinEff(const std::string &, const std::vector< TgcTrig > &, const std::vector< ExtPos > &, std::vector< ExtTrigInfo > &, std::vector< Monitored::ObjectsCollection< std::vector< ExtTrigInfo >, double >> &, MonVariables &) const
Definition: TgcRawDataMonitorAlgorithm.cxx:2571
TgcRawDataMonitorAlgorithm::fillTgcCoin
void fillTgcCoin(const std::string &, const std::vector< TgcTrig > &, std::vector< Monitored::ObjectsCollection< std::vector< TgcTrig >, double >> &, MonVariables &) const
Definition: TgcRawDataMonitorAlgorithm.cxx:2490
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TgcRawDataMonitorAlgorithm::TgcTrig::bcid
int bcid
Definition: TgcRawDataMonitorAlgorithm.h:202
TgcRawDataMonitorAlgorithm::getPrimaryVertex
const xAOD::Vertex * getPrimaryVertex(const EventContext &ctx) const
Definition: TgcRawDataMonitorAlgorithm.cxx:224
TgcRawDataMonitorAlgorithm::TgcTrigNsw
Definition: TgcRawDataMonitorAlgorithm.h:114
TgcRawDataMonitorAlgorithm::m_nHitsInOtherBWTGCWire
IntegerProperty m_nHitsInOtherBWTGCWire
Definition: TgcRawDataMonitorAlgorithm.h:305
TgcRawDataMonitorAlgorithm::m_muonToPVdz
DoubleProperty m_muonToPVdz
Definition: TgcRawDataMonitorAlgorithm.h:253
TgcRawDataMonitorAlgorithm::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: TgcRawDataMonitorAlgorithm.h:330
TgcRawDataMonitorAlgorithm::TgcTrigTile::tmdbDecisions
int tmdbDecisions
Definition: TgcRawDataMonitorAlgorithm.h:105
TgcRawDataMonitorAlgorithm::fillTgcPrdHistograms
void fillTgcPrdHistograms(Monitored::Scalar< int > &mon_bcid, Monitored::Scalar< int > &mon_pileup, Monitored::Scalar< int > &mon_lb, std::map< std::string, std::vector< ExtPos > > &extpositions, const EventContext &ctx) const
Definition: TgcRawDataMonitorAlgorithm.cxx:2796
TgcRawDataMonitorAlgorithm::fillHistogramsAfterTriggerDecision
void fillHistogramsAfterTriggerDecision(std::vector< TgcRawDataMonitorAlgorithm::TimedMuonRoI > &roiVec) const
Definition: TgcRawDataMonitorAlgorithm.cxx:585
TgcRawDataMonitorAlgorithm::CtpDecMonObj
Definition: TgcRawDataMonitorAlgorithm.h:209
TgcRawDataMonitorAlgorithm::CoinFlagNSW
@ CoinFlagNSW
Definition: TgcRawDataMonitorAlgorithm.h:38
Muon::TgcCoinData::TYPE_TRACKLET_EIFI
@ TYPE_TRACKLET_EIFI
Definition: TgcCoinData.h:54
TgcRawDataMonitorAlgorithm::CtpDecMonObj::rpcM
bool rpcM
Definition: TgcRawDataMonitorAlgorithm.h:222
checkFileSG.fi
fi
Definition: checkFileSG.py:65
xAOD::MuonRoI_v1::Forward
@ Forward
The muon candidate was detected in the forward region.
Definition: MuonRoI_v1.h:36
TgcRawDataMonitorAlgorithm::TgcTrigNsw::deltaTheta
int deltaTheta
Definition: TgcRawDataMonitorAlgorithm.h:128
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
ReadDecorHandle.h
Handle class for reading a decoration on an object.
TgcRawDataMonitorAlgorithm::getRegionsOfInterest
std::vector< TgcRawDataMonitorAlgorithm::TimedMuonRoI > getRegionsOfInterest(const EventContext &ctx) const
Definition: TgcRawDataMonitorAlgorithm.cxx:241
xAOD::MuonRoI_v1::getBW3Coincidence
bool getBW3Coincidence() const
Returns whether or not there was a 3-station coincidence in the TGC.
Definition: MuonRoI_v1.cxx:289
str
Definition: BTagTrackIpAccessor.cxx:11
Muon::TgcCoinData::INNER_NSW_PHI_BITSHIFT
static constexpr uint32_t INNER_NSW_PHI_BITSHIFT
Definition: TgcCoinData.h:230
TgcRawDataMonitorAlgorithm::TgcTrig::y_Out
double y_Out
Definition: TgcRawDataMonitorAlgorithm.h:173
xAOD::STACO
@ STACO
Tracks produced by STACO.
Definition: TrackingPrimitives.h:99
TgcRawDataMonitorAlgorithm::m_monitorTriggerMultiplicity
BooleanProperty m_monitorTriggerMultiplicity
Definition: TgcRawDataMonitorAlgorithm.h:259
TgcRawDataMonitorAlgorithm::checkTriggerInfo
std::set< std::string > checkTriggerInfo() const
Definition: TgcRawDataMonitorAlgorithm.cxx:200
TgcRawDataMonitorAlgorithm::TgcTrig::y_In
double y_In
Definition: TgcRawDataMonitorAlgorithm.h:170
Muon::TgcCoinData::INNER_RPC_PHI_BIT
static constexpr uint32_t INNER_RPC_PHI_BIT
Definition: TgcCoinData.h:249
TgcRawDataMonitorAlgorithm::ExtTrigInfo::matchedTile
double matchedTile
Definition: TgcRawDataMonitorAlgorithm.h:94
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
TgcRawDataMonitorAlgorithm::TgcTrig::sub
int sub
Definition: TgcRawDataMonitorAlgorithm.h:195
TgcRawDataMonitorAlgorithm::TgcTrig::trackletIdStrip
int trackletIdStrip
Definition: TgcRawDataMonitorAlgorithm.h:190
TgcRawDataMonitorAlgorithm::m_trigMatchWindow
DoubleProperty m_trigMatchWindow
Definition: TgcRawDataMonitorAlgorithm.h:272
TgcRawDataMonitorAlgorithm::TgcTrig::isPositiveDeltaR
int isPositiveDeltaR
Definition: TgcRawDataMonitorAlgorithm.h:187
TgcRawDataMonitorAlgorithm::TgcTrig::x_In
double x_In
Definition: TgcRawDataMonitorAlgorithm.h:169
TgcRawDataMonitorAlgorithm::TgcTrig::lb
int lb
Definition: TgcRawDataMonitorAlgorithm.h:168
Muon::TgcCoinData::INNER_NSW_R_BIT
static constexpr uint32_t INNER_NSW_R_BIT
Definition: TgcCoinData.h:229
TgcRawDataMonitorAlgorithm::m_thrMonList
std::set< std::string > m_thrMonList
Definition: TgcRawDataMonitorAlgorithm.h:313
TgcRawDataMonitorAlgorithm::ExtTrigInfo::eta
double eta
Definition: TgcRawDataMonitorAlgorithm.h:86
TgcRawDataMonitorAlgorithm::m_M2_Z
DoubleProperty m_M2_Z
Definition: TgcRawDataMonitorAlgorithm.h:292
xAOD::MuonRoI_v1::getThrNumber
int getThrNumber() const
Get the logic number of the highest threshold this RoI passed.
Definition: MuonRoI_v1.cxx:76
xAOD::lumiBlock
setTeId lumiBlock
Definition: L2StandAloneMuon_v1.cxx:327
TgcRawDataMonitorAlgorithm::m_useOnlyMuidCoStacoMuons
BooleanProperty m_useOnlyMuidCoStacoMuons
Definition: TgcRawDataMonitorAlgorithm.h:287
TgcRawDataMonitorAlgorithm::m_extZposition
std::vector< double > m_extZposition
Definition: TgcRawDataMonitorAlgorithm.h:311
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
TGC::TgcChamber::StationPhi
const int & StationPhi() const
Definition: TgcChamber.h:52
TgcRawDataMonitorAlgorithm::TgcTrigNsw::slInput
int slInput
Definition: TgcRawDataMonitorAlgorithm.h:116
TgcRawDataMonitorAlgorithm::printOutAvailableMuonTriggers
StatusCode printOutAvailableMuonTriggers() const
Definition: TgcRawDataMonitorAlgorithm.cxx:146
SG::ReadDecorHandle::isAvailable
bool isAvailable()
Test to see if this variable exists in the store, for the referenced object.
Muon::TgcCoinData::INNER_NSW_INPUT_BIT
static constexpr uint32_t INNER_NSW_INPUT_BIT
Definition: TgcCoinData.h:243
TgcRawDataMonitorAlgorithm::m_M3_Z
DoubleProperty m_M3_Z
Definition: TgcRawDataMonitorAlgorithm.h:293
TgcRawDataMonitorAlgorithm::TgcTrig::sector
int sector
Definition: TgcRawDataMonitorAlgorithm.h:191
createCablingJSON.station_name
string station_name
Simple script to generate a BIS78 cabling map as used for the Monte Carlo processing.
Definition: createCablingJSON.py:13
makeComparison.deltaR
float deltaR
Definition: makeComparison.py:36
TgcRawDataMonitorAlgorithm::TgcTrig::z_In
double z_In
Definition: TgcRawDataMonitorAlgorithm.h:171
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
TgcRawDataMonitorAlgorithm::m_TgcCoinDataContainerCurrBCKey
SG::ReadHandleKey< Muon::TgcCoinDataContainer > m_TgcCoinDataContainerCurrBCKey
Definition: TgcRawDataMonitorAlgorithm.h:248
TGC::TgcChamber::iSide
const TGCSIDE & iSide() const
Definition: TgcChamber.h:44
TgcRawDataMonitorAlgorithm::InnerCoinFlags
@ InnerCoinFlags
Definition: TgcRawDataMonitorAlgorithm.h:39
TgcRawDataMonitorAlgorithm::TgcTrig::delta
int delta
Definition: TgcRawDataMonitorAlgorithm.h:194
TGC::TgcHit
Definition: TgcHit.h:11
TGC::TGCSIDE::TGCASIDE
@ TGCASIDE
xAOD::MuonRoI_v1::Pos
@ Pos
Candidate is a mu+ from a TGC sector.
Definition: MuonRoI_v1.h:46
xAOD::MuonRoI_v1::Positive
@ Positive
The candidate came from the +z side (side A)
Definition: MuonRoI_v1.h:40
xAOD::MuonRoI_v1::roiWord
uint32_t roiWord() const
The "raw" RoI word describing the muon candidate.
TrigConf::L1Threshold
Standard L1 threshold configuration.
Definition: L1ThresholdBase.h:125
TgcRawDataMonitorAlgorithm::TimedMuon::passBW3Coin
bool passBW3Coin
Definition: TgcRawDataMonitorAlgorithm.h:60
TgcRawDataMonitorAlgorithm::CtpDecMonObj::tgcH
bool tgcH
Definition: TgcRawDataMonitorAlgorithm.h:220
xAOD::MuonRoI_v1::getEtaOverlap
bool getEtaOverlap() const
Returns whether there's overlap between the barrel-EC sectors.
Definition: MuonRoI_v1.cxx:249
xAOD::MuonRoI_v1::getGoodMF
bool getGoodMF() const
Returns whether or not there was a good magnetic field quality in the TGC.
Definition: MuonRoI_v1.cxx:309
TgcRawDataMonitorAlgorithm::ExtTrigInfo::matched
double matched
Definition: TgcRawDataMonitorAlgorithm.h:88
Muon::TgcCoinData::INNER_TILE_BCID_BIT
static constexpr uint32_t INNER_TILE_BCID_BIT
Definition: TgcCoinData.h:271
TgcRawDataMonitorAlgorithm::TgcTrigEifi
Definition: TgcRawDataMonitorAlgorithm.h:157
xAOD::MuonRoI_v1::phi
float phi() const
The azimuthal angle ( ) of the muon candidate.
Identifier
Definition: IdentifierFieldParser.cxx:14