laura is hosted by Hepforge, IPPP Durham
Laura++  3.6.0
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauKMatrixProdSVP.cc
Go to the documentation of this file.
1 
2 /*
3 Copyright 2008 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 "LauKMatrixProdSVP.hh"
30 
31 #include "LauKMatrixPropagator.hh"
32 
33 #include <iostream>
34 
35 LauKMatrixProdSVP::LauKMatrixProdSVP( const TString& SVPName,
36  Int_t channelIndex,
37  Int_t resPairAmpInt,
38  LauKMatrixPropagator* propagator,
39  const LauDaughters* daughters,
40  Bool_t useProdAdler ) :
41  LauAbsResonance( SVPName, resPairAmpInt, daughters, propagator->getL( propagator->getIndex() ) ),
42  thePropagator_( propagator ),
43  channelIndex_( channelIndex - 1 ), // channelIndex goes from 1 to nChannels.
44  useProdAdler_( useProdAdler )
45 {
46  // Constructor
47  if ( useProdAdler_ ) {
48  std::cout << "Creating K matrix production SVP " << SVPName
49  << " with channelIndex = " << channelIndex
50  << " with s-dependent production Adler zero term" << std::endl;
51  } else {
52  std::cout << "Creating K matrix production SVP " << SVPName
53  << " with channelIndex = " << channelIndex
54  << " with production Adler zero factor = 1" << std::endl;
55  }
56 }
57 
59 {
60  // Destructor
61 }
62 
63 LauComplex LauKMatrixProdSVP::resAmp( const Double_t mass, const Double_t spinTerm )
64 {
65 
66  // Calculate the amplitude for the K-matrix production pole.
67  // First, make sure the K-matrix propagator is up-to-date for
68  // the given centre-of-mass squared value ("s") from the kinematics.
69  LauComplex amp( 0.0, 0.0 );
70 
71  if ( thePropagator_ == 0 ) {
72  std::cerr << "ERROR in LauKMatrixProdSVP::amplitude : The propagator is null" << std::endl;
73  return amp;
74  }
75 
76  // Get barrier factors ('resonance' factor is already accounted for internally via propagator 'Gamma' matrix)
77  Double_t fFactorB( 1.0 );
78 
79  const Int_t resSpin = this->getSpin();
80  const Double_t pstar = this->getPstar();
81 
82  if ( resSpin > 0 ) {
83  const LauBlattWeisskopfFactor* parBWFactor = this->getParBWFactor();
84  if ( parBWFactor != nullptr ) {
85  switch ( parBWFactor->getRestFrame() ) {
87  fFactorB = parBWFactor->calcFormFactor( this->getP() );
88  break;
90  fFactorB = parBWFactor->calcFormFactor( pstar );
91  break;
93  Double_t covFactor = this->getCovFactor();
94  if ( resSpin > 2 ) {
95  covFactor = TMath::Power( covFactor, 1.0 / resSpin );
96  } else if ( resSpin == 2 ) {
97  covFactor = TMath::Sqrt( covFactor );
98  }
99  fFactorB = parBWFactor->calcFormFactor( pstar * covFactor );
100  break;
101  }
102  }
103  }
104  }
105 
106  thePropagator_->updatePropagator( mass * mass );
107 
108  Double_t SVPTerm = thePropagator_->getProdSVPTerm();
109 
111 
112  // Include Adler zero factor if requested
113  Double_t adlerZero( 1.0 );
114  if ( useProdAdler_ ) {
115  adlerZero = thePropagator_->getAdlerZero();
116  }
117 
118  amp.rescale( SVPTerm * adlerZero );
119 
120  // Scale by the spin term
121  Double_t scale = spinTerm;
122 
123  // Include Blatt-Weisskopf barrier factor for parent
124  scale *= fFactorB;
125 
126  amp.rescale( scale );
127 
128  return amp;
129 }
130 
131 const std::vector<LauParameter*>& LauKMatrixProdSVP::getFloatingParameters()
132 {
133 
134  this->clearFloatingParameters();
135 
136  Int_t nChannels = thePropagator_->getNChannels();
137 
138  for ( int jChannel = 0; jChannel < nChannels; jChannel++ ) {
140  if ( ! par_f_.fixed() ) {
141  this->addFloatingParameter( &par_f_ );
142  }
143  }
144 
145  LauParameter& par_mSq0_ = thePropagator_->getmSq0();
146  if ( ! par_mSq0_.fixed() ) {
147  this->addFloatingParameter( &par_mSq0_ );
148  }
149 
150  LauParameter& par_s0Scatt_ = thePropagator_->gets0Scatt();
151  if ( ! par_s0Scatt_.fixed() ) {
152  this->addFloatingParameter( &par_s0Scatt_ );
153  }
154 
155  LauParameter& par_s0Prod_ = thePropagator_->gets0Prod();
156  if ( ! par_s0Prod_.fixed() ) {
157  this->addFloatingParameter( &par_s0Prod_ );
158  }
159 
160  LauParameter& par_sA_ = thePropagator_->getsA();
161  if ( ! par_sA_.fixed() ) {
162  this->addFloatingParameter( &par_sA_ );
163  }
164 
165  LauParameter& par_sA0_ = thePropagator_->getsA0();
166  if ( ! par_sA0_.fixed() ) {
167  this->addFloatingParameter( &par_sA0_ );
168  }
169 
170  return this->getParameters();
171 }
RestFrame getRestFrame() const
Retrieve the rest frame information.
Class for defining the fit parameter objects.
Definition: LauParameter.hh:49
LauParameter & getmSq0()
Get mSq0 production parameter.
Double_t calcFormFactor(const Double_t p) const
Calculate form factor value.
LauParameter & gets0Scatt()
Get s0Scatt production parameter.
LauBlattWeisskopfFactor * getParBWFactor()
Get the centrifugal barrier for the parent decay.
std::vector< LauParameter * > & getParameters()
Access the list of floating parameters.
Double_t getPstar() const
Get the current value of the bachelor momentum in the parent rest frame.
const std::vector< LauParameter * > & getFloatingParameters()
Retrieve the resonance parameters, e.g. so that they can be loaded into a fit.
Int_t channelIndex_
The number of the channel.
Int_t getSpin() const
Get the spin of the resonance.
Class for defining a complex number.
Definition: LauComplex.hh:61
void addFloatingParameter(LauParameter *param)
Add parameter to the list of floating parameters.
LauParameter & getsA0()
Get sA0 production parameter.
Double_t getCovFactor() const
Get the current value of the full spin-dependent covariant factor.
Class for defining a K-matrix propagator.
void rescale(Double_t scaleVal)
Scale this by a factor.
Definition: LauComplex.hh:301
Int_t getNChannels() const
Get the number of channels.
LauParameter & getsA()
Get sA production parameter.
void updatePropagator(const Double_t s)
Calculate the K-matrix propagator for the given s value.
virtual LauComplex resAmp(const Double_t mass, const Double_t spinTerm)
The amplitude calculation.
LauParameter & getScatteringParameter(const Int_t channel1Index, const Int_t channel2Index)
Get scattering parameters, set according to the input file.
Bool_t fixed() const
Check whether the parameter is fixed or floated.
LauKMatrixProdSVP(const TString &SVPName, Int_t channelIndex, Int_t resPairAmpInt, LauKMatrixPropagator *propagator, const LauDaughters *daughters, Bool_t useProdAdler=kFALSE)
Constructor.
LauParameter & gets0Prod()
Get s0 production parameter.
Double_t getAdlerZero() const
Get the Adler zero factor, which is set when updatePropagator is called.
File containing declaration of LauKMatrixProdSVP class.
void clearFloatingParameters()
Clear list of floating parameters.
Abstract class for defining type for resonance amplitude models (Breit-Wigner, Flatte etc....
File containing declaration of LauKMatrixPropagator class.
LauComplex getPropTerm(const Int_t channelIndex) const
Get the full complex propagator term for a given channel.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:47
Double_t getP() const
Get the current value of the bachelor momentum in the resonance rest frame.
Double_t getProdSVPTerm() const
Get the "slowly-varying part" term of the amplitude.
virtual ~LauKMatrixProdSVP()
Destructor.
LauKMatrixPropagator * thePropagator_
The K-matrix propagator.
Bool_t useProdAdler_
Boolean to turn on/off the production Adler zero factor.
Class that implements the Blatt-Weisskopf barrier factor.