Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

EvtD0mixDalitz Class Reference

#include <EvtD0mixDalitz.hh>

Inheritance diagram for EvtD0mixDalitz:

EvtDecayAmp EvtDecayBase List of all members.

Public Member Functions

void checkNArg (int a1, int a2=-1, int a3=-1, int a4=-1)
void checkNDaug (int d1, int d2=-1)
void checkQ ()
void checkSpinDaughter (int d1, EvtSpinType::spintype sp)
void checkSpinParent (EvtSpinType::spintype sp)
EvtDecayBaseclone ()
virtual void command (std::string cmd)
virtual std::string commandName ()
void decay (EvtParticle *p)
void disableCheckQ ()
 EvtD0mixDalitz ()
double getArg (int j)
double * getArgs ()
std::string * getArgsStr ()
std::string getArgStr (int j)
double getBranchingFraction ()
EvtId getDaug (int i)
EvtIdgetDaugs ()
int getDSum ()
std::string getModelName ()
void getName (std::string &model_name)
int getNArg ()
int getNDaug ()
EvtId getParentId ()
int getPHOTOS ()
double getProbMax (double prob)
void init ()
void initProbMax ()
void makeDecay (EvtParticle *p)
virtual bool matchingDecay (const EvtDecayBase &other) const
void noProbMax ()
virtual int nRealDaughters ()
void printSummary ()
double resetProbMax (double prob)
void saveDecayInfo (EvtId ipar, int ndaug, EvtId *daug, int narg, std::vector< std::string > &args, std::string name, double brfr)
void setPHOTOS ()
void setProbMax (double prbmx)
void setSummary ()
void setVerbose ()
void setWeight (double weight)
int summary ()
int verbose ()
void vertex (int *i1, const EvtComplex &amp)
void vertex (int i1, int i2, int i3, const EvtComplex &amp)
void vertex (int i1, int i2, const EvtComplex &amp)
void vertex (int i1, const EvtComplex &amp)
void vertex (const EvtComplex &amp)
virtual ~EvtD0mixDalitz ()

Static Public Member Functions

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

Protected Member Functions

bool daugsDecayedByParentModel ()

Protected Attributes

EvtAmp _amp2
bool _daugsDecayedByParentModel

Private Member Functions

EvtComplex dalitzKsKK (const EvtDalitzPoint &point)
EvtComplex dalitzKsPiPi (const EvtDalitzPoint &point)
EvtComplex h1 (const double &ct) const
EvtComplex h2 (const double &ct) const
void readPDGValues ()
void reportInvalidAndExit () const

Private Attributes

double _ctau
EvtId _D0
EvtId _D0B
int _d1
int _d2
int _d3
double _gamma
EvtComplex _iChi
EvtComplex _iChi2
bool _isKsPiPi
bool _isRBWmodel
EvtId _K0
EvtId _K0B
EvtId _KL
EvtId _KM
EvtId _KP
EvtId _KS
double _mD0
double _mK
double _mKs
double _mPi
EvtId _PIM
EvtId _PIP
EvtComplex _qp
double _x
double _y

Static Private Attributes

const EvtCyclic3::Pair_AB = EvtCyclic3::AB
const EvtCyclic3::Pair_AC = EvtCyclic3::AC
const EvtCyclic3::Pair_BC = EvtCyclic3::BC
const EvtDalitzReso::CouplingType_EtaPic = EvtDalitzReso::EtaPic
const EvtDalitzReso::NumType_GS = EvtDalitzReso::GS_CLEO_ZEMACH
const EvtDalitzReso::NumType_KMAT = EvtDalitzReso::K_MATRIX
const EvtDalitzReso::CouplingType_PicPicKK = EvtDalitzReso::PicPicKK
const EvtDalitzReso::NumType_RBW = EvtDalitzReso::RBW_CLEO_ZEMACH
const EvtSpinType::spintype_SCALAR = EvtSpinType::SCALAR
const EvtSpinType::spintype_TENSOR = EvtSpinType::TENSOR
const EvtSpinType::spintype_VECTOR = EvtSpinType::VECTOR

Constructor & Destructor Documentation

EvtD0mixDalitz::EvtD0mixDalitz  )  [inline]
 

00102                    : _d1( 0 ), _d2( 0 ), _d3( 0 ),
00103                      _x( 0. ), _y( 0. ), _qp( 1. ),
00104                      _isKsPiPi( false ), _isRBWmodel( true )
00105   {}

virtual EvtD0mixDalitz::~EvtD0mixDalitz  )  [inline, virtual]
 

00107 {};


Member Function Documentation

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

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

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

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

void EvtDecayBase::checkQ  )  [inherited]
 

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]
 

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

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

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

EvtDecayBase* EvtD0mixDalitz::clone  )  [inline, virtual]
 

Implements EvtDecayBase.

00111 { return new EvtD0mixDalitz; }

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

Reimplemented in EvtJetSet, EvtLunda, EvtLundCharm, EvtPythia, and EvtTauola.

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, EvtPythia, and EvtTauola.

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

EvtComplex EvtD0mixDalitz::dalitzKsKK const EvtDalitzPoint point  )  [private]
 

