15 :
asg::AsgTool(myname)
17 #ifndef XAOD_STANDALONE
18 declareInterface<IJetModifier>(
this);
39 ATH_MSG_FATAL(
"Inconsistency in configuration -- all vector properties must have the same (nonzero) length! Sizes: "
44 return StatusCode::FAILURE;
53 ATH_MSG_FATAL(
"Inconsistency in configuration -- Both AltJetScale and AltConstitColl set for scale "
55 return StatusCode::FAILURE;
60 return StatusCode::SUCCESS;
64 if(
jets.empty())
return StatusCode::SUCCESS;
68 std::vector<const xAOD::CaloClusterContainer*> altCollections(nScales,
nullptr);
70 for(
size_t iScale=0; iScale<nScales; ++iScale) {
76 if(!handle.isValid()){
79 return StatusCode::FAILURE;
82 altCollections[iScale] = handle.cptr();
85 return StatusCode::FAILURE;
92 std::vector<xAOD::JetFourMom_t> constitFourVecs(nScales);
97 for (
auto citer = constituents.
begin(constscale);
98 citer != constituents.
end(constscale); ++citer) {
99 for (
size_t iScale=0; iScale<nScales; ++iScale) {
102 if(altCollections[iScale]) {
105 constitFourVecs[iScale] +=
xAOD::JetFourMom_t( cluster->pt(currentState), cluster->eta(currentState),
106 cluster->phi(currentState), cluster->m(currentState) );
110 constitFourVecs[iScale] += **citer;
118 <<
" pt: " <<
jet->pt()
119 <<
", eta: " <<
jet->eta()
120 <<
", phi: " <<
jet->phi());
121 for (
size_t iScale=0; iScale<nScales; ++iScale) {
127 <<
" pt: " << constitFourVecs[iScale].
Pt()
128 <<
", eta: " << constitFourVecs[iScale].
Eta()
129 <<
", phi: " << constitFourVecs[iScale].
Phi());
134 acc_modEta(*
jet) = constitFourVecs[iScale].Eta();
135 acc_modPhi(*
jet) = constitFourVecs[iScale].Phi();
136 acc_modY(*
jet) = constitFourVecs[iScale].Rapidity();
138 <<
", phi: " << constitFourVecs[iScale].
Phi()
139 <<
", rapidity: " << constitFourVecs[iScale].Rapidity());
146 return StatusCode::SUCCESS;