modified: Armory/HistPlotter.h changes to make histgrams plot in alphabetical order
modified: TrackRecon.C changes to maek the misc branches work modified: TrackRecon.h changes to maek the misc branches work modified: run_17F.sh
This commit is contained in:
parent
792933de25
commit
1fb12d2f46
|
|
@ -15,6 +15,7 @@
|
|||
#include <utility>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
#include <set>
|
||||
#include <TGraphErrors.h>
|
||||
|
|
@ -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<std::string,TObject*> oMap; //!< Maps std::string to all TH1, TH2 objects in the class
|
||||
std::map<std::string,TObject*> oMap; //!< Maps std::string to all TH1, TH2 objects in the class
|
||||
std::unordered_map<std::string,TObject*> cutsMap; //!< Maps std::string to TCutG objects held by the class
|
||||
std::set<std::string> folderList; //!< List of all folder names used to nest objects
|
||||
std::unordered_map<TObject*,std::string> 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<std::string, std::vector<double>> onedimcache;
|
||||
std::unordered_map<std::string, std::pair<std::vector<double>, std::vector<double>>> twodimcache;
|
||||
std::map<std::string, std::vector<double>> onedimcache;
|
||||
std::map<std::string, std::pair<std::vector<double>, std::vector<double>>> twodimcache;
|
||||
inline void FillN_All_Histograms();
|
||||
public:
|
||||
HistPlotter(std::string outfile, std::string type);
|
||||
|
|
|
|||
12
TrackRecon.C
12
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++)
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user