00322 {
00323   static const EvtDalitzPlot plot( _mKs, _mK, _mK, _mD0 );
00324 
00325   // Defining resonances.
00326   static EvtDalitzReso a00_980 ( plot, _AC, _BC, _SCALAR, 0.999  , _RBW, .550173, .324, _EtaPic   );
00327   static EvtDalitzReso phi     ( plot, _AC, _BC, _VECTOR, 1.01943,       .00459319    , _RBW      );
00328   static EvtDalitzReso a0p_980 ( plot, _AC, _AB, _SCALAR, 0.999  , _RBW, .550173, .324, _EtaPic   );
00329   static EvtDalitzReso f0_1370 ( plot, _AC, _BC, _SCALAR, 1.350  ,       .265         , _RBW      );
00330   static EvtDalitzReso a0m_980 ( plot, _AB, _AC, _SCALAR, 0.999  , _RBW, .550173, .324, _EtaPic   );
00331   static EvtDalitzReso f0_980  ( plot, _AC, _BC, _SCALAR, 0.965  , _RBW, .695   , .165, _PicPicKK );
00332   static EvtDalitzReso f2_1270 ( plot, _AC, _BC, _TENSOR, 1.2754 ,       .1851        , _RBW      );
00333   static EvtDalitzReso a00_1450( plot, _AC, _BC, _SCALAR, 1.474  ,       .265         , _RBW      );
00334   static EvtDalitzReso a0p_1450( plot, _AC, _AB, _SCALAR, 1.474  ,       .265         , _RBW      );
00335   static EvtDalitzReso a0m_1450( plot, _AB, _AC, _SCALAR, 1.474  ,       .265         , _RBW      );
00336 
00337   // Adding terms to the amplitude with their corresponding amplitude and phase terms.
00338   EvtComplex amp( 0., 0. ); // Phase space amplitude.
00339   amp += EvtComplex( 1.0          , 0.0        ) * a00_980 .evaluate( point );
00340   amp += EvtComplex( -.126314     ,  .188701   ) * phi     .evaluate( point );
00341   amp += EvtComplex( -.561428     ,  .0135338  ) * a0p_980 .evaluate( point );
00342   amp += EvtComplex(  .035        , -.00110488 ) * f0_1370 .evaluate( point );
00343   amp += EvtComplex( -.0872735    ,  .0791190  ) * a0m_980 .evaluate( point );
00344   amp += EvtComplex( 0.           , 0.         ) * f0_980  .evaluate( point );
00345   amp += EvtComplex(  .257341     , -.0408343  ) * f2_1270 .evaluate( point );
00346   amp += EvtComplex( -.0614342    , -.649930   ) * a00_1450.evaluate( point );
00347   amp += EvtComplex( -.104629     ,  .830120   ) * a0p_1450.evaluate( point );
00348   amp += EvtComplex( 0.           , 0.         ) * a0m_1450.evaluate( point );
00349 
00350   return 2.8 * amp; // Multiply by 2.8 in order to reuse the same probmax as Ks pi pi.
00351 }

EvtComplex EvtD0mixDalitz::dalitzKsPiPi const EvtDalitzPoint point  )  [private]
 

