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 79 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 81 of file EvtPlaneProducer.cc.

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

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

◆ ~GenPlane()

hi::GenPlane::~GenPlane ( )
inline

Definition at line 95 of file EvtPlaneProducer.cc.

95 { ; }

Member Function Documentation

◆ addParticle()

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

Definition at line 96 of file EvtPlaneProducer.cc.

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

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

Referenced by EvtPlaneProducer::fillCastor(), EvtPlaneProducer::fillHF(), and EvtPlaneProducer::fillTracker().

◆ 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 111 of file EvtPlaneProducer.cc.

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

References cuy::cv, VarParsing::mult, eventshapeDQM_cfi::order, submitPVResolutionJobs::q, pfDeepBoostedJetPreprocessParams_cfi::sv, w, and w2.

Referenced by EvtPlaneProducer::produce().

◆ reset()

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

Definition at line 136 of file EvtPlaneProducer.cc.

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

References VarParsing::mult.

Member Data Documentation

◆ epname

string hi::GenPlane::epname
private

Definition at line 149 of file EvtPlaneProducer.cc.

◆ etamax1

double hi::GenPlane::etamax1
private

Definition at line 151 of file EvtPlaneProducer.cc.

◆ etamax2

double hi::GenPlane::etamax2
private

Definition at line 154 of file EvtPlaneProducer.cc.

◆ etamin1

double hi::GenPlane::etamin1
private

Definition at line 150 of file EvtPlaneProducer.cc.

◆ etamin2

double hi::GenPlane::etamin2
private

Definition at line 153 of file EvtPlaneProducer.cc.

◆ mult

uint hi::GenPlane::mult
private

Definition at line 159 of file EvtPlaneProducer.cc.

◆ order

double hi::GenPlane::order
private

Definition at line 164 of file EvtPlaneProducer.cc.

◆ sumcos

double hi::GenPlane::sumcos
private

Definition at line 156 of file EvtPlaneProducer.cc.

◆ sumcosNoWgt

double hi::GenPlane::sumcosNoWgt
private

Definition at line 158 of file EvtPlaneProducer.cc.

◆ sumPtOrEt

double hi::GenPlane::sumPtOrEt
private

Definition at line 162 of file EvtPlaneProducer.cc.

◆ sumPtOrEt2

double hi::GenPlane::sumPtOrEt2
private

Definition at line 163 of file EvtPlaneProducer.cc.

◆ sumsin

double hi::GenPlane::sumsin
private

Definition at line 155 of file EvtPlaneProducer.cc.

◆ sumsinNoWgt

double hi::GenPlane::sumsinNoWgt
private

Definition at line 157 of file EvtPlaneProducer.cc.

◆ sumw

double hi::GenPlane::sumw
private

Definition at line 160 of file EvtPlaneProducer.cc.

◆ sumw2

double hi::GenPlane::sumw2
private

Definition at line 161 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:160
cuy.cv
cv
Definition: cuy.py:363
hi::GenPlane::sumw2
double sumw2
Definition: EvtPlaneProducer.cc:161
hi::GenPlane::epname
string epname
Definition: EvtPlaneProducer.cc:149
hi::GenPlane::sumsinNoWgt
double sumsinNoWgt
Definition: EvtPlaneProducer.cc:157
alignCSCRings.s
s
Definition: alignCSCRings.py:92
PVValHelper::eta
Definition: PVValidationHelpers.h:70
w
const double w
Definition: UKUtility.cc:23
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:352
hi::GenPlane::order
double order
Definition: EvtPlaneProducer.cc:164
hi::GenPlane::mult
uint mult
Definition: EvtPlaneProducer.cc:159
hi::GenPlane::sumsin
double sumsin
Definition: EvtPlaneProducer.cc:155
hi::GenPlane::sumcos
double sumcos
Definition: EvtPlaneProducer.cc:156
hi::GenPlane::etamax1
double etamax1
Definition: EvtPlaneProducer.cc:151
hi::GenPlane::etamax2
double etamax2
Definition: EvtPlaneProducer.cc:154
hi::GenPlane::sumPtOrEt
double sumPtOrEt
Definition: EvtPlaneProducer.cc:162
hi::GenPlane::etamin2
double etamin2
Definition: EvtPlaneProducer.cc:153
hi::GenPlane::sumcosNoWgt
double sumcosNoWgt
Definition: EvtPlaneProducer.cc:158
submitPVResolutionJobs.q
q
Definition: submitPVResolutionJobs.py:84
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
hi::GenPlane::etamin1
double etamin1
Definition: EvtPlaneProducer.cc:150
hi::GenPlane::sumPtOrEt2
double sumPtOrEt2
Definition: EvtPlaneProducer.cc:163