CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 nreduced_particle_flow_id, and parameters_.

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

Definition at line 17 of file UEParameters.h.

References parameters_.

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

Member Function Documentation

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

Definition at line 8 of file UEParameters.cc.

References eta, i, gen::n, and nreduced_particle_flow_id.

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

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

Definition at line 50 of file UEParameters.cc.

References get_fourier(), and gen::n.

50  {
51  if (n <= 0) {
52  return 0;
53  }
54 
55  double re;
56  double im;
57 
58  get_fourier(re, im, n, eta, type);
59 
60  return atan2(im, re) / n;
61 }
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:8
const std::vector<float>& UEParameters::get_raw ( void  ) const
inline

Definition at line 18 of file UEParameters.h.

References v_.

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

Definition at line 24 of file UEParameters.cc.

References get_fourier().

Referenced by JetTester_HeavyIons::analyze(), 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:8
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().

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

Member Data Documentation

int UEParameters::neta_
private

Definition at line 12 of file UEParameters.h.

int UEParameters::nn_
private

Definition at line 11 of file UEParameters.h.

const size_t UEParameters::nreduced_particle_flow_id = 3
staticprivate

Definition at line 9 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 10 of file UEParameters.h.

Referenced by get_raw().