37 return StatusCode::SUCCESS;
63 std::vector<std::vector<FELink_t>> tauNeutralFEVec(tauJetReadHandle->
size());
64 std::vector<std::vector<FELink_t>> tauChargedFEVec(tauJetReadHandle->
size());
73 if (FE->otherObjects().empty())
continue;
74 if (FE->otherObjects().at(0) ==
nullptr)
continue;
76 size_t FEClusterIndex = FE->otherObjects().at(0)->index();
78 std::vector<TauJetLink_t> FETauJetLinks;
81 for (
const xAOD::TauJet* tau : *tauNeutralFEWriteDecorHandle) {
84 if(acc_passThinning.
isAvailable(*tau) && !acc_passThinning(*tau))
continue;
88 std::vector<const xAOD::IParticle*> tauClusters = tau->clusters();
89 for (
const auto *cluster : tauClusters) {
91 TLorentzVector clusterp4 = clus->
p4();
93 if (tauVertex !=
nullptr) {
95 clusterp4 = vertexedClus.
p4();
100 size_t tauClusterIndex = clus->
index();
103 if (tauClusterIndex == FEClusterIndex) {
104 FETauJetLinks.emplace_back(*tauJetReadHandle,tau->index() );
105 tauNeutralFEVec.at(tau->index()).emplace_back(*neutralFEReadHandle, FE->index() );
112 neutralFETauWriteDecorHandle (*FE) = FETauJetLinks;
121 if (FE->chargedObjects().empty())
continue;
122 if (FE->chargedObjects().at(0) ==
nullptr)
continue;
125 size_t FETrackIndex = FE->chargedObjects().at(0)->index();
127 std::vector<TauJetLink_t> FETauJetLinks;
130 for (
const xAOD::TauJet* tau : *tauChargedFEWriteDecorHandle) {
133 if(acc_passThinning.
isAvailable(*tau) && !acc_passThinning(*tau))
continue;
135 std::vector<const xAOD::TauTrack*> tauTracks = tau->tracks();
136 for (
const auto *tauTrack : tauTracks) {
140 size_t tauIDTrackIndex = tauIDTrack->
index();
143 if (tauIDTrackIndex == FETrackIndex) {
144 FETauJetLinks.emplace_back(*tauJetReadHandle,tau->index() );
145 tauChargedFEVec.at(tau->index()).emplace_back(*chargedFEReadHandle, FE->index() );
151 chargedFETauWriteDecorHandle (*FE) = FETauJetLinks;
159 for (
const xAOD::TauJet* tau : *tauNeutralFEWriteDecorHandle) {
160 tauNeutralFEWriteDecorHandle (*tau) = tauNeutralFEVec.at(tau->index());
161 tauChargedFEWriteDecorHandle (*tau) = tauChargedFEVec.at(tau->index());
166 return StatusCode::SUCCESS;