Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:23:32

0001 #ifndef PhysicsTools_IsolationUtils_IntegralOverPhiFunction_h
0002 #define PhysicsTools_IsolationUtils_IntegralOverPhiFunction_h
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:    IntegralOverPhiFunction
0007 // Class:      IntegralOverPhiFunction
0008 //
0009 /**\class IntegralOverPhiFunction IntegralOverPhiFunction.cc PhysicsTools/IsolationUtils/src/IntegralOverPhiFunction.cc
0010 
0011  Description: auxialiary class for fixed area isolation cone computation
0012               (this class performs the integration over the azimuthal angle)
0013 
0014  Implementation:
0015      imported into CMSSW on 05/18/2007
0016 */
0017 //
0018 // Original Author:  Christian Veelken, UC Davis
0019 //         Created:  Thu Nov  2 13:47:40 CST 2006
0020 //
0021 //
0022 
0023 // ROOT include files
0024 #include <Math/ParamFunction.h>
0025 
0026 //
0027 // class declaration
0028 //
0029 
0030 class IntegralOverPhiFunction : public ROOT::Math::ParamFunction<ROOT::Math::IParametricGradFunctionOneDim> {
0031 public:
0032   IntegralOverPhiFunction();
0033   ~IntegralOverPhiFunction() override;
0034 
0035   void SetParameterTheta0(double theta0);
0036   void SetParameterPhi0(double phi0);
0037   void SetParameterAlpha(double alpha);
0038 
0039   ROOT::Math::IGenFunction* Clone() const override { return new IntegralOverPhiFunction(*this); }
0040 
0041 private:
0042   void SetParameters(double const* param) override;
0043 
0044   double DoEval(double x) const override;
0045   double DoEvalPar(double x, const double* param) const override;
0046   double DoDerivative(double x) const;
0047   double DoParameterDerivative(double, const double*, unsigned int) const override;
0048   void DoParameterGradient(double x, double* paramGradient) const;
0049 
0050   mutable double theta0_;  // polar angle of cone axis
0051   mutable double phi0_;    // azimuth angle of cone axis
0052   mutable double alpha_;   // opening angle of cone (measured from cone axis)
0053 
0054   // !!! ONLY FOR TESTING
0055   mutable unsigned int numSolutionMin1_;
0056   mutable unsigned int numSolutionMax1_;
0057   mutable unsigned int numSolutionMin2_;
0058   mutable unsigned int numSolutionMax2_;
0059   mutable unsigned int numSolutionMin3_;
0060   mutable unsigned int numSolutionMax3_;
0061   mutable unsigned int numSolutionMin4_;
0062   mutable unsigned int numSolutionMax4_;
0063   //     FOR TESTING ONLY !!!
0064 
0065   static const unsigned int debugLevel_ = 0;
0066 };
0067 
0068 #endif