Class MetHists

Inheritance Relationships

Base Type

Class Documentation

class MetHists : public HistogramManager

Public Functions

MetHists(std::string name, std::string detailStr)
virtual ~MetHists()
virtual StatusCode initialize()

Initialize and book all histograms.

Example implementation:

StatusCode JetHists::initialize() {
  m_jetPt          = book(m_name, "jetPt",  "jet p_{T} [GeV]", 120, 0, 3000.);
  return StatusCode::SUCCESS;
}

Note

This should call the overloaded functions HistogramManager::book() to create the histograms so that the user can call hists->record(wk()) to record all histograms to the EventLoop worker.

StatusCode execute(const xAOD::MissingETContainer *met, float eventWeight)
TH1F *book(std::string name, std::string title, std::string xlabel, int xbins, double xlow, double xhigh)

record a histogram and call various functions

Note

This is an overloaded function. It will build the right histogram given the correct number of input arguments.

Parameters
  • name – name of histogram, access it in ROOT file like h_jetPt->Draw()

  • title – usually pointless,put a description of the histogram in here

  • xlabel – label to put on the x-axis

  • xbins – number of xbins to use

  • xlow – lower bound on xbins

  • xhigh – upper bound on xbins

  • xbinsArr – variable xbins, test math \((x_1,y_1)\) and \((x_2,y_2)\)

  • ylabel – label to put on the y-axis

  • ylow – lower bound on ybins

  • yhigh – upper bound on ybins

  • ybinsArr – variable ybins

  • zlabel – label to put on the z-axix

  • zlow – lower bound on zbins

  • zhigh – upper bound on zbins

  • zbinsArr – variable zbins

TH2F *book(std::string name, std::string title, std::string xlabel, int xbins, double xlow, double xhigh, std::string xyabel, int ybins, double ylow, double yhigh)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

TH3F *book(std::string name, std::string title, std::string xlabel, int xbins, double xlow, double xhigh, std::string ylabel, int ybins, double ylow, double yhigh, std::string zlabel, int zbins, double zlow, double zhigh)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

TH1F *book(std::string name, std::string title, std::string xlabel, int xbins, const Double_t *xbinsArr)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

TH2F *book(std::string name, std::string title, std::string xlabel, int xbins, const Double_t *xbinsArr, std::string ylabel, int ybins, double ylow, double yhigh)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

TH2F *book(std::string name, std::string title, std::string xyabel, int xbins, double xlow, double xhigh, std::string ylabel, int ybins, const Double_t *ybinsArr)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

TH2F *book(std::string name, std::string title, std::string xyabel, int xbins, const Double_t *xbinsArr, std::string ylabel, int ybins, const Double_t *ybinsArr)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

TH3F *book(std::string name, std::string title, std::string xlabel, int xbins, const Double_t *xbinsArr, std::string ylabel, int ybins, const Double_t *ybinsArr, std::string zlabel, int zbins, const Double_t *zbinsArr)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

TProfile *book(std::string name, std::string title, std::string xlabel, int xbins, double xlow, double xhigh, std::string ylabel, double ylow, double yhigh, std::string option = "")

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

TProfile *book(std::string name, std::string title, int xbins, const Double_t *xbinsArr, double ylow, double yhigh)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

TProfile *book(std::string name, std::string title, int xbins, double xlow, double xhigh, double ylow, double yhigh)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

inline virtual StatusCode execute()

Execute by filling in the histograms.

Example implementation:

StatusCode JetHists::execute( const xAOD::JetContainer  jets, float eventWeight ){
  for(const auto& jet:  jets)
    m_jetPt->Fill( jet->pt()/1.e3, eventWeight );
  return StatusCode::SUCCESS;
}

Public Members

bool m_debug

Protected Attributes

HelperClasses::METInfoSwitch *m_infoSwitch