/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenBase/EvtId.hh

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 //
00003 // Environment:
00004 //      This software is part of the EvtGen package developed jointly
00005 //      for the BaBar and CLEO collaborations.  If you use all or part
00006 //      of it, please give an appropriate acknowledgement.
00007 //
00008 // Copyright Information: See EvtGen/COPYRIGHT
00009 //      Copyright (C) 1998      Caltech, UCSB
00010 //
00011 // Module: EvtGen/EvtId.hh
00012 //
00013 // Description:Class for particle Id used in EvtGen.
00014 //
00015 // Modification history:
00016 //
00017 //    DJL/RYD     May 26, 1998         Module created
00018 //
00019 //------------------------------------------------------------------------
00020 
00021 #ifndef EVTID_HH
00022 #define EVTID_HH
00023 
00024 #include <iostream>
00025 //class ostream;
00026 
00027 class EvtId {
00028 
00029 public:
00030 
00031   //need a default constructor
00032   EvtId():_id(-1),_alias(-1){}
00033 
00034   EvtId(int id,int alias):_id(id),_alias(alias){} 
00035 
00036   friend std::ostream& operator<<(std::ostream& s, const EvtId& v);  
00037 
00038   int operator==(const EvtId& id) const { return _id==id._id; }
00039   int operator!=(const EvtId& id) const { return _id!=id._id; }
00040 
00041   int getId() const { return _id;}
00042 
00043   int getAlias() const { return _alias;}
00044 
00045   int isAlias() const { return _id!=_alias;}
00046 
00047 private:
00048 
00049   //particle number 0..n. The order of particles are determined 
00050   //by the order in pdt.table
00051   int _id;
00052   //if the particle is an alias to another particle alias!=id
00053   //The only place where the alias should be used is for looking
00054   //up decays in the decay table.
00055   int _alias;
00056   
00057 }; 
00058 
00059 #endif
00060 

Generated on Tue Nov 29 23:12:13 2016 for BOSS_7.0.2 by  doxygen 1.4.7