MINT2
Public Member Functions | Private Attributes | List of all members
AmpRatios Class Reference

#include <AmpRatios.h>

Public Member Functions

 AmpRatios (const DalitzEventPattern &pattern)
 
bool getRatios (FitAmpSum &ampSum)
 

Private Attributes

DalitzMCIntegrator _integrator
 
DalitzEventPattern _pattern
 

Detailed Description

Definition at line 10 of file AmpRatios.h.

Constructor & Destructor Documentation

◆ AmpRatios()

AmpRatios::AmpRatios ( const DalitzEventPattern pattern)

Definition at line 12 of file AmpRatios.cpp.

13  : _pattern(pat)
14 {}
DalitzEventPattern _pattern
Definition: AmpRatios.h:13

Member Function Documentation

◆ getRatios()

bool AmpRatios::getRatios ( FitAmpSum ampSum)

Definition at line 16 of file AmpRatios.cpp.

16  {
17 
18  if(! _integrator.initialised()){
20  }
21 
22  double allInt = _integrator.getVal();
23  cout << " integrated all: " << allInt << endl;
24 
25  vector<double> results(ampSum.size());
26 
27  double ratioSum = 0;
28  for(unsigned int i=0; i< ampSum.size(); i++){
30  results[i] = _integrator.getVal();
31  double ratio = results[i]/allInt;
32  cout << " ratio " << i << ") "
33  << results[i] << " / " << allInt << " = "
34  << ratio << endl;
35  results[i] = ratio;
36  ratioSum += ratio;
37  }
38 
39  cout << "\n============ FRACTIONS =================" << endl;
40  for(unsigned int i=0; i< ampSum.size(); i++){
41  std::string name = ampSum.getAmpPtr(i)->name();
42 
43  /*
44  double a = ampSum.getAmpPtr(i)->AmpPhase().getAmp();
45  double siga = ampSum.getAmpPtr(i)->AmpPhase().getAmp().err();
46 
47  double aa = a*a;
48  double c = results[i]/aa;
49  double sigma = 2*c*a*siga;
50  */
51 
52  cout << name << "-fraction \t" << results[i] << endl;
53  //<< " +/- " << sigma << endl;
54 
55  }
56  cout << "----------------------------------------\n" << endl;
57 
58  cout << " Ratio sum " << ratioSum
59  << " (deviation from 1 due to interference effects) "
60  << endl;
61  cout << "\n========================================" << endl;
62 
63 
64  _integrator.resetIntegrand( &ampSum);
65 
66  return true;
67 }
virtual FitAmplitude * getAmpPtr(unsigned int i)
bool initialised() const
std::string name() const
Definition: FitAmplitude.h:213
DalitzMCIntegrator _integrator
Definition: AmpRatios.h:12
bool initialise(const DalitzEventPattern &pattern, MINT::IReturnRealForEvent< IDalitzEvent > *weightFunction=0, MINT::IEventGenerator< IDalitzEvent > *eventGenerator=0, TRandom *rnd=gRandom, double precision=1.e-2)
DalitzEventPattern _pattern
Definition: AmpRatios.h:13
virtual unsigned int size() const
bool resetIntegrand(MINT::IReturnRealForEvent< IDalitzEvent > *weightFunction=0)

Member Data Documentation

◆ _integrator

DalitzMCIntegrator AmpRatios::_integrator
private

Definition at line 12 of file AmpRatios.h.

◆ _pattern

DalitzEventPattern AmpRatios::_pattern
private

Definition at line 13 of file AmpRatios.h.


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