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

PDT.h

Go to the documentation of this file.
00001 //    $Hdeader: PDT.h,v 1.1.1.1 1999/12/20 22:28:41 burnett Exp $
00002 //
00003 //
00004 //
00005 // Author: Toby Burnett
00006 
00007 #ifndef PDT_H
00008 #define PDT_H
00009 
00010 #include "gismo/PData.h"
00011 #include "gismo/Decayer.h"
00012 #include "gismo/Interactor.h"
00013 
00014 #include <vector>
00015 
00016 class PDTEntry;
00017 
00018 
00019 
00021 class PDT  
00022 {
00023     
00024 public:
00025     
00027     PDT():particles(),decayers(),interactors(){}
00028     
00029     virtual ~PDT();
00030     
00032     PData* lookUp(long)const;
00034     PData* lookUp(const char *);
00035     
00036     
00038     PData * getParticleAt(unsigned) const;
00039     
00041     int count() const { return particles.size();}
00042     
00044     unsigned getIndexOf( PData * );
00045     unsigned getIndexOf(long id);
00046     
00048     PData* addParticle(const char* pname, const char* aname,long id,
00049         int spin, int charge, float mass, float width=0.);
00050     
00052     PData* addParticle(const char* pname, long id,
00053         int spin, int charge, float mass, float width=0.);
00054     
00056     void addDecay(const char* pname, float bf, const char * decayer,
00057         const char* child1, const char* child2=0,
00058         const char* child3=0,
00059         const char* child4=0, const char* child5=0);
00060     
00061     
00063     void addDecayer(Decayer*);
00064     
00066     void setInteraction(const char*);
00067     
00069     void addInteractor(Interactor*);
00070     
00072     virtual void   printOn( std::ostream & )const ;
00073     
00075     static PDT* createDefault(Interactor* int1 =0, Interactor* int2  =0);
00076     
00077 private:
00078     typedef std::vector<PData*> PData_list;
00079     typedef std::vector<Decayer*> Decayer_list;
00080     typedef std::vector<Interactor*> Interactor_list;
00081     PData_list  particles;     // list of particle data
00082     
00083     Decayer_list  decayers;        // List of decay routines
00084     Interactor_list interactors;   //  List of interaction routines
00085     
00086     PData * first()const{return *particles.begin();}
00087     
00088     Interactor* type;
00089     // variable used to keep track of the interactor to be used for subseqent
00090     // defined particles
00091 };
00092 
00093 inline std::ostream& operator<<(std::ostream& out, const PDT* p){p->printOn(out); return out;}
00094 inline std::ostream& operator<<(std::ostream& out, const PDT& p){p.printOn(out); return out;}
00095 
00096 #endif
00097 

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