Examples for Pluto as a quick converter

Examples for Pluto as a quick converter adminuser

All examples can be combined and adapted.

Output of a reaction to ASCII

This can be done by the echo-command:

PReaction my_reaction("_T1=2.2","p","p","p p eta [dilepton [e+ e-] g]"); 
my_reaction.Output("eta_dalitz.lst","px=[eta]->Px(); py=[eta]->Py(); pz=[eta]->Pz(); echo $px,$py,$pz"); 
my_reaction.Print(); 
my_reaction.Loop(100);

Reading of an ASCII file and conversion to a TNtuple

Text files can be read with the readline-command. The pattern in the curly brackets is similar to scanf. The target variables are defined with the @-prefix.
Keep in mind that the variables in the ntuple are filled automatically if the branches match the defined variables by name.

TFile *f = new TFile("ntuple.root", "RECREATE"); 
TNtuple *ntuple = new TNtuple("ntuple", "data", "px:py:pz"); 
PReaction my_reaction;     
my_reaction.Input("eta_dalitz.lst", "readline{@px,@py,@pz};"); 
my_reaction.Output(ntuple); 
cout << my_reaction.Loop() << " events converted" << endl; 
ntuple->Write(); 
f->Close();

Reading of an ASCII file and projection of the content to a histogram

The text file can be read, new variables can be calculated and projected to histograms:

TH1F *pt = new TH1F("pt","",20,0,1); 
PReaction my_reaction;     
my_reaction.Input("eta_dalitz.lst","readline{@px,@py,@pz};"); 
my_reaction.Do(pt,"_x = sqrt(px*px + py*py)"); 
cout << my_reaction.Loop() << " events projected" << endl; 
pt->Draw();

Reading of an ASCII file and conversion to PParticles

PReaction my_reaction("eta_file");     
my_reaction.Input("eta_dalitz.lst","readline{@px,@py,@pz};"); 
my_reaction.Do("myeta = P3M(px,py,pz,eta.mass); myeta->SetID(eta.pid); push(myeta)"); 
cout << my_reaction.Loop() << " events converted" << endl;

Conversion of a TNtuple to ASCII

This is quite simple, as the branches in the input ntuple are used as variables.

TFile *f = new TFile("ntuple.root"); 
PReaction my_reaction;     
my_reaction.Input(ntuple); 
my_reaction.Output("eta.lst","echo $px,$py,$pz"); 
cout << my_reaction.Loop() << " events converted" << endl;

Conversion of an UniGen file to a TNtuple

This is a more complex example, how Pluto can be used to read UniGen files. UniGen has a lot of converters for (e.g.) UrQMD and HSD, therefore these files can be feed into Pluto by the UniGen input.

TFile *f = new TFile("dileptons.root", "RECREATE"); 
TNtuple *ntuple = new TNtuple("dileptons", "data", "ee_mass"); 
PReaction my_reaction;     
my_reaction.AddBulk(new PUniGenInput("eta_dalitz_unigen.root")); 
my_reaction.Do("ee_mass = ([e+] + [e-] )->M();"); 
my_reaction.Output(ntuple); 
cout << my_reaction.Loop() << " events converted" << endl; 
f->cd(); 
ntuple->Write(); 
f->Close();

*Version 5.37.4 (dev),

Download archive

Download archive adminuser

 

Version 6.01 of 11/06/2018

Version 6.00 of 17/05/2017

The following versions are only available inside GSI

Version 5.02 of 03/07/2007

Class Index Release notes

Version 5.11 of 11/11/2007

Class Index Tutorials Release notes

Version 5.12 of 27/11/2007

Class Index Tutorials Release notes

Version 5.13 of 29/01/2008
(branched)

Class Index Tutorials Release notes

Version 5.14 of 18/02/2008 (branched)

Class Index Tutorials Release notes

Version 5.14.1 of 19/02/2008
(branched, last 5.1x version)

Class Index Tutorials Release notes

Version 5.21 of 21/01/2009

Class Index Tutorials Roadmap Release notes Contributing authors References

Version 5.22 of 27/02/2009

Class Index Tutorials Roadmap Release notes Contributing authors References

Version 5.23 of 17/04/2009

Class Index Tutorials Roadmap Release notes Contributing authors References

Version 5.24 of 18/05/2009

Class Index Tutorials Roadmap Release notes Contributing authors References

Version 5.25 of 12/06/2009

Class Index Tutorials Roadmap Release notes Contributing authors References

Version 5.25.1 of 29/06/2009
(last 5.2x version)

Class Index Tutorials Roadmap Release notes Contributing authors References

