23 TH1F* h_h_p, TH1F* h_s_p, TH1F* h_c_p,
24 TH1F* h_h_l, TH1F* h_s_l, TH1F* h_c_l,
25 TH1F* h_h_t, TH1F* h_s_t, TH1F* h_c_t,
26 const unsigned int n_opdet,
31 fTree->SetName(
"ctree");
40 fHypHist_p->SetBins(n_opdet,-0.5,(
float)n_opdet - 0.5);
41 fSimHist_p->SetBins(n_opdet,-0.5,(
float)n_opdet - 0.5);
44 fHypHist_p->SetNameTitle(
"hHypHist_p",
"Hypothesis (Prompt);Opdet;PEs");
45 fSimHist_p->SetNameTitle(
"hSimHist_p",
"SimPhoton (Prompt);Opdet;PEs");
46 fCompareHist_p->SetNameTitle(
"hCompareHist_p",
"Comparison (Hyp - Sim) (Prompt);Opdet;PEs");
74 fHypHist_l->SetBins(n_opdet,-0.5,(
float)n_opdet - 0.5);
75 fSimHist_l->SetBins(n_opdet,-0.5,(
float)n_opdet - 0.5);
78 fHypHist_l->SetNameTitle(
"hHypHist_l",
"Hypothesis (Late);Opdet;PEs");
79 fSimHist_l->SetNameTitle(
"hSimHist_l",
"SimPhoton (Late);Opdet;PEs");
80 fCompareHist_l->SetNameTitle(
"hCompareHist_l",
"Comparison (Hyp - Sim) (Late);Opdet;PEs");
108 fHypHist_t->SetBins(n_opdet,-0.5,(
float)n_opdet - 0.5);
109 fSimHist_t->SetBins(n_opdet,-0.5,(
float)n_opdet - 0.5);
112 fHypHist_t->SetNameTitle(
"hHypHist_t",
"Hypothesis (Total);Opdet;PEs");
113 fSimHist_t->SetNameTitle(
"hSimHist_t",
"SimPhoton (Total);Opdet;PEs");
114 fCompareHist_t->SetNameTitle(
"hCompareHist_t",
"Comparison (Hyp - Sim) (Total);Opdet;PEs");
140 const unsigned int event,
143 const std::vector<float>& posY,
144 const std::vector<float>& posZ)
146 if(fhc.
GetVectorSize() != (
unsigned int)fHypHist_p->GetNbinsX() ||
150 std::cout << (
unsigned int)fHypHist_p->GetNbinsX() <<
" " << spc.
PromptPhotonVector().size() <<
" " << posY.size() <<
" " << posZ.size() << std::endl;
151 throw std::runtime_error(
"ERROR in FlashHypothesisComparison: Mismatch in vector sizes.");
156 FillFlashHypothesisInfo(fhc,posY,posZ);
157 FillSimPhotonCounterInfo(spc,posY,posZ);
158 FillComparisonInfo(fhc,spc);
160 if(fFillTree) fTree->Fill();
164 const std::vector<float>& posY,
165 const std::vector<float>& posZ)
193 const std::vector<float>& posY,
194 const std::vector<float>& posZ)
210 fSimPEs_t = fSimPEs_p+fSimPEs_l;
222 std::vector<float> result_p,result_l,result_t;
227 for(
size_t i=0; i<result_p.size(); i++){
228 fCompareHist_p->SetBinContent(i+1,result_p[i]);
229 fCompareHist_l->SetBinContent(i+1,result_l[i]);
230 fCompareHist_t->SetBinContent(i+1,result_t[i]);
Class def header for a class FlashHypothesis.
void FillSimPhotonCounterInfo(const SimPhotonCounter &, const std::vector< float > &, const std::vector< float > &)
float GetTotalPEsError() const
const FlashHypothesis & GetLateHypothesis() const
const std::vector< float > & PromptPhotonVector() const
void FillComparisonInfo(const FlashHypothesisCollection &, const SimPhotonCounter &)
float GetTotalPEs() const
std::vector< float > TotalPhotonVector() const
void fill(const art::PtrVector< recob::Hit > &hits, int only_plane)
const FlashHypothesis & GetPromptHypothesis() const
void SetOutputObjects(TTree *, TH1F *, TH1F *, TH1F *, TH1F *, TH1F *, TH1F *, TH1F *, TH1F *, TH1F *, const unsigned int, bool fill=true)
const std::vector< float > & LatePhotonVector() const
float const & GetHypothesis(size_t i_opdet) const
float PromptPhotonTotal() const
void RunComparison(const unsigned int, const unsigned int, const FlashHypothesisCollection &, const SimPhotonCounter &, const std::vector< float > &, const std::vector< float > &)
const FlashHypothesis & GetTotalHypothesis() const
void FillFlashHypothesisInfo(const FlashHypothesisCollection &, const std::vector< float > &, const std::vector< float > &)
size_t GetVectorSize() const
size_t GetVectorSize() const
std::vector< float > const & GetHypothesisVector() const
BEGIN_PROLOG could also be cout
float LatePhotonTotal() const