EvtVubHybrid Class Reference

#include <EvtVubHybrid.hh>

Inheritance diagram for EvtVubHybrid:

EvtDecayIncoherent EvtDecayBase List of all members.

Public Member Functions

 EvtVubHybrid ()
virtual ~EvtVubHybrid ()
void getName (std::string &name)
EvtDecayBaseclone ()
void initProbMax ()
void init ()
void decay (EvtParticle *p)
void readWeights (int startArg=0)
double getWeight (double mX, double q2, double El)
void makeDecay (EvtParticle *p)
void setDaughterSpinDensity (int daughter)
int isDaughterSpinDensitySet (int daughter)
virtual std::string commandName ()
virtual void command (std::string cmd)
double getProbMax (double prob)
double resetProbMax (double prob)
virtual bool matchingDecay (const EvtDecayBase &other) const
EvtId getParentId ()
double getBranchingFraction ()
void disableCheckQ ()
void checkQ ()
int getNDaug ()
EvtIdgetDaugs ()
EvtId getDaug (int i)
int getNArg ()
int getPHOTOS ()
void setPHOTOS ()
void setVerbose ()
void setSummary ()
double * getArgs ()
std::stringgetArgsStr ()
double getArg (int j)
std::string getArgStr (int j)
std::string getModelName ()
int getDSum ()
int summary ()
int verbose ()
void saveDecayInfo (EvtId ipar, int ndaug, EvtId *daug, int narg, std::vector< std::string > &args, std::string name, double brfr)
void printSummary ()
void setProbMax (double prbmx)
void noProbMax ()
void checkNArg (int a1, int a2=-1, int a3=-1, int a4=-1)
void checkNDaug (int d1, int d2=-1)
void checkSpinParent (EvtSpinType::spintype sp)
void checkSpinDaughter (int d1, EvtSpinType::spintype sp)
virtual int nRealDaughters ()

Static Public Member Functions

static void findMasses (EvtParticle *p, int ndaugs, EvtId daugs[10], double masses[10])
static void findMass (EvtParticle *p)
static double findMaxMass (EvtParticle *p)

Protected Member Functions

bool daugsDecayedByParentModel ()

Protected Attributes

bool _daugsDecayedByParentModel

Private Types

 nParameters = 3
 nVariables = 3
enum  { nParameters = 3, nVariables = 3 }

Private Member Functions

double findPFermi ()

Private Attributes

bool _noHybrid
bool _storeQplus
double _mb
double _a
double _alphas
double _dGMax
int _nbins_mX
int _nbins_q2
int _nbins_El
int _nbins
double _masscut
double * _bins_mX
double * _bins_q2
double * _bins_El
double * _weights
EvtVubdGamma_dGamma
std::vector< double > _pf

Detailed Description

Definition at line 44 of file EvtVubHybrid.hh.


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
nParameters 
nVariables 

Definition at line 68 of file EvtVubHybrid.hh.

00068 { nParameters = 3, nVariables = 3 };


Constructor & Destructor Documentation

EvtVubHybrid::EvtVubHybrid (  ) 

Definition at line 51 of file EvtVubHybrid.cc.

00052   : _noHybrid(false), _storeQplus(true),
00053     _mb(4.62), _a(2.27), _alphas(0.22), _dGMax(3.),
00054     _nbins_mX(0), _nbins_q2(0), _nbins_El(0), _nbins(0),
00055     _masscut(0.28), _bins_mX(0), _bins_q2(0), _bins_El(0),
00056     _weights(0), _dGamma(0)
00057 {}

EvtVubHybrid::~EvtVubHybrid (  )  [virtual]

Definition at line 59 of file EvtVubHybrid.cc.

References _bins_El, _bins_mX, _bins_q2, _dGamma, and _weights.

00059                             {
00060   delete _dGamma;
00061   delete [] _bins_mX;
00062   delete [] _bins_q2;
00063   delete [] _bins_El;
00064   delete [] _weights;
00065 
00066 }


Member Function Documentation

void EvtDecayBase::checkNArg ( int  a1,
int  a2 = -1,
int  a3 = -1,
int  a4 = -1 
) [inherited]

Definition at line 482 of file EvtDecayBase.cc.

References EvtDecayBase::_modelname, EvtDecayBase::_narg, calibUtil::ERROR, EvtDecayBase::printSummary(), and report().

Referenced by EvtVVSPwave::init(), EvtVVPIPI_WEIGHTED::init(), EvtVVpipi::init(), EvtVVP::init(), EvtVSSMix::init(), EvtVSSBMixCPT::init(), EvtVSS::init(), EvtVSPPwave::init(), EvtVPHOtoVISRHi::init(), EvtVPHOtoVISR::init(), EvtVll::init(), EvtVectorIsr::init(), EvtTVSPwave::init(), EvtTSS::init(), EvtTrackGen::init(), EvtTauVectornu::init(), EvtTauScalarnu::init(), EvtTaulnunu::init(), EvtTauHadnu::init(), EvtTauGamMu::init(), EvtT2GV::init(), EvtSVVNONCPEIGEN::init(), EvtSVVHelAmp::init(), EvtSVVCPLH::init(), EvtSVVCP::init(), EvtSVSNONCPEIGEN::init(), EvtSVSCPLH::init(), EvtSVSCPiso::init(), EvtSVSCP::init(), EvtSVS::init(), EvtSVPHelAmp::init(), EvtSVPCP::init(), EvtSTSCP::init(), EvtSTS::init(), EvtSSSCPT::init(), EvtSSSCPpng::init(), EvtSSSCP::init(), EvtSSDCP::init(), EvtSLN::init(), EvtSll::init(), EvtS2GV::init(), EvtRexc::init(), EvtPythia::init(), EvtPyGaGa::init(), EvtPycont::init(), EvtPi0Dalitz::init(), EvtPhsp::init(), EvtPhokhara_ppbar::init(), EvtPhokhara_pipipi0::init(), EvtPhokhara_pipi::init(), EvtPhokhara_pi0pi0pipi::init(), EvtPhokhara_nnbar::init(), EvtPhokhara_LLB::init(), EvtPhokhara_KK::init(), EvtPhokhara_K0K0::init(), EvtPhokhara_4pi::init(), EvtPhokhara::init(), EvtPhiDalitz::init(), EvtPartWave::init(), EvtP2GC2::init(), EvtP2GC1::init(), EvtP2GC0::init(), EvtOmegaDalitz::init(), EvtmH2::init(), EvtMelikhov::init(), EvtMBody3::init(), EvtMassH2::init(), EvtMassH1::init(), EvtLNuGamma::init(), EvtLambdaP_BarGamma::init(), EvtLambdac2pKpi::init(), EvtKstarstargamma::init(), EvtKstarnunu::init(), EvtJscont::init(), EvtJpipi::init(), EvtJPE::init(), EvtJetSet::init(), EvtISGW2::init(), EvtISGW::init(), EvtHypWK::init(), EvtHQET::init(), EvtHelPPJ::init(), EvtHelAmp::init(), EvtHAngSam3::init(), EvtGoityRoberts::init(), EvtFlatQ2::init(), EvtEtaDalitz::init(), EvtEDM::init(), EvtDMix::init(), EvtDeBD::init(), EvtDDalitz::init(), EvtChi2BB2::init(), EvtChi2BB1::init(), EvtChi1BB2::init(), EvtChi1BB1::init(), EvtChi0BB2::init(), EvtCBTo3piP00::init(), EvtCBTo3piMPP::init(), EvtCalHelAmp::init(), EvtBtoXsll::init(), EvtBtoXsEtap::init(), EvtbTosllBall::init(), EvtbTosllAli::init(), EvtBToKpipiCP::init(), EvtBtoKpiCPiso::init(), EvtBtoKD3P::init(), EvtBTo4piCP::init(), EvtBTo3piCP::init(), EvtBto2piCPiso::init(), EvtBsquark::init(), EvtBody3::init(), EvtBHadronic::init(), EvtAV2GV::init(), and EvtAngH2::init().

00482                                                            {
00483 
00484   if ( _narg != a1 && _narg != a2 && _narg != a3 && _narg != a4 ) {
00485     report(ERROR,"EvtGen") << _modelname.c_str() << " generator expected "<<endl;
00486     report(ERROR,"EvtGen") << a1<<endl;; 
00487     if ( a2>-1) {
00488       report(ERROR,"EvtGen") << " or " << a2<<endl; 
00489     }
00490     if ( a3>-1) {
00491       report(ERROR,"EvtGen") << " or " << a3<<endl; 
00492     }
00493     if ( a4>-1) {
00494       report(ERROR,"EvtGen") << " or " << a4<<endl; 
00495     }
00496     report(ERROR,"EvtGen") << " arguments but found:"<< _narg << endl;
00497     printSummary();
00498     report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
00499     ::abort();
00500 
00501   } 
00502 
00503 }

void EvtDecayBase::checkNDaug ( int  d1,
int  d2 = -1 
) [inherited]

Definition at line 504 of file EvtDecayBase.cc.

References EvtDecayBase::_modelname, EvtDecayBase::_ndaug, calibUtil::ERROR, EvtDecayBase::printSummary(), and report().

Referenced by EvtVVSPwave::init(), EvtVVPIPI_WEIGHTED::init(), EvtVVpipi::init(), EvtVVP::init(), EvtVubNLO::init(), init(), EvtVub::init(), EvtVSSMix::init(), EvtVSSBMixCPT::init(), EvtVSS::init(), EvtVSPPwave::init(), EvtVPHOtoVISRHi::init(), EvtVPHOtoVISR::init(), EvtVll::init(), EvtVectorIsr::init(), EvtTVSPwave::init(), EvtTSS::init(), EvtTauVectornu::init(), EvtTauScalarnu::init(), EvtTaulnunu::init(), EvtTauGamMu::init(), EvtSVVNONCPEIGEN::init(), EvtSVVHelAmp::init(), EvtSVVCPLH::init(), EvtSVVCP::init(), EvtSVSNONCPEIGEN::init(), EvtSVSCPLH::init(), EvtSVSCPiso::init(), EvtSVSCP::init(), EvtSVS::init(), EvtSVPHelAmp::init(), EvtSVPCP::init(), EvtSTSCP::init(), EvtSTS::init(), EvtSSSCPT::init(), EvtSSSCPpng::init(), EvtSSSCP::init(), EvtSSDCP::init(), EvtSPL::init(), EvtSLPole::init(), EvtSLN::init(), EvtSll::init(), EvtSLBKPole::init(), EvtS2GV::init(), EvtPi0Dalitz::init(), EvtPhokhara::init(), EvtPhiDalitz::init(), EvtPBB2::init(), EvtPBB1::init(), EvtPartWave::init(), EvtP2GC2::init(), EvtP2GC1::init(), EvtP2GC0::init(), EvtOmegaDalitz::init(), EvtMelikhov::init(), EvtLNuGamma::init(), EvtLambdaP_BarGamma::init(), EvtKstarstargamma::init(), EvtKstarnunu::init(), EvtKKLambdaC::init(), EvtJTO3P::init(), EvtJpipi::init(), EvtJPE::init(), EvtJ2BB3::init(), EvtJ2BB2::init(), EvtJ2BB1::init(), EvtISGW2::init(), EvtISGW::init(), EvtHypWK::init(), EvtHQET2::init(), EvtHQET::init(), EvtHelPPJ::init(), EvtHelAmp::init(), EvtGoityRoberts::init(), EvtFlatQ2::init(), EvtEtaDalitz::init(), EvtEDM::init(), EvtDeBD::init(), EvtDDalitz::init(), EvtD0mixDalitz::init(), EvtChi2BB2::init(), EvtChi2BB1::init(), EvtChi1BB2::init(), EvtChi1BB1::init(), EvtChi0BB2::init(), EvtChi0BB1::init(), EvtCBTo3piP00::init(), EvtCBTo3piMPP::init(), EvtBtoXsll::init(), EvtbTosllBall::init(), EvtbTosllAli::init(), EvtBToKpipiCP::init(), EvtBtoKpiCPiso::init(), EvtBtoKD3P::init(), EvtBTo4piCP::init(), EvtBTo3piCP::init(), EvtBto2piCPiso::init(), EvtAV2GV::init(), EvtAngSamLab::init(), EvtAngSam3::init(), and EvtAngSam::init().

