|
ATLAS Offline Software
|
Go to the documentation of this file.
57 return StatusCode::SUCCESS;
68 return StatusCode::FAILURE;
76 return StatusCode::FAILURE;
79 std::set<const xAOD::IParticle*> newConst;
81 for (
const auto *
const clust : *constits.
tcCont) newConst.insert(clust);
85 for(
const auto *
const jet : *jetCont) {
86 std::vector<const IParticle*> selectedTracks;
89 bool newConstVec =
m_skipconst || mismatchedPFlow || mismatchedState;
90 if (
m_pflow && !mismatchedPFlow) {
92 for (
size_t consti = 0; consti <
jet->numConstituents(); consti++) {
97 selectedTracks.push_back(pfo);
103 for (
size_t consti = 0; consti <
jet->numConstituents(); consti++) {
108 selectedTracks.push_back(pfo);
113 std::vector<const IParticle*> jettracks;
116 selectedTracks.reserve(jettracks.size());
117 for(
const auto& trk : jettracks) {
120 selectedTracks.push_back(trk);
121 ATH_MSG_VERBOSE(
"Accept track " << trk <<
" px, py = " << trk->p4().Px() <<
", " << trk->p4().Py());
125 std::vector<const IParticle*> consts;
126 std::map<const IParticle*,MissingETBase::Types::constvec_t> momenta;
129 if (mismatchedPFlow)
getPFOs(
jet,consts,constits,momenta);
130 else if (mismatchedState)
getClus(
jet,consts);
131 else if (newConstVec)
getOther(
jet,consts,&newConst);
140 return StatusCode::SUCCESS;
144 std::vector<const xAOD::IParticle*> &consts,
146 std::map<const xAOD::IParticle*,MissingETBase::Types::constvec_t> &momenta) {
148 std::vector<const IParticle*> jettracks;
151 if(constits.
feCont !=
nullptr){
158 if (jettrk==pfotrk) {
159 consts.push_back(pfo);
166 for (
size_t consti = 0; consti <
jet->numConstituents(); consti++){
167 if (pfo->
p4().DeltaR(
jet->rawConstituent(consti)->p4())<0.05) marked =
true;
170 consts.push_back(pfo);
180 for(
const auto *
const pfo : *constits.
pfoCont) {
181 if (pfo->isCharged()) {
183 for(
const auto& trk : jettracks) {
185 consts.push_back(pfo);
191 for (
size_t consti = 0; consti <
jet->numConstituents(); consti++)
if (pfo->p4().DeltaR(
jet->rawConstituent(consti)->p4())<0.05) marked =
true;
193 consts.push_back(pfo);
194 TLorentzVector
momentum = pfo->p4();
204 std::vector<const xAOD::IParticle*> &consts) {
205 std::vector<ElementLink<IParticleContainer> > jetconst =
jet->constituentLinks();
206 for(
const auto& clus : jetconst) consts.push_back(*clus);
210 std::vector<const xAOD::IParticle*> &consts,
211 std::set<const xAOD::IParticle*> *newConst)
const {
212 std::vector<ElementLink<IParticleContainer> > jetconst =
jet->constituentLinks();
215 for(
const auto& clusL : jetconst) {
217 if (newConst->count(clus)) consts.push_back(clus);
virtual double pt() const
The transverse momentum ( ) of the particle.
static bool addMiscAssociation(MissingETAssociationMap *pMap)
Add an association to hold objects not associated to any jet.
const TrackParticle * track(unsigned int index) const
Retrieve a const pointer to a Rec::TrackParticle.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
virtual double pt() const override
#define ATH_MSG_VERBOSE(x)
Class providing the definition of the 4-vector interface.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Description of a calorimeter cluster.
size_t findIndex(const Jet *pJet) const
::StatusCode StatusCode
StatusCode definition for legacy code.
FlowElement_v1 FlowElement
Definition of the current "pfo version".
float charge() const
get charge of PFO
xAOD::MissingETAssociation_v1::ConstVec constvec_t
Type for constituent vector.
@ ParticleFlow
The object is a particle-flow object.
@ CalibratedJetConstituent
static bool setJetConstSum(MissingETAssociationMap *metMap, const Jet *jet, const std::vector< const IParticle * > &altConsts, std::map< const IParticle *, MissingETBase::Types::constvec_t > pOverride)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
bool isCharged() const
is a charged PFO
const xAOD::IParticle * chargedObject(std::size_t i) const
Container for xAOD::MissingET_v1 objects.
Class describing a particle flow object.
static bool add(MissingETComponentMap *pMap, const MissingET *pMET, MissingETBase::Types::bitmask_t sw=MissingETBase::Status::clearedStatus())
Adding a MissingET object to the map.
virtual FourMom_t p4() const override
The full 4-momentum of the particle.
@ UncalibratedJetConstituent
#define ATH_MSG_WARNING(x)
Class describing a TrackParticle.
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
bool isInDeltaR(const xAOD::IParticle &p1, const xAOD::IParticle &p2, double dR, bool useRapidity=true)
Check if 2 xAOD::IParticle are in a cone.
A detector object made of other lower level object(s)