51 std::cout <<
"DST node added" << std::endl;
60 baseName =
"reconstructedParticles";
70 std::map<std::string, std::string> forbiddenStrings;
71 forbiddenStrings[
"/"] = undrscr;
72 forbiddenStrings[
"("] = undrscr;
73 forbiddenStrings[
")"] = nothing;
74 forbiddenStrings[
"+"] =
"plus";
75 forbiddenStrings[
"-"] =
"minus";
76 forbiddenStrings[
"*"] =
"star";
77 for (
auto const& [badString, goodString] : forbiddenStrings)
80 while ((pos = baseName.find(badString)) != std::string::npos)
82 baseName.replace(pos, 1, goodString);
86 trackNodeName = baseName +
"_SvtxTrackMap";
87 particleNodeName = baseName +
"_KFParticle_Container";
94 std::cout << trackNodeName <<
" node added" << std::endl;
101 lowerNode->
addNode(particleNode);
102 std::cout << particleNodeName <<
" node added" << std::endl;
107 std::cout <<
"You have asked to put your selection on the node tree but disabled both the SvtxTrackMap and KFParticle_Container\n";
108 std::cout <<
"Check your options" << std::endl;
116 const std::vector<KFParticle>& daughters,
117 const std::vector<KFParticle>& intermediates)
130 std::vector<KFParticle> daughters,
131 std::vector<KFParticle> intermediates)
138 baseName =
"reconstructedParticles";
148 std::map<std::string, std::string> forbiddenStrings;
149 forbiddenStrings[
"/"] = undrscr;
150 forbiddenStrings[
"("] = undrscr;
151 forbiddenStrings[
")"] = nothing;
152 forbiddenStrings[
"+"] =
"plus";
153 forbiddenStrings[
"-"] =
"minus";
154 forbiddenStrings[
"*"] =
"star";
155 for (
auto const& [badString, goodString] : forbiddenStrings)
158 while ((pos = baseName.find(badString)) != std::string::npos)
160 baseName.replace(pos, 1, goodString);
164 trackNodeName = baseName +
"_SvtxTrackMap";
166 m_recoTrackMap = findNode::getClass<SvtxTrackMap>(topNode, trackNodeName.c_str());
172 m_recoTrack->
Reset();
176 KFParticle* intermediateArray = &intermediates[0];
178 for (
unsigned int k = 0;
k < intermediates.size(); ++
k)
182 m_recoTrack->
Reset();
186 SvtxTrackMap* originalTrackMap = findNode::getClass<SvtxTrackMap>(topNode,
"SvtxTrackMap");
189 for (
unsigned int k = 0;
k < daughters.size(); ++
k)
191 if (originalTrackMap->
size() == 0)
193 std::cout <<
"There was no original track map found, the tracks will have no cluster information!" << std::endl;
198 m_recoTrack = kfpTruthTools_DST.
getTrack(daughterArray[
k].
Id(), originalTrackMap);
206 std::vector<KFParticle> daughters,
207 std::vector<KFParticle> intermediates)
214 baseName =
"reconstructedParticles";
224 std::map<std::string, std::string> forbiddenStrings;
225 forbiddenStrings[
"/"] = undrscr;
226 forbiddenStrings[
"("] = undrscr;
227 forbiddenStrings[
")"] = nothing;
228 forbiddenStrings[
"+"] =
"plus";
229 forbiddenStrings[
"-"] =
"minus";
230 forbiddenStrings[
"*"] =
"star";
231 for (
auto const& [badString, goodString] : forbiddenStrings)
234 while ((pos = baseName.find(badString)) != std::string::npos)
236 baseName.replace(pos, 1, goodString);
240 particleNodeName = baseName +
"_KFParticle_Container";
242 m_recoParticleMap = findNode::getClass<KFParticle_Container>(topNode, particleNodeName.c_str());
248 KFParticle* intermediateArray = &intermediates[0];
250 for (
unsigned int k = 0;
k < intermediates.size(); ++
k)
257 for (
unsigned int k = 0;
k < daughters.size(); ++
k)
280 for (
int i = 0;
i < 6; ++
i)
282 for (
int j = 0;
j < 6; ++
j)
299 baseName =
"reconstructedParticles";
309 std::map<std::string, std::string> forbiddenStrings;
310 forbiddenStrings[
"/"] = undrscr;
311 forbiddenStrings[
"("] = undrscr;
312 forbiddenStrings[
")"] = nothing;
313 forbiddenStrings[
"+"] =
"plus";
314 forbiddenStrings[
"-"] =
"minus";
315 forbiddenStrings[
"*"] =
"star";
316 for (
auto const& [badString, goodString] : forbiddenStrings)
319 while ((pos = baseName.find(badString)) != std::string::npos)
321 baseName.replace(pos, 1, goodString);
327 trackNodeName = baseName +
"_SvtxTrackMap";
328 std::cout <<
"----------------";
329 std::cout <<
" KFParticle_DST: " << trackNodeName <<
" information ";
330 std::cout <<
"----------------" << std::endl;
331 SvtxTrackMap* trackmap = findNode::getClass<SvtxTrackMap>(topNode, trackNodeName.c_str());
332 for (
auto& iter : *trackmap)
337 std::cout <<
"--------------------------------------------------------------------------------------------------" << std::endl;
342 particleNodeName = baseName +
"_KFParticle_Container";
343 std::cout <<
"----------------";
344 std::cout <<
" KFParticle_DST: " << particleNodeName <<
" information ";
345 std::cout <<
"----------------" << std::endl;
346 KFParticle_Container* particlemap = findNode::getClass<KFParticle_Container>(topNode, particleNodeName.c_str());
347 for (
auto& iter : *particlemap)
350 kfpTupleTools_DST.
identify(*particle);
352 std::cout <<
"--------------------------------------------------------------------------------------------------" << std::endl;