Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
25class TF12 : public TF1 {
26
27protected:
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
32public:
33 TF12();
34 TF12(const char *name, TF2 *f2, Double_t xy, Option_t *option="x");
35 TF12(const TF12 &f12);
36 ~TF12() override;
37 void Copy(TObject &f12) const override;
38 TF1 *DrawCopy(Option_t *option="") const override;
39 Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const override;
40 Double_t EvalPar(const Double_t *x, const Double_t *params=nullptr) override;
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 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
49 virtual void SetXY(Double_t xy); // *MENU*
50
51 ClassDefOverride(TF12,1) //Projection of a TF2 along x or y
52};
53
54#endif
double Double_t
Definition RtypesCore.h:59
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
Option_t Option_t TPoint xy
char name[80]
Definition TGX11.cxx:110
A projection of a TF2 along X or Y.
Definition TF12.h:25
Int_t fCase
Projection along X(0), or Y(1)
Definition TF12.h:29
Double_t fXY
Value along Y (if projection X) or X (if projection Y)
Definition TF12.h:28
Double_t EvalPar(const Double_t *x, const Double_t *params=nullptr) override
Evaluate this function at point x[0].
Definition TF12.cxx:157
TF12()
TF12 default constructor.
Definition TF12.cxx:39
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
Definition TF12.cxx:176
void Copy(TObject &f12) const override
Copy this F2 to a new F2.
Definition TF12.cxx:98
~TF12() override
F2 default destructor.
Definition TF12.cxx:81
virtual void SetXY(Double_t xy)
Set the value of the constant for the TF2.
Definition TF12.cxx:190
virtual Double_t GetXY() const
Definition TF12.h:47
TF1 * DrawCopy(Option_t *option="") const override
Draw a copy of this function with its current attributes.
Definition TF12.cxx:124
TF2 * fF2
Pointer to the mother TF2.
Definition TF12.h:30
Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const override
Evaluate this formula.
Definition TF12.cxx:139
1-Dim function class
Definition TF1.h:213
virtual Double_t EvalPar(const Double_t *x, const Double_t *params=nullptr)
Evaluate function with given coordinates and parameters.
Definition TF1.cxx:1469
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
Evaluate this function.
Definition TF1.cxx:1440
A 2-Dim function with parameters.
Definition TF2.h:29
Mother of all ROOT objects.
Definition TObject.h:41
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17