ATLAS Offline Software
Loading...
Searching...
No Matches
MuonSelectorToolsTester.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8// System include(s):
9#include <cstdlib>
10#include <iomanip>
11#include <map>
12#include <memory>
13#include <string>
14
15// ROOT include(s):
16#include <TError.h>
17#include <TFile.h>
18#include <TStopwatch.h>
19#include <TString.h>
20
21// Infrastructure include(s):
22#ifdef XAOD_STANDALONE
23#include "xAODRootAccess/Init.h"
25#else
28#endif
29
30// EDM include(s):
36
37// Local include(s):
39
40// Needed for Smart Slimming
43
44// Truth classification
46
48int main(int argc, char* argv[]) {
49 // The application's name:
50 const char* APP_NAME = argv[0];
51
52 // Check if we received a file name:
53 if (argc < 2) {
54 Error(APP_NAME, "No file name received!");
55 Error(APP_NAME, " Usage: %s [xAOD file name] [Nevts to process]", APP_NAME);
56 return 1;
57 }
58
59 // Create a TEvent object:
60#ifdef XAOD_STANDALONE
61 if ( xAOD::Init( APP_NAME ).isFailure() ) {
62 Error( APP_NAME, "Failed to do xAOD::Init!" );
63 return 1;
64 }
66#else
68#endif
69
70 // Open the input file:
71 const TString fileName = argv[1];
72 Info(APP_NAME, "Opening file: %s", fileName.Data());
73 std::unique_ptr<TFile> ifile(TFile::Open(fileName, "READ"));
74 if ( !ifile.get() ) {
75 Error( APP_NAME, "Failed to open input file!" );
76 return 1;
77 }
78
79 //Read from input file with TEvent
80 if ( event.readFrom( ifile.get() ).isFailure() ) {
81 Error( APP_NAME, "Failed to read from input file!" );
82 return 1;
83 }
84 Info(APP_NAME, "Number of events in the file: %i", static_cast<int>(event.getEntries()));
85
86 // Decide how many events to run over:
87 Long64_t entries = event.getEntries();
88 if (argc > 2) {
89 const Long64_t e = atoll(argv[2]);
90 if (e < entries) { entries = e; }
91 }
92
93
94 const int Nwp = 7; // number of working points (tool instances)
95 std::vector<std::string> WPnames = {"Tight", "Medium", "Loose", "VeryLoose", "HighPt", "LowPt", "LowPtMVA"};
96
97
98
99 // done setting up selector tools
100
101 // Create "padding" strings to facilitate easy table view of results
102 std::vector<std::string> padding;
103 padding.clear();
104
105 unsigned int maxNameLength = 0;
106 for (int wp = 0; wp < Nwp; wp++)
107 if (WPnames[wp].size() > maxNameLength) maxNameLength = WPnames[wp].size();
108
109 for (int wp = 0; wp < Nwp; wp++) {
110 std::string pad = "";
111 for (unsigned int i = 0; i < maxNameLength - WPnames[wp].size(); i++) pad += " ";
112
113 padding.push_back(pad);
114 }
115
116 // string with names of working points for selection results display
117 std::string namesString = " ";
118 for (int wp = 0; wp < Nwp; wp++) namesString += WPnames[wp] + " ";
119
120 // Muon counters
121 int allMuons = 0;
122 int nPositive = 0;
123 int nNegative = 0;
124
125 // Summary information - how many muons passed each working point (with and without vetoing bad muons)
126 int selectedMuons[Nwp];
127 for (int wp = 0; wp < Nwp; wp++) selectedMuons[wp] = 0;
128
129 int selectedMuonsNotBad[Nwp];
130 for (int wp = 0; wp < Nwp; wp++) selectedMuonsNotBad[wp] = 0;
131
132 // Obtain summary information also split by muon type
133 const int Ntype = 5;
134
135 std::string typeNames[Ntype];
136 for (int type = 0; type < Ntype; type++) {
137 if (type == xAOD::Muon::Combined)
138 typeNames[type] = "combined";
139 else if (type == xAOD::Muon::MuonStandAlone)
140 typeNames[type] = "stand-alone";
141 else if (type == xAOD::Muon::SegmentTagged)
142 typeNames[type] = "segment-tagged";
143 else if (type == xAOD::Muon::CaloTagged)
144 typeNames[type] = "calo-tagged";
145 else if (type == xAOD::Muon::SiliconAssociatedForwardMuon)
146 typeNames[type] = "forward";
147 else
148 typeNames[type] = "unknown";
149 }
150
151 // Muon counters for each type
152 int allMuonsType[Ntype];
153 for (int type = 0; type < Ntype; type++) allMuonsType[type] = 0;
154
155 // Muon counters for muons of each type passing each working point
156 int selectedMuonsType[Ntype][Nwp];
157 for (int type = 0; type < Ntype; type++)
158 for (int wp = 0; wp < Nwp; wp++) selectedMuonsType[type][wp] = 0;
159
160 int selectedMuonsTypeNotBad[Ntype][Nwp];
161 for (int type = 0; type < Ntype; type++)
162 for (int wp = 0; wp < Nwp; wp++) selectedMuonsTypeNotBad[type][wp] = 0;
163
164
165 // Obtain summary information also split by primary author
166 const int Nauthor = xAOD::Muon::NumberOfMuonAuthors;
167
168 std::string authorNames[Nauthor];
169 for (int author = 0; author < Nauthor; author++) {
170 if (author == xAOD::Muon::MuidCo)
171 authorNames[author] = "MuidCo";
172 else if (author == xAOD::Muon::STACO)
173 authorNames[author] = "STACO";
174 else if (author == xAOD::Muon::MuTag)
175 authorNames[author] = "MuTag";
176 else if (author == xAOD::Muon::MuTagIMO)
177 authorNames[author] = "MuTagIMO";
178 else if (author == xAOD::Muon::MuidSA)
179 authorNames[author] = "MuidSA";
180 else if (author == xAOD::Muon::MuGirl)
181 authorNames[author] = "MuGirl";
182 else if (author == xAOD::Muon::MuGirlLowBeta)
183 authorNames[author] = "MuGirlLowBeta";
184 else if (author == xAOD::Muon::CaloTag)
185 authorNames[author] = "CaloTag";
186 else if (author == xAOD::Muon::CaloLikelihood)
187 authorNames[author] = "CaloLikelihood";
188 else if (author == xAOD::Muon::CaloScore)
189 authorNames[author] = "CaloScore";
190 else if (author == xAOD::Muon::ExtrapolateMuonToIP)
191 authorNames[author] = "ExtrapolateMuonToIP";
192 else
193 authorNames[author] = "unknown";
194 }
195
196 // Muon counters for each author
197 int allMuonsAuthor[Nauthor];
198 for (int author = 0; author < Nauthor; author++) allMuonsAuthor[author] = 0;
199
200 // Muon counters for muons of each author passing each working point
201 int selectedMuonsAuthor[Nauthor][Nwp];
202 for (int author = 0; author < Nauthor; author++)
203 for (int wp = 0; wp < Nwp; wp++) selectedMuonsAuthor[author][wp] = 0;
204
205 int selectedMuonsAuthorNotBad[Nauthor][Nwp];
206 for (int author = 0; author < Nauthor; author++)
207 for (int wp = 0; wp < Nwp; wp++) selectedMuonsAuthorNotBad[author][wp] = 0;
208
209
210 // Obtain summary information also split by muon |eta|
211 const int Neta = 4;
212 double etaCuts[Neta - 1] = {1.0, 2.0, 2.5};
213
214 std::string etaRegions = "|eta| < 1.0 1.0 < |eta| < 2.0 2.0 < |eta| < 2.5 |eta| > 2.5";
215
216 // Muon counters for each eta region
217 int allMuonsEta[Neta];
218 for (int eta = 0; eta < Neta; eta++) allMuonsEta[eta] = 0;
219
220 // Muon counters for muons in each eta region passing each working point
221 int selectedMuonsEta[Neta][Nwp];
222 for (int eta = 0; eta < Neta; eta++)
223 for (int wp = 0; wp < Nwp; wp++) selectedMuonsEta[eta][wp] = 0;
224
225 int selectedMuonsEtaNotBad[Neta][Nwp];
226 for (int eta = 0; eta < Neta; eta++)
227 for (int wp = 0; wp < Nwp; wp++) selectedMuonsEtaNotBad[eta][wp] = 0;
228
229 // Obtain summary information also split by muon truth type
230 const int NtruthType = 5;
231
232 std::string truthTypeNames[NtruthType] = {"Prompt", "Non-isolated", "Hadron", "Background", "Other"};
233
234 // Muon counters for each truth type
235 int allMuonsTruthType[NtruthType];
236 for (int truthType = 0; truthType < NtruthType; truthType++) allMuonsTruthType[truthType] = 0;
237
238 // Muon counters for muons of each type passing each working point
239 int selectedMuonsTruthType[NtruthType][Nwp];
240 for (int truthType = 0; truthType < NtruthType; truthType++)
241 for (int wp = 0; wp < Nwp; wp++) selectedMuonsTruthType[truthType][wp] = 0;
242
243 int selectedMuonsTruthTypeNotBad[NtruthType][Nwp];
244 for (int truthType = 0; truthType < NtruthType; truthType++)
245 for (int wp = 0; wp < Nwp; wp++) selectedMuonsTruthTypeNotBad[truthType][wp] = 0;
246
247 //To determine whether to print truth classification table
248 bool isMC = false;
249
250 std::vector<std::unique_ptr<CP::MuonSelectionTool> > selectorTools;
251 selectorTools.clear();
252
253 // Loop over the events:
254 for (Long64_t entry = 0; entry < entries; ++entry) {
255 // Tell the object which entry to look at:
256 event.getEntry(entry);
257
258 // Counters for selected muons within each event
259 int selectedMuonsEvent[Nwp];
260 for (int wp = 0; wp < Nwp; wp++) selectedMuonsEvent[wp] = 0;
261
262 int selectedMuonsEventNotBad[Nwp];
263 for (int wp = 0; wp < Nwp; wp++) selectedMuonsEventNotBad[wp] = 0;
264
265 // Print some event information for fun:
266 const xAOD::EventInfo* ei = 0;
267 if ( event.retrieve( ei, "EventInfo" ).isFailure() ) {
268 Error( APP_NAME, "Failed to read EventInfo!" );
269 return 1;
270 }
271
272 if(entry==0)
273 {
274 bool isRun3=false;
275 if(!ei->eventType(xAOD::EventInfo::IS_SIMULATION) && ei->runNumber()>=400000) isRun3=true; //in data we expect to be in run3 for datasets with runnumber>=400000
276 if(ei->eventType(xAOD::EventInfo::IS_SIMULATION) && ei->runNumber()>=330000) isRun3=true; //in MC run numbers >= 330000 should correspond to mc21
277
278 if(isRun3) Info(APP_NAME, "setting up muon selection tools for Run3 geometry");
279 else Info(APP_NAME, "setting up muon selection tools for Run2 geometry");
280
281 for (int wp = 0; wp < Nwp; wp++) {
282 Info(APP_NAME, "Creating selector tool for working point: %s ...", WPnames[wp].c_str());
283
284 CP::MuonSelectionTool* muonSelection = new CP::MuonSelectionTool("MuonSelection_" + WPnames[wp]);
285 muonSelection->msg().setLevel(MSG::INFO);
286
287 bool failed = false;
288 failed = failed || muonSelection->setProperty("IsRun3Geo",isRun3).isFailure();
289 failed = failed || muonSelection->setProperty("MaxEta", 2.7).isFailure();
290 if (WPnames[wp] == "LowPtMVA") {
291 failed = failed || muonSelection->setProperty( "MuQuality", 5).isFailure();
292 failed = failed || muonSelection->setProperty( "UseMVALowPt", true).isFailure();
293 }
294 else
295 failed = failed || muonSelection->setProperty("MuQuality", wp).isFailure();
296
297 failed = failed || muonSelection->setProperty("TurnOffMomCorr", true).isFailure();
298 failed = failed || muonSelection->initialize().isFailure();
299
300 if (failed) {
301 Error( APP_NAME, "Failed to set up MuonSelectorTool for working point: %s !", WPnames[wp].c_str() );
302 return 1;
303 }
304
305 selectorTools.emplace_back(muonSelection);
306 }
307 }
308
309 Info(APP_NAME,
310 "===>>> start processing event #%i, "
311 "run #%i %i events processed so far <<<===",
312 static_cast<int>(ei->eventNumber()), static_cast<int>(ei->runNumber()), static_cast<int>(entry));
313
314 // Get the Muons from the event:
315 const xAOD::MuonContainer* muons = 0;
316 if ( event.retrieve( muons, "Muons" ).isFailure() ) {
317 Error( APP_NAME, "Failed to read Muons container!" );
318 return 1;
319 }
320 Info(APP_NAME, "Number of muons: %i", static_cast<int>(muons->size()));
321
322 xAOD::Muon::Quality my_quality;
323 bool passesIDRequirements;
324 bool passesPreselectionCuts;
325
326 int muCounter = 0; // muon counter for each event
327
328 // Print their properties, using the tools:
331 for (; mu_itr != mu_end; ++mu_itr) {
332 int etaIndex = Neta - 1;
333 for (int eta = 0; eta < Neta - 1; eta++)
334 if (std::abs((*mu_itr)->eta()) < etaCuts[eta]) {
335 etaIndex = eta;
336 break;
337 }
338
339 allMuons++;
340 allMuonsType[(*mu_itr)->muonType()]++;
341 allMuonsAuthor[(*mu_itr)->author()]++;
342 allMuonsEta[etaIndex]++;
343 muCounter++;
344
345 Info(APP_NAME, "===== Muon number: %i", static_cast<int>(muCounter));
346
347 // Check truth origin
349 static const SG::ConstAccessor<int> truthTypeAcc ("truthType");
350 int truthClass = isMC ? truthTypeAcc (**mu_itr) : -999;
351
352 int truthType;
353 if (truthClass == MCTruthPartClassifier::IsoMuon)
354 truthType = 0;
355 else if (truthClass == MCTruthPartClassifier::NonIsoMuon)
356 truthType = 1;
357 else if (truthClass == MCTruthPartClassifier::Hadron)
358 truthType = 2;
359 else if (truthClass == MCTruthPartClassifier::BkgMuon)
360 truthType = 3;
361 else
362 truthType = 4;
363
364 allMuonsTruthType[truthType]++;
365
366 if ((*mu_itr)->charge() > 0)
367 nPositive++;
368 else
369 nNegative++;
370
371 passesIDRequirements = selectorTools[0]->passedIDCuts(**mu_itr);
372 passesPreselectionCuts = selectorTools[0]->passedMuonCuts(**mu_itr);
373 my_quality = selectorTools[0]->getQuality(**mu_itr);
374
375 // Print some general information about the muon
376 if (isMC) Info(APP_NAME, "Muon truthType: %d (%s)", truthClass, truthTypeNames[truthType].c_str());
377 Info(APP_NAME, "Muon pT [GeV]: %g ", std::abs((*mu_itr)->pt()) / 1000.);
378 Info(APP_NAME, "Muon eta, phi: %g, %g ", (*mu_itr)->eta(), (*mu_itr)->phi());
379 Info(APP_NAME, "Muon muonType: %d (%s)", (*mu_itr)->muonType(), typeNames[(*mu_itr)->muonType()].c_str());
380 Info(APP_NAME, "Muon primary author: %d (%s)", (*mu_itr)->author(), authorNames[(*mu_itr)->author()].c_str());
381
382 Info(APP_NAME, "Muon quality (from tool, from xAOD): %d, %d", my_quality, (*mu_itr)->quality());
383 Info(APP_NAME, "Muon passes cuts (ID hits, preselection): %d, %d", passesIDRequirements, passesPreselectionCuts);
384
385
386 // Now, let's check whether the muon passes the different working points and also whether it is flagged as bad
387
388 std::string selectionResults = "Muon selection acceptance: ";
389 std::string badMuonResults = "Bad muon flag: ";
390
391 for (int wp = 0; wp < Nwp; wp++) {
392 if (selectorTools[wp]->accept(*mu_itr)) {
393 selectedMuons[wp]++;
394 selectedMuonsEvent[wp]++;
395 selectedMuonsType[(*mu_itr)->muonType()][wp]++;
396 selectedMuonsAuthor[(*mu_itr)->author()][wp]++;
397 selectedMuonsTruthType[truthType][wp]++;
398 selectedMuonsEta[etaIndex][wp]++;
399 selectionResults += "pass ";
400
401 if (!selectorTools[wp]->isBadMuon(**mu_itr)) {
402 selectedMuonsNotBad[wp]++;
403 selectedMuonsEventNotBad[wp]++;
404 selectedMuonsTypeNotBad[(*mu_itr)->muonType()][wp]++;
405 selectedMuonsAuthorNotBad[(*mu_itr)->author()][wp]++;
406 selectedMuonsTruthTypeNotBad[truthType][wp]++;
407 selectedMuonsEtaNotBad[etaIndex][wp]++;
408 }
409 } else
410 selectionResults += "fail ";
411
412 if (!selectorTools[wp]->isBadMuon(**mu_itr))
413 badMuonResults += "good ";
414 else
415 badMuonResults += "bad ";
416 }
417
418 // Print table of selection results for this muon
419 Info(APP_NAME, "%s", namesString.c_str());
420 Info(APP_NAME, "%s", selectionResults.c_str());
421 Info(APP_NAME, "%s", badMuonResults.c_str());
422
423 } // done loop over muons
424
425 // Print table of number of selected muons in this event
426 std::string NselectedString = "Number of selected muons: ";
427 std::string NselectedStringNotBad = "Including bad muon veto: ";
428 for (int wp = 0; wp < Nwp; wp++) {
429 NselectedString += std::to_string(selectedMuonsEvent[wp]) + " ";
430 NselectedStringNotBad += std::to_string(selectedMuonsEventNotBad[wp]) + " ";
431 }
432
433 Info(APP_NAME, "===== Event summary:");
434 Info(APP_NAME, "%s", namesString.c_str());
435 Info(APP_NAME, "%s", NselectedString.c_str());
436 Info(APP_NAME, "%s", NselectedStringNotBad.c_str());
437
438 // Close with a message:
439 Info(APP_NAME,
440 "===>>> done processing event #%i, "
441 "run #%i %i events processed so far <<<===",
442 static_cast<int>(ei->eventNumber()), static_cast<int>(ei->runNumber()), static_cast<int>(entry + 1));
443
444 } // done loop over events
445
446 // Now, let's summarize all we have found in the processed events
447
448 Info(APP_NAME, "======================================");
449 Info(APP_NAME, "========= Full run summary ===========");
450 Info(APP_NAME, "======================================");
451
452 Info(APP_NAME, "Processed %i events and %i muons", static_cast<int>(entries), allMuons);
453
454 Info(APP_NAME, "%i positive and %i negative muons", nPositive, nNegative);
455
456 Info(APP_NAME, "Selected muons by working point (numbers in parenthesis include bad muon veto):");
457 Info(APP_NAME, "--------------------------");
458 for (int wp = 0; wp < Nwp; wp++)
459 Info(APP_NAME, "%s: %s %i (%i)", WPnames[wp].c_str(), padding[wp].c_str(), selectedMuons[wp], selectedMuonsNotBad[wp]);
460 Info(APP_NAME, "--------------------------");
461
462 // Make table of selected muons by type and working point
463 Info(APP_NAME, "Selected muons by type and working point (numbers in parenthesis include bad muon veto):");
464 Info(APP_NAME, "---------------------------------------------------------------------------------------");
465 for (int l = 0; l < Nwp + 2; l++) {
466 std::string line = "";
467 if (l == 0) { // line with type names
468 line += " ";
469 for (int type = 0; type < Ntype; type++) line += typeNames[type] + " ";
470 } else if (l == 1) { // line for all muons inclusive
471 line += "All muons: ";
472 for (int type = 0; type < Ntype; type++) {
473 std::stringstream ss;
474 ss << std::left << std::setw(16) << std::to_string(allMuonsType[type]);
475 line += ss.str();
476 }
477 } else { // lines for each of the working points
478 int wp = l - 2;
479 line += WPnames[wp] + ":" + padding[wp] + " ";
480 for (int type = 0; type < Ntype; type++) {
481 std::stringstream ss;
482 ss << std::left << std::setw(16)
483 << (std::to_string(selectedMuonsType[type][wp]) + " (" + std::to_string(selectedMuonsTypeNotBad[type][wp]) + ")");
484 line += ss.str();
485 }
486 }
487
488 Info(APP_NAME, "%s", line.c_str());
489 }
490 Info(APP_NAME, "---------------------------------------------------------------------------------------");
491
492
493 // Make table of selected muons by author and working point
494 Info(APP_NAME, "Selected muons by primary author and working point (numbers in parenthesis include bad muon veto):");
495 Info(APP_NAME, "---------------------------------------------------------------------------------------");
496 for (int l = 0; l < Nwp + 2; l++) {
497 std::string line = "";
498 if (l == 0) { // line with author names
499 line += " ";
500 for (int author = 0; author < Nauthor; author++) {
501
502 //Do not print unrepresented authors, since the table can be quite wide
503 if (allMuonsAuthor[author] == 0) continue;
504
505 std::stringstream ss;
506 ss << std::left << std::setw(16);
507 ss << authorNames[author];
508 line += ss.str();
509 }
510 } else if (l == 1) { // line for all muons inclusive
511 line += "All muons: ";
512 for (int author = 0; author < Nauthor; author++) {
513
514 if (allMuonsAuthor[author] == 0) continue;
515
516 std::stringstream ss;
517 ss << std::left << std::setw(16);
518 ss << std::to_string(allMuonsAuthor[author]);
519 line += ss.str();
520 }
521 } else { // lines for each of the working points
522 int wp = l - 2;
523 line += WPnames[wp] + ":" + padding[wp] + " ";
524 for (int author = 0; author < Nauthor; author++) {
525
526 if (allMuonsAuthor[author] == 0) continue;
527
528 std::stringstream ss;
529 ss << std::left << std::setw(16);
530 ss << (std::to_string(selectedMuonsAuthor[author][wp]) + " (" + std::to_string(selectedMuonsAuthorNotBad[author][wp]) + ")");
531 line += ss.str();
532 }
533 }
534
535 Info(APP_NAME, "%s", line.c_str());
536 }
537 Info(APP_NAME, "---------------------------------------------------------------------------------------");
538
539
540 // Make table of selected muons by |eta| and working point
541 Info(APP_NAME, "Selected muons by |eta| and working point (numbers in parenthesis include bad muon veto):");
542 Info(APP_NAME, "---------------------------------------------------------------------------------------");
543 for (int l = 0; l < Nwp + 2; l++) {
544 std::string line = "";
545 if (l == 0) { // line with eta regions
546 line += " ";
547 line += etaRegions;
548 } else if (l == 1) { // line for all muons inclusive
549 line += "All muons: ";
550 for (int eta = 0; eta < Neta; eta++) {
551 std::stringstream ss;
552 ss << std::left << std::setw(20) << std::to_string(allMuonsEta[eta]);
553 line += ss.str();
554 }
555 } else { // lines for each of the working points
556 int wp = l - 2;
557 line += WPnames[wp] + ":" + padding[wp] + " ";
558 for (int eta = 0; eta < Neta; eta++) {
559 std::stringstream ss;
560 ss << std::left << std::setw(20)
561 << (std::to_string(selectedMuonsEta[eta][wp]) + " (" + std::to_string(selectedMuonsEtaNotBad[eta][wp]) + ")");
562 line += ss.str();
563 }
564 }
565
566 Info(APP_NAME, "%s", line.c_str());
567 }
568 Info(APP_NAME, "---------------------------------------------------------------------------------------");
569
570 // Make table of selected muons by truth type and working point
571 if (isMC) {
572 Info(APP_NAME, "Selected muons by truth classification and working point (numbers in parenthesis include bad muon veto):");
573 Info(APP_NAME, "---------------------------------------------------------------------------------------");
574 for (int l = 0; l < Nwp + 2; l++) {
575 std::string line = "";
576 if (l == 0) { // line with truth classification labels
577 line += " ";
578 for (int truthType = 0; truthType < NtruthType; truthType++) line += truthTypeNames[truthType] + " ";
579 } else if (l == 1) { // line for all muons inclusive
580 line += "All muons: ";
581 for (int truthType = 0; truthType < NtruthType; truthType++) {
582 std::stringstream ss;
583 ss << std::left << std::setw(16) << std::to_string(allMuonsTruthType[truthType]);
584 line += ss.str();
585 }
586 } else { // lines for each of the working points
587 int wp = l - 2;
588 line += WPnames[wp] + ":" + padding[wp] + " ";
589 for (int truthType = 0; truthType < NtruthType; truthType++) {
590 std::stringstream ss;
591 ss << std::left << std::setw(16)
592 << (std::to_string(selectedMuonsTruthType[truthType][wp]) + " (" +
593 std::to_string(selectedMuonsTruthTypeNotBad[truthType][wp]) + ")");
594 line += ss.str();
595 }
596 }
597
598 Info(APP_NAME, "%s", line.c_str());
599 }
600 Info(APP_NAME, "---------------------------------------------------------------------------------------");
601 }
602
603 // Needed for Smart Slimming
605
606 // Return gracefully:
607 return 0;
608}
Scalar eta() const
pseudorapidity method
#define APP_NAME
Helper class to provide constant type-safe access to aux data.
static Double_t ss
MsgStream & msg() const
Implementation of the muon selector tool.
virtual StatusCode initialize() override
Function initialising the tool.
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
Helper class to provide constant type-safe access to aux data.
bool eventType(EventType type) const
Check for one particular bitmask value.
@ IS_SIMULATION
true: simulation, false: data
uint32_t runNumber() const
The current event's run number.
uint64_t eventNumber() const
The current event's event number.
ReadStats & stats()
Access the object belonging to the current thread.
Definition IOStats.cxx:17
static IOStats & instance()
Singleton object accessor.
Definition IOStats.cxx:11
void printSmartSlimmingBranchList(bool autoIncludeLinks=false) const
Print the accessed variables, formatted for smart slimming.
Tool for accessing xAOD files outside of Athena.
@ kClassAccess
Access auxiliary data using the aux containers.
int main()
Definition hello.cxx:18
double entries
Definition listroot.cxx:49
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
Definition Init.cxx:31
EventInfo_v1 EventInfo
Definition of the latest event info version.
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".