laura is hosted by Hepforge, IPPP Durham
Laura++  v2r2
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauAbsDPDynamics.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_ABS_DP_DYNAMICS
20 #define LAU_ABS_DP_DYNAMICS
21 
22 #include <vector>
23 #include <map>
24 
25 #include "TString.h"
26 
27 #include "LauAbsResonance.hh"
28 #include "LauParameter.hh"
29 
30 class LauCacheData;
31 class LauComplex;
32 class LauDaughters;
33 class LauAbsEffModel;
34 class LauFitDataTree;
35 class LauKinematics;
36 class LauResonanceMaker;
37 
38 
40 
41  public:
43  typedef std::map<Int_t,LauAbsEffModel*> LauTagCatScfFractionModelMap;
44 
46 
51  LauAbsDPDynamics(LauDaughters* daughters, LauAbsEffModel* effModel, LauAbsEffModel* scfFractionModel = 0);
52 
54 
59  LauAbsDPDynamics(LauDaughters* daughters, LauAbsEffModel* effModel, const LauTagCatScfFractionModelMap& scfFractionModel);
60 
62  virtual ~LauAbsDPDynamics();
63 
65  enum ToyMCStatus {
69  };
70 
72 
78  virtual LauAbsResonance* addResonance(const TString& resName, const Int_t resPairAmpInt, const LauAbsResonance::LauResonanceModel resType) = 0;
79 
81 
84  virtual void initialise(const std::vector<LauComplex>& coeffs) = 0;
85 
87 
90  virtual Double_t retrieveEfficiency();
91 
93 
97  virtual Double_t retrieveScfFraction(Int_t tagCat);
98 
100 
103  virtual void fillDataTree(const LauFitDataTree& inputFitTree) = 0;
104 
106 
109  virtual void setDataEventNo(UInt_t iEvt);
110 
112 
116  virtual Bool_t hasResonance(const TString& resName) const;
117 
119 
123  virtual TString getConjResName(const TString& resName) const;
124 
126 
129  virtual void updateCoeffs(const std::vector<LauComplex>& coeffs);
130 
132 
135  virtual Bool_t generate() = 0;
136 
138 
143  virtual ToyMCStatus checkToyMC(Bool_t printErrorMessages = kTRUE, Bool_t printInfoMessages = kFALSE) = 0;
144 
146 
150  virtual void calcLikelihoodInfo(Double_t m13Sq, Double_t m23Sq) = 0;
151 
153 
156  virtual void calcLikelihoodInfo(UInt_t iEvt) = 0;
157 
159 
162  virtual Double_t getEvtLikelihood() const = 0;
163 
165 
168  virtual Double_t getEvtm13Sq() const = 0;
169 
171 
174  virtual Double_t getEvtm23Sq() const = 0;
175 
177 
180  virtual Double_t getEvtmPrime() const = 0;
181 
183 
186  virtual Double_t getEvtthPrime() const = 0;
187 
189 
192  virtual Double_t getEvtEff() const = 0;
193 
195 
198  virtual Double_t getEvtJacobian() const = 0; //Not sure whether this should be here or only in LauIsobarDynamics.
199 
201 
204  virtual Double_t getEvtScfFraction() const = 0;
205 
207 
210  virtual const LauComplex& getEvtDPAmp() const = 0;
211 
213 
217  virtual LauComplex getDynamicAmp(Int_t resID) const = 0;
218 
220 
223  virtual void calcExtraInfo(Bool_t init = kFALSE) = 0;
224 
225  // Use this method to select events in the DP for embedded-reweighting.
227 
230  virtual Bool_t gotReweightedEvent() = 0;
231 
233 
236  virtual Double_t getEventWeight() = 0;
237 
239 
242  inline LauParameter getMeanEff() const {return meanDPEff_;}
243 
245 
248  inline LauParameter getDPRate() const {return DPRate_;}
249 
251 
254  inline const LauParArray& getFitFractions() const {return fitFrac_;}
255 
257 
261 
263 
266  inline UInt_t getnDefinedResonances() const {return nResDefMax_;}
267 
269 
272  inline UInt_t getnAmp() const {return nAmp_;}
273 
275 
278  inline Double_t getDPNorm() const {return DPNorm_;}
279 
281 
284  inline UInt_t nData() const {return data_.size();}
285 
287 
290  inline const std::vector<LauCacheData*>& getCacheData() const {return data_;}
291 
293 
297 
299 
303 
305 
309 
311 
315 
317 
321 
323 
326  inline std::map <Int_t,LauAbsEffModel*> getScfFractionModels() {return scfFractionModel_;}
327 
329 
332  inline Bool_t usingScfModel() { return ! scfFractionModel_.empty(); }
333 
335 
338  std::vector<LauParameter> getExtraParameters() {return extraParameters_;}
339 
340  protected:
342 
345  virtual Double_t calcSigDPNorm() = 0;
346 
348 
352  virtual LauAbsResonance* findResonance(const TString& name) = 0;
353 
355 
359  virtual const LauAbsResonance* findResonance(const TString& name) const = 0;
360 
363 
366 
369 
372 
374 
379 
381  UInt_t nAmp_;
382 
384  UInt_t nResDefMax_;
385 
387  std::vector<LauComplex> Amp_;
388 
390  Double_t DPNorm_;
391 
394 
397 
400 
403 
405  std::vector<LauCacheData*> data_;
406 
409 
411  std::vector<LauParameter> extraParameters_;
412 
413  private:
414  ClassDef(LauAbsDPDynamics,0)
415 };
416 
417 #endif
Class for defining the abstract interface for signal Dalitz plot dynamics.
LauKinematics * getKinematics()
Retrieve the Dalitz plot kinematics.
virtual LauAbsResonance * findResonance(const TString &name)=0
Retrieve the named resonance.
virtual Double_t getEvtthPrime() const =0
Retrieve the square Dalitz plot coordinate, theta&#39;, for the current event.
LauParArray fitFracEffUnCorr_
The efficiency-uncorrected fit fractions for the amplitude components.
virtual LauAbsResonance * addResonance(const TString &resName, const Int_t resPairAmpInt, const LauAbsResonance::LauResonanceModel resType)=0
Add a resonance to the Dalitz plot.
LauParameter DPRate_
The overall Dalitz plot rate.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:33
LauDaughters * getDaughters()
Retrieve the daughters.
std::vector< std::vector< LauParameter > > LauParArray
Type to define an array of parameters.
LauParameter getDPRate() const
Retrieve the overall Dalitz plot rate.
virtual Double_t retrieveEfficiency()
Obtain the efficiency of the current event from the model.
virtual void calcLikelihoodInfo(Double_t m13Sq, Double_t m23Sq)=0
Calculate the likelihood (and all associated information) given values of the Dalitz plot coordinates...
Pure abstract base class for defining the efficiency description across the signal Dalitz plot...
Class to contain cached data relating to an event.
Definition: LauCacheData.hh:30
virtual Bool_t hasResonance(const TString &resName) const
Check whether this model includes a named resonance.
std::vector< LauParameter > getExtraParameters()
Retrieve any extra parameters/quantities (e.g. K-matrix total fit fractions)
std::vector< LauComplex > Amp_
The complex coefficients for the amplitude components.
virtual Double_t getEvtJacobian() const =0
Retrieve the Jacobian, for the transformation into square DP coordinates, for the current event...
const std::vector< LauCacheData * > & getCacheData() const
Retrieve the cached data.
LauParameter getMeanEff() const
Retrieve the mean efficiency across the Dalitz plot.
virtual Double_t calcSigDPNorm()=0
Calculate the normalisation factor for the log-likelihood function.
std::vector< LauCacheData * > data_
The cached data for all events.
virtual LauComplex getDynamicAmp(Int_t resID) const =0
Retrieve the amplitude of the given amplitude component at the current point in the Dalitz plot...
Class for creating resonances.
LauAbsEffModel * effModel_
The efficiency model across the Dalitz plot.
std::map< Int_t, LauAbsEffModel * > LauTagCatScfFractionModelMap
The type used for containing multiple self cross feed fraction models for different categories (e...
virtual void fillDataTree(const LauFitDataTree &inputFitTree)=0
Obtain data from a fit tree.
std::vector< LauParameter > extraParameters_
any extra parameters/quantities (e.g. K-matrix total fit fractions)
UInt_t nData() const
Retrieve the number of cached events.
virtual void calcExtraInfo(Bool_t init=kFALSE)=0
Calculate the fit fractions, mean efficiency and total DP rate.
UInt_t nAmp_
The number of amplitude components.
virtual Double_t getEvtScfFraction() const =0
Retrieve the fraction of events that are poorly reconstructed (the self cross feed fraction) in the D...
File containing declaration of LauParameter class.
LauParArray fitFrac_
The fit fractions for the amplitude components.
virtual TString getConjResName(const TString &resName) const
Retrieve the name of the charge conjugate of a named resonance.
virtual Double_t getEvtLikelihood() const =0
Retrieve the likelihood for the current event.
UInt_t getnDefinedResonances() const
Retrieve the number of defined resonances in the resonance maker.
virtual Double_t retrieveScfFraction(Int_t tagCat)
Obtain the self cross feed fraction of the current event from the model.
Class for defining the fit parameter objects.
Definition: LauParameter.hh:33
virtual Double_t getEvtmPrime() const =0
Retrieve the square Dalitz plot coordinate, m&#39;, for the current event.
LauAbsEffModel * getEffModel()
Retrieve the model for the efficiency across the Dalitz plot.
virtual ToyMCStatus checkToyMC(Bool_t printErrorMessages=kTRUE, Bool_t printInfoMessages=kFALSE)=0
Check the status of the toy MC generation.
LauDaughters * daughters_
The daughters of the decay.
UInt_t getnAmp() const
Retrieve the number of amplitude components.
LauResonanceModel
Define the allowed resonance types.
UInt_t nResDefMax_
The number of resonances defined in the resonance maker.
virtual Double_t getEvtm23Sq() const =0
Retrieve the invariant mass squared of the second and third daughters in the current event...
Double_t getDPNorm() const
Retrieve the normalisation factor for the log-likelihood function.
std::map< Int_t, LauAbsEffModel * > getScfFractionModels()
Retrieve the model for the fraction of events that are poorly reconstructed (the self cross feed frac...
Abstract class for defining type for resonance amplitude models (Breit-Wigner, Flatte etc...
virtual void updateCoeffs(const std::vector< LauComplex > &coeffs)
Update the complex coefficients for the resonances.
const LauParArray & getFitFractionsEfficiencyUncorrected() const
Retrieve the fit fractions for the amplitude components.
LauResonanceMaker * getResonanceMaker()
Retrieve the resonance maker object.
Double_t DPNorm_
The normalisation factor for the log-likelihood function.
virtual Double_t getEvtm13Sq() const =0
Retrieve the invariant mass squared of the first and third daughters in the current event...
virtual void setDataEventNo(UInt_t iEvt)
Load the data for a given event.
LauAbsDPDynamics(LauDaughters *daughters, LauAbsEffModel *effModel, LauAbsEffModel *scfFractionModel=0)
Constructor.
virtual Double_t getEventWeight()=0
Calculate the acceptance rate, for events with the current kinematics, when generating events accordi...
ToyMCStatus
The possible statuses for toy MC generation.
File containing declaration of LauAbsResonance class.
LauResonanceMaker * resonanceMaker_
Object to create resonances.
LauAbsEffModel * getScfFractionModel()
Retrieve the model for the fraction of events that are poorly reconstructed (the self cross feed frac...
LauKinematics * kinematics_
The kinematics of the decay.
Class for defining a complex number.
Definition: LauComplex.hh:47
virtual const LauComplex & getEvtDPAmp() const =0
Retrieve the total amplitude of all amplitude components at the current point in the Dalitz plot...
LauCacheData * currentEvent_
The cached data for the current event.
Class for calculating 3-body kinematic quantities.
const LauParArray & getFitFractions() const
Retrieve the fit fractions for the amplitude components.
LauParameter meanDPEff_
The mean efficiency across the Dalitz plot.
virtual Double_t getEvtEff() const =0
Retrieve the efficiency for the current event.
Bool_t usingScfModel()
Check whether a self cross feed fraction model is being used.
virtual void initialise(const std::vector< LauComplex > &coeffs)=0
Initialise the Dalitz plot dynamics.
Class to store the input fit variables.
virtual ~LauAbsDPDynamics()
Destructor.
LauTagCatScfFractionModelMap scfFractionModel_
The self cross feed fraction models across the Dalitz plot.
virtual Bool_t generate()=0
Generate a toy MC signal event.
virtual Bool_t gotReweightedEvent()=0
Calculates whether an event with the current kinematics should be accepted in order to produce a dist...