diff --git a/.gitignore b/.gitignore
index 1ff96281e03356bc106049fad64bbd25aeb2a4b9..c66d2da9dbbea0a4149b2fba1ea9db87e26341a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,191 @@
 build/*
 install/*
 Doxygen/*
+
+# Created by .ignore support plugin (hsz.mobi)
+### JetBrains template
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
+# Gradle
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn.  Uncomment if using
+# auto-import.
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+
+# CMake
+cmake-build-*/
+
+# Mongo Explorer plugin
+.idea/**/mongoSettings.xml
+
+# File-based project format
+*.iws
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+# Editor-based Rest Client
+.idea/httpRequests
+### C++ template
+# Prerequisites
+*.d
+
+# Compiled Object files
+*.slo
+*.lo
+*.o
+*.obj
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Compiled Dynamic libraries
+*.so
+*.dylib
+*.dll
+
+# Fortran module files
+*.mod
+*.smod
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+*.lib
+
+# Executables
+*.exe
+*.out
+*.app
+### CMake template
+CMakeCache.txt
+CMakeFiles
+CMakeScripts
+Testing
+Makefile
+cmake_install.cmake
+install_manifest.txt
+compile_commands.json
+CTestTestfile.cmake
+### C template
+# Prerequisites
+
+# Object files
+*.ko
+*.elf
+
+# Linker output
+*.ilk
+*.map
+*.exp
+
+# Precompiled Headers
+
+# Libraries
+
+# Shared objects (inc. Windows DLLs)
+*.so.*
+
+# Executables
+*.i*86
+*.x86_64
+*.hex
+
+# Debug files
+*.dSYM/
+*.su
+*.idb
+*.pdb
+
+# Kernel Module Compile Results
+*.mod*
+*.cmd
+.tmp_versions/
+modules.order
+Module.symvers
+Mkfile.old
+dkms.conf
+### Autotools template
+# http://www.gnu.org/software/automake
+
+Makefile.in
+/ar-lib
+/mdate-sh
+/py-compile
+/test-driver
+/ylwrap
+
+# http://www.gnu.org/software/autoconf
+
+autom4te.cache
+/autoscan.log
+/autoscan-*.log
+/aclocal.m4
+/compile
+/config.guess
+/config.h.in
+/config.log
+/config.status
+/config.sub
+/configure
+/configure.scan
+/depcomp
+/install-sh
+/missing
+/stamp-h1
+
+# https://www.gnu.org/software/libtool/
+
+/ltmain.sh
+
+# http://www.gnu.org/software/texinfo
+
+/texinfo.tex
+
+# http://www.gnu.org/software/m4/
+
+m4/libtool.m4
+m4/ltoptions.m4
+m4/ltsugar.m4
+m4/ltversion.m4
+m4/lt~obsolete.m4
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 476a8fec0d02ecb5e7b61c48eb54770153f16cd1..014044bae2c4bfa5f8f705bd15ebafcebc73a40f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,7 +2,7 @@
 build:
   stage: build
   script: 
-    - source /home/vklochkov/Soft/root/root6/root-6.10.08/build/bin/thisroot.sh
+    - source /sft/ROOT/root_v6.14.06.Linux-ubuntu18-x86_64-gcc7.3/build/bin/thisroot.sh
     - mkdir build && cd ./build
     - cmake ../
     - make
@@ -12,7 +12,7 @@ build:
 test:
   stage: test
   script:
