GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » Fairroot » General Discussion » getting run_rutherford to calculate eta parameter [SOLVED]
getting run_rutherford to calculate eta parameter [SOLVED] [message #14210] Wed, 14 November 2012 21:18 Go to next message
Raphael Cervantes is currently offline  Raphael Cervantes
Messages: 34
Registered: September 2012
Location: Stony Brook University
continuous participant
From: *physics.sunysb.edu
Hi all,
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 Smile
-Raphael

[Updated on: Thu, 15 November 2012 16:54]

Report message to a moderator

Re: getting run_rutherford to calculate eta parameter [message #14211 is a reply to message #14210] Wed, 14 November 2012 22:59 Go to previous messageGo to next message
Radoslaw Karabowicz is currently offline  Radoslaw Karabowicz
Messages: 108
Registered: June 2004
Location: GSI
continuous participant
From: *dip0.t-ipconnect.de
Dear Raphael,

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
Re: getting run_rutherford to calculate eta parameter [SOLVED] [message #14212 is a reply to message #14210] Thu, 15 November 2012 16:53 Go to previous message
Raphael Cervantes is currently offline  Raphael Cervantes
Messages: 34
Registered: September 2012
Location: Stony Brook University
continuous participant
From: *dyn.optonline.net
Thank you Radek,
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.

[Updated on: Thu, 15 November 2012 16:54]

Report message to a moderator

Previous Topic: abxolute scaling of the geometry files[SOLVED]?
Next Topic: Particle identification parameter for FairRutherfordPoint
Goto Forum:
  


Current Time: Sat Apr 20 03:12:54 CEST 2024

Total time taken to generate the page: 0.01105 seconds