laura is hosted by Hepforge, IPPP Durham
Laura++  v3r5
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauBlattWeisskopfFactor.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 "TMath.h"
32 
34 #include "LauParameter.hh"
35 #include "LauResonanceInfo.hh"
36 
38 
39 
40 // Constructor
41 LauBlattWeisskopfFactor::LauBlattWeisskopfFactor( const LauResonanceInfo& resInfo, const BarrierType barrierType, const RestFrame restFrame, const BlattWeisskopfCategory category ) :
42  spin_(resInfo.getSpin()),
43  radius_(new LauParameter("NEED_A_GOOD_NAME",resInfo.getBWRadius(),0.0,10.0,kTRUE)),
44  barrierType_(barrierType),
45  restFrame_(restFrame)
46 {
47  TString categoryName = this->setRadiusName( resInfo, category );
48  std::cout << "INFO in LauBlattWeisskopfFactor constructor : creating radius parameter for category \"" << categoryName << "\", with initial value " << resInfo.getBWRadius() << std::endl;
49 }
50 
51 LauBlattWeisskopfFactor::LauBlattWeisskopfFactor( const LauResonanceInfo& resInfo, const Double_t resRadius, const BarrierType barrierType, const RestFrame restFrame, const BlattWeisskopfCategory category ) :
52  spin_(resInfo.getSpin()),
53  radius_(new LauParameter("NEED_A_GOOD_NAME",resRadius,0.0,10.0,kTRUE)),
54  barrierType_(barrierType),
55  restFrame_(restFrame)
56 {
57  TString categoryName = this->setRadiusName( resInfo, category );
58  std::cout << "INFO in LauBlattWeisskopfFactor constructor : creating radius parameter for category \"" << categoryName << "\", with initial value " << resRadius << std::endl;
59 }
60 
62 {
63 }
64 
66  spin_(newSpin),
67  radius_(other.radius_->createClone()),
68  barrierType_(other.barrierType_),
69  restFrame_(other.restFrame_)
70 {
71 }
72 
74 {
75  TString name = "BarrierRadius_";
76  TString categoryName;
77 
78  switch (category) {
79  case Parent :
80  categoryName = "Parent";
81  break;
82  case Indep :
83  categoryName = resInfo.getSanitisedName();
84  break;
85  case Light :
86  categoryName = "Light";
87  break;
88  case Kstar :
89  categoryName = "Kstar";
90  break;
91  case Charm :
92  categoryName = "Charm";
93  break;
94  case StrangeCharm :
95  categoryName = "StrangeCharm";
96  break;
97  case Charmonium :
98  categoryName = "Charmonium";
99  break;
100  case Beauty :
101  categoryName = "Beauty";
102  break;
103  case StrangeBeauty :
104  categoryName = "StrangeBeauty";
105  break;
106  case CharmBeauty :
107  categoryName = "CharmBeauty";
108  break;
109  case Custom1 :
110  categoryName = "Custom1";
111  break;
112  case Custom2 :
113  categoryName = "Custom2";
114  break;
115  case Custom3 :
116  categoryName = "Custom3";
117  break;
118  case Custom4 :
119  categoryName = "Custom4";
120  break;
121  default :
122  categoryName = "Unknown";
123  break;
124  }
125 
126  name.Append(categoryName);
127  radius_->name(name);
128 
129  return categoryName;
130 }
131 
133 {
134  LauBlattWeisskopfFactor* clone = new LauBlattWeisskopfFactor( *this, newSpin );
135  return clone;
136 }
137 
138 Double_t LauBlattWeisskopfFactor::calcFormFactor( const Double_t p ) const
139 {
140  // Calculate the requested form factor for the resonance, given the momentum value
141  Double_t fFactor(1.0);
142 
143  // For scalars the form factor is always unity
144  // TODO: and we currently don't have formulae for spin > 5
145  if ( (spin_ == 0) || (spin_ > 5) ) {
146  return fFactor;
147  }
148 
149  const Double_t radius = radius_->unblindValue();
150  const Double_t z = radius*radius*p*p;
151 
152  if ( barrierType_ == BWBarrier ) {
153  if (spin_ == 1) {
154  fFactor = TMath::Sqrt(2.0*z/(z + 1.0));
155  } else if (spin_ == 2) {
156  fFactor = TMath::Sqrt(13.0*z*z/(z*z + 3.0*z + 9.0));
157  } else if (spin_ == 3) {
158  fFactor = TMath::Sqrt(277.0*z*z*z/(z*z*z + 6.0*z*z + 45.0*z + 225.0));
159  } else if (spin_ == 4) {
160  fFactor = TMath::Sqrt(12746.0*z*z*z*z/(z*z*z*z + 10.0*z*z*z + 135.0*z*z + 1575.0*z + 11025.0));
161  } else if (spin_ == 5) {
162  fFactor = TMath::Sqrt(998881.0*z*z*z*z*z/(z*z*z*z*z + 15.0*z*z*z*z + 315.0*z*z*z + 6300.0*z*z + 99225.0*z + 893025.0));
163  }
164  } else if ( barrierType_ == BWPrimeBarrier ) {
165  if (spin_ == 1) {
166  fFactor = TMath::Sqrt(1.0/(z + 1.0));
167  } else if (spin_ == 2) {
168  fFactor = TMath::Sqrt(1.0/(z*z + 3.0*z + 9.0));
169  } else if (spin_ == 3) {
170  fFactor = TMath::Sqrt(1.0/(z*z*z + 6.0*z*z + 45.0*z + 225.0));
171  } else if (spin_ == 4) {
172  fFactor = TMath::Sqrt(1.0/(z*z*z*z + 10.0*z*z*z + 135.0*z*z + 1575.0*z + 11025.0));
173  } else if (spin_ == 5) {
174  fFactor = TMath::Sqrt(1.0/(z*z*z*z*z + 15.0*z*z*z*z + 315.0*z*z*z + 6300.0*z*z + 99225.0*z + 893025.0));
175  }
176  } else if ( barrierType_ == ExpBarrier ) {
177  if (spin_ == 1) {
178  fFactor = TMath::Exp( -TMath::Sqrt(z) );
179  } else if (spin_ == 2) {
180  fFactor = TMath::Exp( -z );
181  } else if (spin_ == 3) {
182  fFactor = TMath::Exp( -TMath::Sqrt(z*z*z) );
183  } else if (spin_ == 4) {
184  fFactor = TMath::Exp( -z*z );
185  } else if (spin_ == 5) {
186  fFactor = TMath::Exp( -TMath::Sqrt(z*z*z*z*z) );
187  }
188  }
189 
190  return fFactor;
191 }
192 
File containing declaration of LauResonanceInfo class.
ClassImp(LauAbsCoeffSet)
Class for defining the properties of a resonant particle.
TString getSanitisedName() const
Retrieve the sanitised name of the resonant particle.
const TString & name() const
The parameter name.
Double_t calcFormFactor(const Double_t p) const
Calculate form factor value.
LauParameter * radius_
Radius parameter.
virtual ~LauBlattWeisskopfFactor()
Destructor.
Bool_t clone() const
Check whether is a clone or not.
File containing declaration of LauBlattWeisskopfFactor class.
File containing declaration of LauParameter class.
const BarrierType barrierType_
Barrier type.
Class for defining the fit parameter objects.
Definition: LauParameter.hh:49
BarrierType
Define the allowed types of barrier factors.
const UInt_t spin_
Resonance spin.
TString setRadiusName(const LauResonanceInfo &resInfo, const BlattWeisskopfCategory category)
Set the name of the radius parameter.
RestFrame
Define the rest frame in which the momentum should be calculated (only relevant for bachelor) ...
Double_t unblindValue() const
The unblinded value of the parameter.
Class that implements the Blatt-Weisskopf barrier factor.
LauParameter * createClone(Double_t constFactor=1.0)
Method to create a clone from the parent parameter using the copy constructor.
LauBlattWeisskopfFactor * createClone(const UInt_t newSpin)
Method to create a new factor with cloned radius parameter.
BlattWeisskopfCategory
Define resonance categories that will share common barrier factor radii.
LauBlattWeisskopfFactor(const LauResonanceInfo &resInfo, const BarrierType barrierType, const RestFrame restFrame, const BlattWeisskopfCategory category)
Constructor.