|
ATLAS Offline Software
|
Go to the documentation of this file.
44 #define CHECK( ARG ) \
46 const bool result = ARG; \
48 ::Error( APP_NAME, "Failed to execute: \"%s\"", \
85 Info(
APP_NAME,
"Number of events in the file: %i",
89 Long64_t
entries =
event.getEntries();
91 const Long64_t
e = atoll(
argv[ 2 ] );
107 std::vector<CP::SystematicSet> sysList;
109 std::cout <<
"SIZE of the systematics set:" << recommendedSystematics.
size() << std::endl;
118 event.getEntry(
entry);
120 std::cout <<
"=================NEXT EVENT==========================" << std::endl;
134 if (ph->
pt() <
MIN_PT) {
continue; }
135 std::cout << std::string(80,
'-') << std::endl;
136 std::cout <<
"eta|phi|pt|xAOD e = " << ph->
eta() <<
"|" << ph->
phi() <<
"|" << ph->
pt() <<
"|" << ph->
e() << std::endl;
138 std::cout <<
"ERROR: particle has no calocluster" << std::endl;
143 std::cout <<
"particle is not electron of photon" << std::endl;
148 std::cout <<
"Calibrated e = " << ph->
e() << std::endl;
151 std::cout <<
"\n=============SYSTEMATICS CHECK NOW";
152 for (
auto sys : sysList) {
154 if (
tool->applySystematicVariation(
sys) != StatusCode::SUCCESS) {
155 Error(
APP_NAME,
"Cannot configure calibration tool for systematics");
159 std::cout <<
"\nCalibrated pt with systematic " <<
sys.name() <<
" = " << ph->
pt();
161 std::cout <<
"\n=============END SYSTEMATICS " << std::endl;
174 if (
el->pt() <
MIN_PT) {
continue; }
175 std::cout << std::string(80,
'-') << std::endl;
176 std::cout <<
"eta|phi|pt|xAOD e = " <<
el->eta() <<
"|" <<
el->phi() <<
"|" <<
el->pt() <<
"|" <<
el->e() << std::endl;
177 if (not
el->caloCluster()) {
178 std::cout <<
"ERROR: particle has no calocluster" << std::endl;
181 std::cout <<
"raw E = " <<
el->caloCluster()->energyBE(1) +
el->caloCluster()->energyBE(2) +
el->caloCluster()->energyBE(3) << std::endl;
183 std::cout <<
"particle is not electron of photon" << std::endl;
188 std::cout <<
"Calibrated e = " <<
el->e() << std::endl;
191 std::cout <<
"\n=============SYSTEMATICS CHECK NOW";
192 for (
auto sys : sysList) {
194 if (
tool->applySystematicVariation(
sys) != StatusCode::SUCCESS) {
195 Error(
APP_NAME,
"Cannot configure calibration tool for systematics");
199 std::cout <<
"\nCalibrated pt with systematic " <<
sys.name() <<
" = " <<
el->pt();
201 std::cout <<
"\n=============END SYSTEMATICS " << std::endl;
205 "===>>> done processing event #%i, "
206 "run #%i %i events processed so far <<<===",
208 static_cast< int >( event_info->
runNumber() ),
209 static_cast< int >(
entry + 1 ) );
#define RETURN_CHECK(CONTEXT, EXP)
Helper macro for checking return codes in a compact form in the code.
uint64_t eventNumber() const
The current event's event number.
ReadStats & stats()
Access the object belonging to the current thread.
size_t size() const
returns: size of the set
virtual double e() const override final
The total energy of the particle.
Class to wrap a set of SystematicVariations.
@ kClassAccess
Access auxiliary data using the aux containers.
uint32_t runNumber() const
The current event's run number.
StatusCode readFrom(TFile *file)
POOL::TEvent event(POOL::TEvent::kClassAccess)
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
static IOStats & instance()
Singleton object accessor.
void printSmartSlimmingBranchList(bool autoIncludeLinks=false) const
Print the accessed variables, formatted for smart slimming.
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, [[maybe_unused]] const EventContext &ctx)
Function making a shallow copy of a constant container.
Class describing the basic event information.
This module implements the central registry for handling systematic uncertainties with CP tools.
StatusCode retrieve(const T *&obj)
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
float energyBE(const unsigned layer) const
Get the energy in one layer of the EM Calo.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Error
The different types of error that can be flagged in the L1TopoRDO.
Tool for accessing xAOD files outside of Athena.
static SystematicRegistry & getInstance()
Get the singleton instance of the registry for the curren thread.
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.