|
ATLAS Offline Software
|
Go to the documentation of this file.
36 std::vector<const xAOD::TrackParticle*> jet_tracks;
39 std::vector<const xAOD::Muon*> muons_in_jet;
42 if (
jet->getAssociatedObjects(
"GhostTrack", jet_tracks) ) {
44 for(
const auto *
const muon : muons) {
46 if(!idtrack)
continue;
51 for(
unsigned jtrk=0; jtrk<jet_tracks.size(); ++jtrk) {
53 if(jet_tracks.at(jtrk)==idtrack) {
54 muons_in_jet.push_back(
muon);
60 jet->setAssociatedObjects(
"GhostMuon", muons_in_jet) ;
67 using namespace msgMET;
73 return StatusCode::FAILURE;
77 if(*iMET==metFinal)
continue;
82 <<
" mpx: " << metFinal->
mpx()
83 <<
" mpy: " << metFinal->
mpy()
86 return StatusCode::SUCCESS;
93 using namespace msgMET;
98 ANA_MSG_ERROR(
"failed to fill MET term \"" << totalName <<
"\"");
99 return StatusCode::FAILURE;
103 for(
const auto met : *metCont) {
105 if(
met->source()==invisSource)
continue;
114 <<
" mpx: " << metFinal->
mpx()
115 <<
" mpy: " << metFinal->
mpy()
118 return StatusCode::SUCCESS;
125 const std::string& metKey,
127 using namespace msgMET;
130 return StatusCode::FAILURE;
132 if(metCont->
find(metKey)!=metCont->
end()){
133 ANA_MSG_ERROR(
"Attempted to add a duplicate MET term: " << metKey);
134 return StatusCode::FAILURE;
140 met->setName (metKey);
141 met->setSource(metSource);
143 return StatusCode::SUCCESS;
Const iterator class for DataVector/DataList.
static bool hasPattern(E bits, F mask)
Generic check for given pattern.
static bool isTotalTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
MissingET_v1 MissingET
Version control by type defintion.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
bool const RAWDATA *ch2 const
uint64_t bitmask_t
Type for status word bit mask.
double deltaR2(double rapidity1, double phi1, double rapidity2, double phi2)
from bare rapidity,phi
StatusCode buildMETSum(const std::string &totalName, xAOD::MissingETContainer *metCont)
const_iterator find(const std::string &name) const
Find non-modifiable MET object by name.
void addGhostMuonsToJets(const xAOD::MuonContainer &muons, xAOD::JetContainer &jets)
::StatusCode StatusCode
StatusCode definition for legacy code.
Principal data object for Missing ET.
float mpx() const
Returns .
Container for xAOD::MissingET_v1 objects.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
static Types::bitmask_t total(Region reg=Region::FullAcceptance)
Standard full reconstructed MET.
StatusCode fillMET(xAOD::MissingET *&met, xAOD::MissingETContainer *metCont, const std::string &metKey, const MissingETBase::Types::bitmask_t metSource)
Class describing a TrackParticle.
float mpy() const
Returns .
static bool isSoftTerm(Types::bitmask_t bits, Region reg=Region::FullAcceptance)
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.