GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » Hades » Pluto » [SOLVED] PAnyDistribution Add Multiple equation
[SOLVED] PAnyDistribution Add Multiple equation [message #14022] Sat, 29 September 2012 07:22 Go to previous message
Michael Kunkel is currently offline  Michael Kunkel
Messages: 53
Registered: June 2011
continuous participant
From: *hr.hr.cox.net
Greetings

I would like to implement several logic statements into a distribution using PAnyDistrubution.

I tried to model this by mimicking the example macro demo_PAnyDistribution in the macros directory.


    TH1F * cache  = new TH1F ("cache","Rho0 t cache",400,-4.0,0.0);
    
    decay->AddEquation(cache,"beam = _parent->GetBeam(); beam->Boost(_parent) ; t1 = (beam - [rho0])->Mag2(); _x = t1;");

  decay->AddEquation("beam2 = _parent->GetBeam(); beam2->Boost(_parent); if (beam2 < 4.6) _f = exp( 6.9*t1 ); if (beam2 > 4.6) _f = exp( 8.9*t1 );");



It seems I do not understand, because PLUTO will always execute the first "IF" statement regardless of the beam energy.

If this something I would have to use a 2D histogram for? A 2D histogram seems overkill for a project like this.

Thanks

[Updated on: Tue, 28 May 2013 18:38]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic: [SOLVED] PAnyDistribution broke in v5.40.5
Next Topic: how to calculate 'enhance'
Goto Forum:
  


Current Time: Mon Oct 07 20:36:14 CEST 2024

Total time taken to generate the page: 0.00689 seconds