Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TF12.h
Go to the documentation of this file.
1 // @(#)root/hist:$Id$
2 // Author: Rene Brun 05/04/2003
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TF12
13 #define ROOT_TF12
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TF12 //
18 // //
19 // Projection of a TF2 along x or y //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #include "TF2.h"
24 
25 class TF12 : public TF1 {
26 
27 protected:
28  Double_t fXY; //Value along Y (if projection X) or X (if projection Y)
29  Int_t fCase; //projection along X(0), or Y(1)
30  TF2 *fF2; //pointer to the mother TF2
31 
32 public:
33  TF12();
34  TF12(const char *name, TF2 *f2, Double_t xy, Option_t *option="x");
35  TF12(const TF12 &f12);
36  virtual ~TF12();
37  virtual void Copy(TObject &f12) const;
38  virtual TF1 *DrawCopy(Option_t *option="") const;
39  virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const;
40  virtual Double_t EvalPar(const Double_t *x, const Double_t *params=0);
41 
42 #ifdef R__HAS_VECCORE
43  using TF1::Eval; // to not hide the vectorized version
44  using TF1::EvalPar; // to not hide the vectorized version
45 #endif
46 
47  virtual Double_t GetXY() const {return fXY;}
48  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
49  virtual void SetXY(Double_t xy); // *MENU*
50 
51  ClassDef(TF12,1) //Projection of a TF2 along x or y
52 };
53 
54 #endif