ATLAS Offline Software
TrigBjetMonitorAlgorithm.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 #include "xAODJet/JetContainer.h"
10 
11 TrigBjetMonitorAlgorithm::TrigBjetMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator )
12  : AthMonitorAlgorithm(name,pSvcLocator)
13 {}
14 
16 
17 
20 
26  ATH_CHECK( m_trigDecTool.retrieve() );
27 
29 }
30 
31 bool LLR(double pu, double pc, double pb, double &w) {
32  w = -100.;
33  bool ll = false;
34  double denom;
35  float cfrac(0.018); // DG 2022/07/28
36  if (pb > 0.) {
37  denom = pu*(1.-cfrac)+pc*cfrac;
38  if (denom > 0.) {
39  w = log(pb/denom);
40  ll = true;
41  }
42  }
43  return ll;
44 }
45 
46 bool LLRW(float pqcd, float ptop, float phbb, float &w) { // RJ 17/02/2025
47  w = -100.;
48  bool ll = false;
49  float denom;
50  float topfrac(0.25);
51  if (phbb > 0.) {
52  denom = pqcd*(1.-topfrac)+ptop*topfrac;
53  if (denom > 0.) {
54  w = log(phbb/denom);
55  ll = true;
56  }
57  }
58  return ll;
59 }
60 
61 
62 bool CalcRelPt (float muonPt, float muonEta, float muonPhi, float jetPt, float jetEta, float jetPhi, float &RelPt) {
63 
64  bool r = false;
65  RelPt = -20.;
66 
67  float muonT, muonX, muonY, muonZ, muon, jetT, jetX, jetY, jetZ, jet, scprod;
68 
69  muonT = 2.*atan( exp(-muonEta) );
70  jetT = 2.*atan( exp(-jetEta) );
71  if ( (std::abs(muonT) > 0.) && (std::abs(jetT) > 0.) ) {
72  muon = muonPt/std::abs( sin(muonT) );
73  muonX = muonPt*cos(muonPhi);
74  muonY = muonPt*sin(muonPhi);
75  muonZ = muon*cos(muonT);
76  jet = jetPt/std::abs( sin(jetT) );
77  jetX = jetPt*cos(jetPhi);
78  jetY = jetPt*sin(jetPhi);
79  jetZ = jet*cos(jetT);
80  scprod = (muonX*jetX + muonY*jetY + muonZ*jetZ)/(muon*jet);
81  scprod *= scprod;
82  if ( (1. - scprod) > 0. ) {
83  RelPt = muon * sqrt(1. - scprod);
84  r = true;
85  }
86  }
87 
88  return r;
89 
90 }
91 
92 float phiCorr(float phi) {
93  if (phi < -M_PI) phi += 2*M_PI;
94  if (phi > M_PI) phi -= 2*M_PI;
95  return phi;
96 }
97 
98 
99 StatusCode TrigBjetMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const {
100  using namespace Monitored;
101 
102  if(m_trigDecTool->ExperimentalAndExpertMethods().isHLTTruncated()) {
103  ATH_MSG_WARNING("HLTResult truncated, skip trigger analysis");
104  return StatusCode::SUCCESS;
105  } // ATR-31454
106 
107 
108  // Read off-line PV's and fill histograms
109 
110  bool Eofflinepv(false);
111  float offlinepvz(-1.e6);
112  float offlinepvx(-1.e6);
113  float offlinepvy(-1.e6);
114 
115  if (m_collisionRun) {
116  auto OffNVtx = Monitored::Scalar<int>("Off_NVtx",0);
117  auto OffxVtx = Monitored::Scalar<float>("Off_xVtx",0.0);
118  auto OffyVtx = Monitored::Scalar<float>("Off_yVtx",0.0);
119  auto OffzVtx = Monitored::Scalar<float>("Off_zVtx",0.0);
120 
122  if (! offlinepv.isValid() ) {
123  ATH_MSG_ERROR("evtStore() does not contain VertexContainer Collection with name "<< m_offlineVertexContainerKey);
124  return StatusCode::FAILURE;
125  }
126  ATH_MSG_DEBUG(" Size of the Off-line PV container: " << offlinepv->size() );
127  if ( offlinepv->size() ) {
128  Eofflinepv = true;
129  offlinepvz = offlinepv->front()->z();
130  offlinepvx = offlinepv->front()->x();
131  offlinepvy = offlinepv->front()->y();
132  OffNVtx = offlinepv->size() ;
133  for (unsigned int j = 0; j<offlinepv->size(); j++) {
134  if ( (*(offlinepv))[j]->nTrackParticles()==0 ) continue; // MS 9/7/2025
135  if ( (*(offlinepv))[j]->vertexType()==0 ) continue; // MS 9/7/2025
136  OffxVtx = (*(offlinepv))[j]->x();
137  OffyVtx = (*(offlinepv))[j]->y();
138  OffzVtx = (*(offlinepv))[j]->z();
139  fill("TrigBjetMonitor",OffxVtx,OffyVtx,OffzVtx);
140  }
141  fill("TrigBjetMonitor",OffNVtx);
142  } // if size
143  } // if m_collisionRun
144 
145  // print the trigger chain names
146 
147  std::string chainName;
148 
149  int size_AllChains = m_allChains.size();
150  ATH_MSG_DEBUG(" Size of the AllChains trigger container: " << size_AllChains );
151  for (int i =0; i<size_AllChains; i++) {
153  ATH_MSG_DEBUG(" Chain number: " << i << " AllChains Chain Name: " << chainName );
154  }
155 
156  // Verifiy if the trigger chain was fired and if yes, fill the corresponding histogram
157 
158  bool mujetChain(false);
159  bool bjetChain(true);
160  bool L2bjetChain(false);
161 
162 
163  for ( auto& trigName : m_allChains ) {
164 
165 
166  if ( m_trigDecTool->isPassed(trigName) ) {
167  ATH_MSG_DEBUG(" Trigger chain from AllChains list: " << trigName << " has fired !!! " );
168 
169  // Verify if the chain was in the Express Stream if the job was an express job
170 
171  const unsigned int passBits = m_trigDecTool->isPassedBits(trigName);
172  const bool expressPass = passBits & TrigDefs::Express_passed;
173 
174  ATH_MSG_DEBUG( " Express Stream Test: Chain: " << trigName<< " m_expressStreamFlag: " << m_expressStreamFlag << " expressPass: " << expressPass );
175 
176  if ( !m_expressStreamFlag || (m_expressStreamFlag && expressPass) ) {
177 
178 
179  // bjet vs mujet vs L2bjetChain
180  mujetChain = false;
181  L2bjetChain = false;
182  bjetChain = false;
183  std::size_t found = trigName.find("HLT_mu");
184  if (found!=std::string::npos) mujetChain = true;
185  else {
186  found = trigName.find("a10sd_cssk");
187  if (found!=std::string::npos) L2bjetChain = true;
188  else bjetChain = true;
189  }
190 
191  ATH_MSG_DEBUG(" ===> Run 3 access to Trigger Item: " << trigName );
192  ATH_MSG_DEBUG(" bjetChain: " << bjetChain << " mujetChain: " << mujetChain << " L2bjetChain: " << L2bjetChain );
193 
194 
195  // online track container
197  // verify the content
198  for ( const xAOD::TrackParticle* track : *theTracks ) {
199  ATH_MSG_DEBUG( " Pt of track in TrackParticleContainer: " << track->pt() );
200  }
201 
202  float zPrmVtx = 0.; // used for muon-jets
203 
204  // Online Primary Vertex from SG
205 
206  if (m_collisionRun) {
208  int nPV = 0;
209  for (const xAOD::Vertex* vtx : *vtxContainer) {
210  if (vtx->vertexType() == xAOD::VxType::PriVtx) {
211  nPV++;
212  std::string NameH = "PVz_tr_"+trigName;
213  ATH_MSG_DEBUG( " NameH: " << NameH );
214  auto PVz_tr = Monitored::Scalar<float>(NameH,0.0);
215  PVz_tr = vtx->z();
216  zPrmVtx = PVz_tr;
217  ATH_MSG_DEBUG(" PVz_tr: " << PVz_tr);
218  fill("TrigBjetMonitor",PVz_tr);
219  if (Eofflinepv) {
220  NameH = "DiffOnOffPVz_tr_"+trigName;
221  ATH_MSG_DEBUG( " NameH: " << NameH );
222  auto DiffOnOffPVz_tr = Monitored::Scalar<float>(NameH,0.0);
223  DiffOnOffPVz_tr = vtx->z()-offlinepvz;
224  ATH_MSG_DEBUG(" DiffOnOffPVz_tr: " << DiffOnOffPVz_tr);
225  fill("TrigBjetMonitor",DiffOnOffPVz_tr);
226  } // if Eofflinepv
227  NameH = "PVx_tr_"+trigName;
228  ATH_MSG_DEBUG( " NameH: " << NameH );
229  auto PVx_tr = Monitored::Scalar<float>(NameH,0.0);
230  PVx_tr = vtx->x();
231  ATH_MSG_DEBUG(" PVx_tr: " << PVx_tr);
232  fill("TrigBjetMonitor",PVx_tr);
233  if (Eofflinepv) {
234  NameH = "DiffOnOffPVx_tr_"+trigName;
235  ATH_MSG_DEBUG( " NameH: " << NameH );
236  auto DiffOnOffPVx_tr = Monitored::Scalar<float>(NameH,0.0);
237  DiffOnOffPVx_tr = vtx->x()-offlinepvx;
238  ATH_MSG_DEBUG(" DiffOnOffPVx_tr: " << DiffOnOffPVx_tr);
239  fill("TrigBjetMonitor",DiffOnOffPVx_tr);
240  } // if Eofflinepv
241  NameH = "PVy_tr_"+trigName;
242  ATH_MSG_DEBUG( " NameH: " << NameH );
243  auto PVy_tr = Monitored::Scalar<float>(NameH,0.0);
244  PVy_tr = vtx->y();
245  ATH_MSG_DEBUG(" PVy_tr: " << PVy_tr);
246  fill("TrigBjetMonitor",PVy_tr);
247  if (Eofflinepv) {
248  NameH = "DiffOnOffPVy_tr_"+trigName;
249  ATH_MSG_DEBUG( " NameH: " << NameH );
250  auto DiffOnOffPVy_tr = Monitored::Scalar<float>(NameH,0.0);
251  DiffOnOffPVy_tr = vtx->y()-offlinepvy;
252  ATH_MSG_DEBUG(" DiffOnOffPVy_tr: " << DiffOnOffPVy_tr);
253  fill("TrigBjetMonitor",DiffOnOffPVy_tr);
254  } // if Eofflinepv
255  } // if vtx type
256  } // loop on vtxContainer
257  std::string NpvH = "nPV_tr_"+trigName;
258  ATH_MSG_DEBUG( " NpvH: " << NpvH );
259  auto nPV_tr = Monitored::Scalar<int>(NpvH,0.0);
260  nPV_tr = nPV;
261  fill("TrigBjetMonitor",nPV_tr);
262  } // if m_collisionRun
263 
264  // L2bjetChain
265 
266 
267  if (L2bjetChain) {
268  std::vector< TrigCompositeUtils::LinkInfo<xAOD::JetContainer> > onlinejets = m_trigDecTool->features<xAOD::JetContainer>(trigName, TrigDefs::Physics);
269 
270  std::string nJetH = "LargeR_nJet_"+trigName;
271  auto nJet = Monitored::Scalar<int>(nJetH,0.0);
272  nJet = onlinejets.size();
273  ATH_MSG_DEBUG(" nJet: " << nJet);
274  fill("TrigBjetMonitor",nJet);
275  for(const auto& jetLinkInfo : onlinejets) {
276  const xAOD::Jet* jet = *(jetLinkInfo.link);
277 
278 
279  bool theLLRW(false);
280 
281  // GN2XTrig
282 
283  std::string NameH = "GN2XTrig_pqcd_tr_"+trigName;
284  ATH_MSG_DEBUG( " NameH: " << NameH );
285  auto GN2XTrig_pqcd = Monitored::Scalar<float>(NameH,0.0);
286  const SG::AuxElement::ConstAccessor<float> pqcd_accessor("GN2XTrig_pqcd"); // DG 03-03-2025
287  GN2XTrig_pqcd = pqcd_accessor(*jet); // DG 03-03-2025
288  ATH_MSG_DEBUG(" GN2XTrig_pqcd: " << GN2XTrig_pqcd);
289  fill("TrigBjetMonitor",GN2XTrig_pqcd);
290 
291  NameH = "GN2XTrig_ptop_tr_"+trigName;
292  ATH_MSG_DEBUG( " NameH: " << NameH );
293  auto GN2XTrig_ptop = Monitored::Scalar<float>(NameH,0.0);
294  const SG::AuxElement::ConstAccessor<float> ptop_accessor("GN2XTrig_ptop"); // DG 03-03-2025
295  GN2XTrig_ptop = ptop_accessor(*jet); // DG 03-03-2025
296  ATH_MSG_DEBUG(" GN2XTrig_ptop: " << GN2XTrig_ptop);
297  fill("TrigBjetMonitor",GN2XTrig_ptop);
298 
299  NameH = "GN2XTrig_phbb_tr_"+trigName;
300  ATH_MSG_DEBUG( " NameH: " << NameH );
301  auto GN2XTrig_phbb = Monitored::Scalar<float>(NameH,0.0);
302  const SG::AuxElement::ConstAccessor<float> phbb_accessor("GN2XTrig_phbb"); // DG 03-03-2025
303  GN2XTrig_phbb = phbb_accessor(*jet); // DG 03-03-2025
304  ATH_MSG_DEBUG(" GN2XTrig_phbb: " << GN2XTrig_phbb);
305  fill("TrigBjetMonitor",GN2XTrig_phbb);
306 
307  NameH = "GN2XTrig_mv_tr_"+trigName;
308  ATH_MSG_DEBUG( " NameH: " << NameH );
309  auto GN2XTrig_mv = Monitored::Scalar<float>(NameH,0.0);
310  ATH_MSG_DEBUG(" GN2XTrig_pqcd: " << GN2XTrig_pqcd << " GN2XTrig_ptop: " << GN2XTrig_ptop << " GN2XTrig_phbb: " << GN2XTrig_phbb );
311  theLLRW = LLRW (GN2XTrig_pqcd, GN2XTrig_ptop, GN2XTrig_phbb, GN2XTrig_mv);
312  ATH_MSG_DEBUG(" GN2XTrig_mv: " << GN2XTrig_mv << " LLRW: " << theLLRW);
313  if ( theLLRW ) fill("TrigBjetMonitor",GN2XTrig_mv);
314 
315 
316  // jetPt
317  NameH = "LargeR_jetPt_"+trigName;
318  ATH_MSG_DEBUG( " NameH: " << NameH );
319  auto LargeR_jetPt = Monitored::Scalar<float>(NameH,0.0);
320  LargeR_jetPt = (jet->pt())*1.e-3;
321  ATH_MSG_DEBUG(" LargeR_jetPt: " << LargeR_jetPt);
322  fill("TrigBjetMonitor",LargeR_jetPt);
323 
324  // jetEta
325  NameH = "LargeR_jetEta_"+trigName;
326  ATH_MSG_DEBUG( " NameH: " << NameH );
327  auto LargeR_jetEta = Monitored::Scalar<float>(NameH,0.0);
328  LargeR_jetEta = jet->eta();
329 
330  // jetPhi
331  NameH = "LargeR_jetPhi_"+trigName;
332  ATH_MSG_DEBUG( " NameH: " << NameH );
333  auto LargeR_jetPhi = Monitored::Scalar<float>(NameH,0.0);
334  LargeR_jetPhi = jet->phi();
335  ATH_MSG_DEBUG(" LargeR_jetEta: " << LargeR_jetEta << " LargeR_jetPhi : " << LargeR_jetPhi);
336  fill("TrigBjetMonitor",LargeR_jetEta,LargeR_jetPhi);
337 
338  // jetMass
339  NameH = "LargeR_jetMass_"+trigName;
340  ATH_MSG_DEBUG( " NameH: " << NameH );
341  auto LargeR_jetMass = Monitored::Scalar<float>(NameH,0.0);
342  LargeR_jetMass = (jet->m())*1.e-3;
343  ATH_MSG_DEBUG(" LargeR_jetMass: " << LargeR_jetMass);
344  fill("TrigBjetMonitor",LargeR_jetMass);
345 
346  // GN2Xv01
347 
348  NameH = "GN2Xv01_pqcd_tr_"+trigName;
349  ATH_MSG_DEBUG( " NameH: " << NameH );
350  auto GN2Xv01_pqcd = Monitored::Scalar<float>(NameH,0.0);
351  const SG::AuxElement::ConstAccessor<float> pqcd_accessor0("GN2Xv01_pqcd"); // DG 03-03-2025
352  GN2Xv01_pqcd = pqcd_accessor0(*jet); // DG 03-03-2025
353  ATH_MSG_DEBUG(" GN2Xv01_pqcd: " << GN2Xv01_pqcd);
354  fill("TrigBjetMonitor",GN2Xv01_pqcd);
355 
356  NameH = "GN2Xv01_ptop_tr_"+trigName;
357  ATH_MSG_DEBUG( " NameH: " << NameH );
358  auto GN2Xv01_ptop = Monitored::Scalar<float>(NameH,0.0);
359  const SG::AuxElement::ConstAccessor<float> ptop_accessor0("GN2Xv01_ptop"); // DG 03-03-2025
360  GN2Xv01_ptop = ptop_accessor0(*jet); // DG 03-03-2025
361  ATH_MSG_DEBUG(" GN2Xv01_ptop: " << GN2Xv01_ptop);
362  fill("TrigBjetMonitor",GN2Xv01_ptop);
363 
364  NameH = "GN2Xv01_phbb_tr_"+trigName;
365  ATH_MSG_DEBUG( " NameH: " << NameH );
366  auto GN2Xv01_phbb = Monitored::Scalar<float>(NameH,0.0);
367  const SG::AuxElement::ConstAccessor<float> phbb_accessor0("GN2Xv01_phbb"); // DG 03-03-2025
368  GN2Xv01_phbb = phbb_accessor0(*jet); // DG 03-03-2025
369  ATH_MSG_DEBUG(" GN2Xv01_phbb: " << GN2Xv01_phbb);
370  fill("TrigBjetMonitor",GN2Xv01_phbb);
371 
372  NameH = "GN2Xv01_mv_tr_"+trigName;
373  ATH_MSG_DEBUG( " NameH: " << NameH );
374  auto GN2Xv01_mv = Monitored::Scalar<float>(NameH,0.0);
375  ATH_MSG_DEBUG(" GN2Xv01_pqcd: " << GN2Xv01_pqcd << " GN2Xv01_ptop: " << GN2Xv01_ptop << " GN2Xv01_phbb: " << GN2Xv01_phbb );
376  theLLRW = LLRW (GN2Xv01_pqcd, GN2Xv01_ptop, GN2Xv01_phbb, GN2Xv01_mv);
377  ATH_MSG_DEBUG(" GN2Xv01_mv: " << GN2Xv01_mv << " LLRW: " << theLLRW);
378  if ( theLLRW ) fill("TrigBjetMonitor",GN2Xv01_mv);
379 
380 
381 
382  } // for jetLinkInfo
383 
384  } // if (L2bjetChain)
385 
386 
387  if (mujetChain) {
388  std::vector< TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> > onlinemuons = m_trigDecTool->features<xAOD::MuonContainer>(trigName, TrigDefs::Physics); // TM 2022-05-16
389  int imuon = 0;
390  std::string nMuonH = "nMuon_"+trigName;
391  auto nMuon = Monitored::Scalar<int>(nMuonH,0.0);
392  nMuon = onlinemuons.size();
393  fill("TrigBjetMonitor",nMuon);
394 
395  std::vector< TrigCompositeUtils::LinkInfo<xAOD::JetContainer> > onlinejets = m_trigDecTool->features<xAOD::JetContainer>(trigName, TrigDefs::Physics); // TM 2021-10-30
396  int ijet = 0;
397  std::string nJetH = "nJet_"+trigName;
398  auto nJet = Monitored::Scalar<int>(nJetH,0.0);
399  nJet = onlinejets.size();
400  fill("TrigBjetMonitor",nJet);
401 
402  if (nMuon*nJet > 0) {
403 
404  float muonPt1(0.), muonEta1(0.), muonPhi1(0.), muonZ1(0.), jetPt1(0.), jetEta1(0.), jetPhi1(0.), jetZ1(0.), muonZ(0.);
405  double GN1_mv(0.), GN2_mv(0.);
406  bool theLLR(false), theLLR_GN1(false), theLLR_GN2(false);
407  bool plotDeltaZ(false);
408 
409  for(const auto& muonLinkInfo : onlinemuons) {
410  const xAOD::Muon* muon = *(muonLinkInfo.link);
411  // muonPt
412  std::string NameH = "muonPt_"+trigName;
413  ATH_MSG_DEBUG( " NameH: " << NameH );
414  auto muonPt = Monitored::Scalar<float>(NameH,0.0);
415  muonPt = (muon->pt())*1.e-3;
416  ATH_MSG_DEBUG(" muonPt: " << muonPt);
417  fill("TrigBjetMonitor",muonPt);
418  // muonEta
419  NameH = "muonEta_"+trigName;
420  ATH_MSG_DEBUG( " NameH: " << NameH );
421  auto muonEta = Monitored::Scalar<float>(NameH,0.0);
422  muonEta = muon->eta();
423  ATH_MSG_DEBUG(" muonEta: " << muonEta);
424  fill("TrigBjetMonitor",muonEta);
425  // muonPhi
426  NameH = "muonPhi_"+trigName;
427  ATH_MSG_DEBUG( " NameH: " << NameH );
428  auto muonPhi = Monitored::Scalar<float>(NameH,0.0);
429  muonPhi = muon->phi();
430  ATH_MSG_DEBUG(" muonPhi : " << muonPhi);
431  // muonZ
432  auto link = muon->combinedTrackParticleLink(); // TM and DG 18/06/22
433  if (link.isValid()) {
434  plotDeltaZ = true;
435  const xAOD::TrackParticle* track = *link;
436  muonZ = track->z0() + track->vz();
437  } else {
438  plotDeltaZ = false;
439  muonZ = 0.;
440  }
441 
442  if (imuon == 0) {
443  //store the parameter for the 1st muon
444  muonPt1 = muonPt;
445  muonEta1 = muonEta;
446  muonPhi1 = muonPhi;
447  muonZ1 = muonZ;
448  }// if imuon==0
449 
450  // The associated jet loop
451  for(const auto& jetLinkInfo : onlinejets) {
452  const xAOD::Jet* jet = *(jetLinkInfo.link);
453  // jetPt
454  NameH = "jetPt_"+trigName;
455  ATH_MSG_DEBUG( " NameH: " << NameH );
456  auto jetPt = Monitored::Scalar<float>(NameH,0.0);
457  jetPt = (jet->pt())*1.e-3;
458  ATH_MSG_DEBUG(" jetPt: " << jetPt);
459  fill("TrigBjetMonitor",jetPt);
460  // jetEta
461  NameH = "jetEta_"+trigName;
462  ATH_MSG_DEBUG( " NameH: " << NameH );
463  auto jetEta = Monitored::Scalar<float>(NameH,0.0);
464  jetEta = jet->eta();
465  ATH_MSG_DEBUG(" jetEta : " << jetEta);
466  fill("TrigBjetMonitor",jetEta);
467  // jetPhi
468  NameH = "jetPhi_"+trigName;
469  ATH_MSG_DEBUG( " NameH: " << NameH );
470  auto jetPhi = Monitored::Scalar<float>(NameH,0.0);
471  jetPhi = jet->phi();
472  ATH_MSG_DEBUG(" jetPhi : " << jetPhi);
473 
474  // Take the b-tagging info from the first jet
475  if (ijet == 0) {
476  //store the parameter for the 1st jet
477  jetPt1 = jetPt;
478  jetEta1 = jetEta;
479  jetPhi1 = jetPhi;
480  jetZ1 = zPrmVtx;
481 
482  auto btaggingLinkInfo = TrigCompositeUtils::findLink<xAOD::BTaggingContainer>(jetLinkInfo.source, m_btaggingLinkName); // TM 2021-10-30
483  const SG::AuxElement* obj_storing_btag = nullptr;
484  if ( btaggingLinkInfo.isValid() ) {
485  obj_storing_btag = *(btaggingLinkInfo.link);
486  }
487  else {
488  obj_storing_btag = *(jetLinkInfo.link);
489  }
490 
491  static const SG::AuxElement::ConstAccessor<float> GN1pu_accessor("GN120220813_pu");
492  static const SG::AuxElement::ConstAccessor<float> GN1pc_accessor("GN120220813_pc");
493  static const SG::AuxElement::ConstAccessor<float> GN1pb_accessor("GN120220813_pb");
494 
495  static const SG::AuxElement::ConstAccessor<float> GN2pu_accessor("GN220240122_pu");
496  static const SG::AuxElement::ConstAccessor<float> GN2pc_accessor("GN220240122_pc");
497  static const SG::AuxElement::ConstAccessor<float> GN2pb_accessor("GN220240122_pb");
498 
499  // checking just pu is enough
500  if (GN1pu_accessor.isAvailable(*obj_storing_btag)) {
501  double GN1_pu(0.), GN1_pc(0.), GN1_pb(0.);
502  GN1_pu = GN1pu_accessor(*obj_storing_btag);
503  ATH_MSG_DEBUG(" GN1_pu: " << GN1_pu);
504  GN1_pc = GN1pc_accessor(*obj_storing_btag);
505  ATH_MSG_DEBUG(" GN1_pc: " << GN1_pc);
506  GN1_pb = GN1pb_accessor(*obj_storing_btag);
507  ATH_MSG_DEBUG(" GN1_pb: " << GN1_pb);
508  theLLR = LLR (GN1_pu, GN1_pc, GN1_pb, GN1_mv);
509  theLLR_GN1 = theLLR;
510  if ( !theLLR ) GN1_mv=-100.;
511  ATH_MSG_DEBUG(" GN1_mv: " << GN1_mv << " LLR: " << theLLR);
512  }
513  if (GN2pu_accessor.isAvailable(*obj_storing_btag)) {
514  double GN2_pu(0.), GN2_pc(0.), GN2_pb(0.);
515  GN2_pu = GN2pu_accessor(*obj_storing_btag);
516  ATH_MSG_DEBUG(" GN2_pu: " << GN2_pu);
517  GN2_pc = GN2pc_accessor(*obj_storing_btag);
518  ATH_MSG_DEBUG(" GN2_pc: " << GN2_pc);
519  GN2_pb = GN2pb_accessor(*obj_storing_btag);
520  ATH_MSG_DEBUG(" GN2_pb: " << GN2_pb);
521  theLLR = LLR (GN2_pu, GN2_pc, GN2_pb, GN2_mv);
522  theLLR_GN2 = theLLR;
523  if ( !theLLR ) GN2_mv=-100.;
524  ATH_MSG_DEBUG(" GN2_mv: " << GN2_mv << " LLR: " << theLLR);
525  }
526  }// if ijet==0
527 
528  ijet++;
529 
530  }// for onlinejets
531 
532  imuon++;
533 
534  }// for onlinemuons
535 
536  // muon vs jet histograms
537 
538  // Delta R(muon,jet)
539  std::string DeltaRH = "DeltaR_"+trigName;
540  ATH_MSG_DEBUG( " DeltaRH: " << DeltaRH );
541  auto DeltaR = Monitored::Scalar<float>(DeltaRH,0.0);
542  float DeltaEta = muonEta1 - jetEta1;
543  float DeltaPhi = phiCorr( phiCorr(muonPhi1) - phiCorr(jetPhi1) );
544  DeltaR = sqrt( DeltaEta*DeltaEta + DeltaPhi*DeltaPhi );
545  ATH_MSG_DEBUG(" Delta R : " << DeltaR);
546  fill("TrigBjetMonitor",DeltaR);
547 
548  // Delta Z(muon,jet)
549  std::string DeltaZH = "DeltaZ_"+trigName;
550  ATH_MSG_DEBUG( " DeltaZH: " << DeltaZH );
551  auto DeltaZ = Monitored::Scalar<float>(DeltaZH,0.0);
552  DeltaZ = std::abs(muonZ1-jetZ1);
553  ATH_MSG_DEBUG(" Delta Z : " << DeltaZ);
554  if (plotDeltaZ) fill("TrigBjetMonitor",DeltaZ);
555 
556  // muonPt/jetPt
557  std::string RatioPtH = "RatioPt_"+trigName;
558  ATH_MSG_DEBUG( " RatioPtH: " << RatioPtH );
559  auto RatioPt = Monitored::Scalar<float>(RatioPtH,0.0);
560  RatioPt = -100.;
561  if (jetPt1 > 0.) RatioPt = muonPt1/jetPt1;
562  ATH_MSG_DEBUG(" RatioPt : " << RatioPt);
563  if (RatioPt > 0.) fill("TrigBjetMonitor",RatioPt);
564 
565  // muonPt relative to jet direction
566  std::string RelPtH = "RelPt_"+trigName;
567  ATH_MSG_DEBUG( " RelPtH: " << RelPtH );
568  auto RelPt = Monitored::Scalar<float>(RelPtH,0.0);
569  RelPt = 1.e10;
570  bool calc_relpt = CalcRelPt (muonPt1, muonEta1, muonPhi1, jetPt1, jetEta1, jetPhi1, RelPt);
571  ATH_MSG_DEBUG(" RelPt : " << RelPt);
572 
573  // wGN1
574  std::string wGN1H = "wGN1_"+trigName;
575  ATH_MSG_DEBUG( " NameH: " << wGN1H );
576  auto wGN1 = Monitored::Scalar<float>(wGN1H,0.0);
577  wGN1 = float(GN1_mv);
578  ATH_MSG_DEBUG(" wGN1: " << wGN1 << " RelPt : " << RelPt);
579  if (calc_relpt && theLLR_GN1) fill("TrigBjetMonitor",wGN1,RelPt);
580 
581  // wGN2
582  std::string wGN2H = "wGN2_"+trigName;
583  ATH_MSG_DEBUG( " NameH: " << wGN2H );
584  auto wGN2 = Monitored::Scalar<float>(wGN2H,0.0);
585  wGN2 = float(GN2_mv);
586  ATH_MSG_DEBUG(" wGN2: " << wGN2 << " RelPt : " << RelPt);
587  if (calc_relpt && theLLR_GN2) fill("TrigBjetMonitor",wGN2,RelPt);
588 
589  } // if (nMuon*nJet > 0)
590 
591  }// if mujetChain
592 
593  // bjet chains
594  if (bjetChain) {
595 
596  // Jets and PV and tracks through jet link
597 
598  std::vector< TrigCompositeUtils::LinkInfo<xAOD::JetContainer> > onlinejets = m_trigDecTool->features<xAOD::JetContainer>(trigName, TrigDefs::Physics); // TM 2021-10-30
599 
600  int ijet = 0;
601  int itrack = 0;
602  std::string nJetH = "nJet_"+trigName;
603  auto nJet = Monitored::Scalar<int>(nJetH,0.0);
604  nJet = onlinejets.size();
605  fill("TrigBjetMonitor",nJet);
606 
607  if (nJet > 0) {
608 
609  for(const auto& jetLinkInfo : onlinejets) {
610  const xAOD::Jet* jet = *(jetLinkInfo.link);
611  // jetPt
612  std::string NameH = "jetPt_"+trigName;
613  ATH_MSG_DEBUG( " NameH: " << NameH );
614  auto jetPt = Monitored::Scalar<float>(NameH,0.0);
615  jetPt = (jet->pt())*1.e-3;
616  ATH_MSG_DEBUG(" jetPt: " << jetPt);
617  fill("TrigBjetMonitor",jetPt);
618  // jetEta
619  NameH = "jetEta_"+trigName;
620  ATH_MSG_DEBUG( " NameH: " << NameH );
621  auto jetEta = Monitored::Scalar<float>(NameH,0.0);
622  jetEta = jet->eta();
623  // jetPhi
624  NameH = "jetPhi_"+trigName;
625  ATH_MSG_DEBUG( " NameH: " << NameH );
626  auto jetPhi = Monitored::Scalar<float>(NameH,0.0);
627  jetPhi = jet->phi();
628  ATH_MSG_DEBUG(" jetEta: " << jetEta << " jetPhi : " << jetPhi);
629  fill("TrigBjetMonitor",jetEta,jetPhi);
630 
631  // zPV associated to the jets in the same event: they are the same for every jet in the same event so only the first zPV should be plotted
632  if (ijet == 0) {
633 
634  // Fetch and plot PV
635 
636  std::string vtxname = m_onlineVertexContainerKey.key();
637  if ( vtxname.compare(0, 4, "HLT_")==0 ) vtxname.erase(0,4);
638  auto vertexLinkInfo = TrigCompositeUtils::findLink<xAOD::VertexContainer>(jetLinkInfo.source, vtxname ); // CV 200120 & MS 290620
639  ATH_CHECK( vertexLinkInfo.isValid() ) ; // TM 200120
640  const xAOD::Vertex* vtx = *(vertexLinkInfo.link);
641  NameH = "PVz_jet_"+trigName;
642  ATH_MSG_DEBUG( " NameH: " << NameH );
643  auto PVz_jet = Monitored::Scalar<float>(NameH,0.0);
644  PVz_jet = vtx->z();
645  ATH_MSG_DEBUG(" PVz_jet: " << PVz_jet);
646  fill("TrigBjetMonitor",PVz_jet);
647  NameH = "PVx_jet_"+trigName;
648  ATH_MSG_DEBUG( " NameH: " << NameH );
649  auto PVx_jet = Monitored::Scalar<float>(NameH,0.0);
650  PVx_jet = vtx->x();
651  ATH_MSG_DEBUG(" PVx_jet: " << PVx_jet);
652  fill("TrigBjetMonitor",PVx_jet);
653  NameH = "PVy_jet_"+trigName;
654  ATH_MSG_DEBUG( " NameH: " << NameH );
655  auto PVy_jet = Monitored::Scalar<float>(NameH,0.0);
656  PVy_jet = vtx->y();
657  ATH_MSG_DEBUG(" PVy_jet: " << PVy_jet);
658  fill("TrigBjetMonitor",PVy_jet);
659 
660 
661  } // if (ijet == 0)
662 
663  ijet++;
664 
665  // Fetch and plot BTagging information
666  const SG::AuxElement* obj_storing_btag = nullptr;
667  auto btaggingLinkInfo = TrigCompositeUtils::findLink<xAOD::BTaggingContainer>(jetLinkInfo.source, m_btaggingLinkName); // TM 2021-10-30
668  if ( btaggingLinkInfo.isValid() ) {
669  obj_storing_btag = *(btaggingLinkInfo.link);
670  }
671  else {
672  obj_storing_btag = *(jetLinkInfo.link);
673  }
674 
675  bool theLLR(false);
676  static const SG::AuxElement::ConstAccessor<float> GN1pu_accessor("GN120220813_pu");
677  static const SG::AuxElement::ConstAccessor<float> GN1pc_accessor("GN120220813_pc");
678  static const SG::AuxElement::ConstAccessor<float> GN1pb_accessor("GN120220813_pb");
679  static const SG::AuxElement::ConstAccessor<float> GN2pu_accessor("GN220240122_pu");
680  static const SG::AuxElement::ConstAccessor<float> GN2pc_accessor("GN220240122_pc");
681  static const SG::AuxElement::ConstAccessor<float> GN2pb_accessor("GN220240122_pb");
682  // checking only pu should be sufficient
683  bool GN1_available = GN1pu_accessor.isAvailable(*obj_storing_btag);
684  bool GN2_available = GN2pu_accessor.isAvailable(*obj_storing_btag);
685  NameH = "GN1_pu_tr_"+trigName;
686  ATH_MSG_DEBUG( " NameH: " << NameH );
687  auto GN1_pu = Monitored::Scalar<double>(NameH,0.0);
688  GN1_pu = GN1_available ? GN1pu_accessor(*obj_storing_btag) : 0.0;
689  ATH_MSG_DEBUG(" GN1_pu: " << GN1_pu);
690  fill("TrigBjetMonitor",GN1_pu);
691 
692  NameH = "GN1_pc_tr_"+trigName;
693  ATH_MSG_DEBUG( " NameH: " << NameH );
694  auto GN1_pc = Monitored::Scalar<double>(NameH,0.0);
695  GN1_pc = GN1_available ? GN1pc_accessor(*obj_storing_btag) : 0.0;
696  ATH_MSG_DEBUG(" GN1_pc: " << GN1_pc);
697  fill("TrigBjetMonitor",GN1_pc);
698 
699  NameH = "GN1_pb_tr_"+trigName;
700  ATH_MSG_DEBUG( " NameH: " << NameH );
701  auto GN1_pb = Monitored::Scalar<double>(NameH,0.0);
702  GN1_pb = GN1_available ? GN1pb_accessor(*obj_storing_btag) : 0.0;
703  ATH_MSG_DEBUG(" GN1_pb: " << GN1_pb);
704  fill("TrigBjetMonitor",GN1_pb);
705 
706  NameH = "GN1_mv_tr_"+trigName;
707  ATH_MSG_DEBUG( " NameH: " << NameH );
708  auto GN1_mv = Monitored::Scalar<double>(NameH,0.0);
709  theLLR = LLR (GN1_pu, GN1_pc, GN1_pb, GN1_mv);
710  if ( theLLR ) fill("TrigBjetMonitor",GN1_mv);
711  ATH_MSG_DEBUG(" GN1_mv: " << GN1_mv << " LLR: " << theLLR);
712 
713 
714  NameH = "GN2_pu_tr_"+trigName;
715  ATH_MSG_DEBUG( " NameH: " << NameH );
716  auto GN2_pu = Monitored::Scalar<double>(NameH,0.0);
717  GN2_pu = GN2_available ? GN2pu_accessor(*obj_storing_btag) : 0.0;
718  ATH_MSG_DEBUG(" GN2_pu: " << GN2_pu);
719  fill("TrigBjetMonitor",GN2_pu);
720 
721  NameH = "GN2_pc_tr_"+trigName;
722  ATH_MSG_DEBUG( " NameH: " << NameH );
723  auto GN2_pc = Monitored::Scalar<double>(NameH,0.0);
724  GN2_pc = GN2_available ? GN2pc_accessor(*obj_storing_btag) : 0.0;
725  ATH_MSG_DEBUG(" GN2_pc: " << GN2_pc);
726  fill("TrigBjetMonitor",GN2_pc);
727 
728  NameH = "GN2_pb_tr_"+trigName;
729  ATH_MSG_DEBUG( " NameH: " << NameH );
730  auto GN2_pb = Monitored::Scalar<double>(NameH,0.0);
731  GN2_pb = GN2_available ? GN2pb_accessor(*obj_storing_btag) : 0.0;
732  ATH_MSG_DEBUG(" GN2_pb: " << GN2_pb);
733  fill("TrigBjetMonitor",GN2_pb);
734 
735  NameH = "GN2_mv_tr_"+trigName;
736  ATH_MSG_DEBUG( " NameH: " << NameH );
737  auto GN2_mv = Monitored::Scalar<double>(NameH,0.0);
738  theLLR = LLR (GN2_pu, GN2_pc, GN2_pb, GN2_mv);
739  if ( theLLR ) fill("TrigBjetMonitor",GN2_mv);
740  ATH_MSG_DEBUG(" GN2_mv: " << GN2_mv << " LLR: " << theLLR);
741 
742 
743  // Tracks associated to triggered jets ( featurs = onlinejets ) courtesy of Tim Martin on 12/05/2020
744  const auto track_it_pair = m_trigDecTool->associateToEventView(theTracks, jetLinkInfo.source, "roi");
745  const xAOD::TrackParticleContainer::const_iterator start_it = track_it_pair.first;
746  const xAOD::TrackParticleContainer::const_iterator end_it = track_it_pair.second;
747 
748  int count = 0;
749  for ( xAOD::TrackParticleContainer::const_iterator it = start_it; it != end_it; ++it) {
750  count++;
751  ATH_MSG_DEBUG( " Track " << count << " with pT " << (*it)->pt() <<" from BJet with pT " << (*jetLinkInfo.link)->pt() );
752  ATH_MSG_DEBUG( " Track " << count << " with pT/eta/phi " << (*it)->pt() << "/" << (*it)->eta() << "/" << (*it)->phi() );
753  ATH_MSG_DEBUG( " Track " << count << " with d0/sigd0 " << (*it)->d0() << "/" << Amg::error((*it)->definingParametersCovMatrix(), 0) );
754  ATH_MSG_DEBUG( " Track " << count << " with z0/sigz0 " << (*it)->z0() << "/" << Amg::error((*it)->definingParametersCovMatrix(), 1) );
755  std::string NameH = "trkPt_"+trigName;
756  ATH_MSG_DEBUG( " NameH: " << NameH );
757  auto trkPt = Monitored::Scalar<float>(NameH,0.0);
758  trkPt = ((*it)->pt())*1.e-3;
759  ATH_MSG_DEBUG(" trkPt: " << trkPt);
760  fill("TrigBjetMonitor",trkPt);
761  NameH = "trkEta_"+trigName;
762  ATH_MSG_DEBUG( " NameH: " << NameH );
763  auto trkEta = Monitored::Scalar<float>(NameH,0.0);
764  trkEta = (*it)->eta();
765  NameH = "trkPhi_"+trigName;
766  ATH_MSG_DEBUG( " NameH: " << NameH );
767  auto trkPhi = Monitored::Scalar<float>(NameH,0.0);
768  trkPhi = (*it)->phi();
769  ATH_MSG_DEBUG(" trkEta: " << trkEta << " trkPhi : " << trkPhi);
770  fill("TrigBjetMonitor",trkEta,trkPhi);
771  NameH = "d0_"+trigName;
772  ATH_MSG_DEBUG( " NameH: " << NameH );
773  auto d0 = Monitored::Scalar<float>(NameH,0.0);
774  d0 = (*it)->d0();
775  ATH_MSG_DEBUG(" d0: " << d0);
776  fill("TrigBjetMonitor",d0);
777  NameH = "z0_"+trigName;
778  ATH_MSG_DEBUG( " NameH: " << NameH );
779  auto z0 = Monitored::Scalar<float>(NameH,0.0);
780  z0 = (*it)->z0();
781  ATH_MSG_DEBUG(" z0: " << z0);
782  fill("TrigBjetMonitor",z0);
783  NameH = "ed0_"+trigName;
784  ATH_MSG_DEBUG( " NameH: " << NameH );
785  auto ed0 = Monitored::Scalar<float>(NameH,0.0);
786  ed0 = Amg::error((*it)->definingParametersCovMatrix(), 0);
787  ATH_MSG_DEBUG(" ed0: " << ed0);
788  fill("TrigBjetMonitor",ed0);
789  NameH = "sd0_"+trigName;
790  ATH_MSG_DEBUG( " NameH: " << NameH );
791  auto sd0 = Monitored::Scalar<float>(NameH,0.0);
792  sd0 = -10.;
793  if (ed0 > 0.) sd0 = std::abs(d0)/ed0;
794  ATH_MSG_DEBUG(" sd0: " << sd0);
795  fill("TrigBjetMonitor",sd0);
796  NameH = "ez0_"+trigName;
797  ATH_MSG_DEBUG( " NameH: " << NameH );
798  auto ez0 = Monitored::Scalar<float>(NameH,0.0);
799  ez0 = Amg::error((*it)->definingParametersCovMatrix(), 1);
800  ATH_MSG_DEBUG(" ez0: " << ez0);
801  fill("TrigBjetMonitor",ez0);
802  } // it on tracks
803  ATH_MSG_DEBUG( " Number of tracks: " << count );
804  itrack += count;
805 
806  } // jetLinkInfo from onlinejets
807 
808  ATH_MSG_DEBUG(" Total number of triggered b-jets: " << ijet << " nJet : " << nJet);
809  ATH_MSG_DEBUG(" Total number of triggered tracks associated to the b-jets: " << itrack);
810  std::string nTrackH = "nTrack_"+trigName;
811  auto nTrack = Monitored::Scalar<int>(nTrackH,0.0);
812  nTrack = itrack;
813  fill("TrigBjetMonitor",nTrack);
814 
815  } // if (nJet > 0)
816 
817  } //if bjetChain
818 
819  } else {
820  ATH_MSG_DEBUG(" Chain " << trigName << " is declared for the Express Stream but it is NOT in the Express Stream in an Express Job");
821  } // if m_expressStreamFlag
822 
823  } else {
824  ATH_MSG_DEBUG( " Trigger chain from AllChains list: " << trigName << " has not fired " );
825  } // trigger not fired
826 
827 
828  } // for AllChains
829 
830  return StatusCode::SUCCESS;
831 }
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
beamspotman.r
def r
Definition: beamspotman.py:674
xAOD::Vertex_v1::x
float x() const
Returns the x position.
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:196
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
detail::ll
long long ll
Definition: PrimitiveHelpers.h:47
keylayer_zslicemap.pb
pb
Definition: keylayer_zslicemap.py:188
AthMonitorAlgorithm::m_trigDecTool
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool
Tool to tell whether a specific trigger is passed.
Definition: AthMonitorAlgorithm.h:340
TrigBjetMonitorAlgorithm::~TrigBjetMonitorAlgorithm
virtual ~TrigBjetMonitorAlgorithm()
Definition: TrigBjetMonitorAlgorithm.cxx:15
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:483
met::DeltaR
@ DeltaR
Definition: METRecoCommon.h:11
EventPrimitivesHelpers.h
skel.it
it
Definition: skel.GENtoEVGEN.py:407
M_PI
#define M_PI
Definition: ActiveFraction.h:11
xAOD::passBits
passBits
Definition: TrigPassBits_v1.cxx:115
TrigBjetMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: TrigBjetMonitorAlgorithm.cxx:18
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
XMLtoHeader.count
count
Definition: XMLtoHeader.py:84
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
TrigBjetMonitorAlgorithm.h
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:274
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
Monitored
Generic monitoring tool for athena components.
Definition: GenericMonitoringTool.h:30
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:572
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
DataVector::front
const T * front() const
Access the first element in the collection as an rvalue.
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LLRW
bool LLRW(float pqcd, float ptop, float phbb, float &w)
Definition: TrigBjetMonitorAlgorithm.cxx:46
xAOD::Vertex_v1::z
float z() const
Returns the z position.
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.
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
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
TrigBjetMonitorAlgorithm::TrigBjetMonitorAlgorithm
TrigBjetMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TrigBjetMonitorAlgorithm.cxx:11
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
compute_lumi.denom
denom
Definition: compute_lumi.py:76
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
phiCorr
float phiCorr(float phi)
Definition: TrigBjetMonitorAlgorithm.cxx:92
CalcRelPt
bool CalcRelPt(float muonPt, float muonEta, float muonPhi, float jetPt, float jetEta, float jetPhi, float &RelPt)
Definition: TrigBjetMonitorAlgorithm.cxx:62
TrigBjetMonitorAlgorithm::m_btaggingLinkName
Gaudi::Property< std::string > m_btaggingLinkName
Definition: TrigBjetMonitorAlgorithm.h:25
TrigBjetMonitorAlgorithm::m_onlineTrackContainerKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_onlineTrackContainerKey
Definition: TrigBjetMonitorAlgorithm.h:33
BTaggingContainer.h
TrigBjetMonitorAlgorithm::m_muonContainerKey
SG::ReadHandleKey< xAOD::MuonContainer > m_muonContainerKey
Definition: TrigBjetMonitorAlgorithm.h:30
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Amg::error
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Definition: EventPrimitivesHelpers.h:40
xAOD::vertexType
vertexType
Definition: Vertex_v1.cxx:166
checkTriggerxAOD.found
found
Definition: checkTriggerxAOD.py:328
TrigBjetMonitorAlgorithm::m_onlineVertexContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_onlineVertexContainerKey
Definition: TrigBjetMonitorAlgorithm.h:32
AthMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: AthMonitorAlgorithm.cxx:18
CheckAppliedSFs.pu
pu
Definition: CheckAppliedSFs.py:311
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
TrigBjetMonitorAlgorithm::m_collisionRun
Gaudi::Property< bool > m_collisionRun
Definition: TrigBjetMonitorAlgorithm.h:23
TrigBjetMonitorAlgorithm::m_onlineEMTopoBJetContainerKey
SG::ReadHandleKey< xAOD::JetContainer > m_onlineEMTopoBJetContainerKey
Definition: TrigBjetMonitorAlgorithm.h:35
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
JetContainer.h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LLR
bool LLR(double pu, double pc, double pb, double &w)
Definition: TrigBjetMonitorAlgorithm.cxx:31
python.TriggerAPI.TriggerAPISession.chainName
chainName
Definition: TriggerAPISession.py:426
xAOD::Vertex_v1::y
float y() const
Returns the y position.
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
TrigBjetMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: TrigBjetMonitorAlgorithm.cxx:99
TrigBjetMonitorAlgorithm::m_allChains
Gaudi::Property< std::vector< std::string > > m_allChains
Definition: TrigBjetMonitorAlgorithm.h:28
TrigBjetMonitorAlgorithm::m_offlineVertexContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_offlineVertexContainerKey
Definition: TrigBjetMonitorAlgorithm.h:31
TrigBjetMonitorAlgorithm::m_expressStreamFlag
Gaudi::Property< bool > m_expressStreamFlag
Definition: TrigBjetMonitorAlgorithm.h:26
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:198
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
TrigBjetMonitorAlgorithm::m_onlineEMPFlowBJetContainerKey
SG::ReadHandleKey< xAOD::JetContainer > m_onlineEMPFlowBJetContainerKey
Definition: TrigBjetMonitorAlgorithm.h:34
python.SystemOfUnits.pc
float pc
Definition: SystemOfUnits.py:114
python.LArMinBiasAlgConfig.float
float
Definition: LArMinBiasAlgConfig.py:65