MINT2
NonRes.cpp
Go to the documentation of this file.
1 // author: Nunya Business (ya.mum@bristol.ac.uk)
2 // status: Mon 22 Jul 2014 19:17:59 GMT
3 #include <iostream>
4 
8 
9 #include "Mint/NonRes.h"
10 
11 using namespace std;
12 using namespace MINT;
13 
15  const std::string& type, const std::string& namePrefix)
16  : BW_BW(tree, namePrefix)
17  , _type(type)
18  //, _alpha("NonRes::alpha", 1.0)
19 {
20  //cout << _alpha << endl;
21 }
22 
23 std::complex<double> NonRes::getVal( IDalitzEvent& evt ) {
24  setEventPtr(evt);
26 
27  const double m2hh = mumsRecoMass2()/GeV/GeV;
28 
29  std::vector<int> asi = _theDecay.getVal().asi();
30  double min = getEvent()->eventPattern().sijMin(asi)/(GeV*GeV);
31  double max = getEvent()->eventPattern().sijMax(asi)/(GeV*GeV);
32 
33  double x = 2.* (m2hh - min)/(max - min) - 1.;
34 
35  double non_res;
36  if( _type == "Exp" )
37  non_res = exp(-GetAlpha()*x);
38  else if( _type == "Pow" ){
39  non_res = 1.
40  + c1()*x
41  + c2()*(2.* pow(x,2) - 1.)
42  + c3()*(4.* pow(x,3) - 3.*x)
43  + c4()*(8.* pow(x,4) - 8.*pow(x,2)+1.)
44  + c5()*(16.* pow(x,5) - 20.*pow(x,3)+5.*x);
45  }
46  else if( _type == "EvtGen" ){
47  non_res = pow(pABSq(),GetAlpha());
48  }
49  else
50  non_res = 1.0;
51 
52  double formFactor= 1.;
53  if( _normBF == 1 ) formFactor = Fr();
54  else if( _normBF == 0 ) formFactor = Fr_PDG_BL();
55  else if(_normBF == 2 ) formFactor = Fr_BELLE(0.);
56 
57  return formFactor*non_res;
58 }
59 
60 
61 void NonRes::print( std::ostream& out ) const {
62  out << name();
63 }
64 
65 void NonRes::print( IDalitzEvent& evt, std::ostream& out ) {
66  setEventPtr(evt);
68  out << name()
69  << "\n\t> co-ordinate: " << getDalitzCoordinate()
70  << "\n\t> This is the decay I'm looking at:"
71  << "\n" << _theDecay
72  << "\n\t> These are a few values: "
73  << " startOfDecayChain? " << startOfDecayChain()
74  << ", BreitWigner = "
75  << BreitWigner()
76  << ", Blatt-Weisskopf penetration factor: "
77  << Fr()
78  << ", total BW_BW: "
79  << getVal(evt);
80 }
81 
82 double NonRes::GetAlpha() const {
83  return _RPL->get(mumsPID())->alpha();
84 }
85 
86 std::ostream& operator<<( std::ostream& out, const NonRes& amp ) {
87  amp.print(out);
88 
89  return out;
90 }
virtual std::complex< double > getVal(IDalitzEvent &evt)
Definition: NonRes.cpp:23
double sijMax(const MINT::PolymorphVector< int > &indices) const
ResonancePropertiesList * _RPL
Definition: BW_BW.h:97
virtual void resetInternals()
Definition: BW_BW.cpp:1114
Definition: NonRes.h:13
virtual double Fr()
Definition: BW_BW.cpp:710
const AssociatedDecayTree & _theDecay
Definition: BW_BW.h:69
bool setEventPtr(IDalitzEvent &evt) const
Definition: BW_BW.cpp:141
virtual int mumsPID() const
Definition: BW_BW.cpp:517
const ResonanceProperties * get(int i) const
const std::string _type
Definition: NonRes.h:71
const ValueType & getVal() const
Definition: DDTree.h:102
Definition: BW_BW.h:30
std::ostream & operator<<(std::ostream &out, const NonRes &amp)
Definition: NonRes.cpp:86
virtual double Fr_PDG_BL()
Definition: BW_BW.cpp:830
IDalitzEvent * getEvent() const
Definition: BW_BW.cpp:147
double sijMin(const MINT::PolymorphVector< int > &indices) const
virtual double mumsRecoMass2() const
Definition: BW_BW.cpp:548
virtual const DalitzEventPattern & eventPattern() const =0
virtual double pABSq()
Definition: BW_BW.cpp:1014
MINT::NamedParameter< int > _normBF
Definition: BW_BW.h:66
static const double GeV
virtual void print(std::ostream &out=std::cout) const
Definition: NonRes.cpp:61
virtual bool startOfDecayChain() const
Definition: BW_BW.cpp:532
double GetAlpha() const
Definition: NonRes.cpp:82
virtual double Fr_BELLE(double prSquared)
Definition: BW_BW.cpp:720
double c2() const
Definition: NonRes.h:59
const std::vector< int > & asi() const
double c3() const
Definition: NonRes.h:62
double c1() const
Definition: NonRes.h:56
NonRes(const AssociatedDecayTree &tree, const std::string &type="", const std::string &namePrefix="")
Definition: NonRes.cpp:14
double c4() const
Definition: NonRes.h:65
double c5() const
Definition: NonRes.h:68
virtual std::string name() const
Definition: NonRes.h:41
virtual std::complex< double > BreitWigner()
Definition: BW_BW.cpp:1093
virtual DalitzCoordinate getDalitzCoordinate(double nSigma=3) const
Definition: BW_BW.cpp:537