00230 {
00231   static const EvtDalitzPlot plot( _mKs, _mPi, _mPi, _mD0 );
00232 
00233   EvtComplex amp = 0.;
00234 
00235   if ( _isRBWmodel )
00236     {
00237       // This corresponds to relativistic Breit-Wigner distributions. Not K-matrix.
00238       // Defining resonances.
00239       static EvtDalitzReso KStarm      ( plot, _BC, _AC, _VECTOR, 0.893606, 0.0463407, _RBW );
00240       static EvtDalitzReso KStarp      ( plot, _BC, _AB, _VECTOR, 0.893606, 0.0463407, _RBW );
00241       static EvtDalitzReso rho0        ( plot, _AC, _BC, _VECTOR, 0.7758  , 0.1464   , _GS  );
00242       static EvtDalitzReso omega       ( plot, _AC, _BC, _VECTOR, 0.78259 , 0.00849  , _RBW );
00243       static EvtDalitzReso f0_980      ( plot, _AC, _BC, _SCALAR, 0.975   , 0.044    , _RBW );
00244       static EvtDalitzReso f0_1370     ( plot, _AC, _BC, _SCALAR, 1.434   , 0.173    , _RBW );
00245       static EvtDalitzReso f2_1270     ( plot, _AC, _BC, _TENSOR, 1.2754  , 0.1851   , _RBW );
00246       static EvtDalitzReso K0Starm_1430( plot, _BC, _AC, _SCALAR, 1.459   , 0.175    , _RBW );
00247       static EvtDalitzReso K0Starp_1430( plot, _BC, _AB, _SCALAR, 1.459   , 0.175    , _RBW );
00248       static EvtDalitzReso K2Starm_1430( plot, _BC, _AC, _TENSOR, 1.4256  , 0.0985   , _RBW );
00249       static EvtDalitzReso K2Starp_1430( plot, _BC, _AB, _TENSOR, 1.4256  , 0.0985   , _RBW );
00250       static EvtDalitzReso sigma       ( plot, _AC, _BC, _SCALAR, 0.527699, 0.511861 , _RBW );
00251       static EvtDalitzReso sigma2      ( plot, _AC, _BC, _SCALAR, 1.03327 , 0.0987890, _RBW );
00252       static EvtDalitzReso KStarm_1680 ( plot, _BC, _AC, _VECTOR, 1.677   , 0.205    , _RBW );
00253 
00254       // Adding terms to the amplitude with their corresponding amplitude and phase terms.
00255       amp += EvtComplex(   .848984 ,   .893618  );
00256       amp += EvtComplex( -1.16356  ,  1.19933   ) * KStarm      .evaluate( point );
00257       amp += EvtComplex(   .106051 , - .118513  ) * KStarp      .evaluate( point );
00258       amp += EvtComplex(  1.0      ,  0.0       ) * rho0        .evaluate( point );
00259       amp += EvtComplex( - .0249569,   .0388072 ) * omega       .evaluate( point );
00260       amp += EvtComplex( - .423586 , - .236099  ) * f0_980      .evaluate( point );
00261       amp += EvtComplex( -2.16486  ,  3.62385   ) * f0_1370     .evaluate( point );
00262       amp += EvtComplex(   .217748 , - .133327  ) * f2_1270     .evaluate( point );
00263       amp += EvtComplex(  1.62128  ,  1.06816   ) * K0Starm_1430.evaluate( point );
00264       amp += EvtComplex(   .148802 ,   .0897144 ) * K0Starp_1430.evaluate( point );
00265       amp += EvtComplex(  1.15489  , - .773363  ) * K2Starm_1430.evaluate( point );
00266       amp += EvtComplex(   .140865 , - .165378  ) * K2Starp_1430.evaluate( point );
00267       amp += EvtComplex( -1.55556  , - .931685  ) * sigma       .evaluate( point );
00268       amp += EvtComplex( - .273791 , - .0535596 ) * sigma2      .evaluate( point );
00269       amp += EvtComplex( -1.69720  ,   .128038  ) * KStarm_1680 .evaluate( point );
00270     }
00271   else
00272     {
00273       // This corresponds to the complete model (RBW, GS, LASS and K-matrix).
00274       // Defining resonances.
00275       static EvtDalitzReso KStarm      ( plot, _BC, _AC, _VECTOR, 0.893619, 0.0466508, _RBW );
00276       static EvtDalitzReso KStarp      ( plot, _BC, _AB, _VECTOR, 0.893619, 0.0466508, _RBW );
00277       static EvtDalitzReso rho0        ( plot, _AC, _BC, _VECTOR, 0.7758  , 0.1464   , _GS  );
00278       static EvtDalitzReso omega       ( plot, _AC, _BC, _VECTOR, 0.78259 , 0.00849  , _RBW );
00279       static EvtDalitzReso f2_1270     ( plot, _AC, _BC, _TENSOR, 1.2754  , 0.1851   , _RBW );
00280       static EvtDalitzReso K0Starm_1430( plot, _AC, 1.46312, 0.232393, 1.0746, -1.83214, .803516, 2.32788, 1., -5.31306 ); // LASS
00281       static EvtDalitzReso K0Starp_1430( plot, _AB, 1.46312, 0.232393, 1.0746, -1.83214, .803516, 2.32788, 1., -5.31306 ); // LASS
00282       static EvtDalitzReso K2Starm_1430( plot, _BC, _AC, _TENSOR, 1.4256  , 0.0985   , _RBW );
00283       static EvtDalitzReso K2Starp_1430( plot, _BC, _AB, _TENSOR, 1.4256  , 0.0985   , _RBW );
00284       static EvtDalitzReso KStarm_1680 ( plot, _BC, _AC, _VECTOR, 1.677   , 0.205    , _RBW );
00285 
00286       // Defining K-matrix.
00287       static EvtComplex fr12( 1.87981, -.628378 );
00288       static EvtComplex fr13( 4.3242 , 2.75019  );
00289       static EvtComplex fr14( 3.22336,  .271048 );
00290       static EvtComplex fr15(  .0    ,  .0      );
00291       static EvtDalitzReso Pole1  ( plot, _BC, "Pole1"  , _KMAT, fr12, fr13, fr14, fr15, -.0694725 );
00292       static EvtDalitzReso Pole2  ( plot, _BC, "Pole2"  , _KMAT, fr12, fr13, fr14, fr15, -.0694725 );
00293       static EvtDalitzReso Pole3  ( plot, _BC, "Pole3"  , _KMAT, fr12, fr13, fr14, fr15, -.0694725 );
00294       static EvtDalitzReso Pole4  ( plot, _BC, "Pole4"  , _KMAT, fr12, fr13, fr14, fr15, -.0694725 );
00295       static EvtDalitzReso kmatrix( plot, _BC, "f11prod", _KMAT, fr12, fr13, fr14, fr15, -.0694725 );
00296 
00297       // Adding terms to the amplitude with their corresponding amplitude and phase terms.
00298       amp += EvtComplex( - 1.31394   ,  1.14072   ) * KStarm      .evaluate( point );
00299       amp += EvtComplex(    .116239  , - .107287  ) * KStarp      .evaluate( point );
00300       amp += EvtComplex(   1.0       ,  0.0       ) * rho0        .evaluate( point );
00301       amp += EvtComplex( -  .0313343 ,   .0424013 ) * omega       .evaluate( point );
00302       amp += EvtComplex(    .559412  , - .232336  ) * f2_1270     .evaluate( point );
00303       amp += EvtComplex(   7.35400   , -3.67637   ) * K0Starm_1430.evaluate( point );
00304       amp += EvtComplex(    .255913  , - .190459  ) * K0Starp_1430.evaluate( point );
00305       amp += EvtComplex(   1.05397   , - .936297  ) * K2Starm_1430.evaluate( point );
00306       amp += EvtComplex( -  .00760136, - .0908624 ) * K2Starp_1430.evaluate( point );
00307       amp += EvtComplex( - 1.45336   , - .164494  ) * KStarm_1680 .evaluate( point );
00308       amp += EvtComplex( - 1.81830   ,  9.10680   ) * Pole1       .evaluate( point );
00309       amp += EvtComplex(  10.1751    ,  3.87961   ) * Pole2       .evaluate( point );
00310       amp += EvtComplex(  23.6569    , -4.94551   ) * Pole3       .evaluate( point );
00311       amp += EvtComplex(    .0725431 , -9.16264   ) * Pole4       .evaluate( point );
00312       amp += EvtComplex( - 2.19449   , -7.62666   ) * kmatrix     .evaluate( point );
00313 
00314       amp *= .97; // Multiply by a constant in order to use the same maximum as RBW model.
00315     }
00316 
00317   return amp;
00318 }

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

