35 {
36
37
39
40 if( argc < 2 ) {
43 return 1;
44 }
45
46
48
49
52 std::unique_ptr< TFile >
ifile( TFile::Open( fileName,
"READ" ) );
54
55
59 static_cast< int >(
event.getEntries() ) );
60
61
62 Long64_t
entries =
event.getEntries();
63 if( argc > 2 ) {
64 const Long64_t
e = atoll( argv[ 2 ] );
67 }
68 }
69
71 CHECK( myClassifier.initialize() );
72
73
75
76
77 event.getEntry( entry );
78
79 std::cout << "=================NEXT EVENT==========================" << std::endl;
80
81
83 CHECK(
event.retrieve(electrons,
"Electrons") );
84
88
89 for (; el_it != el_it_last; ++el_it, ++
i) {
91 std::cout <<
"Electron " <<
el <<
" Num " <<
i << std::endl;
92 std::cout << "xAOD pt = " << (*el_it)->pt() << std::endl;
94 std::pair<MCTruthPartClassifier::ParticleType,MCTruthPartClassifier::ParticleOrigin>
95 classification = myClassifier.particleTruthClassifier(*el_it);
96
98 if (tT.isAvailable(**el_it)){;
99 Info (
APP_NAME,
"Electron Type from Reco returns %d ", tT(**el_it) );
100 }
101 Info (
APP_NAME,
"Electron Type from Analysis Base returns %d ", classification.first );
103 if (tO.isAvailable(**el_it)){;
104 Info (
APP_NAME,
"Electron Origin from Reco returns %d ", tO(**el_it) );
105 }
106 Info (
APP_NAME,
"Electron Origin from Analysis Base returns %d ", classification.second );
107 }
108 Info(
APP_NAME,
"===>>> done processing event #%lld ",entry);
109 }
110
111
112 return 0;
113}
DataModel_detail::const_iterator< DataVector > const_iterator
SG::Accessor< T, ALLOC > Accessor
Tool for accessing xAOD files outside of Athena.
Error
The different types of error that can be flagged in the L1TopoRDO.
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
Electron_v1 Electron
Definition of the current "egamma version".