CLUMPY  Version 2011.09_corr2
janalysis.h
Go to the documentation of this file.
00001 #ifndef _CLUMPY_JANALYSIS_H_
00002 #define _CLUMPY_JANALYSIS_H_
00003 
00004 using namespace std;
00005 #include <string>
00006 #include <vector>
00007 
00008 // ROOT includes
00009 #include <TCanvas.h>
00010 #include <TH2D.h>
00011 #include <TGraph.h>
00012 
00016 struct gStructHalo {
00017    string Name;                  
00018    string Type;                  
00019    double PsiDeg;                
00020    double ThetaDeg;              
00021    double l;                     
00022    double z;                     
00023    double Rvir;                  
00024    double Rhos;                  
00025    double Rscale;                
00026    int    Profile;               
00027    double ShapeParam1;           
00028    double ShapeParam2;           
00029    double ShapeParam3;           
00030    double Mtot;                  
00031    double Subs_mfrac;            
00032    double Subs_Mmax;             
00033    double Subs_dPdM_Slope;       
00034    double Subs_dPdV_Rscale;      
00035    int    Subs_dPdV_Profile;     
00036    double Subs_dPdV_ShapeParam1; 
00037    double Subs_dPdV_ShapeParam2; 
00038    double Subs_dPdV_ShapeParam3; 
00039    int    Subs_Inner_cvirmvir;   
00040    int    Subs_Inner_Profile;    
00041    double Subs_Inner_ShapeParam1;
00042    double Subs_Inner_ShapeParam2;
00043    double Subs_Inner_ShapeParam3;
00044 };
00045 
00049 struct gStructHaloStatAna {
00050    string Name;                  
00051    string Type;                  
00052    double PsiDeg;                
00053    double ThetaDeg;              
00054    double l;                     
00055    double z;                     
00056    int    Ndata;                 
00057    int    Npar;                  
00058    vector<double> Chi2;          
00059    vector<double> Rhos;          
00060    vector<double> Rscale;        
00061    vector<double> Rvir;          
00062    vector<int>    Profile;       
00063    vector<double> ShapeParam1;   
00064    vector<double> ShapeParam2;   
00065    vector<double> ShapeParam3;   
00066    vector<double> beta_a;        
00067 
00068 };
00069 
00070 void   gal_j1D(vector<double> const& x, string const& param_file, int switch_y, bool is_list_halos = false, double psi_los = 0, double theta_los = 0, double const& contrast_thresh = 1.);
00071 void   gal_j2D(string const& param_file, double const& psi_deg, double const&theta_deg, double const& psi_size_deg, double const& theta_size_deg, int switch_j, double const& user_rse = 0., bool is_subs_list = false);
00072 void   gal_set_pardpdv(double par_dpdv[10]);
00073 void   gal_set_parsmooth(double par_smooth[21]);
00074 void   gal_set_parsubs(double par_subs[9]);
00075 void   gal_set_partot(double par_tot[10]);
00076 
00077 void   halo_fracjpointlike_dist(string const& file_halos, double const& alphaint_deg, double const& frac, bool is_annihil, double const& rho_sat);
00078 void   halo_fracjtot_alphaint(string const& file_halos, double const& frac, bool is_annihil, double const& rho_sat);
00079 int    halo_get_index(string const& name, string const& type, vector<struct gStructHalo>& list_halos);
00080 string halo_get_name(int i, vector<struct gStructHalo>& list_halos);
00081 string halo_get_type(int i, vector<struct gStructHalo>& list_halos);
00082 void   halo_j1D(vector<double> const& x, string const& param_file, int switch_y, bool is_jshell = false);
00083 void   halo_j2D(string const& param_file, string const& name_halo, double const& fov_deg, bool is_subs_drawn = false, double const& user_rse = 0.);
00084 void   halo_load_list(string const& file_halos, vector<struct gStructHalo>& list_halos, bool is_clear = true);
00085 void   halo_set_pardpdv(int i, double par_dpdv[10], vector<struct gStructHalo>& list_halos, bool is_halo_rotated);
00086 void   halo_set_parsmooth(int i, double par_smooth[21], vector<struct gStructHalo>& list_halos, bool is_halo_rotated);
00087 void   halo_set_parsubs(int i, double par_subs[9], vector<struct gStructHalo>& list_halos);
00088 void   halo_set_partot(int i, double par_tot[10], vector<struct gStructHalo>& list_halos, bool is_halo_rotated);
00089 
00090 void   stat_CLs(vector<double> const& x, string const& stat_files, vector<double> const& cls, int switch_y, double const& rho_sat, double const& eps = 1.e-3, double const& alphaint_deg = 0., int switch_stat_method = 0);
00091 void   stat_draw_chi2(string const& stat_files);
00092 void   stat_draw_correlations(string const& stat_file, int n_par = 5, double const& rkpc_for_mr = 0., double const& rho_sat = 1.e19);
00093 void   stat_file2files(string const& stat_file, vector<string>& stat_files);
00094 void   stat_find_bestmodel(string const& stat_files);
00095 void   stat_find_CLs(string const& stat_files, double const& cl, int switch_stat_method = 0);
00096 int    stat_load_list(string const& stat_file, struct gStructHaloStatAna &stat_halo, bool is_verbose = true);
00097 void   stat_set_partot(int i, double par_tot[10], struct gStructHaloStatAna &stat_halo, bool is_halo_rotated);
00098 
00099 #endif
00100 
 All Classes Files Functions Variables Enumerations Enumerator Defines