Programs
Simulation of coincidences in 3 detectors
Test of automatic peak find routine
Xcom - gamma attenuation coefficients
ut.C - utility library for Root.
button.C - utility library for Root.
Simulation of coincidences 04/09/23
Some uncertainities around the way how to count the intensity of coincidences
resulted in this small program Root/05_progs/02_gcoin_sim named mktree.C. This program need number of events as parameter and
creates tree on disk (detector branches), defines angle ranges in dint array
and distributes gamma following the random angle. Then first gamma has it's efficiency
and the second has a different efficiency of detection. It creates sumpeaks by adding
the second gamma to det field with energy.
Analysis is made within Loop of tcoin.[Ch] , that is made
from the Tree by t->MakeClass(); (run automaticaly from anal.C).
Test of automatic peak find routine 05/04/12
Name: testfit.C
- pksearch(histo,level) ... TDC calibration, T0 (not tested). Fits
the peaks above treshold level with Gauss and lin.bg.
Does it twice - first time searches for reasonable sigma - so the result
depends on level. Output is TGraphErrors - x values
- pkanalyse(histo) ... Ge gamma spectra.
- creates several histograms, that give a view on slopes in spectra
- Hunt for BG Takes small slopes only - relative to sigma of the point itself
- In 4 steps - removes points higher then average
- pol3 fits to create background histogram
- condition on slopes, good(BG) sigmas and positions...creates peak graph
- removes lonely points
- use:
- .L testfit.C
- TFile *f=new TFile("spe_run32.root")
- TGraph *g=(TGraph*) pkanalyse(r32s896)
- r32s896->Draw()
- g->Draw("p")
- backg->Draw("same")
Xcom - gamma attenuation coefficients 04/09/27
Program a.out is located in F/xcom/. Just run it and select proper
values from the line menu.
Maintained programs ....
ut.C - utility library for Root started 04/10/12
- evobar
- evolution bar; use: if (max%n==100){ evobar(n/max);}
- Tconffile: 04/10/18
- object to read ini files with simple syntax:
comments (#) in the line start allowed,
else there is a keyword value pair
with one space between.
- Tconffile(char *file) read the file
- GetValueC(keyword) or GetValueI GetValueF,
get the character (int, float) valuu for the keyword.
- coinmark started 04/10/07
- object to colect (gamma) coincidences within some procedure;
Just define initial conditions, read the file with energy gates
and then - in every event - function catalog will
care about filling proper histograms.
The object in defined in a class Tcoinmark;
(Programed object resided at Root/04_prepared/02_prep_coin/01_objm/)
- read(filename) - reads energy gates from file (possible also directly from constructor).
It checks foreground or background possition and makes histogram with title.
File is just list of 3 value rows - (mean)_energy left_limit right_limit. Like
511 505 516 - which means Energy(name) is 511(keV),
consider all events (in any detector) that have E>505 and E<516 to create
(foreground/effect)histogram.
- catalog(n, array) - to be called within Loop, fills proper histograms and counts coincidences. n is length of array and array is an array with enegry values from the detectors.
- stat prints out statistics
- save - to be done. ...
use:
Tcoinmark *tc=new Tcoinmark("a.marks");
float e[4];tc->catalog(4,e);
tc->stat();
decaysim 04/09/23
Program nuclid.h resides in Root/05_progs/02_decaysim. It uses
object class Tnuc and main functions are int Tnuc::add_daughter(Tnuc *me, float rrr)
, which adds an object and branching (branching is recalculated everytime new branch is added)
AND event(t).
int Tnuc::event(double ttt) makes one event at time ttt, it runs TH1D filling, it calls
get_branch(), and then it fills proper objects in proper time
obtained via (get_time(ttt)) by calling daughter's event(tout).
Example of use is in run.C.
Problems: not really precise because of ln(low number). Struggles at faint scale....
example of use:
Tnuc* Cl,*Ar45,*Ar44,*K45;
Cl=new Tnuc("Cl",0.4);
Ar45=new Tnuc("Ar45",21.48);
Ar44=new Tnuc("Ar44",11.87*60);
K45=new Tnuc("K45",17.3*60);
Cl->add_daughter( Ar45, 100.);
Cl->add_daughter( Ar44, 24.);
Ar45->add_daughter( K45, 100.);
Cl->set_histo(10000,0,10000);
Ar45->set_histo(10000,0,10000);
Ar44->set_histo(10000,0,10000);
K45->set_histo(10000,0,10000);
for (int i=0;i<10000;i++){
Cl->event(0.0+float(i)*0.01 );
}
delete Cl;
delete Ar45;
delete Ar44;
delete K45;
button.C
Big block of functions for spectra analysis..... Descriptions
will appear during the time....
efficiency tools
- functions TF1 feff3p, feff4p, feff5p, feff3p_p
are options for fitting a efficiency curve. Init them via feff_init()
- sh_savefit(gg1,"testleps.root")
saves result of the last (GraphErrors) fit to the file. It takes the graph,
finds out the name of function At 0 list position,
and questions the function for the chi2. Then questions gMinuit
for matrix and parameter number. All results are saved to file.
- sh_viewfit("testleps.root") just lists the saved data.
- sh_geterrorfit("testge1.root",511,1000,1,0.0000466,0.00001)
takes saved data from file, uses function feff3p at 511keV, Area 1000 with
error 1, coefficient with error... Derivations are used to extract the
intensity error.
To be finished (function selection)
end of file