laura is hosted by Hepforge, IPPP Durham
Laura++  v1r0
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 "LauCacheData.hh"
28 #include "LauParameter.hh"
29 
30 class LauAbsResonance;
31 class LauComplex;
32 class LauDaughters;
33 class LauEffModel;
34 class LauFitDataTree;
35 class LauKinematics;
36 class LauResonanceMaker;
37 
38 
40 
41  public:
43  typedef std::map<Int_t,LauEffModel*> LauTagCatScfFractionModelMap;
44 
46 
51  LauAbsDPDynamics(LauDaughters* daughters, LauEffModel* effModel, LauEffModel* scfFractionModel = 0);
52 
54 
59  LauAbsDPDynamics(LauDaughters* daughters, LauEffModel* effModel, const LauTagCatScfFractionModelMap& scfFractionModel);
60 
62  virtual ~LauAbsDPDynamics();
63 
65  enum ToyMCStatus {
69  };
70 
72 
80  virtual void addResonance(const TString& resName, Int_t resPairAmpInt, const TString& resType,
81  Double_t newMass, Double_t newWidth, Int_t newSpin) = 0;
82 
84 
87  virtual void initialise(const std::vector<LauComplex>& coeffs) = 0;
88 
90 
93  virtual Double_t retrieveEfficiency();
94 
96 
100  virtual Double_t retrieveScfFraction(Int_t tagCat);
101 
103 
106  virtual void fillDataTree(const LauFitDataTree& inputFitTree) = 0;
107 
109 
112  virtual void setDataEventNo(UInt_t iEvt);
113 
115 
119  virtual Bool_t hasResonance(const TString& resName) const;
120 
122 
126  virtual TString getConjResName(const TString& resName) const;
127 
129 
132  virtual void updateCoeffs(const std::vector<LauComplex>& coeffs);
133 
135 
138  virtual Bool_t generate() = 0;
139 
141 
146  virtual ToyMCStatus checkToyMC(Bool_t printErrorMessages = kTRUE, Bool_t printInfoMessages = kFALSE) = 0;
147 
149 
153  virtual void calcLikelihoodInfo(Double_t m13Sq, Double_t m23Sq) = 0;
154 
156 
159  virtual void calcLikelihoodInfo(UInt_t iEvt) = 0;
160 
162 
165  virtual Double_t getEvtLikelihood() const = 0;
166 
168 
171  virtual Double_t getEvtm13Sq() const = 0;
172 
174 
177  virtual Double_t getEvtm23Sq() const = 0;
178 
180 
183  virtual Double_t getEvtmPrime() const = 0;
184 
186 
189  virtual Double_t getEvtthPrime() const = 0;
190 
192 
195  virtual Double_t getEvtEff() const = 0;
196 
198 
201  virtual Double_t getEvtJacobian() const = 0; //Not sure whether this should be here or only in LauIsobarDynamics.
202 
204 
207  virtual Double_t getEvtScfFraction() const = 0;
208 
210 
213  virtual const LauComplex& getEvtDPAmp() const = 0;
214 
216 
220  virtual LauComplex getDynamicAmp(Int_t resID) const = 0;
221 
223 
226  virtual void calcExtraInfo(Bool_t init = kFALSE) = 0;
227 
228  // Use this method to select events in the DP for embedded-reweighting.
230 
233  virtual Bool_t gotReweightedEvent() = 0;
234 
236 
239  virtual Double_t getEventWeight() = 0;
240 
242 
245  inline LauParameter getMeanEff() const {return meanDPEff_;}
246 
248 
251  inline LauParameter getDPRate() const {return DPRate_;}
252 
254 
257  inline const LauParArray& getFitFractions() const {return fitFrac_;}
258 
260 
263  inline UInt_t getnDefinedResonances() const {return nResDefMax_;}
264 
266 
269  inline UInt_t getnAmp() const {return nAmp_;}
270 
272 
275  inline Double_t getDPNorm() const {return DPNorm_;}
276 
278 
281  inline UInt_t nData() const {return data_.size();}
282 
284 
287  inline const std::vector<LauCacheData*>& getCacheData() const {return data_;}
288 
290 
294 
296 
300 
302 
306 
308 
311  inline LauEffModel* getEffModel() {return effModel_;}
312 
314 
318 
320 
323  inline std::map <Int_t,LauEffModel*> getScfFractionModels() {return scfFractionModel_;}
324 
326 
329  inline Bool_t usingScfModel() { return ! scfFractionModel_.empty(); }
330 
332 
335  std::vector<LauParameter> getExtraParameters() {return extraParameters_;}
336 
337  protected:
339 
342  virtual Double_t calcSigDPNorm() = 0;
343 
345 
349  virtual LauAbsResonance* findResonance(const TString& name) = 0;
350 
352 
356  virtual const LauAbsResonance* findResonance(const TString& name) const = 0;
357 
360 
363 
366 
369 
371 
376 
378  UInt_t nAmp_;
379 
381  UInt_t nResDefMax_;
382 
384  std::vector<LauComplex> Amp_;
385 
387  Double_t DPNorm_;
388 
391 
394 
397 
399  std::vector<LauCacheData*> data_;
400 
403 
405  std::vector<LauParameter> extraParameters_;
406 
407  private:
408  ClassDef(LauAbsDPDynamics,0)
409 };
410 
411 #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.
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...
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)
LauEffModel * getScfFractionModel()
Retrieve the model for the fraction of events that are poorly reconstructed (the self cross feed frac...
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.
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)
std::map< Int_t, LauEffModel * > getScfFractionModels()
Retrieve the model for the fraction of events that are poorly reconstructed (the self cross feed frac...
LauAbsDPDynamics(LauDaughters *daughters, LauEffModel *effModel, LauEffModel *scfFractionModel=0)
Constructor.
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.
File containing declaration of LauCacheData class.
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.
std::map< Int_t, LauEffModel * > LauTagCatScfFractionModelMap
The type used for containing multiple self cross feed fraction models for different categories (e...
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:31
virtual Double_t getEvtmPrime() const =0
Retrieve the square Dalitz plot coordinate, m&#39;, for the current event.
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.
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.
Class that implements the efficiency description across the signal Dalitz plot.
Definition: LauEffModel.hh:37
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.
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.
LauEffModel * effModel_
The efficiency model across the Dalitz plot.
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.
LauResonanceMaker * resonanceMaker_
Object to create resonances.
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.
virtual void addResonance(const TString &resName, Int_t resPairAmpInt, const TString &resType, Double_t newMass, Double_t newWidth, Int_t newSpin)=0
Add a resonance to the Dalitz plot.
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.
LauEffModel * getEffModel()
Retrieve the model for the efficiency across the Dalitz plot.
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...