User will overwrite this function. Histogram booking is no longer done in C++. This function is called in execute once the filters are all passed.
100 {
101 using namespace Monitored;
102
103 if(
m_trigDecTool->ExperimentalAndExpertMethods().isHLTTruncated()) {
105 return StatusCode::SUCCESS;
106 }
107
108
109
110
111 bool Eofflinepv(false);
112 float offlinepvz(-1.e6);
113 float offlinepvx(-1.e6);
114 float offlinepvy(-1.e6);
115
117 auto OffNVtx = Monitored::Scalar<int>("Off_NVtx",0);
118 auto OffxVtx = Monitored::Scalar<float>("Off_xVtx",0.0);
119 auto OffyVtx = Monitored::Scalar<float>("Off_yVtx",0.0);
120 auto OffzVtx = Monitored::Scalar<float>("Off_zVtx",0.0);
121
125 return StatusCode::FAILURE;
126 }
127 ATH_MSG_DEBUG(
" Size of the Off-line PV container: " << offlinepv->size() );
128 if ( offlinepv->size() ) {
129 Eofflinepv = true;
130 offlinepvz = offlinepv->front()->z();
131 offlinepvx = offlinepv->front()->x();
132 offlinepvy = offlinepv->front()->y();
133 OffNVtx = offlinepv->size() ;
134 for (unsigned int j = 0; j<offlinepv->size(); j++) {
135 if ( (*(offlinepv))[j]->nTrackParticles()==0 ) continue;
136 if ( (*(offlinepv))[j]->
vertexType()==0 )
continue;
137 OffxVtx = (*(offlinepv))[j]->
x();
138 OffyVtx = (*(offlinepv))[j]->
y();
139 OffzVtx = (*(offlinepv))[j]->
z();
140 fill(
"TrigBjetMonitor",OffxVtx,OffyVtx,OffzVtx);
141 }
142 fill(
"TrigBjetMonitor",OffNVtx);
143 }
144 }
145
146
147
148 std::string chainName;
149
151 ATH_MSG_DEBUG(
" Size of the AllChains trigger container: " << size_AllChains );
152 for (
int i =0;
i<size_AllChains;
i++) {
154 ATH_MSG_DEBUG(
" Chain number: " << i <<
" AllChains Chain Name: " << chainName );
155 }
156
157
158
159 bool mujetChain(false);
160 bool bjetChain(true);
161 bool L2bjetChain(false);
162
163
165
166
168 ATH_MSG_DEBUG(
" Trigger chain from AllChains list: " << trigName <<
" has fired !!! " );
169
170
171
174
176
178
179
180
181 mujetChain = false;
182 L2bjetChain = false;
183 bjetChain = false;
184 std::size_t
found = trigName.find(
"HLT_mu");
185 if (found!=std::string::npos) mujetChain = true;
186 else {
187 found = trigName.find(
"a10sd_cssk");
188 if (found!=std::string::npos) L2bjetChain = true;
189 else bjetChain = true;
190 }
191
192 ATH_MSG_DEBUG(
" ===> Run 3 access to Trigger Item: " << trigName );
193 ATH_MSG_DEBUG(
" bjetChain: " << bjetChain <<
" mujetChain: " << mujetChain <<
" L2bjetChain: " << L2bjetChain );
194
195
196
198
201 }
202
203 float zPrmVtx = 0.;
204
205
206
209 int nPV = 0;
212 nPV++;
213 std::string NameH = "PVz_tr_"+trigName;
215 auto PVz_tr = Monitored::Scalar<float>(NameH,0.0);
216 PVz_tr = vtx->z();
217 zPrmVtx = PVz_tr;
219 fill(
"TrigBjetMonitor",PVz_tr);
220 if (Eofflinepv) {
221 NameH = "DiffOnOffPVz_tr_"+trigName;
223 auto DiffOnOffPVz_tr = Monitored::Scalar<float>(NameH,0.0);
224 DiffOnOffPVz_tr = vtx->z()-offlinepvz;
226 fill(
"TrigBjetMonitor",DiffOnOffPVz_tr);
227 }
228 NameH = "PVx_tr_"+trigName;
230 auto PVx_tr = Monitored::Scalar<float>(NameH,0.0);
231 PVx_tr = vtx->x();
233 fill(
"TrigBjetMonitor",PVx_tr);
234 if (Eofflinepv) {
235 NameH = "DiffOnOffPVx_tr_"+trigName;
237 auto DiffOnOffPVx_tr = Monitored::Scalar<float>(NameH,0.0);
238 DiffOnOffPVx_tr = vtx->x()-offlinepvx;
240 fill(
"TrigBjetMonitor",DiffOnOffPVx_tr);
241 }
242 NameH = "PVy_tr_"+trigName;
244 auto PVy_tr = Monitored::Scalar<float>(NameH,0.0);
245 PVy_tr = vtx->y();
247 fill(
"TrigBjetMonitor",PVy_tr);
248 if (Eofflinepv) {
249 NameH = "DiffOnOffPVy_tr_"+trigName;
251 auto DiffOnOffPVy_tr = Monitored::Scalar<float>(NameH,0.0);
252 DiffOnOffPVy_tr = vtx->y()-offlinepvy;
254 fill(
"TrigBjetMonitor",DiffOnOffPVy_tr);
255 }
256 }
257 }
258 std::string NpvH = "nPV_tr_"+trigName;
260 auto nPV_tr = Monitored::Scalar<int>(NpvH,0.0);
261 nPV_tr = nPV;
262 fill(
"TrigBjetMonitor",nPV_tr);
263 }
264
265
266
267
268 if (L2bjetChain) {
270
271 std::string nJetH = "LargeR_nJet_"+trigName;
272 auto nJet = Monitored::Scalar<int>(nJetH,0.0);
273 nJet = onlinejets.size();
275 fill(
"TrigBjetMonitor",nJet);
276 for(const auto& jetLinkInfo : onlinejets) {
277 const xAOD::Jet* jet = *(jetLinkInfo.link);
278
279
280 static const SG::AuxElement::ConstAccessor<float> pqcd_accessor("GN2XTrig_pqcd");
281 static const SG::AuxElement::ConstAccessor<float> ptop_accessor("GN2XTrig_ptop");
282 static const SG::AuxElement::ConstAccessor<float> phbb_accessor("GN2XTrig_phbb");
283 bool isGN2XTrigAvailable = pqcd_accessor.isAvailable(*jet);
284
285 std::string NameH = "GN2XTrig_pqcd_tr_"+trigName;
287 auto GN2XTrig_pqcd = Monitored::Scalar<float>(NameH,0.0);
288 GN2XTrig_pqcd = isGN2XTrigAvailable ? pqcd_accessor(*jet) : -1.;
289 fill(
"TrigBjetMonitor",GN2XTrig_pqcd);
290
291 NameH = "GN2XTrig_ptop_tr_"+trigName;
293 auto GN2XTrig_ptop = Monitored::Scalar<float>(NameH,0.0);
294 GN2XTrig_ptop = isGN2XTrigAvailable ? ptop_accessor(*jet) : -1.;
295 fill(
"TrigBjetMonitor",GN2XTrig_ptop);
296
297 NameH = "GN2XTrig_phbb_tr_"+trigName;
299 auto GN2XTrig_phbb = Monitored::Scalar<float>(NameH,0.0);
300 GN2XTrig_phbb = isGN2XTrigAvailable ? phbb_accessor(*jet) : -1.;
301 fill(
"TrigBjetMonitor",GN2XTrig_phbb);
302
303 NameH = "GN2XTrig_mv_tr_"+trigName;
305 auto GN2XTrig_mv = Monitored::Scalar<float>(NameH,0.0);
306 ATH_MSG_DEBUG(
" GN2XTrig_pqcd: " << GN2XTrig_pqcd <<
" GN2XTrig_ptop: " << GN2XTrig_ptop <<
" GN2XTrig_phbb: " << GN2XTrig_phbb );
307 bool theLLRW =
LLRW (GN2XTrig_pqcd, GN2XTrig_ptop, GN2XTrig_phbb, GN2XTrig_mv);
308 ATH_MSG_DEBUG(
" GN2XTrig_mv: " << GN2XTrig_mv <<
" LLRW: " << theLLRW);
309 if ( theLLRW )
fill(
"TrigBjetMonitor",GN2XTrig_mv);
310
311
312 NameH = "LargeR_jetPt_"+trigName;
314 auto LargeR_jetPt = Monitored::Scalar<float>(NameH,0.0);
315 LargeR_jetPt = (jet->
pt())*1.e-3;
317 fill(
"TrigBjetMonitor",LargeR_jetPt);
318
319
320 NameH = "LargeR_jetEta_"+trigName;
322 auto LargeR_jetEta = Monitored::Scalar<float>(NameH,0.0);
323 LargeR_jetEta = jet->
eta();
324
325
326 NameH = "LargeR_jetPhi_"+trigName;
328 auto LargeR_jetPhi = Monitored::Scalar<float>(NameH,0.0);
329 LargeR_jetPhi = jet->
phi();
330 ATH_MSG_DEBUG(
" LargeR_jetEta: " << LargeR_jetEta <<
" LargeR_jetPhi : " << LargeR_jetPhi);
331 fill(
"TrigBjetMonitor",LargeR_jetEta,LargeR_jetPhi);
332
333
334 NameH = "LargeR_jetMass_"+trigName;
336 auto LargeR_jetMass = Monitored::Scalar<float>(NameH,0.0);
337 LargeR_jetMass = (jet->
m())*1.e-3;
339 fill(
"TrigBjetMonitor",LargeR_jetMass);
340
341
342 static const SG::AuxElement::ConstAccessor<float> pqcd_accessor0("GN2Xv01_pqcd");
343 static const SG::AuxElement::ConstAccessor<float> ptop_accessor0("GN2Xv01_ptop");
344 static const SG::AuxElement::ConstAccessor<float> phbb_accessor0("GN2Xv01_phbb");
345 bool isGN2Xv01Available = pqcd_accessor0.isAvailable(*jet);
346
347 NameH = "GN2Xv01_pqcd_tr_"+trigName;
349 auto GN2Xv01_pqcd = Monitored::Scalar<float>(NameH,0.0);
350 GN2Xv01_pqcd = isGN2Xv01Available ? pqcd_accessor0(*jet) : -1.;
351 fill(
"TrigBjetMonitor",GN2Xv01_pqcd);
352
353 NameH = "GN2Xv01_ptop_tr_"+trigName;
355 auto GN2Xv01_ptop = Monitored::Scalar<float>(NameH,0.0);
356 GN2Xv01_ptop = isGN2Xv01Available ? ptop_accessor0(*jet) : -1.;
357 fill(
"TrigBjetMonitor",GN2Xv01_ptop);
358
359 NameH = "GN2Xv01_phbb_tr_"+trigName;
361 auto GN2Xv01_phbb = Monitored::Scalar<float>(NameH,0.0);
362 GN2Xv01_phbb = isGN2Xv01Available ? phbb_accessor0(*jet) : -1.;
363 fill(
"TrigBjetMonitor",GN2Xv01_phbb);
364
365 NameH = "GN2Xv01_mv_tr_"+trigName;
367 auto GN2Xv01_mv = Monitored::Scalar<float>(NameH,0.0);
368 ATH_MSG_DEBUG(
" GN2Xv01_pqcd: " << GN2Xv01_pqcd <<
" GN2Xv01_ptop: " << GN2Xv01_ptop <<
" GN2Xv01_phbb: " << GN2Xv01_phbb );
369 theLLRW =
LLRW (GN2Xv01_pqcd, GN2Xv01_ptop, GN2Xv01_phbb, GN2Xv01_mv);
370 ATH_MSG_DEBUG(
" GN2Xv01_mv: " << GN2Xv01_mv <<
" LLRW: " << theLLRW);
371 if ( theLLRW )
fill(
"TrigBjetMonitor",GN2Xv01_mv);
372
373 }
374
375 }
376
377
378 if (mujetChain) {
380 int imuon = 0;
381 std::string nMuonH = "nMuon_"+trigName;
382 auto nMuon = Monitored::Scalar<int>(nMuonH,0.0);
383 nMuon = onlinemuons.size();
384 fill(
"TrigBjetMonitor",nMuon);
385
387 int ijet = 0;
388 std::string nJetH = "nJet_"+trigName;
389 auto nJet = Monitored::Scalar<int>(nJetH,0.0);
390 nJet = onlinejets.size();
391 fill(
"TrigBjetMonitor",nJet);
392
393 if (nMuon*nJet > 0) {
394
395 float muonPt1(0.), muonEta1(0.), muonPhi1(0.), muonZ1(0.), jetPt1(0.), jetEta1(0.), jetPhi1(0.), jetZ1(0.), muonZ(0.);
396 double GN1_mv(0.), GN2_mv(0.);
397 bool theLLR_GN1(false), theLLR_GN2(false);
398 bool plotDeltaZ(false);
399
400 for(const auto& muonLinkInfo : onlinemuons) {
402
403 std::string NameH = "muonPt_"+trigName;
405 auto muonPt = Monitored::Scalar<float>(NameH,0.0);
406 muonPt = (
muon->pt())*1.e-3;
408 fill(
"TrigBjetMonitor",muonPt);
409
410 NameH = "muonEta_"+trigName;
412 auto muonEta = Monitored::Scalar<float>(NameH,0.0);
413 muonEta =
muon->eta();
415 fill(
"TrigBjetMonitor",muonEta);
416
417 NameH = "muonPhi_"+trigName;
419 auto muonPhi = Monitored::Scalar<float>(NameH,0.0);
420 muonPhi =
muon->phi();
422
423 auto link =
muon->combinedTrackParticleLink();
424 if (link.isValid()) {
425 plotDeltaZ = true;
428 } else {
429 plotDeltaZ = false;
430 muonZ = 0.;
431 }
432
433 if (imuon == 0) {
434
435 muonPt1 = muonPt;
436 muonEta1 = muonEta;
437 muonPhi1 = muonPhi;
438 muonZ1 = muonZ;
439 }
440
441
442 for(const auto& jetLinkInfo : onlinejets) {
443 const xAOD::Jet* jet = *(jetLinkInfo.link);
444
445 NameH = "jetPt_"+trigName;
447 auto jetPt = Monitored::Scalar<float>(NameH,0.0);
448 jetPt = (jet->
pt())*1.e-3;
450 fill(
"TrigBjetMonitor",jetPt);
451
452 NameH = "jetEta_"+trigName;
454 auto jetEta = Monitored::Scalar<float>(NameH,0.0);
457 fill(
"TrigBjetMonitor",jetEta);
458
459 NameH = "jetPhi_"+trigName;
461 auto jetPhi = Monitored::Scalar<float>(NameH,0.0);
464
465
466 if (ijet == 0) {
467
468 jetPt1 = jetPt;
469 jetEta1 = jetEta;
470 jetPhi1 = jetPhi;
471 jetZ1 = zPrmVtx;
472
474 const SG::AuxElement* obj_storing_btag = nullptr;
475 if ( btaggingLinkInfo.isValid() ) {
476 obj_storing_btag = *(btaggingLinkInfo.link);
477 }
478 else {
479 obj_storing_btag = *(jetLinkInfo.link);
480 }
481
482 static const SG::AuxElement::ConstAccessor<float> GN1pu_accessor("GN120220813_pu");
483 static const SG::AuxElement::ConstAccessor<float> GN1pc_accessor("GN120220813_pc");
484 static const SG::AuxElement::ConstAccessor<float> GN1pb_accessor("GN120220813_pb");
485
486 static const SG::AuxElement::ConstAccessor<float> GN2pu_accessor("GN220240122_pu");
487 static const SG::AuxElement::ConstAccessor<float> GN2pc_accessor("GN220240122_pc");
488 static const SG::AuxElement::ConstAccessor<float> GN2pb_accessor("GN220240122_pb");
489
490
491 if (GN1pu_accessor.isAvailable(*obj_storing_btag)) {
492 double GN1_pu(-1.), GN1_pc(-1.), GN1_pb(-1.);
493 GN1_pu = GN1pu_accessor(*obj_storing_btag);
495 GN1_pc = GN1pc_accessor(*obj_storing_btag);
497 GN1_pb = GN1pb_accessor(*obj_storing_btag);
499 theLLR_GN1 =
LLR (GN1_pu, GN1_pc, GN1_pb, GN1_mv);
500 ATH_MSG_DEBUG(
" GN1_mv: " << GN1_mv <<
" LLR: " << theLLR_GN1);
501 }
502 if (GN2pu_accessor.isAvailable(*obj_storing_btag)) {
503 double GN2_pu(-1.), GN2_pc(-1.), GN2_pb(-1.);
504 GN2_pu = GN2pu_accessor(*obj_storing_btag);
506 GN2_pc = GN2pc_accessor(*obj_storing_btag);
508 GN2_pb = GN2pb_accessor(*obj_storing_btag);
510 theLLR_GN2 =
LLR (GN2_pu, GN2_pc, GN2_pb, GN2_mv);
511 ATH_MSG_DEBUG(
" GN2_mv: " << GN2_mv <<
" LLR: " << theLLR_GN2);
512 }
513 }
514
515 ijet++;
516
517 }
518
519 imuon++;
520
521 }
522
523
524
525
526 std::string DeltaRH = "DeltaR_"+trigName;
528 auto DeltaR = Monitored::Scalar<float>(DeltaRH,0.0);
529 float DeltaEta = muonEta1 - jetEta1;
531 DeltaR = sqrt( DeltaEta*DeltaEta + DeltaPhi*DeltaPhi );
533 fill(
"TrigBjetMonitor",DeltaR);
534
535
536 std::string DeltaZH = "DeltaZ_"+trigName;
538 auto DeltaZ = Monitored::Scalar<float>(DeltaZH,0.0);
539 DeltaZ = std::abs(muonZ1-jetZ1);
541 if (plotDeltaZ)
fill(
"TrigBjetMonitor",DeltaZ);
542
543
544 std::string RatioPtH = "RatioPt_"+trigName;
546 auto RatioPt = Monitored::Scalar<float>(RatioPtH,0.0);
547 RatioPt = -100.;
548 if (jetPt1 > 0.) RatioPt = muonPt1/jetPt1;
550 if (RatioPt > 0.)
fill(
"TrigBjetMonitor",RatioPt);
551
552
553 std::string RelPtH = "RelPt_"+trigName;
555 auto RelPt = Monitored::Scalar<float>(RelPtH,0.0);
556 RelPt = 1.e10;
557 bool calc_relpt =
CalcRelPt (muonPt1, muonEta1, muonPhi1, jetPt1, jetEta1, jetPhi1, RelPt);
559
560
561 std::string wGN1H = "wGN1_"+trigName;
563 auto wGN1 = Monitored::Scalar<float>(wGN1H,0.0);
564 wGN1 =
float(GN1_mv);
566 if (calc_relpt && theLLR_GN1)
fill(
"TrigBjetMonitor",wGN1,RelPt);
567
568
569 std::string wGN2H = "wGN2_"+trigName;
571 auto wGN2 = Monitored::Scalar<float>(wGN2H,0.0);
572 wGN2 =
float(GN2_mv);
574 if (calc_relpt && theLLR_GN2)
fill(
"TrigBjetMonitor",wGN2,RelPt);
575
576 }
577
578 }
579
580
581 if (bjetChain) {
582
583
584
586
587 int ijet = 0;
588 int itrack = 0;
589 std::string nJetH = "nJet_"+trigName;
590 auto nJet = Monitored::Scalar<int>(nJetH,0.0);
591 nJet = onlinejets.size();
592 fill(
"TrigBjetMonitor",nJet);
593
594 if (nJet > 0) {
595
596 for(const auto& jetLinkInfo : onlinejets) {
597 const xAOD::Jet* jet = *(jetLinkInfo.link);
598
599 std::string NameH = "jetPt_"+trigName;
601 auto jetPt = Monitored::Scalar<float>(NameH,0.0);
602 jetPt = (jet->
pt())*1.e-3;
604 fill(
"TrigBjetMonitor",jetPt);
605
606 NameH = "jetEta_"+trigName;
608 auto jetEta = Monitored::Scalar<float>(NameH,0.0);
610
611 NameH = "jetPhi_"+trigName;
613 auto jetPhi = Monitored::Scalar<float>(NameH,0.0);
615 ATH_MSG_DEBUG(
" jetEta: " << jetEta <<
" jetPhi : " << jetPhi);
616 fill(
"TrigBjetMonitor",jetEta,jetPhi);
617
618
619 if (ijet == 0) {
620
621
622
624 if ( vtxname.compare(0, 4, "HLT_")==0 ) vtxname.erase(0,4);
628 NameH = "PVz_jet_"+trigName;
630 auto PVz_jet = Monitored::Scalar<float>(NameH,0.0);
633 fill(
"TrigBjetMonitor",PVz_jet);
634 NameH = "PVx_jet_"+trigName;
636 auto PVx_jet = Monitored::Scalar<float>(NameH,0.0);
639 fill(
"TrigBjetMonitor",PVx_jet);
640 NameH = "PVy_jet_"+trigName;
642 auto PVy_jet = Monitored::Scalar<float>(NameH,0.0);
645 fill(
"TrigBjetMonitor",PVy_jet);
646
647
648 }
649
650 ijet++;
651
652
653 const SG::AuxElement* obj_storing_btag = nullptr;
655 if ( btaggingLinkInfo.isValid() ) {
656 obj_storing_btag = *(btaggingLinkInfo.link);
657 }
658 else {
659 obj_storing_btag = *(jetLinkInfo.link);
660 }
661
662 bool theLLR(false);
663 static const SG::AuxElement::ConstAccessor<float> GN1pu_accessor("GN120220813_pu");
664 static const SG::AuxElement::ConstAccessor<float> GN1pc_accessor("GN120220813_pc");
665 static const SG::AuxElement::ConstAccessor<float> GN1pb_accessor("GN120220813_pb");
666 static const SG::AuxElement::ConstAccessor<float> GN2pu_accessor("GN220240122_pu");
667 static const SG::AuxElement::ConstAccessor<float> GN2pc_accessor("GN220240122_pc");
668 static const SG::AuxElement::ConstAccessor<float> GN2pb_accessor("GN220240122_pb");
669
670 bool GN1_available = GN1pu_accessor.isAvailable(*obj_storing_btag);
671 bool GN2_available = GN2pu_accessor.isAvailable(*obj_storing_btag);
672 NameH = "GN1_pu_tr_"+trigName;
674 auto GN1_pu = Monitored::Scalar<double>(NameH,0.0);
675 GN1_pu = GN1_available ? GN1pu_accessor(*obj_storing_btag) : -1.0;
677 fill(
"TrigBjetMonitor",GN1_pu);
678
679 NameH = "GN1_pc_tr_"+trigName;
681 auto GN1_pc = Monitored::Scalar<double>(NameH,0.0);
682 GN1_pc = GN1_available ? GN1pc_accessor(*obj_storing_btag) : -1.0;
684 fill(
"TrigBjetMonitor",GN1_pc);
685
686 NameH = "GN1_pb_tr_"+trigName;
688 auto GN1_pb = Monitored::Scalar<double>(NameH,0.0);
689 GN1_pb = GN1_available ? GN1pb_accessor(*obj_storing_btag) : -1.0;
691 fill(
"TrigBjetMonitor",GN1_pb);
692
693 NameH = "GN1_mv_tr_"+trigName;
695 auto GN1_mv = Monitored::Scalar<double>(NameH,0.0);
696 theLLR =
LLR (GN1_pu, GN1_pc, GN1_pb, GN1_mv);
697 if ( theLLR )
fill(
"TrigBjetMonitor",GN1_mv);
699
700
701 NameH = "GN2_pu_tr_"+trigName;
703 auto GN2_pu = Monitored::Scalar<double>(NameH,0.0);
704 GN2_pu = GN2_available ? GN2pu_accessor(*obj_storing_btag) : -1.0;
706 fill(
"TrigBjetMonitor",GN2_pu);
707
708 NameH = "GN2_pc_tr_"+trigName;
710 auto GN2_pc = Monitored::Scalar<double>(NameH,0.0);
711 GN2_pc = GN2_available ? GN2pc_accessor(*obj_storing_btag) : -1.0;
713 fill(
"TrigBjetMonitor",GN2_pc);
714
715 NameH = "GN2_pb_tr_"+trigName;
717 auto GN2_pb = Monitored::Scalar<double>(NameH,0.0);
718 GN2_pb = GN2_available ? GN2pb_accessor(*obj_storing_btag) : -1.0;
720 fill(
"TrigBjetMonitor",GN2_pb);
721
722 NameH = "GN2_mv_tr_"+trigName;
724 auto GN2_mv = Monitored::Scalar<double>(NameH,0.0);
725 theLLR =
LLR (GN2_pu, GN2_pc, GN2_pb, GN2_mv);
726 if ( theLLR )
fill(
"TrigBjetMonitor",GN2_mv);
728
729
730
731 const auto track_it_pair =
m_trigDecTool->associateToEventView(theTracks, jetLinkInfo.source,
"roi");
734
738 ATH_MSG_DEBUG(
" Track " <<
count <<
" with pT " << (*it)->pt() <<
" from BJet with pT " << (*jetLinkInfo.link)->pt() );
739 ATH_MSG_DEBUG(
" Track " <<
count <<
" with pT/eta/phi " << (*it)->pt() <<
"/" << (*it)->eta() <<
"/" << (*it)->phi() );
742 std::string NameH = "trkPt_"+trigName;
744 auto trkPt = Monitored::Scalar<float>(NameH,0.0);
745 trkPt = ((*it)->pt())*1.e-3;
747 fill(
"TrigBjetMonitor",trkPt);
748 NameH = "trkEta_"+trigName;
750 auto trkEta = Monitored::Scalar<float>(NameH,0.0);
751 trkEta = (*it)->eta();
752 NameH = "trkPhi_"+trigName;
754 auto trkPhi = Monitored::Scalar<float>(NameH,0.0);
755 trkPhi = (*it)->phi();
756 ATH_MSG_DEBUG(
" trkEta: " << trkEta <<
" trkPhi : " << trkPhi);
757 fill(
"TrigBjetMonitor",trkEta,trkPhi);
758 NameH = "d0_"+trigName;
760 auto d0 = Monitored::Scalar<float>(NameH,0.0);
763 fill(
"TrigBjetMonitor",d0);
764 NameH = "z0_"+trigName;
766 auto z0 = Monitored::Scalar<float>(NameH,0.0);
769 fill(
"TrigBjetMonitor",z0);
770 NameH = "ed0_"+trigName;
772 auto ed0 = Monitored::Scalar<float>(NameH,0.0);
773 ed0 =
Amg::error((*it)->definingParametersCovMatrix(), 0);
775 fill(
"TrigBjetMonitor",ed0);
776 NameH = "sd0_"+trigName;
778 auto sd0 = Monitored::Scalar<float>(NameH,0.0);
779 sd0 = -10.;
780 if (ed0 > 0.) sd0 = std::abs(d0)/ed0;
782 fill(
"TrigBjetMonitor",sd0);
783 NameH = "ez0_"+trigName;
785 auto ez0 = Monitored::Scalar<float>(NameH,0.0);
786 ez0 =
Amg::error((*it)->definingParametersCovMatrix(), 1);
788 fill(
"TrigBjetMonitor",ez0);
789 }
792
793 }
794
795 ATH_MSG_DEBUG(
" Total number of triggered b-jets: " << ijet <<
" nJet : " << nJet);
796 ATH_MSG_DEBUG(
" Total number of triggered tracks associated to the b-jets: " << itrack);
797 std::string nTrackH = "nTrack_"+trigName;
798 auto nTrack = Monitored::Scalar<int>(nTrackH,0.0);
799 nTrack = itrack;
800 fill(
"TrigBjetMonitor",nTrack);
801
802 }
803
804 }
805
806 } else {
807 ATH_MSG_DEBUG(
" Chain " << trigName <<
" is declared for the Express Stream but it is NOT in the Express Stream in an Express Job");
808 }
809
810 } else {
811 ATH_MSG_DEBUG(
" Trigger chain from AllChains list: " << trigName <<
" has not fired " );
812 }
813
814
815 }
816
817 return StatusCode::SUCCESS;
818}
#define ATH_CHECK
Evaluate an expression and check for errors.
bool LLRW(float pqcd, float ptop, float phbb, float &w)
bool LLR(double pu, double pc, double pb, double &w)
bool CalcRelPt(float muonPt, float muonEta, float muonPhi, float jetPt, float jetEta, float jetPhi, float &RelPt)
DataModel_detail::const_iterator< DataVector > const_iterator
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::ReadHandleKey< xAOD::VertexContainer > m_offlineVertexContainerKey
Gaudi::Property< bool > m_expressStreamFlag
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_onlineTrackContainerKey
Gaudi::Property< std::vector< std::string > > m_allChains
Gaudi::Property< std::string > m_btaggingLinkName
SG::ReadHandleKey< xAOD::VertexContainer > m_onlineVertexContainerKey
Gaudi::Property< bool > m_collisionRun
virtual double phi() const
The azimuthal angle ( ) of the particle.
virtual double pt() const
The transverse momentum ( ) of the particle.
virtual double m() const
The invariant mass of the particle.
virtual double eta() const
The pseudorapidity ( ) of the particle.
float z() const
Returns the z position.
float y() const
Returns the y position.
float x() const
Returns the x position.
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.
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string
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 ...
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
LinkInfo< T > findLink(const Decision *start, const std::string &linkName, const bool suppressMultipleLinksWarning=false)
Perform a recursive search for ElementLinks of type T and name 'linkName', starting from Decision obj...
static const unsigned int Express_passed
static const unsigned int Physics
Jet_v1 Jet
Definition of the current "jet version".
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
Muon_v1 Muon
Reference the current persistent version:
JetContainer_v1 JetContainer
Definition of the current "jet container version".
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".