]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TEvtGen/EvtGen/EvtGenModels/EvtBcVMuNu.cpp
Converting TEvtGen to native cmake
[u/mrichter/AliRoot.git] / TEvtGen / EvtGen / EvtGenModels / EvtBcVMuNu.cpp
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: EvtBcVMuNu.cc
12 //
13 // Description: Routine to implement semileptonic B->psi lnu decays 
14 //
15 // Modification history:
16 //
17 //    AVL     July 6, 2012        Module created
18 //
19 //------------------------------------------------------------------------
20 // 
21 #include "EvtGenBase/EvtPatches.hh"
22 #include <stdlib.h>
23 #include "EvtGenBase/EvtParticle.hh"
24 #include "EvtGenBase/EvtGenKine.hh"
25 #include "EvtGenBase/EvtPDL.hh"
26 #include "EvtGenBase/EvtReport.hh"
27 #include "EvtGenBase/EvtSemiLeptonicVectorAmp.hh"
28 #include <string>
29 #include <iostream>
30
31 #include "EvtGenModels/EvtBcVMuNu.hh"
32 #include "EvtGenModels/EvtBCVFF.hh"
33
34 using namespace std;
35
36 EvtBcVMuNu::~EvtBcVMuNu() {
37 //   cout<<"EvtBcVMuNu::destructor getProbMax(-1) = "<<getProbMax(-1)<<endl;
38 }
39
40 std::string EvtBcVMuNu::getName(){
41   return "BC_VMN";     
42 }
43
44
45 EvtDecayBase* EvtBcVMuNu::clone(){
46 //   cout<<" === EvtBcVMuNu::clone() ============"<<endl;
47   return new EvtBcVMuNu;
48
49 }
50
51 void EvtBcVMuNu::decay( EvtParticle *p ){
52 //  cout<<" === EvtBcVMuNu::decay() ============"<<endl;
53
54   p->initializePhaseSpace(getNDaug(),getDaugs());
55   calcamp->CalcAmp(p,_amp2,ffmodel);
56 //  cout<<"EvtBcVMuNu::decay() getProbMax(-1) = "<<getProbMax(-1)<<endl;
57 }
58
59
60 void EvtBcVMuNu::init(){
61 //   cout<<" === EvtBcVMuNu::init() ============"<<endl;
62  
63   
64   checkNArg(1);
65   checkNDaug(3);
66
67   //We expect the parent to be a scalar 
68   //and the daughters to be X lepton neutrino
69
70   checkSpinParent(EvtSpinType::SCALAR);
71
72   checkSpinDaughter(0,EvtSpinType::VECTOR);
73   checkSpinDaughter(1,EvtSpinType::DIRAC);
74   checkSpinDaughter(2,EvtSpinType::NEUTRINO);
75
76     idVector = getDaug(0).getId();
77     whichfit = int(getArg(0)+0.1);
78     cout<<"EvtBcVMuNu: whichfit ="<<whichfit<<"  idVector="<<idVector<<endl;
79     ffmodel = new EvtBCVFF(idVector,whichfit);
80
81   calcamp = new EvtSemiLeptonicVectorAmp; 
82  
83 }
84
85 void EvtBcVMuNu::initProbMax() {
86 //  cout<<" === EvtBcVMuNu::initProbMax() ============"<<endl;
87           if(whichfit==0) setProbMax(1700.);
88           else if(idVector == EvtPDL::getId("J/psi").getId() && whichfit == 1) setProbMax(40000.);
89           else if(idVector == EvtPDL::getId("J/psi").getId() && whichfit == 2) setProbMax(15000.);
90           else if(idVector == EvtPDL::getId("psi(2S)").getId() && whichfit == 1) setProbMax(700.);
91           else if(idVector == EvtPDL::getId("psi(2S)").getId() && whichfit == 2) setProbMax(300.);
92           else {
93             cout<<"EvtBcVMuNu: Not realized yet"<<endl;
94             ::abort();
95           };
96 };
97