This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <iostream> | |
#include <fstream> | |
using namespace std; | |
class ConvertMollweide |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
double z = 14.; // atomic number | |
double a = 28.; // mass number | |
int npoint = 1000; | |
// double range[2] = {0., 1000.}; // 0 - 1 MeV | |
// double range[2] = {0., 100.}; // 0 - 100 keV | |
double range[2] = {0., 10.}; // 0 - 10 keV |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
if ARGV.size == 3 | |
journal=ARGV[0] | |
volume=ARGV[1] | |
page=ARGV[2] | |
elsif ARGV.size == 2 | |
journal=ARGV[0] | |
page=ARGV[1] | |
else | |
puts "Number of Argument is wrong. Use like this:" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#hadd_and_rename.sh target.root sources.root | |
if [ $# -lt 2 ] | |
then | |
echo "Number of argument is wrong. Exit hadd_and_rename.sh..." | |
exit | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 中心極限定理を確かめて遊んでみた。(script for ROOT) | |
{ | |
int n = 10000; | |
int m = 2; | |
int nbin = 100; | |
double limit = 8.0; | |
double binwidth = 2.0*limit/double(nbin); | |
TH1D *h = new TH1D("h", "hist", nbin, - limit, limit); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
Int_t npoint = 10000; | |
Double_t x, xstart = 0., xend = 2.0; | |
TGraph *g1 = new TGraph(); | |
for (Int_t ipoint=0; ipoint<npoint; ipoint++){ | |
x = xstart + (xend - xstart) / double(npoint) * double(ipoint); | |
g1->SetPoint(ipoint, x, TMath::KolmogorovProb(x)); | |
} | |
g1->SetTitle("Kolmogorov distribution"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
const int ndata = 10000; | |
double data[ndata]; | |
TRandom *gaus = new TRandom(); | |
for (int idata = 0; idata < ndata; idata++){ | |
data[idata] = gaus->Gaus(0., 1.); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
TH1D *h1 = new TH1D("h1", "h1", 3, 0, 3); | |
h1->Fill(1); | |
h1->Fill(1); | |
h1->Fill(2); | |
h1->Fill(2); | |
h1->Fill(2); | |
h1->Fill(2); | |
h1->Fill(3); | |
h1->Fill(3); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<TList.h> | |
#include<TFile.h> | |
int main(int argc, char* argv[]){ | |
using namespace std; | |
TFile *f1 = new TFile(argv[1]); | |
TList *l1 = f1->GetListOfKeys(); |
NewerOlder