]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TEvtGen/EvtGenModels/EvtSLN.cxx
added a histogram
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenModels / EvtSLN.cxx
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: EvtSLN.cc
12 //
13 // Description: B ==> tau + nu
14 //
15 // Modification history:
16 //
17 //    RYD/SHY   April 23, 1997           Module created
18 //
19 //------------------------------------------------------------------------
20 //
21 #include "EvtGenBase/EvtPatches.hh"
22 #include <stdlib.h>
23 #include <iostream>
24 #include <string>
25 #include "EvtGenBase/EvtParticle.hh"
26 #include "EvtGenBase/EvtPDL.hh"
27 #include "EvtGenBase/EvtGenKine.hh"
28 #include "EvtGenModels/EvtSLN.hh"
29 #include "EvtGenBase/EvtDiracSpinor.hh"
30 #include "EvtGenBase/EvtReport.hh"
31 #include "EvtGenBase/EvtVector4C.hh"
32
33 EvtSLN::~EvtSLN() {}
34
35 std::string EvtSLN::getName(){
36
37   return "SLN";     
38
39 }
40
41 EvtDecayBase* EvtSLN::clone(){
42
43   return new EvtSLN;
44
45 }
46
47
48 void EvtSLN::init(){
49
50   // check that there are 0 arguments
51   checkNArg(0);
52   checkNDaug(2);
53     
54   checkSpinParent(EvtSpinType::SCALAR);
55
56   checkSpinDaughter(0,EvtSpinType::DIRAC);
57   checkSpinDaughter(1,EvtSpinType::NEUTRINO);
58
59 }
60
61
62 void EvtSLN::initProbMax(){
63
64   double M=EvtPDL::getMeanMass(getParentId());
65   double m=EvtPDL::getMeanMass(getDaug(0));
66
67   double probMax=8.0*(M*M-m*m)*m*m;
68
69   setProbMax(probMax);
70
71 }
72
73
74 void EvtSLN::decay(EvtParticle *p){
75
76   static EvtId EM=EvtPDL::getId("e-");
77   static EvtId MUM=EvtPDL::getId("mu-");
78   static EvtId TAUM=EvtPDL::getId("tau-");
79
80   p->initializePhaseSpace(getNDaug(),getDaugs());
81
82   EvtParticle *l, *nul;
83   l= p->getDaug(0);
84   nul= p->getDaug(1);
85
86   EvtVector4R p4_p;
87   p4_p.set(p->mass(),0.0,0.0,0.0);
88
89   EvtVector4C l1, l2;
90   
91   if (getDaug(0)==TAUM || getDaug(0)==MUM || getDaug(0)==EM) {
92     l1=EvtLeptonVACurrent(l->spParent(0),nul->spParentNeutrino());
93     l2=EvtLeptonVACurrent(l->spParent(1),nul->spParentNeutrino());
94   }
95   else{
96     l1=EvtLeptonVACurrent(nul->spParentNeutrino(),l->spParent(0));
97     l2=EvtLeptonVACurrent(nul->spParentNeutrino(),l->spParent(1));
98   }
99
100   vertex(0,p4_p*l1);
101   vertex(1,p4_p*l2);
102   
103   return;
104
105 }
106
107