CLHEP/HepPDT/TempParticleData.hh

00001 // $Id: TempParticleData.hh,v 1.4 2002/04/18 20:15:38 garren Exp $
00002 // ----------------------------------------------------------------------
00003 //
00004 // TempParticleData.hh
00005 //
00006 // temporary structure to hold particles while getting all the info
00007 // ----------------------------------------------------------------------
00008 #ifndef TEMPPARTICLEDATA_HH
00009 #define TEMPPARTICLEDATA_HH
00010 
00011 #include "CLHEP/config/CLHEP.h"
00012 #include <string>
00013 #include <vector>
00014 
00015 #include "CLHEP/HepPDT/SpinState.hh"
00016 #include "CLHEP/HepPDT/ParticleID.hh"
00017 #include "CLHEP/HepPDT/Measurement.hh"
00018 
00019 namespace HepPDT {
00020 
00021 // free function
00022 double calculateWidthFromLifetime( double );
00023 
00024 // constituent information
00029 struct TempConstituent {
00030     TempConstituent( ParticleID p = ParticleID(0), int m = -1 )
00031       : tempConstituentPID(p), tempMultiplicity(m)  {}
00032     ParticleID tempConstituentPID;
00033     int        tempMultiplicity;
00034 };
00035 
00040 struct TempDecayData  {
00041   std::string         tempDecayName;    // use string to hold int if necessary
00042   double              tempBranchingFraction;
00043   std::vector<std::string> tempDaughterList;
00044   std::vector<double>      tempDecayParameters;
00045 };
00046 
00047 // useful typedef
00048   typedef std::vector<TempDecayData>  TDDlist;
00049 
00050 // Hold Alias information from EvtGen
00055 struct TempAliasData {
00056 
00057   // ---  birth/death:
00058   //
00059   TempAliasData();      // used in a map<>
00060 
00061   std::string    tempAlias;             // the alias
00062   std::string    tempAliasedParticle;   // the "real" particle
00063   std::string    tempChargeConj;        // set if there is a charge conjugate alias
00064   TDDlist        tempAliasDecayList;    // decay list for the alias
00065 };
00066 
00071 struct TempParticleData  {
00072 
00073   // ---  birth/death:
00074   //
00075   TempParticleData();   // used in a map<>
00076   explicit TempParticleData( int id );
00077   explicit TempParticleData( ParticleID pid );
00078   TempParticleData( int id, std::string const & name, double charge,
00079                     SpinState const & Spin, 
00080                     Measurement const & mass, Measurement const & wid );
00081 
00082   // ---  copying:
00083   //
00084   TempParticleData( TempParticleData const & orig );
00085   TempParticleData & operator = ( TempParticleData const & rhs );
00086   void swap( TempParticleData & other );
00087   TempParticleData  antiparticle( std::string const & name );
00088  
00089   // -- mutator - get spin state and quark list from PID
00090   bool processPID();
00091 
00092   // -- data members (public by design)
00093   //
00094   ParticleID                   tempID;
00095   std::string                  tempParticleName;
00096   double                       tempCharge;
00097   double                       tempColorCharge;
00098   SpinState                    tempSpin;
00099   Measurement                  tempMass;
00100   Measurement                  tempWidth;
00101   double                       tempLowCutoff;
00102   double                       tempHighCutoff;
00103   std::vector<TempConstituent> tempQuarks;
00104   TDDlist                      tempDecayList; 
00105 
00106 };  // TempParticleData
00107 
00108 inline
00109 void swap( TempParticleData & first, TempParticleData & second ) { first.swap( second ); }
00110 
00111 }       // HepPDT
00112 
00113 #endif // TEMPPARTICLEDATA_HH

Class Library for High Energy Physics (version 1.8)