Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef PhysicsTools_IsolationUtils_ConeAreaFunction_h
0002 #define PhysicsTools_IsolationUtils_ConeAreaFunction_h
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:    ConeAreaFunction
0007 // Class:      ConeAreaFunction
0008 //
0009 /**\class ConeAreaFunction ConeAreaFunction.cc PhysicsTools/IsolationUtils/src/ConeAreaFunction.cc
0010 
0011  Description: low level class to compute area of signal cone
0012               corresponding to three-dimensional opening angle alpha given as function argument
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 #include <Math/Integrator.h>
0026 
0027 class IntegrandThetaFunction;
0028 
0029 //
0030 // class declaration
0031 //
0032 
0033 class ConeAreaFunction : public ROOT::Math::ParamFunction<ROOT::Math::IParametricGradFunctionOneDim> {
0034 public:
0035   ConeAreaFunction();
0036   ConeAreaFunction(const ConeAreaFunction& bluePrint);
0037   ~ConeAreaFunction() override;
0038 
0039   ConeAreaFunction& operator=(const ConeAreaFunction& bluePrint);
0040 
0041   void SetParameterTheta0(double theta0);
0042   void SetParameterPhi0(double phi0);
0043 
0044   void SetAcceptanceLimit(double etaMax);
0045 
0046   ROOT::Math::IGenFunction* Clone() const override { return new ConeAreaFunction(*this); }
0047 
0048 protected:
0049   void SetParameters(double const* param) override;
0050   double DoEvalPar(double, const double*) const override;
0051   double DoEval(double x) const override;
0052   double DoDerivative(double x) const;
0053   void DoParameterGradient(double x, double* paramGradient) const;
0054   double DoParameterDerivative(double, const double*, unsigned int) const override;
0055 
0056   // !!! ONLY FOR TESTING
0057   mutable double theta0_;  // polar angle of cone axis
0058   mutable double phi0_;    // azimuth angle of cone axis
0059 
0060   mutable double
0061       etaMax_;  // maximum pseudo-rapidity at which particles used for tau cone isolation can be detected (etaMax = 2.5 for charged particles; etaMax ~ 4.0 for neutrals)
0062                 // !!! ONLY FOR TESTING
0063 
0064 private:
0065   /*
0066   double theta0_; // polar angle of cone axis
0067   double phi0_; // azimuth angle of cone axis
0068 
0069   double etaMax_; // maximum pseudo-rapidity at which particles used for tau cone isolation can be detected (etaMax = 2.5 for charged particles; etaMax ~ 4.0 for neutrals)
0070 */
0071   mutable IntegrandThetaFunction* fTheta_;
0072   mutable ROOT::Math::Integrator* integrator_;
0073 
0074   static const unsigned int debugLevel_ = 0;
0075 };
0076 
0077 #endif