CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/PhysicsTools/IsolationUtils/src/ConeAreaRootFunction.cc

Go to the documentation of this file.
00001 #include "PhysicsTools/IsolationUtils/interface/ConeAreaRootFunction.h"
00002 
00003 // -*- C++ -*-
00004 //
00005 // Package:    ConeAreaRootFunction
00006 // Class:      ConeAreaRootFunction
00007 // 
00016 //
00017 // Original Author:  Christian Veelken, UC Davis
00018 //         Created:  Thu Nov  2 13:47:40 CST 2006
00019 // $Id: ConeAreaRootFunction.cc,v 1.1 2007/05/23 20:21:37 veelken Exp $
00020 //
00021 //
00022 
00023 // C++ standard library include files
00024 #include <iostream>
00025 #include <iomanip>
00026 #include <string>
00027 
00028 // ROOT include files
00029 #include <TMath.h>
00030 
00031 // CMSSW include files
00032 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00033 
00034 //
00035 // constructors and destructor
00036 //
00037 
00038 ConeAreaRootFunction::ConeAreaRootFunction()
00039   : ConeAreaFunction()
00040 {
00041   coneArea_ = 0;
00042 }
00043 
00044 ConeAreaRootFunction::ConeAreaRootFunction(const ConeAreaRootFunction& bluePrint)
00045   : ConeAreaFunction(bluePrint)
00046 {
00047   coneArea_ = bluePrint.coneArea_;
00048 }
00049 
00050 ConeAreaRootFunction::~ConeAreaRootFunction()
00051 {
00052 //--- nothing to be done yet...
00053 }
00054 
00055 //
00056 // assignment operator
00057 //
00058 
00059 ConeAreaRootFunction& ConeAreaRootFunction::operator=(const ConeAreaRootFunction& bluePrint)
00060 {
00061   ConeAreaFunction::operator=(bluePrint);
00062 
00063   coneArea_ = bluePrint.coneArea_;
00064 
00065   return (*this);
00066 }
00067 
00068 //
00069 // member functions
00070 //
00071 
00072 void ConeAreaRootFunction::SetParameterConeArea(double coneArea)
00073 {
00074   coneArea_ = coneArea;
00075 }
00076 
00077 void ConeAreaRootFunction::SetParameters(double* param)
00078 {
00079   if ( debugLevel_ > 0 ) {
00080     edm::LogVerbatim("") << "<ConeAreaRootFunction::SetParameters>:" << std::endl
00081                          << " theta0 = " << param[0] << std::endl
00082                          << " phi0 = " << param[1] << std::endl
00083                          << " coneArea = " << param[2] << std::endl;
00084   }
00085 
00086   ConeAreaFunction::SetParameters(param);
00087   
00088   coneArea_ = param[2];
00089 }
00090 
00091 double ConeAreaRootFunction::DoEval(double x) const
00092 {
00093 //--- calculate difference between area covered by cone of opening angle alpha
00094 //    (given as function argument and measured from cone axis)
00095 //    and cone area set as parameter
00096 
00097   return ConeAreaFunction::DoEval(x) - coneArea_;
00098 }