14 {
15
17 using namespace asg::msgUserCode;
19
20 if (argc != 4) {
21 std::cerr <<
"usage: " <<
argv[0] <<
": <DAOD> <parent jet collection> <associated collection>"
22 << std::endl;
23 return 1;
24 }
26 std::string jets_name =
argv[2];
27 std::string linked_jets_name =
argv[3];
28
29
30 const std::string
APP_NAME =
"JetLinksTestDumper";
31
32
34
35
37
38
39 std::unique_ptr<TFile>
ifile(TFile::Open(
file.c_str(),
"READ"));
41 std::cerr <<
"Couldn't open file: " <<
file << std::endl;
42 return 1;
43 }
44
45
47
48 unsigned long long nbad = 0;
49 unsigned long long ngood = 0;
50 unsigned long long entries =
event.getEntries();
52
53 if (
event.getEntry(entry) < 0) {
54 std::cerr <<
"Couldn't load entry " <<
entry <<
" from file"
56 return 1;
57 }
61 std::vector<const xAOD::Jet*> linked_jets;
62 if (!
jet->getAssociatedObjects<
xAOD::Jet>(linked_jets_name, linked_jets)){
63 nbad++;
64 } else {
65 ngood++;
66 }
67 }
68 }
69 std::cout << "JetLinksTestDumper Summary: found " << nbad << " out of " << nbad + ngood <<" large-R jets with no valid links to associated track-jets " << std::endl;
70 return nbad > 0;
71}
Tool for accessing xAOD files outside of Athena.
@ kClassAccess
Access auxiliary data using the aux containers.
Jet_v1 Jet
Definition of the current "jet version".
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
JetContainer_v1 JetContainer
Definition of the current "jet container version".