ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
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

Definition at line 125 of file PseudoJetGetter.h.

125  :
127  useChargedPFOs(useCharged),
128  useNeutralPFOs(useNeutral),
129  useChargedPV(chargedPV),
130  useChargedPUsideband(chargedPUsideband),
131  inputIsUFO(isUFO){
132  }

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{
161  if(pfo->signalType() == xAOD::FlowElement::SignalType::Charged && !useChargedPFOs) reject = true;
162  if(pfo->signalType() == xAOD::FlowElement::SignalType::Neutral && !useNeutralPFOs) reject = true;
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  }

Member Data Documentation

◆ inputIsUFO

bool PseudoJetGetter::PFlowRejecter::inputIsUFO {false}

Definition at line 123 of file PseudoJetGetter.h.

◆ skipNegativeEnergy

bool PseudoJetGetter::PFlowRejecter::skipNegativeEnergy {false}

Definition at line 118 of file PseudoJetGetter.h.

◆ useChargedPFOs

bool PseudoJetGetter::PFlowRejecter::useChargedPFOs {true}

Definition at line 119 of file PseudoJetGetter.h.

◆ useChargedPUsideband

bool PseudoJetGetter::PFlowRejecter::useChargedPUsideband {false}

Definition at line 122 of file PseudoJetGetter.h.

◆ useChargedPV

bool PseudoJetGetter::PFlowRejecter::useChargedPV {true}

Definition at line 121 of file PseudoJetGetter.h.

◆ useNeutralPFOs

bool PseudoJetGetter::PFlowRejecter::useNeutralPFOs {true}

Definition at line 120 of file PseudoJetGetter.h.


The documentation for this struct was generated from the following file:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
PseudoJetGetter::PFlowRejecter::skipNegativeEnergy
bool skipNegativeEnergy
Definition: PseudoJetGetter.h:118
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
PUClassification.Charged
Charged
Definition: PUClassification.py:16
xAOD::FlowElement_v1::isCharged
bool isCharged() const
Definition: FlowElement_v1.cxx:56
xAOD::FlowElement
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition: FlowElement.h:16
PseudoJetGetter::PFlowRejecter::useChargedPV
bool useChargedPV
Definition: PseudoJetGetter.h:121
PseudoJetGetter::PFlowRejecter::useChargedPUsideband
bool useChargedPUsideband
Definition: PseudoJetGetter.h:122
xAOD::FlowElement_v1::signalType
signal_t signalType() const
PseudoJetGetter::PFlowRejecter::inputIsUFO
bool inputIsUFO
Definition: PseudoJetGetter.h:123
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
xAOD::PFO_v1::isCharged
bool isCharged() const
is a charged PFO
Definition: PFO_v1.cxx:251
xAOD::PFO_v1
Class describing a particle flow object.
Definition: PFO_v1.h:35
skip
bool skip
Definition: TrigGlobEffCorrValidation.cxx:190
PseudoJetGetter::PFlowRejecter::useNeutralPFOs
bool useNeutralPFOs
Definition: PseudoJetGetter.h:120
PseudoJetGetter::PFlowRejecter::useChargedPFOs
bool useChargedPFOs
Definition: PseudoJetGetter.h:119
xAOD::FlowElement_v1
A detector object made of other lower level object(s)
Definition: FlowElement_v1.h:25