|
ATLAS Offline Software
|
#include <CombinedMassUncertaintyComponent.h>
|
| CombinedMassUncertaintyComponent (const ComponentHelper &component) |
|
| CombinedMassUncertaintyComponent (const CombinedMassUncertaintyComponent &toCopy) |
|
virtual CombinedMassUncertaintyComponent * | clone () const |
|
virtual | ~CombinedMassUncertaintyComponent () |
|
virtual StatusCode | setCaloTerm (UncertaintyGroup *caloComp) |
|
virtual StatusCode | setTATerm (UncertaintyGroup *TAComp) |
|
virtual StatusCode | setCaloWeights (const UncertaintyHistogram *caloWeights) |
|
virtual StatusCode | setTAWeights (const UncertaintyHistogram *TAWeights) |
|
virtual StatusCode | setCombWeightMassDefs (const CompMassDef::TypeEnum caloMassDef, const CompMassDef::TypeEnum TAMassDef) |
|
virtual StatusCode | setCombWeightParam (const CompParametrization::TypeEnum param) |
|
virtual StatusCode | initialize (TFile *histFile) |
|
virtual CombMassComp::TypeEnum | getCombMassType () const |
|
virtual bool | getValidityCalo (const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const |
|
virtual bool | getValidityTA (const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const |
|
virtual double | getUncertaintyCalo (const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const |
|
virtual double | getUncertaintyTA (const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const |
|
virtual bool | getValidUncertaintyCalo (double &unc, const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const |
|
virtual bool | getValidUncertaintyTA (double &unc, const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const |
|
virtual bool | isAlwaysZero () const |
|
virtual TString | getName () const |
|
virtual TString | getValidName () const |
|
virtual CompScaleVar::TypeEnum | getScaleVar () const |
|
virtual JetTopology::TypeEnum | getTopology () const |
|
virtual bool | getValidity (const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const |
|
virtual double | getUncertainty (const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const |
|
virtual bool | getValidUncertainty (double &unc, const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const |
|
void | setLevel (MSG::Level lvl) |
| Change the current logging level. More...
|
|
◆ CombinedMassUncertaintyComponent() [1/3]
jet::CombinedMassUncertaintyComponent::CombinedMassUncertaintyComponent |
( |
const ComponentHelper & |
component | ) |
|
◆ CombinedMassUncertaintyComponent() [2/3]
◆ ~CombinedMassUncertaintyComponent()
jet::CombinedMassUncertaintyComponent::~CombinedMassUncertaintyComponent |
( |
| ) |
|
|
virtual |
◆ CombinedMassUncertaintyComponent() [3/3]
jet::CombinedMassUncertaintyComponent::CombinedMassUncertaintyComponent |
( |
const std::string & |
name = "" | ) |
|
|
private |
◆ calculateCombinedMass()
StatusCode jet::CombinedMassUncertaintyComponent::calculateCombinedMass |
( |
const xAOD::Jet & |
jet, |
|
|
const double |
shiftFactorCalo, |
|
|
const double |
shiftFactorTA, |
|
|
double & |
combMass |
|
) |
| const |
|
private |
Definition at line 313 of file CombinedMassUncertaintyComponent.cxx.
325 if (factorCalo+factorTA == 0)
327 if (combMassScale.m(
jet) == 0)
332 return StatusCode::SUCCESS;
339 ATH_MSG_ERROR(
"Encountered division by zero when calculating weights: mCalo = " << caloMassScale.m(
jet) <<
", mTA = " << TAMassScale.m(
jet) <<
", mComb = " << combMassScale.m(
jet));
340 return StatusCode::FAILURE;
345 const double caloWeight = factorCalo/(factorCalo+factorTA);
346 const double TAWeight = factorTA/(factorCalo+factorTA);
351 if (caloMassScale.m(
jet) == 0)
352 combMass = TAMassScale.m(
jet)*shiftFactorTA;
353 else if (TAMassScale.m(
jet) == 0)
354 combMass = caloMassScale.m(
jet)*shiftFactorCalo;
356 combMass = (caloMassScale.m(
jet)*shiftFactorCalo*caloWeight) + (TAMassScale.m(
jet)*shiftFactorTA*TAWeight);
358 return StatusCode::SUCCESS;
◆ clone()
◆ getAbsMass()
|
protectedvirtualinherited |
◆ getCombMassType()
◆ getMassOverE()
|
protectedvirtualinherited |
◆ getMassOverPt()
|
protectedvirtualinherited |
◆ getName()
virtual TString jet::UncertaintyComponent::getName |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ getScaleVar()
◆ getSplitFactor()
double jet::UncertaintyComponent::getSplitFactor |
( |
const xAOD::Jet & |
jet | ) |
const |
|
protectedvirtualinherited |
Definition at line 196 of file UncertaintyComponent.cxx.
203 double splitFactor = 1;
213 const double minPt =
histo->GetXaxis()->GetBinLowEdge(1);
214 const double maxPt =
histo->GetXaxis()->GetBinLowEdge(
histo->GetNbinsX()+1);
217 const double slope = 1./(
log(maxPt)-
log(minPt));
218 const double intercept = -slope*
log(minPt);
220 splitFactor = slope*
log(valPt <= minPt ? minPt+1.e-3 : valPt >= maxPt ? maxPt-1.
e-3 : valPt)+intercept;
228 const double minEta = 0;
229 const double maxEta = 4.5;
232 const double slope = 1./(
maxEta - minEta);
233 const double intercept = -slope*minEta;
248 const double minPt =
histo->GetXaxis()->GetBinLowEdge(1);
249 const double maxPt =
histo->GetXaxis()->GetBinLowEdge(
histo->GetNbinsX()+1);
252 const double minEta = 0;
253 const double maxEta = 4.5;
256 const double slopePt = 1./(
log(maxPt)-
log(minPt));
257 const double slopeEta = 1./(
maxEta-minEta);
259 const double fixedPt = valPt <= minPt ? minPt+1.e-3 : valPt >= maxPt ? maxPt - 1.e-3 : valPt;
262 splitFactor = (slopePt*(
log(fixedPt)-
log(minPt)) + slopeEta*(fixedEta-minEta))/2.;
269 const double minPt =
histo->GetXaxis()->GetBinLowEdge(1);
270 const double maxPt =
histo->GetXaxis()->GetBinLowEdge(
histo->GetNbinsX()+1);
273 const double minEta = 0;
274 const double maxEta = 4.5;
277 const double slopePt = 1./(
log(maxPt)-
log(minPt));
278 const double slopeEta = 1./(
maxEta-minEta);
280 const double fixedPt = valPt <= minPt ? minPt+1.e-3 : valPt >= maxPt ? maxPt - 1.e-3 : valPt;
283 splitFactor = (slopePt*(
log(fixedPt)-
log(minPt)) + slopeEta*(
maxEta-fixedEta))/2.;
289 splitFactor = sqrt(1-splitFactor*splitFactor);
◆ getTopology()
◆ getUncertainty()
◆ getUncertaintyCalo()
◆ getUncertaintyImpl()
Implements jet::UncertaintyComponent.
Definition at line 361 of file CombinedMassUncertaintyComponent.cxx.
371 ATH_MSG_ERROR(
"Unable to retrieve the LargeRJetTruthLabel: " <<
m_truthLabelName <<
" from the jet. Please use JetTruthLabelingTool before calling this function.");
378 bool labelApplies =
false;
381 if (aLabel == jetTruthLabel)
397 ATH_MSG_ERROR(
"Combined mass is outside of the validity range (calo part)");
404 ATH_MSG_ERROR(
"Combined mass is outside of the validity range (TA part)");
414 double massDefault = 0;
416 if (massDefault == 0)
return 0;
422 const double massUncUp = fabs((massUp-massDefault)/massDefault);
423 const double massUncDown = fabs((massDown-massDefault)/massDefault);
425 return (massUncUp+massUncDown)/2.;
◆ getUncertaintyTA()
◆ getValidBool()
bool jet::UncertaintyComponent::getValidBool |
( |
const double |
validity | ) |
const |
|
protectedvirtualinherited |
Definition at line 301 of file UncertaintyComponent.cxx.
303 if (validity < 1.e-5 && validity > -1.
e-5)
return false;
304 if (validity < 1+1.e-5 && validity > 1-1.
e-5)
return true;
◆ getValidity()
◆ getValidityCalo()
◆ getValidityImpl()
◆ getValidityTA()
◆ getValidName()
virtual TString jet::UncertaintyComponent::getValidName |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ getValidUncertainty()
◆ getValidUncertaintyCalo()
◆ getValidUncertaintyTA()
◆ getWeightFactorCalo()
double jet::CombinedMassUncertaintyComponent::getWeightFactorCalo |
( |
const xAOD::Jet & |
jet, |
|
|
const double |
shiftFactor |
|
) |
| const |
|
privatevirtual |
◆ getWeightFactorTA()
double jet::CombinedMassUncertaintyComponent::getWeightFactorTA |
( |
const xAOD::Jet & |
jet, |
|
|
const double |
shiftFactor |
|
) |
| const |
|
privatevirtual |
◆ initialize()
StatusCode jet::CombinedMassUncertaintyComponent::initialize |
( |
TFile * |
histFile | ) |
|
|
virtual |
Reimplemented from jet::UncertaintyComponent.
Definition at line 203 of file CombinedMassUncertaintyComponent.cxx.
212 return StatusCode::FAILURE;
219 return StatusCode::FAILURE;
224 return StatusCode::FAILURE;
231 return StatusCode::FAILURE;
238 return StatusCode::FAILURE;
246 return StatusCode::FAILURE;
251 return StatusCode::FAILURE;
260 return StatusCode::FAILURE;
265 return StatusCode::FAILURE;
274 return StatusCode::FAILURE;
279 return StatusCode::FAILURE;
287 return StatusCode::FAILURE;
292 return StatusCode::FAILURE;
298 return StatusCode::SUCCESS;
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ isAlwaysZero()
bool jet::CombinedMassUncertaintyComponent::isAlwaysZero |
( |
| ) |
const |
|
virtual |
◆ msg() [1/2]
MsgStream & asg::AsgMessaging::msg |
( |
| ) |
const |
|
inherited |
The standard message stream.
- Returns
- A reference to the default message stream of this object.
Definition at line 49 of file AsgMessaging.cxx.
50 #ifndef XAOD_STANDALONE
52 #else // not XAOD_STANDALONE
54 #endif // not XAOD_STANDALONE
◆ msg() [2/2]
MsgStream & asg::AsgMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inherited |
The standard message stream.
- Parameters
-
lvl | The message level to set the stream to |
- Returns
- A reference to the default message stream, set to level "lvl"
Definition at line 57 of file AsgMessaging.cxx.
58 #ifndef XAOD_STANDALONE
60 #else // not XAOD_STANDALONE
63 #endif // not XAOD_STANDALONE
◆ msgLvl()
bool asg::AsgMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inherited |
Test the output level of the object.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicting if messages at given level will be printed
-
true
If messages at level "lvl" will be printed
Definition at line 41 of file AsgMessaging.cxx.
42 #ifndef XAOD_STANDALONE
43 return ::AthMessaging::msgLvl( lvl );
44 #else // not XAOD_STANDALONE
45 return m_msg.msgLevel( lvl );
46 #endif // not XAOD_STANDALONE
◆ readHistoFromParam()
◆ setCaloTerm()
StatusCode jet::CombinedMassUncertaintyComponent::setCaloTerm |
( |
UncertaintyGroup * |
caloComp | ) |
|
|
virtual |
◆ setCaloWeights()
◆ setCombWeightMassDefs()
Definition at line 154 of file CombinedMassUncertaintyComponent.cxx.
159 return StatusCode::FAILURE;
164 return StatusCode::FAILURE;
174 return StatusCode::FAILURE;
184 return StatusCode::FAILURE;
188 return StatusCode::SUCCESS;
◆ setCombWeightParam()
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ setTATerm()
StatusCode jet::CombinedMassUncertaintyComponent::setTATerm |
( |
UncertaintyGroup * |
TAComp | ) |
|
|
virtual |
◆ setTAWeights()
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_caloMassComp
◆ m_caloMassScale_weights
◆ m_caloMassWeight
◆ m_combMassType
◆ m_energyScale
const float jet::UncertaintyComponent::m_energyScale {} |
|
protectedinherited |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_interpolate
◆ m_isInit
bool jet::UncertaintyComponent::m_isInit {} |
|
protectedinherited |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_numExpectedHist
int jet::UncertaintyComponent::m_numExpectedHist {} |
|
protectedinherited |
◆ m_scaleVar
◆ m_setWeightMassDefs
bool jet::CombinedMassUncertaintyComponent::m_setWeightMassDefs |
|
private |
◆ m_splitNumber
const int jet::UncertaintyComponent::m_splitNumber {} |
|
protectedinherited |
◆ m_TAMassComp
◆ m_TAMassScale_weights
◆ m_TAMassWeight
◆ m_topology
◆ m_truthLabelName
std::string jet::CombinedMassUncertaintyComponent::m_truthLabelName |
|
private |
◆ m_truthLabels
◆ m_uncHist
◆ m_uncHistName
const TString jet::UncertaintyComponent::m_uncHistName |
|
protectedinherited |
◆ m_validHist
◆ m_validHistName
const TString jet::UncertaintyComponent::m_validHistName |
|
protectedinherited |
◆ m_weightParam
The documentation for this class was generated from the following files:
std::atomic< MSG::Level > m_lvl
Current logging level.
virtual bool getValidityImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const =0
CompParametrization::TypeEnum m_weightParam
const float m_energyScale
virtual double getSplitFactor(const xAOD::Jet &jet) const
const UncertaintyHistogram * m_TAMassWeight
StatusCode calculateCombinedMass(const xAOD::Jet &jet, const double shiftFactorCalo, const double shiftFactorTA, double &combMass) const
const TH1 * getHisto() const
const TString m_uncHistName
Helper class to provide constant type-safe access to aux data.
JetFourMomAccessor m_TAMassScale_weights
UncertaintyGroup * m_caloMassComp
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
double resolution[nGasTypes][nParametersResolution]
IMessageSvc * getMessageSvc(bool quiet=false)
virtual double getWeightFactorTA(const xAOD::Jet &jet, const double shiftFactor) const
#define JESUNC_ERROR_CODE
const TString m_validHistName
virtual bool getValidityTA(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
double readHistoFromParam(const xAOD::JetFourMom_t &jet4vec, const UncertaintyHistogram &histo, const CompParametrization::TypeEnum param, const double massShiftFactor) const
const UncertaintyHistogram * m_caloMassWeight
virtual double getUncertainty(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo, const CompScaleVar::TypeEnum scaleVar) const
#define JESUNC_SAFE_DELETE(T)
TString getJetScaleString(const TypeEnum type)
const CombMassComp::TypeEnum m_combMassType
virtual TString getName() const
virtual bool getValidityCalo(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
virtual double getWeightFactorCalo(const xAOD::Jet &jet, const double shiftFactor) const
std::vector< LargeRJetTruthLabel::TypeEnum > m_truthLabels
UncertaintyGroup * m_TAMassComp
virtual bool getValidUncertainty(double &unc, const xAOD::Jet &jet, const xAOD::EventInfo &eInfo, const CompScaleVar::TypeEnum scaleVar) const
virtual double getUncertaintyImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const =0
virtual bool isAlwaysZero() const
#define JESUNC_NO_DEFAULT_CONSTRUCTOR
virtual TString getValidName() const
std::string m_truthLabelName
const CompScaleVar::TypeEnum m_scaleVar
std::string m_nm
Message source name.
virtual double getUncertainty(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
TypeEnum intToEnum(const int type)
bool absEta(const xAOD::TauJet &tau, double &out)
UncertaintyComponent(const ComponentHelper &component, const size_t numHist=1)
virtual bool getValidity(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo, const CompScaleVar::TypeEnum scaleVar) const
JetFourMomAccessor m_caloMassScale_weights
UncertaintyHistogram * m_uncHist
TString enumToString(const TypeEnum type)
virtual StatusCode initialize(TFile *histFile)
virtual bool getValidity(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
CombinedMassUncertaintyComponent(const ComponentHelper &component)
const JetTopology::TypeEnum m_topology