MINT2
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Eff4piSymmetric Class Reference

#include <Eff4piSymmetric.h>

Inheritance diagram for Eff4piSymmetric:
MINT::IReturnRealForEvent< IDalitzEvent >

Classes

class  ProdWithFitParameter
 

Public Member Functions

 Eff4piSymmetric (int order, const DalitzEventPattern &pat, MINT::MinuitParameterSet *pset=0)
 
virtual double getVal (double t01, double s12, double s23, double s34, double t40) const
 
virtual double getVal (const IDalitzEvent &evt) const
 
virtual double getVal (const IDalitzEvent *evt) const
 
virtual double RealVal (IDalitzEvent &evt)
 
void print (std::ostream &os=std::cout) const
 
void printCentreAndTypicalVal (std::ostream &os=std::cout) const
 
void fixZerothTherm ()
 
virtual ~Eff4piSymmetric ()
 
- Public Member Functions inherited from MINT::IReturnRealForEvent< IDalitzEvent >
virtual ~IReturnRealForEvent ()
 

Protected Member Functions

bool init ()
 
bool makeTerms ()
 
bool makeSijTijVectors ()
 
bool setCentreAndTypicalVal ()
 
virtual double getValFromSavedCoordinates () const
 
- Protected Member Functions inherited from MINT::IReturnRealForEvent< IDalitzEvent >
 IReturnRealForEvent ()
 

Protected Attributes

int _order
 
DalitzEventPattern _pat
 
MINT::MinuitParameterSet_pset
 
double _t01
 
double _s12
 
double _s23
 
double _s34
 
double _t40
 
double _t01_ctr
 
double _s12_ctr
 
double _s23_ctr
 
double _s34_ctr
 
double _t40_ctr
 
double _t01_del
 
double _s12_del
 
double _s23_del
 
double _s34_del
 
double _t40_del
 
std::vector< double * > _tijVec
 
std::vector< double * > _sijVec
 
std::vector< symMultiPolyTerm_tTerms
 
std::vector< symMultiPolyTerm_sTerms
 
std::vector< MINT::counted_ptr< ProdWithFitParameter > > _allTerms
 

Detailed Description

Definition at line 18 of file Eff4piSymmetric.h.

Constructor & Destructor Documentation

◆ Eff4piSymmetric()

Eff4piSymmetric::Eff4piSymmetric ( int  order,
const DalitzEventPattern pat,
MINT::MinuitParameterSet pset = 0 
)

Definition at line 8 of file Eff4piSymmetric.cpp.

11  : _order(order)
12  , _pat(pat)
13  , _pset(pset)
14 {
15  init();
16 }
DalitzEventPattern _pat
MINT::MinuitParameterSet * _pset

◆ ~Eff4piSymmetric()

virtual Eff4piSymmetric::~Eff4piSymmetric ( )
inlinevirtual

Definition at line 93 of file Eff4piSymmetric.h.

93 {}

Member Function Documentation

◆ fixZerothTherm()

void Eff4piSymmetric::fixZerothTherm ( )

Definition at line 145 of file Eff4piSymmetric.cpp.

145  {
146  if(0 != _allTerms.size()) _allTerms[0]->fp()->fix();
147 }
std::vector< MINT::counted_ptr< ProdWithFitParameter > > _allTerms

◆ getVal() [1/3]

double Eff4piSymmetric::getVal ( double  t01,
double  s12,
double  s23,
double  s34,
double  t40 
) const
virtual

Definition at line 110 of file Eff4piSymmetric.cpp.

111  {
112  _t01 = (t01 - _t01_ctr)/_t01_del;
113  _s12 = (s12 - _s12_ctr)/_s12_del;
114  _s23 = (s23 - _s23_ctr)/_s23_del;
115  _s34 = (s34 - _s34_ctr)/_s34_del;
116  _t40 = (t40 - _t40_ctr)/_t40_del;
117 
119 }
virtual double getValFromSavedCoordinates() const

◆ getVal() [2/3]

double Eff4piSymmetric::getVal ( const IDalitzEvent evt) const
virtual

Definition at line 120 of file Eff4piSymmetric.cpp.

120  {
121 
122  _t01 = (evt.t(0,1) - _t01_ctr)/_t01_del;
123  _s12 = (evt.s(1,2) - _s12_ctr)/_s12_del;
124  _s23 = (evt.s(2,3) - _s23_ctr)/_s23_del;
125  _s34 = (evt.s(3,4) - _s34_ctr)/_s34_del;
126  _t40 = (evt.t(4,0) - _t40_ctr)/_t40_del;
127 
128  // cout << "extracted sij" << endl;
130 }
virtual double t(unsigned int i, unsigned int j) const =0
virtual double getValFromSavedCoordinates() const
virtual double s(unsigned int i, unsigned int j) const =0

◆ getVal() [3/3]

virtual double Eff4piSymmetric::getVal ( const IDalitzEvent evt) const
inlinevirtual

Definition at line 81 of file Eff4piSymmetric.h.

