00001 #ifndef JETUNCERTAINTIES_PILEUPUNCERTAINTYCOMPONENT_H
00002 #define JETUNCERTAINTIES_PILEUPUNCERTAINTYCOMPONENT_H
00003
00004 #include "JetUncertainties/UncertaintyComponent.h"
00005
00006 namespace jet
00007 {
00008
00009 class PileupUncertaintyComponent : public UncertaintyComponent
00010 {
00011 public:
00012
00013 PileupUncertaintyComponent( const ComponentHelper& component,
00014 const float refNPV,
00015 const float refMu
00016 );
00017 PileupUncertaintyComponent( const ComponentHelper& component,
00018 const UncertaintyHistogram* refNPV,
00019 const UncertaintyHistogram* refMu
00020 );
00021 PileupUncertaintyComponent( const ComponentHelper& component,
00022 const UncertaintyHistogram* refNPV,
00023 const float refMu
00024 );
00025 PileupUncertaintyComponent( const ComponentHelper& component,
00026 const float refNPV,
00027 const UncertaintyHistogram* refMu
00028 );
00029 PileupUncertaintyComponent(const PileupUncertaintyComponent& toCopy);
00030 virtual PileupUncertaintyComponent* clone() const;
00031 virtual ~PileupUncertaintyComponent();
00032 virtual StatusCode initialize(TFile* histFile);
00033
00034
00035 virtual PileupComp::TypeEnum getPileupType() const { return m_pileupType; }
00036 virtual float getNPVRef() const { return m_refNPV; }
00037 virtual float getMuRef() const { return m_refMu; }
00038
00039 protected:
00040
00041
00042 virtual bool getValidityImpl(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
00043 virtual double getUncertaintyImpl(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo) const;
00044
00045 private:
00046
00047 PileupUncertaintyComponent(const std::string& name = "");
00048
00049 enum PileupRefType { PileupRef_UNKNOWN, PileupRef_NONE, PileupRef_NPV, PileupRef_MU };
00050
00051
00052 const PileupComp::TypeEnum m_pileupType;
00053 const float m_refNPV;
00054 const float m_refMu;
00055 const UncertaintyHistogram* m_refNPVHist;
00056 const UncertaintyHistogram* m_refMuHist;
00057 const bool m_absEta;
00058 const TString m_secondUncName;
00059
00060 UncertaintyHistogram* m_secondUncHist;
00061 PileupRefType m_refType;
00062 PileupRefType m_secondRefType;
00063
00064
00065 double getPileupWeight(const xAOD::Jet& jet, const xAOD::EventInfo& eInfo, const PileupRefType refType) const;
00066 };
00067
00068 }
00069
00070 #endif