#!/bin/bash



CopyOneYearOnePol(){
	year=$1
	polarity=$2
	
	#mv /home/lhcb/kopecna/B2KstarMuMu/data/data/MC/KplusPi0/${year}${polarity}/*AALLSAMEPVBcheck*root /home/lhcb/kopecna/B2KstarMuMu/data/ALLSAMEBPV_check/MC/${year}${polarity}
	#mv /home/lhcb/kopecna/B2KstarMuMu/data/data/MC/KplusPi0/${year}${polarity}/c_*.eps /home/lhcb/kopecna/B2KstarMuMu/data/DTF_check/MC/${year}${polarity}
	#mv /home/lhcb/kopecna/B2KstarMuMu/data/data/MC/KplusPi0/${year}${polarity}/*DTFcheck*.root /home/lhcb/kopecna/B2KstarMuMu/data/DTF_check/MC/${year}${polarity}

	cp /home/lhcb/kopecna/B2KstarMuMu/data/data/MC/KplusPi0/${year}${polarity}/${year}${polarity}_pi0Resolved*.root /home/lhcb/kopecna/B2KstarMuMu/data/data_no_cuts/MC/KplusPi0/${year}${polarity}/

	cp /home/lhcb/kopecna/B2KstarMuMu/data/data/MC/RefKplusPi0/${year}${polarity}/${year}${polarity}_pi0Resolved*.root /home/lhcb/kopecna/B2KstarMuMu/data/data_no_cuts/MC/RefKplusPi0/${year}${polarity}/

	cp /home/lhcb/kopecna/B2KstarMuMu/data/data/PHSP/KplusPi0/${year}${polarity}/${year}${polarity}_pi0Resolved*.root /home/lhcb/kopecna/B2KstarMuMu/data/data_no_cuts/PHSP/KplusPi0/${year}${polarity}/

}



CopyAllYearsOnePol(){
	polarity=$1
	
	CopyOneYearOnePol 2011 $polarity
	CopyOneYearOnePol 2012 $polarity
	CopyOneYearOnePol 2015 $polarity
	CopyOneYearOnePol 2016 $polarity
}


CopyAllYears(){ 
	CopyAllYearsOnePol down
	CopyAllYearsOnePol up
}


E_NO_ARGS=65
if [ $# -eq 0 ]; then
	CopyAllYears
else
	"Wrong! Use without any parameter."
fi
