00001 #ifndef PhysicsTools_Utilities_DecomposePower_h 00002 #define PhysicsTools_Utilities_DecomposePower_h 00003 #include "PhysicsTools/Utilities/interface/Power.h" 00004 #include "PhysicsTools/Utilities/interface/Numerical.h" 00005 00006 namespace funct { 00007 template<typename A, typename B> 00008 struct DecomposePower { 00009 typedef PowerStruct<A, B> type; 00010 inline static const A& getBase(const type& _) { return _._1; } 00011 inline static const B& getExp(const type& _) { return _._2; } 00012 }; 00013 00014 template<typename A> 00015 struct DecomposePower<A, Numerical<1> > { 00016 typedef A type; 00017 inline static const A& getBase(const type& _) { return _; } 00018 inline static Numerical<1> getExp(const type& _) { return num<1>(); } 00019 }; 00020 00021 } 00022 00023 #endif