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::UEParameters ( const std::vector< float > *  v,
int  nn,
int  neta 
)

Definition at line 4 of file UEParameters.cc.

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 }

References neta, groupFilesInBlocks::nn, nreduced_particle_flow_id, parameters_, and findQualityFiles::v.

◆ ~UEParameters()

UEParameters::~UEParameters ( )
inline

Definition at line 16 of file UEParameters.h.

16 { delete parameters_; }

References parameters_.

Member Function Documentation

◆ get_fourier()

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.

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 }

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

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

◆ get_psin()

double UEParameters::get_psin ( int  n,
int  eta,
int  type = -1 
) const

Definition at line 49 of file UEParameters.cc.

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 }

References PVValHelper::eta, get_fourier(), and dqmiodumpmetadata::n.

◆ get_raw()

const std::vector<float>& UEParameters::get_raw ( void  ) const
inline

Definition at line 17 of file UEParameters.h.

17 { return *v_; }

References v_.

◆ get_sum_pt()

double UEParameters::get_sum_pt ( int  eta,
int  type = -1 
) const

Definition at line 24 of file UEParameters.cc.

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 }

References PVValHelper::eta, and get_fourier().

Referenced by get_vn().

◆ get_vn()

double UEParameters::get_vn ( int  n,
int  eta,
int  type = -1 
) const

Definition at line 34 of file UEParameters.cc.

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 }

References PVValHelper::eta, get_fourier(), get_sum_pt(), dqmiodumpmetadata::n, and mathSSE::sqrt().

Member Data Documentation

◆ neta_

int UEParameters::neta_
private

Definition at line 11 of file UEParameters.h.

◆ nn_

int UEParameters::nn_
private

Definition at line 10 of file UEParameters.h.

◆ nreduced_particle_flow_id

const size_t UEParameters::nreduced_particle_flow_id = 3
staticprivate

Definition at line 8 of file UEParameters.h.

Referenced by get_fourier(), and UEParameters().

◆ parameters_

boost::const_multi_array_ref<float, 4>* UEParameters::parameters_
private

◆ v_

const std::vector<float>* UEParameters::v_
private

Definition at line 9 of file UEParameters.h.

Referenced by get_raw().

neta
const int neta
Definition: CMTRawAnalyzer.h:423
mps_fire.i
i
Definition: mps_fire.py:428
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
UEParameters::get_sum_pt
double get_sum_pt(int eta, int type=-1) const
Definition: UEParameters.cc:24
findQualityFiles.v
v
Definition: findQualityFiles.py:179
UEParameters::nreduced_particle_flow_id
static const size_t nreduced_particle_flow_id
Definition: UEParameters.h:8
PVValHelper::eta
Definition: PVValidationHelpers.h:70
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
UEParameters::get_fourier
void get_fourier(double &re, double &im, size_t n, size_t eta, int type=-1) const
Definition: UEParameters.cc:9
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
groupFilesInBlocks.nn
nn
Definition: groupFilesInBlocks.py:150
UEParameters::parameters_
boost::const_multi_array_ref< float, 4 > * parameters_
Definition: UEParameters.h:12
UEParameters::nn_
int nn_
Definition: UEParameters.h:10
UEParameters::v_
const std::vector< float > * v_
Definition: UEParameters.h:9
UEParameters::neta_
int neta_
Definition: UEParameters.h:11