laura is hosted by Hepforge, IPPP Durham
Laura++  v2r2
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauIsobarDynamics.hh
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2005 - 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 
19 #ifndef LAU_ISOBAR_DYNAMICS
20 #define LAU_ISOBAR_DYNAMICS
21 
22 #include <vector>
23 
24 #include "TString.h"
25 
26 #include "LauAbsDPDynamics.hh"
27 #include "LauAbsResonance.hh"
28 #include "LauComplex.hh"
29 
30 class LauDaughters;
31 class LauAbsEffModel;
32 class LauFitDataTree;
34 
36 
37  public:
39 
44  LauIsobarDynamics(LauDaughters* daughters, LauAbsEffModel* effModel, LauAbsEffModel* scfFractionModel = 0);
45 
47 
52  LauIsobarDynamics(LauDaughters* daughters, LauAbsEffModel* effModel, LauTagCatScfFractionModelMap scfFractionModel);
53 
55  virtual ~LauIsobarDynamics();
56 
58 
61  virtual void initialise(const std::vector<LauComplex>& coeffs);
62 
64 
67  inline void setIntFileName(const TString& fileName) {intFileName_ = fileName;}
68 
69  // Integration
71 
75  virtual void setIntegralBinWidths(Double_t m13BinWidth, Double_t m23BinWidth);
76 
78 
84  virtual LauAbsResonance* addResonance(const TString& resName, const Int_t resPairAmpInt, const LauAbsResonance::LauResonanceModel resType);
85 
87 
95  virtual void defineKMatrixPropagator(const TString& propName, const TString& paramFileName,
96  Int_t resPairAmpInt, Int_t nChannels, Int_t nPoles, Int_t rowIndex = 1);
97 
99 
104  virtual void addKMatrixProdPole(const TString& poleName, const TString& propName, Int_t poleIndex);
105 
107 
112  virtual void addKMatrixProdSVP(const TString& SVPName, const TString& propName, Int_t channelIndex);
113 
115 
122  virtual void changeResonance(const TString& resName, Double_t newMass = -1.0, Double_t newWidth = -1.0, Int_t newSpin = -1);
123 
125 
128  virtual Bool_t generate();
129 
131 
136  virtual ToyMCStatus checkToyMC(Bool_t printErrorMessages = kTRUE, Bool_t printInfoMessages = kFALSE);
137 
139 
142  inline Int_t maxGenIterations() const {return iterationsMax_;}
143 
145 
148  virtual void calcLikelihoodInfo(UInt_t iEvt);
149 
151 
155  virtual void calcLikelihoodInfo(Double_t m13Sq, Double_t m23Sq);
156 
158 
164  virtual void calcLikelihoodInfo(Double_t m13Sq, Double_t m23Sq, Int_t tagCat);
165 
167 
170  virtual const LauComplex& getEvtDPAmp() const {return totAmp_;}
171 
173 
176  virtual Double_t getEvtm13Sq() const {return m13Sq_;}
177 
179 
182  virtual Double_t getEvtm23Sq() const {return m23Sq_;}
183 
185 
188  virtual Double_t getEvtmPrime() const {return mPrime_;}
189 
191 
194  virtual Double_t getEvtthPrime() const {return thPrime_;}
195 
197 
200  virtual Double_t getEvtEff() const {return eff_;}
201 
203 
206  virtual Double_t getEvtScfFraction() const {return scfFraction_;}
207 
209 
212  virtual Double_t getEvtJacobian() const {return jacobian_;}
213 
215 
220  virtual Double_t getEvtLikelihood() const {return evtLike_;}
221 
223 
226  virtual void calcExtraInfo(Bool_t init = kFALSE);
227 
229 
233  virtual Bool_t gotReweightedEvent();
234 
236 
239  virtual Double_t getEventWeight();
240 
242 
245  inline void setASqMaxValue(Double_t value) {aSqMaxSet_ = value;}
246 
248 
251  inline Double_t getASqMaxSetValue() const { return aSqMaxSet_; }
252 
254 
257  inline Double_t getASqMaxVarValue() const { return aSqMaxVar_; }
258 
260 
264  virtual LauComplex getDynamicAmp(Int_t resID) const {return ff_[resID].scale(fNorm_[resID]);}
265 
267 
270  inline const std::vector< std::vector<LauComplex> >& getFiFjSum() const {return fifjSum_;}
271 
273 
276  inline const std::vector< std::vector<LauComplex> >& getFiFjEffSum() const {return fifjEffSum_;}
277 
279 
282  inline const std::vector<Double_t>& getFNorm() const {return fNorm_;}
283 
285 
288  virtual void fillDataTree(const LauFitDataTree& fitDataTree);
289 
291 
294  virtual void setDataEventNo(UInt_t iEvt);
295 
297 
302  inline void setBarrierRadii( Double_t resRadius, Double_t parRadius = 4.0,
304  {
305  setBarrierRadius_ = kTRUE;
306  resBarrierRadius_ = resRadius;
307  parBarrierRadius_ = parRadius;
308  barrierType_ = type;
309  }
310 
312 
315  inline void setResBarrierRadius(Double_t radius) {setBarrierRadius_ = kTRUE; resBarrierRadius_ = radius;}
316 
318 
321  inline void setParBarrierRadius(Double_t radius) {setBarrierRadius_ = kTRUE; parBarrierRadius_ = radius;}
322 
324 
328 
330 
333  inline Double_t getResBarrierRadius() const {return resBarrierRadius_;}
334 
336 
339  inline Double_t getParBarrierRadius() const {return parBarrierRadius_;}
340 
342 
345  inline void flipHelicityForCPEigenstates(Bool_t boolean) {flipHelicity_ = boolean;}
346 
347  protected:
349  virtual void initSummary();
350 
352  virtual void initialiseVectors();
353 
355  virtual void calcDPNormalisation();
356 
358 
366  virtual void calcDPPartialIntegral(Double_t minm13, Double_t maxm13, Double_t minm23,
367  Double_t maxm23, Double_t m13BinWidth, Double_t m23BinWidth);
368 
370  virtual void writeIntegralsFile();
371 
373 
378  virtual void setFFTerm(UInt_t index, Double_t realPart, Double_t imagPart);
379 
381 
386  virtual void dynamics(Bool_t cacheResData = kTRUE, Double_t weight = 1.0, Bool_t useEff = kTRUE);
387 
389 
392  inline void setASqMaxVarValue(Double_t value) {aSqMaxVar_ = value;}
393 
395 
398  virtual Double_t calcSigDPNorm();
399 
401 
404  virtual LauComplex resAmp(Int_t index);
405 
407 
411  virtual LauAbsResonance* findResonance(const TString& name);
412 
414 
418  virtual const LauAbsResonance* findResonance(const TString& name) const;
419 
421 
424  virtual void removeCharge(TString& string) const;
425 
427 
432  Bool_t gotKMatrixMatch(UInt_t resAmpInt, const TString& propName) const;
433 
434  private:
436  typedef std::map<TString, LauKMatrixPropagator*> KMPropMap;
437 
439  typedef std::map<TString, TString> KMStringMap;
440 
442  std::vector<LauAbsResonance*> sigResonances_;
443 
446 
449 
451  std::vector<TString> resTypAmp_;
452 
454  std::vector<Int_t> resIntAmp_;
455 
457  std::vector<Int_t> resPairAmp_;
458 
460  std::vector<Int_t> typDaug_;
461 
464 
467 
469  TString intFileName_;
470 
472  Double_t m13BinWidth_;
473 
475  Double_t m23BinWidth_;
476 
478  Double_t m13Sq_;
479 
481  Double_t m23Sq_;
482 
484  Double_t mPrime_;
485 
487  Double_t thPrime_;
488 
490  Double_t eff_;
491 
493  Double_t scfFraction_;
494 
496  Double_t jacobian_;
497 
499  Double_t ASq_;
500 
502  Double_t evtLike_;
503 
506 
508 
511  std::vector< std::vector<LauComplex> > fifjEffSum_;
512 
514 
517  std::vector< std::vector<LauComplex> > fifjSum_;
518 
520  std::vector<LauComplex> ff_;
521 
523  std::vector<Double_t> fSqSum_;
524 
526  std::vector<Double_t> fNorm_;
527 
530 
533 
535  Double_t aSqMaxSet_;
536 
538  Double_t aSqMaxVar_;
539 
542 
545 
548 
551 
554 
555  ClassDef(LauIsobarDynamics,0)
556 };
557 
558 #endif
void setParBarrierRadius(Double_t radius)
Set the radius of the barrier factor due to the parent to use for new amplitude components.
KMStringMap kMatrixPropSet_
The names of the M-matrix components in the model mapped to their propagators.
virtual Double_t getEvtJacobian() const
Retrieve the Jacobian, for the transformation into square DP coordinates, for the current event...
Int_t nSigGenLoop_
The number of unsucessful attempts to generate an event so far.
Class for defining the abstract interface for signal Dalitz plot dynamics.
Double_t getASqMaxVarValue() const
Retrieve the maximum of A squared that has been found while generating.
Double_t resBarrierRadius_
The radius of the resonance barrier factor for new amplitude components.
virtual LauComplex resAmp(Int_t index)
Calculate the dynamic part of the amplitude for a given component at the current point in the Dalitz ...
virtual ~LauIsobarDynamics()
Destructor.
const std::vector< Double_t > & getFNorm() const
Retrieve the normalisation factors for the dynamic parts of the amplitudes for all of the amplitude c...
Double_t m13BinWidth_
The bin width to use when integrating over m13.
Bool_t flipHelicity_
The helicity flip flag for new amplitude components.
virtual void calcDPPartialIntegral(Double_t minm13, Double_t maxm13, Double_t minm23, Double_t maxm23, Double_t m13BinWidth, Double_t m23BinWidth)
Calculate the Dalitz plot normalisation integrals over a given range.
virtual Double_t getEvtLikelihood() const
Retrieve the likelihood for the current event.
Double_t getParBarrierRadius() const
Retrieve the radius of the barrier factor due to the parent to use for new amplitude components...
void setResBarrierRadius(Double_t radius)
Set the radius of the barrier factor due to the resonance to use for new amplitude components...
std::vector< Int_t > resPairAmp_
The index of the daughter not produced by the resonance for each amplitude component.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:33
virtual void defineKMatrixPropagator(const TString &propName, const TString &paramFileName, Int_t resPairAmpInt, Int_t nChannels, Int_t nPoles, Int_t rowIndex=1)
Define a new K-matrix Propagator.
virtual void dynamics(Bool_t cacheResData=kTRUE, Double_t weight=1.0, Bool_t useEff=kTRUE)
Calculate the total Dalitz plot amplitude at the current point in the Dalitz plot.
void setASqMaxValue(Double_t value)
Set the maximum value of A squared to be used in the accept/reject.
Double_t aSqMaxVar_
The maximum value of A squared that has been seen so far while generating.
Double_t scfFraction_
The fraction of events that are poorly reconstructed (the self cross feed fraction) at the current po...
Double_t m13Sq_
The invariant mass squared of the first and third daughters.
Int_t iterationsMax_
The maximum allowed number of attempts when generating an event.
LauComplex totAmp_
The total amplitude for the current event.
Double_t getASqMaxSetValue() const
Retrieve the maximum value of A squared to be used in the accept/reject.
LauAbsResonance::BarrierType barrierType_
The type of the barrier factor for new amplitude components.
Double_t aSqMaxSet_
The maximum allowed value of A squared.
Bool_t symmetricalDP_
Whether the Dalitz plot is symmetrical.
Pure abstract base class for defining the efficiency description across the signal Dalitz plot...
Double_t parBarrierRadius_
The radius of the parent barrier factor for new amplitude components.
virtual void calcDPNormalisation()
Calculate the Dalitz plot normalisation integrals across the whole Dalitz plot.
virtual void setFFTerm(UInt_t index, Double_t realPart, Double_t imagPart)
Set the dynamic part of the amplitude for a given amplitude component at the current point in the Dal...
void setASqMaxVarValue(Double_t value)
Set the maximum of A squared that has been found.
KMPropMap kMatrixPropagators_
The K-matrix propagators.
std::vector< Double_t > fSqSum_
The event-by-event running total of the dynamical amplitude squared for each amplitude component...
virtual Double_t getEvtEff() const
Retrieve the efficiency for the current event.
virtual LauAbsResonance * addResonance(const TString &resName, const Int_t resPairAmpInt, const LauAbsResonance::LauResonanceModel resType)
Add a resonance to the Dalitz plot.
Double_t m23Sq_
The invariant mass squared of the second and third daughters.
Double_t thPrime_
The square Dalitz plot coordinate theta&#39;.
Double_t evtLike_
The normalised likelihood for the current event.
std::vector< std::vector< LauComplex > > fifjEffSum_
The event-by-event running total of efficiency corrected amplitude cross terms for each pair of ampli...
virtual void initSummary()
Print a summary of the model to be used.
virtual void fillDataTree(const LauFitDataTree &fitDataTree)
Fill the internal data structure that caches the resonance dynamics.
virtual LauAbsResonance * findResonance(const TString &name)
Retrieve the named resonance.
std::map< Int_t, LauAbsEffModel * > LauTagCatScfFractionModelMap
The type used for containing multiple self cross feed fraction models for different categories (e...
Double_t ASq_
The value of A squared for the current event.
virtual const LauComplex & getEvtDPAmp() const
Retrieve the total amplitude for the current event.
virtual LauComplex getDynamicAmp(Int_t resID) const
Retrieve the normalised dynamic part of the amplitude of the given amplitude component at the current...
virtual void changeResonance(const TString &resName, Double_t newMass=-1.0, Double_t newWidth=-1.0, Int_t newSpin=-1)
Change the properties of a resonance particle within this model.
const std::vector< std::vector< LauComplex > > & getFiFjSum() const
Retrieve the event-by-event running totals of amplitude cross terms for all pairs of amplitude compon...
Double_t m23BinWidth_
The bin width to use when integrating over m23.
TString intFileName_
The name of the file to save integrals to.
virtual Double_t getEvtm13Sq() const
Retrieve the invariant mass squared of the first and third daughters in the current event...
virtual void addKMatrixProdPole(const TString &poleName, const TString &propName, Int_t poleIndex)
Add a K-matrix production pole term to the model.
std::vector< TString > resTypAmp_
The resonance types of all of the amplitude components.
virtual void calcLikelihoodInfo(UInt_t iEvt)
Calculate the likelihood (and all associated information) for the given event number.
virtual Double_t getEvtm23Sq() const
Retrieve the invariant mass squared of the second and third daughters in the current event...
std::vector< Int_t > resIntAmp_
The index within the resonance maker for each amplitude component.
LauIsobarDynamics(LauDaughters *daughters, LauAbsEffModel *effModel, LauAbsEffModel *scfFractionModel=0)
Constructor.
virtual void initialiseVectors()
Initialise the internal storage for this model.
Double_t jacobian_
The Jacobian, for the transformation into square DP coordinates at the current point in the Dalitz pl...
File containing declaration of LauComplex class.
std::vector< std::vector< LauComplex > > fifjSum_
The event-by-event running total of the amplitude cross terms for each pair of amplitude components...
virtual Double_t getEvtthPrime() const
Retrieve the square Dalitz plot coordinate, theta&#39;, for the current event.
Bool_t setBarrierRadius_
Should the radii of the resonance barrier factors be adjusted for new amplitude components.
virtual Double_t calcSigDPNorm()
Calculate the normalisation factor for the log-likelihood function.
virtual Double_t getEvtScfFraction() const
Retrieve the fraction of events that are poorly reconstructed (the self cross feed fraction) for the ...
void setBarrierRadii(Double_t resRadius, Double_t parRadius=4.0, LauAbsResonance::BarrierType type=LauAbsResonance::BWPrimeBarrier)
Set the parameters for the barrier factors for new resonances.
virtual Bool_t generate()
Generate a toy MC signal event.
File containing declaration of LauAbsDPDynamics class.
virtual void removeCharge(TString &string) const
Remove the charge from the given particle name.
std::vector< Int_t > typDaug_
The PDG codes of the daughters.
LauResonanceModel
Define the allowed resonance types.
void flipHelicityForCPEigenstates(Bool_t boolean)
Set the helicity flip flag for new amplitude components.
Double_t eff_
The efficiency at the current point in the Dalitz plot.
Double_t getResBarrierRadius() const
Retrieve the radius of the barrier factor due to the resonance to use for new amplitude components...
Int_t maxGenIterations() const
Retrieve the maximum number of iterations allowed when generating an event.
void setBarrierType(LauAbsResonance::BarrierType type)
Set the type of barrier factor to use for new amplitude components.
virtual Bool_t gotReweightedEvent()
Calculates whether an event with the current kinematics should be accepted in order to produce a dist...
Abstract class for defining type for resonance amplitude models (Breit-Wigner, Flatte etc...
virtual void addKMatrixProdSVP(const TString &SVPName, const TString &propName, Int_t channelIndex)
Add a K-matrix slowly-varying part (SVP) term to the model.
Class for defining signal dynamics using the isobar model.
virtual Double_t getEventWeight()
Calculate the acceptance rate, for events with the current kinematics, when generating events accordi...
void setIntFileName(const TString &fileName)
Set the name of the file to which to save the results of the integrals.
ToyMCStatus
The possible statuses for toy MC generation.
virtual void writeIntegralsFile()
Write the results of the integrals (and related information) to a file.
virtual ToyMCStatus checkToyMC(Bool_t printErrorMessages=kTRUE, Bool_t printInfoMessages=kFALSE)
Check the status of the toy MC generation.
File containing declaration of LauAbsResonance class.
virtual void setIntegralBinWidths(Double_t m13BinWidth, Double_t m23BinWidth)
Set the widths of the bins to use when integrating across the Dalitz plot.
Class for defining a complex number.
Definition: LauComplex.hh:47
Bool_t gotKMatrixMatch(UInt_t resAmpInt, const TString &propName) const
Check whether a resonance is a K-matrix component of a given propagator.
BarrierType
Define the allowed types of barrier factors.
std::map< TString, TString > KMStringMap
The type used for mapping K-matrix components to their propagators.
virtual void setDataEventNo(UInt_t iEvt)
Load the data for a given event.
std::map< TString, LauKMatrixPropagator * > KMPropMap
The type used for containing the K-matrix propagators.
virtual Double_t getEvtmPrime() const
Retrieve the square Dalitz plot coordinate, m&#39;, for the current event.
Bool_t integralsDone_
Whether the integrals have been performed.
std::vector< LauComplex > ff_
The dynamic part of the amplitude for each amplitude component at the current point in the Dalitz plo...
virtual void initialise(const std::vector< LauComplex > &coeffs)
Initialise the Dalitz plot dynamics.
const std::vector< std::vector< LauComplex > > & getFiFjEffSum() const
Retrieve the event-by-event running totals of efficiency corrected amplitude cross terms for all pair...
Double_t mPrime_
The square Dalitz plot coordinate, m&#39;.
std::vector< Double_t > fNorm_
The normalisation factors for the dynamic parts of the amplitude for each amplitude component...
Class to store the input fit variables.
std::vector< LauAbsResonance * > sigResonances_
The resonances in the model.
virtual void calcExtraInfo(Bool_t init=kFALSE)
Calculate the fit fractions, mean efficiency and total DP rate.
Class for defining a K-matrix propagator.