General documentation update
This commit is contained in:
parent
65567640dd
commit
d2bf32953f
BIN
.AD.cxx.swo
BIN
.AD.cxx.swo
Binary file not shown.
15
326.csv
Normal file
15
326.csv
Normal file
|
@ -0,0 +1,15 @@
|
|||
x, y, y_err
|
||||
50.24390, 1.01725,0.04
|
||||
58.536584, 1.01478,0.04
|
||||
69.26829, 1.07394,0.04
|
||||
79.02439, 1.15528,0.04
|
||||
80.48780, 1.08380,0.04
|
||||
89.75609, 1.11584,0.04
|
||||
98.53658, 1.02957,0.04
|
||||
100.48788, 1.05176,0.04
|
||||
110.2439, 1.04436,0.04
|
||||
121.46345, 1.01725,0.04
|
||||
129.7560, 1.00985,0.04
|
||||
141.9512, 0.8693,0.04
|
||||
147.3170, 0.90633,0.04
|
||||
161.9512, 0.78309,0.04
|
|
14
426.csv
Normal file
14
426.csv
Normal file
|
@ -0,0 +1,14 @@
|
|||
x, y, y_err
|
||||
50.73177, 1.06408,0.04
|
||||
58.536554, 0.99757,0.04
|
||||
70.2439, 0.896478,0.04
|
||||
79.51211, 0.84471,0.04
|
||||
80.48788, 0.81267,0.04
|
||||
89.7560, 0.891549,0.04
|
||||
100.48778, 0.93839,0.04
|
||||
98.53655, 0.86197,0.04
|
||||
109.7566, 0.90387,0.04
|
||||
121.46335, 0.97046,0.04
|
||||
141.9511, 1.11338,0.04
|
||||
147.8045, 1.15774,0.04
|
||||
161.9511, 1.25880,0.04
|
|
57
AD.cxx
57
AD.cxx
|
@ -1,3 +1,26 @@
|
|||
//#################################################################
|
||||
// This program is the main functional of an Angular Ditribution
|
||||
// calculation to fit and determine accepted values of delta.
|
||||
//
|
||||
// Input file need is two .csv, one is a table of racah values,
|
||||
// the second is the experimental data file. The program can handle
|
||||
// any amount of angles of detectors.
|
||||
//
|
||||
// The inputs needed are j1 and j2 values, the gamma-ray ,the radius,
|
||||
// distance and depth of the detectors, and the sigma of magnetic
|
||||
// substate distribution following the reaction of interest.
|
||||
//
|
||||
// The program generates 2 graphs - 1 Visible Angular distribution
|
||||
// plot and fit normalized by A0. - 2 The log(Chi-squared) vs
|
||||
// arctan(delta) graph.
|
||||
//
|
||||
// The program also outputs a ad.txt which has QDK coeff. and other
|
||||
// detector parameters.
|
||||
//
|
||||
//To compile : g++ AD.cxx -o {Input Executable Name} -lX11
|
||||
//For more information about angular distributions, read Rose and Brinks, and Frank Moore (1988).
|
||||
//#################################################################
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#include "GUI_AD.h"
|
||||
|
@ -7,9 +30,6 @@
|
|||
#include "Cleb.h"
|
||||
|
||||
|
||||
//To compile : g++ AD.cxx -o {Input Executable Name} -lX11
|
||||
//For more information about angular distributions, read Rose and Brinks, and Frank Moore (1988).
|
||||
|
||||
using namespace std;
|
||||
#ifndef __CINT__
|
||||
|
||||
|
@ -38,12 +58,12 @@ int main(int argc,char **argv){
|
|||
targetdistance = 4.;
|
||||
detthickness = 5.;
|
||||
|
||||
Energy = 1147.;
|
||||
Sigma = .5;
|
||||
Energy = 426.;
|
||||
Sigma = 1.0;
|
||||
|
||||
|
||||
j1 = 5.5;
|
||||
j2 = 3.5;
|
||||
j1 = 7.5;
|
||||
j2 = 5.5;
|
||||
//--------------------------------
|
||||
|
||||
//TEST MODE? y : 1 || n = 0
|
||||
|
@ -204,30 +224,16 @@ int main(int argc,char **argv){
|
|||
double aa = dangle[i];
|
||||
|
||||
dangler.push_back(aa*3.14159/180.);
|
||||
printf("dangle = %lf\n",dangler[i]);
|
||||
printf("Angle %d = %lf\n",i,dangler[i]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// if you need to scale the y data by sin(theta)
|
||||
|
||||
|
||||
/*
|
||||
for(int i=0; i<content.size(); i++){
|
||||
for(int j=0; j<content[i].size(); j++){
|
||||
cout<< content[i][j]<<" ";
|
||||
}
|
||||
cout<<"\n";
|
||||
}
|
||||
*/
|
||||
//legendre fitting
|
||||
// F[xi] = A0(1) + A2(P2(cos(xi))) + A4(P4(cos(xi)))
|
||||
//xi data is angle data in radians.
|
||||
//yi data is y-intensity data.
|
||||
|
||||
//to change the number of angles, just mess with the indexing of the read in and arrays.
|
||||
|
||||
|
||||
//12 constants. this will build our matrix for gaussian elinmination.
|
||||
//[a1 a2 a3] [A0] = [a4]
|
||||
//[a5 a6 a7] [A2] = [a8]
|
||||
|
@ -323,8 +329,8 @@ int main(int argc,char **argv){
|
|||
|
||||
|
||||
cout<<"A0 = "<<residual[0]<<"\n";
|
||||
cout<<"A2 = "<<residual[1]<<"\n";
|
||||
cout<<"A4 = "<<residual[2]<<"\n";
|
||||
cout<<"a2 = "<<residual[1]/residual[0]<<"\n";
|
||||
cout<<"a4 = "<<residual[2]/residual[0]<<"\n";
|
||||
|
||||
|
||||
|
||||
|
@ -845,7 +851,8 @@ int main(int argc,char **argv){
|
|||
}else if(optnum == 2 and param == 1){
|
||||
|
||||
optnum = -1;
|
||||
gui_ad.SetData(dangler,dydatas);
|
||||
// gui_ad.SetData(dangler,dydata); //dydata means you are using already normalizing data.
|
||||
gui_ad.SetData(dangler,dydatas); //dydatas means you are using non-A0 normalized data to start with.
|
||||
gui_ad.SetErrors(deydata);
|
||||
gui_ad.SetFit(residual[0],residual[1],residual[2]);
|
||||
|
||||
|
|
10
Cleb.h
10
Cleb.h
|
@ -1,7 +1,13 @@
|
|||
|
||||
#include "global.h"
|
||||
//#############################################################
|
||||
//To compile : g++ AD.cxx -o {Input Executable Name} -lX11
|
||||
//#include "Coeff.h"
|
||||
//
|
||||
//This file contains member functions of Clebsh-Gordan functions
|
||||
//and other methods to caluculate 3J and 6J symbols if needed
|
||||
//for direct Racah calculations.
|
||||
//
|
||||
//#############################################################
|
||||
#include "global.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
|
18
Functlib.h
18
Functlib.h
|
@ -1,6 +1,9 @@
|
|||
|
||||
//################################################################
|
||||
// This file contains the menu outputs and also misc conversion
|
||||
// functions used throughout the program.
|
||||
//
|
||||
//################################################################
|
||||
#include "global.h"
|
||||
//To compile : g++ AD.cxx -o {Input Executable Name} -lX11
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -25,16 +28,21 @@ void Readme(){
|
|||
std::cout<< " from experimental angular distributions as \n";
|
||||
std::cout<< " a function of multipole ratios using the \n";
|
||||
std::cout<< " theoretical angular distribution formulae \n";
|
||||
std::cout<< " in rose and brink \n";
|
||||
std::cout<< " in Rose and Brinks. \n";
|
||||
std::cout<< " \n";
|
||||
std::cout<< " Follow the prompt in order to correctly display \n";
|
||||
std::cout<< " \n";
|
||||
std::cout<< " To close the gui, press most buttons. \n";
|
||||
std::cout<< " To zoom in, left click then drag and let go. To unzoom\n";
|
||||
std::cout<< " press the space bar. To draw, right click\n";
|
||||
std::cout<< " press the space bar. To draw, right click. \n";
|
||||
std::cout<< " \n";
|
||||
std::cout<< " ad.txt is generated with geometric stats. \n";
|
||||
std::cout<< " Then at the end it generates CG/Racah\n";
|
||||
std::cout<< " Multiple different vectors available for \n";
|
||||
std::cout<< " other analysis perspectives. \n";
|
||||
std::cout<< " \n";
|
||||
std::cout<< " To run in test mode, see the top of AD.cxx.\n";
|
||||
std::cout<< " Running in test mode allows for faster use.\n";
|
||||
std::cout<< " \n";
|
||||
std::cout<< " \n";
|
||||
}
|
||||
|
||||
|
|
28
GUI_AD.h
28
GUI_AD.h
|
@ -1,10 +1,15 @@
|
|||
#include "global.h"
|
||||
|
||||
//To compile : g++ AD.cxx -o {Input Executable Name} -lX11
|
||||
//#############################################################################
|
||||
//
|
||||
// VERSION : 1.1 (Overlay for Angular Fit Display)
|
||||
// Created with thanks to Daniel Folds Holt - University of Cambridge Cavendish Lab
|
||||
//
|
||||
// The purpose of this GUI is for displaying angular distributions of the
|
||||
// gamma-ray decays inputed via the *.csv file. It is equipped with error
|
||||
// bars and a fit overlay. The output of this file is scaled by A0.
|
||||
//
|
||||
//############################################################################
|
||||
|
||||
|
||||
#include "global.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
@ -209,10 +214,11 @@ int HistoGUIad::Zoom(int mouse_x, int mouse_y){
|
|||
double HistoGUIad::legval(double theta){
|
||||
|
||||
double lg;
|
||||
double norm = A0;
|
||||
|
||||
double aaa = A0/A0;
|
||||
double aab = (A2E/A0)*(1.5 * pow(cos(theta),2) - .5);
|
||||
double aac = (A4E/A0)*(35./8. * pow(cos(theta),4) - 30./8. * pow(cos(theta),2) + 3./8. );
|
||||
double aaa = A0/norm;
|
||||
double aab = (A2E/norm)*(1.5 * pow(cos(theta),2) - .5);
|
||||
double aac = (A4E/norm)*(35./8. * pow(cos(theta),4) - 30./8. * pow(cos(theta),2) + 3./8. );
|
||||
|
||||
|
||||
lg = aaa + aab + aac;
|
||||
|
@ -245,9 +251,9 @@ int HistoGUIad::Draw_Fit(double x_low_win, double y_low_win, double x_hi_win, do
|
|||
// min_y = y[0];
|
||||
//hard set graphical boundaries
|
||||
max_x = 3.1415;
|
||||
max_y = 2.;
|
||||
max_y = A0*1.5;
|
||||
min_x = -.1;
|
||||
min_y = -.1;
|
||||
min_y = A0*.5;
|
||||
/* for(int i=0; i<x.size(); i++){
|
||||
if(x[i] > max_x) max_x = x[i];
|
||||
if(x[i] < min_x) min_x = x[i];
|
||||
|
@ -338,9 +344,9 @@ int HistoGUIad::DrawData(double x_low_win, double y_low_win, double x_hi_win, do
|
|||
// min_y = y[0];
|
||||
//hard set graphical boundaries
|
||||
max_x = 3.1415;
|
||||
max_y = 2.;
|
||||
max_y = A0*1.5;
|
||||
min_x = -.1;
|
||||
min_y = -.1;
|
||||
min_y = A0*0.5;
|
||||
/* for(int i=0; i<x.size(); i++){
|
||||
if(x[i] > max_x) max_x = x[i];
|
||||
if(x[i] < min_x) min_x = x[i];
|
||||
|
|
14
GUI_Base.h
14
GUI_Base.h
|
@ -1,10 +1,12 @@
|
|||
#include <X11/Xlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
//####################################################################
|
||||
//
|
||||
// This is a base version of the AD GUI allowing the user to plot two
|
||||
// input double vectors. The GUI consists of zooming, crosshair readout,
|
||||
// and drawing on the canvas.
|
||||
//
|
||||
//####################################################################
|
||||
|
||||
#include "global.h"
|
||||
|
||||
class HistoGUI{
|
||||
|
||||
|
|
8
QDK.h
8
QDK.h
|
@ -1,3 +1,11 @@
|
|||
//#####################################################################
|
||||
//
|
||||
//This file is a geometric calculation of the efficiency of radiation
|
||||
//in germanium crystals as a function of energy, and the crystal
|
||||
//geometry of the experiment.
|
||||
//
|
||||
//#####################################################################
|
||||
|
||||
#include "global.h"
|
||||
|
||||
using namespace std;
|
||||
|
|
8
ad.txt
8
ad.txt
|
@ -1,7 +1,7 @@
|
|||
Radius = 3 [cm]
|
||||
Distance = 4 [cm]
|
||||
Thickness = 5 [cm]
|
||||
Atten.C = 0.282206 [cm^-1]
|
||||
Gamma_E = 1147 [KeV]
|
||||
QD2 = 0.802565
|
||||
QD4 = 0.44946
|
||||
Atten.C = 0.476411 [cm^-1]
|
||||
Gamma_E = 426 [KeV]
|
||||
QD2 = 0.790549
|
||||
QD4 = 0.42078
|
||||
|
|
8
global.h
8
global.h
|
@ -1,8 +1,10 @@
|
|||
#ifndef __iamauniqueid_h__
|
||||
#define __iamauniqueid_h__
|
||||
|
||||
//define any global data type here.
|
||||
|
||||
//########################################################
|
||||
//This file is used for defining global data type and all
|
||||
//includes needed for the program.
|
||||
//
|
||||
//########################################################
|
||||
#include <X11/Xlib.h>
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
|
|
Loading…
Reference in New Issue
Block a user