00111 {return _daugsDecayedByParentModel;}

void EvtD0mixDalitz::decay EvtParticle p  )  [virtual]
 

Implements EvtDecayBase.

00118 {
00119   // Same structure for all of these decays.
00120   part->initializePhaseSpace( getNDaug(), getDaugs() );
00121   EvtVector4R pA = part->getDaug( _d1 )->getP4();
00122   EvtVector4R pB = part->getDaug( _d2 )->getP4();
00123   EvtVector4R pC = part->getDaug( _d3 )->getP4();
00124 
00125   // Squared invariant masses.
00126   double m2AB = ( pA + pB ).mass2();
00127   double m2AC = ( pA + pC ).mass2();
00128   double m2BC = ( pB + pC ).mass2();
00129 
00130   // Dalitz amplitudes of the decay of the particle and that of the antiparticle.
00131   EvtComplex ampDalitz;
00132   EvtComplex ampAntiDalitz;
00133 
00134   if ( _isKsPiPi )
00135     { // For Ks pi pi
00136       EvtDalitzPoint point    ( _mKs, _mPi, _mPi, m2AB, m2BC, m2AC );
00137       EvtDalitzPoint antiPoint( _mKs, _mPi, _mPi, m2AC, m2BC, m2AB );
00138 
00139       ampDalitz     = dalitzKsPiPi( point     );
00140       ampAntiDalitz = dalitzKsPiPi( antiPoint );
00141     }
00142   else
00143     { // For Ks K K
00144       EvtDalitzPoint point    ( _mKs, _mK, _mK, m2AB, m2BC, m2AC );
00145       EvtDalitzPoint antiPoint( _mKs, _mK, _mK, m2AC, m2BC, m2AB );
00146 
00147       ampDalitz     = dalitzKsKK( point     );
00148       ampAntiDalitz = dalitzKsKK( antiPoint );
00149     }
00150 
00151   //_i1    += ampDalitz     * conj( ampDalitz     ) / 1.e8;
00152   //_iChi  += ampAntiDalitz * conj( ampDalitz     ) / 1.e8;
00153   //_iChi2 += ampAntiDalitz * conj( ampAntiDalitz ) / 1.e8;
00154 
00155   //std::cout << "INTEGRALS: " << _i1 << " " << _iChi << " " << _iChi2 << " " << _iChi / _i1 << " " << _iChi2 / _i1 << std::endl;
00156 
00157   // Assume there's no direct CP violation.
00158   EvtComplex barAOverA = ampAntiDalitz / ampDalitz;
00159 
00160   // CP violation in the interference. _qp implements CP violation in the mixing.
00161   EvtComplex chi = _qp * barAOverA;
00162 
00163   // Generate a negative exponential life time. p( gt ) = ( 1 - y ) * e^{ - ( 1 - y ) gt }
00164   double gt = -log( EvtRandom::Flat() ) / ( 1. - _y );
00165   part->setLifetime( gt / _gamma );
00166 
00167   // Compute time dependent amplitude.
00168   EvtComplex amp = .5 * ampDalitz * exp( - _y * gt / 2. ) * ( ( 1. + chi ) * h1( gt ) + ( 1. - chi ) * h2( gt ) );
00169 
00170   vertex( amp );
00171 
00172   return;
00173 }

void EvtDecayBase::disableCheckQ  )  [inline, inherited]
 

00062 {_chkCharge=0;};

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

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

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

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

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

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

double EvtDecayBase::getArg int  j  )  [inherited]
 

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

double * EvtDecayBase::getArgs  )  [inherited]
 

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

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

00073 {return _args;}

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

00075 {return _args[j];}

double EvtDecayBase::getBranchingFraction  )  [inline, inherited]
 

00061 {return _brfr;}

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

00066 {return _daug[i];}

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

00065 {return _daug;}

int EvtDecayBase::getDSum  )  [inline, inherited]
 

00077 {return _dsum; }

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

00076 {return _modelname; }

void EvtD0mixDalitz::getName std::string &  model_name  )  [inline, virtual]
 

Implements EvtDecayBase.

00110 { model_name = "D0MIXDALITZ"; }

int EvtDecayBase::getNArg  )  [inline, inherited]
 

00067 {return _narg;}

int EvtDecayBase::getNDaug  )  [inline, inherited]
 

00064 {return _ndaug;}

EvtId EvtDecayBase::getParentId  )  [inline, inherited]
 

00060 {return _parent;}

int EvtDecayBase::getPHOTOS  )  [inline, inherited]
 

00068 {return _photos;}

double EvtDecayBase::getProbMax double  prob  )  [inherited]
 

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

EvtComplex EvtD0mixDalitz::h1 const double &  ct  )  const [private]
 