00504                                            {
00505 
00506   if ( _ndaug != d1 && _ndaug != d2 ) {
00507     report(ERROR,"EvtGen") << _modelname.c_str() << " generator expected ";
00508     report(ERROR,"EvtGen") << d1; 
00509     if ( d2>-1) {
00510       report(ERROR,"EvtGen") << " or " << d2; 
00511     }
00512     report(ERROR,"EvtGen") << " daughters but found:"<< _ndaug << endl;
00513     printSummary();
00514     report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
00515     ::abort();
00516   } 
00517 
00518 }

void EvtDecayBase::checkQ (  )  [inherited]

Definition at line 35 of file EvtDecayBase.cc.

References EvtDecayBase::_daug, EvtDecayBase::_modelname, EvtDecayBase::_ndaug, EvtDecayBase::_parent, EvtCyclic3::c_str(), EvtPDL::chg3(), calibUtil::ERROR, genRecEmupikp::i, EvtPDL::name(), q, and report().

Referenced by EvtDecayBase::saveDecayInfo().

00035                           {
00036   int i;
00037   int q=0;
00038   int qpar;
00039 
00040   //If there are no daughters (jetset etc) then we do not
00041   //want to do this test.  Why?  Because sometimes the parent
00042   //will have a nonzero charge.
00043 
00044   if ( _ndaug != 0) {
00045     for(i=0; i<_ndaug; i++ ) {
00046       q += EvtPDL::chg3(_daug[i]);
00047     }
00048     qpar = EvtPDL::chg3(_parent);
00049 
00050     if ( q != qpar ) {
00051       report(ERROR,"EvtGen") <<_modelname.c_str()<< " generator expected "
00052                              << " charge to be conserved, found:"<<endl;
00053       report(ERROR,"EvtGen") << "Parent charge of "<<(qpar/3)<<endl;
00054       report(ERROR,"EvtGen") << "Sum of daughter charge of "<<(q/3)<<endl;
00055       report(ERROR,"EvtGen") << "The parent is "<< EvtPDL::name(_parent).c_str()<<endl;
00056       for(i=0; i<_ndaug; i++ ) {
00057       report(ERROR,"EvtGen") << "Daughter "<< EvtPDL::name(_daug[i]).c_str()<<endl;
00058       }
00059       report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
00060       
00061       ::abort();
00062     }
00063   }
00064 }

void EvtDecayBase::checkSpinDaughter ( int  d1,
EvtSpinType::spintype  sp 
) [inherited]

Definition at line 533 of file EvtDecayBase.cc.

References EvtDecayBase::_modelname, calibUtil::ERROR, EvtDecayBase::getDaug(), EvtPDL::getSpinType(), EvtDecayBase::printSummary(), and report().

Referenced by EvtVVSPwave::init(), EvtVVPIPI_WEIGHTED::init(), EvtVVpipi::init(), EvtVVP::init(), EvtVSSMix::init(), EvtVSSBMixCPT::init(), EvtVSS::init(), EvtVSPPwave::init(), EvtVPHOtoVISRHi::init(), EvtVPHOtoVISR::init(), EvtVll::init(), EvtVectorIsr::init(), EvtTVSPwave::init(), EvtTSS::init(), EvtTauVectornu::init(), EvtTauScalarnu::init(), EvtTaulnunu::init(), EvtTauHadnu::init(), EvtTauGamMu::init(), EvtSVVNONCPEIGEN::init(), EvtSVVHelAmp::init(), EvtSVVCPLH::init(), EvtSVVCP::init(), EvtSVSNONCPEIGEN::init(), EvtSVSCPLH::init(), EvtSVSCPiso::init(), EvtSVSCP::init(), EvtSVS::init(), EvtSVPHelAmp::init(), EvtSVPCP::init(), EvtSTSCP::init(), EvtSTS::init(), EvtSSSCPpng::init(), EvtSSSCP::init(), EvtSPL::init(), EvtSLPole::init(), EvtSLN::init(), EvtSll::init(), EvtSLBKPole::init(), EvtS2GV::init(), EvtPi0Dalitz::init(), EvtPhiDalitz::init(), EvtPBB2::init(), EvtPBB1::init(), EvtP2GC2::init(), EvtP2GC1::init(), EvtP2GC0::init(), EvtOmegaDalitz::init(), EvtMelikhov::init(), EvtLNuGamma::init(), EvtLambdaP_BarGamma::init(), EvtKstarstargamma::init(), EvtKstarnunu::init(), EvtKKLambdaC::init(), EvtJTO3P::init(), EvtJpipi::init(), EvtJPE::init(), EvtJ2BB3::init(), EvtJ2BB2::init(), EvtJ2BB1::init(), EvtISGW2::init(), EvtISGW::init(), EvtHypWK::init(), EvtHQET2::init(), EvtHQET::init(), EvtHelPPJ::init(), EvtGoityRoberts::init(), EvtFlatQ2::init(), EvtEtaDalitz::init(), EvtEDM::init(), EvtDeBD::init(), EvtDDalitz::init(), EvtD0mixDalitz::init(), EvtChi2BB2::init(), EvtChi2BB1::init(), EvtChi1BB2::init(), EvtChi1BB1::init(), EvtChi0BB2::init(), EvtChi0BB1::init(), EvtCBTo3piP00::init(), EvtCBTo3piMPP::init(), EvtbTosllBall::init(), EvtbTosllAli::init(), EvtBToKpipiCP::init(), EvtBtoKpiCPiso::init(), EvtBtoKD3P::init(), EvtBTo4piCP::init(), EvtBTo3piCP::init(), EvtBto2piCPiso::init(), and EvtAV2GV::init().

00533                                                                    {
00534 
00535   EvtSpinType::spintype parenttype = EvtPDL::getSpinType(getDaug(d1));
00536   if ( parenttype != sp ) {
00537     report(ERROR,"EvtGen") << _modelname.c_str() 
00538                            << " did not get the correct daughter spin d=" 
00539                            << d1 << endl;
00540     printSummary();
00541     report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
00542     ::abort();
00543   } 
00544 
00545 }

void EvtDecayBase::checkSpinParent ( EvtSpinType::spintype  sp  )  [inherited]

Definition at line 520 of file EvtDecayBase.cc.

References EvtDecayBase::_modelname, calibUtil::ERROR, EvtDecayBase::getParentId(), EvtPDL::getSpinType(), EvtDecayBase::printSummary(), and report().

Referenced by EvtVVSPwave::init(), EvtVVPIPI_WEIGHTED::init(), EvtVVpipi::init(), EvtVVP::init(), EvtVSSMix::init(), EvtVSSBMixCPT::init(), EvtVSS::init(), EvtVSPPwave::init(), EvtVPHOtoVISRHi::init(), EvtVPHOtoVISR::init(), EvtVll::init(), EvtVectorIsr::init(), EvtTVSPwave::init(), EvtTSS::init(), EvtTauVectornu::init(), EvtTauScalarnu::init(), EvtTaulnunu::init(), EvtTauHadnu::init(), EvtTauGamMu::init(), EvtSVVHelAmp::init(), EvtSVVCPLH::init(), EvtSVVCP::init(), EvtSVSCPLH::init(), EvtSVSCPiso::init(), EvtSVSCP::init(), EvtSVS::init(), EvtSVPHelAmp::init(), EvtSVPCP::init(), EvtSTSCP::init(), EvtSTS::init(), EvtSSSCPpng::init(), EvtSSSCP::init(), EvtSPL::init(), EvtSLPole::init(), EvtSLN::init(), EvtSll::init(), EvtSLBKPole::init(), EvtS2GV::init(), EvtPi0Dalitz::init(), EvtPhiDalitz::init(), EvtPBB2::init(), EvtPBB1::init(), EvtP2GC2::init(), EvtP2GC1::init(), EvtP2GC0::init(), EvtOmegaDalitz::init(), EvtMelikhov::init(), EvtLNuGamma::init(), EvtLambdaP_BarGamma::init(), EvtKstarstargamma::init(), EvtKstarnunu::init(), EvtKKLambdaC::init(), EvtJTO3P::init(), EvtJpipi::init(), EvtJPE::init(), EvtJ2BB3::init(), EvtJ2BB2::init(), EvtJ2BB1::init(), EvtISGW2::init(), EvtISGW::init(), EvtHypWK::init(), EvtHQET2::init(), EvtHQET::init(), EvtHelPPJ::init(), EvtGoityRoberts::init(), EvtFlatQ2::init(), EvtEtaDalitz::init(), EvtEDM::init(), EvtDeBD::init(), EvtDDalitz::init(), EvtD0mixDalitz::init(), EvtChi2BB2::init(), EvtChi2BB1::init(), EvtChi1BB2::init(), EvtChi1BB1::init(), EvtChi0BB2::init(), EvtChi0BB1::init(), EvtCBTo3piP00::init(), EvtCBTo3piMPP::init(), EvtbTosllBall::init(), EvtbTosllAli::init(), EvtBToKpipiCP::init(), EvtBtoKpiCPiso::init(), EvtBtoKD3P::init(), EvtBTo4piCP::init(), EvtBTo3piCP::init(), EvtBto2piCPiso::init(), and EvtAV2GV::init().

00520                                                          {
00521 
00522   EvtSpinType::spintype parenttype = EvtPDL::getSpinType(getParentId());
00523   if ( parenttype != sp ) {
00524     report(ERROR,"EvtGen") << _modelname.c_str() 
00525                            << " did not get the correct parent spin\n";
00526     printSummary();
00527     report(ERROR,"EvtGen") << "Will terminate execution!"<<endl;
00528     ::abort();
00529   } 
00530 
00531 }

EvtDecayBase * EvtVubHybrid::clone (  )  [virtual]

Implements EvtDecayBase.

Definition at line 74 of file EvtVubHybrid.cc.

00074                                  {
00075 
00076   return new EvtVubHybrid;
00077 
00078 }

void EvtDecayBase::command ( std::string  cmd  )  [virtual, inherited]

Reimplemented in EvtJetSet, EvtLunda, EvtLundCharm, EvtOpenCharm, EvtPhokhara, EvtPhokhara_4pi, EvtPhokhara_K0K0, EvtPhokhara_KK, EvtPhokhara_LLB, EvtPhokhara_nnbar, EvtPhokhara_pi0pi0pipi, EvtPhokhara_pipi, EvtPhokhara_pipipi0, EvtPhokhara_ppbar, EvtPythia, and EvtTauola.

Definition at line 132 of file EvtDecayBase.cc.

References calibUtil::ERROR, and report().

Referenced by EvtModel::storeCommand().

00132                                        {
00133   report(ERROR,"EvtGen") << "Should never call EvtDecayBase::command"<<endl;
00134   ::abort();
00135 }

std::string EvtDecayBase::commandName (  )  [virtual, inherited]

Reimplemented in EvtJetSet, EvtLunda, EvtLundCharm, EvtOpenCharm, EvtPhokhara, EvtPhokhara_4pi, EvtPhokhara_K0K0, EvtPhokhara_KK, EvtPhokhara_LLB, EvtPhokhara_nnbar, EvtPhokhara_pi0pi0pipi, EvtPhokhara_pipi, EvtPhokhara_pipipi0, EvtPhokhara_ppbar, EvtPythia, and EvtTauola.

Definition at line 129 of file EvtDecayBase.cc.

References deljobs::string.

Referenced by EvtModel::Register().

00129                                    {
00130   return std::string("");
00131 }

bool EvtDecayBase::daugsDecayedByParentModel (  )  [inline, protected, inherited]

Definition at line 110 of file EvtDecayBase.hh.

References EvtDecayBase::_daugsDecayedByParentModel.

Referenced by EvtDecayProb::makeDecay(), EvtDecayIncoherent::makeDecay(), and EvtDecayAmp::makeDecay().

void EvtVubHybrid::decay ( EvtParticle p  )  [virtual]

Implements EvtDecayBase.

Definition at line 187 of file EvtVubHybrid.cc.

References _alphas, _dGamma, _dGMax, _masscut, _mb, _nbins, _noHybrid, _storeQplus, cos(), findPFermi(), EvtRandom::Flat(), EvtDecayBase::getDaug(), EvtParticle::getDaug(), EvtDecayBase::getDaugs(), EvtVubdGamma::getdGdxdzdp(), EvtDecayBase::getNDaug(), getWeight(), EvtParticle::init(), EvtParticle::initializePhaseSpace(), ganga-rec::j, M_PI, EvtParticle::mass(), report(), EvtVector4R::set(), EvtParticle::setLifetime(), sin(), w, Bes_Common::WARNING, x, and xlow.

