Contains RootCore testing code for the JetTileCorrectionTool.
More...
Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
Contains RootCore testing code for the JetTileCorrectionTool.
- Author
- Martin Tripiana tripi.nosp@m.ana@.nosp@m.cern..nosp@m.ch
Definition in file JetTileCorrectionTester.cxx.
◆ CHECK
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 65 of file JetTileCorrectionTester.cxx.
80 StatusCode::enableFailure();
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);
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.