00358 {
00359   return exp( - EvtComplex( _y, _x ) * gt / 2. );
00360 }

EvtComplex EvtD0mixDalitz::h2 const double &  ct  )  const [private]
 

00364 {
00365   return exp(   EvtComplex( _y, _x ) * gt / 2. );
00366 }

void EvtD0mixDalitz::init  )  [virtual]
 

Reimplemented from EvtDecayBase.

00041 {
00042   // check that there are 0 arguments
00043   checkNDaug( 3 );
00044 
00045   if ( getNArg() )
00046     if ( getNArg() == 2 )
00047       {
00048         _x = getArg( 0 );
00049         _y = getArg( 1 );
00050       }
00051     else if ( getNArg() == 4 )
00052       {
00053         _x = getArg( 0 );
00054         _y = getArg( 1 );
00055         _qp = EvtComplex( getArg( 2 ), getArg( 3 ) );
00056       }
00057     else if ( getNArg() == 5 )
00058       {
00059         _x = getArg( 0 );
00060         _y = getArg( 1 );
00061         _qp = EvtComplex( getArg( 2 ), getArg( 3 ) );
00062         _isRBWmodel = ! getArg( 4 ); // RBW by default. If arg4 is set, do K-matrix.
00063       }
00064     else
00065       {
00066         report( ERROR, "EvtD0mixDalitz" ) << "Number of arguments for this model must be 0, 2, 4 or 5:" << std::endl
00067                                           << "[ x y ][ qp.re qp.im ][ doK-matrix ]" << std::endl
00068                                           << "Check your dec file." << std::endl;
00069         exit( 1 );
00070       }
00071 
00072   checkSpinParent  (    _SCALAR );
00073   checkSpinDaughter( 0, _SCALAR );
00074   checkSpinDaughter( 1, _SCALAR );
00075   checkSpinDaughter( 2, _SCALAR );
00076 
00077   readPDGValues();
00078 
00079   // Get the EvtId of the D0 and its (3) daughters.
00080   EvtId parId = getParentId();
00081 
00082   EvtId dau[ 3 ];
00083   for ( int index = 0; index < 3; index++ )
00084     dau[ index ] = getDaug( index );
00085 
00086   if ( parId == _D0 ) // Look for K0bar h+ h-. The order must be K[0SL] h+ h-
00087     for ( int index = 0; index < 3; index++ )
00088       if      ( ( dau[ index ] == _K0B ) || ( dau[ index ] == _KS ) || ( dau[ index ] == _KL ) )
00089         _d1 = index;
00090       else if ( ( dau[ index ] == _PIP ) || ( dau[ index ] == _KP ) )
00091         _d2 = index;
00092       else if ( ( dau[ index ] == _PIM ) || ( dau[ index ] == _KM ) )
00093         _d3 = index;
00094       else
00095         reportInvalidAndExit();
00096   else if ( parId == _D0B ) // Look for K0 h+ h-. The order must be K[0SL] h- h+
00097     for ( int index = 0; index < 3; index++ )
00098       if      ( ( dau[ index ] == _K0  ) || ( dau[ index ] == _KS ) || ( dau[ index ] == _KL ) )
00099         _d1 = index;
00100       else if ( ( dau[ index ] == _PIM ) || ( dau[ index ] == _KM ) )
00101         _d2 = index;
00102       else if ( ( dau[ index ] == _PIP ) || ( dau[ index ] == _KP ) )
00103         _d3 = index;
00104       else
00105         reportInvalidAndExit();
00106   else
00107     reportInvalidAndExit();
00108 
00109   // Check if we're dealing with Ks pi pi or with Ks K K.
00110   _isKsPiPi = false;
00111   if ( dau[ _d2 ] == _PIP || dau[ _d2 ] == _PIM )
00112     _isKsPiPi = true;
00113 }

void EvtD0mixDalitz::initProbMax  )  [inline, virtual]
 

Reimplemented from EvtDecayBase.

00112 { setProbMax( 5200. );       }

void EvtDecayAmp::makeDecay EvtParticle p  )  [virtual, inherited]
 

Implements EvtDecayBase.

