00001 #ifndef JETUNCERTAINTIES_COMBINEDMASSUNCERTAINTYCOMPONENT_H
00002 #define JETUNCERTAINTIES_COMBINEDMASSUNCERTAINTYCOMPONENT_H
00003
00004 #include "JetUncertainties/UncertaintyComponent.h"
00005 #include "JetUncertainties/Helpers.h"
00006
00007 namespace jet
00008 {
00009
00010 class UncertaintyGroup;
00011
00012 class CombinedMassUncertaintyComponent : public UncertaintyComponent
00013 {
00014 public:
00015
00016 CombinedMassUncertaintyComponent(const ComponentHelper& component);
00017 CombinedMassUncertaintyComponent(const CombinedMassUncertaintyComponent& toCopy);
00018 virtual CombinedMassUncertaintyComponent* clone() const;
00019 virtual ~CombinedMassUncertaintyComponent();
00020 virtual StatusCode setCaloTerm(UncertaintyGroup* caloComp);
00021 virtual StatusCode setTATerm( UncertaintyGroup* TAComp);
00022 virtual StatusCode setCaloWeights(const UncertaintyHistogram* caloWeights);
00023 virtual StatusCode setTAWeights( const UncertaintyHistogram* TAWeights);
00024 virtual StatusCode setCombWeightMassDefs(const CompMassDef::TypeEnum caloMassDef, const CompMassDef::TypeEnum TAMassDef);
00025 virtual StatusCode initialize(TFile* histFile);
00026
00027
00028 virtual CombMassComp::TypeEnum getCombMassType() const { return m_combMassType; }
00029
00030
00031 virtual bool getValidityCalo(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
00032 virtual bool getValidityTA( const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
00033 virtual double getUncertaintyCalo(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
00034 virtual double getUncertaintyTA( const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
00035 virtual bool getValidUncertaintyCalo(double& unc, const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
00036 virtual bool getValidUncertaintyTA( double& unc, const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
00037
00038
00039 virtual bool isAlwaysZero() const;
00040
00041 protected:
00042
00043 virtual bool getValidityImpl(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
00044 virtual double getUncertaintyImpl(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
00045
00046 private:
00047
00048 CombinedMassUncertaintyComponent(const std::string& name = "");
00049
00050
00051 const CombMassComp::TypeEnum m_combMassType;
00052 bool m_setWeightMassDefs;
00053
00054
00055 UncertaintyGroup* m_caloMassComp;
00056 UncertaintyGroup* m_TAMassComp;
00057
00058 const UncertaintyHistogram* m_caloMassWeight;
00059 const UncertaintyHistogram* m_TAMassWeight;
00060
00061 JetFourMomAccessor m_caloMassScale_weights;
00062 JetFourMomAccessor m_TAMassScale_weights;
00063
00064
00065 virtual double getWeightFactorCalo(const xAOD::Jet& jet, const double shiftFactor) const;
00066 virtual double getWeightFactorTA( const xAOD::Jet& jet, const double shiftFactor) const;
00067 StatusCode calculateCombinedMass(const xAOD::Jet& jet, const double shiftFactorCalo, const double shiftFactorTA, double& combMass) const;
00068 };
00069
00070 }
00071
00072 #endif