Atlfast::PhiBin Class Reference

#include <MuonSpectrometer.h>

List of all members.

Public Member Functions

 PhiBin (DOMNode *boundaries, DOMNode *phi)
 ~PhiBin ()
void setPhiStuff (double sectorPhimin, double sectorPhimax, double deltaPhi, int phipoints)
void combine (PhiBin &otherPhiBin, double thispt, double nextpt)
double calculateResolution (const HepLorentzVector &avec)
void dump (std::string indent)
double getPhiMin ()
double getPhiMax ()

Private Attributes

int m_phibin
double m_phimin
double m_phimax
double m_phivalue
std::vector< EtaBinm_etas


Detailed Description

Definition at line 34 of file MuonSpectrometer.h.


Constructor & Destructor Documentation

Atlfast::PhiBin::PhiBin ( DOMNode *  boundaries,
DOMNode *  phi 
)

Definition at line 135 of file MuonSpectrometer.cxx.

00135                                                  :
00136     m_phibin(0), m_phimin(0.), m_phimax(0.){
00137     
00138     // phibin goes from 0 to 90
00139     getFirstValue(phi, "phibinnumber", m_phibin);
00140     
00141     std::vector<double> deltaponps;
00142     getAllValues(phi, "deltaponp",deltaponps);
00143     SpectrometerComponentBinInstantiator<EtaBin> instantiator(boundaries);
00144     m_etas = std::for_each(deltaponps.begin(),
00145                            deltaponps.end(),             
00146                            instantiator).objects();
00147     
00148     double etafirst;
00149     double etalast;
00150     
00151     DOMNode* etaInfoNode =  getFirstChildTagByName(boundaries, "etainfo");
00152     getFirstValue(etaInfoNode, "etafirst", etafirst);
00153     getFirstValue(etaInfoNode, "etalast", etalast);
00154     
00155     int etaPoints = m_etas.size();
00156     double deltaEta = (etalast-etafirst)/(etaPoints-1);
00157     
00158     std::vector<EtaBin>::iterator itr = m_etas.begin();
00159     for(;itr != m_etas.end(); ++itr){
00160       (*itr).setEtaStuff(etafirst,deltaEta);
00161     }
00162     
00163   }
  

Atlfast::PhiBin::~PhiBin (  ) 

Definition at line 166 of file MuonSpectrometer.cxx.

00166                  {
00167     m_etas.clear();
00168   }


Member Function Documentation

void Atlfast::PhiBin::setPhiStuff ( double  sectorPhimin,
double  sectorPhimax,
double  deltaPhi,
int  phipoints 
)

Definition at line 170 of file MuonSpectrometer.cxx.

00170                                                                                                   {
00171 
00172     // these are phi values within a sector    
00173     m_phimin = m_phibin ? deltaPhi*double(m_phibin-0.5) + sectorPhimin : sectorPhimin;
00174     if (m_phimin > M_PI) m_phimin -= (2.*M_PI);
00175     
00176     m_phimax = (m_phibin != (phipoints-1)) ? deltaPhi*double(m_phibin+0.5) : sectorPhimax;
00177     if (m_phimax > M_PI) m_phimax -= (2.*M_PI);
00178     
00179   }

void Atlfast::PhiBin::combine ( PhiBin otherPhiBin,
double  thispt,
double  nextpt 
)

Definition at line 181 of file MuonSpectrometer.cxx.

00181                                                                        {
00182     
00183     std::vector<EtaBin>::iterator thisEtaItr = m_etas.begin();
00184     std::vector<EtaBin>::iterator otherEtaItr = otherPhiBin.m_etas.begin();
00185     for(;thisEtaItr != m_etas.end(); ++thisEtaItr, ++otherEtaItr){
00186 
00187       (*thisEtaItr).combine(*otherEtaItr, thispt, nextpt);
00188     }
00189     
00190   }

double Atlfast::PhiBin::calculateResolution ( const HepLorentzVector &  avec  ) 

Definition at line 192 of file MuonSpectrometer.cxx.

00192                                                                 {
00193     
00194     IsCorrectEtaBin iceb(fabs(avec.pseudoRapidity()));
00195     std::vector<EtaBin>::iterator ebitr = find_if(m_etas.begin(),
00196                                                   m_etas.end(),
00197                                                   iceb);
00198     if ( ebitr == m_etas.end() ){
00199       // Muon outside eta range, returning resolution of 1.0
00200       return 1.;
00201     }
00202     
00203     return (*ebitr).calculateResolution(avec);    
00204     
00205   }

void Atlfast::PhiBin::dump ( std::string  indent  ) 

Definition at line 207 of file MuonSpectrometer.cxx.

00207                                    {
00208     indent += "  ";
00209     std::cout<<indent<<"Dump for PhiBin:\n";
00210     std::cout<<indent<<"m_phibin "<<m_phibin<<std::endl;
00211     std::cout<<indent<<"m_phimin "<<m_phimin<<std::endl;
00212     std::cout<<indent<<"m_phimax "<<m_phimax<<std::endl;
00213     std::cout<<indent<<"Dump of my etas:"<<std::endl;
00214     std::for_each(m_etas.begin(), m_etas.end(), AddToDump(indent));
00215   }

double Atlfast::PhiBin::getPhiMin (  )  [inline]

Definition at line 42 of file MuonSpectrometer.h.

00042 {return m_phimin;}

double Atlfast::PhiBin::getPhiMax (  )  [inline]

Definition at line 43 of file MuonSpectrometer.h.

00043 {return m_phimax;}


Member Data Documentation

int Atlfast::PhiBin::m_phibin [private]

Definition at line 45 of file MuonSpectrometer.h.

double Atlfast::PhiBin::m_phimin [private]

Definition at line 46 of file MuonSpectrometer.h.

double Atlfast::PhiBin::m_phimax [private]

Definition at line 47 of file MuonSpectrometer.h.

double Atlfast::PhiBin::m_phivalue [private]

Definition at line 48 of file MuonSpectrometer.h.

std::vector<EtaBin> Atlfast::PhiBin::m_etas [private]

Definition at line 49 of file MuonSpectrometer.h.


The documentation for this class was generated from the following files:
Generated on Mon Sep 24 14:19:41 2007 for AtlfastAlgs by  doxygen 1.5.1