Skip to content
Snippets Groups Projects
Commit 09aee3ec authored by Fons Rademakers's avatar Fons Rademakers
Browse files

Add some long lost GUI code by Vasilis Vlachoudis which shows a very nice

Periodic Table made with the ROOT GUI classes. For more see periodic/README.


git-svn-id: http://root.cern.ch/svn/root/trunk@35715 27541ba8-7e3a-0410-8455-c3a389f83636
parent 9244585d
No related branches found
No related tags found
No related merge requests found
Showing
with 303 additions and 0 deletions
......@@ -706,6 +706,7 @@ distclean: clean
-@cd RootShower && $(MAKE) distclean
-@cd rhtml && $(MAKE) distclean
-@cd RootIDE && $(MAKE) distclean
-@cd periodic && $(MAKE) distclean
.SUFFIXES: .$(SrcSuf)
......
void LoadXS()
{
gSystem->Load("libNdb");
NdbMTReactionXS pb(1,"Total Cross Section");
pb.LoadENDF("8200.endf");
const Int_t npoint=1000;
Double_t e=1.0E-3;
const Double_t fact = TMath::Exp(TMath::Log(2.0E7/e)/(Double_t)(npoint-1));
Float_t *x=new Float_t[npoint];
Float_t *y=new Float_t[npoint];
for (Int_t i=0; i<npoint; ++i) {
x[i]=e;
y[i]=pb.Interpolate(e);
e*=fact;
}
c1 = new TCanvas("c1","Lead Cross section",200,10,700,500);
c1->SetFillColor(42);
c1->SetGridx();
c1->SetGridy();
c1->GetFrame()->SetFillColor(21);
c1->GetFrame()->SetBorderSize(12);
c1->SetLogx();
c1->SetLogy();
TGraph *gr = new TGraph(npoint,x,y);
gr->SetFillColor(19);
gr->SetLineColor(2);
gr->SetLineWidth(2);
gr->SetMarkerColor(4);
gr->SetMarkerStyle(21);
gr->SetMarkerSize(0.2);
gr->SetTitle("Lead Total Cross section");
gr->Draw("AWLP");
//Add axis titles.
//A graph is drawn using the services of the TH1F histogram class.
//The histogram is created by TGraph::Paint.
//TGraph::Paint is called by TCanvas::Update. This function is called by default
//when typing <CR> at the keyboard. In a macro, one must force TCanvas::Update.
c1->Update();
gr->GetHistogram()->SetXTitle("Energy in eV");
gr->GetHistogram()->SetYTitle("Cross Section in Barns");
}
############# MACROS ##############
include ../Makefile.arch
DICT := NdbDict.$(SrcSuf)
DICTH := $(DICT:.$(SrcSuf)=.h)
DICTO := $(DICT:.$(SrcSuf)=.$(ObjSuf))
DBSRCS := $(wildcard Ndb*.$(SrcSuf))
XSSRCS := $(wildcard XS*.$(SrcSuf))
SRCS := $(XSSRCS) $(DBSRCS)
HDRS := $(SRCS:.$(SrcSuf)=.h) NdbLinkDef.h
HDRS := $(filter-out $(DICTH),$(HDRS))
TARGETLIB = libNdb.$(DllSuf)
TARGETPRG = XSGui$(ExeSuf)
DBOBJS = $(DBSRCS:.$(SrcSuf)=.$(ObjSuf))
XSOBJS = $(XSSRCS:.$(SrcSuf)=.$(ObjSuf))
############# RULES ###############
.$(SrcSuf).$(ObjSuf):
$(CXX) $(CXXFLAGS) -c $<
############# TARGETS #############
.SUFFIXES: .$(SrcSuf) .$(ObjSuf) $(ExeSuf) .$(DllSuf)
all: $(TARGETPRG) $(TARGETLIB)
$(DICT): $(HDRS)
@echo "Generating dictionary $@..."
@$(ROOTCINT) -f $@ -c $^
$(TARGETPRG): $(XSOBJS) $(DBOBJS) $(DICTO)
$(LD) $(LDFLAGS) $^ $(GLIBS) $(OutPutOpt)$@
@echo "$@ done"
$(TARGETLIB): $(DBOBJS) $(DICTO)
ifeq ($(PLATFORM),macosx)
@$(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@
else
@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@
endif
distclean: clean
@rm -f $(TARGETPRG) $(TARGETLIB) $(DICT) $(DICTH)
clean:
@rm -f $(DBOBJS) $(XSOBJS) $(DICTO)
#include "NdbAngularDist.h"
ClassImp(NdbAngularDist)
#ifndef NDBANGULARDIST_H
#define NDBANGULARDIST_H
#include "NdbMF.h"
/* ========= TMFAngularDist ============ */
class NdbAngularDist : public NdbMF
{
protected:
public:
NdbAngularDist()
: NdbMF(4, "Angular distributions for emitted particles") {}
~NdbAngularDist() {}
ClassDef(NdbAngularDist,1)
}; // NdbMfAngularDist
#endif
#include "NdbDCAngularDist.h"
ClassImp(NdbDCAngularDist)
#ifndef DCANGULARDIST_H
#define DCANGULARDIST_H
#include "NdbMF.h"
/* ========= NdbDCAngularDist ============ */
class NdbDCAngularDist : public NdbMF
{
protected:
public:
NdbDCAngularDist()
: NdbMF(34, "Data covariances for angular distributions") {}
~NdbDCAngularDist() {}
ClassDef(NdbDCAngularDist,1)
}; // NdbDCAngularDist
#endif
#include "NdbDCEnergyDist.h"
ClassImp(NdbDCEnergyDist)
#ifndef MFDCENERGYDIST_H
#define MFDCENERGYDIST_H
#include "NdbMF.h"
/* ========= NdbDCEnergyDist ============ */
class NdbDCEnergyDist : public NdbMF
{
protected:
public:
NdbDCEnergyDist()
: NdbMF(35, "Data covariances for energy distributions") {}
~NdbDCEnergyDist() {}
ClassDef(NdbDCEnergyDist,1)
}; // NdbDCEnergyDist
#endif
#include "NdbDCNuBar.h"
ClassImp(NdbDCNuBar)
#ifndef MFDCNUBAR_H
#define MFDCNUBAR_H
#include "NdbMF.h"
/* ========= TMFDCNuBar ============ */
class NdbDCNuBar : public NdbMF
{
protected:
public:
NdbDCNuBar()
: NdbMF(31, "Data covariances for nu(bar)") {}
~NdbDCNuBar() {}
ClassDef(NdbDCNuBar,1)
}; // NdbDCNuBar
#endif
#include "NdbDCRadioXS.h"
ClassImp(NdbDCRadioXS)
#ifndef MFDCRADIOXS_H
#define MFDCRADIOXS_H
#include "NdbMF.h"
/* ========= NdbDCRadioXS ============ */
class NdbDCRadioXS : public NdbMF
{
protected:
public:
NdbDCRadioXS()
: NdbMF(40, "Data covariances for radionuclide production "
"cross sections") {}
~NdbDCRadioXS() {}
ClassDef(NdbDCRadioXS,1)
}; // NdbDCRadioXS
#endif
#include "NdbDCRadioYield.h"
ClassImp(NdbDCRadioYield)
#ifndef DCRADIOYIELD_H
#define DCRADIOYIELD_H
#include "NdbMF.h"
/* ========= NdbDCRadioYield ============ */
class NdbDCRadioYield : public NdbMF
{
protected:
public:
NdbDCRadioYield()
: NdbMF(39, "Data covariances for radionuclide "
"production yields") {}
~NdbDCRadioYield() {}
ClassDef(NdbDCRadioYield,1)
}; // NdbDCRadioYield
#endif
#include "NdbDCReactionXS.h"
ClassImp(NdbDCReactionXS)
#ifndef DCREACTIONXS_H
#define DCREACTIONXS_H
#include "NdbMF.h"
/* ========= NdbDCReactionXS ============ */
class NdbDCReactionXS : public NdbMF
{
protected:
public:
NdbDCReactionXS()
: NdbMF(33, "Data covariances for reaction cross section") {}
~NdbDCReactionXS() {}
ClassDef(NdbDCReactionXS,1)
}; // NdbDCReactionXS
#endif
#include "NdbDCResParam.h"
ClassImp(NdbDCResParam)
#ifndef DCRESPARAM_H
#define DCRESPARAM_H
#include "NdbMF.h"
/* ========= NdbDCResParam ============ */
class NdbDCResParam : public NdbMF
{
protected:
public:
NdbDCResParam()
: NdbMF(32, "Data covariances for resonance parameters") {}
~NdbDCResParam() {}
ClassDef(NdbDCResParam,1)
}; // NdbDCResParam
#endif
#include "NdbDataCovariances.h"
ClassImp(NdbDataCovariances)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment