Initial Upload

This commit is contained in:
Markus Köhli 2022-05-22 20:49:01 +02:00
parent b191076510
commit 6501f5acf5
5 changed files with 21560 additions and 0 deletions

138
dialogshowpic.ui Normal file
View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DialogShowPic</class>
<widget class="QDialog" name="DialogShowPic">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>627</width>
<height>590</height>
</rect>
</property>
<property name="windowTitle">
<string>Input Matrix View</string>
</property>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>430</x>
<y>550</y>
<width>171</width>
<height>32</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
<widget class="QCustomPlot" name="widget" native="true">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>591</width>
<height>521</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="pushButtonPlus">
<property name="geometry">
<rect>
<x>60</x>
<y>555</y>
<width>31</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>+</string>
</property>
</widget>
<widget class="QPushButton" name="pushButtonMinus">
<property name="geometry">
<rect>
<x>20</x>
<y>555</y>
<width>31</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
<widget class="QLabel" name="labelNo">
<property name="geometry">
<rect>
<x>163</x>
<y>559</y>
<width>46</width>
<height>13</height>
</rect>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>107</x>
<y>557</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Layer #:</string>
</property>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>QCustomPlot</class>
<extends>QWidget</extends>
<header>qcustomplot.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>DialogShowPic</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>DialogShowPic</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

307
main.cpp Normal file
View File

