1 //--------------------------------------------------------------------------
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.
8 // Module: EvtBtoXsgamma.cc
10 // Description: Routine to perform two-body non-resonant B->Xs,gamma decays.
11 // Set the first input parameter to 1 to use the Ali-Greub model,
12 // or 2 to use the Kagan-Neubert model.
14 // Modification history:
16 // Mark Ian Williams July 20, 2000 Module created
17 // Mark Ian Williams July 21, 2000 Module works
18 // Mark Ian Williams July 25, 2000 Works for all Xs modes
19 // Mark Ian Williams Aug 09, 2000 New values for mass minima
20 // Mark Ian Williams Sept 06, 2000 14 parameter M_Xs function
21 // Mark Ian Williams Sept 07, 2000 18 parameter M_Xs function
22 // Mark Ian Williams Sept 07, 2000 Tidied up the code
23 // Mark Ian Williams Sept 10, 2000 Updated parameters
24 // Mark Ian Williams Sept 11, 2000 Finalised code
25 // Jane Tinslay March 21, 2001 Re-worked so that you can choose
26 // between the Ali-Greub and Kagan-Neubert
28 //------------------------------------------------------------------------
31 #include "EvtGenBase/EvtPatches.hh"
33 #include "EvtGenBase/EvtParticle.hh"
34 #include "EvtGenBase/EvtGenKine.hh"
35 #include "EvtGenBase/EvtPDL.hh"
36 #include "EvtGenBase/EvtReport.hh"
37 #include "EvtGenModels/EvtBtoXsgamma.hh"
39 #include "EvtGenBase/EvtConst.hh"
40 #include "EvtGenModels/EvtBtoXsgammaAliGreub.hh"
41 #include "EvtGenModels/EvtBtoXsgammaKagan.hh"
42 #include "EvtGenModels/EvtBtoXsgammaFixedMass.hh"
43 #include "EvtGenModels/EvtBtoXsgammaFlatEnergy.hh"
46 EvtBtoXsgamma::~EvtBtoXsgamma() {
48 delete _model; _model=0;
52 std::string EvtBtoXsgamma::getName(){
58 EvtDecayBase* EvtBtoXsgamma::clone(){
60 return new EvtBtoXsgamma;
64 void EvtBtoXsgamma::init(){
66 // 0: Ali-Greub model = 1, Kagan model = 2
67 //No more arguments for Ali-Greub model
72 // check that at least one b->sg model has been selected
75 report(ERROR,"EvtGen") << "EvtBtoXsgamma generator expected "
76 << " at least 1 argument but found: "<<getNArg()<<endl;
77 report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
82 void EvtBtoXsgamma::initProbMax(){
88 void EvtBtoXsgamma::decay( EvtParticle *p ){
90 //initialize here. -- its too damn slow otherwise.
94 if (getArg(0) == 1) _model = new EvtBtoXsgammaAliGreub();
95 else if (getArg(0) == 2) _model = new EvtBtoXsgammaKagan();
96 else if (getArg(0) == 3) _model = new EvtBtoXsgammaFixedMass();
97 else if (getArg(0) == 4) _model = new EvtBtoXsgammaFlatEnergy();
99 report(ERROR,"EvtGen") << "No valid EvtBtoXsgamma generator model selected "
100 << "Set arg(0) to 1 for Ali-Greub model or 2 for "
101 <<" Kagan model or 3 for a fixed mass"<<endl;
102 report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
106 _model->init(getNArg(),getArgs());
110 // if ( p->getNDaug() != 0 ) {
111 //Will end up here because maxrate multiplies by 1.2
112 // report(DEBUG,"EvtGen") << "In EvtBtoXsgamma: X_s daughters should not be here!"<<endl;
118 p->makeDaughters(getNDaug(),getDaugs());
119 EvtParticle *pdaug[MAX_DAUG];
121 for(i=0;i<getNDaug();i++){
122 pdaug[i]=p->getDaug(i);
125 static EvtVector4R p4[MAX_DAUG];
126 static double mass[MAX_DAUG];
130 mass[1] = EvtPDL::getMass(getDaug(1));
132 int Xscode = EvtPDL::getStdHep(getDaug(0));
134 mass[0] = _model->GetMass(Xscode);
136 EvtGenKine::PhaseSpace( getNDaug(), mass, p4, m_b );
138 for(i=0;i<getNDaug();i++){
139 pdaug[i]->init( getDaugs()[i], p4[i] );