CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
Cluster.h
Go to the documentation of this file.
1 /********************************************************************
2  * Copyright (C) 2015 by Federico Marulli and Alfonso Veropalumbo *
3  * federico.marulli3@unibo.it *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public *
16  * License along with this program; if not, write to the Free *
17  * Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ********************************************************************/
20 
34 #ifndef __CLUSTER__
35 #define __CLUSTER__
36 
37 #include "Object.h"
38 
39 
40 // ============================================================================================
41 
42 
43 namespace cbl {
44 
45  namespace catalogue {
46 
55  class Cluster : public Object {
56 
57  private :
58 
61 
64 
67 
69 
70  public:
71 
76 
82  : Object() {}
83 
91  std::shared_ptr<Object> getShared() {
92  return std::make_shared<Cluster>(*this);
93  }
94 
116  Cluster (const comovingCoordinates coord, const double weight, const long region, const int ID, const std::string field, const double x_displacement, const double y_displacement, const double z_displacement)
118 
148  Cluster (const comovingCoordinates coord, const cosmology::Cosmology &cosm, const double z1_guess, const double z2_guess, const double weight, const long region, const int ID, const std::string field, const double x_displacement, const double y_displacement, const double z_displacement)
149  : Object(coord, cosm, z1_guess, z2_guess, weight, region, ID, field, x_displacement, y_displacement, z_displacement) {}
150 
173  Cluster (const observedCoordinates coord, const double weight, const long region, const int ID, const std::string field, const double x_displacement, const double y_displacement, const double z_displacement)
175 
200  Cluster (const observedCoordinates coord, const CoordinateUnits inputUnits, const double weight, const long region, const int ID, const std::string field, const double x_displacement, const double y_displacement, const double z_displacement)
201  : Object(coord, inputUnits, weight, region, ID, field, x_displacement, y_displacement, z_displacement) {}
202 
229  Cluster (const observedCoordinates coord, const cosmology::Cosmology &cosm, const double weight, const long region, const int ID, const std::string field, const double x_displacement, const double y_displacement, const double z_displacement)
231 
259  Cluster (const observedCoordinates coord, const CoordinateUnits inputUnits, const cosmology::Cosmology &cosm, const double weight, const long region, const int ID, const std::string field, const double x_displacement, const double y_displacement, const double z_displacement)
260  : Object(coord, inputUnits, cosm, weight, region, ID, field, x_displacement, y_displacement, z_displacement) {}
261 
293  Cluster (const double xx, const double yy, const double zz, const double ra, const double dec, const double redshift, const double weight, const long region, const int ID, const std::string field, const double x_displacement, const double y_displacement, const double z_displacement)
295 
299  ~Cluster () = default;
300 
302 
303 
308 
313  double mass () const override
314  { return m_mass; }
315 
320  double mass_proxy () const override
321  { return m_mass_proxy; }
322 
327  double mass_proxy_error () const override
328  { return m_mass_proxy_error; }
329 
331 
332 
337 
342  void set_mass (const double mass=par::defaultDouble) override
343  { m_mass = mass; }
344 
349  void set_mass_proxy (const double mass_proxy=par::defaultDouble) override
350  { m_mass_proxy = mass_proxy; }
351 
358 
360 
361 
366 
372  bool isSet_mass () override
373  { return (cbl::isSet(m_mass)) ? true : false; }
374 
380  bool isSet_mass_proxy () override
381  { return (cbl::isSet(m_mass_proxy)) ? true : false; }
382 
389  bool isSet_mass_proxy_error () override
390  { return (cbl::isSet(m_mass_proxy_error)) ? true : false; }
391 
393 
394 
395  };
396  }
397 }
398 
399 #endif
400 
The class Object.
The class Cluster.
Definition: Cluster.h:55
Cluster(const comovingCoordinates coord, const double weight, const long region, const int ID, const std::string field, const double x_displacement, const double y_displacement, const double z_displacement)
constructor that uses comoving coordinates
Definition: Cluster.h:116
Cluster(const observedCoordinates coord, const cosmology::Cosmology &cosm, const double weight, const long region, const int ID, const std::string field, const double x_displacement, const double y_displacement, const double z_displacement)
constructor that uses observed coordinates in radians and a cosmological model to estimate the comovi...
Definition: Cluster.h:229
Cluster(const observedCoordinates coord, const CoordinateUnits inputUnits, const double weight, const long region, const int ID, const std::string field, const double x_displacement, const double y_displacement, const double z_displacement)
constructor that uses observed coordinates in any angular units
Definition: Cluster.h:200
Cluster(const observedCoordinates coord, const double weight, const long region, const int ID, const std::string field, const double x_displacement, const double y_displacement, const double z_displacement)
constructor that uses observed coordinates in radians
Definition: Cluster.h:173
bool isSet_mass_proxy() override
check if the private member m_mass_proxy is set
Definition: Cluster.h:380
double mass_proxy_error() const override
get the private member m_mass_proxy_error
Definition: Cluster.h:327
~Cluster()=default
default destructor
Cluster()
default constructor
Definition: Cluster.h:81
Cluster(const comovingCoordinates coord, const cosmology::Cosmology &cosm, const double z1_guess, const double z2_guess, const double weight, const long region, const int ID, const std::string field, const double x_displacement, const double y_displacement, const double z_displacement)
constructor that uses comoving coordinates and a cosmological model to estimate the redshift
Definition: Cluster.h:148
Cluster(const observedCoordinates coord, const CoordinateUnits inputUnits, const cosmology::Cosmology &cosm, const double weight, const long region, const int ID, const std::string field, const double x_displacement, const double y_displacement, const double z_displacement)
constructor that uses observed coordinates and a cosmological model to estimate the comoving coordina...
Definition: Cluster.h:259
void set_mass_proxy(const double mass_proxy=par::defaultDouble) override
set the private member m_mass_proxy
Definition: Cluster.h:349
double m_mass
cluster mass
Definition: Cluster.h:60
bool isSet_mass() override
check if the private member m_mass is set
Definition: Cluster.h:372
void set_mass_proxy_error(const double mass_proxy_error=par::defaultDouble) override
set the private member m_mass_proxy_error
Definition: Cluster.h:356
std::shared_ptr< Object > getShared()
function that allows copying private variables of the class when an object of class Catalogue is copi...
Definition: Cluster.h:91
Cluster(const double xx, const double yy, const double zz, const double ra, const double dec, const double redshift, const double weight, const long region, const int ID, const std::string field, const double x_displacement, const double y_displacement, const double z_displacement)
constructor that uses both comoving and observed coordinates
Definition: Cluster.h:293
double m_mass_proxy_error
cluster proxy error
Definition: Cluster.h:66
void set_mass(const double mass=par::defaultDouble) override
set the private member m_mass
Definition: Cluster.h:342
bool isSet_mass_proxy_error() override
check if the private member m_mass_proxy_error is set
Definition: Cluster.h:389
double mass() const override
get the private member m_mass
Definition: Cluster.h:313
double m_mass_proxy
cluster mass proxy
Definition: Cluster.h:63
double mass_proxy() const override
get the private member m_mass_proxy
Definition: Cluster.h:320
The class Object.
Definition: Object.h:132
double zz() const
get the member m_zz
Definition: Object.h:758
long region() const
get the member m_region
Definition: Object.h:835
double dec() const
get the member m_dec
Definition: Object.h:779
double y_displacement() const
get the member m_y_displacement
Definition: Object.h:867
double weight() const
get the member m_weight
Definition: Object.h:828
double ra() const
get the member m_ra
Definition: Object.h:772
std::string field() const
get the member m_field
Definition: Object.h:850
double yy() const
get the member m_yy
Definition: Object.h:751
double redshift() const
get the member m_redshift
Definition: Object.h:807
double x_displacement() const
get the member m_x_displacement
Definition: Object.h:860
int ID() const
get the member m_radius
Definition: Object.h:843
double xx() const
get the member m_xx
Definition: Object.h:744
double z_displacement() const
get the member m_z_displacement
Definition: Object.h:874
The class Cosmology.
Definition: Cosmology.h:277
static const double defaultDouble
default double value
Definition: Constants.h:348
The global namespace of the CosmoBolognaLib
Definition: CAMB.h:38
bool isSet(const std::string var)
check if the value of a [string] variable has already been set
Definition: Kernel.h:803
CoordinateUnits
the coordinate units
Definition: Kernel.h:562