Skip to content

Instantly share code, notes, and snippets.

# Seconds Count
133 1
134 7
135 1
136 4
137 3
138 3
141 7
142 24
143 13
////////////////////////////////////
// //
// @visionlib.postach.io //
// //
////////////////////////////////////
void titleStyle(TH1* h1){
h1->GetYaxis()->CenterTitle();
h1->GetXaxis()->CenterTitle();
h1->GetXaxis()->SetLabelSize(h1->GetXaxis()->GetTitleSize()*1.2);
h1->GetYaxis()->SetLabelSize(h1->GetYaxis()->GetTitleSize()*1.2);
//
// mcintegral.C
////////////////////////////////////////////////////
//
// Simple Monte Carlo for integral
//
///////////////////////////////////////////////////
// Created by @visionlib.postach.io
void mcintegral(){
//this is to produce gif animation
@cvson
cvson / duongbayvang.C
Last active May 6, 2019 08:12
[Duong Bay Vang] to check #root #traffic #lifeapp #tutorials
//http://us.24h.com.vn/tin-tuc-trong-ngay/su-that-ve-duong-bay-vang-qua-khong-phan-campuchia-c46a653855.html
void titleStyle(TH1* h1){
h1->GetYaxis()->CenterTitle();
h1->GetXaxis()->CenterTitle();
h1->GetXaxis()->SetLabelSize(h1->GetXaxis()->GetTitleSize()*1.2);
h1->GetYaxis()->SetLabelSize(h1->GetYaxis()->GetTitleSize()*1.2);
h1->GetXaxis()->SetTitleSize(h1->GetXaxis()->GetLabelSize()*1.2);
h1->GetYaxis()->SetTitleSize(h1->GetYaxis()->GetLabelSize()*1.2);
h1->GetYaxis()->SetTitleOffset(0.9);
h1->GetXaxis()->SetTitleOffset(0.9);
//
// trafficModeling.C
////////////////////////////////////////////////////
//
// Simple Monte Carlo for traffic modeling
//
///////////////////////////////////////////////////
// Created by @visionlib.postach.io
void titleStyle(TH2* h1){
h1->GetYaxis()->CenterTitle();
@cvson
cvson / football_score.C
Last active May 6, 2019 08:13
[Football score] illustration football score #tutorials #MC #ROOT
//
// football_score.C
////////////////////////////////////////////////////
//
// Simple Monte Carlo
//
///////////////////////////////////////////////////
// Created by @visionlib.postach.io
{
const Int_t nteam = 4;
@cvson
cvson / createMakeClass.C
Last active May 6, 2019 08:11
[Create root class] work with tree #ROOT #TTree #utils
void createMakeClass(char* filename="",char* treename="", char* classname=""){
TFile *pfile = new TFile(filename);
TTree *ptree = (TTree*)pfile->Get(treename);
ptree->MakeClass(classname);
}