14 return StatusCode::FAILURE;
29 ATH_MSG_INFO(
"List of modification tools in execution sequence:");
36 ATH_MSG_INFO(
"List of official tools in execution sequence:");
43 if (tool_count == 0) {
45 return StatusCode::FAILURE;
47 return StatusCode::SUCCESS;
54 if (!tauInputHandle.
isValid()) {
55 ATH_MSG_ERROR(
"Could not retrieve HiveDataObj with key " << tauInputHandle.
key());
56 return StatusCode::FAILURE;
61 ATH_CHECK(outputTauTrackHandle.
record(std::make_unique<xAOD::TauTrackContainer>(), std::make_unique<xAOD::TauTrackAuxContainer>()));
65 ATH_CHECK(outputTauHandle.
record(std::make_unique<xAOD::TauJetContainer>(), std::make_unique<xAOD::TauJetAuxContainer>()));
79 acc_ori_tau_link(*newTau) = link_to_ori_tau;
82 for (
const auto *tauTrk : tau->allTracks()) {
94 acc_modified(*newTau) =
static_cast<char>(
false);
99 sc =
tool->execute(*newTau);
100 if (
sc.isFailure())
break;
104 if (!acc_modified(*newTau)) {
111 if (!pi0ClusterInHandle.
isValid()) {
112 ATH_MSG_ERROR (
"Could not retrieve HiveDataObj with key " << pi0ClusterInHandle.
key());
113 return StatusCode::FAILURE;
119 ATH_CHECK(chargedPFOHandle.
record(std::make_unique<xAOD::PFOContainer>(), std::make_unique<xAOD::PFOAuxContainer>()));
124 ATH_CHECK(neutralPFOHandle.
record(std::make_unique<xAOD::PFOContainer>(), std::make_unique<xAOD::PFOAuxContainer>()));
129 ATH_CHECK(pi0Handle.
record(std::make_unique<xAOD::ParticleContainer>(), std::make_unique<xAOD::ParticleAuxContainer>()));
134 ATH_CHECK(hadronicPFOHandle.
record(std::make_unique<xAOD::PFOContainer>(), std::make_unique<xAOD::PFOAuxContainer>()));
139 ATH_CHECK(vertOutHandle.
record(std::make_unique<xAOD::VertexContainer>(), std::make_unique<xAOD::VertexAuxContainer>()));
146 if (
tool->type() ==
"TauPi0ClusterCreator")
147 sc =
tool->executePi0ClusterCreator(*pTau, *neutralPFOContainer, *hadronicClusterPFOContainer, *pi0ClusterContainer);
148 else if (
tool->type() ==
"TauVertexVariables")
149 sc =
tool->executeVertexVariables(*pTau, *pSecVtxContainer);
150 else if (
tool->type() ==
"TauPi0ClusterScaler")
151 sc =
tool->executePi0ClusterScaler(*pTau, *neutralPFOContainer, *chargedPFOContainer);
152 else if (
tool->type() ==
"TauPi0ScoreCalculator")
153 sc =
tool->executePi0nPFO(*pTau, *neutralPFOContainer);
154 else if (
tool->type() ==
"TauPi0Selector")
155 sc =
tool->executePi0nPFO(*pTau, *neutralPFOContainer);
156 else if (
tool->type() ==
"PanTau::PanTauProcessor")
157 sc =
tool->executePanTau(*pTau, *pi0Container, *neutralPFOContainer);
158 else if (
tool->type() ==
"tauRecTools::TauTrackRNNClassifier")
159 sc =
tool->executeTrackClassifier(*pTau, *newTauTrkCon);
161 sc =
tool->execute(*pTau);
162 if (
sc.isFailure())
break;
164 if (
sc.isSuccess())
ATH_MSG_VERBOSE(
"The tau candidate has been modified successfully by the invoked official tools.");
167 ATH_MSG_VERBOSE(
"The tau candidate container has been modified by the rest of the tools");
168 ATH_MSG_DEBUG(newTauCon->size() <<
" / " << pTauContainer->size() <<
" taus were modified");
170 return StatusCode::SUCCESS;
177 return acc_modified(*newtau);