CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
hi::GenPlane Class Reference

Public Member Functions

void addParticle (double w, double PtOrEt, double s, double c, double eta)
 
 GenPlane (string name, double etaminval1, double etamaxval1, double etaminval2, double etamaxval2, int orderval)
 
double getAngle (double &ang, double &sv, double &cv, double &svNoWgt, double &cvNoWgt, double &w, double &w2, double &PtOrEt, double &PtOrEt2, uint &epmult)
 
void reset ()
 
 ~GenPlane ()
 

Private Attributes

string epname
 
double etamax1
 
double etamax2
 
double etamin1
 
double etamin2
 
uint mult
 
double order
 
double sumcos
 
double sumcosNoWgt
 
double sumPtOrEt
 
double sumPtOrEt2
 
double sumsin
 
double sumsinNoWgt
 
double sumw
 
double sumw2
 

Detailed Description

Definition at line 76 of file EvtPlaneProducer.cc.

Constructor & Destructor Documentation

◆ GenPlane()

hi::GenPlane::GenPlane ( string  name,
double  etaminval1,
double  etamaxval1,
double  etaminval2,
double  etamaxval2,
int  orderval 
)
inline

Definition at line 78 of file EvtPlaneProducer.cc.

78  {
79  epname = name;
80  etamin1 = etaminval1;
81  etamax1 = etamaxval1;
82  etamin2 = etaminval2;
83  etamax2 = etamaxval2;
84  sumsin = 0;
85  sumcos = 0;
86  sumsinNoWgt = 0;
87  sumcosNoWgt = 0;
88 
89  mult = 0;
90  order = (double)orderval;
91  }

References VarParsing::mult, Skims_PA_cff::name, and eventshapeDQM_cfi::order.

◆ ~GenPlane()

hi::GenPlane::~GenPlane ( )
inline

Definition at line 92 of file EvtPlaneProducer.cc.

92 { ; }

Member Function Documentation

◆ addParticle()

void hi::GenPlane::addParticle ( double  w,
double  PtOrEt,
double  s,
double  c,
double  eta 
)
inline

Definition at line 93 of file EvtPlaneProducer.cc.

93  {
94  if ((eta >= etamin1 && eta < etamax1) || (etamin2 != etamax2 && eta >= etamin2 && eta < etamax2)) {
95  sumsin += w * s;
96  sumcos += w * c;
97  sumsinNoWgt += s;
98  sumcosNoWgt += c;
99 
100  sumw += fabs(w);
101  sumw2 += w * w;
102  sumPtOrEt += PtOrEt;
103  sumPtOrEt2 += PtOrEt * PtOrEt;
104  ++mult;
105  }
106  }

References HltBtagPostValidation_cff::c, PVValHelper::eta, VarParsing::mult, alignCSCRings::s, and w.

Referenced by EvtPlaneProducer::produce().

◆ getAngle()

double hi::GenPlane::getAngle ( double &  ang,
double &  sv,
double &  cv,
double &  svNoWgt,
double &  cvNoWgt,
double &  w,
double &  w2,
double &  PtOrEt,
double &  PtOrEt2,
uint &  epmult 
)
inline

Definition at line 108 of file EvtPlaneProducer.cc.

117  {
118  ang = -10;
119  sv = 0;
120  cv = 0;
121  sv = sumsin;
122  cv = sumcos;
123  svNoWgt = sumsinNoWgt;
124  cvNoWgt = sumcosNoWgt;
125  w = sumw;
126  w2 = sumw2;
127  PtOrEt = sumPtOrEt;
128  PtOrEt2 = sumPtOrEt2;
129  epmult = mult;
130  double q = sv * sv + cv * cv;
131  if (q > 0)
132  ang = atan2(sv, cv) / order;
133  return ang;
134  }

References cuy::cv, VarParsing::mult, eventshapeDQM_cfi::order, data-class-funcs::q, pfDeepBoostedJetPreprocessParams_cfi::sv, w, and w2.

Referenced by EvtPlaneProducer::produce().

◆ reset()

void hi::GenPlane::reset ( void  )
inline

Definition at line 135 of file EvtPlaneProducer.cc.