81  {
82  // for backwards compatibility only, deprecated.
83  if(0 == evt) return 0;
84  return getVal(*evt);
85  }
virtual double getVal(double t01, double s12, double s23, double s34, double t40) const

◆ getValFromSavedCoordinates()

double Eff4piSymmetric::getValFromSavedCoordinates ( ) const
protectedvirtual

Definition at line 132 of file Eff4piSymmetric.cpp.

132  {
133  double sum=0;
134  for(unsigned int i=0; i < _allTerms.size(); i++){
135  sum += (_allTerms[i])->getVal(_tijVec, _sijVec);
136  }
137  return sum;
138 }
virtual double getVal(double t01, double s12, double s23, double s34, double t40) const
std::vector< double * > _sijVec
std::vector< double * > _tijVec
std::vector< MINT::counted_ptr< ProdWithFitParameter > > _allTerms

◆ init()

bool Eff4piSymmetric::init ( )
protected

Definition at line 18 of file Eff4piSymmetric.cpp.

18  {
19  bool success = true;
20  success &= setCentreAndTypicalVal();
21  success &= makeTerms();
22  success &= makeSijTijVectors();
23  return success;
24 }
bool setCentreAndTypicalVal()

◆ makeSijTijVectors()

bool Eff4piSymmetric::makeSijTijVectors ( )
protected

Definition at line 92 of file Eff4piSymmetric.cpp.

92  {
93  _tijVec.push_back(&_t01);
94  _tijVec.push_back(&_t40);
95 
96  _sijVec.push_back(&_s12);
97  _sijVec.push_back(&_s23);
98  _sijVec.push_back(&_s34);
99 
100  return true;
101 }
std::vector< double * > _sijVec
std::vector< double * > _tijVec

◆ makeTerms()

bool Eff4piSymmetric::makeTerms ( )
protected

Definition at line 25 of file Eff4piSymmetric.cpp.

25  {
26  // cout << "Hello from Eff4piSymmetric::init()" << endl;
27  for(int i=0; i <= _order; i++){
28  _tTerms.push_back(symMultiPolyTerm(2,i));
29  _sTerms.push_back(symMultiPolyTerm(3,i));
30  }
31 
32  double initVal = 1; // make 1st one 1, all others 0
33  for(int thisOrder = 0; thisOrder <= _order; thisOrder++){
34  for(int tord = 0; tord <= thisOrder; tord++){
35  int sord = thisOrder - tord;
36  symMultiPolyTerm& tTermsTord(_tTerms[tord]);
37  symMultiPolyTerm& sTermsSord(_sTerms[sord]);
38 
39  double guessError = 1.0/(10*pow(3.0, thisOrder));
40 
41  for(unsigned int ti = 0; ti < tTermsTord.size(); ti++){
42  for(unsigned int si = 0; si < sTermsSord.size(); si++){
44  ptr(new ProdWithFitParameter(tTermsTord[ti], sTermsSord[si]
45  , "a"
46  , initVal
47  , guessError
48  , _pset
49  )
50  );
51  _allTerms.push_back(ptr);
52  initVal=0; // make 1st one 1, all others 0
53  }
54 
55  }
56  }
57  }
58  return true;
59 }
std::vector< symMultiPolyTerm > _sTerms
std::vector< MINT::counted_ptr< ProdWithFitParameter > > _allTerms
std::vector< symMultiPolyTerm > _tTerms
MINT::MinuitParameterSet * _pset

◆ print()

void Eff4piSymmetric::print ( std::ostream &  os = std::cout) const

Definition at line 103 of file Eff4piSymmetric.cpp.

103  {
104  for(unsigned int i=0; i < _allTerms.size(); i++){
105  if(0 != i) os << "\n\t + ";
106  os << *(_allTerms[i]);
107  }
108 }
std::vector< MINT::counted_ptr< ProdWithFitParameter > > _allTerms

◆ printCentreAndTypicalVal()

void Eff4piSymmetric::printCentreAndTypicalVal ( std::ostream &  os = std::cout) const

Definition at line 78 of file Eff4piSymmetric.cpp.

78  {
79  os << "Eff4piSymmetric: Centre: "
80  << _t01_ctr << ", " << _s12_ctr
81  << ", " << _s23_ctr << ", " << _s34_ctr
82  << ", " << _t40_ctr
83  << endl;
84  os << "... and widths: "
85  << _t01_del << ", " << _s12_del
86  << ", " << _s23_del << ", " << _s34_del
87  << ", " << _t40_del
88  << endl;
89 
90 }

◆ RealVal()

double Eff4piSymmetric::RealVal ( IDalitzEvent evt)
virtual

Implements MINT::IReturnRealForEvent< IDalitzEvent >.

Definition at line 140 of file Eff4piSymmetric.cpp.

140  {
141  // cout << "Hello from Eff4piSymmetric::RealVal()" << endl;
142  return this->getVal(evt);
143 }
virtual double getVal(double t01, double s12, double s23, double s34, double t40) const

◆ setCentreAndTypicalVal()

bool Eff4piSymmetric::setCentreAndTypicalVal ( )
protected

Definition at line 61 of file Eff4piSymmetric.cpp.

61  {
62  _t01_ctr = (_pat.sijMax(2,3,4) + _pat.sijMin(2,3,4) ) / 2.0;
63  _s12_ctr = (_pat.sijMax(1,2) + _pat.sijMin(1,2) ) / 2.0;
64  _s23_ctr = (_pat.sijMax(2,3) + _pat.sijMin(2,3) ) / 2.0;
65  _s34_ctr = (_pat.sijMax(3,4) + _pat.sijMin(3,4) ) / 2.0;
66  _t40_ctr = (_pat.sijMax(1,2,3) + _pat.sijMin(1,2,3) ) / 2.0;
67 
68  _t01_del = fabs(_pat.sijMax(2,3,4) - _pat.sijMin(2,3,4) ) / 2.0;
69  _s12_del = fabs(_pat.sijMax(1,2) - _pat.sijMin(1,2) ) / 2.0;
70  _s23_del = fabs(_pat.sijMax(2,3) - _pat.sijMin(2,3) ) / 2.0;
71  _s34_del = fabs(_pat.sijMax(3,4) - _pat.sijMin(3,4) ) / 2.0;
72  _t40_del = fabs(_pat.sijMax(1,2,3) - _pat.sijMin(1,2,3) ) / 2.0;
73 
75  return true;
76 }
double sijMax(const MINT::PolymorphVector< int > &indices) const
DalitzEventPattern _pat
double sijMin(const MINT::PolymorphVector< int > &indices) const
void printCentreAndTypicalVal(std::ostream &os=std::cout) const

Member Data Documentation

◆ _allTerms

std::vector< MINT::counted_ptr< ProdWithFitParameter > > Eff4piSymmetric::_allTerms
protected

Definition at line 63 of file Eff4piSymmetric.h.

◆ _order

int Eff4piSymmetric::_order
protected

Definition at line 48 of file Eff4piSymmetric.h.

◆ _pat

DalitzEventPattern Eff4piSymmetric::_pat
protected

Definition at line 50 of file Eff4piSymmetric.h.

◆ _pset

MINT::MinuitParameterSet* Eff4piSymmetric::_pset
protected

Definition at line 51 of file Eff4piSymmetric.h.

◆ _s12

double Eff4piSymmetric::_s12
mutableprotected

Definition at line 56 of file Eff4piSymmetric.h.

◆ _s12_ctr

double Eff4piSymmetric::_s12_ctr
protected

Definition at line 57 of file Eff4piSymmetric.h.

◆ _s12_del

double Eff4piSymmetric::_s12_del
protected

Definition at line 58 of file Eff4piSymmetric.h.

◆ _s23

double Eff4piSymmetric::_s23
mutableprotected

Definition at line 56 of file Eff4piSymmetric.h.

◆ _s23_ctr

double Eff4piSymmetric::_s23_ctr
protected

Definition at line 57 of file Eff4piSymmetric.h.

◆ _s23_del

double Eff4piSymmetric::_s23_del
protected

Definition at line 58 of file Eff4piSymmetric.h.

◆ _s34

double Eff4piSymmetric::_s34
mutableprotected

Definition at line 56 of file Eff4piSymmetric.h.

◆ _s34_ctr

double Eff4piSymmetric::_s34_ctr
protected

Definition at line 57 of file Eff4piSymmetric.h.

◆ _s34_del

double Eff4piSymmetric::_s34_del
protected

Definition at line 58 of file Eff4piSymmetric.h.

◆ _sijVec

std::vector<double* > Eff4piSymmetric::_sijVec
mutableprotected

Definition at line 60 of file Eff4piSymmetric.h.

◆ _sTerms

std::vector<symMultiPolyTerm> Eff4piSymmetric::_sTerms
protected

Definition at line 62 of file Eff4piSymmetric.h.

◆ _t01

double Eff4piSymmetric::_t01
mutableprotected

Definition at line 56 of file Eff4piSymmetric.h.

◆ _t01_ctr

double Eff4piSymmetric::_t01_ctr
protected

Definition at line 57 of file Eff4piSymmetric.h.

◆ _t01_del

double Eff4piSymmetric::_t01_del
protected

Definition at line 58 of file Eff4piSymmetric.h.

◆ _t40

double Eff4piSymmetric::_t40
mutableprotected

Definition at line 56 of file Eff4piSymmetric.h.

◆ _t40_ctr

double Eff4piSymmetric::_t40_ctr
protected

Definition at line 57 of file Eff4piSymmetric.h.

◆ _t40_del

double Eff4piSymmetric::_t40_del
protected

Definition at line 58 of file Eff4piSymmetric.h.

◆ _tijVec

std::vector<double* > Eff4piSymmetric::_tijVec
mutableprotected

Definition at line 60 of file Eff4piSymmetric.h.

◆ _tTerms

std::vector<symMultiPolyTerm> Eff4piSymmetric::_tTerms
protected

Definition at line 62 of file Eff4piSymmetric.h.


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