CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/PhysicsTools/Utilities/interface/Square.h

Go to the documentation of this file.
00001 #ifndef PhysicsTools_Utilities_Sqare_h
00002 #define PhysicsTools_Utilities_Sqare_h
00003 #include "PhysicsTools/Utilities/interface/Numerical.h"
00004 #include "PhysicsTools/Utilities/interface/Power.h"
00005 
00006 namespace funct {
00007 
00008   template<typename F> struct Square { 
00009     typedef typename Power<F, Numerical<2> >::type type; 
00010   };
00011 
00012   template<typename F> 
00013   typename Square<F>::type sqr(const F& f) { 
00014     return pow(f, num<2>()); 
00015   }
00016 
00017 }
00018 #endif