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 75 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 87 of file EvtPlaneProducer.cc.

87 {;}

Member Function Documentation

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

Definition at line 88 of file EvtPlaneProducer.cc.

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

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

Definition at line 101 of file EvtPlaneProducer.cc.

References lumiQueryAPI::q.

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

Definition at line 111 of file EvtPlaneProducer.cc.

References VarParsing::mult.

Member Data Documentation

string EvtPlaneProducer::GenPlane::epname
private

Definition at line 117 of file EvtPlaneProducer.cc.

double EvtPlaneProducer::GenPlane::etamax1
private

Definition at line 119 of file EvtPlaneProducer.cc.

double EvtPlaneProducer::GenPlane::etamax2
private

Definition at line 122 of file EvtPlaneProducer.cc.

double EvtPlaneProducer::GenPlane::etamin1
private

Definition at line 118 of file EvtPlaneProducer.cc.

double EvtPlaneProducer::GenPlane::etamin2
private

Definition at line 121 of file EvtPlaneProducer.cc.

int EvtPlaneProducer::GenPlane::mult
private

Definition at line 125 of file EvtPlaneProducer.cc.

double EvtPlaneProducer::GenPlane::order
private

Definition at line 126 of file EvtPlaneProducer.cc.

double EvtPlaneProducer::GenPlane::sumcos
private

Definition at line 124 of file EvtPlaneProducer.cc.

double EvtPlaneProducer::GenPlane::sumsin
private

Definition at line 123 of file EvtPlaneProducer.cc.