00187                                         {
00188 
00189   int j;
00190   // B+ -> u-bar specflav l+ nu
00191   
00192   EvtParticle *xuhad, *lepton, *neutrino;
00193   EvtVector4R p4;
00194   // R. Faccini 21/02/03
00195   // move the reweighting up , before also shooting the fermi distribution
00196   double x,z,p2;
00197   double sh=0.0;
00198   double mB,ml,xlow,xhigh,qplus;
00199   double El=0.0;
00200   double Eh=0.0;
00201   double kplus;
00202   double q2, mX;
00203 
00204   const double lp2epsilon=-10;
00205   bool rew(true);
00206   while(rew){
00207     
00208     p->initializePhaseSpace(getNDaug(),getDaugs());
00209     
00210     xuhad=p->getDaug(0);
00211     lepton=p->getDaug(1);
00212     neutrino=p->getDaug(2);
00213     
00214     mB = p->mass();
00215     ml = lepton->mass();
00216     
00217     xlow = -_mb;
00218     xhigh = mB-_mb;    
00219     
00220     // Fermi motion does not need to be computed inside the
00221     // tryit loop as m_b in Gamma0 does not need to be replaced by (m_b+kplus).
00222     // The difference however should be of the Order (lambda/m_b)^2 which is
00223     // beyond the considered orders in the paper anyway ...
00224     
00225     // for alpha_S = 0 and a mass cut on X_u not all values of kplus are 
00226     // possible. The maximum value is mB/2-_mb + sqrt(mB^2/4-_masscut^2)
00227     kplus = 2*xhigh;
00228     
00229     while( kplus >= xhigh || kplus <= xlow 
00230            || (_alphas == 0 && kplus >= mB/2-_mb 
00231                + sqrt(mB*mB/4-_masscut*_masscut))) {
00232       kplus = findPFermi(); //_pFermi->shoot();
00233       kplus = xlow + kplus*(xhigh-xlow);
00234     }
00235     qplus = mB-_mb-kplus;
00236     if( (mB-qplus)/2.<=ml) continue;
00237    
00238     int tryit = 1;
00239     while (tryit) {
00240       
00241       x = EvtRandom::Flat();
00242       z = EvtRandom::Flat(0,2);
00243       p2=EvtRandom::Flat();
00244       p2 = pow(10,lp2epsilon*p2);
00245       
00246       El = x*(mB-qplus)/2;
00247       if ( El > ml && El < mB/2) {
00248         
00249         Eh = z*(mB-qplus)/2+qplus;
00250         if ( Eh > 0 && Eh < mB ) {
00251           
00252           sh = p2*pow(mB-qplus,2)+2*qplus*(Eh-qplus)+qplus*qplus;
00253           if ( sh > _masscut*_masscut
00254                && mB*mB + sh - 2*mB*Eh > ml*ml) {
00255             
00256             double xran = EvtRandom::Flat();
00257             
00258             double y = _dGamma->getdGdxdzdp(x,z,p2)/_dGMax*p2;
00259             
00260             if ( y > 1 ) report(WARNING,"EvtVubHybrid")
00261               <<"EvtVubHybrid decay probability > 1 found: " << y << endl;
00262             if ( y >= xran ) tryit = 0;
00263           }
00264         }
00265       }
00266     }
00267 
00268     // compute all kinematic variables needed for reweighting (J. Dingfelder)
00269     mX = sqrt(sh);
00270     q2 = mB*mB + sh - 2*mB*Eh;
00271 
00272     // Reweighting in bins of mX, q2, El (J. Dingfelder)
00273     if (_nbins>0) {
00274       double xran1 = EvtRandom::Flat();
00275       double w = 1.0;
00276       if (!_noHybrid) w = getWeight(mX, q2, El); 
00277       if ( w >= xran1 ) rew = false;
00278     } 
00279     else {
00280       rew = false;
00281     }
00282   }
00283 
00284   // o.k. we have the three kineamtic variables 
00285   // now calculate a flat cos Theta_H [-1,1] distribution of the 
00286   // hadron flight direction w.r.t the B flight direction 
00287   // because the B is a scalar and should decay isotropic.
00288   // Then chose a flat Phi_H [0,2Pi] w.r.t the B flight direction 
00289   // and and a flat Phi_L [0,2Pi] in the W restframe w.r.t the 
00290   // W flight direction.
00291 
00292   double ctH = EvtRandom::Flat(-1,1);
00293   double phH = EvtRandom::Flat(0,2*M_PI);
00294   double phL = EvtRandom::Flat(0,2*M_PI);
00295 
00296   // now compute the four vectors in the B Meson restframe
00297     
00298   double ptmp,sttmp;
00299   // calculate the hadron 4 vector in the B Meson restframe
00300 
00301   sttmp = sqrt(1-ctH*ctH);
00302   ptmp = sqrt(Eh*Eh-sh);
00303   double pHB[4] = {Eh,ptmp*sttmp*cos(phH),ptmp*sttmp*sin(phH),ptmp*ctH};
00304   p4.set(pHB[0],pHB[1],pHB[2],pHB[3]);
00305   xuhad->init( getDaug(0), p4);
00306 
00307   if (_storeQplus ) {
00308     // cludge to store the hidden parameter q+ with the decay; 
00309     // the lifetime of the Xu is abused for this purpose.
00310     // tau = 1 ps corresponds to ctau = 0.3 mm -> in order to
00311     // stay well below BaBars sensitivity we take q+/(10000 GeV) which 
00312     // goes up to 0.0005 in the most extreme cases as ctau in mm.
00313     // To extract q+ back from the StdHepTrk its necessary to get
00314     // delta_ctau = Xu->anyDaughter->getVertexTime()-Xu->getVertexTime()
00315     // where these pseudo calls refere to the StdHep time stored at
00316     // the production vertex in the lab for each particle. The boost 
00317     // has to be reversed and the result is:
00318     //
00319     // q+ = delta_ctau * 10000 GeV/mm * Mass_Xu/Energy_Xu     
00320     //
00321     xuhad->setLifetime(qplus/10000.);
00322   }
00323 
00324   // calculate the W 4 vector in the B Meson restrframe
00325 
00326   double apWB = ptmp;
00327   double pWB[4] = {mB-Eh,-pHB[1],-pHB[2],-pHB[3]};
00328 
00329   // first go in the W restframe and calculate the lepton and
00330   // the neutrino in the W frame
00331 
00332   double mW2   = mB*mB + sh - 2*mB*Eh;
00333   double beta  = ptmp/pWB[0];
00334   double gamma = pWB[0]/sqrt(mW2);
00335 
00336   double pLW[4];
00337     
00338   ptmp = (mW2-ml*ml)/2/sqrt(mW2);
00339   pLW[0] = sqrt(ml*ml + ptmp*ptmp);
00340 
00341   double ctL = (El - gamma*pLW[0])/beta/gamma/ptmp;
00342   if ( ctL < -1 ) ctL = -1;
00343   if ( ctL >  1 ) ctL =  1;
00344   sttmp = sqrt(1-ctL*ctL);
00345 
00346   // eX' = eZ x eW
00347   double xW[3] = {-pWB[2],pWB[1],0};
00348   // eZ' = eW
00349   double zW[3] = {pWB[1]/apWB,pWB[2]/apWB,pWB[3]/apWB};
00350   
00351   double lx = sqrt(xW[0]*xW[0]+xW[1]*xW[1]);
00352   for (j=0;j<2;j++) 
00353     xW[j] /= lx;
00354 
00355   // eY' = eZ' x eX'
00356   double yW[3] = {-pWB[1]*pWB[3],-pWB[2]*pWB[3],pWB[1]*pWB[1]+pWB[2]*pWB[2]};
00357   double ly = sqrt(yW[0]*yW[0]+yW[1]*yW[1]+yW[2]*yW[2]);
00358   for (j=0;j<3;j++) 
00359     yW[j] /= ly;
00360 
00361   // p_lep = |p_lep| * (  sin(Theta) * cos(Phi) * eX'
00362   //                    + sin(Theta) * sin(Phi) * eY'
00363   //                    + cos(Theta) *            eZ')
00364   for (j=0;j<3;j++)
00365     pLW[j+1] = sttmp*cos(phL)*ptmp*xW[j] 
00366       +        sttmp*sin(phL)*ptmp*yW[j]
00367       +          ctL         *ptmp*zW[j];
00368 
00369   double apLW = ptmp;
00370   // calculate the neutrino 4 vector in the W restframe
00371   //double pNW[4] = {sqrt(mW2)-pLW[0],-pLW[1],-pLW[2],-pLW[3]};
00372     
00373   // boost them back in the B Meson restframe
00374   
00375   double appLB = beta*gamma*pLW[0] + gamma*ctL*apLW;
00376  
00377   ptmp = sqrt(El*El-ml*ml);
00378   double ctLL = appLB/ptmp;
00379 
00380   if ( ctLL >  1 ) ctLL =  1;
00381   if ( ctLL < -1 ) ctLL = -1;
00382     
00383   double pLB[4] = {El,0,0,0};
00384   double pNB[4] = {pWB[0]-El,0,0,0};
00385 
00386   for (j=1;j<4;j++) {
00387     pLB[j] = pLW[j] + (ctLL*ptmp - ctL*apLW)/apWB*pWB[j];
00388     pNB[j] = pWB[j] - pLB[j];
00389   }
00390 
00391   p4.set(pLB[0],pLB[1],pLB[2],pLB[3]);
00392   lepton->init( getDaug(1), p4);
00393 
00394   p4.set(pNB[0],pNB[1],pNB[2],pNB[3]);
00395   neutrino->init( getDaug(2), p4);
00396 
00397   return ;
00398 }

void EvtDecayBase::disableCheckQ (  )  [inline, inherited]

Definition at line 62 of file EvtDecayBase.hh.

References EvtDecayBase::_chkCharge.

Referenced by EvtSinglePoint::init(), EvtSingleParticle2::init(), and EvtSingleParticle::init().

00062 {_chkCharge=0;};

void EvtDecayBase::findMass ( EvtParticle p  )  [static, inherited]

Definition at line 346 of file EvtDecayBase.cc.

References EvtCyclic3::c_str(), count, EvtDecayBase::findMaxMass(), EvtParticle::getDaug(), EvtParticle::getId(), EvtPDL::getMass(), EvtPDL::getMaxMass(), EvtPDL::getMinMass(), EvtParticle::getNDaug(), EvtParticle::getParent(), genRecEmupikp::i, Bes_Common::INFO, EvtParticle::mass(), mass, EvtPDL::name(), EvtParticle::printTree(), report(), and EvtParticle::setMass().

00346                                           {
00347 
00348   //Need to also check that this mass does not screw
00349   //up the parent
00350   //This code assumes that for the ith daughter, 0..i-1
00351   //already have a mass
00352   double maxOkMass=findMaxMass(p);
00353 
00354   int count=0;
00355   double mass;
00356   bool massOk=false;
00357   int i;
00358   while (!massOk) { 
00359     count++;
00360     if ( count > 10000 ) {
00361       report(INFO,"EvtGen") << "Can not find a valid mass for: " << EvtPDL::name(p->getId()).c_str() <<endl;
00362       report(INFO,"EvtGen") << "Now printing parent and/or grandparent tree\n";
00363       if ( p->getParent() ) {
00364         if ( p->getParent()->getParent() ) {
00365           p->getParent()->getParent()->printTree();
00366           report(INFO,"EvtGen") << p->getParent()->getParent()->mass() <<endl;
00367           report(INFO,"EvtGen") << p->getParent()->mass() <<endl;
00368         }
00369         else{
00370           p->getParent()->printTree();
00371           report(INFO,"EvtGen") << p->getParent()->mass() <<endl;
00372         }
00373       }
00374       else  p->printTree();
00375       report(INFO,"EvtGen") << "maxokmass=" << maxOkMass << " " << EvtPDL::getMinMass(p->getId()) << " " << EvtPDL::getMaxMass(p->getId())<<endl;
00376       if ( p->getNDaug() ) { 
00377         for (i=0; i<p->getNDaug(); i++) {
00378           report(INFO,"EvtGen") << p->getDaug(i)->mass()<<" ";
00379         }
00380         report(INFO,"EvtGen") << endl;
00381       }
00382       if ( maxOkMass >= EvtPDL::getMinMass(p->getId()) ) {
00383         report(INFO,"EvtGen") << "taking a default value\n";
00384         p->setMass(maxOkMass);
00385         return;
00386       } 
00387       assert(0);
00388     }
00389     mass = EvtPDL::getMass(p->getId());
00390     //Just need to check that this mass is > than
00391     //the mass of all daughters
00392     double massSum=0.;
00393     if ( p->getNDaug() ) { 
00394       for (i=0; i<p->getNDaug(); i++) {
00395         massSum+= p->getDaug(i)->mass();
00396       }
00397     }
00398     //some special cases are handled with 0 (stable) or 1 (k0->ks/kl) daughters
00399     if (p->getNDaug()<2)  massOk=true;
00400     if ( p->getParent() ) {
00401       if ( p->getParent()->getNDaug()==1 ) massOk=true;
00402     }
00403     if ( !massOk ) { 
00404       if (massSum < mass) massOk=true;
00405       if ( mass> maxOkMass) massOk=false;
00406     }
00407   }
00408 
00409   p->setMass(mass);
00410   
00411 }

