BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtBtoXsgammaFlatEnergy Class Reference

#include <EvtBtoXsgammaFlatEnergy.hh>

+ Inheritance diagram for EvtBtoXsgammaFlatEnergy:

Public Member Functions

 EvtBtoXsgammaFlatEnergy ()
 
virtual ~EvtBtoXsgammaFlatEnergy ()
 
void init (int, double *)
 
double GetMass (int code)
 
- Public Member Functions inherited from EvtBtoXsgammaAbsModel
 EvtBtoXsgammaAbsModel ()
 
virtual ~EvtBtoXsgammaAbsModel ()
 
virtual void init (int, double *)
 
virtual double GetMass (int code)=0
 

Detailed Description

Definition at line 27 of file EvtBtoXsgammaFlatEnergy.hh.

Constructor & Destructor Documentation

◆ EvtBtoXsgammaFlatEnergy()

EvtBtoXsgammaFlatEnergy::EvtBtoXsgammaFlatEnergy ( )
inline

Definition at line 31 of file EvtBtoXsgammaFlatEnergy.hh.

31{}

◆ ~EvtBtoXsgammaFlatEnergy()

EvtBtoXsgammaFlatEnergy::~EvtBtoXsgammaFlatEnergy ( )
virtual

Definition at line 30 of file EvtBtoXsgammaFlatEnergy.cc.

30 {
31}

Member Function Documentation

◆ GetMass()

double EvtBtoXsgammaFlatEnergy::GetMass ( int  code)
virtual

Implements EvtBtoXsgammaAbsModel.

Definition at line 64 of file EvtBtoXsgammaFlatEnergy.cc.

64 {
65
66 double eGamma = EvtRandom::Flat(_eRange)+_eMin;
67 double mH = sqrt(pow(_mB0,2)-2.0*_mB0*eGamma);
68 return mH;
69}
static double Flat()
Definition: EvtRandom.cc:73

◆ init()

void EvtBtoXsgammaFlatEnergy::init ( int  nArg,
double *  args 
)
virtual

Reimplemented from EvtBtoXsgammaAbsModel.

Definition at line 33 of file EvtBtoXsgammaFlatEnergy.cc.

33 {
34
35 if ((nArg) > 3 || (nArg > 1 && nArg <3)){
36
37 report(ERROR,"EvtGen") << "EvtBtoXsgamma generator model "
38 << "EvtBtoXsgammaFlatEnergy expected "
39 << "either 1(default config) or two arguments but found: "<<nArg<<endl;
40 report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
41 ::abort();
42 }
43 _mB0=5.2794;
44 double mPi = 0.140;
45 double mK = 0.494;
46 if(nArg == 1){
47 _eMin = 1.7;
48 //Invariant mass of Xsd must be greater the m_pi+m_K leads to
49 //Egamma < (m_B**2-(m_pi+m_k)**2)/(2m_B)
50 _eMax = (pow(_mB0,2)-pow(mPi+mK,2))/(2.0*_mB0);
51 }else{
52 _eMin=args[1];
53 _eMax=args[2];
54 }
55 if (_eMax>(pow(_mB0,2)-pow(mPi+mK,2))/(2.0*_mB0)){
56 report(ERROR,"EvtGen") << "Emax greater than Kinematic limit" << endl;
57 report(ERROR,"EvtGen") << "Reset to the kinematic limit" << endl;
58 report(ERROR,"EvtGen") << "(m_B**2-(m_pi+m_k)**2)/(2m_B)" << endl;
59 _eMax = (pow(_mB0,2)-pow(mPi+mK,2))/(2.0*_mB0);
60 }
61 _eRange=_eMax-_eMin;
62}
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ ERROR
Definition: EvtReport.hh:49
double mPi

The documentation for this class was generated from the following files: