From 8fcfdeeaf62e5a1182cc30489f9142db59269522 Mon Sep 17 00:00:00 2001 From: Nick Tyler Date: Tue, 4 Sep 2018 08:14:00 -0400 Subject: [PATCH] Fixes to some scripts (#3) * Add validate program for resolution * Loop over all events to check momentum * Update to simulation script * Fix minor bug in script * Possibly a quick generator for electron lund * Adding different histograms * Updates to sim and validate scripts --- .gitignore | 7 ++ release-validation-1/gen.py | 69 +++++++++++++++++ release-validation-1/run-clara-validate | 69 +++++++++++++++++ release-validation-1/sim.py | 43 ++++++----- release-validation-1/src/Makefile | 21 ++++++ release-validation-1/src/colors.hpp | 22 ++++++ release-validation-1/src/histogram.cpp | 66 +++++++++++++++++ release-validation-1/src/histogram.hpp | 54 ++++++++++++++ release-validation-1/src/main.cpp | 30 ++++++++ release-validation-1/src/main.hpp | 98 +++++++++++++++++++++++++ release-validation-1/validate.sh | 20 +++-- 11 files changed, 474 insertions(+), 25 deletions(-) create mode 100644 .gitignore create mode 100755 release-validation-1/gen.py create mode 100755 release-validation-1/run-clara-validate create mode 100755 release-validation-1/src/Makefile create mode 100644 release-validation-1/src/colors.hpp create mode 100644 release-validation-1/src/histogram.cpp create mode 100644 release-validation-1/src/histogram.hpp create mode 100644 release-validation-1/src/main.cpp create mode 100644 release-validation-1/src/main.hpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a81045c --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ + +*.ipynb +*.o +*.root +release-validation-1/src/validate +release-validation-1/test +release-validation-1/validate diff --git a/release-validation-1/gen.py b/release-validation-1/gen.py new file mode 100755 index 0000000..631127d --- /dev/null +++ b/release-validation-1/gen.py @@ -0,0 +1,69 @@ +#!/usr/bin/env python +from __future__ import print_function +from datetime import datetime +import argparse +import numpy as np +import sys +import os + + +def gen_lund(args): + header = " 2 1. 1. 0 -1 0.0 0.0000 0.0000 0.0000 0.0000" + event1 = " 1 -1 2 11 0 0 0.0000 0.0000 {:.4f} {:.4f} 0.0005 {:.4f} {:.4f} {:.4f}" + event2 = " 2 0 1 11 0 0 {:.4f} {:.4f} {:.4f} {:.4f} 0.0005 {:.4f} {:.4f} {:.4f}" + energy = args.energy + theta = args.theta + phi = args.phi + + with open(args.output_file, "w") as output: + for evt in range(0, args.num): + output.write(header) + output.write("\n") + + if(args.sigma > 0): + energy = args.energy + theta = args.theta + \ + float(np.random.normal(0.0, args.sigma, 1)) + phi = args.phi + float(np.random.normal(0.0, args.sigma, 1)) + + px = energy * np.sin(theta) * np.cos(phi) + py = energy * np.sin(theta) * np.sin(phi) + pz = energy * np.cos(theta) + vx = 0.0 + vy = 0.0 + vz = 0.0 + E = np.sqrt(px * px + py * py + pz * pz) + output.write(event1.format(E, E, vx, vy, vz)) + output.write("\n") + output.write(event2.format(px, py, pz, E, vx, vy, vz)) + output.write("\n") + output.close() + + +def main(): + # Make argument parser + parser = argparse.ArgumentParser( + description="Basic generator for electrons") + parser.add_argument('-o', dest='output_file', type=str, nargs='?', + help="Output filename", default='electron_gen.dat') + parser.add_argument('-E', dest='energy', type=float, nargs='?', + help="Energy to generate electrons at", default=4.5) + parser.add_argument('-T', dest='theta', type=float, nargs='?', + help="Theta angle to generate electrons at", default=20) + parser.add_argument('-P', dest='phi', type=float, nargs='?', + help="phi angle to generate electrons at", default=20) + parser.add_argument('-s', dest='sigma', type=float, nargs='?', + help="Generate electron with noise", default=0.0) + parser.add_argument('-N', dest='num', type=int, nargs='?', + help="Number of electrons to generate", default=200) + args = parser.parse_args() + + gen_lund(args) + + +if __name__ == "__main__": + try: + main() + except KeyboardInterrupt: + print("\n\nExiting") + sys.exit() diff --git a/release-validation-1/run-clara-validate b/release-validation-1/run-clara-validate new file mode 100755 index 0000000..a789c8a --- /dev/null +++ b/release-validation-1/run-clara-validate @@ -0,0 +1,69 @@ +#!/usr/bin/env bash + +# Copyright (c) 2017. Jefferson Lab (JLab). All rights reserved. Permission +# to use, copy, modify, and distribute this software and its documentation for +# educational, research, and not-for-profit purposes, without fee and without a +# signed licensing agreement. +# +# IN NO EVENT SHALL JLAB BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL +# INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING +# OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF JLAB HAS +# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# JLAB SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE. THE CLARA SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, +# PROVIDED HEREUNDER IS PROVIDED "AS IS". JLAB HAS NO OBLIGATION TO PROVIDE +# MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. +# +# This software was developed under the United States Government license. +# For more information contact author at gurjyan@jlab.org +# Department of Experimental Nuclear Physics, Jefferson Lab. + +BASEDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd) + +if [ -z "${CLARA_HOME}" ]; then + CLARA_HOME=${BASEDIR} + export CLARA_HOME +fi + +# find plugins directory +if [ -n "${CLARA_PLUGINS}" ]; then + if [ ! -d "${CLARA_PLUGINS}" ]; then + echo "Error: \$CLARA_PLUGINS is not a directory." + exit 1 + fi + plugins_dir="${CLARA_PLUGINS}" +else + plugins_dir="${CLARA_HOME}/plugins" +fi + +# set default classpath +if [ -z "${CLASSPATH}" ]; then + CLASSPATH="${CLARA_HOME}/lib/*:${CLARA_HOME}/plugins/clas12/lib/services/*" + if [ -z ${CLAS12DIR+x} ]; then + for plugin in "${plugins_dir}"/*/; do + plugin=${plugin%*/} + if [ "${plugin##*/}" = "clas12" ]; then # COAT has special needs + CLASSPATH+=":${plugin}/lib/clas/*:${plugin}/lib/services/*" + else + CLASSPATH+=":${plugin}/services/*:${plugin}/lib/*" + fi + done + else + CLASSPATH+=":$CLAS12DIR/lib/clas/*:$CLAS12DIR/lib/services/*" + fi + + CLASSPATH+=":${CLARA_HOME}/services/*" + export CLASSPATH +fi + +if [ -n "${JAVA_OPTS}" ]; then + jvm_options=(${JAVA_OPTS}) +else + jvm_options=(-Xms256m) +fi + +java_wrapper=${CLARA_HOME}/lib/clara/run-java + +exec "${java_wrapper}" "${jvm_options[@]}" org.jlab.clara.std.cli.ClaraShell "$@" diff --git a/release-validation-1/sim.py b/release-validation-1/sim.py index e06716d..c74b598 100755 --- a/release-validation-1/sim.py +++ b/release-validation-1/sim.py @@ -49,7 +49,7 @@ def split_lund(file_name, files): with open(file_name, "r") as text_file: lines = text_file.readlines() for line in lines: - if line.startswith(" "): + if line.startswith(" "): num_events += 1 out = 0 @@ -66,7 +66,7 @@ def split_lund(file_name, files): else: break - if line.startswith(" "): + if line.startswith(" "): tot += 1 num_e = int(re.findall(r'\d+', line)[0]) + 1 for x in range(num_e): @@ -75,21 +75,21 @@ def split_lund(file_name, files): def do_gemc(base): - cwd = os.getcwd() + base = os.getcwd() + "/" + base if base[0] != '/' else base with tempdir() as dir_temp: shutil.copy(base + ".dat", dir_temp + "/input.dat") with open(dir_temp + "/do_sim.sh", "w") as text_file: - text_file.write(r"""#!/bin/bash - source /jlab/2.2/ce/jlab.sh 2> /dev/null - - /jlab/clas12Tags/4a.2.4/source/gemc /jlab/workdir/clas12.gcard -USE_GUI=0 -OUTPUT="evio, /jlab/workdir/shared/out.evio" -INPUT_GEN_FILE="LUND, /jlab/workdir/shared/input.dat" - """) - - command = "docker run -v`pwd`:/jlab/workdir/shared --rm -it jeffersonlab/clas12tags:4a.2.4 bash /jlab/workdir/shared/do_sim.sh " + text_file.write("#!/bin/bash \n") + text_file.write("source /jlab/2.2/ce/jlab.sh \n") + text_file.write( + "/jlab/clas12Tags/4a.2.4/source/gemc /jlab/workdir/clas12.gcard -USE_GUI=0 -OUTPUT=\"evio, /jlab/workdir/shared/out.evio\" -INPUT_GEN_FILE=\"LUND, /jlab/workdir/shared/input.dat\" \n\n") + text_file.write("echo \"Gemc Exit Code: \" $? \n") + text_file.write("\n") + + command = "docker run -v`pwd`:/jlab/workdir/shared --rm -it jeffersonlab/clas12tags:4a.2.4 bash /jlab/workdir/shared/do_sim.sh" out = " 1>" + base + ".out" err = " 2>" + base + ".err" - command = command + err + out - exit_code = os.system(command + " && exit 0") + exit_code = os.system(command + out + err) shutil.copy(dir_temp + "/out.evio", base + ".evio") @@ -99,16 +99,25 @@ def main(): parser.add_argument('-c', dest='cores', type=int, nargs='?', help="Number of cores to use for simulation if not all the cores", default=0) parser.add_argument('-o', dest='output_dir', type=str, nargs='?', - help="Output directory for final files", default=os.getcwd()) + help="Output directory for final files", default='.') parser.add_argument('-i', dest='events', type=str, nargs='?', help="Input event file to run gemc over", default="11gev_sidis_500.dat") + parser.add_argument('-mc', dest='mc', action='store_true', + help="Use gemc MC to generate electrons in a sector") + parser.set_defaults(mc=False) + parser.add_argument('-E', dest='energy', type=float, nargs='?', + help="Energy for gemc MC to generate electrons at", default=4.5) + parser.add_argument('-T', dest='theta', type=float, nargs='?', + help="Theta angle for gemc MC to generate electrons at", default=20) + parser.add_argument('-P', dest='phi', type=float, nargs='?', + help="phi angle for gemc MC to generate electrons at", default=20) args = parser.parse_args() - if args.output_dir[-1] != '/': - args.output_dir = args.output_dir + '/' - if args.cores == 0 or args.cores > cpu_count(): - args.cores = cpu_count() + args.output_dir = args.output_dir + \ + '/' if args.output_dir[-1] != '/' else args.output_dir + + args.cores = cpu_count() if args.cores == 0 or args.cores > cpu_count() else args.cores files = make_names(args.output_dir, args.events, args.cores) split_lund(args.events, files) diff --git a/release-validation-1/src/Makefile b/release-validation-1/src/Makefile new file mode 100755 index 0000000..90fe57d --- /dev/null +++ b/release-validation-1/src/Makefile @@ -0,0 +1,21 @@ +ROOTLIBS = $(shell root-config --libs) +CXX = g++ +CXXFLAGS = -O3 -march=native -fPIC -w -g $(shell root-config --cflags) +TARGET = validate + +MAINS = histogram.cpp main.cpp +MAIN = $(MAINS:%.cpp=%.o) + +.PHONY: all clean + +all: $(TARGET) + +$(MAIN): %.o : %.cpp + $(CXX) $(CXXFLAGS) -c $< -o $@ + +$(TARGET): $(MAIN) + $(CXX) $(MAIN) $(CXXFLAGS) $(ROOTLIBS) -o $(TARGET) + + +clean: + -rm -f $(TARGET) $(MAIN) diff --git a/release-validation-1/src/colors.hpp b/release-validation-1/src/colors.hpp new file mode 100644 index 0000000..4938e7b --- /dev/null +++ b/release-validation-1/src/colors.hpp @@ -0,0 +1,22 @@ +#ifndef COLORS_H_GUARD +#define COLORS_H_GUARD + +#define RESET "\033[0m" +#define BLACK "\033[30m" /* Black */ +#define RED "\033[31m" /* Red */ +#define GREEN "\033[32m" /* Green */ +#define YELLOW "\033[33m" /* Yellow */ +#define BLUE "\033[34m" /* Blue */ +#define MAGENTA "\033[35m" /* Magenta */ +#define CYAN "\033[36m" /* Cyan */ +#define WHITE "\033[37m" /* White */ +#define BOLDBLACK "\033[1m\033[30m" /* Bold Black */ +#define BOLDRED "\033[1m\033[31m" /* Bold Red */ +#define BOLDGREEN "\033[1m\033[32m" /* Bold Green */ +#define BOLDYELLOW "\033[1m\033[33m" /* Bold Yellow */ +#define BOLDBLUE "\033[1m\033[34m" /* Bold Blue */ +#define BOLDMAGENTA "\033[1m\033[35m" /* Bold Magenta */ +#define BOLDCYAN "\033[1m\033[36m" /* Bold Cyan */ +#define BOLDWHITE "\033[1m\033[37m" /* Bold White */ + +#endif diff --git a/release-validation-1/src/histogram.cpp b/release-validation-1/src/histogram.cpp new file mode 100644 index 0000000..eab9b90 --- /dev/null +++ b/release-validation-1/src/histogram.cpp @@ -0,0 +1,66 @@ +/**************************************/ +/* */ +/* Created by Nick Tyler */ +/* University Of South Carolina */ +/**************************************/ +#include "TCanvas.h" +#include "histogram.hpp" + +Histogram::Histogram() {} + +Histogram::~Histogram() {} + +void Histogram::Fill_Res(double _px, double _py, double _pz, double _P, double _mc_px, double _mc_py, double _mc_pz, + double _mc_P) { + momentum->Fill(_P); + momentum_x->Fill(_px); + momentum_y->Fill(_py); + momentum_z->Fill(_pz); + + mom_rvg_x->Fill(_mc_px, _px); + mom_rvg_y->Fill(_mc_py, _py); + mom_rvg_z->Fill(_mc_pz, _pz); + + resolution->Fill(_P - _mc_P); + resolution_x->Fill(_px - _mc_px); + resolution_y->Fill(_py - _mc_py); + resolution_z->Fill(_pz - _mc_pz); +} + +void Histogram::Write() { + TCanvas c1("c1"); + momentum->SetXTitle("momentum (GeV)"); + momentum->Write(); + momentum_x->SetXTitle("momentum (GeV)"); + momentum_x->Write(); + momentum_y->SetXTitle("momentum (GeV)"); + momentum_y->Write(); + momentum_z->SetXTitle("momentum (GeV)"); + momentum_z->Write(); + + mom_rvg_x->SetXTitle("Gen X (GeV)"); + mom_rvg_x->SetYTitle("Rec X (GeV)"); + mom_rvg_x->SetOption("COLZ"); + mom_rvg_x->Write(); + mom_rvg_y->SetXTitle("Gen Y (GeV)"); + mom_rvg_y->SetYTitle("Rec Y (GeV)"); + mom_rvg_y->SetOption("COLZ"); + mom_rvg_y->Write(); + mom_rvg_z->SetXTitle("Gen Z (GeV)"); + mom_rvg_z->SetYTitle("Rec Z (GeV)"); + mom_rvg_z->SetOption("COLZ"); + mom_rvg_z->Write(); + + resolution->SetXTitle("momentum (GeV)"); + resolution->Fit("gaus", "QM+"); + resolution->Write(); + resolution_x->SetXTitle("momentum (GeV)"); + resolution_x->Fit("gaus", "QM+"); + resolution_x->Write(); + resolution_y->SetXTitle("momentum (GeV)"); + resolution_y->Fit("gaus", "QM+"); + resolution_y->Write(); + resolution_z->SetXTitle("momentum (GeV)"); + resolution_z->Fit("gaus", "QM+"); + resolution_z->Write(); +} diff --git a/release-validation-1/src/histogram.hpp b/release-validation-1/src/histogram.hpp new file mode 100644 index 0000000..a93771a --- /dev/null +++ b/release-validation-1/src/histogram.hpp @@ -0,0 +1,54 @@ +/************************************************************************/ +/* Created by Nick Tyler*/ +/* University Of South Carolina*/ +/************************************************************************/ + +#ifndef HIST_H_GUARD +#define HIST_H_GUARD +#include "TF1.h" +#include "TH1.h" +#include "TH2.h" + +class Histogram { +private: + int bins = 600; + double p_min = -6.0; + double p_max = 12.0; + + TH1D *momentum = + new TH1D("ReconMom", "Reconstructed Momentum", bins, p_min, p_max); + TH1D *momentum_x = + new TH1D("ReconMom_x", "Reconstructed Momentum in x", bins, p_min, p_max); + TH1D *momentum_y = + new TH1D("ReconMom_y", "Reconstructed Momentum in y", bins, p_min, p_max); + TH1D *momentum_z = + new TH1D("ReconMom_z", "Reconstructed Momentum in z", bins, p_min, p_max); + + TH2D *mom_rvg_x = + new TH2D("Recon_vs_gen_X", "Momentum X", bins, p_min, + p_max, bins, p_min, p_max); + TH2D *mom_rvg_y = + new TH2D("Recon_vs_gen_Y", "Momentum Y", bins, p_min, + p_max, bins, p_min, p_max); + TH2D *mom_rvg_z = + new TH2D("Recon_vs_gen_Z", "Momentum Z", bins, p_min, + p_max, bins, p_min, p_max); + + TH1D *resolution = new TH1D("MomRes", "Momentum Resolution", 50, -2.5, 2.5); + TH1D *resolution_x = + new TH1D("MomRes_x", "Momentum Resolution in x", 50, -1.0, 1.0); + TH1D *resolution_y = + new TH1D("MomRes_y", "Momentum Resolution in y", 50, -1.0, 1.0); + TH1D *resolution_z = + new TH1D("MomRes_z", "Momentum Resolution in z", 50, -1.0, 1.0); + +public: + Histogram(); + ~Histogram(); + + void Fill_Res(double px, double py, double pz, double P, double mc_px, + double mc_py, double mc_pz, double mc_P); + void Write(); +}; + +#endif diff --git a/release-validation-1/src/main.cpp b/release-validation-1/src/main.cpp new file mode 100644 index 0000000..758abf5 --- /dev/null +++ b/release-validation-1/src/main.cpp @@ -0,0 +1,30 @@ +/************************************************************************/ +/* Created by Nick Tyler*/ +/* University Of South Carolina*/ +/************************************************************************/ + +// Only My Includes. All others in main.h +#include "colors.hpp" +#include "main.hpp" + +using namespace std; + +int main(int argc, char **argv) { + if (argc == 2) { + std::string infilename = argv[1]; + datahandeler(infilename, "out.root"); + } else if (argc == 3) { + std::string infilename = argv[1]; + std::string outfilename = argv[2]; + datahandeler(infilename, outfilename); + std::cerr << RESET << std::endl; + } else { + std::cerr << RED << "Error: \n"; + std::cerr << BOLDRED << "\tNeed input file and output file\n"; + std::cerr << RESET << "Usage:\n\t"; + std::cerr << BOLDWHITE << argv[0] << " infile.root outfile.root\n\n"; + std::cerr << RESET << std::endl; + } + + return 0; +} diff --git a/release-validation-1/src/main.hpp b/release-validation-1/src/main.hpp new file mode 100644 index 0000000..6cbdd32 --- /dev/null +++ b/release-validation-1/src/main.hpp @@ -0,0 +1,98 @@ +/************************************************************************/ +/* Created by Nick Tyler*/ +/* University Of South Carolina*/ +/************************************************************************/ + +#ifndef MAIN_H_GUARD +#define MAIN_H_GUARD +#include +#include +#include "TChain.h" +#include "histogram.hpp" + +std::vector *pid; +std::vector *px; +std::vector *py; +std::vector *pz; +std::vector *vx; +std::vector *vy; +std::vector *vz; + +std::vector *mc_pid; +std::vector *mc_px; +std::vector *mc_py; +std::vector *mc_pz; +std::vector *mc_vx; +std::vector *mc_vy; +std::vector *mc_vz; + +namespace filehandeler { +void getBranches(TTree *myTree) { + myTree->SetBranchAddress("REC_Particle_pid", &pid); + myTree->SetBranchAddress("REC_Particle_px", &px); + myTree->SetBranchAddress("REC_Particle_py", &py); + myTree->SetBranchAddress("REC_Particle_pz", &pz); + myTree->SetBranchAddress("REC_Particle_vx", &vx); + myTree->SetBranchAddress("REC_Particle_vy", &vy); + myTree->SetBranchAddress("REC_Particle_vz", &vz); + + myTree->SetBranchAddress("MC_Particle_pid", &mc_pid); + myTree->SetBranchAddress("MC_Particle_px", &mc_px); + myTree->SetBranchAddress("MC_Particle_py", &mc_py); + myTree->SetBranchAddress("MC_Particle_pz", &mc_pz); + myTree->SetBranchAddress("MC_Particle_vx", &mc_vx); + myTree->SetBranchAddress("MC_Particle_vy", &mc_vy); + myTree->SetBranchAddress("MC_Particle_vz", &mc_vz); + + myTree->SetBranchStatus("*", 1); +} + +TChain *addFiles(std::string fin) { + TChain *clas12 = new TChain("clas12", "clas12"); + clas12->Add(fin.c_str()); + return clas12; +} +} // namespace filehandeler + +void datahandeler(std::string fin, std::string fout) { + TFile *out = new TFile(fout.c_str(), "RECREATE"); + double event_P, mc_P, per; + int total = 0; + + // Load chain from branch h10 + TChain *chain = filehandeler::addFiles(fin); + filehandeler::getBranches(chain); + + int num_of_events = (int)chain->GetEntries(); + Histogram *hist = new Histogram(); + + for (int current_event = 0; current_event < num_of_events; current_event++) { + chain->GetEntry(current_event); + if (pid->size() == 0) continue; + + per = ((1 + (double)current_event) / (double)num_of_events); + std::cerr << "\t\t" << std::floor(100 * per) << "%\r\r" << std::flush; + try { + for (int index = 0; index < pid->size(); index++) { + event_P = TMath::Sqrt((px->at(index) * px->at(index)) + (py->at(index) * py->at(index)) + + (pz->at(index) * pz->at(index))); + mc_P = TMath::Sqrt((mc_px->at(index) * mc_px->at(index)) + (mc_py->at(index) * mc_py->at(index)) + + (mc_pz->at(index) * mc_pz->at(index))); + hist->Fill_Res(px->at(index), py->at(index), pz->at(index), event_P, mc_px->at(index), mc_py->at(index), + mc_pz->at(index), mc_P); + } + } catch (std::exception &e) { + total++; + continue; + } + } + + out->cd(); + hist->Write(); + out->Close(); + chain->Reset(); + + if (total > 0) std::cout << RED << "Errors: " << total << RESET << std::endl; +} + +#endif diff --git a/release-validation-1/validate.sh b/release-validation-1/validate.sh index 73bb30f..2456761 100755 --- a/release-validation-1/validate.sh +++ b/release-validation-1/validate.sh @@ -1,19 +1,23 @@ #!/usr/bin/env bash mkdir -p validate -python sim.py -o $PWD/validate 2> /dev/null 1> /dev/null +python sim.py -o validate -evio2hipo out.hipo validate/*.evio +echo "evio2hipo" +cd validate +evio2hipo -r 11 -t -1.0 -s -1.0 -o out.hipo *.evio -echo "out.hipo" validate/files.list +echo "out.hipo" > files.list -echo "set inputDir $PWD/validate" > cook.clara +echo "set inputDir $PWD" > cook.clara echo "set outputDir $PWD" >> cook.clara echo "set threads $(nproc)" >> cook.clara echo "set javaMemory 4" >> cook.clara -echo "set fileList $PWD/validate/files.list" >> cook.clara +echo "set fileList $PWD/files.list" >> cook.clara echo "run local" >> cook.clara echo "exit" >> cook.clara -#clara-shell cook.clara +echo "CLARA" +../run-clara-validate cook.clara - -#mvn install && mvn exec:java -Dexec.mainClass="org.jlab.c12val.ParticleCounter" +cd .. +cp validate/out_out.hipo . +mvn install && mvn exec:java -Dexec.mainClass="org.jlab.c12val.ParticleCounter"