void EvtDecayBase::findMasses ( EvtParticle p,
int  ndaugs,
EvtId  daugs[10],
double  masses[10] 
) [static, inherited]

Definition at line 414 of file EvtDecayBase.cc.

References EvtCyclic3::c_str(), count, calibUtil::ERROR, EvtParticle::firstornot(), EvtParticle::getDaug(), EvtParticle::getId(), EvtPDL::getMass(), EvtPDL::getMinMass(), genRecEmupikp::i, EvtParticle::mass(), EvtPDL::name(), report(), EvtParticle::setFirstOrNot(), and EvtStatus::setRejectFlag().

Referenced by EvtBtoXsll::decay().

00415                                                                      {
00416 
00417   int i;
00418   double mass_sum;
00419 
00420   int count=0;
00421 
00422   if (!( p->firstornot() )) {
00423     for (i = 0; i < ndaugs; i++ ) {
00424       masses[i] = p->getDaug(i)->mass();
00425     } //for
00426   } //if
00427   else {
00428     p->setFirstOrNot();
00429     // if only one daughter do it
00430 
00431     if (ndaugs==1) {
00432       masses[0]=p->mass();
00433       return;
00434     }
00435     
00436     //until we get a combo whose masses are less than _parent mass.
00437     do {
00438       mass_sum = 0.0;
00439 
00440       for (i = 0; i < ndaugs; i++ ) {
00441         masses[i] = EvtPDL::getMass(daugs[i]);
00442         mass_sum = mass_sum + masses[i];
00443       } 
00444 
00445       count++;
00446 
00447      
00448       if(count==10000) {
00449         report(ERROR,"EvtGen") <<"Decaying particle:"<<
00450           EvtPDL::name(p->getId()).c_str()<<" (m="<<p->mass()<<")"<<endl;
00451         report(ERROR,"EvtGen") <<"To the following daugthers"<<endl;
00452         for (i = 0; i < ndaugs; i++ ) {
00453           report(ERROR,"EvtGen") <<  
00454             EvtPDL::name(daugs[i]).c_str() << endl;
00455         } 
00456         report(ERROR,"EvtGen") << "Has been rejected "<<count
00457                                << " times, will now take minimal masses "
00458                                << " of daugthers"<<endl;
00459         
00460         mass_sum=0.;
00461         for (i = 0; i < ndaugs; i++ ) {
00462           masses[i] = EvtPDL::getMinMass(daugs[i]);
00463           mass_sum = mass_sum + masses[i];
00464         } 
00465         if (mass_sum > p->mass()){
00466           report(ERROR,"EvtGen") << "Parent mass="<<p->mass()
00467                                  << "to light for daugthers."<<endl
00468                                  << "Will throw the event away."<<endl;
00469           //dont terminate - start over on the event.
00470           EvtStatus::setRejectFlag();
00471           mass_sum=0.;
00472           //      ::abort();
00473         }
00474 
00475       }
00476     } while ( mass_sum > p->mass());
00477   } //else
00478   
00479   return;
00480 }       

double EvtDecayBase::findMaxMass ( EvtParticle p  )  [static, inherited]

Definition at line 311 of file EvtDecayBase.cc.

References EvtParticle::getDaug(), EvtParticle::getId(), EvtPDL::getMaxMass(), EvtPDL::getMinMass(), EvtParticle::getNDaug(), EvtParticle::getParent(), EvtParticle::hasValidP4(), genRecEmupikp::i, and EvtParticle::mass().

Referenced by EvtDecayBase::findMass().

00311                                                {
00312 
00313   
00314   double maxOkMass=EvtPDL::getMaxMass(p->getId());
00315 
00316   //protect against vphotons
00317   if ( maxOkMass < 0.0000000001 ) return 10000000.;
00318   //and against already determined masses
00319   if ( p->hasValidP4() ) maxOkMass=p->mass();
00320 
00321   EvtParticle *par=p->getParent();
00322   if ( par ) {
00323     double maxParMass=findMaxMass(par);
00324     int i;
00325     double minDaugMass=0.;
00326     for(i=0;i<par->getNDaug();i++){
00327       EvtParticle *dau=par->getDaug(i);
00328       if ( dau!=p) {
00329         // it might already have a mass
00330         if ( dau->isInitialized() || dau->hasValidP4() )
00331           minDaugMass+=dau->mass();
00332         else
00333         //give it a bit of phase space 
00334           minDaugMass+=1.000001*EvtPDL::getMinMass(dau->getId());
00335       }
00336     }
00337     if ( maxOkMass>(maxParMass-minDaugMass)) maxOkMass=maxParMass-minDaugMass;
00338   }
00339   return maxOkMass;
00340 }

double EvtVubHybrid::findPFermi (  )  [private]

Definition at line 401 of file EvtVubHybrid.cc.

References _pf, and EvtRandom::Flat().

Referenced by decay().

00401                                 {
00402 
00403   double ranNum=EvtRandom::Flat();
00404   double oOverBins= 1.0/(float(_pf.size()));
00405   int nBinsBelow = 0;     // largest k such that I[k] is known to be <= rand
00406   int nBinsAbove = _pf.size();  // largest k such that I[k] is known to be >  rand
00407   int middle;
00408   
00409   while (nBinsAbove > nBinsBelow+1) {
00410     middle = (nBinsAbove + nBinsBelow+1)>>1;
00411     if (ranNum >= _pf[middle]) {
00412       nBinsBelow = middle;
00413     } else {
00414       nBinsAbove = middle;
00415     }
00416   } 
00417 
00418   double bSize = _pf[nBinsAbove] - _pf[nBinsBelow];
00419   // binMeasure is always aProbFunc[nBinsBelow], 
00420   
00421   if ( bSize == 0 ) { 
00422     // rand lies right in a bin of measure 0.  Simply return the center
00423     // of the range of that bin.  (Any value between k/N and (k+1)/N is 
00424     // equally good, in this rare case.)
00425     return (nBinsBelow + .5) * oOverBins;
00426   }
00427   
00428   HepDouble bFract = (ranNum - _pf[nBinsBelow]) / bSize;
00429   
00430   return (nBinsBelow + bFract) * oOverBins;
00431 
00432 } 

double EvtDecayBase::getArg ( int  j  )  [inherited]

Definition at line 564 of file EvtDecayBase.cc.

References EvtDecayBase::_args, EvtCyclic3::c_str(), genRecEmupikp::i, Bes_Common::INFO, and report().

Referenced by EvtVVSPwave::decay(), EvtVSSMix::decay(), EvtVPHOtoVISRHi::decay(), EvtVPHOtoVISR::decay(), EvtTVSPwave::decay(), EvtTauGamMu::decay(), EvtSVVNONCPEIGEN::decay(), EvtSVVHelAmp::decay(), EvtSVVCPLH::decay(), EvtSVVCP::decay(), EvtSVSCPiso::decay(), EvtSVSCP::decay(), EvtSVPHelAmp::decay(), EvtSVPCP::decay(), EvtSTSCP::decay(), EvtSSSCPT::decay(), EvtSSSCPpng::decay(), EvtSSSCP::decay(), EvtRhoPi::decay(), EvtPhokhara::decay(), EvtPBB2::decay(), EvtPBB1::decay(), EvtOpenCharm::decay(), EvtLunda::decay(), EvtJscont::decay(), EvtJ2BB3::decay(), EvtJ2BB2::decay(), EvtJ2BB1::decay(), EvtEDM::decay(), EvtDDalitz::decay(), EvtConExc::decay(), EvtChi2BB2::decay(), EvtChi2BB1::decay(), EvtChi1BB2::decay(), EvtChi1BB1::decay(), EvtChi0BB2::decay(), EvtCBTo3piP00::decay(), EvtCBTo3piMPP::decay(), EvtCalHelAmp::decay(), EvtBtoXsgamma::decay(), EvtBToKpipiCP::decay(), EvtBtoKpiCPiso::decay(), EvtBTo4piCP::decay(), EvtBTo3piCP::decay(), EvtBto2piCPiso::decay(), EvtBsquark::decay(), EvtBHadronic::decay(), EvtAngSamX::decay(), EvtAngSamLab::decay(), EvtAngSam3::decay(), EvtAngSam::decay(), EvtCalHelAmp::firstder(), EvtLNuGamma::getFormFactor(), EvtVubNLO::init(), init(), EvtVub::init(), EvtVSSBMixCPT::init(), EvtVectorIsr::init(), EvtTrackGen::init(), EvtTauHadnu::init(), EvtSVVNONCPEIGEN::init(), EvtSVSNONCPEIGEN::init(), EvtSVSCPLH::init(), EvtSSDCP::init(), EvtSinglePoint::init(), EvtSingleParticle2::init(), EvtSingleParticle::init(), EvtPycont::init(), EvtPartWave::init(), EvtmPhsp::init(), EvtmH2::init(), EvtMelikhov::init(), EvtLNuGamma::init(), EvtHypNonLepton::init(), EvtHQET2::init(), EvtHQET::init(), EvtHelAmp::init(), EvtDMix::init(), EvtD0mixDalitz::init(), EvtConExc::init(), EvtBtoXsll::init(), EvtBtoKD3P::init(), EvtPhokhara::init_evt(), EvtPhokhara::init_mode(), EvtSVVHelAmp::initProbMax(), EvtSVVCPLH::initProbMax(), EvtSVVCP::initProbMax(), EvtSVSCPLH::initProbMax(), EvtSVSCPiso::initProbMax(), EvtSVSCP::initProbMax(), EvtSVPHelAmp::initProbMax(), EvtSVPCP::initProbMax(), EvtSTSCP::initProbMax(), EvtSSSCPpng::initProbMax(), EvtSSSCP::initProbMax(), EvtPBB2::initProbMax(), EvtBtoKpiCPiso::initProbMax(), EvtBto2piCPiso::initProbMax(), and readWeights().

00564                                  {
00565 
00566   // Verify string
00567 
00568   const char* str = _args[j].c_str();
00569   int i = 0;
00570   while(str[i]!=0){
00571     if (isalpha(str[i]) && str[i]!='e') {
00572 
00573       report(INFO,"EvtGen") << "String " << str << " is not a number" << endl;
00574       assert(0);
00575     }
00576     i++;
00577   }
00578   
00579   char** tc=0; 
00580   return strtod(_args[j].c_str(),tc);
00581 }

double * EvtDecayBase::getArgs (  )  [inherited]

Definition at line 547 of file EvtDecayBase.cc.

References EvtDecayBase::_args, EvtDecayBase::_argsD, EvtDecayBase::_narg, EvtCyclic3::c_str(), and genRecEmupikp::i.

Referenced by EvtBtoXsgamma::decay(), EvtSLPole::init(), EvtSLBKPole::init(), and EvtKKLambdaC::init().

00547                               {
00548 
00549   if ( _argsD ) return _argsD;
00550   //The user has asked for a list of doubles - the arguments 
00551   //better all be doubles...
00552   if ( _narg==0 ) return _argsD;
00553 
00554   _argsD = new double[_narg];
00555 
00556   int i;
00557   char * tc;
00558   for(i=0;i<_narg;i++) { 
00559     _argsD[i] =  strtod(_args[i].c_str(),&tc);
00560   }
00561   return _argsD;
00562 }

std::string* EvtDecayBase::getArgsStr (  )  [inline, inherited]

Definition at line 73 of file EvtDecayBase.hh.

References EvtDecayBase::_args.

00073 {return _args;}

std::string EvtDecayBase::getArgStr ( int  j  )  [inline, inherited]

Definition at line 75 of file EvtDecayBase.hh.

References EvtDecayBase::_args.

Referenced by EvtParticleDecay::chargeConj(), EvtParticleDecayList::EvtParticleDecayList(), EvtDecayTable::findChannel(), EvtMultibody::init(), and EvtIntervalDecayAmp< EvtDalitzPoint >::init().

