Skip to content

Commit

Permalink
Analysis: Physics: Move ProtonPi0 to checks as PIDEfficiencyCheck, #33
Browse files Browse the repository at this point in the history
  • Loading branch information
neiser committed Mar 19, 2017
1 parent 339ca57 commit 26a1e1a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
1 change: 1 addition & 0 deletions src/analysis/physics/check/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ add_ant_physics(MCGunCheck.cc)
add_ant_physics(ReconstructCheck.cc)
add_ant_physics(ThreePhotonCheck.cc)
add_ant_physics(MCClusteringCheck.cc)
add_ant_physics(PIDEfficiencyCheck.cc)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "ProtonPi0.h"
#include "PIDEfficiencyCheck.h"

#include "physics/Plotter.h"
#include "utils/uncertainties/Interpolated.h"
Expand All @@ -15,7 +15,7 @@ using namespace ant::analysis;
using namespace ant::analysis::physics;
using namespace ant::analysis::plot;

ProtonPi0::ProtonPi0(const string& name, OptionsPtr opts) :
PIDEfficiencyCheck::PIDEfficiencyCheck(const string& name, OptionsPtr opts) :
Physics(name, opts),
fitter("fitter", 2,
utils::UncertaintyModels::Interpolated::makeAndLoad(),
Expand All @@ -38,7 +38,7 @@ ProtonPi0::ProtonPi0(const string& name, OptionsPtr opts) :
h_Steps = HistFac.makeTH1D("Steps","","",BinSettings(10),"h_Steps");
}

void ProtonPi0::ProcessEvent(const TEvent& event, manager_t&)
void PIDEfficiencyCheck::ProcessEvent(const TEvent& event, manager_t&)
{
triggersimu.ProcessEvent(event);

Expand Down Expand Up @@ -153,7 +153,7 @@ void ProtonPi0::ProcessEvent(const TEvent& event, manager_t&)
}
}

void ProtonPi0::ShowResult()
void PIDEfficiencyCheck::ShowResult()
{
canvas(GetName())
<< h_Steps
Expand All @@ -166,7 +166,7 @@ void ProtonPi0::ShowResult()
}

struct Hist_t {
using Tree_t = ProtonPi0::Tree_t;
using Tree_t = PIDEfficiencyCheck::Tree_t;
struct Fill_t {
Fill_t(const Tree_t& t) : Tree(t) {}
const Tree_t& Tree;
Expand Down Expand Up @@ -252,17 +252,17 @@ struct Hist_t {
}
};

struct ProtonPi0_plot : Plotter {
struct PIDEfficiencyCheck_plot : Plotter {

Hist_t::Tree_t tree;

cuttree::Tree_t<Hist_t> mycuttree;

ProtonPi0_plot(const string& name, const WrapTFileInput& input, OptionsPtr opts) :
PIDEfficiencyCheck_plot(const string& name, const WrapTFileInput& input, OptionsPtr opts) :
Plotter(name, input, opts)
{
if(!input.GetObject("ProtonPi0/t", tree.Tree))
throw Exception("Cannot find tree ProtonPi0/t");
if(!input.GetObject("PIDEfficiencyCheck/t", tree.Tree))
throw Exception("Cannot find tree PIDEfficiencyCheck/t");
tree.LinkBranches();

mycuttree = cuttree::Make<Hist_t>(HistFac, "tree", Hist_t::GetCuts());
Expand All @@ -281,5 +281,5 @@ struct ProtonPi0_plot : Plotter {

};

AUTO_REGISTER_PHYSICS(ProtonPi0)
AUTO_REGISTER_PLOTTER(ProtonPi0_plot)
AUTO_REGISTER_PHYSICS(PIDEfficiencyCheck)
AUTO_REGISTER_PLOTTER(PIDEfficiencyCheck_plot)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace ant {
namespace analysis {
namespace physics {

class ProtonPi0 : public Physics {
class PIDEfficiencyCheck : public Physics {
public:
struct Tree_t : WrapTTree {
ADD_BRANCH_T(double, TaggW)
Expand Down Expand Up @@ -53,7 +53,7 @@ class ProtonPi0 : public Physics {
TH1D* h_Steps;

public:
ProtonPi0(const std::string& name, OptionsPtr opts);
PIDEfficiencyCheck(const std::string& name, OptionsPtr opts);

virtual void ProcessEvent(const TEvent& event, manager_t& manager) override;
virtual void ShowResult() override;
Expand Down
1 change: 0 additions & 1 deletion src/analysis/physics/pi0/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ add_ant_physics(DeltaPlusPhysics.cc)
add_ant_physics(DeltaTreeGenerator.cc)
add_ant_physics(JustPi0.cc)
add_ant_physics(RarePion.cc)
add_ant_physics(ProtonPi0.cc)

0 comments on commit 26a1e1a

Please sign in to comment.