]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TEvtGen/EvtGenBase/EvtAmp.hh
Not needed.
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenBase / EvtAmp.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/EvtAmp.hh
12 //
13 // Description:This is the (new) amplitude class.
14 //
15 // Modification history:
16 //
17 //    DJL/RYD     May 29, 1997         Module created
18 //
19 //------------------------------------------------------------------------
20
21 #ifndef EVTAMP_HH
22 #define EVTAMP_HH
23
24 #include "EvtGenBase/EvtComplex.hh"
25 #include "EvtGenBase/EvtPatches.hh"
26
27 class EvtSpinDensity;
28 class EvtId;
29
30 class EvtAmp {
31
32 public:
33
34   EvtAmp();
35   EvtAmp(const EvtAmp& amp);
36
37   void init(EvtId p,int ndaug,EvtId *daug);
38
39   void setAmp(int *ind,const EvtComplex& amp);
40
41   const EvtComplex& getAmp(int *ind)const;
42
43   EvtSpinDensity getSpinDensity();
44
45   EvtSpinDensity contract(int i,const EvtAmp& a);
46   EvtAmp contract(int i, const EvtSpinDensity& rho);
47
48   //sum over the i:th daugther of a1 and contract with parent of a2
49   EvtAmp contract(int i, const EvtAmp& a1,const EvtAmp& a2);
50
51
52   EvtSpinDensity getForwardSpinDensity(EvtSpinDensity *rho_list,int k);
53   EvtSpinDensity getBackwardSpinDensity(EvtSpinDensity *rho_list);
54
55   EvtAmp& operator=(const EvtAmp& amp);
56
57
58   /**
59   * sets the amplitudes calculated in the decay objects
60   */
61   void vertex(const EvtComplex& amp);
62
63   /**
64   * sets the amplitudes calculated in the decay objects
65   */
66   void vertex(int i1, const EvtComplex& amp);
67
68   /**
69   * sets the amplitudes calculated in the decay objects
70   */
71   void vertex(int i1, int i2, const EvtComplex& amp);
72
73   /**
74   * sets the amplitudes calculated in the decay objects
75   */
76   void vertex(int i1, int i2, int i3, const EvtComplex& amp);
77
78   /**
79   * sets the amplitudes calculated in the decay objects
80   */
81   void vertex(int *i1, const EvtComplex& amp);
82
83
84   void dump();
85
86 private:
87
88   friend class EvtDecayAmp;
89   friend class EvtKstarstargamma; 
90
91   void setNDaug(int n);
92   void setNState(int parent_states,int *daug_states);
93
94   // the amplitudes
95   EvtComplex _amp[125];
96
97   // the number of daughters
98   int _ndaug;
99
100   // the number of states of the parent
101   int _pstates;
102
103   // number of states of the daughter
104   int dstates[10];
105
106   // the nontrivial index of the daughter
107   int _dnontrivial[10];
108
109   // number of nontrivial daugts+parent
110   int _nontrivial;
111
112   // compact nstates
113   int _nstate[5];
114
115 };
116
117
118 #endif
119