ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
jet::InfoHelperPtMassEta Class Reference
Inheritance diagram for jet::InfoHelperPtMassEta:
Collaboration diagram for jet::InfoHelperPtMassEta:

Public Member Functions

 InfoHelperPtMassEta (const ValidityHistogram &validHist, const float energyScale, const CompMassDef::TypeEnum massDef)
 
virtual InfoHelperPtMassEtaclone () const
 
virtual bool isValid (const xAOD::Jet &jet) const
 

Protected Member Functions

double getAbsMass (const xAOD::Jet &jet) const
 
double getMassOverPt (const xAOD::Jet &jet) const
 
double getMassOverE (const xAOD::Jet &jet) const
 

Protected Attributes

const ValidityHistogramm_validHist
 
const float m_energyScale
 
const CompMassDef::TypeEnum m_massDef
 

Detailed Description

Definition at line 105 of file ValidityHistogram.cxx.

Constructor & Destructor Documentation

◆ InfoHelperPtMassEta()

jet::InfoHelperPtMassEta::InfoHelperPtMassEta ( const ValidityHistogram validHist,
const float  energyScale,
const CompMassDef::TypeEnum  massDef 
)
inline

Definition at line 108 of file ValidityHistogram.cxx.

109  : InfoHelper(validHist,energyScale,massDef) {}

Member Function Documentation

◆ clone()

virtual InfoHelperPtMassEta* jet::InfoHelperPtMassEta::clone ( ) const
inlinevirtual

Implements jet::InfoHelper.

Definition at line 110 of file ValidityHistogram.cxx.

110 { return new InfoHelperPtMassEta(*this); }

◆ getAbsMass()

double jet::InfoHelper::getAbsMass ( const xAOD::Jet jet) const
protectedinherited

Definition at line 197 of file ValidityHistogram.cxx.

198 {
199  // Check for the simple case (where we want the default four-vector itself)
201  return jet.m();
202 
203  // Not the simple case, check for the specified four-vector instead and return it if it is available
204  JetFourMomAccessor scale(CompMassDef::getJetScaleString(m_massDef).Data());
205  if (scale.isAvailable(jet))
206  return scale(jet).M();
207 
208  // Fall-back on the TA moment as a float if applicable (legacy support)
209  SG::AuxElement::ConstAccessor<float> scaleTAMoment("JetTrackAssistedMassCalibrated");
210  if (m_massDef == CompMassDef::TAMass && scaleTAMoment.isAvailable(jet))
211  return scaleTAMoment(jet);
212 
213  // Fall-back on the calo mass as the 4-vec if applicable (legacy support)
215  return jet.m();
216 
217  // Specified scale is not available, error
218  return JESUNC_ERROR_CODE;
219 }

◆ getMassOverE()

double jet::InfoHelper::getMassOverE ( const xAOD::Jet jet) const
protectedinherited

Definition at line 246 of file ValidityHistogram.cxx.

247 {
248  // Check for the simple case (where we want the default four-vector itself)
250  return jet.m()/jet.e();
251 
252  // Not the simple case, check for the specified four-vector instead and return it if it is available
253  JetFourMomAccessor scale(CompMassDef::getJetScaleString(m_massDef).Data());
254  if (scale.isAvailable(jet))
255  return scale(jet).M()/scale(jet).E();
256 
257  // Fall-back on the TA moment as a float if applicable (legacy support)
258  SG::AuxElement::ConstAccessor<float> scaleTAMoment("JetTrackAssistedMassCalibrated");
259  if (m_massDef == CompMassDef::TAMass && scaleTAMoment.isAvailable(jet))
260  return scaleTAMoment(jet)/jet.e();
261 
262  // Fall-back on the calo mass as the 4-vec if applicable (legacy support)
264  return jet.m()/jet.e();
265 
266  // Specified scale is not available, error
267  return JESUNC_ERROR_CODE;
268 
269 }

◆ getMassOverPt()

double jet::InfoHelper::getMassOverPt ( const xAOD::Jet jet) const
protectedinherited

