laura is hosted by Hepforge, IPPP Durham
Laura++  v2r1
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauPolNR.cc
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2004 - 2013.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 // Authors:
7 // Thomas Latham
8 // John Back
9 // Paul Harrison
10 
15 #include <iostream>
16 
17 #include "TMath.h"
18 
19 #include "LauPolNR.hh"
20 #include "LauDaughters.hh"
21 
23 
24 
25 LauPolNR::LauPolNR(const TString& resName, Double_t resMass, Double_t resWidth, Int_t resSpin,
26  Int_t resCharge, Int_t resPairAmpInt, const LauDaughters* daughters) :
27  LauAbsResonance(resName, resMass, resWidth, resSpin, resCharge, resPairAmpInt, daughters),
28  omega_(0.0),
29  order_(0)
30 {
31  this->ignoreMomenta(kTRUE);
32 }
33 
35 {
36 }
37 
39 {
40  const LauDaughters* daughters = this->getDaughters();
41  Int_t resPairAmpInt = this->getPairInt();
42  if ( daughters->gotSymmetricalDP() && resPairAmpInt != 3 ) {
43  std::cerr << "WARNING in LauPolNR::initialise : Dalitz plot is symmetric - this lineshape is not appropriate." << std::endl;
44  }
45 
46  TString name = this->getResonanceName();
47  if (name.EndsWith("0",TString::kExact)){
48  order_ = 0;
49  }
50  else if (name.EndsWith("1",TString::kExact)){
51  order_ = 1;
52  }
53  else if (name.EndsWith("2",TString::kExact)){
54  order_ = 2;
55  }
56  else if (name.EndsWith("3",TString::kExact)){
57  order_ = 3;
58  }
59  else{
60  std::cerr << "ERROR in LauPolNR::initialise : Resonance order unknown (known orders : 0, 1, 2 and 3)" << std::endl;
61  std::cerr << " : Defaulting to 0." << std::endl;
62  }
63 }
64 
65 LauComplex LauPolNR::resAmp(Double_t mass, Double_t spinTerm)
66 {
67  Double_t magnitude( spinTerm );
68 
69  Double_t massDiff = mass - omega_;
70  for ( UInt_t i(0); i < order_; ++i ) {
71  magnitude *= massDiff;
72  }
73 
74  LauComplex resAmplitude(magnitude, 0.0);
75 
76  return resAmplitude;
77 }
78 
virtual void initialise()
Initialise the model.
Definition: LauPolNR.cc:38
Double_t omega_
The offset parameter.
Definition: LauPolNR.hh:84
const TString & getResonanceName() const
Get the name of the resonance.
ClassImp(LauAbsCoeffSet)
const TString & name() const
The parameter name.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:33
File containing declaration of LauDaughters class.
const LauDaughters * getDaughters() const
Access the daughters object.
Int_t getPairInt() const
Get the integer to identify which DP axis the resonance belongs to.
Bool_t gotSymmetricalDP() const
Is Dalitz plot symmetric.
Definition: LauDaughters.hh:66
Class for defining the terms of Babar nonresonant model.
Definition: LauPolNR.hh:33
Abstract class for defining type for resonance amplitude models (Breit-Wigner, Flatte etc...
UInt_t order_
The order in the mass.
Definition: LauPolNR.hh:87
Class for defining a complex number.
Definition: LauComplex.hh:47
File containing declaration of LauPolNR class.
virtual LauComplex resAmp(Double_t mass, Double_t spinTerm)
Complex resonant amplitude.
Definition: LauPolNR.cc:65
virtual ~LauPolNR()
Destructor.
Definition: LauPolNR.cc:34