00001
00002
00003
00004
00005
00006
00007
00008 #include "HepPDT/defs.h"
00009 #include "HepPDT/ResonanceStructure.hh"
00010
00011 namespace HepPDT {
00012
00013 ResonanceStructure::ResonanceStructure( Measurement mass, Measurement width,
00014 double min, double max )
00015 : itsMass ( mass ),
00016 itsTotalWidth ( width ),
00017 itsLowerCutoff ( min ),
00018 itsUpperCutoff ( max )
00019 { ; }
00020
00021 ResonanceStructure::ResonanceStructure( const ResonanceStructure & orig )
00022 : itsMass ( orig.itsMass ),
00023 itsTotalWidth ( orig.itsTotalWidth ),
00024 itsLowerCutoff ( orig.itsLowerCutoff ),
00025 itsUpperCutoff ( orig.itsUpperCutoff )
00026 { ; }
00027
00028 ResonanceStructure& ResonanceStructure::operator=( const ResonanceStructure & rhs )
00029 {
00030 ResonanceStructure temp( rhs );
00031 swap( temp );
00032 return *this;
00033 }
00034
00035 void ResonanceStructure::swap ( ResonanceStructure & other )
00036 {
00037 itsMass .swap(other.itsMass);
00038 itsTotalWidth.swap(other.itsTotalWidth);
00039 std::swap(itsLowerCutoff, other.itsLowerCutoff);
00040 std::swap(itsUpperCutoff, other.itsUpperCutoff);
00041 }
00042
00043
00044 ResonanceStructure::~ResonanceStructure()
00045 { ; }
00046
00047 void ResonanceStructure::setTotalWidthFromLifetime( Measurement const & lt )
00048 {
00049
00050 static double epsilon = 1.0e-20;
00051 static double hbar = 6.58211889e-25;
00052 double wid, sig;
00053
00054 if( lt.value() < epsilon ) { return; }
00055 wid = hbar/lt.value();
00056 if( lt.sigma() < epsilon ) {
00057 sig = 0.;
00058 } else {
00059 sig = (lt.sigma()/lt.value())*wid;
00060 }
00061 itsTotalWidth = Measurement(wid,sig);
00062 }
00063
00064 }