CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Static Private Attributes
UEParameters Class Reference

#include <UEParameters.h>

Public Member Functions

void get_fourier (double &re, double &im, size_t n, size_t eta, int type=-1) const
 
double get_psin (int n, int eta, int type=-1) const
 
const std::vector< float > & get_raw (void) const
 
double get_sum_pt (int eta, int type=-1) const
 
double get_vn (int n, int eta, int type=-1) const
 
 UEParameters (const std::vector< float > *v, int nn, int neta)
 
 ~UEParameters ()
 

Private Attributes

int neta_
 
int nn_
 
boost::const_multi_array_ref< float, 4 > * parameters_
 
const std::vector< float > * v_
 

Static Private Attributes

static const size_t nreduced_particle_flow_id = 3
 

Detailed Description

Definition at line 6 of file UEParameters.h.

Constructor & Destructor Documentation

UEParameters::UEParameters ( const std::vector< float > *  v,
int  nn,
int  neta 
)

Definition at line 4 of file UEParameters.cc.

References groupFilesInBlocks::nn, nreduced_particle_flow_id, and parameters_.

4  : v_(v), nn_(nn), neta_(neta) {
6  new boost::const_multi_array_ref<float, 4>(&(*v)[0], boost::extents[neta][nreduced_particle_flow_id][nn][2]);
7 }
const std::vector< float > * v_
Definition: UEParameters.h:9
static const size_t nreduced_particle_flow_id
Definition: UEParameters.h:8
boost::const_multi_array_ref< float, 4 > * parameters_
Definition: UEParameters.h:12
UEParameters::~UEParameters ( )
inline

Definition at line 16 of file UEParameters.h.

References parameters_.

16 { delete parameters_; }
boost::const_multi_array_ref< float, 4 > * parameters_
Definition: UEParameters.h:12

Member Function Documentation

void UEParameters::get_fourier ( double &  re,
double &  im,
size_t  n,
size_t  eta,
int  type = -1 
) const

Definition at line 9 of file UEParameters.cc.

References PVValHelper::eta, mps_fire::i, dqmiodumpmetadata::n, and nreduced_particle_flow_id.

Referenced by get_psin(), get_raw(), get_sum_pt(), and get_vn().

9  {
10  re = 0;
11  im = 0;
12 
13  if (type < 0) {
14  for (size_t i = 0; i < nreduced_particle_flow_id; i++) {
15  re += (*parameters_)[eta][i][n][0];
16  im += (*parameters_)[eta][i][n][1];
17  }
18  } else {
19  re = (*parameters_)[eta][type][n][0];
20  im = (*parameters_)[eta][type][n][1];
21  }
22 }
type
Definition: HCALResponse.h:21
static const size_t nreduced_particle_flow_id
Definition: UEParameters.h:8
double UEParameters::get_psin ( int  n,
int  eta,
int  type = -1 
) const

Definition at line 49 of file UEParameters.cc.

References get_fourier(), and dqmiodumpmetadata::n.

Referenced by get_raw().

49  {
50  if (n <= 0) {
51  return 0;
52  }
53 
54  double re;
55  double im;
56 
57  get_fourier(re, im, n, eta, type);
58 
59  return atan2(im, re) / n;
60 }
type
Definition: HCALResponse.h:21
void get_fourier(double &re, double &im, size_t n, size_t eta, int type=-1) const
Definition: UEParameters.cc:9
const std::vector<float>& UEParameters::get_raw ( void  ) const
inline

Definition at line 17 of file UEParameters.h.

References PVValHelper::eta, get_fourier(), get_psin(), get_sum_pt(), get_vn(), dqmiodumpmetadata::n, and v_.

17 { return *v_; }
const std::vector< float > * v_
Definition: UEParameters.h:9
double UEParameters::get_sum_pt ( int  eta,
int  type = -1 
) const

Definition at line 24 of file UEParameters.cc.

References get_fourier().

Referenced by get_raw(), and get_vn().

24  {
25  double re;
26  double im;
27 
28  get_fourier(re, im, 0, eta, type);
29 
30  // There is no imaginary part
31  return re;
32 }
type
Definition: HCALResponse.h:21
void get_fourier(double &re, double &im, size_t n, size_t eta, int type=-1) const
Definition: UEParameters.cc:9
double UEParameters::get_vn ( int  n,
int  eta,
int  type = -1 
) const

Definition at line 34 of file UEParameters.cc.

References get_fourier(), get_sum_pt(), and mathSSE::sqrt().

Referenced by get_raw().

34  {
35  if (n < 0) {
36  return NAN;
37  } else if (n == 0) {
38  return 1;
39  }
40 
41  double re;
42  double im;
43 
44  get_fourier(re, im, n, eta, type);
45 
46  return sqrt(re * re + im * im) / get_sum_pt(eta, type);
47 }
type
Definition: HCALResponse.h:21
T sqrt(T t)
Definition: SSEVec.h:19
void get_fourier(double &re, double &im, size_t n, size_t eta, int type=-1) const
Definition: UEParameters.cc:9
double get_sum_pt(int eta, int type=-1) const
Definition: UEParameters.cc:24

Member Data Documentation

int UEParameters::neta_
private

Definition at line 11 of file UEParameters.h.

int UEParameters::nn_
private

Definition at line 10 of file UEParameters.h.

const size_t UEParameters::nreduced_particle_flow_id = 3
staticprivate

Definition at line 8 of file UEParameters.h.

Referenced by get_fourier(), and UEParameters().

boost::const_multi_array_ref<float, 4>* UEParameters::parameters_
private
const std::vector<float>* UEParameters::v_
private

Definition at line 9 of file UEParameters.h.

Referenced by get_raw().