@ -0,0 +1,307 @@
#define hypot _hypot //this is only due to some changes in MSCV2010
//#include <math.h>
//#ifndef hypot
//#define hypot _hypot
//#endif
#include <io.h>
#include "Toolkit.h"
#include "mainwindow.h"
#include "customSplashScreen.h"
#include <QApplication>
#include <QPixmap>
#include <QSplashScreen>
#include <QCoreApplication>
#include <QTimer>
#include <QThread>
//#include <shellscalingapi.h>
class I : public QThread
{
public:
static void sleep(unsigned long secs) {
QThread::sleep(secs);
}
};
//BOOL dpi_result = SetProcessDPIAware();
//BOOL dpi_result = SetProcessDpiAwareness();
// MAIN method
// the main URANOS code has been transferred to one window application w.
// the window can be closed and URANOS continues to run with the command line output.
// the window w is used to generate the settings, which are saved in the uranos.cfg and in the geometryConfig.dat
// upon clicking 'simulate' URNAOS loads the settings from these files and executes the main simulation which loops over n initial neutrons
// during the simulation it shows the live output of many different parameters including the spatial distribution
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
//QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
//QFont f;
//int defaultFontSize = f.pointSize();
//QScreen *screen = QGuiApplication::primaryScreen();
//QRect screenGeometry = screen->geometry();
//int height = screenGeometry.height();
//int width = screenGeometry.width();
//cout<<"height"<<height;
//cout<<"width"<<width;
bool disableGUI = false;
bool silent = false;
string configFilePath = "";
QPixmap splashImage("splashScreen.png");
QSplashScreen splash(splashImage,Qt::WindowStaysOnTopHint);
/* To intercept mousclick to hide splash screen. Since the
splash screen is typically displayed before the event loop
has started running, it is necessary to periodically call. */
//app.processEvents();
//qApp->processEvents();
a.processEvents();
//splash->showStatusMessage(QObject::tr("Initializing…"));
//splash->showStatusMessage(QObject::tr("Loading something…"));
rootlogon();
MainWindow w;
// these are the command line options for starting URANOS
if (argc>1)
{
// activates thermal neutron transport
if ((std::string(argv[1])=="thermal"))
{
w.activateThermal();
}
// hides the GUI and starts from the config file in the URANOS folder
if ((std::string(argv[1])=="noGUI"))
{
disableGUI = true;
}
// starts the batch run for n monoenergetic runs with neutron downward
if ((std::string(argv[1])=="detectorBatchRun"))
{
w.activateThermalSkyEvaporation();
w.activateDetectorBatchRun();
}
}
if ((argc>2)&&(argc<4))
{
// activates the source control panel which allows other sources than the cosmic spectrum
if ((std::string(argv[1])=="nuclear")&&(std::string(argv[2])=="warfare"))
//if (true)
{
w.activateSkyEvaporation();
}
// hides the GUI and starts from the config file in the folder specified by the second parameter
if ((std::string(argv[1])=="noGUI")&&(std::string(argv[2])!=""))
{
disableGUI = true;
configFilePath = std::string(argv[2]);
std::replace(configFilePath.begin(), configFilePath.end(), '\\', '/'); cout<<" +";
if (!access( configFilePath.c_str(), 0 ) == 0 )
{
cout<<"Config File not found"<<endl;
return 0;
}
}
}
if ((argc>3)&&(argc<5))
{
// activates the source control panel which allows other sources than the cosmic spectrum including thermal neutron transport
if ((std::string(argv[1])=="thermal")&&(std::string(argv[2])=="nuclear")&&(std::string(argv[3])=="warfare"))
//if (true)
{
w.activateThermalSkyEvaporation();
}
// hides the GUI and starts from the config file in the folder specified by the second parameter and allows a third parameter
if ((std::string(argv[1])=="noGUI")&&(std::string(argv[2])!=""))
{
disableGUI = true;
configFilePath = std::string(argv[2]);
std::replace( configFilePath.begin(), configFilePath.end(), '\\', '/'); cout<<" +";
ifstream input_stream(configFilePath,ios::in);
//if (!access( textHere.c_str(), 0 ) == 0 )
if (!access(configFilePath.c_str(), 0 ) == 0)
//if(input_stream.bad())
{
cout<<"Config File not found"<<endl;
return 0;
}
}
// disables command line output
if (std::string(argv[3])=="silent")
{
w.beSilent();
silent = true;
}
// activates the source control panel which allows other sources than the cosmic spectrum including thermal neutron transport
if (std::string(argv[3])=="source")
{
w.activateThermalSkyEvaporation();
}
// activates thermal neutron transport
if (std::string(argv[3])=="thermal")
{
w.activateThermal();
}
// activates the 2D batchrun over two different parameter sets like soil moisture and air humidity
if ((std::string(argv[1])=="batchrun")&&(std::string(argv[2])!="")&&(std::string(argv[3])!=""))
{
w.activateParameterBatchRun(atoi(argv[2]),atoi(argv[3]));
cout<<"Batchrun from Parameter "<<atoi(argv[2])<<" to "<<atoi(argv[3])<<endl;
/*
if ((std::string(argv[4])=="noGUI"))
{
disableGUI = true;
}
else
{
}
*/
}
}
// same as above for arguments <5 used otherwise
if ((argc>4)&&(argc<7))
{
if ((std::string(argv[1])=="batchrun")&&(std::string(argv[2])!="")&&(std::string(argv[3])!=""))
{
w.activateParameterBatchRun(atoi(argv[2]),atoi(argv[3]));
cout<<"Batchrun from Parameter "<<atoi(argv[2])<<" to "<<atoi(argv[3])<<endl;
if ((std::string(argv[4])=="noGUI"))
{
disableGUI = true;
}
else
{
}
if (argc>5)
{
if ((std::string(argv[4])=="noGUI")&&(std::string(argv[5])!=""))
{
disableGUI = true;
configFilePath = std::string(argv[5]);
std::replace( configFilePath.begin(), configFilePath.end(), '\\', '/'); cout<<" +";
ifstream input_stream(configFilePath,ios::in);
if (!access(configFilePath.c_str(), 0 ) == 0)
{
cout<<"Config File not found"<<endl;
return 0;
}
}
}
}
}
//w.activateSkyEvaporation();
//w.activateThermalSkyEvaporation();
//disableGUI = true;
// command line output logos
if (false)
{
cout<<endl;
cout<<" .,*//*. "<<endl;
cout<<" .,/(((((*. "<<endl;
cout<<" . ....*((((*,... .*(//*/((/. "<<endl;
cout<<" .*/**//, .,. .,,*/((((((((((((((((/,. ,(#(, /(((((((*. .*(((((((, ,/#(, ,(%%(, ,(#/, ,//**((((/, "<<endl;
cout<<" .*#%%%(, .,,*****, .,/#%%%#/,...,*(%%%#/. ,(%%%(, .,/#%%%%%(, ..*(%#/, ...*##/**(##(*,/##*... ,***//*/(#(, "<<endl;
cout<<" .*#%%%(, ,,******, *#%%%#, ,#%%%#/. ./#%%%#/. ./#%%%%%#/. *#/. ,//. ./#(,,/##/,,(#/. ./, .,**///#(/*,. "<<endl;
cout<<" .*#%%%(, ,/(#%%#/* *#%%%#, ,(%%%%(. ./#(#%%%#/. ./#//#%%%%#*. *(/. ,/#%(,,/##//(##(//#(*.,(%/. .*/(/((*. "<<endl;
cout<<" .*#%%%(, ./#(, *#%%%#, ,/#%%%(* .*(/,*#%%%#* ./(*.,(#%%%#(, *(/. ..*(####*. .*##* ./####(.. .*#%%%##(//*,.. "<<endl;
cout<<" .*#%%%(, *#(. *#%%%#(///((###((*. *(/. ./#%%%(, ./(* .*(%%%%#/. *(/. *, ,(%#* .*##* .*#%(,,*, ./#%%%%%%%%%%#(/, "<<endl;
cout<<" .*#%%%(, *(/. *#%%%#/*,*/#%#(,. ,((, .(%%%%(, ./(* ./#%%%%#*.*(/. (/.,(%(, .*##* ,(%(,/(* ,/(#%%%%%%%%%%#/, "<<endl;
cout<<" ./#%%%(, *(/. *#%%%#, ,(%%#(, ,(#(/***/(#%%%#/. ./(* ,(#%%%#((#/. *..*(%#* .*##* *#%(,.*,... .,*/((##%%%%#/. "<<endl;
cout<<" ./#%%%(*...... .*(/, .*#%%%#*. ,(%%%%(, ,(#(/******/#%%%#/. ./(*. .*#%%%%%#/. ,,*(###(*. ./##*. .*(###(,,../#/. ..,/#%%(, "<<endl;
cout<<"../#%%%(*..........*(/,...../#%%%#*...../#%%%#/,,/,.*##/.........*(%%%%(,...,(#/..........*(#%%#(,.,/##*.,/##//(##(//##/..*#/,../#%#/,........,(%#/.."<<endl;
cout<<"../#%%%(*..........*(/,..,,*(#%%%#(*,,..*(%%%%#(((/(#%%#/*,.....,*(%%%%#(/**(#%#/*,.........*#%#(,...*,..*(#(**(##(**(#(*..,..../#%###/*,...,*(#(*..."<<endl;
cout<<"../#%%%(*..........*(/,..*///////////*...,*((#((/*////////*....,//////////////////*..........,/(/......,*(%#*,*#%%#*,*#%(*,.....*//,,*/(((((((/,....."<<endl;
cout<<".,/#%%%#*.........,/#/,.................................................................................,*//,,/#%%#/,,//*,..........................."<<endl;
cout<<" ,(%%%#/, .*((,. .......,,,,,,,*******////////((((((((((((((((((((((((((((((((((((((((((((((((((((((((######((((((((((((((((((((/////****,,.."<<endl;
cout<<" ,(#%%%#/*,..,*(#(, .......,,,,,,*******/////////(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((//////***,,,.. "<<endl;
cout<<" ,*((######((*, .........,,,,,,,,,****************************************************************************************,,,,,... "<<endl;
cout<<" .. .........................,,,,,,,,,,,,,,,,,,,,,,,........................................................ "<<endl;
}
if (!silent)
{
cout<<" ./%%/** "<<endl;
cout<<"**/, /((((((((/. (( /((((. (((( /( (#( (/ ./%%/* "<<endl;
cout<<"*%%, ***** *%%, ,%%/ /%%/ /%%%/ */ /..#,/#/,#../ *%%* "<<endl;
cout<<"*%%, ./( *%%, /%%* */*%%* /*,#%#, */ .*##* *#* *##*. %%%%/* "<<endl;
cout<<"*%%, .*/ *%%(((%%* *# #%#. /* .%%%/.*/ .(# *#* #(. /%%%%%%/ "<<endl;
cout<<"/%%, .*/ *%%* ,%%* *#((((%%( /* *%%%%/ .##. *#* .##. /#%/"<<endl;
cout<<"/%%, .*/ /%%* #%% *#( *%%( /* (%%/ ,#*,#.*#*.#.*#, #%/ %%/"<<endl;
cout<<"/%%,.....*/..//%%*..../#%%/#(....../%%/../*......,%/ ,(#,###,#(, /%%%%%%/ "<<endl;
cout<<",%%/ */, ...**.....**%%%(.......((((((((......((((..((.(###(.((..((((%%%/.. "<<endl;
cout<<" ,#%#%%#/, ........//////////////////////////////////////////////////***..."<<endl;
cout<<" ................................................... "<<endl;
}
// Main Window control
if (disableGUI)
{
w.disabledGUIRun(configFilePath);
//if (w.isFinished()) return 0;
I::sleep(0.5);
w.close();
return a.closeAllWindows();
}
else
{
splash.show();
if(splashImage.isNull());
else I::sleep(1.5);
w.show();
splash.finish(&w);
}
//w.close();
//w.cosmicNSimulator(&w);
return a.exec();
}

