CMS 3D CMS Logo

Public Member Functions | Private Attributes

EvtPlaneProducer::GenPlane Class Reference

List of all members.

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]

Definition at line 77 of file EvtPlaneProducer.cc.

References mergeVDriftHistosByStation::name.

                                                                                                              {
      epname=name;
      etamin1=etaminval1;
      etamax1=etamaxval1;
      etamin2=etaminval2;
      etamax2=etamaxval2;
      sumsin=0;
      sumcos=0;
      order = (double) orderval;
    }
EvtPlaneProducer::GenPlane::~GenPlane ( ) [inline]

Definition at line 87 of file EvtPlaneProducer.cc.

{;}

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().

                                                               {
      if(w < 0.001) return;
      if((eta>=etamin1 && eta<etamax1) || 
         (etamin2!= etamax2 && eta>=etamin2 && eta<etamax2 )) {
        sumsin+=w*s;
        sumcos+=w*c;
        //For tracking, w=1 and mult is the track multiplicity.  
        //For calorimetors, w is an energy that needs to be subsequently 
        //converted if an  multiplicity if needed
        mult+=w;
      }
    }
double EvtPlaneProducer::GenPlane::getAngle ( double &  ang,
double &  sv,
double &  cv 
) [inline]

Definition at line 101 of file EvtPlaneProducer.cc.

References lumiQueryAPI::q.

                                                        {
      ang = -10;
      sv = 0;
      cv = 0;
      sv = sumsin;
      cv = sumcos;
      double q = sv*sv+cv*cv;
      if(q>0) ang = atan2(sv,cv)/order;
      return ang;
    }
void EvtPlaneProducer::GenPlane::reset ( void  ) [inline]

Definition at line 111 of file EvtPlaneProducer.cc.

References VarParsing::mult.

                 {
      sumsin=0;
      sumcos=0;
      mult = 0;
    }

Member Data Documentation

Definition at line 117 of file EvtPlaneProducer.cc.

Definition at line 119 of file EvtPlaneProducer.cc.

Definition at line 122 of file EvtPlaneProducer.cc.

Definition at line 118 of file EvtPlaneProducer.cc.

Definition at line 121 of file EvtPlaneProducer.cc.

Definition at line 125 of file EvtPlaneProducer.cc.

Definition at line 126 of file EvtPlaneProducer.cc.

Definition at line 124 of file EvtPlaneProducer.cc.

Definition at line 123 of file EvtPlaneProducer.cc.