ATLAS Offline Software
Loading...
Searching...
No Matches
PseudoJetGetter::PFlowRejecter Struct Reference

#include <PseudoJetGetter.h>

Collaboration diagram for PseudoJetGetter::PFlowRejecter:

Public Member Functions

 PFlowRejecter (bool skip, bool useCharged, bool useNeutral, bool chargedPV, bool chargedPUsideband, bool isUFO)
bool operator() (const xAOD::IParticle *ip)

Public Attributes

bool skipNegativeEnergy {false}
bool useChargedPFOs {true}
bool useNeutralPFOs {true}
bool useChargedPV {true}
bool useChargedPUsideband {false}
bool inputIsUFO {false}

Detailed Description

Definition at line 116 of file PseudoJetGetter.h.

Constructor & Destructor Documentation

◆ PFlowRejecter()

PseudoJetGetter::PFlowRejecter::PFlowRejecter ( bool skip,
bool useCharged,
bool useNeutral,
bool chargedPV,
bool chargedPUsideband,
bool isUFO )
inline

Member Function Documentation

◆ operator()()

bool PseudoJetGetter::PFlowRejecter::operator() ( const xAOD::IParticle * ip)
inline

Definition at line 134 of file PseudoJetGetter.h.

134 {
135
136 bool reject = false;
137
138 // Reject PJs with invalid energy --- they will lead
139 // to crashes in fastjet. See ATLASRECTS-7137.
140 float e = ip->e();
141 if (std::isinf(e) || std::isnan(e)) return true;
142
143 if(ip->type() == xAOD::Type::FlowElement){
144 const xAOD::FlowElement* pfo = dynamic_cast<const xAOD::FlowElement*>(ip);
145
146 reject = (skipNegativeEnergy && e<FLT_MIN);
147
148 if(!inputIsUFO){
149 if( pfo->isCharged() ){
150 if(!useChargedPFOs) reject = true;
151 const static SG::AuxElement::ConstAccessor<char> PVMatchedAcc("matchedToPV");
152 if(useChargedPV && !PVMatchedAcc(*pfo)) reject = true;
153 const static SG::AuxElement::ConstAccessor<char> PUsidebandMatchedAcc("matchedToPUsideband");
154 if (useChargedPUsideband && !PUsidebandMatchedAcc(*pfo)) reject = true;
155 }
156 else{
157 if(!useNeutralPFOs) reject = true;
158 }
159 }
160 else{
163 }
164 return reject;
165 }
166
167 const xAOD::PFO* pfo = dynamic_cast<const xAOD::PFO*>(ip);
168
169 // keep charged PFOs with energy==0 because for MET TST with PFlow,
170 // there may be high pt
171 // charged PFOs that receive a weight of 0 due to being in dense
172 // showers, but need to be present for overlap removal, because they
173 // don't retain these weights when added to the TST
174
175 reject = (skipNegativeEnergy && e<FLT_MIN);
176
177 if( pfo->isCharged() ) {
178 if(!useChargedPFOs) reject = true;
179 const static SG::AuxElement::ConstAccessor<char> PVMatchedAcc("matchedToPV");
180 if(useChargedPV && !PVMatchedAcc(*pfo)) reject = true;
181 const static SG::AuxElement::ConstAccessor<char> PUsidebandMatchedAcc("matchedToPUsideband");
182 if (useChargedPUsideband && !PUsidebandMatchedAcc(*pfo)) reject = true;
183 }
184 else{
185 if(!useNeutralPFOs) reject = true;
186 }
187 return reject;
188 }
signal_t signalType() const
bool isCharged() const
is a charged PFO
Definition PFO_v1.cxx:251
@ FlowElement
The object is a track-calo-cluster.
Definition ObjectType.h:52
PFO_v1 PFO
Definition of the current "pfo version".
Definition PFO.h:17
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition FlowElement.h:16

Member Data Documentation

◆ inputIsUFO

bool PseudoJetGetter::PFlowRejecter::inputIsUFO {false}

Definition at line 123 of file PseudoJetGetter.h.

123{false};

◆ skipNegativeEnergy

bool PseudoJetGetter::PFlowRejecter::skipNegativeEnergy {false}

Definition at line 118 of file PseudoJetGetter.h.

118{false};

◆ useChargedPFOs

bool PseudoJetGetter::PFlowRejecter::useChargedPFOs {true}

Definition at line 119 of file PseudoJetGetter.h.

119{true};

◆ useChargedPUsideband

bool PseudoJetGetter::PFlowRejecter::useChargedPUsideband {false}

Definition at line 122 of file PseudoJetGetter.h.

122{false};

◆ useChargedPV

bool PseudoJetGetter::PFlowRejecter::useChargedPV {true}

Definition at line 121 of file PseudoJetGetter.h.

121{true};

◆ useNeutralPFOs

bool PseudoJetGetter::PFlowRejecter::useNeutralPFOs {true}

Definition at line 120 of file PseudoJetGetter.h.

120{true};

The documentation for this struct was generated from the following file: