Fork me on GitHub

Changeset 369 in svn


Ignore:
Timestamp:
May 10, 2009, 8:14:19 PM (16 years ago)
Author:
Xavier Rouby
Message:

avoid the ROOT warning when PT is very small

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/LHEFConverter.cc

    r295 r369  
    9090    element->PT = momentum.Perp();
    9191    signPz = (element->Pz >= 0.0) ? 1.0 : -1.0;
    92     element->Eta = element->PT == 0.0 ? signPz*999.9 : momentum.Eta();
     92    //element->Eta = element->PT == 0.0 ? signPz*999.9 : momentum.Eta(); to avoid a warning from ROOT, replace the "==0" by "< 1e-6"
     93    element->Eta = element->PT < 1e-6 ? signPz*999.9 : momentum.Eta();
    9394    element->Phi = momentum.Phi();
    9495    element->Rapidity = element->PT == 0.0 ? signPz*999.9 : momentum.Rapidity();
  • trunk/src/STDHEPConverter.cc

    r350 r369  
    8989    element->PT = momentum.Perp();
    9090    signPz = (element->Pz >= 0.0) ? 1.0 : -1.0;
    91     element->Eta = element->PT == 0.0 ? signPz*999.9 : momentum.Eta();
     91    //element->Eta = element->PT == 0.0 ? signPz*999.9 : momentum.Eta(); to avoid a warning from ROOT, replace the "==0" by "< 1e-6"
     92    element->Eta = element->PT <1e-6 ? signPz*999.9 : momentum.Eta();
    9293    element->Phi = momentum.Phi();
    9394
Note: See TracChangeset for help on using the changeset viewer.