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