-    - source /home/vklochkov/Soft/root/root6/root-6.10.08/build/bin/thisroot.sh
+    - source /sft/ROOT/root_v6.14.06.Linux-ubuntu18-x86_64-gcc7.3/build/bin/thisroot.sh
     - mkdir build && cd ./build
     - cmake ../
     - make
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000000000000000000000000000000000000..999b0bc863c412b4c17998dbe89d2cdf279ab476
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,165 @@
+# Contribution Guide 
+
+https://google.github.io/styleguide/cppguide.html
+
+## Doxygen documentation
+Always document your code, e. g. put at least a brief class description
+
+    /** @file MyClass.h
+    @author John Snow
+    @date 01.01.1991
+    @class MyClass
+    @brief A class for ...
+    */
+
+Methods description
+
+    /**
+    * Do something
+    * @param par1 first parameter description
+    * @return something
+    */
+    int foo(int par1)
+
+Members description
+
+    int var; ///< description after the member
+
+## Namespaces
+
+The Centrality software uses a few namespaces:
+
+* Centrality
+* Glauber
+* ...
+
+The selection of name spaces is reflected also in the directory structure for the packages.
+
+## Include Files
+
+In header files only use include which MUST be there. Unnecessary includes increase the compilation time. Most of the time all necessary includes can be moved to the implementation.
+
+To avoid including header files more than once, use the preprocessor macro _nsp_ClassName_h_ to mark a header as already included. Usage of these inclusion guards is nonnegotiable.
+
+    // file: .../include/nsp/ClassName.h
+
+    #ifndef _nsp_ClassName_h_
+    #define _nsp_ClassName_h_
+
+    class ClassName {
+    };
+
+    #endif
+
+Since with the introduction of namespaces, a class can exist in more than one namespace, we can have header files with the same name to define the same class. We have to add the namespace both to the path for locating the file and to the preprocessor macro preventing multiple inclusion of a header.
+
+## Pass by const reference
+* Complex objects should be passed by reference. 
+* Don’t use it for simple types (int, float, . . . ), it can be an overhead
+* Prefer over pointer: This makes sure you get a valid object
+    
+    void func(const myClass& c); // good
+    void func(const myClass* c); // ok, if you know why (needed only in rare cases)
+    void func(myClass c); // not so good, unless you know why
+
+## Pointers
+ * Only use pointer if you have a strong reason!
+ * If you use objects on the stack you don’t have to care about deletion
+ * If you need pointers, prefer smart pointers over plain pointers
+
+## Using namespace statement
+
+Due to the global effect on all code that includes the particular header, using and using namespace statement should never be given in header files. NEVER do that in header:
+    
+    using namespace std;
+
+This means all files including your header will have the std namespace. You could do it in the implementation, not considered nice style. Prefer importing only single function, only do it in your implementation
+    
+    using std::cout;
+
+Furthermore, since using namespace statement has an immediate effect also outside of the file scope, in .cpp files all such statements should come after all includes.
+You could also define an alias, this can even be done locally in a function body
+
+    using cout = std::cout;
+
+consider using modern ‘typedef’
+
+    using vecType = std::vector<int>;
+    typedef std::vector<int> vecType
+
+## Abbreviations
+
+In general, avoid abbreviations in variable and class names. Here is a list of accepted abbreviations which should not be expanded explicitly:
+
+ * MC: Monte-Carlo
+ * NBD: Negative Binomial Distribution
+ *  ...  
+
+## Const correctness and constness issues
+It is of utmost importance that all classes, functions and methods respect the correct and logical use of const modifier. Methods that do not change class data members should be declared const. Function and method parameters should be declared const if they are not intended to be changed inside of the function body. This is even more true when references are passed through the parameters.
+
+In this respect the use of const_cast is strongly discouraged since it can unravel weird compiler bugs.
+
+The rule of a thumb for each programmer should be that first of all a new variable (if possible) is declared not before the value for it is available (i.e. no C-style declarations of variables at the beginning of the code block) and that every new local variable is declared const by default. A forward declaration of a local variable should be used only in special cases when its value will be known only after complex processing (possibly taking place inside of a nested scope).
+
+## NULL vs. nullptr
+Note that NULL is a (macro) remainder from C and should be avoided. nullptr is meant as a replacement to NULL. nullptr provides a typesafe pointer value representing an empty (null) pointer. The general rule of thumb that I recommend is that you should start using nullptr whenever you would have used NULL in the past. Even better: avoid usage of pointers completely. Almost everything can be done with references instead and is more bug-resistant.
+
+## Pointer * and reference & placement
+The * and & modifiers are part of the type and there thus they belong:
+
+    Core::Track& foo;
+
+## Constructor initializer list
+If possible put it directly after member declaration in the header
+
+    Double32_t energy_{0}; // track energy in GeV
+
+## Increment, decrement
+As default, only pre-increment (++i) and pre-decrement (--i) operators should be used, unless the post-increment/-decrement (i++) feature is explicitly required. The reason is that the post- versions require temporary storage of the previous value of a variable. The compiler will (most probably) optimize such waste away for the built-in types (int etc) but this does not happen for custom code of the various iterators (STL, Offline). The bad habit of placing ++ after the variables can be avoided by forcing yourself to use pre- versions of operators everywhere.
+
+## Forbidden practices
+Generally, the C/FORTRAN-hackish style should be avoided. In particular, the following practices are absolutely forbidden.
+
+Do not use fixed size C arrays when variable size arrays are needed, such as
+
+    // A "probably big enough" fixed size array in a place where variable size array would be needed:
+    double a[20];
+     
+Use STL vector instead, such as
+
+    std::vector<double> a(20);
+     
+Do not use dynamical C arrays, such as
+
+    // Allocate:
+    double* a = (double*)calloc(30, sizeof(double));
+    // De-allocate:
+    free(a);
+     
+Use STL vector instead, see previous point.
+Do not pass large data to function arguments via pointers, such as
+
+    int function(int a, double* array); 
+
+or
+
+    int function(int a, double[] array);
+     
+Use instead C++ reference:
+
+    int function(int a, std::vector<double>& array);
+     
+Do not use unnamed constants, such as
+
+    std::vector<double> array(23);
+     
+Use instead enums so that we know what 23 is:
+
+    // Declared somewhere at the beginning:
+    enum ENParameters {
+    eNParameters = 23
+    };
+    // Then, in the code:
+    std::vector<double> parameters(eNParameters);
+
diff --git a/glauber/HowTo.txt b/glauber/HowTo.txt
deleted file mode 100644
index 22e391e4a6b0f1cc756fb598f4c126b303483125..0000000000000000000000000000000000000000
--- a/glauber/HowTo.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-grep -n  "Chi2Min = " 3* | sed -e 's/  / /g' | sed -e 's/  / /g' | sed -e 's/  / /g'| cut -d " " -f 3,6,9,13 > FitInfo.dat
-TFile *f = new TFile("FitInfo_1.root", "new")
-TTree *n = new TTree("fit_tree",""); n->ReadFile("FitInfo.dat","f:mu:k:chi2",' ')
-n->Write()
-f->Close()
\ No newline at end of file
diff --git a/glauber/main.cpp b/glauber/main.cpp
index 7f6477f81a75b5857d4941ce8877e6d415aa8363..64f7c6476f9e7cf45d3a21c4c7806fe5ffd1ae0d 100644
--- a/glauber/main.cpp
+++ b/glauber/main.cpp
@@ -14,7 +14,6 @@ using namespace Glauber;
 
 int main(int argc, char *argv[])
 {
-
   if (argc < 2)
   {
     std::cout << "Wrong number of parameters! Executable usage:" << std::endl;
diff --git a/main.cpp b/main.cpp
index 97939b5d9a4a3461897814771a0a1215b87949f6..718dbbef49424056f8af05c0ab7b6f30961c7658 100644
--- a/main.cpp
+++ b/main.cpp
@@ -16,50 +16,51 @@
 #include "TH2.h"
 
 int main(int argc, char **argv) {
-    auto start = std::chrono::system_clock::now();
-    ROOT::EnableImplicitMT(2);
+  
+  auto start = std::chrono::system_clock::now();
+  ROOT::EnableImplicitMT(2);
+  
+  if (argc < 3)
+  {
+    std::cout << "Not enough arguments! Please use:" << std::endl;
+    std::cout << "   ./main filename histoname is2d" << std::endl;
+    return -1;
+  }
+  
+  std::unique_ptr <TFile> fIn {TFile::Open(argv[1], "read")};
+  std::string outfilename = "test.root";
+  if ( strcmp( argv[3], "false") == 0 )
+  {
+    std::unique_ptr <TH1F> histo {(TH1F*) (fIn->Get(argv[2]))};
+    Centrality::BordersFinder bf;
+    bf.SetHisto(*histo);
+    bf.SetRanges( 20,0,100 );   // number of bins, min, max value
+    //   bf.SetRanges( {0,10,30,60,100} );  // centrality bins borders with array
+    bf.IsSpectator(true);  // true if impact parameter b correlated with estimator (spectators eneggy), 
+    // false - anticorrelated (multiplicity of produced particles) 
     
-    if (argc < 3)
-    {
-        std::cout << "Not enough arguments! Please use:" << std::endl;
-        std::cout << "   ./main filename histoname is2d" << std::endl;
-        return -1;
-    }
+    bf.FindBorders();
+    bf.SaveBorders(outfilename, "centr_getter_1d");
+  }
+  else if ( strcmp( argv[3], "true") == 0 )
+  {
+    std::unique_ptr <TH2F> histo2d {(TH2F*) (fIn->Get(argv[2]))};
+    Centrality::BordersFinder2D bf;
+    bf.SetHisto2D( std::move(*histo2d) );
+    std::unique_ptr<TH1F> h1d = bf.Convert();
     
-    std::unique_ptr <TFile> fIn {TFile::Open(argv[1], "read")};
-    std::string outfilename = "test.root";
-    if ( strcmp( argv[3], "false") == 0 )
-    {
-        std::unique_ptr <TH1F> histo {(TH1F*) (fIn->Get(argv[2]))};
-        Centrality::BordersFinder bf;
-        bf.SetHisto(*histo);
-        bf.SetRanges( 20,0,100 );   // number of bins, min, max value
+    bf.SetHisto(*h1d);
+    bf.SetRanges( 20,0,100 );   // number of bins, min, max value
     //   bf.SetRanges( {0,10,30,60,100} );  // centrality bins borders with array
-        bf.IsSpectator(true);  // true if impact parameter b correlated with estimator (spectators eneggy), 
-                                    // false - anticorrelated (multiplicity of produced particles) 
-
-        bf.FindBorders();
-        bf.SaveBorders(outfilename, "centr_getter_1d");
-    }
-    else if ( strcmp( argv[3], "true") == 0 )
-    {
-        std::unique_ptr <TH2F> histo2d {(TH2F*) (fIn->Get(argv[2]))};
-        Centrality::BordersFinder2D bf;
-        bf.SetHisto2D( std::move(*histo2d) );
-        std::unique_ptr<TH1F> h1d = bf.Convert();
-        
-        bf.SetHisto(*h1d);
-        bf.SetRanges( 20,0,100 );   // number of bins, min, max value
-        //   bf.SetRanges( {0,10,30,60,100} );  // centrality bins borders with array
-        bf.IsSpectator(false);  // true if impact parameter b correlated with estimator (spectators eneggy), 
-                                    // false - anticorrelated (multiplicity of produced particles) 
-        
-        bf.FindBorders();
-        bf.SaveBorders2D(outfilename, "centr_getter_2d");
-    }
-        
-    auto end = std::chrono::system_clock::now();
-    std::chrono::duration<double> elapsed_seconds = end - start;
-    std::cout << "elapsed time: " << elapsed_seconds.count() << " s\n";
-    return 0;
+    bf.IsSpectator(false);  // true if impact parameter b correlated with estimator (spectators eneggy), 
+    // false - anticorrelated (multiplicity of produced particles) 
+    
+    bf.FindBorders();
+    bf.SaveBorders2D(outfilename, "centr_getter_2d");
+  }
+  
+  auto end = std::chrono::system_clock::now();
+  std::chrono::duration<double> elapsed_seconds = end - start;
+  std::cout << "elapsed time: " << elapsed_seconds.count() << " s\n";
+  return 0;
 }
diff --git a/src/BordersFinder.cpp b/src/BordersFinder.cpp
index 93be4cd3752b64c4e72077e5407d43ddda8ea439..0b5603b2c78304c7709743d26097a925bb014249 100644
--- a/src/BordersFinder.cpp
+++ b/src/BordersFinder.cpp
@@ -3,6 +3,7 @@
 #include "BordersFinderHelper.h"
 
 #include <iostream>
+#include <TGraph.h>
 
 #include "TFile.h"
 
@@ -10,16 +11,52 @@ namespace Centrality {
 
 void BordersFinder::FindBorders()
 {
+    using namespace std;
+
     if (ranges_.size() < 2) return;
     if (norm_ == -1) norm_ = histo_.Integral(0, histo_.GetNbinsX());
-    if (!isspectator_) std::reverse(std::begin(ranges_), std::end(ranges_));
-    
+    if (!isSpectator_) std::reverse(std::begin(ranges_), std::end(ranges_));
+
+    auto axis = histo_.GetXaxis();
+
+    double xLo = (applyLimits_)? xLo_ : axis->GetXmin();
+    double xHi = (applyLimits_)? xHi_ : axis->GetXmax();
+
+
+    int n = axis->GetNbins();
+
+    double *histIntegral = histo_.GetIntegral();
+    double x[n];
+    for (int i = 0; i < n; ++i) {
+        x[i] = axis->GetBinCenter(i+1);
+    }
+
+    TGraph intVsXGraph(n, x, histIntegral);
+    intVsXGraph.SetBit(TGraph::kIsSortedX);
+
+    TGraph xVsIntGraph(n, histIntegral, x);
+    xVsIntGraph.SetBit(TGraph::kIsSortedX);
+
+    double intLo = intVsXGraph.Eval(xLo);
+    double intHi = intVsXGraph.Eval(xHi);
+    double norm = intHi - intLo;
+
+    auto cX = [=] (double x) { return 100./norm*(intVsXGraph.Eval(x) - intVsXGraph.Eval(xLo)); };
+    auto xC = [=] (double c) { return xVsIntGraph.Eval((c/100.)*norm + intLo); };
+
+    for (auto cc : ranges_) {
+        double xx = isSpectator_? xC(cc) : xC(100 - cc);
+        cout << cc << "%" << ", border:" << xx << endl;
+        borders_.push_back(xx);
+    }
+
+/*
     uint iSlice{0};
     long int entriesCurrent{0};
     
     for (int iBin=1; iBin<=histo_.GetNbinsX() && iSlice<ranges_.size() ; ++iBin)
     {
-        const float step = isspectator_ ? ranges_.at(iSlice) : 100. - ranges_.at(iSlice);
+        const float step = isSpectator_ ? ranges_.at(iSlice) : 100. - ranges_.at(iSlice);
         const long int entriesNeeeded = step/100. * norm_;
         entriesCurrent += histo_.GetBinContent(iBin);
         
@@ -34,6 +71,7 @@ void BordersFinder::FindBorders()
             iSlice++;
         }
     }
+*/
 }
 
 void BordersFinder::SaveBorders(const std::string &filename, const std::string &getter_name)
diff --git a/src/BordersFinder.h b/src/BordersFinder.h
index 5915ac95d1e902ba1b0524822e3994b68336d785..f03b836fdfc472351bba39651ea01907c6dbc8c6 100644
--- a/src/BordersFinder.h
+++ b/src/BordersFinder.h
@@ -11,50 +11,56 @@
 #include "TH1.h"
 
 namespace Centrality {
-    
+
 class BordersFinder {
 
-public:
-    
-    BordersFinder(){}
-    
-    void FindBorders();
-    void SaveBorders(const std::string &filename, const std::string &getter_name);
-
-
-    void SetHisto(const TH1F &h)  { histo_ = h; }
-    TH1F& GetHisto() { return histo_; }   // not const to use Draw etc
-    
-    void SetNormalization (long int norm) { norm_ = norm; }
-    long int GetNormalization () const { return norm_; }
-    
-    void SetRanges(const std::vector<float> &ranges) { ranges_ = ranges; }
-    void SetRanges(int n, float min, float max) 
-    {
-        ranges_.clear();
+ public:
+
+  BordersFinder() {}
+
+  void FindBorders();
+  void SaveBorders(const std::string &filename, const std::string &getter_name);
+
+  void SetHisto(const TH1F &h) { histo_ = h; }
+  TH1F &GetHisto() { return histo_; }   // not const to use Draw etc
+
+  void SetNormalization(long int norm) { norm_ = norm; }
+  long int GetNormalization() const { return norm_; }
+
+  void SetRanges(const std::vector<float> &ranges) { ranges_ = ranges; }
+  void SetRanges(int n, float min, float max) {
+    ranges_.clear();
 //         ranges_.reserve(n+1);
-        
-        for (int i=0; i<=n; ++i)
-            ranges_.push_back( min + i*(max-min)/n );
-    }
-    
-    void IsSpectator(bool is=true) { isspectator_ = is; }
-    
-    const std::vector<float>& GetRanges() const { return ranges_; }
-    const std::vector<double>& GetBorders() const { return borders_; }
-    bool GetIsSpectator() const { return isspectator_; }
-    
-    
-private:
-    
-    TH1F histo_;
-    long int norm_{-1};
-        
-    std::vector<float> ranges_{};
-    std::vector<double> borders_{};
-    
-    bool isspectator_{false};
-    
+
+    for (int i = 0; i <= n; ++i)
+      ranges_.push_back(min + i * (max - min) / n);
+  }
+
+  void SetLimits(double xLo, double xHi) {
+    xLo_ = xLo;
+    xHi_ = xHi;
+    applyLimits_ = true;
+  }
+
+  void IsSpectator(bool is = true) { isSpectator_ = is; }
+
+  const std::vector<float> &GetRanges() const { return ranges_; }
+  const std::vector<double> &GetBorders() const { return borders_; }
+  bool GetIsSpectator() const { return isSpectator_; }
+
+ private:
+
+  TH1F histo_;
+  Double_t norm_{-1};
+
+  std::vector<float> ranges_{};
+  std::vector<double> borders_{};
+
+  bool isSpectator_{false};
+
+  bool applyLimits_{false};
+  double xLo_{-1};
+  double xHi_{-1};
 };
 }
 
diff --git a/src/Getter.cpp b/src/Getter.cpp
index 36e98dc2e6bf696f398debf201c5814339acac4a..8156b2aa489f9b520098ba354efa7cf8a9554f1f 100644
--- a/src/Getter.cpp
+++ b/src/Getter.cpp
@@ -47,4 +47,33 @@ float Getter::GetCentrality(float xvalue, float yvalue) const
     return -1.;
 }
 
+Getter *Getter::Create1DGetter(std::vector<double> borders) {
+  typedef decltype(ranges_)::value_type Floating_t;
+
+  size_t n_borders = borders.size();
+  assert(n_borders > 2);
+
+  Floating_t range_max = 100.f;
+  Floating_t range_min = 0.f;
+  Floating_t range_step = (range_max - range_min)/(n_borders - 1);
+
+  decltype(ranges_) ranges(n_borders);
+  for (int i = 0; i < n_borders; ++i) {
+    auto rr = range_min + range_step*i;
+    ranges[i] = rr;
+
+    std::cout << rr << "%: " << borders[i] << std::endl;
+  }
+
+  TAxis ax_borders(static_cast<Int_t>(n_borders - 1), &(borders[0]));
+
+
+  auto getter = new Getter;
+  getter->ranges_ = std::move(ranges);
+  getter->borders_ = ax_borders;
+  getter->isinitialized_ = true;
+
+  return getter;
+}
+
 }
diff --git a/src/Getter.h b/src/Getter.h
index ded979a264879dbf9607ef9e6a668c2e7d151b2a..12a36b9e3d4288748a6d93cd0302b846ffbfbfb8 100644
--- a/src/Getter.h
+++ b/src/Getter.h
@@ -8,6 +8,7 @@
 #ifndef CENTRALITY_GETTER_H
 #define CENTRALITY_GETTER_H
 
+#include <assert.h>
 #include "vector"
 #include "array"
 
@@ -16,53 +17,56 @@
 #include "TRandom.h"
 
 namespace Centrality {
-    
+
 class Getter : public TObject {
 
-public:
-    
-    Getter(){}
-    
-    float GetCentrality(float value) const;
-    float GetCentrality(float xvalue, float yvalue) const;
-    
-    void SetBorders(const std::vector<double> &borders)
-    {
-        borders_ = TAxis( borders.size()-1, &(borders[0]) );
-        isinitialized_ = true;
-    }
-    
-    const TAxis& GetBorders() const { return  borders_; };
-    const std::vector<float>& GetRanges() const { return  ranges_; };
-    
-    void SetRanges(const std::vector<float> &ranges) { ranges_ = ranges; }
-    void IsSpectator(bool is=true) { isspectator_ = is; }
-    
-    void AddBorder2D( const std::array<float,2> &border2D ) 
-    {       
-        borders2d_.push_back(border2D);
-        if (!isinitialized2D_) isinitialized2D_ = true;
-    }
-    
-    const std::vector <std::array<float,2>>& GetBorders2D() const { return  borders2d_; };
-    
-    void SetMax(float x, float y) { xmax_=x; ymax_=y; }
-    
-private:
-    
-    TAxis borders_;
-    std::vector <std::array<float,2>> borders2d_{};     
-    std::vector<float> ranges_{};
-
-    float xmax_{1.};
-    float ymax_{1.};    
-    
-    bool isspectator_{false};
-    bool isinitialized_{false};
-    bool isinitialized2D_{false};
-    
-    ClassDef(Getter, 2);
-    
+ public:
+
+  Getter() = default;
+
+  float GetCentrality(float value) const;
+  float GetCentrality(float xvalue, float yvalue) const;
+
+  void SetBorders(const std::vector<double> &borders) {
+    borders_ = TAxis(borders.size() - 1, &(borders[0]));
+    isinitialized_ = true;
+  }
+
+  const TAxis &GetBorders() const { return borders_; };
+  const std::vector<float> &GetRanges() const { return ranges_; };
+
+  void SetRanges(const std::vector<float> &ranges) { ranges_ = ranges; }
+  void IsSpectator(bool is = true) { isspectator_ = is; }
+
+  void AddBorder2D(const std::array<float, 2> &border2D) {
+    borders2d_.push_back(border2D);
+    if (!isinitialized2D_) isinitialized2D_ = true;
+  }
+
+  const std::vector<std::array<float, 2>> &GetBorders2D() const { return borders2d_; };
+
+  void SetMax(float x, float y) {
+    xmax_ = x;
+    ymax_ = y;
+  }
+
+  static Getter *Create1DGetter(std::vector<double> borders);
+
+ private:
+
+  TAxis borders_;
+  std::vector<std::array<float, 2>> borders2d_{};
+  std::vector<float> ranges_{};
+
+  float xmax_{1.};
+  float ymax_{1.};
+
+  bool isspectator_{false};
+  bool isinitialized_{false};
+  bool isinitialized2D_{false};
+
+ ClassDef(Getter, 2);
+
 };
 }