00075 {return _args[j];}

double EvtDecayBase::getBranchingFraction (  )  [inline, inherited]

Definition at line 61 of file EvtDecayBase.hh.

References EvtDecayBase::_brfr.

Referenced by EvtParticleDecay::chargeConj(), and EvtParticleDecayList::EvtParticleDecayList().

00061 {return _brfr;}

EvtId EvtDecayBase::getDaug ( int  i  )  [inline, inherited]

Definition at line 66 of file EvtDecayBase.hh.

References EvtDecayBase::_daug.

Referenced by EvtParticleDecayList::addMode(), EvtParticleDecay::chargeConj(), EvtDecayBase::checkSpinDaughter(), EvtVubNLO::decay(), decay(), EvtVub::decay(), EvtVSSBMixCPT::decay(), EvtVPHOtoVISRHi::decay(), EvtVPHOtoVISR::decay(), EvtVectorIsr::decay(), EvtTauHadnu::decay(), EvtSVVNONCPEIGEN::decay(), EvtSVVHelAmp::decay(), EvtSVVCPLH::decay(), EvtSVVCP::decay(), EvtSVSNONCPEIGEN::decay(), EvtSVSCPiso::decay(), EvtSSDCP::decay(), EvtSLN::decay(), EvtSinglePoint::decay(), EvtSingleParticle2::decay(), EvtSingleParticle::decay(), EvtKstarnunu::decay(), EvtJ2BB3::decay(), EvtJ2BB1::decay(), EvtGoityRoberts::decay(), EvtCBTo3piP00::decay(), EvtCBTo3piMPP::decay(), EvtBtoXsll::decay(), EvtBtoXsgamma::decay(), EvtBtoXsEtap::decay(), EvtBToKpipiCP::decay(), EvtBtoKpiCPiso::decay(), EvtBtoKD3P::decay(), EvtBTo3piCP::decay(), EvtPto3P::dp(), EvtDecayTable::findChannel(), EvtConExc::gamHXSection(), EvtVVPIPI_WEIGHTED::init(), EvtVVpipi::init(), EvtVSSBMixCPT::init(), EvtTrackGen::init(), EvtTauHadnu::init(), EvtSSDCP::init(), EvtSLPole::init(), EvtSLBKPole::init(), EvtS2GV::init(), EvtPartWave::init(), EvtP2GC2::init(), EvtP2GC1::init(), EvtP2GC0::init(), EvtJpipi::init(), EvtJPE::init(), EvtISGW2::init(), EvtISGW::init(), EvtHypNonLepton::init(), EvtHQET2::init(), EvtHQET::init(), EvtHelAmp::init(), EvtDDalitz::init(), EvtD0mixDalitz::init(), EvtBtoXsll::init(), EvtbTosllBall::init(), EvtbTosllAli::init(), EvtAV2GV::init(), EvtSVSCPiso::initProbMax(), EvtSSDCP::initProbMax(), EvtSLPole::initProbMax(), EvtSLN::initProbMax(), EvtSLBKPole::initProbMax(), EvtKKLambdaC::initProbMax(), EvtISGW2::initProbMax(), EvtHypNonLepton::initProbMax(), EvtHQET2::initProbMax(), EvtHQET::initProbMax(), EvtbTosllBall::initProbMax(), EvtbTosllAli::initProbMax(), EvtBtoKpiCPiso::initProbMax(), EvtTauHadnu::pi3G(), and EvtParticleDecayList::removeMode().

00066 {return _daug[i];}

EvtId* EvtDecayBase::getDaugs (  )  [inline, inherited]

Definition at line 65 of file EvtDecayBase.hh.

References EvtDecayBase::_daug.

Referenced by EvtVVSPwave::decay(), EvtVVPIPI_WEIGHTED::decay(), EvtVVpipi::decay(), EvtVVP::decay(), EvtVubNLO::decay(), decay(), EvtVub::decay(), EvtVSSMix::decay(), EvtVSSBMixCPT::decay(), EvtVSS::decay(), EvtVSPPwave::decay(), EvtVll::decay(), EvtVectorIsr::decay(), EvtTVSPwave::decay(), EvtTSS::decay(), EvtTrackGen::decay(), EvtTauVectornu::decay(), EvtTauScalarnu::decay(), EvtTaulnunu::decay(), EvtTauHadnu::decay(), EvtTauGamMu::decay(), EvtT2GV::decay(), EvtSVSCPLH::decay(), EvtSVSCP::decay(), EvtSVS::decay(), EvtSVPHelAmp::decay(), EvtSVPCP::decay(), EvtSTSCP::decay(), EvtSTS::decay(), EvtSSSCPT::decay(), EvtSSSCPpng::decay(), EvtSSSCP::decay(), EvtSPL::decay(), EvtSLPole::decay(), EvtSLN::decay(), EvtSll::decay(), EvtSLBKPole::decay(), EvtSinglePoint::decay(), EvtSingleParticle2::decay(), EvtSingleParticle::decay(), EvtS2GV::decay(), EvtRhoPi::decay(), EvtPi0Dalitz::decay(), EvtPhsp::decay(), EvtPhiDalitz::decay(), EvtPBB2::decay(), EvtPBB1::decay(), EvtPartWave::decay(), EvtP2GC2::decay(), EvtP2GC1::decay(), EvtP2GC0::decay(), EvtOmegaDalitz::decay(), EvtMultibody::decay(), EvtmPhsp::decay(), EvtmH2::decay(), EvtMelikhov::decay(), EvtMBody3::decay(), EvtMassH2::decay(), EvtMassH1::decay(), EvtLNuGamma::decay(), EvtLambdaP_BarGamma::decay(), EvtLambdac2pKpi::decay(), EvtKstarstargamma::decay(), EvtKstarnunu::decay(), EvtKKLambdaC::decay(), EvtJTO3P::decay(), EvtJpipi::decay(), EvtJPE::decay(), EvtJ2BB3::decay(), EvtJ2BB2::decay(), EvtJ2BB1::decay(), EvtISGW2::decay(), EvtISGW::decay(), EvtIntervalDecayAmp< EvtDalitzPoint >::decay(), EvtHypWK::decay(), EvtHypNonLepton::decay(), EvtHQET2::decay(), EvtHQET::decay(), EvtHelPPJ::decay(), EvtHelAmp::decay(), EvtHAngSam3::decay(), EvtFlatQ2::decay(), EvtEtaDalitz::decay(), EvtEDM::decay(), EvtDMix::decay(), EvtDIY::decay(), EvtDeBD::decay(), EvtDDalitz::decay(), EvtD0mixDalitz::decay(), EvtChi2BB2::decay(), EvtChi2BB1::decay(), EvtChi1BB2::decay(), EvtChi1BB1::decay(), EvtChi0BB2::decay(), EvtChi0BB1::decay(), EvtCBTo3piP00::decay(), EvtCBTo3piMPP::decay(), EvtCalHelAmp::decay(), EvtBtoXsll::decay(), EvtBtoXsgamma::decay(), EvtBtoXsEtap::decay(), EvtbTosllBall::decay(), EvtbTosllAli::decay(), EvtBToKpipiCP::decay(), EvtBtoKpiCPiso::decay(), EvtBtoKD3P::decay(), EvtBTo4piCP::decay(), EvtBTo3piCP::decay(), EvtBto2piCPiso::decay(), EvtBsquark::decay(), EvtBody3::decay(), EvtBHadronic::decay(), EvtAV2GV::decay(), EvtAngSamX::decay(), EvtAngSamLab::decay(), EvtAngSam3::decay(), EvtAngSam::decay(), EvtAngH2::decay(), EvtGoityRoberts::DecayBDpilnuGR(), EvtGoityRoberts::DecayBDstarpilnuGR(), EvtParticleDecayList::EvtParticleDecayList(), EvtConExc::get_mode(), EvtMultibody::init(), EvtLambdac2pKpi::init(), EvtConExc::init(), EvtConExc::init_mode(), EvtBto2piCPiso::initProbMax(), and EvtDecayAmp::makeDecay().

00065 {return _daug;}

int EvtDecayBase::getDSum (  )  [inline, inherited]

Definition at line 77 of file EvtDecayBase.hh.

References EvtDecayBase::_dsum.

00077 {return _dsum; }

std::string EvtDecayBase::getModelName (  )  [inline, inherited]

Definition at line 76 of file EvtDecayBase.hh.

References EvtDecayBase::_modelname.

Referenced by EvtParticleDecayList::addMode(), EvtParticleDecayList::EvtParticleDecayList(), EvtDecayTable::findChannel(), and EvtDecay::getModel().

00076 {return _modelname; }

void EvtVubHybrid::getName ( std::string name  )  [virtual]

Implements EvtDecayBase.

Definition at line 68 of file EvtVubHybrid.cc.

00068                                                {
00069 
00070   model_name="VUBHYBRID";     
00071 
00072 }

int EvtDecayBase::getNArg (  )  [inline, inherited]

Definition at line 67 of file EvtDecayBase.hh.

References EvtDecayBase::_narg.

Referenced by EvtParticleDecay::chargeConj(), EvtVPHOtoVISRHi::decay(), EvtVPHOtoVISR::decay(), EvtRhoPi::decay(), EvtOpenCharm::decay(), EvtmPhsp::decay(), EvtLunda::decay(), EvtJscont::decay(), EvtJ2BB3::decay(), EvtJ2BB2::decay(), EvtJ2BB1::decay(), EvtConExc::decay(), EvtCalHelAmp::decay(), EvtBtoXsgamma::decay(), EvtAngSamX::decay(), EvtAngSamLab::decay(), EvtAngSam3::decay(), EvtAngSam::decay(), EvtPto3P::dp(), EvtParticleDecayList::EvtParticleDecayList(), EvtDecayTable::findChannel(), EvtVubNLO::init(), init(), EvtVub::init(), EvtVSSBMixCPT::init(), EvtSVVNONCPEIGEN::init(), EvtSVSNONCPEIGEN::init(), EvtSSDCP::init(), EvtSLPole::init(), EvtSLBKPole::init(), EvtSinglePoint::init(), EvtSingleParticle2::init(), EvtSingleParticle::init(), EvtPycont::init(), EvtMultibody::init(), EvtmPhsp::init(), EvtLunda::init(), EvtLNuGamma::init(), EvtKKLambdaC::init(), EvtIntervalDecayAmp< EvtDalitzPoint >::init(), EvtHypNonLepton::init(), EvtHQET2::init(), EvtHQET::init(), EvtD0mixDalitz::init(), EvtConExc::init(), EvtCalHelAmp::init(), EvtBtoXsll::init(), EvtBtoXsgamma::init(), EvtAngSamX::init(), EvtAngSamLab::init(), EvtAngSam3::init(), and EvtAngSam::init().

00067 {return _narg;}

int EvtDecayBase::getNDaug (  )  [inline, inherited]

Definition at line 64 of file EvtDecayBase.hh.

References EvtDecayBase::_ndaug.

