Is there an equivalent clas for RooFit?
A.E. Snyder, Group EC \!c*p?/ SLAC Mail Stop #95 ((. .)) Box 4349 | Stanford, Ca, USA, 94309 '\|/` e-mail:snyder_at_slac.stanford.edu o phone:650-926-2701 _ http://www.slac.stanford.edu/~snyder BaBar FAX:650-926-2657 Collaboration
On Thu, 15 Jan 2009, Lorenzo Moneta wrote:
> Hi Parada,
>
> You need to pass the function to be differentiated to the Derivator class.
> you can see this example
>
> http://root.cern.ch/drupal/content/function-derivation
>
> Best Regards
>
> Lorenzo
> On Jan 15, 2009, at 6:32 PM, Paraduan Hutauruk wrote:
>
>> Dear all,
>>
>> Does anyone know the command for first and second derivative of a function?
>> I tried to wrote code for first derivative using ROOT::Math::Derivator(),
>> but i got some error message. Could anyone let me know where is the
>> mistake please? or guide me to right way?.
>> #include "Math/SpecFunc.h"
>> #include "TTree.h"
>> #include "TFile.h"
>> #include "TNtupleD.h"
>>
>> #include"Math/Derivator.h"
>>
>> const int LMAX=4;
>> double par[] ={1,1,1,1};
>> double x=1;
>> double cros_mul(double *par , double x )
>> {
>> double func=0;
>> for (int L=0; L<=LMAX ; L++)
>> {
>> int L2 =L+1;
>> func += par[L]*ROOT::Math::Derivator::ROOT::Math::assoc_legendre(L2,0,x)
>> ;
>> }
>> return func; }
>>
>> Many thanks for help
>> Regards,
>> Parada
>>
>
Received on Thu Jan 15 2009 - 18:54:16 CET
This archive was generated by hypermail 2.2.0 : Fri Jan 16 2009 - 17:50:02 CET