Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:33:32

0001 #ifndef PhysicsTools_Utilities_Sqare_h
0002 #define PhysicsTools_Utilities_Sqare_h
0003 #include "PhysicsTools/Utilities/interface/Numerical.h"
0004 #include "PhysicsTools/Utilities/interface/Power.h"
0005 
0006 namespace funct {
0007 
0008   template <typename F>
0009   struct Square {
0010     typedef typename Power<F, Numerical<2> >::type type;
0011   };
0012 
0013   template <typename F>
0014   typename Square<F>::type sqr(const F& f) {
0015     return pow(f, num<2>());
0016   }
0017 
0018 }  // namespace funct
0019 #endif