Definition at line 221 of file ValidityHistogram.cxx.

222 {
223  // Check for the simple case (where we want the default four-vector itself)
225  return jet.m()/jet.pt();
226 
227  // Not the simple case, check for the specified four-vector instead and return it if it is available
228  JetFourMomAccessor scale(CompMassDef::getJetScaleString(m_massDef).Data());
229  if (scale.isAvailable(jet))
230  return scale(jet).M()/scale(jet).Pt();
231 
232  // Fall-back on the TA moment as a float if applicable (legacy support)
233  SG::AuxElement::ConstAccessor<float> scaleTAMoment("JetTrackAssistedMassCalibrated");
234  if (m_massDef == CompMassDef::TAMass && scaleTAMoment.isAvailable(jet))
235  return scaleTAMoment(jet)/jet.pt();
236 
237  // Fall-back on the calo mass as the 4-vec if applicable (legacy support)
239  return jet.m()/jet.pt();
240 
241  // Specified scale is not available, error
242  return JESUNC_ERROR_CODE;
243 
244 }

◆ isValid()

virtual bool jet::InfoHelperPtMassEta::isValid ( const xAOD::Jet jet) const
inlinevirtual

Implements jet::InfoHelper.

Definition at line 112 of file ValidityHistogram.cxx.

113  {
115  }

Member Data Documentation

◆ m_energyScale

const float jet::InfoHelper::m_energyScale
protectedinherited

Definition at line 32 of file ValidityHistogram.cxx.

◆ m_massDef

const CompMassDef::TypeEnum jet::InfoHelper::m_massDef
protectedinherited

Definition at line 33 of file ValidityHistogram.cxx.

◆ m_validHist

const ValidityHistogram& jet::InfoHelper::m_validHist
protectedinherited

Definition at line 31 of file ValidityHistogram.cxx.


The documentation for this class was generated from the following file:
jet::CompMassDef::FourVecMass
@ FourVecMass
Definition: UncertaintyEnum.h:73
Data
@ Data
Definition: BaseObject.h:11
jet::InfoHelper::m_energyScale
const float m_energyScale
Definition: ValidityHistogram.cxx:32
jet::CompMassDef::CaloMass
@ CaloMass
Definition: UncertaintyEnum.h:74
ConvertOldUJHistosToNewHistos.validHist
validHist
Definition: ConvertOldUJHistosToNewHistos.py:110
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
jet::InfoHelper::m_validHist
const ValidityHistogram & m_validHist
Definition: ValidityHistogram.cxx:31
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
jet::InfoHelper::m_massDef
const CompMassDef::TypeEnum m_massDef
Definition: ValidityHistogram.cxx:33
jet::UncertaintyHistogram::getValue
double getValue(const double var1) const
Definition: UncertaintyHistogram.cxx:141
JESUNC_ERROR_CODE
#define JESUNC_ERROR_CODE
Definition: Reconstruction/Jet/JetUncertainties/JetUncertainties/Helpers.h:23
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
jet::CompMassDef::getJetScaleString
TString getJetScaleString(const TypeEnum type)
Definition: UncertaintyEnum.cxx:225
jet::CompMassDef::TAMass
@ TAMass
Definition: UncertaintyEnum.h:75
jet::InfoHelper::InfoHelper
InfoHelper(const ValidityHistogram &validHist, const float energyScale, const CompMassDef::TypeEnum massDef)
Definition: ValidityHistogram.cxx:23
jet::InfoHelperPtMassEta::InfoHelperPtMassEta
InfoHelperPtMassEta(const ValidityHistogram &validHist, const float energyScale, const CompMassDef::TypeEnum massDef)
Definition: ValidityHistogram.cxx:108
jet::CompMassDef::UNKNOWN
@ UNKNOWN
Definition: UncertaintyEnum.h:72
jet::InfoHelper::getMassOverPt
double getMassOverPt(const xAOD::Jet &jet) const
Definition: ValidityHistogram.cxx:221