CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 77 of file EvtPlaneProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 79 of file EvtPlaneProducer.cc.

References VarParsing::mult, and mergeVDriftHistosByStation::name.

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

Definition at line 93 of file EvtPlaneProducer.cc.

93 {;}

Member Function Documentation

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

Definition at line 94 of file EvtPlaneProducer.cc.

References EnergyCorrector::c, VarParsing::mult, alignCSCRings::s, and w.

Referenced by EvtPlaneProducer::produce().

94  {
95  if((eta>=etamin1 && eta<etamax1) ||
96  (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  }
const double w
Definition: UKUtility.cc:23
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, and lumiQueryAPI::q.

Referenced by EvtPlaneProducer::produce().

110  {
111  ang = -10;
112  sv = 0;
113  cv = 0;
114  sv = sumsin;
115  cv = sumcos;
116  svNoWgt = sumsinNoWgt;
117  cvNoWgt = sumcosNoWgt;
118  w = sumw;
119  w2 = sumw2;
120  PtOrEt = sumPtOrEt;
121  PtOrEt2 = sumPtOrEt2;
122  epmult = mult;
123  double q = sv*sv+cv*cv;
124  if(q>0) ang = atan2(sv,cv)/order;
125  return ang;
126  }
common ppss p3p6s2 common epss epspn46 common const1 w2
Definition: inclppp.h:1
const double w
Definition: UKUtility.cc:23
dictionary cv
Definition: cuy.py:362
void hi::GenPlane::reset ( void  )
inline

Definition at line 127 of file EvtPlaneProducer.cc.

References VarParsing::mult.

127  {
128  sumsin=0;
129  sumcos=0;
130  sumsinNoWgt = 0;
131  sumcosNoWgt = 0;
132  sumw = 0;
133  sumw2 = 0;
134  mult = 0;
135  sumPtOrEt = 0;
136  sumPtOrEt2 = 0;
137  }

Member Data Documentation

string hi::GenPlane::epname
private

Definition at line 139 of file EvtPlaneProducer.cc.

double hi::GenPlane::etamax1
private

Definition at line 141 of file EvtPlaneProducer.cc.

double hi::GenPlane::etamax2
private

Definition at line 144 of file EvtPlaneProducer.cc.

double hi::GenPlane::etamin1
private

Definition at line 140 of file EvtPlaneProducer.cc.

double hi::GenPlane::etamin2
private

Definition at line 143 of file EvtPlaneProducer.cc.

uint hi::GenPlane::mult
private

Definition at line 149 of file EvtPlaneProducer.cc.

double hi::GenPlane::order
private

Definition at line 154 of file EvtPlaneProducer.cc.

double hi::GenPlane::sumcos
private

Definition at line 146 of file EvtPlaneProducer.cc.

double hi::GenPlane::sumcosNoWgt
private

Definition at line 148 of file EvtPlaneProducer.cc.

double hi::GenPlane::sumPtOrEt
private

Definition at line 152 of file EvtPlaneProducer.cc.

double hi::GenPlane::sumPtOrEt2
private

Definition at line 153 of file EvtPlaneProducer.cc.

double hi::GenPlane::sumsin
private

Definition at line 145 of file EvtPlaneProducer.cc.

double hi::GenPlane::sumsinNoWgt
private

Definition at line 147 of file EvtPlaneProducer.cc.

double hi::GenPlane::sumw
private

Definition at line 150 of file EvtPlaneProducer.cc.

double hi::GenPlane::sumw2
private

Definition at line 151 of file EvtPlaneProducer.cc.