LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenModels - EvtMultibody.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 29 0.0 %
Date: 2016-06-14 17:26:59 Functions: 0 8 0.0 %

          Line data    Source code
       1             : #include "EvtGenBase/EvtPatches.hh"
       2             : #include "EvtGenBase/EvtGenKine.hh"
       3             : #include "EvtGenBase/EvtPDL.hh"
       4             : #include "EvtGenBase/EvtReport.hh"
       5             : #include "EvtGenBase/EvtResonance.hh"
       6             : #include "EvtGenBase/EvtResonance2.hh"
       7             : #include "EvtGenModels/EvtMultibody.hh"
       8             : #include "EvtGenBase/EvtConst.hh"
       9             : #include "EvtGenBase/EvtdFunction.hh"
      10             : #include "EvtGenBase/EvtKine.hh"
      11             : #include "EvtGenBase/EvtParticle.hh"
      12             : 
      13             : EvtMultibody::~EvtMultibody() 
      14           0 : {
      15           0 :     if( _decayTree != NULL ) delete _decayTree;
      16           0 :     _decayTree=NULL;
      17           0 :     if( _ilist != NULL ) delete [] _ilist;
      18           0 :     _ilist=NULL;
      19           0 : }
      20             : 
      21             : std::string EvtMultibody::getName()
      22             : {
      23           0 :     return "D_MULTIBODY";
      24             : }
      25             : 
      26             : EvtDecayBase* EvtMultibody::clone()
      27             : {
      28           0 :     return new EvtMultibody;
      29           0 : }
      30             : 
      31             : void EvtMultibody::init()
      32             : {
      33           0 :     int N = getNArg();
      34             :  
      35           0 :     _decayTree = new EvtMTree( getDaugs(), getNDaug() );
      36           0 :     _ilist = new int[getNDaug()+1];
      37             : 
      38           0 :     for(int i=0; i<N-1; ++i) {
      39           0 :         if(getArgStr( i )=="RESONANCE") {
      40           0 :             _decayTree->addtree( getArgStr( ++i ) );
      41             :         } else {
      42           0 :             report(Severity::Error,"EvtGen")
      43           0 :                 << "Syntax error at " << getArgStr( i ) << std::endl;
      44           0 :             ::abort();
      45             :         }
      46             :     }
      47           0 : }
      48             : 
      49             : // Set the maximum probability amplitude - if function is left blank then the
      50             : // program will search for it.  This however is not deterministic and therefore
      51             : // in the release cannot be in place.
      52             : void EvtMultibody::initProbMax()
      53             : {
      54             :     // setProbMax(1.0);
      55           0 : }
      56             : 
      57             : void EvtMultibody::decay( EvtParticle *p )
      58             : {
      59             :     // Initialize the phase space before doing anything else!
      60           0 :     p->initializePhaseSpace(getNDaug(),getDaugs());
      61             : 
      62           0 :     EvtSpinAmp amp = _decayTree->amplitude( p );
      63             :     
      64           0 :     vector<int> index = amp.iterallowedinit();
      65           0 :     vector<unsigned int> spins = amp.dims();
      66             : 
      67             :     do {
      68           0 :         for( size_t i=0; i<index.size(); ++i ) {
      69           0 :             _ilist[i]=index[i]+spins[i];
      70             :         }
      71             :         
      72           0 :         vertex( _ilist, amp( index ) );
      73           0 :     } while( amp.iterateallowed( index ) );
      74             : 
      75           0 : }

Generated by: LCOV version 1.11