diff --git a/Armory/HistPlotter.h b/Armory/HistPlotter.h index a0e21dc..10fa9c5 100644 --- a/Armory/HistPlotter.h +++ b/Armory/HistPlotter.h @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -23,7 +24,7 @@ class HistPlotter { private: long long barrier_count, barrier_limit; //meant to keep track of how often to call FillN() on histograms enum {TFILE, TMEMFILE} filetype; - std::unordered_map oMap; //!< Maps std::string to all TH1, TH2 objects in the class + std::map oMap; //!< Maps std::string to all TH1, TH2 objects in the class std::unordered_map cutsMap; //!< Maps std::string to TCutG objects held by the class std::set folderList; //!< List of all folder names used to nest objects std::unordered_map foldersForObjects; //!< Map that returns the folder corresponding to the object whose pointer is specified @@ -31,8 +32,8 @@ private: TMemFile *omfile=nullptr; //!< TFile pointer for the output memfile //Caches to permit FillN() calls - std::unordered_map> onedimcache; - std::unordered_map, std::vector>> twodimcache; + std::map> onedimcache; + std::map, std::vector>> twodimcache; inline void FillN_All_Histograms(); public: HistPlotter(std::string outfile, std::string type); diff --git a/TrackRecon.C b/TrackRecon.C index ef84c37..d08cf1b 100644 --- a/TrackRecon.C +++ b/TrackRecon.C @@ -166,18 +166,6 @@ void TrackRecon::Begin(TTree * /*tree*/) std::cout << "Dataset set to " << dataset << std::endl; std::cout << "source_vertex set to " << source_vertex << std::endl; - if (dataset == "17F" && reactiondata) - { - std::cout << "Setting up misc branch addresses for 17F reaction data analysis" << std::endl; - fChain->SetBranchAddress("miscMulti", &misc.multi, &b_miscMulti); - fChain->SetBranchAddress("miscID", &misc.id, &b_miscID); - fChain->SetBranchAddress("miscCh", &misc.ch, &b_miscCh); - fChain->SetBranchAddress("miscE", &misc.e, &b_miscE); - fChain->SetBranchAddress("miscT", &misc.t, &b_miscT); - fChain->SetBranchAddress("miscF", &misc.tf, &b_miscTf); - std::cout << "Misc branches set" << std::endl; - } - pwinstance.ConstructGeo(); for (int i = 0; i < 48; i++) diff --git a/TrackRecon.h b/TrackRecon.h index a3fac0d..0ef65c0 100644 --- a/TrackRecon.h +++ b/TrackRecon.h @@ -117,6 +117,12 @@ void TrackRecon::Init(TTree *tree) fChain->SetBranchAddress("pcCh", &pc.ch, &b_pcCh); fChain->SetBranchAddress("pcE", &pc.e, &b_pcE); fChain->SetBranchAddress("pcT", &pc.t, &b_pcT); + fChain->SetBranchAddress("miscMulti", &misc.multi, &b_miscMulti); + fChain->SetBranchAddress("miscID", &misc.id, &b_miscID); + fChain->SetBranchAddress("miscCh", &misc.ch, &b_miscCh); + fChain->SetBranchAddress("miscE", &misc.e, &b_miscE); + fChain->SetBranchAddress("miscT", &misc.t, &b_miscT); + fChain->SetBranchAddress("miscF", &misc.tf, &b_miscTf); } Bool_t TrackRecon::Notify() diff --git a/run_17F.sh b/run_17F.sh index 8f77f9f..ac22bea 100644 --- a/run_17F.sh +++ b/run_17F.sh @@ -17,14 +17,13 @@ function run_once() { file_exists=$(test -f ../ANASEN_analysis/data/17F_Data/Run_"$wrun"_mapped.root) if [[ $file_exists -ne 0 ]]; then continue; fi root -q -l -b -x ../ANASEN_analysis/data/17F_Data/Run_"$wrun"_mapped.root -e 'tree->Process("TrackRecon.C+O","Analyzer_17F.root")'; mv Analyzer_17F.root 17F_output/results_run$wrun.root; - mv analyzed_run$wrun.root results_run$wrun.root; } export -f run_once run_once 351 # parallel -j 6 --ctag run_once {1} ::: {350..400} rm output_17F.root -hadd -j 4 -k output_17F.root results_run3*.root +hadd -j 4 -k output_17F.root 17F_output/results_run3*.root unset souce_vertex unset DATASET