Hi Ali,
I think you should use
TMath::Pi()
and not
TMath::Pi
in fact:
root [0] TMath::Pi
(const void*)0x1bdc60
root [1] TMath::Pi()
(Double_t)3.14159265358979312e+00
Cheers,
Vito
Suvayu Ali wrote:
> Hi everyone,
>
> Today I ran into something rather odd. I wanted to use Pi in some ATHENA
> (rel 15.4.0.1 with ROOT 5.22) code, so I tried TMath::Pi.
>
> My code looked something like this,
>> float delta_phi = fabs(muon_phi - muon_ID_phi); >> float delta_phi2 = fabs(2*TMath::Pi - delta_phi);
>> invalid operands of types `int' and `Double_t ()()' to binary >> `operator*'
>> float delta_phi = fabs(muon_phi - muon_ID_phi); >> double pi = acos(-1); >> float delta_phi2 = fabs(2*pi - delta_phi);
This archive was generated by hypermail 2.2.0 : Fri Oct 09 2009 - 05:50:05 CEST