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 78 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 80 of file EvtPlaneProducer.cc.

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

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

◆ ~GenPlane()

hi::GenPlane::~GenPlane ( )
inline

Definition at line 94 of file EvtPlaneProducer.cc.

94 { ; }

Member Function Documentation

◆ addParticle()

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

Definition at line 95 of file EvtPlaneProducer.cc.

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

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

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

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

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

Referenced by EvtPlaneProducer::produce().

119  {
120  ang = -10;
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  }
common ppss p3p6s2 common epss epspn46 common const1 w2
Definition: inclppp.h:1
T w() const
cv
Definition: cuy.py:363

◆ reset()

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

Definition at line 135 of file EvtPlaneProducer.cc.

References VarParsing::mult.

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  }

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.