]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TEvtGen/EvtGenBase/EvtId.hh
o updates to fix the 11a pass4 problem of T0 (Alla)
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenBase / EvtId.hh
1 //--------------------------------------------------------------------------
2 //
3 // Environment:
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.
7 //
8 // Copyright Information: See EvtGen/COPYRIGHT
9 //      Copyright (C) 1998      Caltech, UCSB
10 //
11 // Module: EvtGen/EvtId.hh
12 //
13 // Description:Class for particle Id used in EvtGen.
14 //
15 // Modification history:
16 //
17 //    DJL/RYD     May 26, 1998         Module created
18 //
19 //------------------------------------------------------------------------
20
21 #ifndef EVTID_HH
22 #define EVTID_HH
23
24 #include <iostream>
25 //class ostream;
26
27 class EvtId {
28
29 public:
30
31   //need a default constructor
32   EvtId():_id(-1),_alias(-1){}
33
34   EvtId(int id,int alias):_id(id),_alias(alias){} 
35
36   friend std::ostream& operator<<(std::ostream& s, const EvtId& v);  
37
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;
41
42   int getId() const { return _id;}
43
44   int getAlias() const { return _alias;}
45
46   int isAlias() const { return _id!=_alias;}
47
48 private:
49
50   //particle number 0..n. The order of particles are determined 
51   //by the order in pdt.table
52   int _id;
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.
56   int _alias;
57   
58 }; 
59
60 #endif
61