CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
reco::DiscretizedEnergyFlow Class Reference

#include <DiscretizedEnergyFlow.h>

Public Member Functions

const double * data () const
 
 DiscretizedEnergyFlow ()
 
 DiscretizedEnergyFlow (const double *data, const char *title, double etaMin, double etaMax, double phiBin0Edge, unsigned nEtaBins, unsigned nPhiBins)
 
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 20 of file DiscretizedEnergyFlow.h.

Constructor & Destructor Documentation

◆ DiscretizedEnergyFlow() [1/2]

reco::DiscretizedEnergyFlow::DiscretizedEnergyFlow ( )
inline

Definition at line 22 of file DiscretizedEnergyFlow.h.

23  : title_(""), etaMin_(0.0), etaMax_(0.0), phiBin0Edge_(0.0), nEtaBins_(0), nPhiBins_(0) {}

◆ DiscretizedEnergyFlow() [2/2]

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.

15  : title_(title),
16  etaMin_(etaMin),
17  etaMax_(etaMax),
21  assert(data);
22  assert(title);
23  const unsigned nbins = nEtaBins * nPhiBins;
24  data_.resize(nbins);
25  std::copy(data, data + nbins, data_.begin());
26  }

References cms::cuda::assert(), filterCSVwithJSON::copy, data(), data_, LaserClient_cfi::nbins, nEtaBins(), nPhiBins(), and title().

Member Function Documentation

◆ data()

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

Definition at line 33 of file DiscretizedEnergyFlow.h.

33  {
34  if (data_.empty())
35  return nullptr;
36  else
37  return &data_[0];
38  }

References data_.

Referenced by DiscretizedEnergyFlow().

◆ etaMax()

double reco::DiscretizedEnergyFlow::etaMax ( ) const
inline

Definition at line 41 of file DiscretizedEnergyFlow.h.

41 { return etaMax_; }

References etaMax_.

◆ etaMin()

double reco::DiscretizedEnergyFlow::etaMin ( ) const
inline

Definition at line 40 of file DiscretizedEnergyFlow.h.

40 { return etaMin_; }

References etaMin_.

◆ nEtaBins()

unsigned reco::DiscretizedEnergyFlow::nEtaBins ( ) const
inline

Definition at line 43 of file DiscretizedEnergyFlow.h.

43 { return nEtaBins_; }

References nEtaBins_.

Referenced by DiscretizedEnergyFlow().

◆ nPhiBins()

unsigned reco::DiscretizedEnergyFlow::nPhiBins ( ) const
inline

Definition at line 44 of file DiscretizedEnergyFlow.h.

44 { return nPhiBins_; }

References nPhiBins_.

Referenced by DiscretizedEnergyFlow().

◆ phiBin0Edge()

double reco::DiscretizedEnergyFlow::phiBin0Edge ( ) const
inline

Definition at line 42 of file DiscretizedEnergyFlow.h.

42 { return phiBin0Edge_; }

References phiBin0Edge_.

◆ title()

const char* reco::DiscretizedEnergyFlow::title ( ) const
inline

Definition at line 39 of file DiscretizedEnergyFlow.h.

39 { return title_.c_str(); }

References title_.

Referenced by DiscretizedEnergyFlow().

Member Data Documentation

◆ data_

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

Definition at line 47 of file DiscretizedEnergyFlow.h.

Referenced by data(), and DiscretizedEnergyFlow().

◆ etaMax_

double reco::DiscretizedEnergyFlow::etaMax_
private

Definition at line 50 of file DiscretizedEnergyFlow.h.

Referenced by etaMax().

◆ etaMin_

double reco::DiscretizedEnergyFlow::etaMin_
private

Definition at line 49 of file DiscretizedEnergyFlow.h.

Referenced by etaMin().

◆ nEtaBins_

unsigned reco::DiscretizedEnergyFlow::nEtaBins_
private

Definition at line 52 of file DiscretizedEnergyFlow.h.

Referenced by nEtaBins().

◆ nPhiBins_

unsigned reco::DiscretizedEnergyFlow::nPhiBins_
private

Definition at line 53 of file DiscretizedEnergyFlow.h.

Referenced by nPhiBins().

◆ phiBin0Edge_

double reco::DiscretizedEnergyFlow::phiBin0Edge_
private

Definition at line 51 of file DiscretizedEnergyFlow.h.

Referenced by phiBin0Edge().

◆ title_

std::string reco::DiscretizedEnergyFlow::title_
private

Definition at line 48 of file DiscretizedEnergyFlow.h.

Referenced by title().

reco::DiscretizedEnergyFlow::title_
std::string title_
Definition: DiscretizedEnergyFlow.h:48
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
reco::DiscretizedEnergyFlow::etaMin
double etaMin() const
Definition: DiscretizedEnergyFlow.h:40
cms::cuda::assert
assert(be >=bs)
reco::DiscretizedEnergyFlow::nPhiBins
unsigned nPhiBins() const
Definition: DiscretizedEnergyFlow.h:44
reco::DiscretizedEnergyFlow::phiBin0Edge_
double phiBin0Edge_
Definition: DiscretizedEnergyFlow.h:51
reco::DiscretizedEnergyFlow::data
const double * data() const
Definition: DiscretizedEnergyFlow.h:33
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
reco::DiscretizedEnergyFlow::nPhiBins_
unsigned nPhiBins_
Definition: DiscretizedEnergyFlow.h:53
reco::DiscretizedEnergyFlow::title
const char * title() const
Definition: DiscretizedEnergyFlow.h:39
reco::DiscretizedEnergyFlow::etaMin_
double etaMin_
Definition: DiscretizedEnergyFlow.h:49
reco::DiscretizedEnergyFlow::phiBin0Edge
double phiBin0Edge() const
Definition: DiscretizedEnergyFlow.h:42
reco::DiscretizedEnergyFlow::nEtaBins_
unsigned nEtaBins_
Definition: DiscretizedEnergyFlow.h:52
reco::DiscretizedEnergyFlow::etaMax
double etaMax() const
Definition: DiscretizedEnergyFlow.h:41
reco::DiscretizedEnergyFlow::etaMax_
double etaMax_
Definition: DiscretizedEnergyFlow.h:50
reco::DiscretizedEnergyFlow::data_
std::vector< double > data_
Definition: DiscretizedEnergyFlow.h:47
reco::DiscretizedEnergyFlow::nEtaBins
unsigned nEtaBins() const
Definition: DiscretizedEnergyFlow.h:43