 |
ATLAS Offline Software
|
Go to the documentation of this file.
37 return StatusCode::SUCCESS;
75 Error(
"addBranches()",
76 "Error applying fudge factors to current photon");
80 "Current object has no valid fudge factors due to out-of-range");
84 "Unknown correction code %d from ElectronPhotonShowerShapeFudgeTool",
102 std::unique_ptr<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>
103 decoratorResult =
nullptr;
106 std::make_unique<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>(
109 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>> decoratorMultipleOutputs{};
117 if (!pCopy) pCopy =
par;
120 const unsigned int isEM =
127 const bool pass_selection = (
bool)theAccept;
128 if (pass_selection) {
129 decoratorPass(*
par) = 1;
131 decoratorPass(*
par) = 0;
133 decoratorIsEM(*
par) = isEM;
134 if (decoratorResult) {
135 (*decoratorResult)(*par) =
136 static_cast<float>(
m_tool->calculate(ctx, pCopy));
141 std::vector<float> toolOutput =
m_tool->calculateMultipleOutputs(ctx, eCopy);
142 for (
size_t i = 0;
i < toolOutput.size();
i++){
143 decoratorMultipleOutputs.at(
i)(*par) = toolOutput.at(
i);
148 decoratorPass(*
par) = 1;
150 decoratorPass(*
par) = 0;
152 decoratorIsEM(*
par) = isEM;
153 if (decoratorResult) {
154 (*decoratorResult)(*par) =
155 static_cast<float>(
m_tool->calculate(ctx, pCopy));
160 std::vector<float> toolOutput =
m_tool->calculateMultipleOutputs(ctx, eCopy);
161 for (
size_t i = 0;
i < toolOutput.size();
i++){
162 decoratorMultipleOutputs.at(
i)(*par) = toolOutput.at(
i);
168 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".
@ 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.
@ 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