|
ATLAS Offline Software
|
Go to the documentation of this file.
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();}
52 #define CHECK( ARG ) \
54 const bool result = ARG; \
56 MSG_ERROR("FAILED to execute" <<#ARG); \
57 return EXIT_FAILURE; \
69 dummymsg.msg().setLevel(mylevel);
74 MSG_ERROR(
" Usage: %s [xAOD file name]");
84 std::unique_ptr< TFile >
ifile( TFile::Open(
fileName,
"READ" ) );
90 Info (
APP_NAME,
"By default looking to Electron" );
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);
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);
140 MSG_INFO(
"============================");
148 MSG_INFO(
"---------------------------");
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);
171 MSG_INFO(
"============================");
179 MSG_INFO(
"---------------------------");
181 MSG_INFO(
"Photon Tight accept result: " <<m_photonTightIsEMSelector->
accept(ph));
virtual StatusCode initialize()
AlgTool initialize method.
int main(int argc, char *argv[])
ReadStats & stats()
Access the object belonging to the current thread.
@ kAthenaAccess
Access containers/objects like Athena does.
virtual asg::AcceptData accept(const xAOD::IParticle *part) const
Accept with generic interface.
const uint16_t AuthorCaloTopo35
Photon reconstructed by SW CaloTopo35 seeded clusters.
::Long64_t getEntries() const
Get how many entries are available from the current input file(s)
::Int_t getEntry(::Long64_t entry, ::Int_t getall=0)
Function loading a given entry of the input TTree.
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
static IOStats & instance()
Singleton object accessor.
void printSmartSlimmingBranchList(bool autoIncludeLinks=false) const
Print the accessed variables, formatted for smart slimming.
Class mimicking the AthMessaging class from the offline software.
A relatively simple transient store for objects created in analysis.
std::string getenv(const std::string &variableName)
get an environment variable
StatusCode retrieve(const T *&obj, const std::string &key)
Retrieve either an input or an output object from the event.
StatusCode readFrom(::TFile *file, Bool_t useTreeCache=kTRUE, const char *treeName=EVENT_TREE_NAME)
Connect the object to a new input file.
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Tool for accessing xAOD files outside of Athena.
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.