how to add additional (energy) abscissa to a TOF spectrum?

From: Kazuyoshi Furutaka <furutaka_at_jb3.so-net.ne.jp>
Date: Fri, 02 Nov 2007 22:52:27 +0900 (JST)


Dear rooters,

How can I add additional abscissa (energy scale) to a time-of-flight spectrum?
For 10-m neutron TOF I wrote the attached by using TGaxis, but it's apparently failing...

Thanks in advance,
Kazuyoshi

--
Kazuyoshi Furutaka
furutaka_at_jb3.so-net.ne.jp

{ gStyle->SetOptStat(0); TH1F* tof = new TH1F("tof","10-m neutron TOF: E(eV)=(72.3*10(m)/TOF(#mus))^2", 90,10.0,100.0); tof->GetYaxis()->SetRangeUser(0,10); tof->GetXaxis()->SetTitle("neutron TOF (#mus)"); tof->Draw(); TF1* fEne = new TF1("fEne","pow(72.3*10.0/x,2)",10.0,100.0); TGaxis* energyAxis = new TGaxis(10,10,100,10,"fEne",510,"-"); energyAxis->SetTitle("energy (eV)"); energyAxis->Draw(); }

Received on Fri Nov 02 2007 - 14:53:40 CET

This archive was generated by hypermail 2.2.0 : Fri Nov 02 2007 - 23:50:01 CET