|
ATLAS Offline Software
|
Go to the documentation of this file.
29 , m_storeTResult(false)
30 , m_sgMultipleNames({})
31 , m_storeMultipleOutputs(
false)
33 declareInterface<DerivationFramework::IAugmentationTool>(
this);
46 "No SG name provided for the output of EGElectronLikelihoodToolWrapper!");
47 return StatusCode::FAILURE;
74 return StatusCode::SUCCESS;
81 const EventContext& ctx = Gaudi::Hive::currentContext();
113 Error(
"addBranches()",
114 "Error applying fudge factors to current photon");
118 "Current object has no valid fudge factors due to out-of-range");
122 "Unknown correction code %d from ElectronPhotonShowerShapeFudgeTool",
123 (
int)correctionCode);
140 std::unique_ptr<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>
141 decoratorResult =
nullptr;
144 std::make_unique<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>(
153 if (!pCopy) pCopy =
par;
156 const unsigned int isEM =
163 const bool pass_selection = (
bool)theAccept;
164 if (pass_selection) {
165 decoratorPass(*
par) = 1;
167 decoratorPass(*
par) = 0;
169 decoratorIsEM(*
par) = isEM;
170 if (decoratorResult) {
171 (*decoratorResult)(*par) =
172 static_cast<float>(
m_tool->calculate(ctx, pCopy));
177 std::vector<float> toolOutput =
m_tool->calculateMultipleOutputs(ctx, eCopy);
178 for (
size_t i = 0;
i < toolOutput.size();
i++){
179 decoratorMultipleOutputs.at(
i)(*par) = toolOutput.at(
i);
184 decoratorPass(*
par) = 1;
186 decoratorPass(*
par) = 0;
188 decoratorIsEM(*
par) = isEM;
189 if (decoratorResult) {
192 (*decoratorResult)(*par) =
193 static_cast<float>(
m_tool->calculate(ctx, pCopy));
198 std::vector<float> toolOutput =
m_tool->calculateMultipleOutputs(ctx, eCopy);
199 for (
size_t i = 0;
i < toolOutput.size();
i++){
200 decoratorMultipleOutputs.at(
i)(*par) = toolOutput.at(
i);
206 return StatusCode::SUCCESS;
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
std::bitset< NBITS > getCutResultInvertedBitSet() const
Get an inverted bitset of the cut result.
Electron_v1 Electron
Definition of the current "egamma version".
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
@ NEVER_TRACK_INDICES
Never track indices, regardless of the setting of the ownership policy.
@ OutOfValidityRange
Input object is out of validity range.
@ Error
Some error happened during the object correction.
Helper class to provide type-safe access to aux data.
@ OWN_ELEMENTS
this data object owns its elements
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
void resize(size_type sz)
Resizes the collection to the specified number of elements.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
@ Ok
The correction was done successfully.
bool getCutResult(const std::string &cutName) const
Get the result of a cut, based on the cut name (safer)
Return value from object correction CP tools.
setBGCode setTAP setLVL2ErrorBits bool