00035                                          {
00036 
00037   int ntimes=10000;
00038 
00039   int i,more;
00040 
00041   EvtSpinDensity rho;
00042   double prob,prob_max;
00043 
00044   _amp2.init(p->getId(),getNDaug(),getDaugs());
00045 //  report(INFO,"EvtGen") << "Decaying " << EvtPDL::name(p->getId()) << endl;
00046   do{
00047 
00048     _daugsDecayedByParentModel=false;
00049     _weight = 1.0;
00050     decay(p);
00051 
00052     rho=_amp2.getSpinDensity();
00053     prob=p->getSpinDensityForward().NormalizedProb(rho);
00054     if (prob<0.0) {
00055 
00056       report(ERROR,"EvtGen")<<"Negative prob:"<<p->getId().getId()
00057                             <<" "<<p->getChannel()<<endl;
00058 
00059       report(ERROR,"EvtGen") << "rho_forward:"<<endl;
00060       report(ERROR,"EvtGen") << p->getSpinDensityForward();
00061       report(ERROR,"EvtGen") << "rho decay:"<<endl;
00062       report(ERROR,"EvtGen") << rho <<endl;
00063     }
00064 
00065     if (prob!=prob) {
00066 
00067       report(DEBUG,"EvtGen") << "Forward density matrix:"<<endl;
00068       report(ERROR,"EvtGen") << p->getSpinDensityForward();
00069 
00070       report(DEBUG,"EvtGen") << "Decay density matrix:"<<endl;
00071       report(ERROR,"EvtGen") << rho;
00072 
00073       report(DEBUG,"EvtGen") << "prob:"<<prob<<endl;
00074       
00075       report(DEBUG,"EvtGen") << "Particle:"
00076                              <<EvtPDL::name(p->getId()).c_str()<<endl;
00077       report(DEBUG,"EvtGen") << "channel        :"<<p->getChannel()<<endl;
00078       report(DEBUG,"EvtGen") << "Momentum:" << p->getP4() << " " << p->mass() << endl;
00079       if( p->getParent()!=0){
00080         report(DEBUG,"EvtGen") << "parent:"
00081                                <<EvtPDL::name(
00082                                 p->getParent()->getId()).c_str()<<endl;
00083         report(DEBUG,"EvtGen") << "parent channel        :"
00084                                <<p->getParent()->getChannel()<<endl;
00085 
00086         int i;
00087         report(DEBUG,"EvtGen") << "parent daughters  :";
00088         for (i=0;i<p->getParent()->getNDaug();i++){
00089           report(DEBUG,"") << EvtPDL::name(
00090                             p->getParent()->getDaug(i)->getId()).c_str()
00091                                  << " ";
00092         }
00093         report(DEBUG,"") << endl;
00094 
00095         report(DEBUG,"EvtGen") << "daughters  :";
00096         for (i=0;i<p->getNDaug();i++){
00097           report(DEBUG,"") << EvtPDL::name(
00098                             p->getDaug(i)->getId()).c_str()
00099                                  << " ";
00100         }
00101         report(DEBUG,"") << endl;
00102 
00103         report(DEBUG,"EvtGen") << "daughter momenta  :" << endl;;
00104         for (i=0;i<p->getNDaug();i++){
00105           report(DEBUG,"") << p->getDaug(i)->getP4() << " " << p->getDaug(i)->mass();
00106           report(DEBUG,"") << endl;
00107         }
00108 
00109       }
00110     }
00111 
00112 
00113     prob/=_weight;
00114 
00115 
00116     prob_max = getProbMax(prob);
00117     p->setDecayProb(prob/prob_max);
00118 
00119     //report(INFO,"EvtGen") << "Prob,prob_max,weight:"<<prob<<" "<<prob_max<<" "<<_weight<<endl;
00120 
00121     more=prob<EvtRandom::Flat(prob_max);
00122 
00123     ntimes--;
00124 
00125   }while(ntimes&&more);
00126   //report(INFO,"EvtGen") << "Done\n";
00127 
00128   if (ntimes==0){
00129     report(DEBUG,"EvtGen") << "Tried accept/reject:10000"
00130                            <<" times, and rejected all the times!"<<endl;
00131     report(DEBUG,"")<<p->getSpinDensityForward()<<endl;
00132     report(DEBUG,"EvtGen") << "Is therefore accepting the last event!"<<endl;
00133     report(DEBUG,"EvtGen") << "Decay of particle:"<<
00134       EvtPDL::name(p->getId()).c_str()<<"(channel:"<<
00135       p->getChannel()<<") with mass "<<p->mass()<<endl;
00136     
00137     int ii;
00138     for(ii=0;ii<p->getNDaug();ii++){
00139       report(DEBUG,"EvtGen") <<"Daughter "<<ii<<":"<<
00140         EvtPDL::name(p->getDaug(ii)->getId()).c_str()<<" with mass "<<
00141         p->getDaug(ii)->mass()<<endl;
00142     }                              
00143   }
00144 
00145 
00146   EvtSpinDensity rho_list[10];
00147 
00148   rho_list[0]=p->getSpinDensityForward();
00149    
00150 
00151   EvtAmp ampcont;
00152 
00153   if (_amp2._pstates!=1){
00154     ampcont=_amp2.contract(0,p->getSpinDensityForward());   // J2BB2 bugging here
00155 
00156   }
00157   else{
00158     ampcont=_amp2;
00159   }
00160 
00161           
00162 
00163   // it may be that the parent decay model has already
00164   // done the decay - this should be rare and the
00165   // model better know what it is doing..
00166   
00167   if ( !daugsDecayedByParentModel() ){
00168     
00169 
00170  //   report(INFO,"EvtGen") << "Found " << p->getNDaug() << " daughters\n";
00171     for(i=0;i<p->getNDaug();i++){
00172     
00173       rho.SetDim(_amp2.dstates[i]);
00174 
00175       if (_amp2.dstates[i]==1) {
00176         rho.Set(0,0,EvtComplex(1.0,0.0));
00177       }
00178       else{
00179         rho=ampcont.contract(_amp2._dnontrivial[i],_amp2);
00180       }
00181       
00182       if (!rho.Check()) {
00183         
00184         report(ERROR,"EvtGen") << "-------start error-------"<<endl;
00185         report(ERROR,"EvtGen")<<"forward rho failed Check:"<<
00186           EvtPDL::name(p->getId()).c_str()<<" "<<p->getChannel()<<" "<<i<<endl;
00187         
00188         report(ERROR,"EvtGen")<<"Parent:"<<EvtPDL::name(p->getParent()->getId()).c_str()<<endl;
00189         report(ERROR,"EvtGen")<<"GrandParent:"<<EvtPDL::name(p->getParent()->getParent()->getId()).c_str()<<endl;
00190         report(ERROR,"EvtGen")<<"GrandGrandParent:"<<EvtPDL::name(p->getParent()->getParent()->getParent()->getId()).c_str()<<endl;
00191         
00192         report(ERROR,"EvtGen") << rho;
00193         int ii; 
00194         _amp2.dump();
00195         
00196         for(ii=0;ii<i+1;ii++){
00197           report(ERROR,"EvtGen") << rho_list[ii];
00198         }
00199         report(ERROR,"EvtGen") << "-------Done with error-------"<<endl;  
00200       }
00201 
00202 
00203       
00204       p->getDaug(i)->setSpinDensityForward(rho);
00205 
00206 
00207      p->getDaug(i)->decay();
00208 
00209      rho_list[i+1]= p->getDaug(i)->getSpinDensityBackward();
00210 
00211       if (_amp2.dstates[i]!=1){
00212         ampcont=ampcont.contract(_amp2._dnontrivial[i],rho_list[i+1]);
00213       }
00214   
00215       
00216     }
00217 
00218     p->setSpinDensityBackward(_amp2.getBackwardSpinDensity(rho_list));
00219    
00220     
00221     if (!p->getSpinDensityBackward().Check()) {
00222       
00223       report(ERROR,"EvtGen")<<"rho_backward failed Check"<<
00224         p->getId().getId()<<" "<<p->getChannel()<<endl;
00225       
00226       report(ERROR,"EvtGen") << p->getSpinDensityBackward();
00227       
00228     }
00229   }
00230 
00231   if (getPHOTOS() || EvtRadCorr::alwaysRadCorr()) {
00232     EvtRadCorr::doRadCorr(p);
00233 
00234   }
00235 
00236 }

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

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

