Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:45

0001 // @(#)root/hist:$Id$
0002 // Author: Rene Brun   05/04/2003
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2003, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TF12
0013 #define ROOT_TF12
0014 
0015 //////////////////////////////////////////////////////////////////////////
0016 //                                                                      //
0017 // TF12                                                                 //
0018 //                                                                      //
0019 // Projection of a TF2 along x or y                                     //
0020 //                                                                      //
0021 //////////////////////////////////////////////////////////////////////////
0022 
0023 #include "TF2.h"
0024 
0025 class TF12 : public TF1 {
0026 
0027 protected:
0028    Double_t    fXY;           ///< Value along Y (if projection X) or X (if projection Y)
0029    Int_t       fCase;         ///< Projection along X(0), or Y(1)
0030    TF2        *fF2;           ///< Pointer to the mother TF2
0031 
0032 public:
0033    TF12();
0034    TF12(const char *name, TF2 *f2, Double_t xy, Option_t *option="x");
0035    TF12(const TF12 &f12);
0036      ~TF12() override;
0037    void     Copy(TObject &f12) const override;
0038    TF1     *DrawCopy(Option_t *option="") const override;
0039    Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const override;
0040    Double_t EvalPar(const Double_t *x, const Double_t *params=nullptr) override;
0041 
0042 #ifdef R__HAS_VECCORE
0043    using TF1::Eval;    // to not hide the vectorized version
0044    using TF1::EvalPar; // to not hide the vectorized version
0045 #endif
0046 
0047    virtual Double_t GetXY() const {return fXY;}
0048    void     SavePrimitive(std::ostream &out, Option_t *option = "") override;
0049    virtual void     SetXY(Double_t xy);  // *MENU*
0050 
0051    ClassDefOverride(TF12,1)  //Projection of a TF2 along x or y
0052 };
0053 
0054 #endif