#include <MuonSpectrometer.h>
Public Member Functions | |
ProtoSpectrometer (DOMNode *boundaries, DOMNode *ptbinres, bool lowestpT, bool highestpT) | |
~ProtoSpectrometer () | |
double | getPtValue () const |
MuonSpectrometer | combine (ProtoSpectrometer &otherPS) |
void | dump (std::string indent) |
Private Attributes | |
std::vector< Sector > | m_sectors |
int | m_ptbin |
double | m_ptvalue |
bool | m_lowestpT |
bool | m_highestpT |
Definition at line 89 of file MuonSpectrometer.h.
Atlfast::ProtoSpectrometer::ProtoSpectrometer | ( | DOMNode * | boundaries, | |
DOMNode * | ptbinres, | |||
bool | lowestpT, | |||
bool | highestpT | |||
) |
Definition at line 297 of file MuonSpectrometer.cxx.
00297 : 00298 m_lowestpT(lowestpT), m_highestpT(highestpT){ 00299 00300 getFirstValue(ptbinres, "ptbinnumber", m_ptbin); 00301 00302 DOMNode* node = getFirstChildTagByName(boundaries, "ptpoints"); 00303 00304 std::vector<DOMNode*> ptBoundaryNodes = 00305 getAllChildTagsByName(node, "ptpoint"); 00306 00307 std::vector<double> ptBoundaries = 00308 for_each( 00309 ptBoundaryNodes.begin(), 00310 ptBoundaryNodes.end(), 00311 GetDoublesFromNodes() 00312 ).doubles(); 00313 00314 if(m_ptbin < static_cast<int>(ptBoundaries.size())){ 00315 m_ptvalue = ptBoundaries[m_ptbin]; 00316 } 00317 std::vector<DOMNode*> sectors = getAllChildTagsByName(ptbinres, "sector"); 00318 SpectrometerComponentInstantiator<Sector> instantiator(boundaries); 00319 m_sectors = std::for_each(sectors.begin(), 00320 sectors.end(), 00321 instantiator).objects(); 00322 }
Atlfast::ProtoSpectrometer::~ProtoSpectrometer | ( | ) |
double Atlfast::ProtoSpectrometer::getPtValue | ( | ) | const [inline] |
MuonSpectrometer Atlfast::ProtoSpectrometer::combine | ( | ProtoSpectrometer & | otherPS | ) |
Definition at line 337 of file MuonSpectrometer.cxx.
00337 { 00338 00339 std::vector<Sector>::iterator thisSecItr = m_sectors.begin(); 00340 std::vector<Sector>::iterator otherSecItr = otherPS.m_sectors.begin(); 00341 00342 for(; thisSecItr!= m_sectors.end(); ++thisSecItr, ++otherSecItr){ 00343 (*thisSecItr).combine(*otherSecItr, m_ptvalue, otherPS.m_ptvalue); 00344 } 00345 00346 double ptlow = m_lowestpT ? 0.0 : m_ptvalue; 00347 double pthigh = otherPS.m_highestpT ? 7000000.0 : otherPS.m_ptvalue; 00348 00349 MuonSpectrometer thisMS(ptlow, pthigh, m_sectors); 00350 00351 return thisMS; 00352 00353 }
void Atlfast::ProtoSpectrometer::dump | ( | std::string | indent | ) |
Definition at line 328 of file MuonSpectrometer.cxx.
00328 { 00329 indent += " "; 00330 std::cout<<indent<<"Dump for Spectrometer:\n"; 00331 std::cout<<indent<<"m_bin "<<m_ptbin<<std::endl; 00332 std::cout<<indent<<"m_ptvalue "<<m_ptvalue<<std::endl; 00333 std::cout<<indent<<"Dump of my sectors:"<<std::endl; 00334 std::for_each(m_sectors.begin(), m_sectors.end(), AddToDump(indent)); 00335 }
std::vector<Sector> Atlfast::ProtoSpectrometer::m_sectors [private] |
Definition at line 98 of file MuonSpectrometer.h.
int Atlfast::ProtoSpectrometer::m_ptbin [private] |
Definition at line 99 of file MuonSpectrometer.h.
double Atlfast::ProtoSpectrometer::m_ptvalue [private] |
Definition at line 100 of file MuonSpectrometer.h.
bool Atlfast::ProtoSpectrometer::m_lowestpT [private] |
Definition at line 101 of file MuonSpectrometer.h.
bool Atlfast::ProtoSpectrometer::m_highestpT [private] |
Definition at line 102 of file MuonSpectrometer.h.