10 ISvcLocator* pSvcLocator )
45 return StatusCode::SUCCESS;
55 std::vector<double> ini_cone2(0);
56 std::vector<double> ini_cone3(0);
57 std::vector<double> ini_trkdz(0);
58 std::vector<double> ini_trkdr(0);
59 std::vector<double> ini_selfpt(0);
60 std::vector<double> ini_removedpt(0);
61 std::vector<double> ini_combinedpt(0);
62 std::vector<int> ini_ntrks(0);
75 muon_selfpt, muon_removedpt, muon_combinedpt, n_trks );
82 if( !idTrackHandle.isValid() ) {
83 ATH_MSG_ERROR(
"Failed to retrieve inner detector track particles");
84 return StatusCode::FAILURE;
86 idTrackParticles = idTrackHandle.cptr();
87 ATH_MSG_DEBUG(
"Inner detector track particles retrieved with size : " << idTrackHandle->size() <<
"...");
90 if ( !efMuonHandle.isValid() ) {
92 return StatusCode::FAILURE;
94 efMuonContainer = efMuonHandle.cptr();
95 ATH_MSG_DEBUG(
"EF Muons retrieved with size : " << efMuonHandle->size());
103 std::vector<double> isoResults;
104 std::vector<double> dzvals;
105 std::vector<double> drvals;
106 std::vector<double> selfremoval;
109 ATH_CHECK(muonOutput.
record(std::make_unique<xAOD::MuonContainer>(), std::make_unique<xAOD::MuonAuxContainer>()));
116 for (
auto muon : *efMuonContainer ) {
117 const xAOD::Muon::MuonType muonType =
muon->muonType();
120 ATH_MSG_DEBUG(
"Not a combined or muon & requiredCombined = true, so ignore this muon");
123 if ( muonType!=xAOD::Muon::MuonType::MuonStandAlone ) {
124 ATH_MSG_DEBUG(
"EF muon hsa neither combined, segment tagged, nor standalone muon");
131 ini_trkdz.insert( ini_trkdz.begin(), dzvals.begin(), dzvals.end());
132 ini_trkdr.insert( ini_trkdr.begin(), drvals.begin(), drvals.end());
133 if ( selfremoval.size()==2 ) {
134 ini_selfpt.push_back(selfremoval[0]*1
e-3);
135 ini_combinedpt.push_back(selfremoval[1]*1
e-3);
138 if (
result.isFailure() || isoResults.size()!=2 ) {
139 ATH_MSG_WARNING(
"Isolation will not be set for this muon. result.isFailure: "<<
result.isFailure()<<
" isoResults.size: "<<isoResults.size());
144 muonptCone20(*outputmuon) = isoResults[0];
145 muonptCone30(*outputmuon) = isoResults[1];
146 ini_cone2.push_back(isoResults[0]*1
e-3);
147 ini_cone3.push_back(isoResults[1]*1
e-3);
152 return StatusCode::SUCCESS;