diff --git a/examples/ProgOpts/Test_Dpipi_ProgOpts.cc b/examples/ProgOpts/Test_Dpipi_ProgOpts.cc index df3d6fb..c35b9f8 100644 --- a/examples/ProgOpts/Test_Dpipi_ProgOpts.cc +++ b/examples/ProgOpts/Test_Dpipi_ProgOpts.cc @@ -1,168 +1,171 @@ #include #include #include "boost/program_options.hpp" #include "boost/tokenizer.hpp" #include "Test_Dpipi_ProgOpts.hh" namespace po = boost::program_options; void validate( boost::any& v, const std::vector& values, Command* /*target_type*/, int) { // Make sure no previous assignment to 'v' has been made po::validators::check_first_occurrence(v); // Extract the first string from 'values'. If there is more than // one string, it's an error, and exception will be thrown. const std::string& s { po::validators::get_single_string(values) }; if ( s == "gen" ) { v = boost::any( Command::Generate ); } else if ( s == "fit" ) { v = boost::any( Command::Fit ); } else if ( s == "simfit" ) { v = boost::any( Command::SimFit ); } else { throw po::validation_error(po::validation_error::invalid_option_value, "command", s, 3); } } void validate( boost::any& v, const std::vector& values, LauTimeDepFitModel::CPEigenvalue* /*target_type*/, int) { // Make sure no previous assignment to 'v' has been made po::validators::check_first_occurrence(v); // Extract the first string from 'values'. If there is more than // one string, it's an error, and exception will be thrown. const std::string& s { po::validators::get_single_string(values) }; if ( s == "QFS" ) { v = boost::any( LauTimeDepFitModel::CPEigenvalue::QFS ); } else if ( s == "CPEven" ) { v = boost::any( LauTimeDepFitModel::CPEigenvalue::CPEven ); } else if ( s == "CPOdd" ) { v = boost::any( LauTimeDepFitModel::CPEigenvalue::CPOdd ); } else { throw po::validation_error(po::validation_error::invalid_option_value); } } namespace LauDecayTime { void validate( boost::any& v, const std::vector& values, EfficiencyMethod* /*target_type*/, int) { // Make sure no previous assignment to 'v' has been made po::validators::check_first_occurrence(v); // Extract the first string from 'values'. If there is more than // one string, it's an error, and exception will be thrown. const std::string& s { po::validators::get_single_string(values) }; if ( s == "uniform" || s == "flat" ) { v = boost::any( EfficiencyMethod::Uniform ); } else if ( s == "binned" || s == "hist" ) { v = boost::any( EfficiencyMethod::Binned ); } else if ( s == "spline" ) { v = boost::any( EfficiencyMethod::Spline ); } else { throw po::validation_error(po::validation_error::invalid_option_value); } } }; TestDpipi_ProgramSettings::TestDpipi_ProgramSettings(const int argc, const char ** argv) { po::options_description main_desc{"Main options"}; main_desc.add_options() ("command", po::value(&command)->required(), "main command: gen, fit, or simfit") ; po::positional_options_description p; p.add("command", 1); po::options_description common_desc{"Common options"}; common_desc.add_options() ("help", "produce help message") ("dtype", po::value(&dType)->default_value(LauTimeDepFitModel::CPEigenvalue::QFS,"QFS"), "type of D decay: QFS, CPOdd, or CPEven") ("dta-model", po::value(&timeEffModel)->default_value(LauDecayTime::EfficiencyMethod::Uniform,"uniform"), "decay-time acceptance model: uniform/flat, binned/hist, spline") ("dtr", po::value(&timeResolution)->default_value(kTRUE), "enable/disable decay-time resolution") ("dtr-perevent", po::value(&perEventTimeErr)->default_value(kFALSE), "enable/disable use of per-event decay-time error (requires decay-time resolution to be enabled to take effect)") ("seed", po::value(&RNGseed)->default_value(0), "set the seed for the RNG; if not set, the time is used to generate a seed") ("run", po::value(&run)->default_value(2), "set the Run number (1 or 2)") - ("dir", po::value(&directory)->default_value("",""), "set the directory used to find the nTuples within the root file. Defaults to no directory") + ("dir", po::value(&directory)->default_value(""), "set the directory used to find the nTuples within the root file. Defaults to no directory") ("bkgndList", po::value(&bkgndListStr)->default_value("comb,Bd2DKpi,Bs2DKpi,Lb2Dppi"), "the comma-separated list of background components to include") - ("fitBackInput", po::value(&fitBackInput)->default_value("","fit0_ToyMC_QFS_expts0-0_expt0.root"), "set the file used as input to the fit: only used if fitBack is also selected") + ("fitBackInput", po::value(&fitBackInput)->default_value("fit0_ToyMC_QFS_expts0-0_expt0.root"), "set the file used as input to the fit: only used if fitBack is also selected") + ("eosRoot", po::value(&eosRoot)->default_value("root://eoslhcb.cern.ch//eos/lhcb/wg/b2oc/B2D0pipi"), "set the base EOS area from which all the input data/histograms/json files/etc. should be read") + ("eosConfigDir", po::value(&eosConfigDir)->default_value("timedep_fit_histos"), "set the directory name from which the configuration (json files / histogram files) should be read") + ("eosDataDir", po::value(&eosDataDir)->default_value("Tuples22/Data"), "set the directory name from which the data should be read") ; po::options_description gen_desc{"Generation options"}; gen_desc.add_options() ("firstExptGen", po::value(&firstExptGen)->default_value(0), "first experiment to generate") ("nExptGen", po::value(&nExptGen)->default_value(1), "number of experiments to generate") ; po::options_description fit_desc{"Fitting options"}; fit_desc.add_options() ("firstExpt", po::value(&firstExptFit)->default_value(0), "first experiment to fit") ("nExpt", po::value(&nExptFit)->default_value(1), "number of experiments to fit") ("iFit", po::value(&iFit)->default_value(0), "fit ID - used to distinguish multiple fits to a given dataset (used to disentangle multiple minima)") ("fixTau", po::value(&fixLifetime)->default_value(kTRUE), "enable/disable floating of B lifetime parameter") ("fixDm", po::value(&fixDeltaM)->default_value(kTRUE), "enable/disable floating of B mixing frequency parameter") ("fixPhiMix", po::value(&fixPhiMix)->default_value(kFALSE), "enable/disable floating of B mixing phase parameter(s)") ("fixSplineKnots", po::value(&fixSplineKnots)->default_value(kFALSE), "enable/disable floating of the decay-time-acceptance spline") ("useSinCos", po::value(&useSinCos)->default_value(kTRUE), "enable/disable using sine and cosine of B mixing phase as the floating parameters rather than the phase itself") ("useAveDeltaCalibVals", po::value(&useAveDeltaCalibVals)->default_value(kTRUE), "enable/disable fitting calib values as their average +/- delta values rather than having separate values for B and Bbar") ("addTaggers", po::value(&addTaggers)->default_value(kTRUE), "add/omit taggers") ("floatCalibPars", po::value(&floatCalibPars)->default_value(kTRUE), "enable/disable floating of the FT calibration parameters") ("floatYields", po::value(&floatYields)->default_value(kFALSE), "enable/disable floating of the yields of each component - if enabled/disabled implies inclusion/exclusion of non-DP PDFs in/from the likelihood") ("fitBack", po::value(&fitBack)->default_value(kFALSE), "enable/disable refitting some generated data from a model") ("blindFit", po::value(&blindFit)->default_value(kFALSE), "enable/disable blinding of the physics parameters") ("dataFit", po::value(&dataFit)->default_value(kFALSE), "fit to data (not MC or toys)") ("genToy", po::value(&genToy)->default_value(kFALSE), "enable/disable generation of a toy to a fit result") ; po::options_description simfit_desc{"Simultaneous fitting options"}; simfit_desc.add_options() ("port", po::value(&port)->default_value(0), "port number on which sim fit coordinator is listening") ; po::options_description all_desc; all_desc.add(main_desc).add(common_desc).add(gen_desc).add(fit_desc).add(simfit_desc); po::variables_map vm; try { po::store(po::command_line_parser(argc, argv). options(all_desc). positional(p). run(), vm); po::notify(vm); } catch ( boost::wrapexcept& e ) { std::cout << argv[0] << " requires a command, one of 'gen', 'fit', or 'simfit'\n" << "Append --help to those commands to see help on the related options" << std::endl; parsedOK = kFALSE; return; } catch ( po::validation_error& e ) { std::cerr << e.what() << std::endl; parsedOK = kFALSE; return; } if ( vm.count("help") ) { po::options_description help_desc; help_desc.add(common_desc).add(gen_desc).add(fit_desc).add(simfit_desc); std::cout << help_desc << std::endl; helpRequested = kTRUE; return; } if ( ! bkgndListStr.empty() ) { const boost::char_separator sep{","}; const boost::tokenizer> tokens{bkgndListStr, sep}; for (const auto& t : tokens) { bkgndList.insert( t ); } } } diff --git a/examples/ProgOpts/Test_Dpipi_ProgOpts.hh b/examples/ProgOpts/Test_Dpipi_ProgOpts.hh index 83c289a..423fbda 100644 --- a/examples/ProgOpts/Test_Dpipi_ProgOpts.hh +++ b/examples/ProgOpts/Test_Dpipi_ProgOpts.hh @@ -1,56 +1,60 @@ #ifndef TEST_DPIPI_PROGOPTS #define TEST_DPIPI_PROGOPTS #include "Rtypes.h" #include "LauDecayTime.hh" #include "LauTimeDepFitModel.hh" #include "Command.hh" #include #include struct TestDpipi_ProgramSettings { TestDpipi_ProgramSettings(const int argc, const char ** argv); Bool_t parsedOK{kTRUE}; Bool_t helpRequested{kFALSE}; Command command{Command::Generate}; LauTimeDepFitModel::CPEigenvalue dType{LauTimeDepFitModel::CPEigenvalue::QFS}; LauDecayTime::EfficiencyMethod timeEffModel{LauDecayTime::EfficiencyMethod::Uniform}; UInt_t firstExptGen{0}; UInt_t nExptGen{1}; UInt_t firstExptFit{0}; UInt_t nExptFit{1}; UInt_t iFit{0}; UInt_t port{0}; UInt_t RNGseed{0}; UInt_t run{2}; Bool_t timeResolution{kTRUE}; Bool_t perEventTimeErr{kFALSE}; Bool_t fixLifetime{kTRUE}; Bool_t fixDeltaM{kTRUE}; Bool_t fixPhiMix{kFALSE}; Bool_t fixSplineKnots{kFALSE}; Bool_t useSinCos{kTRUE}; Bool_t useAveDeltaCalibVals{kTRUE}; Bool_t addTaggers{kTRUE}; Bool_t floatCalibPars{kTRUE}; Bool_t floatYields{kFALSE}; Bool_t fitBack{kFALSE}; Bool_t blindFit{kFALSE}; Bool_t dataFit{kFALSE}; Bool_t genToy{kFALSE}; std::string bkgndListStr{""}; std::string directory{""}; std::string fitBackInput{""}; + std::string eosRoot{""}; + std::string eosConfigDir{""}; + std::string eosDataDir{""}; + std::set bkgndList; }; #endif diff --git a/examples/runTimeDepTest.sh b/examples/runTimeDepTest.sh index 77d0249..28a1b6c 100755 --- a/examples/runTimeDepTest.sh +++ b/examples/runTimeDepTest.sh @@ -1,97 +1,228 @@ #!/bin/bash +#SBATCH --partition=epp +#SBATCH --ntasks=1 +#SBATCH --cpus-per-task=6 +#SBATCH --mem-per-cpu=3997 +#SBATCH --time=02:00:00 +#Run with sbatch runTimeDepTest.sh # Copyright 2020 University of Warwick # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Laura++ package authors: # John Back # Paul Harrison # Thomas Latham -# Fit ID, decay time acceptance model (flat, hist, spline), decay time resolution (0 or 1), per-event decay time error (0 or 1) -if [ $# -lt 1 ] -then - echo "Usage: $0 " - exit 1 -fi - -iFit=$1 -dta_model=$2 -dtr=$3 -dtr_perevent=$4 -fixTau=0 +processes=() + +# trap ^C and call ctrl_c() +trap ctrl_c INT + +function ctrl_c() +{ + echo " ** Caught ^C event!" + for process in ${processes[@]} + do + if ps -u $USER | grep -q "$process" + then + echo "Killing : $process" + kill $process + fi + done + exit 1 +} + +iFit=0 +dta_model="spline" +dtr=1 +dtr_perevent=0 +fixTau=1 +fixDeltaM=1 +seed=140279 # $(pwd | xargs basename) +dataFit=1 +runNo=12 # Modify these if you want to run more experiments -nExpt=50 +nExpt=1 firstExpt=0 -logName_genQFS=gen-QFS-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent.log -logName_genCPE_KK=gen-CPEvenKK-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent.log -logName_genCPE_pipi=gen-CPEvenpipi-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent.log - -logName_coord=coordinator-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent-$iFit.log -logName_taskQFS=task-QFS-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent-$iFit.log -logName_taskCPE_KK=task-CPEvenKK-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent-$iFit.log -logName_taskCPE_pipi=task-CPEvenpipi-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent-$iFit.log +logName_genQFS_run1=Logs/gen-QFS-run1-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent.log +logName_genQFS_run2=Logs/gen-QFS-run2-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent.log +logName_genCPE_KK_run1=Logs/gen-CPEvenKK-run1-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent.log +logName_genCPE_KK_run2=Logs/gen-CPEvenKK-run2-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent.log +logName_genCPE_pipi_run1=Logs/gen-CPEvenpipi-run1-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent.log +logName_genCPE_pipi_run2=Logs/gen-CPEvenpipi-run2-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent.log + +logName_coord=Logs/coordinator-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent-$iFit.log +logName_taskQFS_run1=Logs/task-QFS-run1-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent-$iFit.log +logName_taskQFS_run2=Logs/task-QFS-run2-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent-$iFit.log +logName_taskCPE_KK_run1=Logs/task-CPEvenKK-run1-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent-$iFit.log +logName_taskCPE_KK_run2=Logs/task-CPEvenKK-run2-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent-$iFit.log +logName_taskCPE_pipi_run1=Logs/task-CPEvenpipi-run1-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent-$iFit.log +logName_taskCPE_pipi_run2=Logs/task-CPEvenpipi-run2-dtamodel_$dta_model-dtr_$dtr-dtrperevent_$dtr_perevent-$iFit.log + +mkdir -p Logs + +# make sure we have the most up-to-date json files +eosArea="root://eoslhcb.cern.ch//eos/lhcb/wg/b2oc/B2D0pipi/timedep_fit_histos" +rm -f run1DTAsplines.json run2DTAsplines.json +xrdcp $eosArea/run1DTAsplines.json . +if [ $? -ne 0 ] +then + echo "Problem downloading json files from EOS, exiting" + exit 1 +fi +xrdcp $eosArea/run2DTAsplines.json . +if [ $? -ne 0 ] +then + echo "Problem downloading json files from EOS, exiting" + exit 1 +fi -if [ $iFit == 0 ] +if [ $iFit == 0 -a $dataFit == 0 ] then #run generation of the modes in parallel (put the tasks in the bg) - echo "Generating QFS samples..." - ../../laura.install/bin/Test_Dpipi gen --dtype QFS --fixTau $fixTau --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExptGen $firstExpt --nExptGen $nExpt --dir B2Dhh_Kpi > $logName_genQFS 2>&1 & - - echo "Generating CPEven samples..." - ../../laura.install/bin/Test_Dpipi gen --dtype CPEven --fixTau $fixTau --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExptGen $firstExpt --nExptGen $nExpt --dir B2Dhh_KK > $logName_genCPE_KK 2>&1 & - ../../laura.install/bin/Test_Dpipi gen --dtype CPEven --fixTau $fixTau --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExptGen $firstExpt --nExptGen $nExpt --dir B2Dhh_pipi > $logName_genCPE_pipi 2>&1 & + echo "Generating samples..." + if [ $runNo -eq 1 -o $runNo -eq 12 ] + then + Test_Dpipi gen --dtype QFS --sigOnly $sigOnly --fixTau $fixTau --seed $seed --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExptGen $firstExpt --nExptGen $nExpt --run 1 --dir B2Dhh_Kpi > $logName_genQFS_run1 2>&1 & + task=$! + processes+=( $task ) + + Test_Dpipi gen --dtype CPEven --sigOnly $sigOnly --fixTau $fixTau --seed $seed --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExptGen $firstExpt --nExptGen $nExpt --run 1 --dir B2Dhh_KK > $logName_genCPE_KK_run1 2>&1 & + task=$! + processes+=( $task ) + + Test_Dpipi gen --dtype CPEven --sigOnly $sigOnly --fixTau $fixTau --seed $seed --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExptGen $firstExpt --nExptGen $nExpt --run 1 --dir B2Dhh_pipi > $logName_genCPE_pipi_run1 2>&1 & + task=$! + processes+=( $task ) + fi + + if [ $runNo -eq 2 -o $runNo -eq 12 ] + then + Test_Dpipi gen --dtype QFS --sigOnly $sigOnly --fixTau $fixTau --seed $seed --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExptGen $firstExpt --nExptGen $nExpt --run 2 --dir B2Dhh_Kpi > $logName_genQFS_run2 2>&1 & + task=$! + processes+=( $task ) + + Test_Dpipi gen --dtype CPEven --sigOnly $sigOnly --fixTau $fixTau --seed $seed --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExptGen $firstExpt --nExptGen $nExpt --run 2 --dir B2Dhh_KK > $logName_genCPE_KK_run2 2>&1 & + task=$! + processes+=( $task ) + + Test_Dpipi gen --dtype CPEven --sigOnly $sigOnly --fixTau $fixTau --seed $seed --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExptGen $firstExpt --nExptGen $nExpt --run 2 --dir B2Dhh_pipi > $logName_genCPE_pipi_run2 2>&1 & + task=$! + processes+=( $task ) + fi wait #wait for the generation to complete fi echo "Running fit $iFit" -nTasks=3 +if [ $runNo -eq 12 ] +then + nTasks=6 +else + nTasks=3 +fi -../../laura.install/bin/SimFitCoordinator $iFit $nExpt $firstExpt $nTasks > $logName_coord 2>&1 & +SimFitCoordinator $iFit $nExpt $firstExpt $nTasks > $logName_coord 2>&1 & +task=$! +echo "SimFitCoordinator process : $task" +processes+=( $task ) echo "Initialised coordinator process for fit $iFit" -sleep 10 +sleep 5 -port=`tail -1 $logName_coord | awk '{print $NF}'` +port="" +while [ "x$port" == "x" ] +do + sleep 2 + port=`tail $logName_coord | grep "Waiting for connection" | awk '{print $NF}'` +done echo "Coordinator is listening on port $port" echo "Initialising tasks..." -../../laura.install/bin/Test_Dpipi simfit --dtype CPEven --port $port --iFit $iFit --fixTau $fixTau --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExpt $firstExpt --nExpt $nExpt --firstExptGen $firstExpt --nExptGen $nExpt --dir B2Dhh_KK > $logName_taskCPE_KK 2>&1 & -sleep 5 -../../laura.install/bin/Test_Dpipi simfit --dtype CPEven --port $port --iFit $iFit --fixTau $fixTau --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExpt $firstExpt --nExpt $nExpt --firstExptGen $firstExpt --nExptGen $nExpt --dir B2Dhh_pipi > $logName_taskCPE_pipi 2>&1 & -sleep 5 -../../laura.install/bin/Test_Dpipi simfit --dtype QFS --port $port --iFit $iFit --fixTau $fixTau --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExpt $firstExpt --nExpt $nExpt --firstExptGen $firstExpt --nExptGen $nExpt --dir B2Dhh_Kpi > $logName_taskQFS 2>&1 & +if [ $runNo -eq 1 -o $runNo -eq 12 ] +then + Test_Dpipi simfit --blindFit $dataFit --dataFit $dataFit --dtype QFS --seed $seed --port $port --iFit $iFit --fixTau $fixTau --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExpt $firstExpt --nExpt $nExpt --firstExptGen $firstExpt --nExptGen $nExpt --run 1 --dir B2Dhh_Kpi --fixDm $fixDeltaM > $logName_taskQFS_run1 2>&1 & + task=$! + echo "QFS Run 1 process : $task" + processes+=( $task ) + sleep 5 + Test_Dpipi simfit --blindFit $dataFit --dataFit $dataFit --dtype CPEven --seed $seed --port $port --iFit $iFit --fixTau $fixTau --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExpt $firstExpt --nExpt $nExpt --firstExptGen $firstExpt --nExptGen $nExpt --run 1 --dir B2Dhh_KK --fixDm $fixDeltaM > $logName_taskCPE_KK_run1 2>&1 & + task=$! + echo "CP KK Run 1 process : $task" + processes+=( $task ) + sleep 5 + Test_Dpipi simfit --blindFit $dataFit --dataFit $dataFit --dtype CPEven --seed $seed --port $port --iFit $iFit --fixTau $fixTau --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExpt $firstExpt --nExpt $nExpt --firstExptGen $firstExpt --nExptGen $nExpt --run 1 --dir B2Dhh_pipi --fixDm $fixDeltaM > $logName_taskCPE_pipi_run1 2>&1 & + task=$! + echo "CP pipi Run 1 process : $task" + processes+=( $task ) +fi +if [ $runNo -eq 2 -o $runNo -eq 12 ] +then + Test_Dpipi simfit --blindFit $dataFit --dataFit $dataFit --dtype QFS --seed $seed --port $port --iFit $iFit --fixTau $fixTau --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExpt $firstExpt --nExpt $nExpt --firstExptGen $firstExpt --nExptGen $nExpt --run 2 --dir B2Dhh_Kpi --fixDm $fixDeltaM > $logName_taskQFS_run2 2>&1 & + task=$! + echo "QFS Run 2 process : $task" + processes+=( $task ) + sleep 5 + Test_Dpipi simfit --blindFit $dataFit --dataFit $dataFit --dtype CPEven --seed $seed --port $port --iFit $iFit --fixTau $fixTau --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExpt $firstExpt --nExpt $nExpt --firstExptGen $firstExpt --nExptGen $nExpt --run 2 --dir B2Dhh_KK --fixDm $fixDeltaM > $logName_taskCPE_KK_run2 2>&1 & + task=$! + echo "CP KK Run 2 process : $task" + processes+=( $task ) + sleep 5 + Test_Dpipi simfit --blindFit $dataFit --dataFit $dataFit --dtype CPEven --seed $seed --port $port --iFit $iFit --fixTau $fixTau --dta-model $dta_model --dtr $dtr --dtr-perevent $dtr_perevent --firstExpt $firstExpt --nExpt $nExpt --firstExptGen $firstExpt --nExptGen $nExpt --run 2 --dir B2Dhh_pipi --fixDm $fixDeltaM > $logName_taskCPE_pipi_run2 2>&1 & + task=$! + echo "CP pipi Run 2 process : $task" + processes+=( $task ) +fi wait #wait for the fits and coordinator to terminate echo "Fit completed" echo "Warnings/Errors from coordinator:" grep -e ERROR -e WARNING -e Error -e Warning $logName_coord -echo "Warnings/Errors from CPeven KK task:" -grep -e ERROR -e WARNING -e Error -e Warning $logName_taskCPE_KK - -echo "Warnings/Errors from CPeven pipi task:" -grep -e ERROR -e WARNING -e Error -e Warning $logName_taskCPE_pipi +echo "Warnings/Errors from CPeven KK tasks:" +if [ $runNo -eq 1 -o $runNo -eq 12 ] +then + grep -e ERROR -e WARNING -e Error -e Warning $logName_taskCPE_KK_run1 +fi +if [ $runNo -eq 2 -o $runNo -eq 12 ] +then + grep -e ERROR -e WARNING -e Error -e Warning $logName_taskCPE_KK_run2 +fi -echo "Warnings/Errors from QFS task:" -grep -e ERROR -e WARNING -e Error -e Warning $logName_taskQFS +echo "Warnings/Errors from CPeven pipi tasks:" +if [ $runNo -eq 1 -o $runNo -eq 12 ] +then + grep -e ERROR -e WARNING -e Error -e Warning $logName_taskCPE_pipi_run1 +fi +if [ $runNo -eq 2 -o $runNo -eq 12 ] +then + grep -e ERROR -e WARNING -e Error -e Warning $logName_taskCPE_pipi_run2 +fi -echo "Tests against reference gen/fit output to be implemented here" +echo "Warnings/Errors from QFS tasks:" +if [ $runNo -eq 1 -o $runNo -eq 12 ] +then + grep -e ERROR -e WARNING -e Error -e Warning $logName_taskQFS_run1 +fi +if [ $runNo -eq 2 -o $runNo -eq 12 ] +then + grep -e ERROR -e WARNING -e Error -e Warning $logName_taskQFS_run2 +fi