00001 //-------------------------------------------------------------------------- 00002 // 00003 // Environment: 00004 // This software is part of the EvtGen package developed jointly 00005 // for the BaBar and CLEO collaborations. If you use all or part 00006 // of it, please give an appropriate acknowledgement. 00007 // 00008 // Copyright Information: See EvtGen/COPYRIGHT 00009 // Copyright (C) 1998 Caltech, UCSB 00010 // 00011 // Module: EvtGen/EvtDecayIncoherent.cc 00012 // 00013 // Description: 00014 // 00015 // Modification history: 00016 // 00017 // DJL/RYD August 11, 1998 Module created 00018 // 00019 //------------------------------------------------------------------------ 00020 #include "EvtGenBase/EvtPatches.hh" 00021 00022 #include "EvtGenBase/EvtDecayBase.hh" 00023 #include "EvtGenBase/EvtDecayIncoherent.hh" 00024 #include "EvtGenBase/EvtParticle.hh" 00025 #include "EvtGenBase/EvtRadCorr.hh" 00026 #include "EvtGenBase/EvtReport.hh" 00027 #include "EvtGenBase/EvtPDL.hh" 00028 00029 void EvtDecayIncoherent::makeDecay(EvtParticle* p){ 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 } 00076 00077 00078 00079 00080 00081 00082