EventRecoEVarExtractor.cxx
Go to the documentation of this file.
2 
4 
5 namespace VLN {
6 
7 static const std::vector<std::string> SCALAR_VARS({
8  "nuE", "lepE", "hadE", "longestTrackContained"
9 });
10 
11 static const std::vector<std::string> VECTOR_VARS({});
12 
14  const std::string &prefix, const std::string &labelRecoE
15 )
17  labelRecoE(labelRecoE)
18 { }
19 
21 {
22  auto recoE_h = evt.getHandle<dune::EnergyRecoOutput>(labelRecoE);
23 
24  if (recoE_h.failedToGet()) {
25  return;
26  }
27 
28  setScalarVar(vars, "nuE", recoE_h->fNuLorentzVector.E());
29  setScalarVar(vars, "lepE", recoE_h->fLepLorentzVector.E());
30  setScalarVar(vars, "hadE", recoE_h->fHadLorentzVector.E());
32  vars, "longestTrackContained", recoE_h->longestTrackContained
33  );
34 }
35 
36 }
37 
static const std::vector< std::string > VECTOR_VARS({})
EventRecoEVarExtractor(const std::string &prefix, const std::string &labelRecoE)
void extractVars(const art::Event &evt, VarDict &vars) override
Handle< PROD > getHandle(SelectorBase const &) const
Definition: DataViewImpl.h:382
std::string string
Definition: nybbler.cc:12
Definition: VarDict.h:8
static const std::vector< std::string > SCALAR_VARS({"run","subRun","event"})
Definition: utils.cxx:6
void setScalarVar(VarDict &vars, const std::string &name, double value) const
TCEvent evt
Definition: DataStructs.cxx:7