CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
ThreePointCorrelation_comoving_reduced.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 __THREEPOINTCOMRED__
39 #define __THREEPOINTCOMRED__
40 
41 
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_QQ;
78 
80  std::vector<double> m_error;
81 
83 
84 
85  public:
86 
91 
96 
111  ThreePointCorrelation_comoving_reduced (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_comoving_connected(data, random, tripletType, side_s, side_u, perc_increase, nbins) {m_QQ.push_back(0);}
113 
128  ThreePointCorrelation_comoving_reduced (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_comoving_connected(data, random, tripletType, r12, r12_binSize, r13, r13_binSize, nbins) {m_QQ.push_back(0);}
130 
135 
137 
138 
143 
149  std::vector<double> scale () const override { return m_scale; }
150 
157  std::vector<double> QQ () const override { return m_QQ; }
158 
165  std::vector<double> error () const override { return m_error; }
166 
168 
173 
212  void measure (const std::string dir_output_triplets, const std::string dir_output_2pt, 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;
213 
257  void measure (const std::vector<std::vector<double>> weight, const bool doJK, const std::string dir_output_triplets, const std::string dir_output_2pt, 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;
258 
301  void measure (const ErrorType errorType, const std::string dir_output_triplets, const std::string dir_output_2pt, 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=false, const double fact=0.1, const int seed=3213) override;
302 
304 
305 
310 
320  void write (const std::string dir, const std::string file, const bool connected) const override;
321 
327  void write_covariance (const std::string dir, const std::string file) const override;
328 
330 
331  };
332  }
333  }
334 }
335 
336 #endif
The class ThreePointCorrelation_comoving_connected.
The class Catalogue.
Definition: Catalogue.h:654
std::vector< double > QQ() const override
get the protected member ThreePointCorrelation_comoving_reduced::m_QQ
std::vector< double > scale() const override
get the protected member ThreePointCorrelation_comoving_reduced::m_scale
void measure(const std::string dir_output_triplets, const std::string dir_output_2pt, 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
ThreePointCorrelation_comoving_reduced(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
std::vector< double > m_QQ
binned reduced three-point correlation function
ThreePointCorrelation_comoving_reduced(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 > m_error
error on the binned reduced three-point correlation function
void write_covariance(const std::string dir, const std::string file) const override
write the measured three-point correlation covariance
void write(const std::string dir, const std::string file, const bool connected) const override
write the monopole of the two-point correlation function
std::vector< double > error() const override
get the protected member ThreePointCorrelation_comoving_reduced::m_error
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
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