ATLAS Offline Software
CombinedMassUncertaintyComponent.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef JETUNCERTAINTIES_COMBINEDMASSUNCERTAINTYCOMPONENT_H
6 #define JETUNCERTAINTIES_COMBINEDMASSUNCERTAINTYCOMPONENT_H
7 
11 
12 namespace jet
13 {
14 
15 class UncertaintyGroup;
16 
18 {
19  public:
20  // Constructor/destructor
23  virtual CombinedMassUncertaintyComponent* clone() const;
25  virtual StatusCode setCaloTerm(UncertaintyGroup* caloComp);
26  virtual StatusCode setTATerm( UncertaintyGroup* TAComp);
27  virtual StatusCode setCaloWeights(const UncertaintyHistogram* caloWeights);
28  virtual StatusCode setTAWeights( const UncertaintyHistogram* TAWeights);
29  virtual StatusCode setCombWeightMassDefs(const CompMassDef::TypeEnum caloMassDef, const CompMassDef::TypeEnum TAMassDef);
31  virtual StatusCode initialize(TFile* histFile);
32 
33  // Extra information retrieval methods
35 
36  // Methods for calo-only and TA-only uncertainty and weight retrieval
37  virtual bool getValidityCalo(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
38  virtual bool getValidityTA( const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
39  virtual double getUncertaintyCalo(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
40  virtual double getUncertaintyTA( const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
41  virtual bool getValidUncertaintyCalo(double& unc, const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
42  virtual bool getValidUncertaintyTA( double& unc, const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
43 
44  // Method overrides
45  virtual bool isAlwaysZero() const;
46 
47  protected:
48  // Uncertainty/validity retrieval helper methods
49  virtual bool getValidityImpl(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
50  virtual double getUncertaintyImpl(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
51 
52  private:
53  // Default constructor is forbidden
54  CombinedMassUncertaintyComponent(const std::string& name = "");
55 
56  // Additional private members
59 
60  // The two possible sub-components/groups
63  // The two possible weight histograms
66  // The two possible scale helpers
69  // The weight parametrization
71 
72  // In rare cases, this may only be applied for a given truth label
73  std::string m_truthLabelName;
74  std::vector<LargeRJetTruthLabel::TypeEnum> m_truthLabels;
75 
76  // Helper functions
77  double readHistoFromParam(const xAOD::JetFourMom_t& jet4vec, const UncertaintyHistogram& histo, const CompParametrization::TypeEnum param, const double massShiftFactor) const;
78  virtual double getWeightFactorCalo(const xAOD::Jet& jet, const double shiftFactor) const;
79  virtual double getWeightFactorTA( const xAOD::Jet& jet, const double shiftFactor) const;
80  StatusCode calculateCombinedMass(const xAOD::Jet& jet, const double shiftFactorCalo, const double shiftFactorTA, double& combMass) const;
81 };
82 
83 } // end jet namespace
84 
85 #endif
jet::CompMassDef::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:71
jet::CombinedMassUncertaintyComponent::setCombWeightParam
virtual StatusCode setCombWeightParam(const CompParametrization::TypeEnum param)
Definition: CombinedMassUncertaintyComponent.cxx:191
jet::CombinedMassUncertaintyComponent::initialize
virtual StatusCode initialize(TFile *histFile)
Definition: CombinedMassUncertaintyComponent.cxx:203
jet::CombinedMassUncertaintyComponent::m_weightParam
CompParametrization::TypeEnum m_weightParam
Definition: CombinedMassUncertaintyComponent.h:70
jet::CombinedMassUncertaintyComponent::~CombinedMassUncertaintyComponent
virtual ~CombinedMassUncertaintyComponent()
Definition: CombinedMassUncertaintyComponent.cxx:80
jet::CombinedMassUncertaintyComponent::m_TAMassWeight
const UncertaintyHistogram * m_TAMassWeight
Definition: CombinedMassUncertaintyComponent.h:65
jet::CombinedMassUncertaintyComponent::calculateCombinedMass
StatusCode calculateCombinedMass(const xAOD::Jet &jet, const double shiftFactorCalo, const double shiftFactorTA, double &combMass) const
Definition: CombinedMassUncertaintyComponent.cxx:313
jet::CombinedMassUncertaintyComponent::setCombWeightMassDefs
virtual StatusCode setCombWeightMassDefs(const CompMassDef::TypeEnum caloMassDef, const CompMassDef::TypeEnum TAMassDef)
Definition: CombinedMassUncertaintyComponent.cxx:154
LargeRJetLabelEnum.h
jet::ComponentHelper
Definition: ConfigHelper.h:24
jet::CombinedMassUncertaintyComponent::getUncertaintyCalo
virtual double getUncertaintyCalo(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: CombinedMassUncertaintyComponent.cxx:440
jet::CombinedMassUncertaintyComponent::m_TAMassScale_weights
JetFourMomAccessor m_TAMassScale_weights
Definition: CombinedMassUncertaintyComponent.h:68
jet::CombinedMassUncertaintyComponent::m_caloMassComp
UncertaintyGroup * m_caloMassComp
Definition: CombinedMassUncertaintyComponent.h:61
jet::CombinedMassUncertaintyComponent::getUncertaintyTA
virtual double getUncertaintyTA(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: CombinedMassUncertaintyComponent.cxx:445
jet::CombinedMassUncertaintyComponent::setCaloWeights
virtual StatusCode setCaloWeights(const UncertaintyHistogram *caloWeights)
Definition: CombinedMassUncertaintyComponent.cxx:120
Helpers.h
jet::UncertaintyComponent
Definition: UncertaintyComponent.h:25
jet::CombinedMassUncertaintyComponent::getWeightFactorTA
virtual double getWeightFactorTA(const xAOD::Jet &jet, const double shiftFactor) const
Definition: CombinedMassUncertaintyComponent.cxx:515
jet::CombinedMassUncertaintyComponent::getValidityTA
virtual bool getValidityTA(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: CombinedMassUncertaintyComponent.cxx:435
jet::CombinedMassUncertaintyComponent::readHistoFromParam
double readHistoFromParam(const xAOD::JetFourMom_t &jet4vec, const UncertaintyHistogram &histo, const CompParametrization::TypeEnum param, const double massShiftFactor) const
Definition: CombinedMassUncertaintyComponent.cxx:460
jet::CombinedMassUncertaintyComponent::m_caloMassWeight
const UncertaintyHistogram * m_caloMassWeight
Definition: CombinedMassUncertaintyComponent.h:64
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
jet::CombinedMassUncertaintyComponent::m_setWeightMassDefs
bool m_setWeightMassDefs
Definition: CombinedMassUncertaintyComponent.h:58
jet::CombinedMassUncertaintyComponent::m_combMassType
const CombMassComp::TypeEnum m_combMassType
Definition: CombinedMassUncertaintyComponent.h:57
jet::CombinedMassUncertaintyComponent::setTATerm
virtual StatusCode setTATerm(UncertaintyGroup *TAComp)
Definition: CombinedMassUncertaintyComponent.cxx:103
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
jet::CombinedMassUncertaintyComponent::getValidityCalo
virtual bool getValidityCalo(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: CombinedMassUncertaintyComponent.cxx:430
jet::CombinedMassUncertaintyComponent::setTAWeights
virtual StatusCode setTAWeights(const UncertaintyHistogram *TAWeights)
Definition: CombinedMassUncertaintyComponent.cxx:137
jet::CombinedMassUncertaintyComponent::getWeightFactorCalo
virtual double getWeightFactorCalo(const xAOD::Jet &jet, const double shiftFactor) const
Definition: CombinedMassUncertaintyComponent.cxx:508
jet::CombinedMassUncertaintyComponent::getValidUncertaintyTA
virtual bool getValidUncertaintyTA(double &unc, const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: CombinedMassUncertaintyComponent.cxx:455
jet::JetFourMomAccessor
JetFourMomAccessor is an extension of JetAttributeAccessor::AccessorWrapper<xAOD::JetFourMom_t> Acces...
Definition: JetCalibTools_PlotJESFactors.cxx:32
jet::CombinedMassUncertaintyComponent::getCombMassType
virtual CombMassComp::TypeEnum getCombMassType() const
Definition: CombinedMassUncertaintyComponent.h:34
jet::CombinedMassUncertaintyComponent::m_truthLabels
std::vector< LargeRJetTruthLabel::TypeEnum > m_truthLabels
Definition: CombinedMassUncertaintyComponent.h:74
jet::CombinedMassUncertaintyComponent::m_TAMassComp
UncertaintyGroup * m_TAMassComp
Definition: CombinedMassUncertaintyComponent.h:62
xAOD::JetFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition: JetTypes.h:17
jet::CombMassComp::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:195
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
jet::CompParametrization::TypeEnum
TypeEnum
Definition: UncertaintyEnum.h:45
jet::UncertaintyGroup
Definition: UncertaintyGroup.h:28
jet::CombinedMassUncertaintyComponent::setCaloTerm
virtual StatusCode setCaloTerm(UncertaintyGroup *caloComp)
Definition: CombinedMassUncertaintyComponent.cxx:86
jet::CombinedMassUncertaintyComponent::getValidUncertaintyCalo
virtual bool getValidUncertaintyCalo(double &unc, const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: CombinedMassUncertaintyComponent.cxx:450
jet::UncertaintyHistogram
Definition: UncertaintyHistogram.h:25
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
jet::CombinedMassUncertaintyComponent::getValidityImpl
virtual bool getValidityImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: CombinedMassUncertaintyComponent.cxx:308
jet::CombinedMassUncertaintyComponent::clone
virtual CombinedMassUncertaintyComponent * clone() const
Definition: CombinedMassUncertaintyComponent.cxx:75
jet::CombinedMassUncertaintyComponent::isAlwaysZero
virtual bool isAlwaysZero() const
Definition: CombinedMassUncertaintyComponent.cxx:530
jet::CombinedMassUncertaintyComponent::m_truthLabelName
std::string m_truthLabelName
Definition: CombinedMassUncertaintyComponent.h:73
jet::CombinedMassUncertaintyComponent::m_caloMassScale_weights
JetFourMomAccessor m_caloMassScale_weights
Definition: CombinedMassUncertaintyComponent.h:67
UncertaintyComponent.h
jet::CombinedMassUncertaintyComponent
Definition: CombinedMassUncertaintyComponent.h:18
plotBeamSpotCompare.histo
histo
Definition: plotBeamSpotCompare.py:415
jet::CombinedMassUncertaintyComponent::getUncertaintyImpl
virtual double getUncertaintyImpl(const xAOD::Jet &jet, const xAOD::EventInfo &eInfo) const
Definition: CombinedMassUncertaintyComponent.cxx:361
jet::CombinedMassUncertaintyComponent::CombinedMassUncertaintyComponent
CombinedMassUncertaintyComponent(const ComponentHelper &component)
Definition: CombinedMassUncertaintyComponent.cxx:37