CLHEP 2.0.4.7 Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

PuncturedSmearedExp.hh

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: PuncturedSmearedExp.hh,v 1.1.4.1 2004/04/29 00:20:36 garren Exp $
00003 // ------------------------------------------------------------------------------//
00004 // This function-object makes an exponential with acceptance holes ("punctures") //
00005 // smeared by a resolution function.                                             //
00006 //                                                                               //
00007 //                                                                               //
00008 // Joe Boudreau.                                                                 //
00009 //                                                                               //
00010 // ------------------------------------------------------------------------------//
00011 #ifndef _PuncturedSmearedExp_h_
00012 #define _PuncturedSmearedExp_h_ 
00013 #include "CLHEP/GenericFunctions/AbsFunction.hh"
00014 #include "CLHEP/GenericFunctions/Parameter.hh"
00015  
00016 namespace Genfun {
00017 
00022   class PuncturedSmearedExp: public AbsFunction {
00023 
00024     FUNCTION_OBJECT_DEF(PuncturedSmearedExp)
00025 
00026       public:
00027 
00028     // Constructor
00029     PuncturedSmearedExp();
00030 
00031     // Copy constructor
00032     PuncturedSmearedExp(const PuncturedSmearedExp &right);
00033   
00034     // Destructor:
00035     virtual ~PuncturedSmearedExp();
00036 
00037     // Retreive function value
00038     virtual double operator ()(double argument) const;
00039     virtual double operator ()(const Argument & a) const {return operator() (a[0]);}
00040   
00041     // Lifetime of exponential:
00042     Parameter & lifetime();
00043     const Parameter & lifetime() const;
00044 
00045     // Width of the gaussian:
00046     Parameter & sigma();
00047     const Parameter & sigma() const;
00048 
00049     // Puncture this thing:
00050     void puncture(double min, double max);
00051 
00052     // Get the puncture parameters:
00053     Parameter & min(unsigned int i);
00054     Parameter & max(unsigned int i);
00055     const Parameter & min(unsigned int i) const;
00056     const Parameter & max(unsigned int i) const;
00057     
00058 
00059   private:
00060   
00061     // These are for calculating mixing terms.
00062     double pow(double x, int n) const ;
00063     double erfc(double x) const ;
00064 
00065     // It is illegal to assign an adjustable constant
00066     const PuncturedSmearedExp & operator=(const PuncturedSmearedExp &right);
00067 
00068     Parameter              _lifetime;
00069     Parameter              _sigma;
00070     std::vector<Parameter> _punctures;
00071 
00072   };
00073 } // namespace Genfun
00074 #endif

Generated on Thu Jul 1 22:02:30 2010 for CLHEP by  doxygen 1.4.7