CMS 3D CMS Logo

Public Member Functions | Private Attributes

reco::DiscretizedEnergyFlow Class Reference

#include <DiscretizedEnergyFlow.h>

List of all members.

Public Member Functions

const double * data () const
 DiscretizedEnergyFlow (const double *data, const char *title, double etaMin, double etaMax, double phiBin0Edge, unsigned nEtaBins, unsigned nPhiBins)
 DiscretizedEnergyFlow ()
double etaMax () const
double etaMin () const
unsigned nEtaBins () const
unsigned nPhiBins () const
double phiBin0Edge () const
const char * title () const

Private Attributes

std::vector< double > data_
double etaMax_
double etaMin_
unsigned nEtaBins_
unsigned nPhiBins_
double phiBin0Edge_
std::string title_

Detailed Description

Definition at line 21 of file DiscretizedEnergyFlow.h.


Constructor & Destructor Documentation

reco::DiscretizedEnergyFlow::DiscretizedEnergyFlow ( ) [inline]

Definition at line 24 of file DiscretizedEnergyFlow.h.

        : title_(""), etaMin_(0.0), etaMax_(0.0), phiBin0Edge_(0.0),
          nEtaBins_(0), nPhiBins_(0) {}
DiscretizedEnergyFlow::DiscretizedEnergyFlow ( const double *  data,
const char *  title,
double  etaMin,
double  etaMax,
double  phiBin0Edge,
unsigned  nEtaBins,
unsigned  nPhiBins 
)

Definition at line 8 of file DiscretizedEnergyFlow.cc.

References filterCSVwithJSON::copy, data_, pileupCalc::nbins, and nPhiBins().

    : title_(title),
      etaMin_(etaMin),
      etaMax_(etaMax),
      phiBin0Edge_(phiBin0Edge),
      nEtaBins_(nEtaBins),
      nPhiBins_(nPhiBins)
{
    assert(data);
    assert(title);
    const unsigned nbins = nEtaBins*nPhiBins;
    data_.resize(nbins);
    std::copy(data, data+nbins, data_.begin());
}

Member Function Documentation

const double* reco::DiscretizedEnergyFlow::data ( ) const [inline]

Definition at line 33 of file DiscretizedEnergyFlow.h.

References data_.

    {
        if (data_.empty()) return 0;
        else return &data_[0];
    }
double reco::DiscretizedEnergyFlow::etaMax ( ) const [inline]

Definition at line 40 of file DiscretizedEnergyFlow.h.

References etaMax_.

{return etaMax_;}
double reco::DiscretizedEnergyFlow::etaMin ( ) const [inline]

Definition at line 39 of file DiscretizedEnergyFlow.h.

References etaMin_.

{return etaMin_;}
unsigned reco::DiscretizedEnergyFlow::nEtaBins ( ) const [inline]

Definition at line 42 of file DiscretizedEnergyFlow.h.

References nEtaBins_.

{return nEtaBins_;}
unsigned reco::DiscretizedEnergyFlow::nPhiBins ( ) const [inline]

Definition at line 43 of file DiscretizedEnergyFlow.h.

References nPhiBins_.

Referenced by DiscretizedEnergyFlow().

{return nPhiBins_;}
double reco::DiscretizedEnergyFlow::phiBin0Edge ( ) const [inline]

Definition at line 41 of file DiscretizedEnergyFlow.h.

References phiBin0Edge_.

{return phiBin0Edge_;}
const char* reco::DiscretizedEnergyFlow::title ( ) const [inline]

Definition at line 38 of file DiscretizedEnergyFlow.h.

References title_.

{return title_.c_str();}

Member Data Documentation

std::vector<double> reco::DiscretizedEnergyFlow::data_ [private]

Definition at line 46 of file DiscretizedEnergyFlow.h.

Referenced by data(), and DiscretizedEnergyFlow().

Definition at line 49 of file DiscretizedEnergyFlow.h.

Referenced by etaMax().

Definition at line 48 of file DiscretizedEnergyFlow.h.

Referenced by etaMin().

Definition at line 51 of file DiscretizedEnergyFlow.h.

Referenced by nEtaBins().

Definition at line 52 of file DiscretizedEnergyFlow.h.

Referenced by nPhiBins().

Definition at line 50 of file DiscretizedEnergyFlow.h.

Referenced by phiBin0Edge().

std::string reco::DiscretizedEnergyFlow::title_ [private]

Definition at line 47 of file DiscretizedEnergyFlow.h.

Referenced by title().