MINT2
RooGaussEfficiencyModel.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitModels *
4  * File: $Id$
5  * Authors: *
6  * GR, Gerhard Raven, VU&Nikhef Amsterdam
7  * *
8  * Redistribution and use in source and binary forms, *
9  * with or without modification, are permitted according to the terms *
10  * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
11  *****************************************************************************/
12 #ifndef ROO_CS_GAUSS_MODEL
13 #define ROO_CS_GAUSS_MODEL
14 
15 #include <complex>
16 #include "RooResolutionModel.h"
17 #include "RooRealProxy.h"
18 
19 #include "RooAbsEffResModel.h"
20 
21 class RooAbsReal;
22 class RooRealVar;
24 
25 class RooGaussEfficiencyModel : public RooResolutionModel, public RooAbsEffResModel {
26 public:
27 
28  // Constructors, assignment etc
29  inline RooGaussEfficiencyModel() : _flatSFInt(kFALSE) { }
30  RooGaussEfficiencyModel(const char *name, const char *title,
31  RooRealVar& x, RooAbsGaussModelEfficiency& spline,
32  RooAbsReal& mean, RooAbsReal& sigma );
33  RooGaussEfficiencyModel(const char *name, const char *title,
34  RooRealVar& x, RooAbsGaussModelEfficiency& spline,
35  RooAbsReal& mean, RooAbsReal& sigma,
36  RooAbsReal& meanSF, RooAbsReal& sigmaSF) ;
37  RooGaussEfficiencyModel(const RooGaussEfficiencyModel& other, const char* name=0);
38  virtual ~RooGaussEfficiencyModel();
39 
40  virtual TObject* clone(const char* newname) const { return new RooGaussEfficiencyModel(*this,newname) ; }
41 
42  virtual Int_t basisCode(const char* name) const ;
43  void set_basisCode(int b){
44  _basisCode = b;
45  }
46 
47  virtual Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const ;
48  virtual Double_t analyticalIntegral(Int_t code, const char* rangeName) const ;
49 
50  // TODO: move this one to the mixin-interface
51  virtual RooAbsGenContext* modelGenContext(const RooAbsAnaConvPdf& convPdf, const RooArgSet &vars,
52  const RooDataSet *prototype=0, const RooArgSet* auxProto=0,
53  Bool_t verbose= kFALSE) const;
54  Bool_t isDirectGenSafe(const RooAbsArg& arg) const;
55  Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, Bool_t staticInitOK) const;
56  void generateEvent(Int_t code);
57 
58  void advertiseFlatScaleFactorIntegral(Bool_t flag) { _flatSFInt = flag ; }
59 
60  virtual const RooAbsReal* efficiency() const;
61  virtual RooArgSet* observables() const;
62 
63  virtual Double_t evaluate(Int_t basisCodeInt, Double_t tau, Double_t omega, Double_t dGamma ) const ;
64  virtual Double_t analyticalIntegral(Int_t basisCodeInt, Double_t tau, Double_t omega, Double_t dGamma, Int_t code = 1 , const char* rangeName = 0) const;
65 
66 
67 private:
68 
69  virtual Double_t evaluate() const ;
70 
71  std::complex<double> evalInt(Double_t xmin, Double_t xmax,
72  Double_t scale, Double_t offset,
73  const std::complex<double>& z) const;
74  Bool_t _flatSFInt ;
75 
76  RooRealProxy eff ;
77  RooRealProxy mean ;
78  RooRealProxy sigma ;
79  RooRealProxy msf ;
80  RooRealProxy ssf ;
81 
82  //ClassDef(RooGaussEfficiencyModel,1)
83 };
84 
85 #endif
virtual RooAbsGenContext * modelGenContext(const RooAbsAnaConvPdf &convPdf, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE) const
virtual RooArgSet * observables() const
virtual Double_t evaluate() const
std::complex< double > evalInt(Double_t xmin, Double_t xmax, Double_t scale, Double_t offset, const std::complex< double > &z) const
Bool_t isDirectGenSafe(const RooAbsArg &arg) const
virtual TObject * clone(const char *newname) const
virtual Double_t analyticalIntegral(Int_t code, const char *rangeName) const
Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, Bool_t staticInitOK) const
virtual const RooAbsReal * efficiency() const
virtual Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
void advertiseFlatScaleFactorIntegral(Bool_t flag)
virtual Int_t basisCode(const char *name) const