135  {
136  sumsin = 0;
137  sumcos = 0;
138  sumsinNoWgt = 0;
139  sumcosNoWgt = 0;
140  sumw = 0;
141  sumw2 = 0;
142  mult = 0;
143  sumPtOrEt = 0;
144  sumPtOrEt2 = 0;
145  }

References VarParsing::mult.

Member Data Documentation

◆ epname

string hi::GenPlane::epname
private

Definition at line 148 of file EvtPlaneProducer.cc.

◆ etamax1

double hi::GenPlane::etamax1
private

Definition at line 150 of file EvtPlaneProducer.cc.

◆ etamax2

double hi::GenPlane::etamax2
private

Definition at line 153 of file EvtPlaneProducer.cc.

◆ etamin1

double hi::GenPlane::etamin1
private

Definition at line 149 of file EvtPlaneProducer.cc.

◆ etamin2

double hi::GenPlane::etamin2
private

Definition at line 152 of file EvtPlaneProducer.cc.

◆ mult

uint hi::GenPlane::mult
private

Definition at line 158 of file EvtPlaneProducer.cc.

◆ order

double hi::GenPlane::order
private

Definition at line 163 of file EvtPlaneProducer.cc.

◆ sumcos

double hi::GenPlane::sumcos
private

Definition at line 155 of file EvtPlaneProducer.cc.

◆ sumcosNoWgt

double hi::GenPlane::sumcosNoWgt
private

Definition at line 157 of file EvtPlaneProducer.cc.

◆ sumPtOrEt

double hi::GenPlane::sumPtOrEt
private

Definition at line 161 of file EvtPlaneProducer.cc.

◆ sumPtOrEt2

double hi::GenPlane::sumPtOrEt2
private

Definition at line 162 of file EvtPlaneProducer.cc.

◆ sumsin

double hi::GenPlane::sumsin
private

Definition at line 154 of file EvtPlaneProducer.cc.

◆ sumsinNoWgt

double hi::GenPlane::sumsinNoWgt
private

Definition at line 156 of file EvtPlaneProducer.cc.

◆ sumw

double hi::GenPlane::sumw
private

Definition at line 159 of file EvtPlaneProducer.cc.

◆ sumw2

double hi::GenPlane::sumw2
private

Definition at line 160 of file EvtPlaneProducer.cc.

w2
common ppss p3p6s2 common epss epspn46 common const1 w2
Definition: inclppp.h:1
hi::GenPlane::sumw
double sumw
Definition: EvtPlaneProducer.cc:159
cuy.cv
cv
Definition: cuy.py:364
hi::GenPlane::sumw2
double sumw2
Definition: EvtPlaneProducer.cc:160
hi::GenPlane::epname
string epname
Definition: EvtPlaneProducer.cc:148
hi::GenPlane::sumsinNoWgt
double sumsinNoWgt
Definition: EvtPlaneProducer.cc:156
data-class-funcs.q
q
Definition: data-class-funcs.py:169
alignCSCRings.s
s
Definition: alignCSCRings.py:92
PVValHelper::eta
Definition: PVValidationHelpers.h:69
w
const double w
Definition: UKUtility.cc:23
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:226
hi::GenPlane::order
double order
Definition: EvtPlaneProducer.cc:163
hi::GenPlane::mult
uint mult
Definition: EvtPlaneProducer.cc:158
hi::GenPlane::sumsin
double sumsin
Definition: EvtPlaneProducer.cc:154
hi::GenPlane::sumcos
double sumcos
Definition: EvtPlaneProducer.cc:155
hi::GenPlane::etamax1
double etamax1
Definition: EvtPlaneProducer.cc:150
hi::GenPlane::etamax2
double etamax2
Definition: EvtPlaneProducer.cc:153
hi::GenPlane::sumPtOrEt
double sumPtOrEt
Definition: EvtPlaneProducer.cc:161
hi::GenPlane::etamin2
double etamin2
Definition: EvtPlaneProducer.cc:152
hi::GenPlane::sumcosNoWgt
double sumcosNoWgt
Definition: EvtPlaneProducer.cc:157
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
hi::GenPlane::etamin1
double etamin1
Definition: EvtPlaneProducer.cc:149
hi::GenPlane::sumPtOrEt2
double sumPtOrEt2
Definition: EvtPlaneProducer.cc:162