Referenced by EvtParticleDecayList::addMode(), EvtParticleDecay::chargeConj(), EvtVVSPwave::decay(), EvtVVPIPI_WEIGHTED::decay(), EvtVVpipi::decay(), EvtVVP::decay(), EvtVubNLO::decay(), decay(), EvtVub::decay(), EvtVSSMix::decay(), EvtVSSBMixCPT::decay(), EvtVSS::decay(), EvtVSPPwave::decay(), EvtVll::decay(), EvtVectorIsr::decay(), EvtTVSPwave::decay(), EvtTSS::decay(), EvtTrackGen::decay(), EvtTauVectornu::decay(), EvtTauScalarnu::decay(), EvtTaulnunu::decay(), EvtTauHadnu::decay(), EvtTauGamMu::decay(), EvtT2GV::decay(), EvtSVSCPLH::decay(), EvtSVSCPiso::decay(), EvtSVSCP::decay(), EvtSVS::decay(), EvtSVPHelAmp::decay(), EvtSVPCP::decay(), EvtSTSCP::decay(), EvtSTS::decay(), EvtSSSCPT::decay(), EvtSSSCPpng::decay(), EvtSSSCP::decay(), EvtSPL::decay(), EvtSLPole::decay(), EvtSLN::decay(), EvtSll::decay(), EvtSLBKPole::decay(), EvtSinglePoint::decay(), EvtSingleParticle2::decay(), EvtSingleParticle::decay(), EvtS2GV::decay(), EvtRhoPi::decay(), EvtPi0Dalitz::decay(), EvtPhsp::decay(), EvtPhiDalitz::decay(), EvtPBB2::decay(), EvtPBB1::decay(), EvtPartWave::decay(), EvtP2GC2::decay(), EvtP2GC1::decay(), EvtP2GC0::decay(), EvtOmegaDalitz::decay(), EvtMultibody::decay(), EvtmPhsp::decay(), EvtmH2::decay(), EvtMelikhov::decay(), EvtMBody3::decay(), EvtMassH2::decay(), EvtMassH1::decay(), EvtLNuGamma::decay(), EvtLambdaP_BarGamma::decay(), EvtLambdac2pKpi::decay(), EvtKstarstargamma::decay(), EvtKstarnunu::decay(), EvtKKLambdaC::decay(), EvtJTO3P::decay(), EvtJpipi::decay(), EvtJPE::decay(), EvtJ2BB3::decay(), EvtJ2BB2::decay(), EvtJ2BB1::decay(), EvtISGW2::decay(), EvtISGW::decay(), EvtHypWK::decay(), EvtHypNonLepton::decay(), EvtHQET2::decay(), EvtHQET::decay(), EvtHelPPJ::decay(), EvtHelAmp::decay(), EvtHAngSam3::decay(), EvtFlatQ2::decay(), EvtEtaDalitz::decay(), EvtEDM::decay(), EvtDMix::decay(), EvtDIY::decay(), EvtDeBD::decay(), EvtDDalitz::decay(), EvtD0mixDalitz::decay(), EvtChi2BB2::decay(), EvtChi2BB1::decay(), EvtChi1BB2::decay(), EvtChi1BB1::decay(), EvtChi0BB2::decay(), EvtChi0BB1::decay(), EvtCBTo3piP00::decay(), EvtCBTo3piMPP::decay(), EvtCalHelAmp::decay(), EvtBtoXsll::decay(), EvtBtoXsgamma::decay(), EvtBtoXsEtap::decay(), EvtbTosllBall::decay(), EvtbTosllAli::decay(), EvtBToKpipiCP::decay(), EvtBtoKpiCPiso::decay(), EvtBtoKD3P::decay(), EvtBTo4piCP::decay(), EvtBTo3piCP::decay(), EvtBto2piCPiso::decay(), EvtBsquark::decay(), EvtBody3::decay(), EvtBHadronic::decay(), EvtAV2GV::decay(), EvtAngSamX::decay(), EvtAngSamLab::decay(), EvtAngSam3::decay(), EvtAngSam::decay(), EvtAngH2::decay(), EvtGoityRoberts::DecayBDpilnuGR(), EvtGoityRoberts::DecayBDstarpilnuGR(), EvtPto3P::dp(), EvtParticleDecayList::EvtParticleDecayList(), EvtDecayTable::findChannel(), EvtDecayTable::inChannelList(), EvtVSSBMixCPT::init(), EvtTrackGen::init(), EvtTauHadnu::init(), EvtMultibody::init(), EvtHypNonLepton::init(), EvtConExc::init(), EvtTauHadnu::initProbMax(), EvtDecayAmp::makeDecay(), and EvtParticleDecayList::removeMode().

00064 {return _ndaug;}

EvtId EvtDecayBase::getParentId (  )  [inline, inherited]

Definition at line 60 of file EvtDecayBase.hh.

References EvtDecayBase::_parent.

Referenced by EvtParticleDecayList::addMode(), EvtParticleDecay::chargeConj(), EvtDecayBase::checkSpinParent(), EvtTauola::decay(), EvtPythia::decay(), EvtOpenCharm::decay(), EvtMultibody::decay(), EvtLundCharm::decay(), EvtLunda::decay(), EvtJPE::decay(), EvtJetSet::decay(), EvtJ2BB3::decay(), EvtJ2BB2::decay(), EvtJ2BB1::decay(), EvtPto3P::dp(), EvtParticleDecayList::EvtParticleDecayList(), EvtTauola::fixPolarizations(), EvtVSSBMixCPT::init(), EvtTauola::init(), EvtSSDCP::init(), EvtRhoPi::init(), EvtPythia::init(), EvtPhokhara_ppbar::init(), EvtPhokhara_pipipi0::init(), EvtPhokhara_pipi::init(), EvtPhokhara_pi0pi0pipi::init(), EvtPhokhara_nnbar::init(), EvtPhokhara_LLB::init(), EvtPhokhara_KK::init(), EvtPhokhara_K0K0::init(), EvtPhokhara_4pi::init(), EvtPhokhara::init(), EvtPartWave::init(), EvtOpenCharm::init(), EvtmH2::init(), EvtMassH2::init(), EvtMassH1::init(), EvtLundCharm::init(), EvtLunda::init(), EvtJetSet::init(), EvtHypNonLepton::init(), EvtHelAmp::init(), EvtHAngSam3::init(), EvtDIY::init(), EvtDDalitz::init(), EvtD0mixDalitz::init(), EvtBody3::init(), EvtAngSamX::init(), EvtAngSamLab::init(), EvtAngSam3::init(), EvtAngSam::init(), EvtAngH2::init(), EvtSLPole::initProbMax(), EvtSLN::initProbMax(), EvtSLBKPole::initProbMax(), EvtKKLambdaC::initProbMax(), EvtISGW2::initProbMax(), EvtHypNonLepton::initProbMax(), EvtHQET2::initProbMax(), EvtHQET::initProbMax(), EvtbTosllBall::initProbMax(), EvtbTosllAli::initProbMax(), and EvtParticleDecayList::removeMode().

00060 {return _parent;}

int EvtDecayBase::getPHOTOS (  )  [inline, inherited]

Definition at line 68 of file EvtDecayBase.hh.

References EvtDecayBase::_photos.

Referenced by EvtParticleDecay::chargeConj(), EvtParticleDecayList::EvtParticleDecayList(), EvtDecayProb::makeDecay(), EvtDecayIncoherent::makeDecay(), and EvtDecayAmp::makeDecay().

00068 {return _photos;}

double EvtDecayBase::getProbMax ( double  prob  )  [inherited]

Definition at line 67 of file EvtDecayBase.cc.

References EvtDecayBase::_daug, EvtDecayBase::_modelname, EvtDecayBase::_ndaug, EvtDecayBase::_parent, EvtCyclic3::c_str(), EvtDecayBase::defaultprobmax, genRecEmupikp::i, Bes_Common::INFO, EvtDecayBase::max_prob, EvtPDL::name(), EvtDecayBase::ntimes_prob, EvtDecayBase::probmax, report(), and EvtDecayBase::sum_prob.

Referenced by EvtBtoKD3P::decay(), EvtDecayProb::makeDecay(), and EvtDecayAmp::makeDecay().

00067                                              {
00068 
00069   int i;
00070 
00071   //diagnostics
00072   sum_prob+=prob;
00073   if (prob>max_prob) max_prob=prob;
00074 
00075 
00076   if ( defaultprobmax && ntimes_prob<=500 ) { 
00077     //We are building up probmax with this iteration
00078      ntimes_prob += 1;
00079      if ( prob > probmax ) { probmax = prob;}
00080      if (ntimes_prob==500) { 
00081        probmax*=1.2;
00082      }
00083      return 1000000.0*prob;
00084   }
00085 
00086   if ( prob> probmax*1.0001) {
00087 
00088     report(INFO,"EvtGen") << "prob > probmax:("<<prob<<">"<<probmax<<")";
00089     report(INFO,"") << "("<<_modelname.c_str()<<") ";
00090     report(INFO,"") << EvtPDL::name(_parent).c_str()<<" -> ";
00091     for(i=0;i<_ndaug;i++){
00092        report(INFO,"") << EvtPDL::name(_daug[i]).c_str() << " ";
00093     }
00094     report(INFO,"") << endl;
00095 
00096     if (defaultprobmax) probmax = prob;
00097 
00098   }
00099 
00100   ntimes_prob += 1;
00101 
00102 
00103   return probmax;
00104 
00105 } //getProbMax

double EvtVubHybrid::getWeight ( double  mX,
double  q2,
double  El 
)

Definition at line 435 of file EvtVubHybrid.cc.

References _bins_El, _bins_mX, _bins_q2, _nbins_El, _nbins_mX, _nbins_q2, _weights, calibUtil::ERROR, genRecEmupikp::i, and report().

Referenced by decay().

00435                                                               {
00436 
00437   int ibin_mX = -1;
00438   int ibin_q2 = -1;
00439   int ibin_El = -1;
00440 
00441   for (int i = 0; i < _nbins_mX; i++) {
00442     if (mX >= _bins_mX[i]) ibin_mX = i;
00443   }
00444   for (int i = 0; i < _nbins_q2; i++) {
00445     if (q2 >= _bins_q2[i]) ibin_q2 = i;
00446   }
00447   for (int i = 0; i < _nbins_El; i++) {
00448     if (El >= _bins_El[i]) ibin_El = i;
00449   }
00450   int ibin = ibin_mX + ibin_q2*_nbins_mX + ibin_El*_nbins_mX*_nbins_q2;
00451 
00452   if ( (ibin_mX < 0) || (ibin_q2 < 0) || (ibin_El < 0) ) {
00453     report(ERROR,"EvtVubHybrid") << "Cannot determine hybrid weight "
00454                                  << "for this event " 
00455                                  << "-> assign weight = 0" << endl;
00456     return 0.0;
00457   }
00458 
00459   return _weights[ibin];
00460 }

void EvtVubHybrid::init (  )  [virtual]

Reimplemented from EvtDecayBase.

Definition at line 80 of file EvtVubHybrid.cc.

References _a, _alphas, _bins_El, _bins_mX, _bins_q2, _dGamma, _dGMax, _masscut, _mb, _nbins, _nbins_El, _nbins_mX, _nbins_q2, _noHybrid, _pf, abs, EvtDecayBase::checkNDaug(), calibUtil::ERROR, EvtDecayBase::getArg(), EvtPFermi::getFPFermi(), EvtPDL::getId(), EvtPDL::getMaxMass(), EvtDecayBase::getNArg(), genRecEmupikp::i, nParameters, nVariables, readWeights(), report(), Bes_Common::WARNING, and xlow.

00080                        {
00081 
00082   // check that there are at least 3 arguments
00083   if (getNArg() < EvtVubHybrid::nParameters) {
00084     report(ERROR,"EvtVubHybrid") << "EvtVub generator expected "
00085                                  << "at least " << EvtVubHybrid::nParameters
00086                                  << " arguments but found: " << getNArg()
00087                                  << "\nWill terminate execution!"<<endl;
00088     ::abort(); 
00089   } else if (getNArg() == EvtVubHybrid::nParameters) {
00090     report(WARNING,"EvtVubHybrid") << "EvtVub: generate B -> Xu l nu events " 
00091                                    << "without using the hybrid reweighting." 
00092                                    << endl;
00093     _noHybrid = true;
00094   } else if (getNArg() < EvtVubHybrid::nParameters+EvtVubHybrid::nVariables) {
00095      report(ERROR,"EvtVubHybrid") << "EvtVub could not read number of bins for "
00096                                   << "all variables used in the reweighting\n"
00097                                   << "Will terminate execution!" << endl;
00098      ::abort();    
00099   }
00100 
00101   // check that there are 3 daughters
00102   checkNDaug(3);
00103 
00104   // read minimum required parameters from decay.dec
00105   _mb     = getArg(0);
00106   _a      = getArg(1);
00107   _alphas = getArg(2);
00108 
00109   // the maximum dGamma*p2 value depends on alpha_s only:
00110   const double dGMax0 = 3.;
00111   _dGMax = 0.21344+8.905*_alphas;
00112   if ( _dGMax < dGMax0 ) _dGMax = dGMax0;
00113 
00114   // for the Fermi Motion we need a B-Meson mass - but it's not critical
00115   // to get an exact value; in order to stay in the phase space for
00116   // B+- and B0 use the smaller mass
00117   
00118   static double mB0 = EvtPDL::getMaxMass(EvtPDL::getId("B0"));
00119   static double mBP = EvtPDL::getMaxMass(EvtPDL::getId("B+"));
00120   static double mB = (mB0<mBP?mB0:mBP);
00121   
00122   const double xlow = -_mb;
00123   const double xhigh = mB-_mb;
00124   const int aSize = 10000;
00125 
00126   EvtPFermi pFermi(_a,mB,_mb);
00127   // pf is the cumulative distribution normalized to 1.
00128   _pf.resize(aSize);
00129   for(int i=0;i<aSize;i++){
00130     double kplus = xlow + (double)(i+0.5)/((double)aSize)*(xhigh-xlow);
00131     if ( i== 0 )
00132       _pf[i] = pFermi.getFPFermi(kplus);
00133     else
00134       _pf[i] = _pf[i-1] + pFermi.getFPFermi(kplus);
00135   }
00136   for (int i=0; i<_pf.size(); i++) _pf[i]/=_pf[_pf.size()-1];
00137 
00138   _dGamma = new EvtVubdGamma(_alphas);
00139   
00140   if (_noHybrid) return;        // Without hybrid weighting, nothing else to do
00141 
00142   _nbins_mX = abs((int)getArg(3));
00143   _nbins_q2 = abs((int)getArg(4));
00144   _nbins_El = abs((int)getArg(5));
00145 
00146   int nextArg = EvtVubHybrid::nParameters + EvtVubHybrid::nVariables;
00147 
00148   _nbins = _nbins_mX*_nbins_q2*_nbins_El;       // Binning of weight table
00149 
00150   int expectArgs = nextArg + _nbins_mX +_nbins_q2 + _nbins_El + _nbins;
00151 
00152   if (getNArg() < expectArgs) {
00153     report(ERROR,"EvtVubHybrid")
00154       << " finds " << getNArg() << " arguments, expected " << expectArgs
00155       << ".  Something is wrong with the tables of weights or thresholds."
00156       << "\nWill terminate execution!" << endl;
00157     ::abort();        
00158   }
00159 
00160   // read bin boundaries from decay.dec
00161   int i;
00162 
00163   _bins_mX  = new double[_nbins_mX];
00164   for (i = 0; i < _nbins_mX; i++,nextArg++) {
00165     _bins_mX[i] = getArg(nextArg);
00166   }
00167   _masscut = _bins_mX[0];
00168 
00169   _bins_q2  = new double[_nbins_q2];
00170   for (i = 0; i < _nbins_q2; i++,nextArg++) {
00171     _bins_q2[i] = getArg(nextArg);    
00172   }
00173 
00174   _bins_El  = new double[_nbins_El];
00175   for (i = 0; i < _nbins_El; i++,nextArg++) {
00176     _bins_El[i] = getArg(nextArg);    
00177   }
00178     
00179   // read in weights (and rescale to range 0..1)
00180   readWeights(nextArg); 
00181 }