void EvtDecayBase::noProbMax  )  [inherited]
 

00305                             {
00306 
00307   defaultprobmax=0;
00308 
00309 }

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

Reimplemented in EvtBtoKD3P, and EvtVSSBMixCPT.

00105 { return _ndaug;}

void EvtDecayBase::printSummary  )  [inherited]
 

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 EvtD0mixDalitz::readPDGValues  )  [private]
 

00177 {
00178   // Define the EvtIds.
00179   _D0  = EvtPDL::getId( "D0"      );
00180   _D0B = EvtPDL::getId( "anti-D0" );
00181   _KM  = EvtPDL::getId( "K-"      );
00182   _KP  = EvtPDL::getId( "K+"      );
00183   _K0  = EvtPDL::getId( "K0"      );
00184   _K0B = EvtPDL::getId( "anti-K0" );
00185   _KL  = EvtPDL::getId( "K_L0"    );
00186   _KS  = EvtPDL::getId( "K_S0"    );
00187   _PIM = EvtPDL::getId( "pi-"     );
00188   _PIP = EvtPDL::getId( "pi+"     );
00189 
00190   // Read the relevant masses.
00191   _mD0 = EvtPDL::getMass( _D0  );
00192   _mKs = EvtPDL::getMass( _KS  );
00193   _mPi = EvtPDL::getMass( _PIP );
00194   _mK  = EvtPDL::getMass( _KP  );
00195 
00196   // Compute the decay rate from the parameter in the evt.pdl file.
00197   _ctau = EvtPDL::getctau( EvtPDL::getId( "D0" ) );
00198 
00199   //_iChi  = _qp * EvtComplex( 0.089723 , 0.0004776  ); // All resonances RBW, also Rho0.
00200 
00201   //_iChi  = _qp * EvtComplex( 0.0481807, 0.0003043  ); // KStarm only
00202   //_iChi  = _qp * EvtComplex( 0.0594099, 0.00023803 ); // All resonances RBW but GS Rho
00203   //_iChi  = _qp * EvtComplex( 0.0780186, 0.000417646 ); // All resonances for KsKK
00204   //_iChi2 = _qp * 1.;
00205 
00206   /*
00207   // Compute the gamma correction factor avgBeta = Gamma tau.
00208   //    Compute the norm of the unnormalized p(\beta).
00209   double factorY = ( 1. + abs( _iChi2 ) ) / 2. - _y * real( _iChi );
00210   double factorX = ( 1. - abs( _iChi2 ) ) / 2. + _x * imag( _iChi );
00211   double norm = factorY / ( 1. - pow( _y, 2 ) ) + factorX / ( 1. + pow( _x, 2 ) );
00212 
00213   //    Compute the integral of p(\beta) \beta d\beta.
00214   double termY = ( 1. + abs( _iChi2 ) ) / 2. - 2. * _y / ( 1. + pow( _y, 2 ) ) * real( _iChi );
00215   double termX = ( 1. - abs( _iChi2 ) ) / 2. + 2. * _x / ( 1. - pow( _x, 2 ) ) * imag( _iChi );
00216   double quotientY = ( 1. + pow( _y, 2 ) ) / pow( 1. - pow( _y, 2 ), 2 );
00217   double quotientX = ( 1. - pow( _x, 2 ) ) / pow( 1. + pow( _x, 2 ), 2 );
00218   double normTimesAvg = termY * quotientY + termX * quotientX;
00219 
00220   double avgBeta = normTimesAvg / norm;
00221 
00222   _gamma = avgBeta / _ctau;
00223   */
00224 
00225   _gamma = 1. / _ctau; // ALERT: Gamma is not 1 / tau.
00226 }

void EvtD0mixDalitz::reportInvalidAndExit  )  const [inline, private]
 

