 |
ATLAS Offline Software
|
Go to the documentation of this file.
29 , m_storeTResult(false)
30 , m_sgMultipleNames({})
31 , m_storeMultipleOutputs(
false)
33 declareProperty(
"CutType",
m_cut);
34 declareProperty(
"StoreGateEntryName",
m_sgName);
45 "No SG name provided for the output of EGElectronLikelihoodToolWrapper!");
46 return StatusCode::FAILURE;
73 return StatusCode::SUCCESS;
80 const EventContext& ctx = Gaudi::Hive::currentContext();
112 Error(
"addBranches()",
113 "Error applying fudge factors to current photon");
117 "Current object has no valid fudge factors due to out-of-range");
121 "Unknown correction code %d from ElectronPhotonShowerShapeFudgeTool",
122 (
int)correctionCode);
139 std::unique_ptr<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>
140 decoratorResult =
nullptr;
143 std::make_unique<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>(
152 if (!pCopy) pCopy =
par;
155 const unsigned int isEM =
162 const bool pass_selection = (
bool)theAccept;
163 if (pass_selection) {
164 decoratorPass(*
par) = 1;
166 decoratorPass(*
par) = 0;
168 decoratorIsEM(*
par) = isEM;
169 if (decoratorResult) {
170 (*decoratorResult)(*par) =
171 static_cast<float>(
m_tool->calculate(ctx, pCopy));
176 std::vector<float> toolOutput =
m_tool->calculateMultipleOutputs(ctx, eCopy);
177 for (
size_t i = 0;
i < toolOutput.size();
i++){
178 decoratorMultipleOutputs.at(
i)(*par) = toolOutput.at(
i);
183 decoratorPass(*
par) = 1;
185 decoratorPass(*
par) = 0;
187 decoratorIsEM(*
par) = isEM;
188 if (decoratorResult) {
191 (*decoratorResult)(*par) =
192 static_cast<float>(
m_tool->calculate(ctx, pCopy));
197 std::vector<float> toolOutput =
m_tool->calculateMultipleOutputs(ctx, eCopy);
198 for (
size_t i = 0;
i < toolOutput.size();
i++){
199 decoratorMultipleOutputs.at(
i)(*par) = toolOutput.at(
i);
205 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.
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