void EvtVubHybrid::initProbMax (  )  [virtual]

Reimplemented from EvtDecayBase.

Definition at line 183 of file EvtVubHybrid.cc.

References EvtDecayBase::noProbMax().

00183                               {
00184   noProbMax();
00185 }

int EvtDecayIncoherent::isDaughterSpinDensitySet ( int  daughter  )  [inline, inherited]

Definition at line 39 of file EvtDecayIncoherent.hh.

References EvtDecayIncoherent::spinDensitySet.

Referenced by EvtDecayIncoherent::makeDecay().

00040   {return spinDensitySet[daughter];}

void EvtDecayIncoherent::makeDecay ( EvtParticle p  )  [virtual, inherited]

Implements EvtDecayBase.

Definition at line 29 of file EvtDecayIncoherent.cc.

References EvtDecayBase::_daugsDecayedByParentModel, EvtRadCorr::alwaysRadCorr(), EvtDecayBase::daugsDecayedByParentModel(), EvtParticle::decay(), EvtDecayBase::decay(), EvtRadCorr::doRadCorr(), EvtParticle::getDaug(), EvtParticle::getNDaug(), EvtDecayBase::getPHOTOS(), EvtParticle::getSpinDensityForward(), EvtParticle::getSpinStates(), genRecEmupikp::i, EvtDecayIncoherent::isDaughterSpinDensitySet(), MAX_DAUG, EvtParticle::setDecayProb(), EvtSpinDensity::SetDiag(), EvtParticle::setSpinDensityBackward(), EvtParticle::setSpinDensityForward(), EvtDecayIncoherent::spinDensitySet, and subSeperate::temp.

00029                                                 {
00030 
00031   int i;
00032   //initialize this the hard way..
00033   //Lange June 26, 2000
00034   for (i=0; i<MAX_DAUG; i++ ) { spinDensitySet[i]=0;}
00035   _daugsDecayedByParentModel=false;
00036 
00037   decay(p);
00038   p->setDecayProb(1.);
00039 
00040   EvtSpinDensity rho;
00041 
00042   rho.SetDiag(p->getSpinStates());
00043 
00044   p->setSpinDensityBackward(rho);
00045 
00046   if (getPHOTOS() || EvtRadCorr::alwaysRadCorr()) {
00047     EvtRadCorr::doRadCorr(p);
00048   }
00049 
00050   //Now decay the daughters.
00051 
00052   if ( !daugsDecayedByParentModel()) {
00053     
00054     for(i=0;i<p->getNDaug();i++){
00055       //Need to set the spin density of the daughters to be
00056       //diagonal.
00057       rho.SetDiag(p->getDaug(i)->getSpinStates());
00058       //if (p->getDaug(i)->getNDaug()==0){
00059       //only do this if the user has not already set the 
00060       //spin density matrix herself.
00061       //Lange June 26, 2000
00062       if ( isDaughterSpinDensitySet(i)==0 ) { 
00063         p->getDaug(i)->setSpinDensityForward(rho);
00064       }
00065       else{
00066         //report(INFO,"EvtGen") << "spinDensitymatrix already set!!!\n";
00067         EvtSpinDensity temp=p->getDaug(i)->getSpinDensityForward();
00068         //      report(INFO,"EvtGen") <<temp<<endl;
00069       }
00070       //Now decay the daughter.  Really!
00071       p->getDaug(i)->decay();
00072     }
00073 
00074   } 
00075 }

bool EvtDecayBase::matchingDecay ( const EvtDecayBase other  )  const [virtual, inherited]

Definition at line 587 of file EvtDecayBase.cc.

References EvtDecayBase::_daug, EvtDecayBase::_ndaug, EvtDecayBase::_parent, genRecEmupikp::i, ganga-rec::j, and EvtCyclic3::other().

Referenced by EvtParticleDecayList::addMode(), and EvtParticleDecayList::removeMode().

00587                                                                 {
00588 
00589   if ( _ndaug != other._ndaug) return false;
00590   if ( _parent != other._parent) return false;
00591   
00592   std::vector<int> useDs;
00593   for ( unsigned int i=0; i<_ndaug; i++) useDs.push_back(0);
00594 
00595   for ( unsigned int i=0; i<_ndaug; i++) {
00596     bool foundIt=false;
00597     for ( unsigned int j=0; j<_ndaug; j++) {
00598       if ( useDs[j] == 1 ) continue;
00599       if ( _daug[i] == other._daug[j] && _daug[i].getAlias() == other._daug[j].getAlias()) {
00600         foundIt=true;
00601         useDs[j]=1;
00602         break;
00603       }
00604     }
00605     if ( foundIt==false) return false;
00606   }
00607   for ( unsigned int i=0; i<_ndaug; i++) if ( useDs[i]==0) return false;
00608 
00609   return true;
00610 
00611 }

void EvtDecayBase::noProbMax (  )  [inherited]

Definition at line 304 of file EvtDecayBase.cc.

References EvtDecayBase::defaultprobmax.

Referenced by EvtVubNLO::initProbMax(), initProbMax(), EvtVub::initProbMax(), EvtVectorIsr::initProbMax(), EvtTrackGen::initProbMax(), EvtTauola::initProbMax(), EvtRhoPi::initProbMax(), EvtRexc::initProbMax(), EvtPythia::initProbMax(), EvtPyGaGa::initProbMax(), EvtPycont::initProbMax(), EvtPhsp::initProbMax(), EvtPhokhara_ppbar::initProbMax(), EvtPhokhara_pipipi0::initProbMax(), EvtPhokhara_pipi::initProbMax(), EvtPhokhara_pi0pi0pipi::initProbMax(), EvtPhokhara_nnbar::initProbMax(), EvtPhokhara_LLB::initProbMax(), EvtPhokhara_KK::initProbMax(), EvtPhokhara_K0K0::initProbMax(), EvtPhokhara_4pi::initProbMax(), EvtPhokhara::initProbMax(), EvtOpenCharm::initProbMax(), EvtmPhsp::initProbMax(), EvtmH2::initProbMax(), EvtMBody3::initProbMax(), EvtMassH2::initProbMax(), EvtMassH1::initProbMax(), EvtLundCharm::initProbMax(), EvtLunda::initProbMax(), EvtLambdac2pKpi::initProbMax(), EvtJscont::initProbMax(), EvtJetSet::initProbMax(), EvtHAngSam3::initProbMax(), EvtDMix::initProbMax(), EvtDIY::initProbMax(), EvtConExc::initProbMax(), EvtCalHelAmp::initProbMax(), EvtBtoXsll::initProbMax(), EvtBtoXsgamma::initProbMax(), EvtBtoXsEtap::initProbMax(), EvtBody3::initProbMax(), EvtAngSamX::initProbMax(), EvtAngSamLab::initProbMax(), EvtAngSam3::initProbMax(), EvtAngSam::initProbMax(), and EvtAngH2::initProbMax().

00304                             {
00305 
00306   defaultprobmax=0;
00307 
00308 }

virtual int EvtDecayBase::nRealDaughters (  )  [inline, virtual, inherited]

Reimplemented in EvtBtoKD3P, and EvtVSSBMixCPT.

Definition at line 105 of file EvtDecayBase.hh.

References EvtDecayBase::_ndaug.

Referenced by EvtDecayTable::readDecayFile().

00105 { return _ndaug;}

void EvtDecayBase::printSummary (  )  [inherited]

Definition at line 259 of file EvtDecayBase.cc.

References EvtDecayBase::_daug, EvtDecayBase::_modelname, EvtDecayBase::_ndaug, EvtDecayBase::_parent, EvtCyclic3::c_str(), genRecEmupikp::i, Bes_Common::INFO, EvtDecayBase::max_prob, EvtPDL::name(), EvtDecayBase::ntimes_prob, EvtDecayBase::probmax, report(), and EvtDecayBase::sum_prob.

Referenced by EvtDecayBase::checkNArg(), EvtDecayBase::checkNDaug(), EvtDecayBase::checkSpinDaughter(), EvtDecayBase::checkSpinParent(), and EvtParticleDecay::printSummary().

00259                                 {
00260 
00261   int i;
00262 
00263   if (ntimes_prob>0) {
00264 
00265     report(INFO,"EvtGen") << "Calls="<<ntimes_prob<<" eff:"<<
00266       sum_prob/(probmax*ntimes_prob)<<" frac. max:"<<max_prob/probmax;
00267     report(INFO,"") <<" probmax:"<<probmax<<" max:"<<max_prob<<" : ";
00268   }
00269 
00270   report(INFO,"") << EvtPDL::name(_parent).c_str()<<" -> ";
00271   for(i=0;i<_ndaug;i++){
00272     report(INFO,"") << EvtPDL::name(_daug[i]).c_str() << " ";
00273   }
00274   report(INFO,"") << " ("<<_modelname.c_str()<<"):"<< endl;
00275   
00276   
00277   
00278 }

void EvtVubHybrid::readWeights ( int  startArg = 0  ) 

Definition at line 463 of file EvtVubHybrid.cc.

References _nbins, _weights, calibUtil::ERROR, EvtDecayBase::getArg(), genRecEmupikp::i, and report().

Referenced by init().

00463                                            {
00464   _weights  = new double[_nbins];
00465 
00466   double maxw = 0.0;
00467   for (int i = 0; i < _nbins; i++, startArg++) {
00468     _weights[i] = getArg(startArg);
00469     if (_weights[i] > maxw) maxw = _weights[i];
00470   }
00471 
00472   if (maxw == 0) {
00473     report(ERROR,"EvtVubHybrid") << "EvtVub generator expected at least one " 
00474                                  << " weight > 0, but found none! " 
00475                                  << "Will terminate execution!"<<endl;
00476     ::abort();
00477   }
00478 
00479   // rescale weights (to be in range 0..1)
00480   for (int i = 0; i < _nbins; i++) {
00481     _weights[i] /= maxw;
00482   }
00483 }

double EvtDecayBase::resetProbMax ( double  prob  )  [inherited]

Definition at line 108 of file EvtDecayBase.cc.

References EvtDecayBase::_daug, EvtDecayBase::_modelname, EvtDecayBase::_ndaug, EvtDecayBase::_parent, EvtDecayBase::defaultprobmax, EvtPDL::getStdHep(), genRecEmupikp::i, Bes_Common::INFO, EvtDecayBase::ntimes_prob, EvtDecayBase::probmax, and report().

