45#define DUMMY_MSG( lvl, ARG ) {dummymsg.msg(lvl)<<ARG<<endmsg ;}
46#define MSG_DEBUG( ARG ) {DUMMY_MSG(MSG::DEBUG, ARG);}
47#define MSG_INFO( ARG ) {DUMMY_MSG(MSG::INFO, ARG);}
48#define MSG_WARNING( ARG ) {DUMMY_MSG(MSG::WARNING, ARG);}
49#define MSG_ERROR( ARG ) {DUMMY_MSG(MSG::ERROR, ARG);}
50#define MSG_FATAL( ARG ) {DUMMY_MSG(MSG::FATAL, ARG);}
51#define MSG_ABORT( ARG ) {DUMMY_MSG(MSG::FATAL, ARG); std::abort();}
54 const bool result = ARG; \
56 MSG_ERROR("FAILED to execute" <<#ARG); \
57 return EXIT_FAILURE; \
63int main(
int argc,
char* argv[] ) {
68 MSG::Level mylevel=MSG::DEBUG;
69 dummymsg.msg().setLevel(mylevel);
74 MSG_ERROR(
" Usage: %s [xAOD file name]");
82 const TString fileName = argv[ 1 ];
83 Info(
APP_NAME,
"Opening file: %s", fileName.Data() );
84 std::unique_ptr< TFile > ifile( TFile::Open( fileName,
"READ" ) );
90 Info (
APP_NAME,
"By default looking to Electron" );
92 int argv1 = atoi(argv[ 3 ]);
95 else Info(
APP_NAME,
"We are looking to Photon-ID" );
113 const Long64_t e = atoll( argv[ 2 ] );
122 std::unique_ptr<AsgElectronChargeIDSelectorTool> m_electronECIDS = std::make_unique<AsgElectronChargeIDSelectorTool> (
"tightECIDS");
123 std::string trainingfile = std::string(std::getenv(
"ROOTCOREBIN")) +
"/data/ElectronPhotonSelectorTools/ECIDS_20161125for2017Moriond.root";
124 CHECK(m_electronECIDS->setProperty(
"TrainingFile", trainingfile));
125 CHECK(m_electronECIDS->setProperty(
"CutOnBDT", 0));
126 m_electronECIDS->msg().setLevel(mylevel);
127 CHECK(m_electronECIDS->initialize());
130 std::unique_ptr<AsgElectronLikelihoodTool> m_TightLH = std::make_unique<AsgElectronLikelihoodTool> (
"TightLH");
131 CHECK(m_TightLH->setProperty(
"WorkingPoint",
"TightLHElectron"));
132 m_TightLH->msg().setLevel(mylevel);
133 CHECK(m_TightLH->initialize());
136 for( Long64_t entry = 0; entry <
entries; ++entry ) {
140 MSG_INFO(
"============================");
146 unsigned int counter=0;
148 MSG_INFO(
"---------------------------");
150 MSG_INFO(
"Electron LH Tight accept result: " <<m_TightLH->accept(el));
152 MSG_INFO(
"Electron Cut ECIDS accept result: " <<m_electronECIDS->accept(el));
153 MSG_INFO(
"Electron stored Tight: " << el->passSelection(
"Tight") );
161 std::unique_ptr<AsgPhotonIsEMSelector> m_photonTightIsEMSelector = std::make_unique<AsgPhotonIsEMSelector> (
"photonTightIsEMSelector");
162 CHECK(m_photonTightIsEMSelector->setProperty(
"WorkingPoint",
"TightPhoton"));
163 m_photonTightIsEMSelector->msg().setLevel(mylevel);
164 CHECK(m_photonTightIsEMSelector->initialize());
167 for( Long64_t entry = 0; entry <
entries; ++entry ) {
171 MSG_INFO(
"============================");
176 unsigned int counter=0;
179 MSG_INFO(
"---------------------------");
181 MSG_INFO(
"Photon Tight accept result: " <<m_photonTightIsEMSelector->accept(ph));
bool isElectron(const T &p)
Class mimicking the AthMessaging class from the offline software.
StatusCode retrieve(const T *&obj, const std::string &key)
Retrieve either an input or an output object from the event.
ReadStats & stats()
Access the object belonging to the current thread.
static IOStats & instance()
Singleton object accessor.
void printSmartSlimmingBranchList(bool autoIncludeLinks=false) const
Print the accessed variables, formatted for smart slimming.
Tool for accessing xAOD files outside of Athena.
@ kAthenaAccess
Access containers/objects like Athena does.
::Long64_t getEntries() const
Get how many entries are available from the current input file(s)
StatusCode readFrom(::TFile *file, bool useTreeCache=true, std::string_view treeName=EVENT_TREE_NAME)
Connect the object to a new input file.
::Int_t getEntry(::Long64_t entry, ::Int_t getall=0)
Function loading a given entry of the input TTree.
A relatively simple transient store for objects created in analysis.
const uint16_t AuthorCaloTopo35
Photon reconstructed by SW CaloTopo35 seeded clusters.
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
Photon_v1 Photon
Definition of the current "egamma version".
Electron_v1 Electron
Definition of the current "egamma version".