66{
67
68
70
71
72 if(argc < 2) {
75 return 1;
76 }
77
78
80 StatusCode::enableFailure();
81
82
85 std::unique_ptr<TFile>
ifile(TFile::Open(fileName,
"READ"));
87
88
93 static_cast<int>(
event.getEntries()));
94
95
96 Long64_t
entries =
event.getEntries();
97 if(argc > 2) {
98 const Long64_t
e = atoll(argv[2]);
100 }
101
102
104 tool_jtc.
setTypeAndName(
"CP::JetTileCorrectionTool/JetTileCorrectionTool");
105
106
107 CHECK( tool_jtc.
setProperty(
"CorrectionFileName",
"JetTileCorrection/JetTile_pFile_010216.root") );
108
109
110
111
113
114
115 std::cout << "Starting loop" << std::endl;
117
118 event.getEntry(entry);
119
120
122 CHECK(
event.retrieve(evtInfo,
"EventInfo") );
123 if ( entry%100==0 ){
124 Info(
APP_NAME,
"===>>> Processing entry %lli, run %u, event %lu <<<===",
126 }
127
128
130 CHECK(
event.retrieve(jets,
"AntiKt4EMTopoJets") );
131
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 );
137
139
140 if (
jet->pt() < 20000. || fabs(
jet->eta()) > 2.8)
continue;
141
142
144
146 Warning("JetTileCorrectionTester","No valid pt/eta range. No correction applied.");
147 }
149 Error(
"JetTileCorrectionTester",
"Failed to apply JetTileCorrection!");
150
151 }
152
154
155 std::string str_status="";
157 str_status = "NotAffected";
159 str_status = "EdgeAffected";
161 str_status = "CoreAffected";
162 else
163 str_status = "Unknown";
164
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);
166 }
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196 }
197
199
200 return 0;
201}
static const SG::Accessor< float > acc_ptraw("Ptraw")
static SG::AuxElement::Accessor< unsigned int > acc_tileok("TileStatus")
Return value from object correction CP tools.
@ OutOfValidityRange
Input object is out of validity range.
@ Ok
The correction was done successfully.
uint32_t runNumber() const
The current event's run number.
uint64_t eventNumber() const
The current event's event number.
Tool for accessing xAOD files outside of Athena.
@ kAthenaAccess
Access containers/objects like Athena does.
A relatively simple transient store for objects created in analysis.
Error
The different types of error that can be flagged in the L1TopoRDO.
Jet_v1 Jet
Definition of the current "jet version".
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
EventInfo_v1 EventInfo
Definition of the latest event info version.
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, const EventContext &ctx)
Function making a shallow copy of a constant container.
JetContainer_v1 JetContainer
Definition of the current "jet container version".