Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

PDTEntry.cxx

Go to the documentation of this file.
00001 // -*- C++ -*-  $Id: PDTEntry.cxx,v 1.2 2000/01/17 23:37:31 burnett Exp $
00002 //
00003 // This file is part of Gismo 2
00004 //
00005 // File: pdtentry.cpp
00006 
00007 // Contents ------------------------------------------------------------
00008 //
00009 //   PDTEntry::PDTEntry
00010 //   PDTEntry::printOn
00011 //   PDTEntry::~PDTEn try          destructor
00012 //   PData::PData
00013 //   PData::printOn
00014 //   AntiPData::AntiPData
00015 //
00016 // Description
00017 //
00018 //   implement the PDTentry class and its friends (Anti)PData
00019 //
00020 // End -----------------------------------------------------------------
00021 
00022 #include "PDTEntry.h"
00023 
00024 #include "DecayEntry.h"
00025 
00026 #include "gismo/Interactor.h"
00027 #include "gismo/Units.h"
00028 
00029 
00030 PDTEntry::PDTEntry(long code,int ispin, int icharge,
00031                 float imass,float iwidth)
00032 {
00033    idCode = code;
00034    mass = imass;
00035    width= iwidth;
00036    widthCut=2.*iwidth;  // sometime allow change?
00037    spin = ispin;
00038    charge = icharge;
00039    lifeTime = (width>0.)? Units::hbarc()/width: 1.e30;
00040    sumBR = 0;            // summed branching ratio
00041    decayInfo = NULL;    // initialize decaylist to zero
00042 }
00043 
00044 
00045 void PDTEntry::printOn(std::ostream& str)const
00046 {
00047    str << mass << width << spin << charge << lifeTime<<  '\n';
00048 }
00049 
00050 Interactor *
00051 PDTEntry::interaction() const
00052 { return intobject->replacement;
00053 }
00054 
00055 PDTEntry::~PDTEntry()
00056 {
00057    DecayEntry *de = decayInfo;
00058    while (de!=NULL)
00059    {
00060       de= de->next;
00061       delete decayInfo;
00062       decayInfo = de;
00063    }
00064 }
00065 
00066 

Generated at Mon Nov 26 18:18:33 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000