00097   {
00098     report( ERROR, "EvtD0mixDalitz" ) << "EvtD0mixDalitz: Invalid mode." << std::endl;
00099     exit( 1 );
00100   }

double EvtDecayBase::resetProbMax double  prob  )  [inherited]
 

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]
 

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 EvtDecayBase::setPHOTOS  )  [inline, inherited]
 

00069 {_photos=1;}

void EvtDecayBase::setProbMax double  prbmx  )  [inherited]
 

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

void EvtDecayBase::setSummary  )  [inline, inherited]
 

00071 {_summary=1;}

void EvtDecayBase::setVerbose  )  [inline, inherited]
 

00070 {_verbose=1;}

void EvtDecayAmp::setWeight double  weight  )  [inline, inherited]
 

00032 {_weight=weight;}

int EvtDecayBase::summary  )  [inline, inherited]
 

00078 {return _summary; }

int EvtDecayBase::verbose  )  [inline, inherited]
 

00079 {return _verbose; }

void EvtDecayAmp::vertex int *  i1,
const EvtComplex amp
[inline, inherited]
 

sets the amplitudes calculated in the decay objects

00061   { _amp2.vertex(i1,amp);}

void EvtDecayAmp::vertex int  i1,
int  i2,
int  i3,
const EvtComplex amp
[inline, inherited]
 

sets the amplitudes calculated in the decay objects

00055   {_amp2.vertex(i1,i2,i3,amp);}

void EvtDecayAmp::vertex int  i1,
int  i2,
const EvtComplex amp
[inline, inherited]
 

sets the amplitudes calculated in the decay objects

00048   {_amp2.vertex(i1,i2,amp);}

void EvtDecayAmp::vertex int  i1,
const EvtComplex amp
[inline, inherited]
 

sets the amplitudes calculated in the decay objects

00042 {_amp2.vertex(i1,amp);}

void EvtDecayAmp::vertex const EvtComplex amp  )  [inline, inherited]
 

sets the amplitudes calculated in the decay objects

00037 {_amp2.vertex(amp);}


Member Data Documentation

const EvtCyclic3::Pair & EvtD0mixDalitz::_AB = EvtCyclic3::AB [static, private]
 

const EvtCyclic3::Pair & EvtD0mixDalitz::_AC = EvtCyclic3::AC [static, private]
 

EvtAmp EvtDecayAmp::_amp2 [protected, inherited]
 

const EvtCyclic3::Pair & EvtD0mixDalitz::_BC = EvtCyclic3::BC [static, private]
 

double EvtD0mixDalitz::_ctau [private]
 

EvtId EvtD0mixDalitz::_D0 [private]
 

EvtId EvtD0mixDalitz::_D0B [private]
 

int EvtD0mixDalitz::_d1 [private]
 

int EvtD0mixDalitz::_d2 [private]
 

int EvtD0mixDalitz::_d3 [private]
 

bool EvtDecayBase::_daugsDecayedByParentModel [protected, inherited]
 

const EvtDalitzReso::CouplingType & EvtD0mixDalitz::_EtaPic = EvtDalitzReso::EtaPic [static, private]
 

double EvtD0mixDalitz::_gamma [private]
 

const EvtDalitzReso::NumType & EvtD0mixDalitz::_GS = EvtDalitzReso::GS_CLEO_ZEMACH [static, private]
 

EvtComplex EvtD0mixDalitz::_iChi [private]
 

EvtComplex EvtD0mixDalitz::_iChi2 [private]
 

bool EvtD0mixDalitz::_isKsPiPi [private]
 

bool EvtD0mixDalitz::_isRBWmodel [private]
 

EvtId EvtD0mixDalitz::_K0 [private]
 

EvtId EvtD0mixDalitz::_K0B [private]
 

EvtId EvtD0mixDalitz::_KL [private]
 

EvtId EvtD0mixDalitz::_KM [private]
 

const EvtDalitzReso::NumType & EvtD0mixDalitz::_KMAT = EvtDalitzReso::K_MATRIX [static, private]
 

EvtId EvtD0mixDalitz::_KP [private]
 

EvtId EvtD0mixDalitz::_KS [private]
 

double EvtD0mixDalitz::_mD0 [private]
 

double EvtD0mixDalitz::_mK [private]
 

double EvtD0mixDalitz::_mKs [private]
 

double EvtD0mixDalitz::_mPi [private]
 

const EvtDalitzReso::CouplingType & EvtD0mixDalitz::_PicPicKK = EvtDalitzReso::PicPicKK [static, private]
 

EvtId EvtD0mixDalitz::_PIM [private]
 

EvtId EvtD0mixDalitz::_PIP [private]
 

EvtComplex EvtD0mixDalitz::_qp [private]
 

const EvtDalitzReso::NumType & EvtD0mixDalitz::_RBW = EvtDalitzReso::RBW_CLEO_ZEMACH [static, private]
 

const EvtSpinType::spintype & EvtD0mixDalitz::_SCALAR = EvtSpinType::SCALAR [static, private]
 

const EvtSpinType::spintype & EvtD0mixDalitz::_TENSOR = EvtSpinType::TENSOR [static, private]
 

const EvtSpinType::spintype & EvtD0mixDalitz::_VECTOR = EvtSpinType::VECTOR [static, private]
 

double EvtD0mixDalitz::_x [private]
 

double EvtD0mixDalitz::_y [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:04:28 2011 for BOSS6.5.5 by  doxygen 1.3.9.1