CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
ThreePointCorrelation_comoving_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 __THREEPOINTCOMCON__
39 #define __THREEPOINTCOMCON__
40 
41 
42 #include "ThreePointCorrelation.h"
43 
44 
45 // ===================================================================================================
46 
47 
48 namespace cbl {
49 
50  namespace measure {
51 
52  namespace threept {
53 
65 
66  protected :
67 
72 
74  std::vector<double> m_scale;
75 
77  std::vector<double> m_zeta;
78 
80  std::vector<double> m_error;
81 
83 
84 
85  public:
86 
91 
96 
111  ThreePointCorrelation_comoving_connected (const catalogue::Catalogue data, const catalogue::Catalogue random, const triplets::TripletType tripletType, const double side_s, const double side_u, const double perc_increase, const int nbins)
112  : ThreePointCorrelation(data, random) { set_parameters(tripletType, side_s, side_u, perc_increase, nbins); }
113 
128  ThreePointCorrelation_comoving_connected (const catalogue::Catalogue data, const catalogue::Catalogue random, const triplets::TripletType tripletType, const double r12, const double r12_binSize, const double r13, const double r13_binSize, const int nbins)
129  : ThreePointCorrelation(data, random) { set_parameters(tripletType, r12, r12_binSize, r13, r13_binSize, nbins); }
130 
135 
137 
138 
143 
154  void set_parameters (const triplets::TripletType tripletType, const double side_s, const double side_u, const double perc_increase, const int nbins);
155 
166  void set_parameters (const triplets::TripletType tripletType, const double r12, const double r12_binSize, const double r13, const double r13_binSize, const int nbins);
167 
169 
170 
175 
181  std::vector<double> scale () const override { return m_scale; }
182 
189  std::vector<double> zeta () const override { return m_zeta; }
190 
197  std::vector<double> error () const override { return m_error; }
198 
200 
205 
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=true, const double fact=0.1, const int seed=3213) override;
242 
283  void measure (const std::vector<std::vector<double>> weight, const bool doJK, const std::string dir_output_triplets=par::defaultString, 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=true, const double fact=0.1, const int seed=3213) override;
284 
324  void measure (const ErrorType errorType, const std::string dir_output_triplets, const std::vector<std::string> dir_input_triplets={}, const int nResamplings = 100, const bool count_ddd=true, const bool count_rrr=true, const bool count_ddr=true, const bool count_drr=true, const bool tcount=true, const double fact=0.1, const int seed=3213) override;
325 
327 
332 
339  void write (const std::string dir, const std::string file) const override;
340 
346  void write_covariance (const std::string dir, const std::string file) const override;
347 
349 
350  };
351  }
352  }
353 }
354 
355 #endif
The class ThreePointCorrelation.
The class Catalogue.
Definition: Catalogue.h:654
std::vector< double > zeta() const override
get the protected member ThreePointCorrelation_comoving_connected::m_zeta
void set_parameters(const triplets::TripletType tripletType, const double side_s, const double side_u, const double perc_increase, const int nbins)
set the binning parameters
ThreePointCorrelation_comoving_connected(const catalogue::Catalogue data, const catalogue::Catalogue random, const triplets::TripletType tripletType, const double r12, const double r12_binSize, const double r13, const double r13_binSize, const int nbins)
constructor
ThreePointCorrelation_comoving_connected(const catalogue::Catalogue data, const catalogue::Catalogue random, const triplets::TripletType tripletType, const double side_s, const double side_u, const double perc_increase, const int nbins)
constructor
std::vector< double > error() const override
get the protected member ThreePointCorrelation_comoving_connected::m_error
void write(const std::string dir, const std::string file) const override
write the monopole of the two-point correlation function
std::vector< double > scale() const override
get the protected member ThreePointCorrelation_comoving_connected::m_scale
void write_covariance(const std::string dir, const std::string file) const override
write the measured three-point correlation covariance
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=true, const double fact=0.1, const int seed=3213) override
method to measure the three-point correlation function
std::vector< double > m_zeta
binned connected three-point correlation function
std::vector< double > m_error
error on the binned connected three-point correlation function
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
static const std::string defaultString
default std::string value
Definition: Constants.h:336
ErrorType
the two-point correlation function error type
Definition: Measure.h:59
TripletType
the triplet type
Definition: Triplet.h:62
The global namespace of the CosmoBolognaLib
Definition: CAMB.h:38