1 //--------------------------------------------------------------------------
4 // This software is part of the EvtGen package developed jointly
5 // for the BaBar and CLEO collaborations. If you use all or part
6 // of it, please give an appropriate acknowledgement.
8 // Copyright Information: See EvtGen/COPYRIGHT
9 // Copyright (C) 1998 Caltech, UCSB
11 // Module: EvtGen/EvtId.hh
13 // Description:Class for particle Id used in EvtGen.
15 // Modification history:
17 // DJL/RYD May 26, 1998 Module created
19 //------------------------------------------------------------------------
31 //need a default constructor
32 EvtId():_id(-1),_alias(-1){}
34 EvtId(int id,int alias):_id(id),_alias(alias){}
36 friend std::ostream& operator<<(std::ostream& s, const EvtId& v);
38 int operator==(const EvtId& id) const { return _id==id._id; }
39 int operator!=(const EvtId& id) const { return _id!=id._id; }
40 int isConjugate(const EvtId & id) const;
42 int getId() const { return _id;}
44 int getAlias() const { return _alias;}
46 int isAlias() const { return _id!=_alias;}
50 //particle number 0..n. The order of particles are determined
51 //by the order in pdt.table
53 //if the particle is an alias to another particle alias!=id
54 //The only place where the alias should be used is for looking
55 //up decays in the decay table.