CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
ThreePointCorrelation_angular_connected.h
Go to the documentation of this file.
1 /********************************************************************
2  * Copyright (C) 2010 by Federico Marulli, Michele Moresco *
3  * and Alfonso Veropalumbo *
4  * *
5  * federico.marulli3@unibo.it *
6  * *
7  * This program is free software; you can redistribute it and/or *
8  * modify it under the terms of the GNU General Public License as *
9  * published by the Free Software Foundation; either version 2 of *
10  * the License, or (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public *
18  * License along with this program; if not, write to the Free *
19  * Software Foundation, Inc., *
20  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21  ********************************************************************/
22 
38 #ifndef __THREEPOINTANGCON__
39 #define __THREEPOINTANGCON__
40 
41 
42 #include "ThreePointCorrelation.h"
43 
44 
45 // ===================================================================================================
46 
47 
48 namespace cbl {
49 
50  namespace measure {
51 
52  namespace threept {
53 
67 
68  protected :
69 
74 
76  std::vector<double> m_scale;
77 
79  std::vector<double> m_zeta;
80 
82  std::vector<double> m_error;
83 
85 
86 
87  public:
88 
93 
98 
111  ThreePointCorrelation_angular_connected (const catalogue::Catalogue data, const catalogue::Catalogue random, const double side_s, const double side_u, const double perc_increase, const int nbins)
112  : ThreePointCorrelation(data, random) { ErrorCBL("", "ThreePointCorrelation_angular_connected", "ThreePointCorrelation_angular_connected.h", cbl::glob::ExitCode::_workInProgress_); set_parameters(side_s, side_u, perc_increase, nbins); }
113 
126  ThreePointCorrelation_angular_connected (const catalogue::Catalogue data, const catalogue::Catalogue random, const double r12, const double r12_binSize, const double r13, const double r13_binSize, const int nbins)
127  : ThreePointCorrelation(data, random) { ErrorCBL("", "ThreePointCorrelation_angular_connected", "ThreePointCorrelation_angular_connected.h", cbl::glob::ExitCode::_workInProgress_); set_parameters(r12, r12_binSize, r13, r13_binSize, nbins); }
128 
133 
135 
136 
141 
152  void set_parameters (const double side_s, const double side_u, const double perc_increase, const int nbins);
153 
164  void set_parameters (const double r12, const double r12_binSize, const double r13, const double r13_binSize, const int nbins);
165 
167 
168 
173 
179  std::vector<double> scale () const override { return m_scale; }
180 
187  std::vector<double> zeta () const override { return m_zeta; }
188 
195  std::vector<double> error () const override { return m_error; }
196 
198 
203 
241  void measure (const std::string dir_output_triplets, const std::vector<std::string> dir_input_triplets={}, const bool count_ddd=true, const bool count_rrr=true, const bool count_ddr=true, const bool count_drr=true, const bool tcount=false, const double fact=0.1, const int seed=3213) override;
242 
244 
249 
258  void write (const std::string dir, const std::string file) const override;
259 
265  void write_covariance (const std::string dir, const std::string file) const override;
266 
268 
269  };
270  }
271  }
272 }
273 
274 #endif
The class ThreePointCorrelation.
The class Catalogue.
Definition: Catalogue.h:654
std::vector< double > zeta() const override
get the protected member ThreePointCorrelation_angular_connected::m_zeta
std::vector< double > scale() const override
get the protected member ThreePointCorrelation_angular_connected::m_scale
ThreePointCorrelation_angular_connected(const catalogue::Catalogue data, const catalogue::Catalogue random, const double side_s, const double side_u, const double perc_increase, const int nbins)
constructor
void write(const std::string dir, const std::string file) const override
write the monopole of the two-point correlation function
std::vector< double > error() const override
get the protected member ThreePointCorrelation_angular_connected::m_error
std::vector< double > m_error
error on the binned connected three-point correlation function
ThreePointCorrelation_angular_connected(const catalogue::Catalogue data, const catalogue::Catalogue random, const double r12, const double r12_binSize, const double r13, const double r13_binSize, const int nbins)
constructor
void set_parameters(const double side_s, const double side_u, const double perc_increase, const int nbins)
set the binning parameters
std::vector< double > m_zeta
binned connected three-point correlation function
void measure(const std::string dir_output_triplets, const std::vector< std::string > dir_input_triplets={}, const bool count_ddd=true, const bool count_rrr=true, const bool count_ddr=true, const bool count_drr=true, const bool tcount=false, const double fact=0.1, const int seed=3213) override
method to measure the three-point correlation function
void write_covariance(const std::string dir, const std::string file) const override
write the measured three-point correlation covariance
std::shared_ptr< catalogue::Catalogue > random() const
get the protected member m_random
std::shared_ptr< catalogue::Catalogue > data() const
get the protected member m_data
@ _workInProgress_
error due to work in progress
The global namespace of the CosmoBolognaLib
Definition: CAMB.h:38
int ErrorCBL(const std::string msg, const std::string functionCBL, const std::string fileCBL, const cbl::glob::ExitCode exitCode=cbl::glob::ExitCode::_error_)
throw an exception: it is used for handling exceptions inside the CosmoBolognaLib
Definition: Kernel.h:780