#include <memory>
#include <cstdlib>
#include <TFile.h>
#include <TError.h>
#include <TString.h>
#include "xAODEgamma/ElectronContainer.h"
#include "xAODEgamma/PhotonContainer.h"
#include "MCTruthClassifier/MCTruthClassifier.h"
#include "MCTruthClassifier/MCTruthClassifierDefs.h"
Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
◆ CHECK
Value:do { \
#ARG ); \
return 1; \
} \
} while( false )
Definition at line 26 of file testClassifier.cxx.
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 35 of file testClassifier.cxx.
52 std::unique_ptr< TFile >
ifile( TFile::Open(
fileName,
"READ" ) );
62 Long64_t
entries =
event.getEntries();
64 const Long64_t
e = atoll(
argv[ 2 ] );
71 CHECK( myClassifier.initialize() );
77 event.getEntry(
entry );
79 std::cout <<
"=================NEXT EVENT==========================" << std::endl;
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);
98 if (tT.isAvailable(**el_it)){;
99 Info (
APP_NAME,
"Electron Type from Reco returns %d ", tT(**el_it) );
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) );
106 Info (
APP_NAME,
"Electron Origin from Analysis Base returns %d ", classification.second );