/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 *    File: $Id: RooTruthModel.h,v 1.18 2007/05/11 10:14:56 verkerke Exp $
 * Authors:                                                                  *
 *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
 *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
 *                                                                           *
 * Copyright (c) 2000-2005, Regents of the University of California          *
 *                          and Stanford University. All rights reserved.    *
 *                                                                           *
 * Redistribution and use in source and binary forms,                        *
 * with or without modification, are permitted according to the terms        *
 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
 *****************************************************************************/
#ifndef ROO_TRUTH_MODEL
#define ROO_TRUTH_MODEL

#include "RooResolutionModel.h"

class RooTruthModel : public RooResolutionModel {
public:

  enum RooTruthBasis { noBasis=0, expBasisMinus= 1, expBasisSum= 2, expBasisPlus= 3,
                                  sinBasisMinus=11, sinBasisSum=12, sinBasisPlus=13,
                                  cosBasisMinus=21, cosBasisSum=22, cosBasisPlus=23,
		                                                    linBasisPlus=33,
		                                                   quadBasisPlus=43,
				  coshBasisMinus=51,coshBasisSum=52,coshBasisPlus=53,
 	  			  sinhBasisMinus=61,sinhBasisSum=62,sinhBasisPlus=63,
                       genericBasis=100 } ;

  enum BasisType { none=0, expBasis=1, sinBasis=2, cosBasis=3,
                   linBasis=4, quadBasis=5, coshBasis=6, sinhBasis=7 } ;
  enum BasisSign { Both=0, Plus=+1, Minus=-1 } ;

  // Constructors, assignment etc
  inline RooTruthModel() { }
  RooTruthModel(const char *name, const char *title, RooRealVar& x) ; 
  RooTruthModel(const RooTruthModel& other, const char* name=0);
  virtual TObject* clone(const char* newname) const { return new RooTruthModel(*this,newname) ; }
  virtual ~RooTruthModel();
  
  virtual Int_t basisCode(const char* name) const ;

  virtual RooAbsGenContext* modelGenContext(const RooAbsAnaConvPdf& convPdf, const RooArgSet &vars,
                                            const RooDataSet *prototype=0, const RooArgSet* auxProto=0,
                                            Bool_t verbose= kFALSE) const;

  Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const;
  void generateEvent(Int_t code);

  Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const ;
  Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;

protected:
  virtual Double_t evaluate() const ;
  virtual void changeBasis(RooFormulaVar* basis) ;

  ClassDef(RooTruthModel,1) // Truth resolution model (delta function)
};

#endif
 RooTruthModel.h:1
 RooTruthModel.h:2
 RooTruthModel.h:3
 RooTruthModel.h:4
 RooTruthModel.h:5
 RooTruthModel.h:6
 RooTruthModel.h:7
 RooTruthModel.h:8
 RooTruthModel.h:9
 RooTruthModel.h:10
 RooTruthModel.h:11
 RooTruthModel.h:12
 RooTruthModel.h:13
 RooTruthModel.h:14
 RooTruthModel.h:15
 RooTruthModel.h:16
 RooTruthModel.h:17
 RooTruthModel.h:18
 RooTruthModel.h:19
 RooTruthModel.h:20
 RooTruthModel.h:21
 RooTruthModel.h:22
 RooTruthModel.h:23
 RooTruthModel.h:24
 RooTruthModel.h:25
 RooTruthModel.h:26
 RooTruthModel.h:27
 RooTruthModel.h:28
 RooTruthModel.h:29
 RooTruthModel.h:30
 RooTruthModel.h:31
 RooTruthModel.h:32
 RooTruthModel.h:33
 RooTruthModel.h:34
 RooTruthModel.h:35
 RooTruthModel.h:36
 RooTruthModel.h:37
 RooTruthModel.h:38
 RooTruthModel.h:39
 RooTruthModel.h:40
 RooTruthModel.h:41
 RooTruthModel.h:42
 RooTruthModel.h:43
 RooTruthModel.h:44
 RooTruthModel.h:45
 RooTruthModel.h:46
 RooTruthModel.h:47
 RooTruthModel.h:48
 RooTruthModel.h:49
 RooTruthModel.h:50
 RooTruthModel.h:51
 RooTruthModel.h:52
 RooTruthModel.h:53
 RooTruthModel.h:54
 RooTruthModel.h:55
 RooTruthModel.h:56
 RooTruthModel.h:57
 RooTruthModel.h:58
 RooTruthModel.h:59
 RooTruthModel.h:60
 RooTruthModel.h:61
 RooTruthModel.h:62
 RooTruthModel.h:63