CaloMET

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
#ifndef METReco_CaloMET_h
#define METReco_CaloMET_h

/** \class CaloMET
 *
 * \short MET made from CaloTowers
 *
 * CaloMET represents MET made from CaloTowers
 * Provide energy contributions from different subdetectors
 * in addition to generic MET parameters
 *
 * \author    R. Cavanaugh, UFL (inspiration taken from F. Ratnikov)
 *
 ************************************************************/

#include "DataFormats/METReco/interface/SpecificCaloMETData.h"
#include "DataFormats/METReco/interface/MET.h"
#include "DataFormats/METReco/interface/CorrMETData.h"

namespace reco {
  class CaloMET : public MET {
  public:
    /* Constructors*/
    CaloMET();
    CaloMET(const SpecificCaloMETData& calo_data_, double sumet_, const LorentzVector& fP4, const Point& fVertex)
        : MET(sumet_, fP4, fVertex), calo_data(calo_data_) {}
    CaloMET(const SpecificCaloMETData& calo_data_,
            double sumet_,
            const std::vector<CorrMETData>& corr_,
            const LorentzVector& fP4,
            const Point& fVertex)
        : MET(sumet_, corr_, fP4, fVertex), calo_data(calo_data_) {}
    /* Default destructor*/
    ~CaloMET() override {}

    /* Returns the maximum energy deposited in ECAL towers */
    double maxEtInEmTowers() const { return calo_data.MaxEtInEmTowers; };
    /* Returns the maximum energy deposited in HCAL towers */
    double maxEtInHadTowers() const { return calo_data.MaxEtInHadTowers; };
    /* Returns the event hadronic energy fraction          */
    double etFractionHadronic() const { return calo_data.EtFractionHadronic; };
    /* Returns the event electromagnetic energy fraction   */
    double emEtFraction() const { return calo_data.EtFractionEm; };
    /* Returns the event hadronic energy in HB             */
    double hadEtInHB() const { return calo_data.HadEtInHB; };
    /* Returns the event hadronic energy in HO             */
    double hadEtInHO() const { return calo_data.HadEtInHO; };
    /* Returns the event hadronic energy in HE             */
    double hadEtInHE() const { return calo_data.HadEtInHE; };
    /* Returns the event hadronic energy in HF             */
    double hadEtInHF() const { return calo_data.HadEtInHF; };
    /* Returns the event electromagnetic energy in EB      */
    double emEtInEB() const { return calo_data.EmEtInEB; };
    /* Returns the event electromagnetic energy in EE      */
    double emEtInEE() const { return calo_data.EmEtInEE; };
    /* Returns the event electromagnetic energy extracted from HF */
    double emEtInHF() const { return calo_data.EmEtInHF; };
    /* Returns the event MET Significance */
    double metSignificance() const { return this->significance(); };
    /* Returns the event SET in HF+ */
    double CaloSETInpHF() const { return calo_data.CaloSETInpHF; };
    /* Returns the event SET in HF- */
    double CaloSETInmHF() const { return calo_data.CaloSETInmHF; };
    /* Returns the event MET in HF+ */
    double CaloMETInpHF() const { return calo_data.CaloMETInpHF; };
    /* Returns the event MET in HF- */
    double CaloMETInmHF() const { return calo_data.CaloMETInmHF; };
    /* Returns the event MET-phi in HF+ */
    double CaloMETPhiInpHF() const { return calo_data.CaloMETPhiInpHF; };
    /* Returns the event MET-phi in HF- */
    double CaloMETPhiInmHF() const { return calo_data.CaloMETPhiInmHF; };

    //Set Met Significance
    void SetMetSignificance(double metsig) { calo_data.METSignificance = metsig; }

    // block accessors
    SpecificCaloMETData getSpecific() const { return calo_data; }

  private:
    bool overlap(const Candidate&) const override;
    // Data members
    //Variables specific to to the CaloMET class
    SpecificCaloMETData calo_data;
  };
}  // namespace reco
#endif