Version 5.31 of 28/09/2009

Class Index Tutorials Roadmap Release notes Contributing authors References
News:

  • Many plugins (some of them are still in development)
  • New makefile
  • Some changes for quasi-free reactions
  • Changed standard seed to the systime

Known problems:

  • pd → He η does not work
  • Bulk decay sometimes overwrites parent

Version 5.32 of 14/10/2009

Class Index Tutorials Roadmap Contributing authors References
News: (for details see Release notes)

  • Adding instream particles via batch command (see new demo macro)
  • General purpose file format for acceptance filters (demo macro still missing)
  • Added more strangeness particles
  • New aliases (e.g. Delta0(1232) for D0)
  • Added fairroot plugin (see README)

Known problems (fixed in 5.33):

  • Bulk classes in the pdm are not working
  • Embedded particle still shows problems

Version 5.33 of 04/11/2009

Class Index Tutorials Roadmap Contributing authors References

Version 5.34 of 19/01/2010

Class Index QA-plots Tutorials Contributing authors References
News: (for details see Release notes)

  • Many plugins (e.g. pn scattering)

Version 5.35 of 09/07/2010

Class Index QA-plots Tutorials Contributing authors References
News: (for details see Release notes)

  • Many plugins (e.g. pn scattering)
  • Changed standard seed to the systime
  • N-body phase space (N>3) with 1 unstable hadron
  • PlutoScript has been finalized

Version 5.36 of 24/09/2010

Class Index QA-plots Tutorials Contributing authors References
News: (for details see Release notes)

  • Correct phase space for Resonance to N + gamma
  • Moved some variables to batch space
  • Added demo FF models in eta_decays
  • Fixed some bugs, in particular the slow omega bug in the fireball macro

Version 5.37 of 04/01/2011

Class Index QA-plots Tutorials Contributing authors References
News: (for details see Release notes)

  • Collider experiments are working
  • New reaction parser (supports beam tilt)
  • Fixed some severe problems with PBatch
  • Link from data base values to PBatch
  • Added PSimpleVMDFF with customized vmd-equations
  • Added mass correlator to genbod
  • Finished basic work for the rare eta decays

Version 5.38 of 15/07/2011

Class Index QA-plots Tutorials Contributing authors References
News: (for details see Release notes)

  • PDalitzDistribution can use histograms as input
  • Batch script enhanced by multi-purpose ASCII input (readline command) and output (echo)
  • New plugin: pdg code and unigen input (reading UniGen events, see converter link above)
  • Added more Dalitz decays of resonances
  • Standard dilepton rho shape changed to hard cut at 2-pion threshold

Version 5.40 of 03/11/2011

Class Index QA-plots Tutorials
News: (for details see Release notes)

  • Added PAnyDistribution which works as a general purpose rejection distribution using batch script equations.
  • Fixed bug: _w was not written back to the stream particles.
  • Added build-in ->GetBeam() and ->GetTarget() methods in PBatch

Version 5.41 of 13/11/2012

Class Index QA-plots Tutorials

News: (for details see Release notes)

  • Added new resonances in pdg-plugin
  • Added SetRapidityDistribution(TF1 *) to PFireball
  • Added Set/GetEnhanceChannelBR which allows to scale the "branching ratio" for bulk decays.
  • Added else command for the script language
  • Added new PScatterCrossSection class for q vs. cos(theta) sampling
  • Added PF1/PF2/PF3 Pluto functions.

Version 5.42 of 13/03/2013

Class Index * QA-plots * Tutorials

News (since v5.41): (for details see Release notes)

  • Bug fixes

Version 5.43 of 21/07/2015

Class Index * QA-plots * Tutorials

News (since v5.42): (for details see Release notes)

  • Bug fixes, in particular:
    • Fixed bug for thermal photons, and enabled 1-dimension thermal sampling functions in PFireball.
    • Fixed bug in omega -> mu+mu-pi0 decay
  • Added bulk interface to PChannelsSee demo macro.
  • Added PDensityMatrix to convert densities (from ASCII file, like HSD) to particles. See demo macro.
  • Added plugin for transport simulation of particles through a beamline including beam detectors
  • Added GetRandom(X,Y) methods

Version 5.44.4 of 17/05/2017

Class Index * QA-plots * Tutorials

News (since v5.43): (for details see Release notes)

  • Bug fixes only

Version 6.00 of 17/05/2017

Class Index * QA-plots * Tutorials

News (since v5.xx): (for details see Release notes)

  • Changed to ROOT6
  • Switched to cmake
  • New directory structure and code cleanup