Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
ElectronInitialRegionRefinementAlgorithm.cc
Go to the documentation of this file.
1
10
12
19
26
27using namespace pandora;
28
29namespace lar_content
30{
31
33 m_minShowerHits3D(50),
34 m_showerSlidingFitWindow(1000),
35 m_maxCoincidenceTransverseSeparation(5.f),
36 m_minSpinePurity(0.7f),
37 m_trainingMode(false),
38 m_trainingFileName("ConnectionPathwayTrain.txt"),
39 m_unambiguousThreshold(0.5f),
40 m_maxConnectionDistance(1.f),
41 m_minNConnectedHits(2),
42 m_minElectronCompleteness(0.33f),
43 m_minElectronPurity(0.5f),
44 m_maxSeparationFromHit(3.f),
45 m_maxProjectionSeparation(5.f),
46 m_maxXSeparation(0.5f)
47{
48}
49
50//------------------------------------------------------------------------------------------------------------------------------------------
51
53{
54 PfoVector showerPfoVector;
55 this->FillShowerPfoVector(showerPfoVector);
56
57 if (showerPfoVector.empty())
58 return STATUS_CODE_SUCCESS;
59
60 for (const ParticleFlowObject *const pShowerPfo : showerPfoVector)
61 {
62 // Only consider significant showers
63 CaloHitList caloHits3D;
64 LArPfoHelper::GetCaloHits(pShowerPfo, TPC_3D, caloHits3D);
65
66 if (caloHits3D.size() < m_minShowerHits3D)
67 continue;
68
69 this->RefineShower(pShowerPfo);
70 }
71
72 return STATUS_CODE_SUCCESS;
73}
74
75//------------------------------------------------------------------------------------------------------------------------------------------
76
78{
79 const PfoList *pPfoList(nullptr);
80
81 if (PandoraContentApi::GetList(*this, m_showerPfoListName, pPfoList) != STATUS_CODE_SUCCESS)
82 return;
83
84 if (!pPfoList || pPfoList->empty())
85 {
86 std::cout << "ElectronInitialRegionRefinementAlgorithm: unable to find shower pfo list " << m_showerPfoListName << std::endl;
87 return;
88 }
89
90 showerPfoVector.insert(showerPfoVector.begin(), pPfoList->begin(), pPfoList->end());
91
92 std::sort(showerPfoVector.begin(), showerPfoVector.end(), LArPfoHelper::SortByNHits);
93}
94
95//------------------------------------------------------------------------------------------------------------------------------------------
96
98{
99 CartesianVector nuVertex3D(0.f, 0.f, 0.f);
100
101 if (this->GetNeutrinoVertex(nuVertex3D) != STATUS_CODE_SUCCESS)
102 return;
103
104 // Create the 2D connetion pathways
105 ProtoShowerVector protoShowerVectorU, protoShowerVectorV, protoShowerVectorW;
106
107 this->BuildViewProtoShowers(pShowerPfo, nuVertex3D, TPC_VIEW_U, protoShowerVectorU);
108 this->BuildViewProtoShowers(pShowerPfo, nuVertex3D, TPC_VIEW_V, protoShowerVectorV);
109 this->BuildViewProtoShowers(pShowerPfo, nuVertex3D, TPC_VIEW_W, protoShowerVectorW);
110
111 // 2D->3D connection pathway matching
112 ProtoShowerMatchVector protoShowerMatchVector;
113 m_pProtoShowerMatchingTool->Run(protoShowerVectorU, protoShowerVectorV, protoShowerVectorW, protoShowerMatchVector);
114
115 if (protoShowerMatchVector.empty())
116 return;
117
118 for (ProtoShowerMatch &protoShowerMatch : protoShowerMatchVector)
119 {
120 // Remove ambiguous hits from hits to add list
121 ConnectionPathwayVector viewPathwaysU, viewPathwaysV, viewPathwaysW;
122
123 this->BuildViewPathways(pShowerPfo, protoShowerMatch.GetProtoShowerU().GetSpineHitList(), nuVertex3D, TPC_VIEW_U, viewPathwaysU);
124 this->BuildViewPathways(pShowerPfo, protoShowerMatch.GetProtoShowerV().GetSpineHitList(), nuVertex3D, TPC_VIEW_V, viewPathwaysV);
125 this->BuildViewPathways(pShowerPfo, protoShowerMatch.GetProtoShowerW().GetSpineHitList(), nuVertex3D, TPC_VIEW_W, viewPathwaysW);
126
127 this->RefineHitsToAdd(nuVertex3D, TPC_VIEW_U, viewPathwaysU, protoShowerMatch.GetProtoShowerToModify(TPC_VIEW_U));
128 this->RefineHitsToAdd(nuVertex3D, TPC_VIEW_V, viewPathwaysV, protoShowerMatch.GetProtoShowerToModify(TPC_VIEW_V));
129 this->RefineHitsToAdd(nuVertex3D, TPC_VIEW_W, viewPathwaysW, protoShowerMatch.GetProtoShowerToModify(TPC_VIEW_W));
130
131 // Determine the 3D shower vertex
132 CartesianPointVector showerStarts3D;
133 if (!LArConnectionPathwayHelper::FindShowerStarts3D(this, pShowerPfo, protoShowerMatch, nuVertex3D, m_maxSeparationFromHit,
135 {
136 continue;
137 }
138
139 // Fill BDT information
140 StringVector featureOrder;
142 m_algorithmToolNames, m_featureToolMap, featureOrder, this, pShowerPfo, nuVertex3D, protoShowerMatch, showerStarts3D));
143
144 this->SetMetadata(pShowerPfo, featureMap);
145
146 if (m_trainingMode)
147 {
148 // To truth match electrons
149 HitOwnershipMap electronHitMap;
150 this->FillElectronHitMap(electronHitMap);
151
152 if (this->IsElectron(pShowerPfo, electronHitMap))
153 {
154 LArMvaHelper::ProduceTrainingExample(m_trainingFileName, true, featureOrder, featureMap);
155 break;
156 }
157
158 LArMvaHelper::ProduceTrainingExample(m_trainingFileName, false, featureOrder, featureMap);
159
160 break;
161 }
162 }
163}
164
165//------------------------------------------------------------------------------------------------------------------------------------------
166
168{
169 const VertexList *pNuVertexList(nullptr);
170 const StatusCode statusCode(PandoraContentApi::GetList(*this, m_neutrinoVertexListName, pNuVertexList));
171
172 if (statusCode != STATUS_CODE_SUCCESS)
173 return statusCode;
174
175 if (!pNuVertexList || (pNuVertexList->size() != 1))
176 {
178 std::cout << "ElectronInitialRegionRefinementAlgorithm: unable to find vertex list " << m_neutrinoVertexListName
179 << " if it does exist, it may have more than one nu vertex" << std::endl;
180
181 return STATUS_CODE_NOT_INITIALIZED;
182 }
183
184 nuVertex3D = pNuVertexList->front()->GetPosition();
185
186 return STATUS_CODE_SUCCESS;
187}
188
189//------------------------------------------------------------------------------------------------------------------------------------------
190
192 const CartesianVector &nuVertex3D, HitType hitType, ProtoShowerVector &protoShowerVector) const
193{
194 const CaloHitList *pViewHitList(nullptr);
195
196 if (this->GetHitListOfType(hitType, pViewHitList) != STATUS_CODE_SUCCESS)
197 return;
198
199 CartesianVector showerVertexPosition(0.f, 0.f, 0.f);
200 try
201 {
202 showerVertexPosition = this->GetShowerVertex(pShowerPfo, hitType, nuVertex3D);
203 }
204 catch (...)
205 {
206 return;
207 }
208
209 // Determine directions of pathways out of neutrino vertex
210 CartesianPointVector peakDirectionVector;
211 if (m_pShowerPeakDirectionFinderTool->Run(pShowerPfo, nuVertex3D, pViewHitList, hitType, peakDirectionVector) != STATUS_CODE_SUCCESS)
212 return;
213
214 // Investigate each direction
215 CaloHitList unavailableHitList;
216 for (CartesianVector &peakDirection : peakDirectionVector)
217 {
218 // Collect the hits associated with the pathway (the shower spine)
219 CaloHitList showerSpineHitList;
220 if (m_pShowerSpineFinderTool->Run(nuVertex3D, pViewHitList, hitType, peakDirection, unavailableHitList, showerSpineHitList) != STATUS_CODE_SUCCESS)
221 continue;
222
223 this->RefineShowerVertex(pShowerPfo, hitType, nuVertex3D, peakDirection, showerVertexPosition);
224
225 // Quality check: If the spine passes the shower vertex, does it live inside the shower?
226 if (!this->IsSpineCoincident(pShowerPfo, nuVertex3D, hitType, showerVertexPosition, showerSpineHitList))
227 continue;
228
229 // Find the 2D shower start position
230 CartesianVector showerStartPosition(0.f, 0.f, 0.f);
231 CartesianVector showerStartDirection(0.f, 0.f, 0.f);
232
233 if (m_pShowerStartFinderTool->Run(pShowerPfo, peakDirection, hitType, showerSpineHitList, showerStartPosition, showerStartDirection) != STATUS_CODE_SUCCESS)
234 continue;
235
236 // Create the ProtoShower object
237 const CartesianVector nuVertex2D(LArGeometryHelper::ProjectPosition(this->GetPandora(), nuVertex3D, hitType));
238
239 ProtoShower protoShower(ShowerCore(showerStartPosition, showerStartDirection), ConnectionPathway(nuVertex2D, peakDirection),
240 showerSpineHitList, CaloHitList(), CartesianPointVector(), CaloHitList());
241
242 // Now determine the hits to be added to the shower from the found spine
243 CaloHitList viewShowerHitList;
244 LArPfoHelper::GetCaloHits(pShowerPfo, hitType, viewShowerHitList);
245
246 const float showerVertexL(std::max(
247 peakDirection.GetDotProduct(showerStartPosition - nuVertex2D), peakDirection.GetDotProduct(showerVertexPosition - nuVertex2D)));
248
249 for (const CaloHit *const pCaloHit : showerSpineHitList)
250 {
251 if (std::find(viewShowerHitList.begin(), viewShowerHitList.end(), pCaloHit) != viewShowerHitList.end())
252 continue;
253
254 const CartesianVector &hitPosition(pCaloHit->GetPositionVector());
255 const float showerL(peakDirection.GetDotProduct(hitPosition - nuVertex2D));
256
257 if ((showerL > 0.f) && (showerL < showerVertexL))
258 protoShower.AddHitToAdd(pCaloHit);
259 }
260
261 protoShowerVector.push_back(protoShower);
262 unavailableHitList.insert(unavailableHitList.begin(), showerSpineHitList.begin(), showerSpineHitList.end());
263 }
264}
265
266//------------------------------------------------------------------------------------------------------------------------------------------
267
269{
270 const std::string typeHitListName(hitType == TPC_VIEW_U ? m_caloHitListNameU : hitType == TPC_VIEW_V ? m_caloHitListNameV : m_caloHitListNameW);
271
272 PANDORA_THROW_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_INITIALIZED, !=, PandoraContentApi::GetList(*this, typeHitListName, pCaloHitList));
273
274 if (!pCaloHitList || pCaloHitList->empty())
275 {
277 std::cout << "ShowerStartRefinementBaseTool: unable to find calo hit list " << typeHitListName << std::endl;
278
279 return STATUS_CODE_NOT_INITIALIZED;
280 }
281
282 return STATUS_CODE_SUCCESS;
283}
284
285//------------------------------------------------------------------------------------------------------------------------------------------
286
288 const ParticleFlowObject *const pShowerPfo, const HitType hitType, const CartesianVector &nuVertex3D) const
289{
290 ClusterList viewCusterList;
291 LArPfoHelper::GetClusters(pShowerPfo, hitType, viewCusterList);
292
293 if (viewCusterList.empty())
294 throw StatusCodeException(STATUS_CODE_FAILURE);
295
296 const TwoDSlidingShowerFitResult twoDShowerSlidingFit(
297 viewCusterList.front(), m_showerSlidingFitWindow, LArGeometryHelper::GetWirePitch(this->GetPandora(), hitType));
298 const CartesianVector &minLayerPosition(twoDShowerSlidingFit.GetShowerFitResult().GetGlobalMinLayerPosition());
299 const CartesianVector &maxLayerPosition(twoDShowerSlidingFit.GetShowerFitResult().GetGlobalMaxLayerPosition());
300 const CartesianVector nuVertex2D(LArGeometryHelper::ProjectPosition(this->GetPandora(), nuVertex3D, hitType));
301
302 if ((nuVertex2D.GetZ() > minLayerPosition.GetZ()) && (nuVertex2D.GetZ() < maxLayerPosition.GetZ()))
303 return nuVertex2D;
304
305 const float minSeparation((nuVertex2D - minLayerPosition).GetMagnitudeSquared());
306 const float maxSeparation((nuVertex2D - maxLayerPosition).GetMagnitudeSquared());
307 CartesianVector showerVertexPosition(minSeparation < maxSeparation ? minLayerPosition : maxLayerPosition);
308
309 return (minSeparation < maxSeparation ? minLayerPosition : maxLayerPosition);
310}
311
312//------------------------------------------------------------------------------------------------------------------------------------------
313
315 const CartesianVector &nuVertex3D, const CartesianVector &peakDirection, CartesianVector &showerVertexPosition) const
316{
317 const CartesianVector nuVertex2D(LArGeometryHelper::ProjectPosition(this->GetPandora(), nuVertex3D, hitType));
318
319 if (!this->IsShowerConnected(showerVertexPosition, nuVertex2D, peakDirection))
320 {
321 CaloHitList viewShowerHitList;
322 LArPfoHelper::GetCaloHits(pShowerPfo, hitType, viewShowerHitList);
323
324 float minL(std::numeric_limits<float>::max());
325
326 for (const CaloHit *const pCaloHit : viewShowerHitList)
327 {
328 const CartesianVector displacement(pCaloHit->GetPositionVector() - nuVertex2D);
329 const float longitudinalSeparation(peakDirection.GetDotProduct(displacement));
330
331 if ((longitudinalSeparation < (-1.f)) || (longitudinalSeparation > minL))
332 continue;
333
334 const float transverseSeparation((peakDirection.GetCrossProduct(displacement)).GetMagnitude());
335
336 if (transverseSeparation < m_maxCoincidenceTransverseSeparation)
337 {
338 showerVertexPosition = pCaloHit->GetPositionVector();
339 minL = longitudinalSeparation;
340 }
341 }
342 }
343}
344
345//------------------------------------------------------------------------------------------------------------------------------------------
346
348 const CartesianVector &showerVertexPosition, const CartesianVector &nuVertex2D, const CartesianVector &peakDirection) const
349{
350 CartesianVector displacement(showerVertexPosition - nuVertex2D);
351
352 const float longitudinalSeparation(peakDirection.GetDotProduct(displacement));
353
354 if (longitudinalSeparation < (-1.f))
355 return false;
356
357 const float transverseSeparation((peakDirection.GetCrossProduct(displacement)).GetMagnitude());
358
359 if (transverseSeparation > m_maxCoincidenceTransverseSeparation)
360 return false;
361
362 return true;
363}
364
365//------------------------------------------------------------------------------------------------------------------------------------------
366
368 const CartesianVector &nuVertex3D, const HitType hitType, const CartesianVector &showerVertex, const CaloHitList &showerSpineHitList) const
369{
370 const CartesianVector nuVertex2D(LArGeometryHelper::ProjectPosition(this->GetPandora(), nuVertex3D, hitType));
371
372 CaloHitList viewShowerHitList;
373 LArPfoHelper::GetCaloHits(pShowerPfo, hitType, viewShowerHitList);
374
375 CaloHitList postShowerVertexSpineHits;
376 const float showerDistanceFromNuSquared((showerVertex - nuVertex2D).GetMagnitudeSquared());
377
378 for (const CaloHit *const pSpineHit : showerSpineHitList)
379 {
380 const CartesianVector &hitPosition(pSpineHit->GetPositionVector());
381 const float separationSquared((hitPosition - nuVertex2D).GetMagnitudeSquared());
382
383 if (separationSquared > showerDistanceFromNuSquared)
384 postShowerVertexSpineHits.push_back(pSpineHit);
385 }
386
387 if (postShowerVertexSpineHits.size() == 0)
388 return true;
389
390 // Check whether shower spine is pure
391 const CaloHitList sharedHitList(LArMCParticleHelper::GetSharedHits(postShowerVertexSpineHits, viewShowerHitList));
392 const float spinePurity(static_cast<float>(sharedHitList.size()) / static_cast<float>(postShowerVertexSpineHits.size()));
393
394 if (spinePurity < m_minSpinePurity)
395 return false;
396
397 return true;
398}
399
400//------------------------------------------------------------------------------------------------------------------------------------------
401
403 const CaloHitList &protectedHits, const CartesianVector &nuVertex3D, HitType hitType, ConnectionPathwayVector &viewPathways) const
404{
405 const CaloHitList *pViewHitList(nullptr);
406
407 if (this->GetHitListOfType(hitType, pViewHitList) != STATUS_CODE_SUCCESS)
408 return;
409
410 // Get the peak direction vector
411 CartesianPointVector eventPeakDirectionVector;
412 m_pEventPeakDirectionFinderTool->Run(pShowerPfo, nuVertex3D, pViewHitList, hitType, eventPeakDirectionVector);
413
414 CaloHitList unavailableHitList(protectedHits);
415 LArPfoHelper::GetCaloHits(pShowerPfo, hitType, unavailableHitList);
416
417 for (CartesianVector &eventPeakDirection : eventPeakDirectionVector)
418 {
419 CaloHitList pathwayHitList;
420 if (m_pEventPathwayFinderTool->Run(nuVertex3D, pViewHitList, hitType, eventPeakDirection, unavailableHitList, pathwayHitList) != STATUS_CODE_SUCCESS)
421 continue;
422
423 const CartesianVector nuVertex2D(LArGeometryHelper::ProjectPosition(this->GetPandora(), nuVertex3D, hitType));
424 const ConnectionPathway connectionPathway(nuVertex2D, eventPeakDirection);
425
426 viewPathways.push_back(connectionPathway);
427 unavailableHitList.insert(unavailableHitList.begin(), pathwayHitList.begin(), pathwayHitList.end());
428 }
429}
430
431//------------------------------------------------------------------------------------------------------------------------------------------
432
434 const CartesianVector &nuVertex3D, const HitType hitType, const ConnectionPathwayVector &viewPathways, ProtoShower &protoShower) const
435{
436 const CartesianVector nuVertex2D(LArGeometryHelper::ProjectPosition(this->GetPandora(), nuVertex3D, hitType));
437 const CartesianVector &peakDirection(protoShower.GetConnectionPathway().GetStartDirection());
438
439 CaloHitList refinedHitList;
440
441 for (const CaloHit *const pHitToAdd : protoShower.GetHitsToAddList())
442 {
443 bool found(false);
444
445 const CartesianVector &hitPosition(pHitToAdd->GetPositionVector());
446 const CartesianVector displacement(hitPosition - nuVertex2D);
447 const float thisT((peakDirection.GetCrossProduct(displacement)).GetMagnitudeSquared());
448
449 for (const ConnectionPathway &connectionPathway : viewPathways)
450 {
451 const CartesianVector &eventPeakDirection(connectionPathway.GetStartDirection());
452
453 if (peakDirection.GetOpeningAngle(eventPeakDirection) > (M_PI / 2))
454 continue;
455
456 const float otherT((eventPeakDirection.GetCrossProduct(displacement)).GetMagnitudeSquared());
457
458 if ((otherT < thisT) || (otherT < m_unambiguousThreshold))
459 {
460 found = true;
461
462 if (std::find(protoShower.GetAmbiguousDirectionVector().begin(), protoShower.GetAmbiguousDirectionVector().end(),
463 eventPeakDirection) == protoShower.GetAmbiguousDirectionVector().end())
464 {
465 protoShower.AddAmbiguousDirection(connectionPathway.GetStartDirection());
466 }
467 }
468 }
469
470 found ? protoShower.AddAmbiguousHit(pHitToAdd) : refinedHitList.push_back(pHitToAdd);
471 }
472
473 CaloHitList continuousHitList;
474 this->FindContinuousPath(refinedHitList, nuVertex2D, continuousHitList);
475
476 protoShower.SetHitsToAddList(continuousHitList);
477}
478
479//------------------------------------------------------------------------------------------------------------------------------------------
480
482 const CaloHitList &refinedHitList, const CartesianVector &nuVertex2D, CaloHitList &continuousHitList) const
483{
484 continuousHitList.clear();
485
486 CaloHitVector refinedHitVector(refinedHitList.begin(), refinedHitList.end());
487 std::sort(refinedHitVector.begin(), refinedHitVector.end(), LArConnectionPathwayHelper::SortByDistanceToPoint(nuVertex2D));
488
489 unsigned int startIndex(refinedHitVector.size());
490
491 for (unsigned int i = 0; i < refinedHitVector.size(); ++i)
492 {
493 CaloHitList connectedHitList;
494 connectedHitList.push_back(refinedHitVector[i]);
495
496 bool found(true);
497
498 while (found)
499 {
500 found = false;
501
502 for (unsigned int j = (i + 1); j < refinedHitVector.size(); ++j)
503 {
504 const CaloHit *const pCaloHit(refinedHitVector[j]);
505
506 if (std::find(connectedHitList.begin(), connectedHitList.end(), pCaloHit) != connectedHitList.end())
507 continue;
508
510 {
511 found = true;
512 connectedHitList.push_back(pCaloHit);
513 break;
514 }
515 }
516 }
517
518 if ((connectedHitList.size() >= m_minNConnectedHits) || (connectedHitList.size() == refinedHitVector.size()))
519 {
520 startIndex = i;
521 break;
522 }
523 }
524
525 for (unsigned int i = startIndex; i < refinedHitVector.size(); ++i)
526 continuousHitList.push_back(refinedHitVector[i]);
527}
528
529//------------------------------------------------------------------------------------------------------------------------------------------
530
532{
534
535 metadata.m_propertiesToAdd["FoundConnectionPathway"] = true;
536
537 if (featureMap.find("LArInitialRegionFeatureTool_initialGapSize") != featureMap.end())
538 metadata.m_propertiesToAdd["MaxInitialGapSize"] = featureMap.at("LArInitialRegionFeatureTool_initialGapSize").Get();
539
540 if (featureMap.find("LArInitialRegionFeatureTool_largestGapSize") != featureMap.end())
541 metadata.m_propertiesToAdd["MinLargestProjectedGapSize"] = featureMap.at("LArInitialRegionFeatureTool_largestGapSize").Get();
542
543 if (featureMap.find("LArConnectionRegionFeatureTool_pathwayLength") != featureMap.end())
544 metadata.m_propertiesToAdd["PathwayLengthMin"] = featureMap.at("LArConnectionRegionFeatureTool_pathwayLength").Get();
545
546 if (featureMap.find("LArConnectionRegionFeatureTool_pathwayScatteringAngle2D") != featureMap.end())
547 metadata.m_propertiesToAdd["MaxShowerStartPathwayScatteringAngle2D"] =
548 featureMap.at("LArConnectionRegionFeatureTool_pathwayScatteringAngle2D").Get();
549
550 if (featureMap.find("LArShowerRegionFeatureTool_nShowerHits") != featureMap.end())
551 metadata.m_propertiesToAdd["MaxNPostShowerStartHits"] = featureMap.at("LArShowerRegionFeatureTool_nShowerHits").Get();
552
553 if (featureMap.find("LArShowerRegionFeatureTool_foundHitRatio") != featureMap.end())
554 metadata.m_propertiesToAdd["MaxFoundHitRatio"] = featureMap.at("LArShowerRegionFeatureTool_foundHitRatio").Get();
555
556 if (featureMap.find("LArShowerRegionFeatureTool_scatterAngle") != featureMap.end())
557 metadata.m_propertiesToAdd["MaxPostShowerStartScatterAngle"] = featureMap.at("LArShowerRegionFeatureTool_scatterAngle").Get();
558
559 if (featureMap.find("LArShowerRegionFeatureTool_openingAngle") != featureMap.end())
560 metadata.m_propertiesToAdd["MaxPostShowerStartOpeningAngle"] = featureMap.at("LArShowerRegionFeatureTool_openingAngle").Get();
561
562 if (featureMap.find("LArShowerRegionFeatureTool_nuVertexEnergyAsymmetry") != featureMap.end())
563 metadata.m_propertiesToAdd["MaxPostShowerStartNuVertexEnergyAsymmetry"] =
564 featureMap.at("LArShowerRegionFeatureTool_nuVertexEnergyAsymmetry").Get();
565
566 if (featureMap.find("LArShowerRegionFeatureTool_nuVertexEnergyWeightedMeanRadialDistance") != featureMap.end())
567 metadata.m_propertiesToAdd["MaxPostShowerStartNuVertexEnergyWeightedMeanRadialDistance"] =
568 featureMap.at("LArShowerRegionFeatureTool_nuVertexEnergyWeightedMeanRadialDistance").Get();
569
570 if (featureMap.find("LArShowerRegionFeatureTool_showerStartEnergyAsymmetry") != featureMap.end())
571 metadata.m_propertiesToAdd["MaxPostShowerStartShowerStartEnergyAsymmetry"] =
572 featureMap.at("LArShowerRegionFeatureTool_showerStartEnergyAsymmetry").Get();
573
574 if (featureMap.find("LArShowerRegionFeatureTool_showerStartMoliereRadius") != featureMap.end())
575 metadata.m_propertiesToAdd["MinPostShowerStartShowerStartMoliereRadius"] =
576 featureMap.at("LArShowerRegionFeatureTool_showerStartMoliereRadius").Get();
577
578 if (featureMap.find("LArAmbiguousRegionFeatureTool_nAmbiguousViews") != featureMap.end())
579 metadata.m_propertiesToAdd["NViewsWithAmbiguousHits"] = featureMap.at("LArAmbiguousRegionFeatureTool_nAmbiguousViews").Get();
580
581 if (featureMap.find("LArAmbiguousRegionFeatureTool_maxUnaccountedEnergy") != featureMap.end())
582 metadata.m_propertiesToAdd["AmbiguousHitMaxUnaccountedEnergy"] = featureMap.at("LArAmbiguousRegionFeatureTool_maxUnaccountedEnergy").Get();
583
584 PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::ParticleFlowObject::AlterMetadata(*this, pShowerPfo, metadata));
585}
586
587//------------------------------------------------------------------------------------------------------------------------------------------
588
590{
591 electronHitMap.clear();
592
593 for (HitType hitType : {TPC_VIEW_U, TPC_VIEW_V, TPC_VIEW_W})
594 {
595 const CaloHitList *pViewHitList(nullptr);
596
597 if (this->GetHitListOfType(hitType, pViewHitList) != STATUS_CODE_SUCCESS)
598 continue;
599
600 for (const CaloHit *const pCaloHit : *pViewHitList)
601 {
602 MCParticleVector contributingMCParticleVector;
603 const MCParticleWeightMap &weightMap(pCaloHit->GetMCParticleWeightMap());
604
605 for (const auto &mapEntry : weightMap)
606 contributingMCParticleVector.push_back(mapEntry.first);
607
608 std::sort(contributingMCParticleVector.begin(), contributingMCParticleVector.end(), PointerLessThan<MCParticle>());
609
610 float highestWeight(0.f);
611 const MCParticle *highestElectronContributor(nullptr);
612
613 for (const MCParticle *const pMCParticle : contributingMCParticleVector)
614 {
615 const bool isLeadingElectron((std::abs(pMCParticle->GetParticleId()) == 11) &&
616 (LArMCParticleHelper::GetPrimaryMCParticle(pMCParticle) == pMCParticle));
617
618 if (isLeadingElectron)
619 {
620 const float weight(weightMap.at(pMCParticle));
621
622 if (weight > highestWeight)
623 {
624 highestWeight = weight;
625 highestElectronContributor = pMCParticle;
626 }
627 }
628 }
629
630 if (highestElectronContributor)
631 electronHitMap[highestElectronContributor].push_back(pCaloHit);
632 }
633 }
634}
635
636//------------------------------------------------------------------------------------------------------------------------------------------
637
639{
640 MCParticleVector mcElectronVector;
641
642 for (auto &entry : electronHitMap)
643 mcElectronVector.push_back(entry.first);
644
645 CaloHitList pfoHitList;
646 LArPfoHelper::GetCaloHits(pPfo, TPC_VIEW_U, pfoHitList);
647 LArPfoHelper::GetCaloHits(pPfo, TPC_VIEW_V, pfoHitList);
648 LArPfoHelper::GetCaloHits(pPfo, TPC_VIEW_W, pfoHitList);
649
650 for (const MCParticle *const pMCElectron : mcElectronVector)
651 {
652 const CaloHitList &mcElectronHitList(electronHitMap.at(pMCElectron));
653 const CaloHitList sharedHitList(LArMCParticleHelper::GetSharedHits(pfoHitList, mcElectronHitList));
654
655 const float completeness(static_cast<float>(sharedHitList.size()) / static_cast<float>(mcElectronHitList.size()));
656 const float purity(static_cast<float>(sharedHitList.size()) / static_cast<float>(pfoHitList.size()));
657
658 if (completeness < m_minElectronCompleteness)
659 continue;
660
661 if (purity < m_minElectronPurity)
662 continue;
663
664 return true;
665 }
666
667 return false;
668}
669
670//------------------------------------------------------------------------------------------------------------------------------------------
671
673{
674 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle, "ShowerPfoListName", m_showerPfoListName));
675 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle, "NeutrinoVertexListName", m_neutrinoVertexListName));
676 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle, "CaloHitListNameU", m_caloHitListNameU));
677 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle, "CaloHitListNameV", m_caloHitListNameV));
678 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle, "CaloHitListNameW", m_caloHitListNameW));
679
680 AlgorithmTool *pAlgorithmTool1(nullptr);
681 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ProcessAlgorithmTool(*this, xmlHandle, "ShowerPeakDirectionFinder", pAlgorithmTool1));
682 m_pShowerPeakDirectionFinderTool = dynamic_cast<PeakDirectionFinderTool *>(pAlgorithmTool1);
683
685 return STATUS_CODE_INVALID_PARAMETER;
686
687 AlgorithmTool *pAlgorithmTool2(nullptr);
688 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ProcessAlgorithmTool(*this, xmlHandle, "EventPeakDirectionFinder", pAlgorithmTool2));
689 m_pEventPeakDirectionFinderTool = dynamic_cast<PeakDirectionFinderTool *>(pAlgorithmTool2);
690
692 return STATUS_CODE_INVALID_PARAMETER;
693
694 AlgorithmTool *pAlgorithmTool3(nullptr);
695 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ProcessAlgorithmTool(*this, xmlHandle, "ShowerSpineFinder", pAlgorithmTool3));
696 m_pShowerSpineFinderTool = dynamic_cast<ShowerSpineFinderTool *>(pAlgorithmTool3);
697
699 return STATUS_CODE_INVALID_PARAMETER;
700
701 AlgorithmTool *pAlgorithmTool4(nullptr);
702 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ProcessAlgorithmTool(*this, xmlHandle, "EventPathwayFinder", pAlgorithmTool4));
703 m_pEventPathwayFinderTool = dynamic_cast<ShowerSpineFinderTool *>(pAlgorithmTool4);
704
706 return STATUS_CODE_INVALID_PARAMETER;
707
708 AlgorithmTool *pAlgorithmTool5(nullptr);
709 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ProcessAlgorithmTool(*this, xmlHandle, "ShowerStartFinder", pAlgorithmTool5));
710 m_pShowerStartFinderTool = dynamic_cast<ShowerStartFinderTool *>(pAlgorithmTool5);
711
713 return STATUS_CODE_INVALID_PARAMETER;
714
715 AlgorithmTool *pAlgorithmTool6(nullptr);
716 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ProcessAlgorithmTool(*this, xmlHandle, "ProtoShowerMatching", pAlgorithmTool6));
717 m_pProtoShowerMatchingTool = dynamic_cast<ProtoShowerMatchingTool *>(pAlgorithmTool6);
718
720 return STATUS_CODE_INVALID_PARAMETER;
721
722 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "MinShowerHits3D", m_minShowerHits3D));
723
725 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "ShowerSlidingFitWindow", m_showerSlidingFitWindow));
726
727 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=,
728 XmlHelper::ReadValue(xmlHandle, "MaxCoincidenceTransverseSeparation", m_maxCoincidenceTransverseSeparation));
729
730 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "MinSpinePurity", m_minSpinePurity));
731
732 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "TrainingMode", m_trainingMode));
733
735 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "TrainingFileName", m_trainingFileName));
736
738 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "UnambiguousThreshold", m_unambiguousThreshold));
739
741 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "MaxConnectionDistance", m_maxConnectionDistance));
742
744 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "MinNConnectedHits", m_minNConnectedHits));
745
746 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=,
747 XmlHelper::ReadValue(xmlHandle, "MinElectronCompleteness", m_minElectronCompleteness));
748
750 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "MinElectronPurity", m_minElectronPurity));
751
753 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "MaxSeparationFromHit", m_maxSeparationFromHit));
754
755 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=,
756 XmlHelper::ReadValue(xmlHandle, "MaxProjectionSeparation", m_maxProjectionSeparation));
757
758 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "MaxXSeparation", m_maxXSeparation));
759
760 AlgorithmToolVector algorithmToolVector;
761 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ProcessAlgorithmToolList(*this, xmlHandle, "FeatureTools", algorithmToolVector));
762
763 LArMvaHelper::AlgorithmToolMap algorithmToolMap;
764 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=,
765 LArMvaHelper::ProcessAlgorithmToolListToMap(*this, xmlHandle, "FeatureTools", m_algorithmToolNames, algorithmToolMap));
766
767 for (auto const &[pAlgorithmToolName, pAlgorithmTool] : algorithmToolMap)
768 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, LArMvaHelper::AddFeatureToolToMap(pAlgorithmTool, pAlgorithmToolName, m_featureToolMap));
769
770 return STATUS_CODE_SUCCESS;
771}
772
773} // namespace lar_content
Grouping of header files for many classes of use in particle flow algorithms.
Header file for the electron initial region refinement algorithm class.
Header file for the cluster helper class.
Header file for the connection pathway helper class.
Header file for the geometry helper class.
Header file for the lar monte carlo particle helper helper class.
Header file for the pfo helper class.
Header file for the ProtoShower class.
Header file for the lar two dimensional sliding shower fit result class.
Header file for the peak direction finder tool class.
Header file for the ProtoShower matching tool class.
Header file for the peak direction finder tool class.
Header file for the shower start finder tool class.
#define PANDORA_THROW_RESULT_IF_AND_IF(StatusCode1, StatusCode2, Operator, Command)
Definition StatusCodes.h:55
#define PANDORA_THROW_RESULT_IF(StatusCode1, Operator, Command)
Definition StatusCodes.h:43
#define PANDORA_RETURN_RESULT_IF_AND_IF(StatusCode1, StatusCode2, Operator, Command)
Definition StatusCodes.h:31
#define PANDORA_RETURN_RESULT_IF(StatusCode1, Operator, Command)
Definition StatusCodes.h:19
static pandora::StatusCode GetList(const pandora::Algorithm &algorithm, const std::string &listName, const T *&pT)
Get a named list.
static const pandora::PandoraSettings * GetSettings(const pandora::Algorithm &algorithm)
Get the pandora settings instance.
ConnectionPathway class.
const pandora::CartesianVector & GetStartDirection() const
Get the start direction of the connection pathway.
void FindContinuousPath(const pandora::CaloHitList &refinedHitList, const pandora::CartesianVector &nuVertex2D, pandora::CaloHitList &continuousHitList) const
Find the continuous path of hits that lies closest to a given point.
void RefineShower(const pandora::ParticleFlowObject *const pShowerPfo) const
Find and evaluate shower connection pathway, removing if necessary.
void FillShowerPfoVector(pandora::PfoVector &showerPfoVector) const
Obtain a sorted vector of the reconstructed shower pfos.
unsigned int m_minNConnectedHits
The number of connected hits needed for a conntected pathway.
pandora::StatusCode GetNeutrinoVertex(pandora::CartesianVector &nuVertex3D) const
Obtain the reconstructed neutrino vertex.
pandora::CartesianVector GetShowerVertex(const pandora::ParticleFlowObject *const pShowerPfo, const pandora::HitType hitType, const pandora::CartesianVector &nuVertex3D) const
Fit the shower to obtain a 2D shower vertex.
std::string m_trainingFileName
The name of the output training file name.
std::map< const pandora::MCParticle *, pandora::CaloHitList > HitOwnershipMap
unsigned int m_showerSlidingFitWindow
The sliding fit window for shower fits.
float m_maxXSeparation
The max. drift-coordinate separation between a 3D shower start and a matched 2D shower hit.
float m_maxSeparationFromHit
The max. separation between the projected 3D shower start and the closest 2D shower hit.
bool IsElectron(const pandora::ParticleFlowObject *const pShowerPfo, const HitOwnershipMap &electronHitMap) const
To determine whether a pfo is a true leading electron via its completeness and purity.
bool IsShowerConnected(const pandora::CartesianVector &showerVertexPosition, const pandora::CartesianVector &nuVertex2D, const pandora::CartesianVector &peakDirection) const
To determine whether the shower vertex lies on the connection pathway.
PeakDirectionFinderTool * m_pEventPeakDirectionFinderTool
The other (not incl. shower) initial pathway direction finder tool.
ConnectionPathwayFeatureTool::FeatureToolMap m_featureToolMap
The feature tool map.
pandora::StatusCode GetHitListOfType(const pandora::HitType hitType, const pandora::CaloHitList *&pCaloHitList) const
Obtain the event hit list of a given view.
float m_maxProjectionSeparation
The max. separation between the projected 3D shower start and the shower start of that view.
ProtoShowerMatchingTool * m_pProtoShowerMatchingTool
The 2D -> 3D ProtoShower matching tool.
PeakDirectionFinderTool * m_pShowerPeakDirectionFinderTool
The shower initial pathway direction finder tool.
void FillElectronHitMap(HitOwnershipMap &electronHitMap) const
Determine the one-to-one mapping of leading MCParticle electrons and the hits which contain their ene...
void SetMetadata(const pandora::ParticleFlowObject *const pShowerPfo, const LArMvaHelper::MvaFeatureMap &featureMap) const
Add the shower characterisation information to the pfo metadata.
ShowerStartFinderTool * m_pShowerStartFinderTool
The shower start finder tool.
void BuildViewProtoShowers(const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D, pandora::HitType hitType, ProtoShowerVector &protoShowerVector) const
Build the 2D ProtoShower objects for a given view.
void BuildViewPathways(const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CaloHitList &protectedHits, const pandora::CartesianVector &nuVertex3D, pandora::HitType hitType, ConnectionPathwayVector &viewPathways) const
Build the connection pathways of all other particles in the event.
void RefineShowerVertex(const pandora::ParticleFlowObject *const pShowerPfo, const pandora::HitType hitType, const pandora::CartesianVector &nuVertex3D, const pandora::CartesianVector &peakDirection, pandora::CartesianVector &showerVertexPosition) const
Move the shower vertex closer to the connection pathway.
float m_minSpinePurity
The min. purity of a coincident shower spine downstream of the shower vertex.
float m_minElectronCompleteness
The min. completeness of an electron-like pfo.
void RefineHitsToAdd(const pandora::CartesianVector &nuVertex3D, const pandora::HitType hitType, const ConnectionPathwayVector &viewPathways, ProtoShower &protoShower) const
Determine the continuous and unambiguous hits to add to an electron-like shower pfo.
ShowerSpineFinderTool * m_pShowerSpineFinderTool
The shower spine finder tool for the shower.
float m_maxCoincidenceTransverseSeparation
The max. transverse distance from the pathway direction of a coincident shower vertex.
bool IsSpineCoincident(const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D, const pandora::HitType hitType, const pandora::CartesianVector &showerVertex, const pandora::CaloHitList &showerSpineHitList) const
To determine if the hits downstream of the shower vertex lie within the shower.
unsigned int m_minShowerHits3D
The min. number of hits of a significant shower.
ShowerSpineFinderTool * m_pEventPathwayFinderTool
The shower spine finder tool for all other event particles.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
float m_unambiguousThreshold
The min. transverse distance of an unambiguous shower hit from another pathway direction.
static float GetClosestDistance(const pandora::ClusterList &clusterList1, const pandora::ClusterList &clusterList2)
Get closest distance between clusters in a pair of cluster lists.
static bool FindShowerStarts3D(const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pShowerPfo, const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianVector &nuVertexPosition, const float maxSeparationFromHit, const float maxProjectionSeparation, const float maxXSeparation, pandora::CartesianPointVector &showerStarts3D)
Create 3D shower start position(s) from three input 2D positions.
static float GetWirePitch(const pandora::Pandora &pandora, const pandora::HitType view, const float maxWirePitchDiscrepancy=0.01)
Return the wire pitch.
static pandora::CartesianVector ProjectPosition(const pandora::Pandora &pandora, const pandora::CartesianVector &position3D, const pandora::HitType view)
Project 3D position into a given 2D view.
static pandora::CaloHitList GetSharedHits(const pandora::CaloHitList &hitListA, const pandora::CaloHitList &hitListB)
Get the hits in the intersection of two hit lists.
static const pandora::MCParticle * GetPrimaryMCParticle(const pandora::MCParticle *const pMCParticle)
Get the primary parent mc particle.
static pandora::StatusCode ProcessAlgorithmToolListToMap(const pandora::Algorithm &algorithm, const pandora::TiXmlHandle &xmlHandle, const std::string &listName, pandora::StringVector &algorithToolNameVector, AlgorithmToolMap &algorithmToolMap)
Process a list of algorithms tools in an xml file, using a map. Idea is for this to go to XmlHelper i...
std::map< std::string, pandora::AlgorithmTool * > AlgorithmToolMap
static MvaFeatureVector CalculateFeatures(const MvaFeatureToolVector< Ts... > &featureToolVector, TARGS &&... args)
Calculate the features in a given feature tool vector.
static pandora::StatusCode AddFeatureToolToMap(pandora::AlgorithmTool *const pFeatureTool, std::string pFeatureToolName, MvaFeatureToolMap< Ts... > &featureToolMap)
Add a feature tool to a map of feature tools.
static pandora::StatusCode ProduceTrainingExample(const std::string &trainingOutputFile, const bool result, TCONTAINER &&featureContainer)
Produce a training example with the given features and result.
MvaTypes::MvaFeatureMap MvaFeatureMap
static bool SortByNHits(const pandora::ParticleFlowObject *const pLhs, const pandora::ParticleFlowObject *const pRhs)
Sort pfos by number of constituent hits.
static void GetClusters(const pandora::PfoList &pfoList, const pandora::HitType &hitType, pandora::ClusterList &clusterList)
Get a list of clusters of a particular hit type from a list of pfos.
static void GetCaloHits(const pandora::PfoList &pfoList, const pandora::HitType &hitType, pandora::CaloHitList &caloHitList)
Get a list of calo hits of a particular hit type from a list of pfos.
pandora::StatusCode Run(const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D, const pandora::CaloHitList *const pViewHitList, const pandora::HitType hitType, pandora::CartesianPointVector &peakDirectionVector)
void SetHitsToAddList(const pandora::CaloHitList &hitsToAddList)
Set the hits to add list.
const pandora::CaloHitList & GetHitsToAddList() const
Get the hits to add list.
void AddHitToAdd(const pandora::CaloHit *const hitToAdd)
Add a hit to the hits to add list.
const ConnectionPathway & GetConnectionPathway() const
Get the connection pathway.
void AddAmbiguousDirection(const pandora::CartesianVector &ambiguousDirection)
Add an ambiguous direction to the ambiguous direction vector.
void AddAmbiguousHit(const pandora::CaloHit *const ambiguousHit)
Add an ambiguous hit to the ambiguous hit list.
const pandora::CartesianPointVector & GetAmbiguousDirectionVector() const
Get the ambiguous direction vector.
ProtoShowerMatch class.
pandora::StatusCode Run(const ProtoShowerVector &protoShowerVectorU, const ProtoShowerVector &protoShowerVectorV, const ProtoShowerVector &protoShowerVectorW, ProtoShowerMatchVector &protoShowerMatchVector)
ShowerCore class.
pandora::StatusCode Run(const pandora::CartesianVector &nuVertex3D, const pandora::CaloHitList *const pViewHitList, const pandora::HitType hitType, const pandora::CartesianVector &peakDirection, pandora::CaloHitList &unavailableHitList, pandora::CaloHitList &showerSpineHitList)
pandora::StatusCode Run(const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &peakDirection, const pandora::HitType hitType, const pandora::CaloHitList &showerSpineHitList, pandora::CartesianVector &showerStartPosition, pandora::CartesianVector &showerStartDirection)
pandora::CartesianVector GetGlobalMinLayerPosition() const
Get global position corresponding to the fit result in minimum fit layer.
pandora::CartesianVector GetGlobalMaxLayerPosition() const
Get global position corresponding to the fit result in maximum fit layer.
const TwoDSlidingFitResult & GetShowerFitResult() const
Get the sliding fit result for the full shower cluster.
AlgorithmTool class. Algorithm tools will tend to be tailored for specific parent algorithms,...
CaloHit class.
Definition CaloHit.h:26
const CartesianVector & GetPositionVector() const
Get the position vector of center of calorimeter cell, units mm.
Definition CaloHit.h:350
CartesianVector class.
float GetZ() const
Get the cartesian z coordinate.
float GetDotProduct(const CartesianVector &rhs) const
Get the dot product of the cartesian vector with a second cartesian vector.
CartesianVector GetCrossProduct(const CartesianVector &rhs) const
Get the cross product of the cartesian vector with a second cartesian vector.
float GetOpeningAngle(const CartesianVector &rhs) const
Get the opening angle of the cartesian vector with respect to a second cartesian vector.
MCParticle class.
Definition MCParticle.h:26
bool ShouldDisplayAlgorithmInfo() const
Whether to display algorithm information during processing.
ParticleFlowObject class.
StatusCode AlterMetadata(const object_creation::ParticleFlowObject::Metadata &metadata)
Alter particle flow object metadata parameters.
Enable ordering of pointers based on properties of target objects.
const Pandora & GetPandora() const
Get the associated pandora instance.
Definition Process.h:116
StatusCodeException class.
static StatusCode ReadValue(const TiXmlHandle &xmlHandle, const std::string &xmlElementName, T &t)
Read a value from an xml element.
Definition XmlHelper.h:136
static StatusCode ProcessAlgorithmToolList(const Algorithm &algorithm, const TiXmlHandle &xmlHandle, const std::string &listName, AlgorithmToolVector &algorithmToolVector)
Process a list of algorithms tools in an xml file.
Definition XmlHelper.cc:101
static StatusCode ProcessAlgorithmTool(const Algorithm &algorithm, const TiXmlHandle &xmlHandle, const std::string &description, AlgorithmTool *&pAlgorithmTool)
Process an algorithm tool described in an xml element with a matching "description = ....
Definition XmlHelper.cc:69
std::vector< ProtoShower > ProtoShowerVector
std::vector< ProtoShowerMatch > ProtoShowerMatchVector
std::vector< ConnectionPathway > ConnectionPathwayVector
HitType
Calorimeter hit type enum.
std::vector< const CaloHit * > CaloHitVector
std::unordered_map< const MCParticle *, float > MCParticleWeightMap
MANAGED_CONTAINER< const Cluster * > ClusterList
std::vector< const ParticleFlowObject * > PfoVector
std::vector< std::string > StringVector
std::vector< CartesianVector > CartesianPointVector
std::vector< AlgorithmTool * > AlgorithmToolVector
MANAGED_CONTAINER< const CaloHit * > CaloHitList
std::vector< const MCParticle * > MCParticleVector
MANAGED_CONTAINER< const Vertex * > VertexList
StatusCode
The StatusCode enum.
MANAGED_CONTAINER< const ParticleFlowObject * > PfoList