00108                                              {
00109   
00110   report(INFO,"EvtGen") << "Reseting prob max\n"; 
00111   report(INFO,"EvtGen") << "prob > probmax:("<<prob<<">"<<probmax<<")";
00112   report(INFO,"") << "("<<_modelname.c_str()<<")";
00113   report(INFO,"") << EvtPDL::getStdHep(_parent)<<"->";
00114   
00115   for( int i=0;i<_ndaug;i++){
00116     report(INFO,"") << EvtPDL::getStdHep(_daug[i]) << " ";
00117   }
00118   report(INFO,"") << endl;
00119   
00120   probmax = 0.0;
00121   defaultprobmax = 0;
00122   ntimes_prob = 0;
00123   
00124   return prob;
00125 
00126 }

void EvtDecayBase::saveDecayInfo ( EvtId  ipar,
int  ndaug,
EvtId daug,
int  narg,
std::vector< std::string > &  args,
std::string  name,
double  brfr 
) [inherited]

Definition at line 167 of file EvtDecayBase.cc.

References EvtDecayBase::_args, EvtDecayBase::_brfr, EvtDecayBase::_chkCharge, EvtDecayBase::_daug, EvtDecayBase::_dsum, EvtDecayBase::_modelname, EvtDecayBase::_narg, EvtDecayBase::_ndaug, EvtDecayBase::_parent, EvtCyclic3::c_str(), EvtDecayBase::checkQ(), EvtDecayBase::defaultprobmax, EvtId::getAlias(), genRecEmupikp::i, Bes_Common::INFO, EvtDecayBase::init(), EvtDecayBase::initProbMax(), EvtPDL::name(), report(), and deljobs::string.

Referenced by EvtParticleDecay::chargeConj(), EvtParticleDecayList::EvtParticleDecayList(), and EvtDecayTable::readDecayFile().

00170                                               {
00171 
00172   int i;
00173 
00174   _brfr=brfr;
00175   _ndaug=ndaug;
00176   _narg=narg;
00177   _parent=ipar; 
00178 
00179   _dsum=0;
00180 
00181   if (_ndaug>0) {
00182     _daug=new EvtId [_ndaug];
00183     for(i=0;i<_ndaug;i++){
00184       _daug[i]=daug[i];
00185       _dsum+=daug[i].getAlias();
00186     }
00187   }
00188   else{
00189     _daug=0;
00190   }
00191 
00192   if (_narg>0) {
00193     _args=new std::string[_narg+1];
00194     for(i=0;i<_narg;i++){
00195       _args[i]=args[i];
00196     }
00197   }
00198   else{
00199      _args = 0;
00200   }
00201 
00202   _modelname=name;
00203 
00204   this->init();
00205   this->initProbMax();
00206 
00207   if (_chkCharge){
00208     this->checkQ();
00209   }
00210 
00211 
00212   if (defaultprobmax){
00213     report(INFO,"EvtGen") << "No default probmax for ";
00214     report(INFO,"") << "("<<_modelname.c_str()<<") ";
00215     report(INFO,"") << EvtPDL::name(_parent).c_str()<<" -> ";
00216     for(i=0;i<_ndaug;i++){
00217       report(INFO,"") << EvtPDL::name(_daug[i]).c_str() << " ";
00218     }
00219     report(INFO,"") << endl;
00220     report(INFO,"") << "This is fine for development, but must be provided for production."<<endl;
00221     report(INFO,"EvtGen") << "Never fear though - the decay will use the \n";
00222     report(INFO,"EvtGen") << "500 iterations to build up a good probmax \n";
00223     report(INFO,"EvtGen") << "before accepting a decay. "<<endl;
00224   }
00225 
00226 }

void EvtDecayIncoherent::setDaughterSpinDensity ( int  daughter  )  [inline, inherited]

Definition at line 36 of file EvtDecayIncoherent.hh.

References EvtDecayIncoherent::spinDensitySet.

Referenced by EvtVectorIsr::decay(), EvtTauola::fixPolarizations(), EvtPythia::fixPolarizations(), EvtOpenCharm::fixPolarizations(), EvtLundCharm::fixPolarizations(), EvtLunda::fixPolarizations(), and EvtJetSet::fixPolarizations().

00037   { spinDensitySet[daughter]=1; return;}

void EvtDecayBase::setPHOTOS (  )  [inline, inherited]

Definition at line 69 of file EvtDecayBase.hh.

References EvtDecayBase::_photos.

Referenced by EvtParticleDecay::chargeConj(), EvtParticleDecayList::EvtParticleDecayList(), and EvtDecayTable::readDecayFile().

00069 {_photos=1;}

void EvtDecayBase::setProbMax ( double  prbmx  )  [inherited]

Definition at line 297 of file EvtDecayBase.cc.

References EvtDecayBase::defaultprobmax, and EvtDecayBase::probmax.

Referenced by EvtBtoKD3P::decay(), EvtVVSPwave::initProbMax(), EvtVVPIPI_WEIGHTED::initProbMax(), EvtVVpipi::initProbMax(), EvtVVP::initProbMax(), EvtVSSMix::initProbMax(), EvtVSSBMixCPT::initProbMax(), EvtVSS::initProbMax(), EvtVSPPwave::initProbMax(), EvtVPHOtoVISRHi::initProbMax(), EvtVll::initProbMax(), EvtTVSPwave::initProbMax(), EvtTSS::initProbMax(), EvtTauVectornu::initProbMax(), EvtTauScalarnu::initProbMax(), EvtTaulnunu::initProbMax(), EvtTauHadnu::initProbMax(), EvtT2GV::initProbMax(), EvtSVVNONCPEIGEN::initProbMax(), EvtSVVHelAmp::initProbMax(), EvtSVVCPLH::initProbMax(), EvtSVVCP::initProbMax(), EvtSVSNONCPEIGEN::initProbMax(), EvtSVSCPLH::initProbMax(), EvtSVSCPiso::initProbMax(), EvtSVSCP::initProbMax(), EvtSVS::initProbMax(), EvtSVPHelAmp::initProbMax(), EvtSVPCP::initProbMax(), EvtSTSCP::initProbMax(), EvtSTS::initProbMax(), EvtSSSCPpng::initProbMax(), EvtSSSCP::initProbMax(), EvtSSDCP::initProbMax(), EvtSPL::initProbMax(), EvtSLPole::initProbMax(), EvtSLN::initProbMax(), EvtSLBKPole::initProbMax(), EvtS2GV::initProbMax(), EvtPi0Dalitz::initProbMax(), EvtPBB2::initProbMax(), EvtPBB1::initProbMax(), EvtPartWave::initProbMax(), EvtP2GC2::initProbMax(), EvtP2GC1::initProbMax(), EvtP2GC0::initProbMax(), EvtOmegaDalitz::initProbMax(), EvtLNuGamma::initProbMax(), EvtLambdaP_BarGamma::initProbMax(), EvtKKLambdaC::initProbMax(), EvtJpipi::initProbMax(), EvtISGW2::initProbMax(), EvtIntervalDecayAmp< EvtDalitzPoint >::initProbMax(), EvtHypNonLepton::initProbMax(), EvtHQET2::initProbMax(), EvtHQET::initProbMax(), EvtHelAmp::initProbMax(), EvtGoityRoberts::initProbMax(), EvtFlatQ2::initProbMax(), EvtEtaDalitz::initProbMax(), EvtEDM::initProbMax(), EvtDDalitz::initProbMax(), EvtD0mixDalitz::initProbMax(), EvtCBTo3piP00::initProbMax(), EvtCBTo3piMPP::initProbMax(), EvtbTosllBall::initProbMax(), EvtbTosllAli::initProbMax(), EvtBtoKpiCPiso::initProbMax(), EvtBtoKD3P::initProbMax(), EvtBTo3piCP::initProbMax(), EvtBto2piCPiso::initProbMax(), and EvtAV2GV::initProbMax().

00297                                          {
00298 
00299   defaultprobmax=0;
00300   probmax=prbmx;
00301 
00302 }

void EvtDecayBase::setSummary (  )  [inline, inherited]

Definition at line 71 of file EvtDecayBase.hh.

References EvtDecayBase::_summary.

Referenced by EvtParticleDecayList::EvtParticleDecayList(), and EvtDecayTable::readDecayFile().

00071 {_summary=1;}

void EvtDecayBase::setVerbose (  )  [inline, inherited]

Definition at line 70 of file EvtDecayBase.hh.

References EvtDecayBase::_verbose.

Referenced by EvtParticleDecayList::EvtParticleDecayList(), and EvtDecayTable::readDecayFile().

00070 {_verbose=1;}

int EvtDecayBase::summary (  )  [inline, inherited]

Definition at line 78 of file EvtDecayBase.hh.

References EvtDecayBase::_summary.

Referenced by EvtParticleDecayList::EvtParticleDecayList().

00078 {return _summary; }

int EvtDecayBase::verbose (  )  [inline, inherited]

Definition at line 79 of file EvtDecayBase.hh.

References EvtDecayBase::_verbose.

Referenced by EvtParticleDecayList::EvtParticleDecayList(), EvtSVSCPLH::init(), EvtSSDCP::init(), EvtPartWave::init(), EvtHelAmp::init(), EvtBtoXsll::init(), EvtPartWave::initProbMax(), and EvtHelAmp::initProbMax().

00079 {return _verbose; }


Member Data Documentation

double EvtVubHybrid::_a [private]

Definition at line 74 of file EvtVubHybrid.hh.

Referenced by init().

double EvtVubHybrid::_alphas [private]

Definition at line 75 of file EvtVubHybrid.hh.

Referenced by decay(), and init().

double* EvtVubHybrid::_bins_El [private]

Definition at line 84 of file EvtVubHybrid.hh.

Referenced by getWeight(), init(), and ~EvtVubHybrid().

double* EvtVubHybrid::_bins_mX [private]

Definition at line 82 of file EvtVubHybrid.hh.

Referenced by getWeight(), init(), and ~EvtVubHybrid().

double* EvtVubHybrid::_bins_q2 [private]

Definition at line 83 of file EvtVubHybrid.hh.

Referenced by getWeight(), init(), and ~EvtVubHybrid().

bool EvtDecayBase::_daugsDecayedByParentModel [protected, inherited]

Definition at line 109 of file EvtDecayBase.hh.

Referenced by EvtDecayBase::daugsDecayedByParentModel(), EvtBtoKD3P::decay(), EvtDecayProb::makeDecay(), EvtDecayIncoherent::makeDecay(), and EvtDecayAmp::makeDecay().

EvtVubdGamma* EvtVubHybrid::_dGamma [private]

Definition at line 86 of file EvtVubHybrid.hh.

Referenced by decay(), init(), and ~EvtVubHybrid().

double EvtVubHybrid::_dGMax [private]

Definition at line 76 of file EvtVubHybrid.hh.

Referenced by decay(), and init().

double EvtVubHybrid::_masscut [private]

Definition at line 81 of file EvtVubHybrid.hh.

Referenced by decay(), and init().

double EvtVubHybrid::_mb [private]

Definition at line 73 of file EvtVubHybrid.hh.

Referenced by decay(), and init().

int EvtVubHybrid::_nbins [private]

Definition at line 80 of file EvtVubHybrid.hh.

Referenced by decay(), init(), and readWeights().

int EvtVubHybrid::_nbins_El [private]

Definition at line 79 of file EvtVubHybrid.hh.

Referenced by getWeight(), and init().

int EvtVubHybrid::_nbins_mX [private]

Definition at line 77 of file EvtVubHybrid.hh.

Referenced by getWeight(), and init().

int EvtVubHybrid::_nbins_q2 [private]

Definition at line 78 of file EvtVubHybrid.hh.

Referenced by getWeight(), and init().

bool EvtVubHybrid::_noHybrid [private]

Definition at line 70 of file EvtVubHybrid.hh.

Referenced by decay(), and init().

std::vector<double> EvtVubHybrid::_pf [private]

Definition at line 87 of file EvtVubHybrid.hh.

Referenced by findPFermi(), and init().

bool EvtVubHybrid::_storeQplus [private]

Definition at line 71 of file EvtVubHybrid.hh.

Referenced by decay().

double* EvtVubHybrid::_weights [private]

Definition at line 85 of file EvtVubHybrid.hh.

Referenced by getWeight(), readWeights(), and ~EvtVubHybrid().


Generated on Tue Nov 29 23:19:31 2016 for BOSS_7.0.2 by  doxygen 1.4.7