ATLAS Offline Software
Loading...
Searching...
No Matches
L2MuonSAMon.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "L2MuonSAMon.h"
6
8#include "MuonMatchingTool.h"
9
10L2MuonSAMon :: L2MuonSAMon(const std::string& name, ISvcLocator* pSvcLocator )
11 : TrigMuonMonitorAlgorithm(name, pSvcLocator)
12{}
13
14
15StatusCode L2MuonSAMon :: initialize(){
17 ATH_CHECK( m_L2MuonSAContainerKey.initialize() );
19 return sc;
20}
21
22
23StatusCode L2MuonSAMon :: fillVariablesPerChain(const EventContext &ctx, const std::string &chain) const {
24
25 ATH_MSG_DEBUG("Filling histograms for " << name() << ", chain " << chain << "...");
26
27 auto lb = Monitored::Scalar<int>(chain+"_LB",-1.0);
28 lb = GetEventInfo(ctx)->lumiBlock();
29
30 const float ZERO_LIMIT = 0.00001;
31
32 const bool isPh2FastReco = chain.find("newFast") != std::string::npos;
33 if (isPh2FastReco) {
34 std::vector< TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> > featureCont =
36
37 for (const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer>& muLinkInfo : featureCont){
38 ATH_CHECK( muLinkInfo.isValid() );
39 const ElementLink<xAOD::MuonContainer> muEL = muLinkInfo.link;
40 ATH_MSG_DEBUG("Found EFFastReco object with pt = " << (*muEL)->pt() << ", eta = " << (*muEL)->eta() << ", phi = " << (*muEL)->phi());
41
42 auto saPt = Monitored::Scalar<float>(chain+"_Pt",-999.);
43 auto saEta = Monitored::Scalar<float>(chain+"_Eta",-999.);
44 auto saPhi = Monitored::Scalar<float>(chain+"_Phi",-999.);
45 auto roiEta = Monitored::Scalar<float>(chain+"_roiEta",-999.);
46 auto roiPhi = Monitored::Scalar<float>(chain+"_roiPhi",-999.);
47 auto mf_failure = Monitored::Scalar<bool>(chain+"_mf_failure",false);
48
49 saPt = (*muEL)->pt() * (*muEL)->charge() / Gaudi::Units::GeV; // signed pt
50 saEta = (*muEL)->eta();
51 saPhi = (*muEL)->phi();
52 if(std::abs(saPt) < ZERO_LIMIT) mf_failure = true;
53
54 //retrieve the L1 roi
55 bool L1pass = false;
56 const xAOD::MuonRoI* l1roi = m_matchTool->matchL1(ctx, *muEL, chain, L1pass);
57 roiEta = l1roi ? l1roi->eta() : -999.;
58 roiPhi = l1roi ? l1roi->phi() : -999.;
59
60 fill(m_group+"_"+chain, roiEta, roiPhi, mf_failure);
61 if ( mf_failure ) continue;
62
63 // define barrel or endcap
64 auto isBarrel = Monitored::Scalar<bool>(chain+"_isBarrel",false);
65 auto isEndcap = Monitored::Scalar<bool>(chain+"_isEndcap",false);
66
67 if(std::abs(saEta) < 1.05) isBarrel = true;
68 else isEndcap = true;
69
70 fill(m_group+"_"+chain, saPt, saEta, saPhi, isBarrel, isEndcap);
71 }
72 return StatusCode::SUCCESS;
73 }
74
75 std::vector< TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer> > featureCont =
77 for(const TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer>& muLinkInfo : featureCont){
78 ATH_CHECK( muLinkInfo.isValid() );
79 const ElementLink<xAOD::L2StandAloneMuonContainer> muEL = muLinkInfo.link;
80
81
82 // basic EDM variables
83 auto saPt = Monitored::Scalar<float>(chain+"_Pt",-999.);
84 auto saEta = Monitored::Scalar<float>(chain+"_Eta",-999.);
85 auto saPhi = Monitored::Scalar<float>(chain+"_Phi",-999.);
86 auto saddr = Monitored::Scalar<int>(chain+"_saddr",-999.);
87 auto roiEta = Monitored::Scalar<float>(chain+"_roiEta",-999.);
88 auto roiPhi = Monitored::Scalar<float>(chain+"_roiPhi",-999.);
89 auto mf_failure = Monitored::Scalar<bool>(chain+"_mf_failure",false);
90
91 saPt = (*muEL)->pt();
92 saEta = (*muEL)->eta();
93 saPhi = (*muEL)->phi();
94 saddr = (*muEL)->sAddress();
95 roiEta = (*muEL)->roiEta();
96 roiPhi = (*muEL)->roiPhi();
97
98 ATH_MSG_DEBUG("saPt = " << saPt << ", saEta =" << saEta << ", saPhi = " << saPhi << ", saddr = " << saddr);
99 if(std::abs(saPt) < ZERO_LIMIT) mf_failure = true;
100
101 fill(m_group+"_"+chain, roiEta, roiPhi, mf_failure);
102 if( mf_failure ) continue;
103
104 // define barrel or endcap
105 auto isBarrel = Monitored::Scalar<bool>(chain+"_isBarrel",false);
106 auto isEndcap = Monitored::Scalar<bool>(chain+"_isEndcap",false);
107
108 if(saddr == -1) isEndcap = true;
109 else isBarrel = true;;
110
111 fill(m_group+"_"+chain, saPt, saEta, saPhi, saddr, isBarrel, isEndcap);
112
113
114 // define process flow
115 std::vector<int> proc_flow;
116 auto mon_proc_flow = Monitored::Collection(chain+"_proc_flow", proc_flow);
117
118 bool isL1hitThere = false;
119 bool isL1emuOkForTriggerPlane = false;
120 bool isMDThitThereForTriggerPlane = false;
121 bool isMDTFitOkForTriggerPlane = false;
122 bool isMDTFitOkFor2Plane = false;
123
124
125 // detector variables
126 // RPC and TGC
127 auto nRPC = Monitored::Scalar<int>(chain+"_RPC_Pad_N",0);
128 auto TGCMidRhoChi2 = Monitored::Scalar<float>(chain+"_TGC_Mid_rho_chi2",-1.0);
129 auto TGCMidPhiChi2 = Monitored::Scalar<float>(chain+"_TGC_Mid_phi_chi2",-1.0);
130 auto nTGCMidRho = Monitored::Scalar<int>(chain+"_TGC_Mid_rho_N",0);
131 auto nTGCMidPhi = Monitored::Scalar<int>(chain+"_TGC_Mid_phi_N",0);
132
133 nRPC = (*muEL)->rpcHitLayer().size();
134 TGCMidRhoChi2 = (*muEL)->tgcMidRhoChi2();
135 TGCMidPhiChi2 = (*muEL)->tgcMidPhiChi2();
136 nTGCMidRho = (*muEL)->tgcMidRhoN();
137 nTGCMidPhi = (*muEL)->tgcMidPhiN();
138
139 fill(m_group+"_"+chain, nRPC, TGCMidRhoChi2, TGCMidPhiChi2, nTGCMidRho, nTGCMidPhi, isBarrel, isEndcap);
140
141
142 // use process flow
143 if(isBarrel){
144 if( nRPC > 0 ) isL1hitThere = true;
145 float rpcFitMidSlope = (*muEL)->rpcFitMidSlope();
146 if( std::abs(rpcFitMidSlope) > ZERO_LIMIT ) isL1emuOkForTriggerPlane = true;
147 }
148 else {
149 if( nTGCMidRho > 0 && nTGCMidPhi > 0 ) isL1hitThere = true;
150 float TGCMid1Z = (*muEL)->tgcMid1Z();
151 if( std::abs(TGCMid1Z) > ZERO_LIMIT ) isL1emuOkForTriggerPlane = true;
152 }
153
154
155 // define inner, middle, and outer
156 int inner = 0;
157 int middle = 1;
158 int outer = 2;
159
160 if (isEndcap) {
164 } else {
168 }
169
170 float sign = 1;
171 if( saPhi < 0 ) sign = -1;
172
173
174 // super point
175 std::vector<float> sp_r, sp_z;
176
177 auto mon_sp_r= Monitored::Collection(chain+"_MDTpoints_r", sp_r);
178 auto mon_sp_z= Monitored::Collection(chain+"_MDTpoints_z", sp_z);
179
180 if( std::abs((*muEL)->superPointR(inner)) > ZERO_LIMIT ) {
181 sp_r.push_back( sign * (*muEL)->superPointR(inner) );
182 sp_z.push_back( (*muEL)->superPointZ(inner) );
183 }
184 if( std::abs((*muEL)->superPointR(middle)) > ZERO_LIMIT ) {
185 sp_r.push_back( sign * (*muEL)->superPointR(middle) );
186 sp_z.push_back( (*muEL)->superPointZ(middle) );
187 }
188 if( std::abs((*muEL)->superPointR(outer)) > ZERO_LIMIT ) {
189 sp_r.push_back( sign * (*muEL)->superPointR(outer) );
190 sp_z.push_back( (*muEL)->superPointZ(outer) );
191 }
192
193 fill(m_group+"_"+chain, mon_sp_r, mon_sp_z);
194
195
196 // MDT
197 auto MDTInnChi2 = Monitored::Scalar<float>(chain+"_MDT_Inn_fit_chi2",-1.0);
198 auto MDTMidChi2 = Monitored::Scalar<float>(chain+"_MDT_Mid_fit_chi2",-1.0);
199 auto MDTOutChi2 = Monitored::Scalar<float>(chain+"_MDT_Out_fit_chi2",-1.0);
200 auto n_mdt_hits = Monitored::Scalar<int>(chain+"_MDT_N",0);
201 auto n_mdt_hits_inner = Monitored::Scalar<int>(chain+"_MDT_Inn_N",0);
202 auto n_mdt_hits_middle = Monitored::Scalar<int>(chain+"_MDT_Mid_N",0);
203 auto n_mdt_hits_outer = Monitored::Scalar<int>(chain+"_MDT_Out_N",0);
204
205 MDTInnChi2 = (*muEL)->superPointChi2(inner);
206 MDTMidChi2 = (*muEL)->superPointChi2(middle);
207 MDTOutChi2 = (*muEL)->superPointChi2(outer);
208
209
210 std::vector<float> res_inn, res_mid, res_out;
211
212 auto mon_res_inn = Monitored::Collection(chain+"_MDT_Inn_residual",res_inn);
213 auto mon_res_mid = Monitored::Collection(chain+"_MDT_Mid_residual",res_mid);
214 auto mon_res_out = Monitored::Collection(chain+"_MDT_Out_residual",res_out);
215
216
217 n_mdt_hits = (*muEL)->nMdtHits();
218
219 for (int i_tube=0; i_tube<n_mdt_hits; i_tube++) {
220 float res = (*muEL)->mdtHitResidual(i_tube) / 10 ; // to cm
221 int imr = (*muEL)->mdtHitChamber(i_tube);
222
223 if (imr == inner) {
224 n_mdt_hits_inner++;
225 res_inn.push_back(res);
226 }
227 else if (imr == middle) {
228 n_mdt_hits_middle++;
229 res_mid.push_back(res);
230 }
231 else if (imr == outer) {
232 n_mdt_hits_outer++;
233 res_out.push_back(res);
234 }
235 }
236
237 fill(m_group+"_"+chain, MDTInnChi2, MDTMidChi2, MDTOutChi2, n_mdt_hits, n_mdt_hits_inner, n_mdt_hits_middle, n_mdt_hits_outer, mon_res_inn, mon_res_mid, mon_res_out, lb, isBarrel, isEndcap);
238
239
240 // use process flow
241 float MDTInnR = (*muEL)->superPointR(inner);
242 float MDTMidR = (*muEL)->superPointR(middle);
243 float MDTOutR = (*muEL)->superPointR(outer);
244
245 if( n_mdt_hits_middle > 0 ) isMDThitThereForTriggerPlane = true;
246 if( MDTMidR > ZERO_LIMIT ) isMDTFitOkForTriggerPlane = true;
247 if( isMDTFitOkForTriggerPlane && (MDTInnR > ZERO_LIMIT || MDTOutR > ZERO_LIMIT) ) isMDTFitOkFor2Plane = true;
248
249 proc_flow.push_back(1);
250 if( isL1hitThere ) proc_flow.push_back(2);
251 if( isL1emuOkForTriggerPlane ) proc_flow.push_back(3);
252 if( isMDThitThereForTriggerPlane ) proc_flow.push_back(4);
253 if( isMDTFitOkForTriggerPlane ) proc_flow.push_back(5);
254 if( isMDTFitOkFor2Plane ) proc_flow.push_back(6);
255
256 fill(m_group+"_"+chain, mon_proc_flow);
257
258
259 // matching to offline
260 const xAOD::Muon* RecMuonCB = m_matchTool->matchL2SAtoOff(ctx, (*muEL));
261 if(RecMuonCB == nullptr) continue;
262
263 std::vector<float> res_inn_OffMatch = res_inn;
264 std::vector<float> res_mid_OffMatch = res_mid;
265 std::vector<float> res_out_OffMatch = res_out;
266
267 auto mon_res_inn_OffMatch = Monitored::Collection(chain+"_MDT_Inn_residual_OffMatch",res_inn_OffMatch);
268 auto mon_res_mid_OffMatch = Monitored::Collection(chain+"_MDT_Mid_residual_OffMatch",res_mid_OffMatch);
269 auto mon_res_out_OffMatch = Monitored::Collection(chain+"_MDT_Out_residual_OffMatch",res_out_OffMatch);
270
271 fill(m_group+"_"+chain, mon_res_inn_OffMatch, mon_res_mid_OffMatch, mon_res_out_OffMatch, isBarrel, isEndcap);
272
273 }
274
275 return StatusCode::SUCCESS;
276}
277
278
279
280StatusCode L2MuonSAMon :: fillVariablesPerOfflineMuonPerChain(const EventContext& ctx, const xAOD::Muon* mu, const std::string &chain) const {
281
282 ATH_MSG_DEBUG ("Filling histograms for " << name() << ", chain: " << chain
283 << ", offMuon with pt = " << mu->pt() << ", eta = " << mu->eta() << ", phi = " << mu->phi());
284
285 const float ZERO_LIMIT = 0.00001;
286
287
288 // offline muon variables
289 auto offEta = Monitored::Scalar<float>(chain+"_offEta",-999.);
290 auto offPt_signed = Monitored::Scalar<float>(chain+"_offPt_signed",-999.);
291 offEta = mu->eta();
292
293 float offPt = mu->pt() / Gaudi::Units::GeV; // in GeV
294 float offPhi = mu->phi();
295 float offCharge = mu->charge();
296 offPt_signed = offPt * offCharge;
297
298 float muSAPt{0.}, muSAdR{0.}, roiEta{0.}, roiPhi{0.};
299 bool isMatchedL2SA = false;
300
301 const bool isPh2FastReco = chain.find("newFast") != std::string::npos;
302 if (isPh2FastReco) {
303
304 bool isPassedL2 {false};
305 const xAOD::Muon* muSA = m_matchTool->matchFastRecoSA(ctx, mu, chain, isPassedL2);
306 if ( muSA ) {
307 isMatchedL2SA = true;
308
309 muSAdR = xAOD::P4Helpers::deltaR(mu, muSA, false);
310 muSAPt = muSA->pt() * muSA->charge() / Gaudi::Units::GeV; // signed pt
311
312 bool isPassedL1 {false};
313 const xAOD::MuonRoI* l1roi = m_matchTool->matchL1(ctx, muSA, chain, isPassedL1);
314 roiEta = l1roi ? l1roi->eta() : -999.;
315 roiPhi = l1roi ? l1roi->phi() : -999.;
316
317 } else {
318 isMatchedL2SA = false;
319
320 const TrigCompositeUtils::LinkInfo<xAOD::MuonContainer> muLinkInfo = m_matchTool->searchFastRecoSALinkInfo(mu, chain);
321 if ( !muLinkInfo.isValid() ) return StatusCode::SUCCESS;
322 const ElementLink<xAOD::MuonContainer> muEL = muLinkInfo.link;
323
324 muSAdR = xAOD::P4Helpers::deltaR(mu, *muEL, false);
325 }
326
327 } else {
328 // get L2SA muon link
329 const TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer> muLinkInfo = m_matchTool->searchL2SALinkInfo(mu, chain);
330 if ( !muLinkInfo.isValid() ) return StatusCode::SUCCESS;
332 isMatchedL2SA = m_matchTool->isMatchedL2SA( *muEL, mu);
333
334 muSAdR = xAOD::P4Helpers::deltaR(mu, *muEL, false);
335 muSAPt = (*muEL)->pt();
336 roiEta = (*muEL)->roiEta();
337 roiPhi = (*muEL)->roiPhi();
338 }
339
340 // dR wrt offline
341 auto dRmin = Monitored::Scalar<float>(chain+"_dRmin",1000.);
342 dRmin = muSAdR;
343 fill(m_group+"_"+chain, dRmin);
344
345 if( !isMatchedL2SA ) return StatusCode::SUCCESS; // not matched to L2MuonSA
346
347 // L1 RoI wrt offline
348 auto roidEta = Monitored::Scalar<float>(chain+"_initialRoI_dEta",-999.);
349 auto roidPhi = Monitored::Scalar<float>(chain+"_initialRoI_dPhi",-999.);
350 auto roidR = Monitored::Scalar<float>(chain+"_initialRoI_dR",-999.);
351
352 roidEta = roiEta - offEta;
353 roidPhi = xAOD::P4Helpers::deltaPhi(offPhi, roiPhi);
354 roidR = sqrt(roidEta*roidEta + roidPhi*roidPhi);
355
356 fill(m_group+"_"+chain, roidEta, roidPhi, roidR, offEta);
357
358 // pt resolution, inverse pt resolution
359 auto ptresol = Monitored::Scalar<float>(chain+"_ptresol",-999.);
360 auto invptresol = Monitored::Scalar<float>(chain+"_invptresol",-999.);
361 if ( std::abs(offPt) > ZERO_LIMIT && std::abs(muSAPt) > ZERO_LIMIT ) {
362 ptresol = std::abs(muSAPt)/std::abs(offPt) - 1.;
363 ATH_MSG_ALWAYS("Pt: "<< muSAPt << " vs " << offPt * offCharge << " => ptresol = " << ptresol);
364 invptresol = (1./(offPt * offCharge) - 1./muSAPt) / (1./(offPt * offCharge));
365 }
366
367 // inverse pt resolution depends on charge of offline muon
368 std::vector<float> invptresol_pos, invptresol_neg;
369
370 auto mon_invptresol_pos = Monitored::Collection(chain+"_invptresol_pos",invptresol_pos);
371 auto mon_invptresol_neg = Monitored::Collection(chain+"_invptresol_neg",invptresol_neg);
372
373 if( offCharge > 0. ) invptresol_pos.push_back(invptresol);
374 else invptresol_neg.push_back(invptresol);
375
376 // region variables
377 const float ETA_OF_BARREL = 1.05;
378 const float ETA_OF_ENDCAP1 = 1.5;
379 const float ETA_OF_ENDCAP2 = 2.0;
380 const float ETA_OF_ENDCAP3 = 2.5;
381
382 auto isBarrel = Monitored::Scalar<bool>(chain+"_isBarrel",false);
383 auto isBarrelA = Monitored::Scalar<bool>(chain+"_isBarrelA",false);
384 auto isBarrelC = Monitored::Scalar<bool>(chain+"_isBarrelC",false);
385 auto isEndcapA = Monitored::Scalar<bool>(chain+"_isEndcapA",false);
386 auto isEndcapC = Monitored::Scalar<bool>(chain+"_isEndcapC",false);
387 auto isEndcap1 = Monitored::Scalar<bool>(chain+"_isEndcap1",false);
388 auto isEndcap2 = Monitored::Scalar<bool>(chain+"_isEndcap2",false);
389 auto isEndcap3 = Monitored::Scalar<bool>(chain+"_isEndcap3",false);
390 auto isEndcap1A = Monitored::Scalar<bool>(chain+"_isEndcap1A",false);
391 auto isEndcap2A = Monitored::Scalar<bool>(chain+"_isEndcap2A",false);
392 auto isEndcap3A = Monitored::Scalar<bool>(chain+"_isEndcap3A",false);
393 auto isEndcap1C = Monitored::Scalar<bool>(chain+"_isEndcap1C",false);
394 auto isEndcap2C = Monitored::Scalar<bool>(chain+"_isEndcap2C",false);
395 auto isEndcap3C = Monitored::Scalar<bool>(chain+"_isEndcap3C",false);
396
397 // offline pt variables
398 auto pt4to6 = Monitored::Scalar<bool>(chain+"_pt4to6",false);
399 auto pt6to8 = Monitored::Scalar<bool>(chain+"_pt6to8",false);
400 auto ptover8 = Monitored::Scalar<bool>(chain+"_ptover8",false);
401
402
403 // define region
404 if( std::abs(offEta) < ETA_OF_BARREL ) {
405 if( offEta > 0. ) isBarrelA = true;
406 else isBarrelC = true;
407 }
408 else{
409 if( offEta > 0. ) isEndcapA = true;
410 else isEndcapC = true;
411 }
412
413
414 if( std::abs(offEta) < ETA_OF_BARREL ){
415 isBarrel = true;
416 if( offEta > 0. ) isBarrelA = true;
417 else isBarrelC = true;
418 }
419 else if ( std::abs(offEta) < ETA_OF_ENDCAP1 ){
420 isEndcap1 = true;
421 if( offEta > 0. ) isEndcap1A = true;
422 else isEndcap1C = true;
423 }
424 else if ( std::abs(offEta) < ETA_OF_ENDCAP2 ){
425 isEndcap2 = true;
426 if( offEta > 0. ) isEndcap2A = true;
427 else isEndcap2C = true;
428 }
429 else if ( std::abs(offEta) < ETA_OF_ENDCAP3 ){
430 isEndcap3 = true;
431 if( offEta > 0. ) isEndcap3A = true;
432 else isEndcap3C = true;
433 }
434
435
436 if( std::abs(offPt) > 4 ){
437 if( std::abs(offPt) < 6 ) pt4to6 = true;
438 else if( std::abs(offPt) < 8 ) pt6to8 = true;
439 else ptover8 = true;
440 }
441
442
443 fill(m_group+"_"+chain, ptresol, offPt_signed, offEta, isBarrel, isEndcap1, isEndcap2, isEndcap3, isBarrelA, isBarrelC, isEndcapA, isEndcapC, pt4to6, pt6to8, ptover8);
444 fill(m_group+"_"+chain, mon_invptresol_pos, mon_invptresol_neg, isBarrelA, isBarrelC, isEndcap1A, isEndcap2A, isEndcap3A, isEndcap1C, isEndcap2C, isEndcap3C);
445
446
447 return StatusCode::SUCCESS;
448}
449
450
451
452StatusCode L2MuonSAMon :: fillVariables(const EventContext &ctx) const {
453
454 ATH_MSG_DEBUG ("Filling histograms for " << name() << "...");
455
456 if(!m_L2MuonSAContainerKey.empty()) {
458 }
459
460 if (!m_EFFastRecoContainerKey.empty()) {
462 }
463
464 return StatusCode::SUCCESS;
465
466}
467
468
469
470StatusCode L2MuonSAMon :: fillVariablesPerOfflineMuon(const EventContext &ctx, const xAOD::Muon* mu) const {
471
472 if(!m_L2MuonSAContainerKey.empty()) {
473 ATH_CHECK( fillVariablesRatioPlots<xAOD::L2StandAloneMuon>(ctx, mu, "L2SA", xAOD::Muon::TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle,
474 [this](const EventContext &ctx, const xAOD::Muon *m){ return m_matchTool->matchL2SAReadHandle(ctx,m); }
475 ));
476 }
477
478 if (!m_EFFastRecoContainerKey.empty()) {
479 ATH_CHECK( fillVariablesRatioPlots<xAOD::Muon>(ctx, mu, "L2SA", xAOD::Muon::TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle,
480 [this](const EventContext &ctx, const xAOD::Muon *m){ return m_matchTool->matchFastRecoSAReadHandle(ctx,m); }
481 ));
482 }
483
484 return StatusCode::SUCCESS;
485
486}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ALWAYS(x)
#define ATH_MSG_DEBUG(x)
std::pair< std::vector< unsigned int >, bool > res
static Double_t sc
int sign(int a)
const float ZERO_LIMIT
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool() const
Get the trigger decision tool member.
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.).
SG::ReadHandleKey< xAOD::MuonContainer > m_EFFastRecoContainerKey
Definition L2MuonSAMon.h:29
SG::ReadHandleKey< xAOD::L2StandAloneMuonContainer > m_L2MuonSAContainerKey
Definition L2MuonSAMon.h:28
Declare a monitored scalar variable.
StatusCode fillVariablesRatioPlots(const EventContext &ctx, const xAOD::Muon *mu, std::string &&trigstep, xAOD::Muon::TrackParticleType type, FUNCT matchFunc) const
Function that fills variables of ratio plots.
Gaudi::Property< std::string > m_group
Name of monitored group.
TrigMuonMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode fillVariableEtaPhi(const EventContext &ctx, SG::ReadHandleKey< DataVector< T > > ReadHandleKey, std::string &&trigstep, std::tuple< bool, double, double >(*PosFunc)(const T *)=&TrigMuonMonitorAlgorithm::defaultPosFunc< T >) const
Function that fills variables of etaphi2D plots.
virtual StatusCode initialize() override
initialize
ToolHandle< MuonMatchingTool > m_matchTool
float eta() const
The pseudorapidity ( ) of the muon candidate.
float phi() const
The azimuthal angle ( ) of the muon candidate.
virtual double pt() const override
The transverse momentum ( ) of the particle.
float charge() const
int lb
Definition globals.cxx:23
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
static const unsigned int includeFailedDecisions
Run3 synonym of alsoDeactivateTEs.
@ BarrelInner
Inner station in the barrel spectrometer.
@ EndcapOuter
Outer station in the endcap spectrometer.
@ BarrelMiddle
Middle station in the barrel spectrometer.
@ EndcapMiddle
Middle station in the endcap spectrometer.
@ BarrelOuter
Outer station in the barrel spectrometer.
@ EndcapInner
Inner station in the endcap spectrometer.
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi
L2StandAloneMuonContainer_v2 L2StandAloneMuonContainer
Define the latest version of the muon SA container.
Muon_v1 Muon
Reference the current persistent version:
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
MuonRoI_v1 MuonRoI
Definition MuonRoI.h:15
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGr...
Definition LinkInfo.h:22
ElementLink< T > link
Link to the feature.
Definition LinkInfo.h:55
void fill(H5::Group &out_file, size_t iterations)