/* Distributions de masse pour n=1,2,3,... tirages */ #include "sopnamsp.h" #include "machdefs.h" // Pour faire les histogrammes des distributions de masses // pour ntirages: // ex: on a un pixel qui a N galaxies, quelle est la distribution // statistique de masse dans un tel pixel ? // > cmvschdist -a -v -m 1e+7,1e+13 -n -100 -r 200 -N 100000 // compare with: // > cmvschdist -a -v -m 1e+7,1e+13 -n -100 -r 200 -N 100000 -0 // Fabriquer un fichier pour la prod // > cmvschdist -a -m 1e+7,1e+13 -n -100 -r 2000 -N 5000000 -W schdist_2000.ppf #include #include #include #include #include #include #include "timing.h" #include "histos.h" #include "ntuple.h" #include "srandgen.h" #include "perandom.h" #include "geneutils.h" #include "cosmocalc.h" #include "schechter.h" #include void usage(void); void usage(void) { cout<<"cmvschdist -m xmin,xmax -a -0 -n nbin -r ngmax,ngmin -N nalea " <<"-R readfile.ppf -W writefile.ppf"<xmax) xmax=10.*xmin; break; case 'r' : sscanf(optarg,"%d,%d",&ngmax,&ngmin); if(ngmin<=0) ngmin=1; if(ngmax<=0) ngmax=ngmin; if(ngmin>ngmax) ngmin=ngmax; break; case 'n' : sscanf(optarg,"%d",&npt); if(npt<=0) npt = -100; break; case 'N' : sscanf(optarg,"%llu",&nalea); if(nalea<=0) nalea=10000; break; case 'v' : verif = true; break; case '0' : useonly1 = true; break; case 'R' : readfrppf = true; namefrppf = optarg; break; case 'W' : nametoppf = optarg; break; case 'a' : Auto_Ini_Ranf(5); break; case 'h' : default : usage(); return -1; } } double lnx1=log10(xmin), lnx2=log10(xmax); cout<<"xmin="<0) cout<<"SchechterMassDist will be written to file "< Schechter m*dn/dm nstar="< Creating Mass Distribution"< Mass Distribution read from "< Creating "< vthisto; vector vthname; if(verif) { cout<<"> Creating "< Checking tirage"<0) { cout<<"Ecriture de l\'objet SchechterMassDist dans "<0) { cout<<" writing h t"<0) { cout<<" writing th"<0) pos.PutObject(vthisto[i],vthname[i]); } PrtTim("End of Job"); return 0; } /* delobjs * openppf cmvschdist.ppf set n 70 echo ${h70.vmax} set h h$n set t t$n set th th$n disp tirhmdndm disp $t "same red" disp $h disp $th "same red" n/plot $h.val%x ! ! "connectpoints" n/plot $th.val%x ! ! "nsta connectpoints same red" n/plot $h.log10(val)%x val>0. ! "connectpoints" n/plot $th.log10(val)%x val>0. ! "nsta connectpoints same red" n/plot $h.val%pow(10.,x) ! ! "connectpoints" n/plot $th.val%pow(10.,x) ! ! "nsta connectpoints same red" c++exec \ for(int i=0;i<$h.NBins();i++) \ if($h(i)>0.) { \ cout<