6 #include "nusimdata/SimulationBase/MCTruth.h"
15 case 22:
return "#gamma";
16 case -11:
return "e^{+}";
17 case 11:
return "e^{-}";
18 case 13:
return "#mu";
19 case -15:
return "#bar{#tau}";
20 case 15:
return "#tau";
21 case -13:
return "#bar{#mu}";
22 case 12:
return "#nu_{e}";
23 case 14:
return "#nu_{#mu}";
24 case 16:
return "#nu_{#tau}";
25 case -12:
return "#bar{#nu}_{e}";
26 case -14:
return "#bar{#nu}_{#mu}";
27 case -16:
return "#bar{#nu}_{#tau}";
28 case 111:
return "#pi^{0}";
29 case 211:
return "#pi^{+}";
30 case -211:
return "#pi^{-}";;
31 case 221:
return "#eta";
32 case 331:
return "#eta'";
33 case 130:
return "K^{0}_{L}";
34 case 310:
return "K^{0}_{S}";
35 case 311:
return "K^{0}";
36 case -311:
return "#bar{K}^{0}";
37 case 321:
return "K^{+}";
38 case -321:
return "K^{-}";
39 case 2112:
return "n";
40 case 2212:
return "p";
41 case -2112:
return "#bar{n}";
42 case -2212:
return "#bar{p}";
43 case 2224:
return "#Delta^{++}";
44 case 3122:
return "#Lambda^{0}";
45 case 3222:
return "#Sigma^{+}";
46 case -3222:
return "#Sigma^{-}";
48 case 1000010020:
return "^{2}H";
49 case 1000010030:
return "^{3}H";
50 case 1000020030:
return "^{3}He";
51 case 1000020040:
return "^{4}He";
52 case 1000040070:
return "^{7}Be";
53 case 1000040080:
return "^{8}Be";
54 case 1000040100:
return "^{10}Be";
55 case 1000050090:
return "^{9}B";
56 case 1000050100:
return "^{10}B";
57 case 1000050110:
return "^{11}B";
58 case 1000060100:
return "^{10}C";
59 case 1000060110:
return "^{11}C";
60 case 1000060120:
return "^{12}C";
61 case 1000060130:
return "^{13}C";
62 case 1000060140:
return "^{14}C";
63 case 1000070150:
return "^{15}N";
64 case 1000100220:
return "^{22}Ne";
65 case 1000140300:
return "^{30}Si";
66 case 1000150330:
return "^{33}P";
67 case 1000160340:
return "^{34}S";
68 case 1000160350:
return "^{35}S";
69 case 1000160360:
return "^{36}S";
70 case 1000170350:
return "^{35}Cl";
71 case 1000170360:
return "^{36}Cl";
72 case 1000170370:
return "^{37}Cl";
73 case 1000180380:
return "^{38}Ar";
74 case 1000180400:
return "^{40}Ar";
75 case 1000210480:
return "^{48}Sc";
76 case 1000260560:
return "^{56}Fe";
77 case 1000220480:
return "^{48}Ti";
78 case 1000080160:
return "^{16}O";
79 case 1000070140:
return "^{14}N";
80 case 1000110230:
return "^{23}Na";
81 case 1000130270:
return "^{27}Al";
82 case 1000140280:
return "^{28}Si";
83 case 1000200400:
return "^{40}Ca";
84 case 1000561370:
return "^{137}Ba";
87 sprintf(buf,
"X_{%d}", pdgcode);
94 std::string
sup(
const std::string&
a,
const std::string& b)
96 return a+
"<sup>"+b+
"</sup>";
100 std::string
sub(
const std::string&
a,
const std::string& b)
102 return a+
"<sub>"+b+
"</sub>";
106 std::string
bar(
const std::string&
x)
110 return "<span style=\\\"text-decoration:overline\\\">"+x+
"</span>";
114 std::string
nucl(
const std::string&
A,
const std::string& elem)
116 return "<sup>"+A+
"</sup>"+elem;
126 case 22:
return "γ";
127 case -11:
return sup(
"e",
"+");
128 case 11:
return sup(
"e",
"-");
129 case 13:
return "μ";
130 case -15:
return bar(
"τ");
131 case 15:
return "τ";
132 case -13:
return bar(
"μ");
133 case 12:
return sub(
"ν",
"e");
134 case 14:
return sub(
"ν",
"μ");
135 case 16:
return sub(
"ν",
"τ");
136 case -12:
return sub(
bar(
"ν"),
"e");
137 case -14:
return sub(
bar(
"ν"),
"μ");
138 case -16:
return sub(
bar(
"ν"),
"τ");
139 case 111:
return sup(
"π",
"0");
140 case 211:
return sup(
"π",
"+");
141 case -211:
return sup(
"π",
"-");
142 case 221:
return "η";
143 case 331:
return "η'";
144 case 130:
return sub(
sup(
"K",
"0"),
"L");
145 case 310:
return sub(
sup(
"K",
"0"),
"L");
146 case 311:
return sup(
"K",
"0");
147 case -311:
return sup(
bar(
"K"),
"0");
148 case 321:
return sup(
"K",
"+");
149 case -321:
return sup(
"K",
"-");
150 case 2112:
return "n";
151 case 2212:
return "p";
152 case -2112:
return bar(
"n");
153 case -2212:
return bar(
"p");
154 case 2224:
return sup(
"Δ",
"++");
155 case 3122:
return sup(
"Λ",
"0");
156 case 3222:
return sup(
"Σ",
"+");
157 case -3222:
return sup(
"Σ",
"-");
159 case 1000010020:
return nucl(
"2",
"H");
160 case 1000010030:
return nucl(
"3",
"H");
161 case 1000020030:
return nucl(
"3",
"He");
162 case 1000020040:
return nucl(
"4",
"He");
163 case 1000040070:
return nucl(
"7",
"Be");
164 case 1000040080:
return nucl(
"8",
"Be");
165 case 1000040100:
return nucl(
"10",
"Be");
166 case 1000050090:
return nucl(
"9",
"B");
167 case 1000050100:
return nucl(
"10",
"B");
168 case 1000050110:
return nucl(
"11",
"B");
169 case 1000060100:
return nucl(
"10",
"C");
170 case 1000060110:
return nucl(
"11",
"C");
171 case 1000060120:
return nucl(
"12",
"C");
172 case 1000060130:
return nucl(
"13",
"C");
173 case 1000060140:
return nucl(
"14",
"C");
174 case 1000070150:
return nucl(
"15",
"N");
175 case 1000100220:
return nucl(
"22",
"Ne");
176 case 1000140300:
return nucl(
"30",
"Si");
177 case 1000150330:
return nucl(
"33",
"P");
178 case 1000160340:
return nucl(
"34",
"S");
179 case 1000160350:
return nucl(
"35",
"S");
180 case 1000160360:
return nucl(
"36",
"S");
181 case 1000170350:
return nucl(
"35",
"Cl");
182 case 1000170360:
return nucl(
"36",
"Cl");
183 case 1000170370:
return nucl(
"37",
"Cl");
184 case 1000180380:
return nucl(
"38",
"Ar");
185 case 1000180400:
return nucl(
"40",
"Ar");
186 case 1000210480:
return nucl(
"48",
"Sc");
187 case 1000260560:
return nucl(
"56",
"Fe");
188 case 1000220480:
return nucl(
"48",
"Ti");
189 case 1000080160:
return nucl(
"16",
"O");
190 case 1000070140:
return nucl(
"14",
"N");
191 case 1000110230:
return nucl(
"23",
"Na");
192 case 1000130270:
return nucl(
"27",
"Al");
193 case 1000140280:
return nucl(
"28",
"Si");
194 case 1000200400:
return nucl(
"40",
"Ca");
195 case 1000561370:
return nucl(
"137",
"Ba");
253 std::string incoming;
254 std::string outgoing;
258 for(
int j = 0; j < truth.NParticles(); ++j){
259 const simb::MCParticle&
p = truth.GetParticle(j);
261 const unsigned int bufsize = 4096;
265 snprintf(buf, bufsize,
"%s [%.1f GeV/c]",
266 HTMLName(p.PdgCode()).c_str(), p.P());
269 snprintf(buf, bufsize,
"%s",
272 if(p.StatusCode() == 0){
273 if(!incoming.empty()) incoming +=
" + ";
276 if(p.StatusCode() == 1){
277 if(!outgoing.empty()) outgoing +=
" + ";
282 if(origin.empty() && incoming.empty())
return outgoing;
285 return origin+incoming+
" → "+outgoing+suffix;
std::string bar(const std::string &x)
resonant neutral current, nu p -> nu p pi0
resonant charged current, nubar p -> nubar p pi0
resonant charged current, nubar n -> nubar p pi-
resonant charged current, nu n -> l- n pi+
resonant charged current, nubar p -> l+ p pi-
process_name opflash particleana ie x
resonant neutral current, nu n -> nu p pi-
std::string HTMLName(int pdgcode)
HTML entities style.
charged current deep inelastic scatter
resonant neutral current, nu n -> nu n pi0
resonant charged current, nubar p -> nubar n pi+
charged current coherent pion
resonant neutral current, nu p -> nu p pi+
resonant charged current, nu n -> l- p pi0
resonant charged current, nubar n -> l+ n pi-
std::string ShortInteractionSuffix(int iType)
std::string to_string(WindowPattern const &pattern)
std::string MCTruthShortText(const simb::MCTruth &truth)
resonant charged current, nubar p -> l+ n pi0
resonant charged current, nubar n -> nubar n pi0
std::string nucl(const std::string &A, const std::string &elem)
neutral current quasi-elastic
charged current quasi-elastic
std::string sup(const std::string &a, const std::string &b)
std::string LatexName(int pdgcode)
Convert PDG code to a latex string (root-style)
resonant charged current, nu p -> l- p pi+
constexpr Point origin()
Returns a origin position with a point of the specified type.
std::string sub(const std::string &a, const std::string &b)
charged current deep inelastic scatter