|
ATLAS Offline Software
|
Go to the documentation of this file.
45 #define CHECK( ARG ) \
47 const bool result = ARG; \
49 ::Error(APP_NAME, "Failed to execute: \"%s\"", \
73 Error(
APP_NAME,
"No file name received!" );
80 StatusCode::enableFailure();
92 Info(
APP_NAME,
"Number of events in the file: %i",
96 Long64_t
entries =
event.getEntries();
98 const Long64_t
e = atoll(
argv[2]);
104 tool_jtc.
setTypeAndName(
"CP::JetTileCorrectionTool/JetTileCorrectionTool");
107 CHECK( tool_jtc.
setProperty(
"CorrectionFileName",
"JetTileCorrection/JetTile_pFile_010216.root") );
115 std::cout <<
"Starting loop" << std::endl;
118 event.getEntry(
entry);
124 Info(
APP_NAME,
"===>>> Processing entry %lli, run %u, event %lu <<<===",
132 std::pair<xAOD::JetContainer*, xAOD::ShallowAuxContainer*> shallowcopy =
134 std::unique_ptr< xAOD::JetContainer > jets_sc( shallowcopy.first );
135 std::unique_ptr< xAOD::ShallowAuxContainer >
136 jets_scaux( shallowcopy.second );
140 if (
jet->pt() < 20000. || fabs(
jet->eta()) > 2.8)
continue;
146 Warning(
"JetTileCorrectionTester",
"No valid pt/eta range. No correction applied.");
149 Error(
"JetTileCorrectionTester",
"Failed to apply JetTileCorrection!");
153 unsigned int j_status = acc_tileok(*
jet);
155 std::string str_status=
"";
157 str_status =
"NotAffected";
159 str_status =
"EdgeAffected";
161 str_status =
"CoreAffected";
163 str_status =
"Unknown";
165 Info(
APP_NAME,
"Jet status : %s, Pt raw = %.3f GeV, Pt corrected %.3f GeV", str_status.c_str(), acc_ptraw(*
jet)*0.001,
jet->pt()*0.001);
198 Info(
APP_NAME,
"Application finished successfully");
uint64_t eventNumber() const
The current event's event number.
Helper class to provide type-safe access to aux data.
@ kAthenaAccess
Access containers/objects like Athena does.
uint32_t runNumber() const
The current event's run number.
@ OutOfValidityRange
Input object is out of validity range.
StatusCode readFrom(TFile *file)
POOL::TEvent event(POOL::TEvent::kClassAccess)
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.
@ Ok
The correction was done successfully.
A relatively simple transient store for objects created in analysis.
StatusCode retrieve(const T *&obj)
Return value from object correction CP tools.
int main(int argc, char *argv[])
Tool for accessing xAOD files outside of Athena.
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.