ProngCVNVars.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RecoBase/PID.h"
5 
6 namespace SliceLID
7 {
8 
9 const size_t N_CVN = 5;
10 
11 const int PDG_ELECTRON = 11;
12 const int PDG_MUON = 13;
13 const int PDG_PROTON = 2212;
14 const int PDG_PIPLUS = 211;
15 const int PDG_GAMMA = 22;
16 
17 const std::array<int, N_CVN> CVN_PNG_LIST({
19  PDG_MUON,
20  PDG_PROTON,
21  PDG_PIPLUS,
22  PDG_GAMMA,
23 });
24 
25 const std::unordered_map<int, std::string> PDG_TO_NAME_MAP({
26  { PDG_ELECTRON, "electronid" },
27  { PDG_MUON, "muonid" },
28  { PDG_PROTON, "protonid" },
29  { PDG_PIPLUS, "pionid" },
30  { PDG_GAMMA, "photonid" },
31 });
32 
33 
35 {
36 public:
37  std::vector<std::array<double, N_CVN>> cvnVars;
38 
39 protected:
40  static std::array<double, N_CVN> getFallbackCVNVars(
41  const BasicProngVars &pngVars, size_t pngIdx
42  );
43  static std::array<double, N_CVN> getCVNVars(
44  const art::FindManyP<rb::PID> &prongCVN_fmp,
45  const BasicProngVars &pngVars,
46  size_t pngIdx
47  );
48 
49  void init(const art::Event &evt, const BasicProngVars &pngVars);
50 
51 protected:
53 
54 public:
56  const art::Event &evt,
57  const BasicProngVars &pngVars,
58  const std::string &prongCVNLabel
59  );
60 
61  void saveToDict(
62  std::unordered_map<std::string, std::vector<double>> &dict,
63  const std::string &prefix
64  ) const;
65 };
66 
67 }
const std::unordered_map< int, std::string > PDG_TO_NAME_MAP({{PDG_ELECTRON,"electronid"},{PDG_MUON,"muonid"},{PDG_PROTON,"protonid"},{PDG_PIPLUS,"pionid"},{PDG_GAMMA,"photonid"},})
pdg code and pid value
const int PDG_PIPLUS
Definition: ProngCVNVars.h:14
void saveToDict(std::unordered_map< std::string, std::vector< double >> &dict, const std::string &prefix) const
const std::array< int, N_CVN > CVN_PNG_LIST({PDG_ELECTRON, PDG_MUON, PDG_PROTON, PDG_PIPLUS, PDG_GAMMA,})
const size_t N_CVN
Definition: ProngCVNVars.h:9
const int PDG_GAMMA
Definition: ProngCVNVars.h:15
int evt
const int PDG_MUON
Definition: ProngCVNVars.h:12
ProngCVNVars(const art::Event &evt, const BasicProngVars &pngVars, const std::string &prongCVNLabel)
static std::array< double, N_CVN > getCVNVars(const art::FindManyP< rb::PID > &prongCVN_fmp, const BasicProngVars &pngVars, size_t pngIdx)
const XML_Char * prefix
Definition: expat.h:380
const int PDG_PROTON
Definition: ProngCVNVars.h:13
std::vector< std::array< double, N_CVN > > cvnVars
Definition: ProngCVNVars.h:37
const int PDG_ELECTRON
Definition: ProngCVNVars.h:11
void init(const art::Event &evt, const BasicProngVars &pngVars)
static std::array< double, N_CVN > getFallbackCVNVars(const BasicProngVars &pngVars, size_t pngIdx)
std::string prongCVNLabel
Definition: ProngCVNVars.h:52
enum BeamMode string