BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtMTree Class Reference

#include <EvtMTree.hh>

Public Member Functions

 EvtMTree (const EvtId *idtbl, int ndaug)
 ~EvtMTree ()
EvtSpinAmp amplitude (const vector< EvtVector4R > &product) const
void addtree (const string &args)

Detailed Description

Definition at line 21 of file EvtMTree.hh.

Constructor & Destructor Documentation

◆ EvtMTree()

EvtMTree::EvtMTree ( const EvtId * idtbl,
int ndaug )

Definition at line 20 of file EvtMTree.cc.

20 {
21 for ( int i = 0; i < ndaug; ++i ) { _lbltbl.push_back( EvtPDL::name( idtbl[i] ) ); }
22}
static std::string name(EvtId i)
Definition EvtPDL.hh:70

◆ ~EvtMTree()

EvtMTree::~EvtMTree ( )

Definition at line 24 of file EvtMTree.cc.

24 {
25 for ( int i = 0; i < _root.size(); ++i ) delete _root[i];
26}

Member Function Documentation

◆ addtree()

void EvtMTree::addtree ( const string & args)

Definition at line 360 of file EvtMTree.cc.

360 {
361 vector<EvtMNode*> roots = parsenode( str, true );
362 _norm = 0;
363
364 for ( int i = 0; i < roots.size(); ++i )
365 {
366 if ( validTree( roots[i] ) )
367 {
368 _root.push_back( roots[i] );
369 _norm = _norm + 1;
370 }
371 else delete roots[i];
372 }
373
374 _norm = 1.0 / sqrt( _norm );
375}

◆ amplitude()

EvtSpinAmp EvtMTree::amplitude ( const vector< EvtVector4R > & product) const

Definition at line 377 of file EvtMTree.cc.

377 {
378 if ( _root.size() == 0 )
379 {
380 report( ERROR, "EvtGen" ) << "No decay tree present." << endl;
381 ::abort();
382 }
383
384 EvtSpinAmp amp = _root[0]->amplitude( product );
385 for ( int i = 1; i < _root.size(); ++i )
386 {
387 // Assume that helicity amplitude is returned and rotate to standard
388 // amplitude here, do this before adding the amplitudes (different
389 // frames?)
390 amp += _root[i]->amplitude( product );
391 }
392
393 return _norm * amp;
394}
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ ERROR
Definition EvtReport.hh:49

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