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
EvtPlaneProducer::GenPlane Class Reference

Public Member Functions

void addParticle (double w, 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)
 
void reset ()
 
 ~GenPlane ()
 

Private Attributes

string epname
 
double etamax1
 
double etamax2
 
double etamin1
 
double etamin2
 
int mult
 
double order
 
double sumcos
 
double sumsin
 

Detailed Description

Definition at line 74 of file EvtPlaneProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 86 of file EvtPlaneProducer.cc.

86 {;}

Member Function Documentation

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

Definition at line 87 of file EvtPlaneProducer.cc.

References trackerHits::c, VarParsing::mult, alignCSCRings::s, and w().

87  {
88  if(w < 0.001) return;
89  if((eta>=etamin1 && eta<etamax1) ||
90  (etamin2!= etamax2 && eta>=etamin2 && eta<etamax2 )) {
91  sumsin+=w*s;
92  sumcos+=w*c;
93  //For tracking, w=1 and mult is the track multiplicity.
94  //For calorimetors, w is an energy that needs to be subsequently
95  //converted if an multiplicity if needed
96  mult+=w;
97  }
98  }
T eta() const
T w() const
double EvtPlaneProducer::GenPlane::getAngle ( double &  ang,
double &  sv,
double &  cv 
)
inline

Definition at line 100 of file EvtPlaneProducer.cc.

References cuy::cv, and lumiQueryAPI::q.

100  {
101  ang = -10;
102  sv = 0;
103  cv = 0;
104  sv = sumsin;
105  cv = sumcos;
106  double q = sv*sv+cv*cv;
107  if(q>0) ang = atan2(sv,cv)/order;
108  return ang;
109  }
dictionary cv
Definition: cuy.py:362
void EvtPlaneProducer::GenPlane::reset ( void  )
inline

Definition at line 110 of file EvtPlaneProducer.cc.

References VarParsing::mult.

Member Data Documentation

string EvtPlaneProducer::GenPlane::epname
private

Definition at line 116 of file EvtPlaneProducer.cc.

double EvtPlaneProducer::GenPlane::etamax1
private

Definition at line 118 of file EvtPlaneProducer.cc.

double EvtPlaneProducer::GenPlane::etamax2
private

Definition at line 121 of file EvtPlaneProducer.cc.

double EvtPlaneProducer::GenPlane::etamin1
private

Definition at line 117 of file EvtPlaneProducer.cc.

double EvtPlaneProducer::GenPlane::etamin2
private

Definition at line 120 of file EvtPlaneProducer.cc.

int EvtPlaneProducer::GenPlane::mult
private

Definition at line 124 of file EvtPlaneProducer.cc.

double EvtPlaneProducer::GenPlane::order
private

Definition at line 125 of file EvtPlaneProducer.cc.

double EvtPlaneProducer::GenPlane::sumcos
private

Definition at line 123 of file EvtPlaneProducer.cc.

double EvtPlaneProducer::GenPlane::sumsin
private

Definition at line 122 of file EvtPlaneProducer.cc.