]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TEvtGen/EvtGenBase/EvtMassAmp.cpp
Updates EvtGen Code
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenBase / EvtMassAmp.cpp
1 //-----------------------------------------------------------------------
2 // File and Version Information: 
3 //      $Id: EvtMassAmp.cpp,v 1.3 2009-03-16 15:47:10 robbep Exp $
4 // 
5 // Environment:
6 //      This software is part of the EvtGen package developed jointly
7 //      for the BaBar and CLEO collaborations. If you use all or part
8 //      of it, please give an appropriate acknowledgement.
9 //
10 // Copyright Information:
11 //      Copyright (C) 1998 Caltech, UCSB
12 //
13 // Module creator:
14 //      Alexei Dvoretskii, Caltech, 2001-2002.
15 //-----------------------------------------------------------------------
16 #include "EvtGenBase/EvtPatches.hh"
17
18 #include "EvtGenBase/EvtMassAmp.hh"
19
20 EvtMassAmp::EvtMassAmp(const EvtPropBreitWignerRel& prop, const EvtTwoBodyVertex& vd)
21   : EvtAmplitude<EvtPoint1D>()
22   ,_prop(prop), _vd(vd), _vb(0)
23   ,_useBirthFact(false), _useDeathFact(false)
24   ,_useBirthFactFF(false), _useDeathFactFF(false)
25 {}
26
27 EvtMassAmp::EvtMassAmp(const EvtMassAmp& other)
28   : EvtAmplitude<EvtPoint1D>(other)
29   ,_prop(other._prop), _vd(other._vd)
30   ,_vb(other._vb ? new EvtTwoBodyVertex(*other._vb) : 0)
31   ,_useBirthFact(other._useBirthFact)
32   ,_useDeathFact(other._useDeathFact)
33   ,_useBirthFactFF(other._useBirthFactFF)
34   ,_useDeathFactFF(other._useDeathFactFF)
35 {}
36
37
38 EvtMassAmp::~EvtMassAmp() 
39 {
40   if(_vb) delete _vb;
41 }
42
43
44 EvtComplex EvtMassAmp::amplitude(const EvtPoint1D& p) const 
45 {
46   // Modified vertex
47
48   double m = p.value();
49   // keep things from crashing..
50
51   if ( m< (_vd.mA()+_vd.mB()) ) return EvtComplex(0.,0.);
52
53   EvtTwoBodyKine vd(_vd.mA(),_vd.mB(),m);
54   
55   // Compute mass-dependent width for relativistic propagator
56
57   EvtPropBreitWignerRel bw(_prop.m0(),_prop.g0()*_vd.widthFactor(vd)); 
58   EvtComplex amp = bw.evaluate(m);
59
60
61   // Birth vertex factors
62
63   if(_useBirthFact) {
64
65     assert(_vb);
66     if ( (m+_vb->mB()) < _vb->mAB() ) {  
67       EvtTwoBodyKine vb(m,_vb->mB(),_vb->mAB());
68       amp *= _vb->phaseSpaceFactor(vb,EvtTwoBodyKine::AB);
69       amp *= sqrt((vb.p() / _vb->pD()));
70
71       if(_useBirthFactFF) {
72         
73         assert(_vb);
74         amp *= _vb->formFactor(vb);
75       }
76     }
77     else{
78       if ( _vb->L() != 0 ) amp=0.;
79     }
80   }
81
82
83   // Decay vertex factors
84
85   if(_useDeathFact) {
86     amp *= _vd.phaseSpaceFactor(vd,EvtTwoBodyKine::AB);
87     amp *= sqrt((vd.p() / _vd.pD()));
88   }
89   if(_useDeathFactFF) amp *= _vd.formFactor(vd);
90
91   return amp;
92 }
93
94
95
96
97
98