laura is hosted by Hepforge, IPPP Durham
Laura++  v3r4
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauGaussIncohRes.cc
Go to the documentation of this file.
1 
2 /*
3 Copyright 2014 University of Warwick
4 
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 */
17 
18 /*
19 Laura++ package authors:
20 John Back
21 Paul Harrison
22 Thomas Latham
23 */
24 
29 #include <iostream>
30 
31 #include "LauConstants.hh"
32 #include "LauGaussIncohRes.hh"
33 #include "LauKinematics.hh"
34 
36 
37 LauGaussIncohRes::LauGaussIncohRes(LauResonanceInfo* resInfo, const Int_t resPairAmpInt, const LauDaughters* daughters) :
38  LauAbsIncohRes(resInfo, resPairAmpInt, daughters)
39 {
40 }
41 
43 {
44 }
45 
47 {
48 }
49 
51 {
52  Int_t pair = this->getPairInt();
53  Double_t mass(0.);
54 
55  switch(pair) {
56  case 1:
57  mass = kinematics->getm23();
58  break;
59  case 2:
60  mass = kinematics->getm13();
61  break;
62  case 3:
63  mass = kinematics->getm12();
64  break;
65  default:
66  std::cerr << "ERROR in LauGaussIncohRes::intensityFactor : Incorrect daughter pair defined." << std::endl;
67  std::cerr << " Returning zero intensity." << std::endl;
68  return 0.;
69  }
70 
71  Double_t m0 = this->getMass();
72  Double_t G0 = this->getWidth();
73 
74  if(G0==0) {
75  std::cerr << "ERROR in LauGaussIncohRes::intensityFactor : Gaussian width cannot be zero." << std::endl;
76  std::cerr << " Returning zero intensity." << std::endl;
77  return 0.;
78  }
79 
80  Double_t exponent = -0.5 * ( mass - m0 ) * (mass - m0 ) / (G0*G0);
81  Double_t intensity = TMath::Exp(exponent);
82 
83  return intensity;
84 }
85 
86 const std::vector<LauParameter*>& LauGaussIncohRes::getFloatingParameters()
87 {
89 
90  if ( ! this->fixMass() ) {
91  this->addFloatingParameter( this->getMassPar() );
92  }
93  if ( ! this->fixWidth() ) {
94  this->addFloatingParameter( this->getWidthPar() );
95  }
96 
97  return this->getParameters();
98 }
99 
LauParameter * getMassPar()
Get the mass parameter of the resonance.
Bool_t fixWidth() const
Get the status of resonance width (fixed or released)
Double_t getMass() const
Get the mass of the resonance.
ClassImp(LauAbsCoeffSet)
Double_t getm23() const
Get the m23 invariant mass.
Class for defining the properties of a resonant particle.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:47
Abstract class for defining incoherent resonant amplitude models.
Int_t getPairInt() const
Get the integer to identify which DP axis the resonance belongs to.
File containing declaration of LauKinematics class.
Bool_t fixMass() const
Get the status of resonance mass (fixed or released)
void addFloatingParameter(LauParameter *param)
Add parameter to the list of floating parameters.
virtual ~LauGaussIncohRes()
Destructor.
Double_t getm13() const
Get the m13 invariant mass.
std::vector< LauParameter * > & getParameters()
Access the list of floating parameters.
LauParameter * getWidthPar()
Get the width parameter of the resonance.
Double_t getWidth() const
Get the width of the resonance.
Class for defining an incoherent resonance with a Gaussian mass dependence.
virtual Double_t intensityFactor(const LauKinematics *kinematics)
Get intensity factor.
Double_t getm12() const
Get the m12 invariant mass.
virtual void initialise()
Initialise the model.
File containing LauConstants namespace.
virtual const std::vector< LauParameter * > & getFloatingParameters()
Retrieve the resonance parameters, e.g. so that they can be loaded into a fit.
Class for calculating 3-body kinematic quantities.
File containing declaration of LauGaussIncohRes class.
void clearFloatingParameters()
Clear list of floating parameters.