14597
mainwindow.cpp Normal file

File diff suppressed because it is too large Load Diff

513
mainwindow.h Normal file
View File

@ -0,0 +1,513 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QMouseEvent>
#include "qcustomplot.h"
#include "Toolkit.h"
#include "TRandom3.h"
#include <string>
#include <vector>
#include "time.h"
#include "TLegend.h"
#include "dialogshowpic.h"
#include "visualizationenlarge.h"
//extern QVector<double> x(101), y(101);
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
QMessageBox* msgBox;
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void setupImport();
void setupGraph(int index);
void setupRunSpectraGraph(QCustomPlot *customPlot);
void setupRunBirdsEyeViewGraph(QCustomPlot *customPlot);
void setupRunHorizSliceXGraph(QCustomPlot *customPlot);
void setupRunNpassDetGraph(QCustomPlot *customPlot);
void setupRunDepOfIntGraph(QCustomPlot *customPlot);
void setupRunNpassDetLyrGraph(QCustomPlot *customPlot);
void setupRunRelIntVsEGraph(QCustomPlot *customPlot);
void setupRunOrginOfNGraph(QCustomPlot *customPlot);
void setupRangeFunction(QCustomPlot *customPlot);
void setupLiveTHs();
void setupTable(QTableView* table);
void redrawEnlargedView();
void redrawNeutronMap(double difftime);
void buttonClickFunction();
void activateThermal();
void disabledGUIRun(string pathtoConfigFile);
void activateSkyEvaporation();
void activateThermalSkyEvaporation();
void activateDetectorBatchRun();
void activateBatchRun();
void activateParameterBatchRun(int parMin, int parMax);
void beSilent();
void setGeometry();
void setStatus(int numberLabel, string msg);
void setupGeometry();
void exportToSave();
//static TMatrixF readMatrixPNG(TString folder, TString filename);
static TMatrixF getTMatrix(int i);
//bool cosmicNSimulator(MainWindow* uiM);
void redrawTopView();
void redrawSideView();
void formatPlotToColor(QCustomPlot *customPlot);
void replotFootprint();
void formatForVectorGraphics();
void checkInputPics();
TSpline3* getSplinedDetectorEnergyModelFromFile(TString dname);
bool loadParamData(string fileFolder);
bool isFinished() const { return isFinishedVar; }
private slots:
void on_pushButton_clicked();
void on_pushButton_2_clicked();
void on_spinBox_2_valueChanged(int arg1);
void on_pushButton_Simulate_clicked();
void on_pushButton_stop_clicked();
void on_checkBoxR_stateChanged(int arg1);
void on_checkBoxD_stateChanged(int arg1);
void on_sliderSoilMoisture_sliderMoved(int position);
void on_sliderAirHum_sliderMoved(int position);
void on_lineEditNeutrinsTotal_textChanged(const QString &arg1);
void on_sliderAtm1_sliderMoved(int position);
void on_sliderRigidity_sliderMoved(int position);
void on_lineEditSquareDim_textChanged(const QString &arg1);
void on_lineEditRefresh_textChanged(const QString &arg1);
//void on_pushButtonClear_clicked();
void on_pushButton_Clear_clicked();
void on_pushButton_Pause_clicked();
void on_lineEditDetRad_textChanged(const QString &arg1);
void on_lineEditDetX_textChanged(const QString &arg1);
void on_lineEditDety_textChanged(const QString &arg1);
void on_beamRound_clicked();
void on_beamSquare_clicked();
void on_radioRiver_clicked();
void on_radioCoast_clicked();
void on_radioIsland_clicked();
void on_radioLake_clicked();
void on_lineEditBeamRad_textChanged(const QString &arg1);
void on_radioRiver_toggled(bool checked);
void on_radioButton_clicked();
void on_lineEditTHLhigh_textChanged(const QString &arg1);
void on_lineEditTHLlow_textChanged(const QString &arg1);
void on_checkBoxRS_clicked();
void on_lineEdit_River_textChanged(const QString &arg1);
void on_lineEdit_River_2_textChanged(const QString &arg1);
void on_lineEdit_Island_textChanged(const QString &arg1);
void on_lineEdit_Lake_selectionChanged();
void on_lineEdit_Lake_textChanged(const QString &arg1);
void on_checkBoxFileOutput_clicked();
//void on_radioButton_2_clicked();
void on_radioButton_map_clicked();
void on_radioButton_mapInter_clicked();
void on_radioButton_mapFast_clicked();
void on_radioButton_mapAlbedo_clicked();
void on_lineEdit_InputSpectrumFolder_editingFinished();
void on_lineEdit_CrosssectionFolder_editingFinished();
void on_lineEdit_OutputFolder_editingFinished();
void on_pushButton_about_clicked();
void on_checkBoxTransparent_clicked();
void on_checkBoxBasicSpectrum_clicked();
void on_pushButton_AddLayer_clicked();
void setIntType1();
void setIntType2();
void setIntType3();
bool eventFilter(QObject *target, QEvent *event);
void setFocus(const QModelIndex &idx);
QPushButton* typebutton(QModelIndex idx);
void on_pushButton_RemoveLayer_clicked();
void on_pushButton_ReadGeometry_clicked();
void on_pushButton_SaveGeometry_clicked();
void on_spinBox_StartingLayer_valueChanged(const QString &arg1);
void on_spinBox_StartingLayer_valueChanged(int arg1);
void on_spinBox_DetectorLayer_valueChanged(int arg1);
void on_spinBox_GroundLayer_valueChanged(int arg1);
void on_pushButton_LoadGeometry_clicked();
void on_lineEdit_WorkFolder_editingFinished();
void on_pushButton_6_clicked();
void on_radioButton_fission_clicked();
void on_radioButton_fusion_clicked();
void on_checkBox_useImage_clicked();
void on_pushButton_Show_clicked();
void on_horizontalSliderColor_sliderMoved(int position);
void on_horizontalSliderColorZero_sliderMoved(int position);
void on_radioButton_NeutronNight_clicked();
void on_radioButton_NeutronCold_clicked();
void on_radioButton_NeutronPolar_clicked();
void on_radioButton_NeutronRainbow_clicked();
void on_horizontalSliderFPMoist_sliderMoved(int position);
void on_horizontalSliderFPHum_sliderMoved(int position);
void on_checkBoxFPLog_clicked();
void on_horizontalSliderFPHum_2_sliderMoved(int position);
void on_pushButton_ActivateFP_clicked();
void on_lineEditScotoma_editingFinished();
void on_checkBoxGradient2_clicked();
void on_checkBoxSelectedData_clicked();
void on_checkBoxFastData_clicked();
void on_checkBoxIntermediateData_clicked();
void on_checkBoxEpithermalData_clicked();
//void on_lineEdit_Porosity_textChanged(const QString &arg1);
void on_sliderSoilPorosity_sliderMoved(int position);
void on_checkBoxFileOutputPDF_2_clicked(bool checked);
void on_checkBoxCreateFolder_clicked(bool checked);
void on_radioButton_AmBe_clicked();
void on_lineEdit_xPos_textChanged(const QString &arg1);
void on_lineEdit_yPos_textChanged(const QString &arg1);
void on_lineEdit_zPos_textChanged(const QString &arg1);
void on_lineEdit_zPos_2_textChanged(const QString &arg1);
void on_checkBoxThermal_toggled(bool checked);
void on_radioButton_mapTrack_clicked();
void on_lineEditManualColorZero_textChanged(const QString &arg1);
void on_lineEditManualColor_textChanged(const QString &arg1);
void on_radioButton_mapTrackInter_clicked();
void on_radioButton_mapTrackFast_clicked();
void on_radioButton_mapTrackAlbedo_clicked();
void on_checkBoxNoTrack_toggled(bool checked);
void on_radioButton_mapThermal_clicked();
void on_radioButton_mapTrackThermal_clicked();
void on_checkBoxThermalData_clicked();
void on_checkBoxSaveEvery_toggled(bool checked);
void on_radioButton_NoSource_clicked();
void on_lineEdit_xSize_textChanged(const QString &arg1);
void on_lineEdit_ySize_textChanged(const QString &arg1);
void on_radioButton_ThermalSource_clicked();
void on_radioButton_MonoenergeticSource_clicked();
void on_lineEdit_SourceEnergy_textChanged(const QString &arg1);
void on_lineEditScotoma_2_textChanged(const QString &arg1);
void on_checkBox_clicked();
void on_checkBox_NoMultipleScattering_toggled(bool checked);
void on_checkBoxManual_toggled(bool checked);
void on_checkBox_TrackAllLayers_toggled(bool checked);
void on_checkBoxLogarithmic_toggled(bool checked);
void on_radioButton_NeutronGrayScale_clicked();
void on_radioButton_NeutronHot_clicked();
void on_radioButton_NeutronThermal_clicked();
void on_radioButton_ModeratedCf_clicked();
void on_radioButton_Cylinder_toggled(bool checked);
void on_radioButton_Sphere_toggled(bool checked);
void on_radioButton_detectorLayerEnergyBand_toggled(bool checked);
void on_radioButton_detectorLayerRealistic_toggled(bool checked);
void on_radioButton_detectorEnergyBand_toggled(bool checked);
void on_radioButton_detectorRealistic_toggled(bool checked);
void on_checkBox_VolumeSource_toggled(bool checked);
void on_checkBox_HEModel_toggled(bool checked);
void on_checkBox_activateThermal_toggled(bool checked);
void on_horizontalSliderDetector_sliderMoved(int position);
void on_horizontalSliderDetectorColor_sliderMoved(int position);
void exportSettings(string str);
bool importSettings();
void on_pushButton_Enlarge_clicked();
void on_lineEditAntiScotoma_editingFinished();
void on_checkBoxSaveEvery_2_clicked(bool checked);
void on_lineEditClearEveryXNeutrons_editingFinished();
void on_lineEditClearEveryXNeutrons_textChanged(const QString &arg1);
void on_lineEdit_AutoUpdate_textChanged(const QString &arg1);
void on_checkBoxAutoRefreshRate_toggled(bool checked);
void on_checkBoxClearEveryDisplayRefresh_toggled(bool checked);
void on_checkBoxClearEveryDisplayRefresh_clicked(bool checked);
void on_checkBoxWarnMAterial_toggled(bool checked);
void on_radioButton_mapTrackEnergy_clicked();
void on_checkBoxTrackingData_clicked(bool checked);
void on_checkBoxHighResTrackingData_clicked(bool checked);
void on_radioButton_ySheet_clicked();
void on_radioButton_xSheet_clicked();
void on_lineEditDetLength_textChanged(const QString &arg1);
void on_lineEdit_zSize_textChanged(const QString &arg1);
void on_radioButton_TopToBottom_toggled(bool checked);
void on_radioButton_BottomToTop_toggled(bool checked);
void on_radioButton_LeftToRight_toggled(bool checked);
void on_radioButton_RightToLeft_toggled(bool checked);
void on_radioButton_Omni_toggled(bool checked);
void on_checkBox_DomainCutoff_toggled(bool checked);
void on_lineEditDomainFactor_textChanged(const QString &arg1);
void on_checkBox_DomainCutoffMeters_toggled(bool checked);
void on_lineEditDomainMeters_textChanged(const QString &arg1);
void on_checkBoxFileOutput2_toggled(bool checked);
void on_checkBoxExportAllTracks_toggled(bool checked);
void on_checkBox_ReflectiveBoundaries_toggled(bool checked);
void on_checkBox_PeriodicBoundaries_toggled(bool checked);
void on_lineEdit_DetectorFile_editingFinished();
void on_lineEdit_DetectorFile_textChanged(const QString &arg1);
void on_checkBoxFileOutput_toggled(bool checked);
void on_checkBoxFileOutput3_toggled(bool checked);
void on_pushButton_SaveConfig_clicked();
private:
Ui::MainWindow *ui;
Ui::DialogShowPic *dialogshowpic;
bool isFinishedVar;
//Ui::VisualizationEnlarge *visualizationEnlarge;
};
bool cosmicNSimulator(MainWindow *ui);
double rangeFunctionCombined(double* x, double *par);
void delay( int millisecondsToWait );
void deleteStatsTH(TH1 *allTHs);
void logYaxis(TH2* h);
void logXaxis(TH2* h);
void logaxis(TH1* h);
void rebinX(TH1* h) ;
double getWWProb(double density, double atWeight, double cs, double lambda);
double getLfromE(double energy);
double getEfromL(double lambda);
void printTF1(TF1* function, TString outputFolder, TString filename);
bool checkDetectorHit(double x, double y, double z, double deltaZ, double phi, double theta);
double getEvaporationEnergy(double theta, TRandom * r);
double getFissionEnergy(TRandom * r);
vector<float> getThermalPDF(const double nEnergy, const float massElm, const float temperature, TRandom * r);
double getThermalEnergy(TF1 *spectrumFunc, TRandom * r);
double getDistanceToPoint(double stVx, double stVy, double stVz, double theta, double phi, double px, double py, double pz);
Double_t legendrian(double* x, Double_t* par);
Double_t legendrian10fold(double* x, Double_t* par);
string legendrian10folded(Float_t* par);
static int ArraySize(double array[]);
//double legendrianNfold(double* x, Double_t* par);
TMatrixF readSigmaEnergy(TString folder, TString filename);
void modifyCSmatrix(TMatrixF* sigmaMatrix, float factorLowE, float factorHighE);
float endfNumberConv(string str);
vector<TMatrixF> readAngularTabulatedCoefficients(TString folder, TString filename, const int coefficients);
TMatrixF readAngularCoefficients(TString folder, TString filename);
float getIndexHorizontalPosition(const TMatrixF& matrix, int line, double value, bool doLogSearch);
float getIndexPosition(const TMatrixF& matrix, double value, bool doLogSearch);
double calcMeanCS(const TMatrixF& matrix, double energy);
double getHighEnergyCosTheta(const TMatrixF& angleMatrix, const TMatrixF& cumulatedProbMatrix, double energy, double prob);
double getAngleFromCumulativeFunction(const TF1* spectrumFunc, float min, float max, TRandom* r);
TF1* calcMeanAngularDistribution(const TMatrixF& matrix, double energy);
void turnInputMatrix(TMatrixF& inputMatrix);
int changeInputMatrixValue(int value);
void generateNormalizedSpectrum(TH1F* precalculatedSpectrum, int entries, TString file1);
void dataDelete(QVector<double>* vec);
#endif // MAINWINDOW_H

6005
mainwindow.ui Normal file

File diff suppressed because it is too large Load Diff