#!/bin/sh

data_dir=../../Data
tuples_dir=$data_dir/Tuples/

#Create the data folder
mkdir $data_dir

#Create the subfolders
mkdir $data_dir/BkgFits/
mkdir $data_dir/ComparePlots/
mkdir $data_dir/Config/
mkdir $data_dir/Efficiencies/
mkdir $data_dir/MassFits/
mkdir $data_dir/Resolution/
mkdir $data_dir/TMplots/
mkdir $data_dir/TMVAplots/

#Create subfolders for the tuples
mkdir $tuples_dir
mkdir $tuples_dir/Data
mkdir $tuples_dir/FCNC
mkdir $tuples_dir/FinalSelection
mkdir $tuples_dir/RefMC
mkdir $tuples_dir/MC
mkdir $tuples_dir/PHSP

#Function creating subfolders for given year and polarity
year_polarity_subfolder (){ #folder, year, polarity
  mkdir $1/$2$3/  
}

#Function creating subfolders for given year
year_subfolders (){  #folder, year,
  year_polarity_subfolder $1 $2 "down"
  year_polarity_subfolder $1 $2 "up"
}

#Function creating subfolders for all years
all_subfolders (){ #folder
  year_subfolders $1 "2011"
  year_subfolders $1 "2012"
  year_subfolders $1 "2015"
  year_subfolders $1 "2016"
  year_subfolders $1 "2017"
  year_subfolders $1 "2018"
}

#Create subfolders for each of the data tuple subfolder
all_subfolders $tuples_dir/Data
all_subfolders $tuples_dir/RefMC
all_subfolders $tuples_dir/MC
all_subfolders $tuples_dir/PHSP

#Create subfolders for the plots
mkdir $data_dir/MassFits/weightPlots

