00001 #include "AtlfastAlgs/BremPTScaleBin.h"
00002
00003 namespace Atlfast{
00004
00005 BremPTScaleBin::BremPTScaleBin(double low, double high, double pt, double step):m_low(low),
00006 m_high(high), m_ptValue(pt), m_ptStep(step) {
00007 }
00008
00009 double BremPTScaleBin::calculatePScale(double rand) const {
00010 double ratio = (m_high - rand) / (m_high - m_low);
00011 return m_ptValue + (1-ratio)*m_ptStep;
00012 }
00013
00014 double BremPTScaleBin::low() const {return m_low;}
00015 double BremPTScaleBin::high() const {return m_high;}
00016 double BremPTScaleBin::ptValue() const {return m_ptValue;}
00017 double BremPTScaleBin::ptStep() const {return m_ptStep;}
00018
00019
00020 MsgStream& operator<<(MsgStream& s, BremPTScaleBin& bin) {
00021 s << "Scale edges :" << bin.low() << " - " <<
00022 bin.high()<<"; PT Range "<<bin.ptValue() <<" - "<< bin.ptValue() + bin.ptStep() <<endreq;
00023 return s;
00024 }
00025
00026 }
00027
00028
00029
00030
00031
00032
00033