src
DataFormats
HeavyIonEvent
interface
EvtPlane.h
Go to the documentation of this file.
1
2
//
3
// Levels:
4
//
5
// 0 Neither recentering nor flattening is done. The final weights are applied.
6
// 1 The sums over the sines and cosines are recentered.
7
// 2 Final results including both recentering and flattening. Default if the level is not specified.
8
// 3 Calculation where all weights are set to unity.
9
//
10
//
11
12
#ifndef DataFormats_EvtPlane_h
13
#define DataFormats_EvtPlane_h
14
15
#include <vector>
16
#include <string>
17
#include <cmath>
18
19
namespace
reco
{
20
class
EvtPlane
{
21
public
:
22
EvtPlane
(
int
epindx = 0,
23
int
level
= 2,
24
double
planeA = 0,
25
double
sumSin
= 0,
26
double
sumCos
= 0,
27
double
sumw
= 0,
28
double
sumw2
= 0,
29
double
pe = 0,
30
double
pe2 = 0,
31
uint
mult
= 0);
32
virtual
~EvtPlane
();
33
void
addLevel
(
int
level
,
double
ang,
double
sumsin,
double
sumcos);
34
int
indx
()
const
{
return
indx_
; }
35
float
angle
(
int
level
= 2)
const
{
return
(
level
>= 0 &&
level
< 4) ?
angle_
[
level
] :
angle_
[2]; }
36
float
sumSin
(
int
level
= 2)
const
{
return
(
level
>= 0 &&
level
< 4) ?
sumSin_
[
level
] :
sumSin_
[2]; }
37
float
sumCos
(
int
level
= 2)
const
{
return
(
level
>= 0 &&
level
< 4) ?
sumCos_
[
level
] :
sumCos_
[2]; }
38
float
sumw
()
const
{
return
sumw_
; }
39
float
sumw2
()
const
{
return
sumw2_
; }
40
float
sumPtOrEt
()
const
{
return
sumPtOrEt_
; }
41
float
sumPtOrEt2
()
const
{
return
sumPtOrEt2_
; }
42
float
mult
()
const
{
return
mult_
; }
43
float
qy
(
int
level
= 2)
const
{
return
sumSin
(
level
); }
44
float
qx
(
int
level
= 2)
const
{
return
sumCos
(
level
); }
45
float
q
(
int
level
= 2)
const
{
46
return
((
pow
(
qx
(
level
), 2) +
pow
(
qy
(
level
), 2)) > 0) ?
sqrt
(
pow
(
qx
(
level
), 2) +
pow
(
qy
(
level
), 2)) : 0.;
47
}
48
float
vn
(
int
level
= 2)
const
{
return
(
q
(
level
) > 0 && fabs(
sumw
()) > 0) ?
q
(
level
) / fabs(
sumw
()) : 0.; }
49
50
private
:
51
int
indx_
;
52
float
angle_
[4];
53
float
sumSin_
[4];
54
float
sumCos_
[4];
55
float
sumw_
;
56
float
sumw2_
;
57
float
sumPtOrEt_
;
58
float
sumPtOrEt2_
;
59
uint
mult_
;
60
};
61
62
typedef
std::vector<EvtPlane>
EvtPlaneCollection
;
63
}
// namespace reco
64
65
#endif
reco::EvtPlane::sumSin_
float sumSin_[4]
Definition:
EvtPlane.h:53
reco::EvtPlane::addLevel
void addLevel(int level, double ang, double sumsin, double sumcos)
Definition:
EvtPlane.cc:24
parallelization.uint
uint
Definition:
parallelization.py:124
reco::EvtPlane::~EvtPlane
virtual ~EvtPlane()
Definition:
EvtPlane.cc:30
reco::EvtPlane::sumCos
float sumCos(int level=2) const
Definition:
EvtPlane.h:37
reco::EvtPlane::sumw_
float sumw_
Definition:
EvtPlane.h:55
reco::EvtPlane::qx
float qx(int level=2) const
Definition:
EvtPlane.h:44
reco::EvtPlane::q
float q(int level=2) const
Definition:
EvtPlane.h:45
reco::EvtPlane::sumPtOrEt_
float sumPtOrEt_
Definition:
EvtPlane.h:57
reco::EvtPlane::indx
int indx() const
Definition:
EvtPlane.h:34
reco::EvtPlane::sumPtOrEt2
float sumPtOrEt2() const
Definition:
EvtPlane.h:41
reco::EvtPlane::angle_
float angle_[4]
Definition:
EvtPlane.h:52
reco::EvtPlane::indx_
int indx_
Definition:
EvtPlane.h:51
conifer::pow
constexpr int pow(int x)
Definition:
conifer.h:24
reco::EvtPlane::sumSin
float sumSin(int level=2) const
Definition:
EvtPlane.h:36
reco::EvtPlane::sumw2_
float sumw2_
Definition:
EvtPlane.h:56
reco::EvtPlane
Definition:
EvtPlane.h:20
reco::EvtPlane::mult_
uint mult_
Definition:
EvtPlane.h:59
reco::EvtPlane::sumCos_
float sumCos_[4]
Definition:
EvtPlane.h:54
reco::EvtPlane::sumPtOrEt2_
float sumPtOrEt2_
Definition:
EvtPlane.h:58
reco::EvtPlane::vn
float vn(int level=2) const
Definition:
EvtPlane.h:48
mathSSE::sqrt
T sqrt(T t)
Definition:
SSEVec.h:19
reco::EvtPlaneCollection
std::vector< EvtPlane > EvtPlaneCollection
Definition:
EvtPlane.h:62
personalPlayback.level
level
Definition:
personalPlayback.py:22
reco::EvtPlane::sumPtOrEt
float sumPtOrEt() const
Definition:
EvtPlane.h:40
reco::EvtPlane::sumw2
float sumw2() const
Definition:
EvtPlane.h:39
reco::EvtPlane::qy
float qy(int level=2) const
Definition:
EvtPlane.h:43
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:46
reco::EvtPlane::angle
float angle(int level=2) const
Definition:
EvtPlane.h:35
reco::EvtPlane::EvtPlane
EvtPlane(int epindx=0, int level=2, double planeA=0, double sumSin=0, double sumCos=0, double sumw=0, double sumw2=0, double pe=0, double pe2=0, uint mult=0)
Definition:
EvtPlane.cc:5
reco::EvtPlane::mult
float mult() const
Definition:
EvtPlane.h:42
reco::EvtPlane::sumw
float sumw() const
Definition:
EvtPlane.h:38
Generated for CMSSW Reference Manual by
1.8.14