Skip to content
Snippets Groups Projects
Commit 5fe40acf authored by Van Herck, Walter's avatar Van Herck, Walter
Browse files

Merge branch 'polarized_meso' into develop

parents d9d2b8af f81e41d9
No related branches found
No related tags found
No related merge requests found
Showing
with 48 additions and 48 deletions
// ************************************************************************** // // ************************************************************************** //
// //
// BornAgain: simulate and fit scattering at grazing incidence // BornAgain: simulate and fit scattering at grazing incidence
// //
//! @file App/inc/DrawHelper.h //! @file App/inc/DrawHelper.h
...@@ -31,7 +31,7 @@ class TPad; ...@@ -31,7 +31,7 @@ class TPad;
//! //!
class DrawHelper :public TObject class DrawHelper :public TObject
{ {
public: public:
//! Sets own drawing style //! Sets own drawing style
static void SetStyle(); static void SetStyle();
...@@ -57,7 +57,7 @@ class DrawHelper :public TObject ...@@ -57,7 +57,7 @@ class DrawHelper :public TObject
//! attempt to draw meso crystal lattice in 3d //! attempt to draw meso crystal lattice in 3d
static void DrawMesoCrystal(const MultiLayer *sample); static void DrawMesoCrystal(const MultiLayer *sample);
private: private:
static int m_default_canvas_xsize; static int m_default_canvas_xsize;
static int m_default_canvas_ysize; static int m_default_canvas_ysize;
static std::vector<TCanvas *> m_registered_canvases; static std::vector<TCanvas *> m_registered_canvases;
......
// ************************************************************************** // // ************************************************************************** //
// //
// BornAgain: simulate and fit scattering at grazing incidence // BornAgain: simulate and fit scattering at grazing incidence
// //
//! @file App/inc/FitSuiteObserverFactory.h //! @file App/inc/FitSuiteObserverFactory.h
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
//! factory to create observers for FitSuite //! factory to create observers for FitSuite
class FitSuiteObserverFactory class FitSuiteObserverFactory
{ {
public: public:
typedef boost::shared_ptr<FitSuitePrintObserver> observer_print_t; typedef boost::shared_ptr<FitSuitePrintObserver> observer_print_t;
typedef boost::shared_ptr<FitSuiteDrawObserver> observer_draw_t; typedef boost::shared_ptr<FitSuiteDrawObserver> observer_draw_t;
typedef boost::shared_ptr<FitSuiteWriteTreeObserver> observer_tree_t; typedef boost::shared_ptr<FitSuiteWriteTreeObserver> observer_tree_t;
......
...@@ -27,7 +27,7 @@ class ProgramOptions; ...@@ -27,7 +27,7 @@ class ProgramOptions;
class FunctionalTestFactory : public IFactory<std::string, IFunctionalTest> class FunctionalTestFactory : public IFactory<std::string, IFunctionalTest>
{ {
public: public:
FunctionalTestFactory(); FunctionalTestFactory();
virtual ~FunctionalTestFactory(); virtual ~FunctionalTestFactory();
...@@ -49,7 +49,7 @@ class FunctionalTestFactory : public IFactory<std::string, IFunctionalTest> ...@@ -49,7 +49,7 @@ class FunctionalTestFactory : public IFactory<std::string, IFunctionalTest>
iterator begin() { return m_descriptions.begin(); } iterator begin() { return m_descriptions.begin(); }
iterator end() { return m_descriptions.end(); } iterator end() { return m_descriptions.end(); }
private: private:
TBenchmark *m_benchmark; TBenchmark *m_benchmark;
}; };
......
// ************************************************************************** // // ************************************************************************** //
// //
// BornAgain: simulate and fit scattering at grazing incidence // BornAgain: simulate and fit scattering at grazing incidence
// //
//! @file App/inc/IFunctionalTest.h //! @file App/inc/IFunctionalTest.h
...@@ -27,7 +27,7 @@ class ProgramOptions; ...@@ -27,7 +27,7 @@ class ProgramOptions;
//! //!
class IFunctionalTest : public INamed class IFunctionalTest : public INamed
{ {
public: public:
IFunctionalTest() : mp_options(0) {} IFunctionalTest() : mp_options(0) {}
IFunctionalTest(const std::string& name) : INamed(name), mp_options(0) {} IFunctionalTest(const std::string& name) : INamed(name), mp_options(0) {}
virtual ~IFunctionalTest(){} virtual ~IFunctionalTest(){}
...@@ -39,7 +39,7 @@ class IFunctionalTest : public INamed ...@@ -39,7 +39,7 @@ class IFunctionalTest : public INamed
std::string getOutputPath() const { return m_output_path; } std::string getOutputPath() const { return m_output_path; }
void setOutputPath(const std::string& output_path) void setOutputPath(const std::string& output_path)
{ m_output_path = output_path; } { m_output_path = output_path; }
protected: protected:
ProgramOptions *mp_options; ProgramOptions *mp_options;
std::string m_output_path; std::string m_output_path;
}; };
......
// ************************************************************************** // // ************************************************************************** //
// //
// BornAgain: simulate and fit scattering at grazing incidence // BornAgain: simulate and fit scattering at grazing incidence
// //
//! @file App/inc/IsGISAXSData.h //! @file App/inc/IsGISAXSData.h
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
class IsGISAXSData class IsGISAXSData
{ {
public: public:
typedef SafePointerVector<OutputData<double> > DataSet_t; typedef SafePointerVector<OutputData<double> > DataSet_t;
enum ItemToRead { kSin_twotheta, kSin_alphaf, kQx, kQy, kQz, enum ItemToRead { kSin_twotheta, kSin_alphaf, kQx, kQy, kQz,
kSimResult, kData2fit, kErrorbar, kIobs_Icalc, kFitted }; kSimResult, kData2fit, kErrorbar, kIobs_Icalc, kFitted };
...@@ -46,7 +46,7 @@ class IsGISAXSData ...@@ -46,7 +46,7 @@ class IsGISAXSData
//! Read special isgisaxs *.out file with isgisaxs fit results. //! Read special isgisaxs *.out file with isgisaxs fit results.
static void read_outfile(const std::string& filename, DataSet_t& dataset, ItemToRead item = kData2fit); static void read_outfile(const std::string& filename, DataSet_t& dataset, ItemToRead item = kData2fit);
private: private:
//! Convert isgisaxs 1d scan to output data 2d object. //! Convert isgisaxs 1d scan to output data 2d object.
static OutputData<double> *convert_isgi_scan( static OutputData<double> *convert_isgi_scan(
std::vector<IsgiData >& isgi_data); std::vector<IsgiData >& isgi_data);
......
...@@ -163,7 +163,7 @@ public: ...@@ -163,7 +163,7 @@ public:
double hmax = -1., double hmax = -1.,
double hdiff=0.0001 ); double hdiff=0.0001 );
private: private:
//! selects specific matrix elements from polarized output data and puts //! selects specific matrix elements from polarized output data and puts
//! these in a non-polarized output data structure //! these in a non-polarized output data structure
static void copyElementsWithPosition( static void copyElementsWithPosition(
......
// ************************************************************************** // // ************************************************************************** //
// //
// BornAgain: simulate and fit scattering at grazing incidence // BornAgain: simulate and fit scattering at grazing incidence
// //
//! @file App/inc/SampleFactory.h //! @file App/inc/SampleFactory.h
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
class SampleFactory : public ISingleton<SampleFactory>, class SampleFactory : public ISingleton<SampleFactory>,
public IFactory<std::string, ISample> public IFactory<std::string, ISample>
{ {
public: public:
SampleFactory(); SampleFactory();
static ISample *createSample(const std::string& sample_name) static ISample *createSample(const std::string& sample_name)
......
// ************************************************************************** // // ************************************************************************** //
// //
// BornAgain: simulate and fit scattering at grazing incidence // BornAgain: simulate and fit scattering at grazing incidence
// //
//! @file App/inc/TestConvolution.h //! @file App/inc/TestConvolution.h
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
class TestConvolution : public IFunctionalTest class TestConvolution : public IFunctionalTest
{ {
public: public:
TestConvolution(); TestConvolution();
void execute(); void execute();
...@@ -36,7 +36,7 @@ class TestConvolution : public IFunctionalTest ...@@ -36,7 +36,7 @@ class TestConvolution : public IFunctionalTest
//! testing convolution in 2d //! testing convolution in 2d
void test_convolve2d(); void test_convolve2d();
private: private:
//! test function with many gaus'es on top of flat background for convolution studies //! test function with many gaus'es on top of flat background for convolution studies
double fpeaks(double *x, double *par); double fpeaks(double *x, double *par);
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
class TestDetectorResolution : public IFunctionalTest class TestDetectorResolution : public IFunctionalTest
{ {
public: public:
TestDetectorResolution() : mp_intensity_output(0), mp_sample(0) {} TestDetectorResolution() : mp_intensity_output(0), mp_sample(0) {}
virtual ~TestDetectorResolution() virtual ~TestDetectorResolution()
{ {
...@@ -34,7 +34,7 @@ class TestDetectorResolution : public IFunctionalTest ...@@ -34,7 +34,7 @@ class TestDetectorResolution : public IFunctionalTest
} }
virtual void execute(); virtual void execute();
private: private:
void initializeSample(); void initializeSample();
OutputData<double> *mp_intensity_output; OutputData<double> *mp_intensity_output;
ISample *mp_sample; ISample *mp_sample;
......
...@@ -26,14 +26,14 @@ class MultiLayer; ...@@ -26,14 +26,14 @@ class MultiLayer;
class TestDiffuseReflection : public IFunctionalTest class TestDiffuseReflection : public IFunctionalTest
{ {
public: public:
TestDiffuseReflection(); TestDiffuseReflection();
void execute(); void execute();
void draw(); void draw();
private: private:
MultiLayer *m_sample; //!< pointer to multilayer sample MultiLayer *m_sample; //!< pointer to multilayer sample
// OutputData<double > *m_data_spec; //!< specular reflectivity // OutputData<double > *m_data_spec; //!< specular reflectivity
OutputData<double > *m_data_offspec; //!< off-specular reflectivity OutputData<double > *m_data_offspec; //!< off-specular reflectivity
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
class TestFittingBenchmark : public IFunctionalTest class TestFittingBenchmark : public IFunctionalTest
{ {
public: public:
TestFittingBenchmark() {} TestFittingBenchmark() {}
virtual ~TestFittingBenchmark() {} virtual ~TestFittingBenchmark() {}
virtual void execute(); virtual void execute();
......
...@@ -28,12 +28,12 @@ class FitSuite; ...@@ -28,12 +28,12 @@ class FitSuite;
class TestFittingModule1 : public IFunctionalTest class TestFittingModule1 : public IFunctionalTest
{ {
public: public:
TestFittingModule1(); TestFittingModule1();
virtual ~TestFittingModule1(); virtual ~TestFittingModule1();
virtual void execute(); virtual void execute();
private: private:
//! Initializes sample: layer + nanoparticles, 2 parameters //! Initializes sample: layer + nanoparticles, 2 parameters
void initializeSample1(); void initializeSample1();
//! Initializes sample: layer + substrate + nanoparticles, 4 parameters //! Initializes sample: layer + substrate + nanoparticles, 4 parameters
......
// ************************************************************************** // // ************************************************************************** //
// //
// BornAgain: simulate and fit scattering at grazing incidence // BornAgain: simulate and fit scattering at grazing incidence
// //
//! @file App/inc/TestFittingModule2.h //! @file App/inc/TestFittingModule2.h
...@@ -34,7 +34,7 @@ class FitSuite; ...@@ -34,7 +34,7 @@ class FitSuite;
//! //!
class TestFittingModule2 : public IFunctionalTest class TestFittingModule2 : public IFunctionalTest
{ {
public: public:
TestFittingModule2(); TestFittingModule2();
virtual ~TestFittingModule2(); virtual ~TestFittingModule2();
virtual void execute(); virtual void execute();
...@@ -42,13 +42,13 @@ class TestFittingModule2 : public IFunctionalTest ...@@ -42,13 +42,13 @@ class TestFittingModule2 : public IFunctionalTest
//! builds sample for fitter testing //! builds sample for fitter testing
class SampleBuilder : public ISampleBuilder class SampleBuilder : public ISampleBuilder
{ {
public: public:
SampleBuilder(); SampleBuilder();
virtual ~SampleBuilder(){} virtual ~SampleBuilder(){}
virtual ISample *buildSample() const; virtual ISample *buildSample() const;
protected: protected:
virtual void init_parameters(); virtual void init_parameters();
private: private:
double m_cylinder_height; double m_cylinder_height;
double m_cylinder_radius; double m_cylinder_radius;
double m_prism3_half_side; double m_prism3_half_side;
...@@ -68,7 +68,7 @@ class TestFittingModule2 : public IFunctionalTest ...@@ -68,7 +68,7 @@ class TestFittingModule2 : public IFunctionalTest
//! fit example with data masking //! fit example with data masking
void fit_example_mask(); void fit_example_mask();
private: private:
void initializeSimulation(); void initializeSimulation();
void initializeRealData(); void initializeRealData();
......
...@@ -32,14 +32,14 @@ class FitSuite; ...@@ -32,14 +32,14 @@ class FitSuite;
//! //!
class TestFittingModule3 : public IFunctionalTest class TestFittingModule3 : public IFunctionalTest
{ {
public: public:
typedef SafePointerVector<OutputData<double> > DataScan_t; typedef SafePointerVector<OutputData<double> > DataScan_t;
TestFittingModule3(); TestFittingModule3();
virtual ~TestFittingModule3(); virtual ~TestFittingModule3();
virtual void execute(); virtual void execute();
private: private:
void initializeSample(); void initializeSample();
void initializeSimulation(); void initializeSimulation();
void initializeRealData(); void initializeRealData();
......
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
class TestFormFactor : public IFunctionalTest class TestFormFactor : public IFunctionalTest
{ {
public: public:
TestFormFactor(); TestFormFactor();
~TestFormFactor(); ~TestFormFactor();
virtual void execute(); virtual void execute();
void draw(), draw4(); void draw(), draw4();
private: private:
OutputData<double> *mp_intensity_output; OutputData<double> *mp_intensity_output;
FormFactorCylinder m_ff; FormFactorCylinder m_ff;
}; };
......
...@@ -24,13 +24,13 @@ ...@@ -24,13 +24,13 @@
class TestFormFactors : public IFunctionalTest class TestFormFactors : public IFunctionalTest
{ {
public: public:
TestFormFactors(){} TestFormFactors(){}
virtual ~TestFormFactors(){} virtual ~TestFormFactors(){}
virtual void execute(); virtual void execute();
virtual void finalise(); virtual void finalise();
private: private:
std::string m_data_path; std::string m_data_path;
}; };
......
...@@ -22,12 +22,12 @@ ...@@ -22,12 +22,12 @@
class TestFourier : public IFunctionalTest class TestFourier : public IFunctionalTest
{ {
public: public:
TestFourier(); TestFourier();
virtual ~TestFourier(); virtual ~TestFourier();
virtual void execute(); virtual void execute();
private: private:
void initializeSample(); void initializeSample();
OutputData<double> *mp_intensity_output; OutputData<double> *mp_intensity_output;
ISample *mp_sample; ISample *mp_sample;
......
...@@ -36,7 +36,7 @@ class TCanvas; ...@@ -36,7 +36,7 @@ class TCanvas;
class TestFumiliLMA : public IFunctionalTest class TestFumiliLMA : public IFunctionalTest
{ {
public: public:
friend class MyChi2Function; friend class MyChi2Function;
TestFumiliLMA(); TestFumiliLMA();
...@@ -45,7 +45,7 @@ class TestFumiliLMA : public IFunctionalTest ...@@ -45,7 +45,7 @@ class TestFumiliLMA : public IFunctionalTest
double functionToMinimize(const double *pars); double functionToMinimize(const double *pars);
private: private:
void FillOutputDataFromFunction( void FillOutputDataFromFunction(
OutputData<double>& data, TF2 *fun, int nbinsx=100, int nbinsy=100); OutputData<double>& data, TF2 *fun, int nbinsx=100, int nbinsy=100);
...@@ -63,7 +63,7 @@ class TestFumiliLMA : public IFunctionalTest ...@@ -63,7 +63,7 @@ class TestFumiliLMA : public IFunctionalTest
class IFunctionObject class IFunctionObject
{ {
public: public:
virtual ~IFunctionObject(){} virtual ~IFunctionObject(){}
virtual double operator()(const double *xx, const double *pars ) = 0; virtual double operator()(const double *xx, const double *pars ) = 0;
}; };
...@@ -71,7 +71,7 @@ class IFunctionObject ...@@ -71,7 +71,7 @@ class IFunctionObject
class RosenBrockFunctionObject : public IFunctionObject class RosenBrockFunctionObject : public IFunctionObject
{ {
public: public:
double operator()(const double *xx, const double *pars ) double operator()(const double *xx, const double *pars )
{ {
const double x = xx[0]; const double x = xx[0];
...@@ -87,7 +87,7 @@ class RosenBrockFunctionObject : public IFunctionObject ...@@ -87,7 +87,7 @@ class RosenBrockFunctionObject : public IFunctionObject
class SincXSincYFunctionObject : public IFunctionObject class SincXSincYFunctionObject : public IFunctionObject
{ {
public: public:
double operator()(const double *xx, const double *pars ) double operator()(const double *xx, const double *pars )
{ {
const double x = xx[0]; const double x = xx[0];
...@@ -103,7 +103,7 @@ class SincXSincYFunctionObject : public IFunctionObject ...@@ -103,7 +103,7 @@ class SincXSincYFunctionObject : public IFunctionObject
class MyChi2Function : public ROOT::Math::FitMethodFunction class MyChi2Function : public ROOT::Math::FitMethodFunction
{ {
public: public:
typedef ROOT::Math::BasicFitMethodFunction<ROOT::Math::IMultiGenFunction>::Type_t Type_t; typedef ROOT::Math::BasicFitMethodFunction<ROOT::Math::IMultiGenFunction>::Type_t Type_t;
MyChi2Function(TestFumiliLMA *test) MyChi2Function(TestFumiliLMA *test)
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
class TestIsGISAXS1 : public IFunctionalTest class TestIsGISAXS1 : public IFunctionalTest
{ {
public: public:
TestIsGISAXS1(); TestIsGISAXS1();
virtual ~TestIsGISAXS1() { } virtual ~TestIsGISAXS1() { }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
class TestIsGISAXS10 : public IFunctionalTest class TestIsGISAXS10 : public IFunctionalTest
{ {
public: public:
TestIsGISAXS10(); TestIsGISAXS10();
virtual ~TestIsGISAXS10(){} virtual ~TestIsGISAXS10(){}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment