GSI Forum - RDF feed
https://forum.gsi.de/index.php
getting run_rutherford to calculate eta parameter [SOLVED]
https://forum.gsi.de/index.phpindex.php?t=rview&goto=14210&th=3725#msg_14210
I would like to request help in modifying fairroot to give me information about eta=-log(tan(theta/2)), which is a very common parameter for understanding detector physics. Moreover, I think it should calculate eta by default, in the same way that it calculates phi and theta by default.
To give more background:
The way fairbase is in the repository, if you do
root fairroot/examples/rutherford/macros/run_rutherford.C
the output is contained in fairroot/examples/rutherford/macros/data/test.mc.root.
If I open the root file
root data/test.mc.root
TBrowser j
Then you will see the attached image. I would like to modify fairroot to include information about eta as one of the leaves of FairRutherfordPoint. Can someone tell me how to do that? Would I need to make changes to FairRutherfordPoint? FairMCPoint? etc...
I hope I'm making myself clear. All help is greatly appreciated
-Raphael]]>Raphael Cervantes2012-11-14T20:18:02-00:00Re: getting run_rutherford to calculate eta parameter
https://forum.gsi.de/index.phpindex.php?t=rview&goto=14211&th=3725#msg_14211
If you need some extra variable to be written to the root file,
then:
1. you have to edit FairRutherfordPoint.h and add the variable
in question to the private members, f.e.:
Float_t fEta;
2. edit the FairRutherfordPoint.cxx and set the value
of the variable in the constructors, preferably after the places
when the fTheta values are set:
fEta = -TMath::Log(TMath::Tan(fTheta/2.));
3. recompile
4. run the macro
Hopefully you will get the variable in the output tree as fEta.
yours
radek]]>Radoslaw Karabowicz2012-11-14T21:59:56-00:00Re: getting run_rutherford to calculate eta parameter [SOLVED]
https://forum.gsi.de/index.phpindex.php?t=rview&goto=14212&th=3725#msg_14212
That did the trick. For those who may have the same question as I do and who are as clueless as I am, make sure you include the TMath header in FairRutherfordPoint.cxx at the top so that compiling knows what is going on with Tan and Log
#include "TMath.h"
Do this at step 2.]]>Raphael Cervantes2012-11-15T15:53:34-00:00