Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
OneViewDeltaRayMatchingAlgorithm.cc
Go to the documentation of this file.
1
10
13
15
17
18using namespace pandora;
19
20namespace lar_content
21{
22
23OneViewDeltaRayMatchingAlgorithm::OneViewDeltaRayMatchingAlgorithm() : m_overlapExtension(1.f), m_minClusterHits(3)
24{
25}
26
27//------------------------------------------------------------------------------------------------------------------------------------------
28
30{
31 const PfoList muonPfoList(this->GetMuonPfoList());
32 PfoList allPfoList(this->GetDeltaRayPfoList());
33
34 allPfoList.insert(allPfoList.end(), muonPfoList.begin(), muonPfoList.end());
35
38
39 for (const HitType hitType : {TPC_VIEW_U, TPC_VIEW_V, TPC_VIEW_W})
40 this->PerformOneViewMatching(hitType);
41
42 for (const HitType hitType : {TPC_VIEW_U, TPC_VIEW_V, TPC_VIEW_W})
43 this->PerformRecovery(hitType);
44
46
47 return STATUS_CODE_SUCCESS;
48}
49
50//------------------------------------------------------------------------------------------------------------------------------------------
51
53{
54 const std::string inputClusterListName(
56
57 const ClusterList *pInputClusterList(nullptr);
58
60 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_INITIALIZED, !=, PandoraContentApi::GetList(*this, inputClusterListName, pInputClusterList));
61
62 if (!pInputClusterList)
63 return ClusterList();
64
65 return *pInputClusterList;
66}
67
68//------------------------------------------------------------------------------------------------------------------------------------------
69
71{
72 const PfoList *pMuonPfoList(nullptr);
73
75 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_INITIALIZED, !=, PandoraContentApi::GetList(*this, m_muonPfoListName, pMuonPfoList));
76
77 if (!pMuonPfoList)
78 return PfoList();
79
80 return *pMuonPfoList;
81}
82
83//------------------------------------------------------------------------------------------------------------------------------------------
84
86{
87 const PfoList *pDeltaRayPfoList(nullptr);
88
90 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_INITIALIZED, !=, PandoraContentApi::GetList(*this, m_deltaRayPfoListName, pDeltaRayPfoList));
91
92 if (!pDeltaRayPfoList)
93 return PfoList();
94
95 return *pDeltaRayPfoList;
96}
97
98//------------------------------------------------------------------------------------------------------------------------------------------
99
101{
104 ClusterVector availableClusterList;
105
106 for (auto &entry : clusterProximityMap)
107 {
108 if (entry.first->IsAvailable())
109 availableClusterList.push_back(entry.first);
110 }
111
112 std::sort(availableClusterList.begin(), availableClusterList.end(), LArClusterHelper::SortByNHits);
113
114 ClusterSet modifiedClusters;
115
116 for (const Cluster *const pAvailableCluster : availableClusterList)
117 {
118 if (modifiedClusters.count(pAvailableCluster))
119 continue;
120
121 const DeltaRayMatchingContainers::ClusterProximityMap::const_iterator iter(clusterProximityMap.find(pAvailableCluster));
122
123 // ATTN: Map will update during loop
124 if (iter == clusterProximityMap.end())
125 continue;
126
127 bool found(false);
128 const ClusterList &nearbyClusters(clusterProximityMap.at(pAvailableCluster));
129 PfoVector nearbyMuonPfoVector;
130
131 do
132 {
133 found = false;
134
135 const ParticleFlowObject *pClosestMuonPfo(nullptr);
136 float closestDistance(std::numeric_limits<float>::max());
137
138 for (const Cluster *const pNearbyCluster : nearbyClusters)
139 {
140 if (!this->IsMuonPfo(pNearbyCluster))
141 continue;
142
143 if (std::find(nearbyMuonPfoVector.begin(), nearbyMuonPfoVector.end(), clusterToPfoMap.at(pNearbyCluster)) !=
144 nearbyMuonPfoVector.end())
145 continue;
146
147 found = true;
148
149 const float separation(LArClusterHelper::GetClosestDistance(pNearbyCluster, pAvailableCluster));
150
151 if (separation < closestDistance)
152 {
153 closestDistance = separation;
154 pClosestMuonPfo = clusterToPfoMap.at(pNearbyCluster);
155 }
156 }
157
158 if (pClosestMuonPfo)
159 nearbyMuonPfoVector.push_back(pClosestMuonPfo);
160 } while (found);
161
162 if (nearbyMuonPfoVector.empty())
163 continue;
164
165 if (this->AddIntoExistingDeltaRay(pAvailableCluster, nearbyMuonPfoVector))
166 continue;
167
168 this->CreateDeltaRay(pAvailableCluster, nearbyMuonPfoVector, modifiedClusters);
169 }
170}
171
172//------------------------------------------------------------------------------------------------------------------------------------------
173
175{
176 const HitType hitType(LArClusterHelper::GetClusterHitType(pCluster));
178 const DeltaRayMatchingContainers::ClusterToPfoMap::const_iterator iter(clusterToPfoMap.find(pCluster));
179
180 if (iter == clusterToPfoMap.end())
181 return false;
182
183 const ParticleFlowObject *const pPfo(iter->second);
184 const PfoList &muonPfoList(this->GetMuonPfoList());
185
186 return (std::find(muonPfoList.begin(), muonPfoList.end(), pPfo) != muonPfoList.end());
187}
188
189//------------------------------------------------------------------------------------------------------------------------------------------
190
191bool OneViewDeltaRayMatchingAlgorithm::AddIntoExistingDeltaRay(const Cluster *const pAvailableCluster, const PfoVector &nearbyMuonPfoVector)
192{
193 const HitType hitType(LArClusterHelper::GetClusterHitType(pAvailableCluster));
194 const HitType projectedHitType1((hitType == TPC_VIEW_U) ? TPC_VIEW_V : (hitType == TPC_VIEW_V) ? TPC_VIEW_W : TPC_VIEW_U);
195 const HitType projectedHitType2((projectedHitType1 == TPC_VIEW_U) ? TPC_VIEW_V : (projectedHitType1 == TPC_VIEW_V) ? TPC_VIEW_W : TPC_VIEW_U);
198
199 for (const ParticleFlowObject *const pNearbyMuonPfo : nearbyMuonPfoVector)
200 {
201 const Cluster *const pProjectedCluster1(this->GetBestProjectedCluster({pAvailableCluster}, pNearbyMuonPfo, projectedHitType1, false));
202 const Cluster *const pProjectedCluster2(this->GetBestProjectedCluster({pAvailableCluster}, pNearbyMuonPfo, projectedHitType2, false));
203
204 if ((!pProjectedCluster1) || (!pProjectedCluster2))
205 continue;
206
207 const ParticleFlowObject *const pPfo1(clusterToPfoMap1.at(pProjectedCluster1));
208 const ParticleFlowObject *const pPfo2(clusterToPfoMap2.at(pProjectedCluster2));
209
210 if (pPfo1 == pPfo2)
211 {
212 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::AddToPfo(*this, pPfo1, pAvailableCluster));
213
215
216 return true;
217 }
218 }
219
220 return false;
221}
222
223//------------------------------------------------------------------------------------------------------------------------------------------
224
226 const ClusterList &deltaRayClusterGroup, const ParticleFlowObject *const pNearbyMuonPfo, const HitType hitType, const bool findAvailable)
227{
228 ClusterList muonClusterList;
229 LArPfoHelper::GetClusters(pNearbyMuonPfo, hitType, muonClusterList);
230
231 if (muonClusterList.size() != 1)
232 return nullptr;
233
235 auto muonProximityIter(clusterProximityMap.find(muonClusterList.front()));
236
237 if (muonProximityIter == clusterProximityMap.end())
238 return nullptr;
239
240 float spanMinX(0.f), spanMaxX(0.f);
241 this->GetClusterSpanX(deltaRayClusterGroup, spanMinX, spanMaxX);
242
243 unsigned int highestHit(0);
244 const Cluster *pProjectedCluster(nullptr);
245
246 for (const Cluster *const pNearbyCluster : muonProximityIter->second)
247 {
248 if (findAvailable && !pNearbyCluster->IsAvailable())
249 continue;
250
251 if (!findAvailable && !this->IsDeltaRayPfo(pNearbyCluster))
252 continue;
253
254 float minX(0.f), maxX(0.f);
255 pNearbyCluster->GetClusterSpanX(minX, maxX);
256
257 if ((maxX < (spanMinX - m_overlapExtension)) || (minX > (spanMaxX + m_overlapExtension)))
258 continue;
259
260 if (pNearbyCluster->GetNCaloHits() > highestHit)
261 {
262 highestHit = pNearbyCluster->GetNCaloHits();
263 pProjectedCluster = pNearbyCluster;
264 }
265 }
266
267 return pProjectedCluster;
268}
269
270//------------------------------------------------------------------------------------------------------------------------------------------
271
273{
274 const HitType hitType(LArClusterHelper::GetClusterHitType(pCluster));
276
277 const DeltaRayMatchingContainers::ClusterToPfoMap::const_iterator iter(clusterToPfoMap.find(pCluster));
278
279 if (iter == clusterToPfoMap.end())
280 return false;
281
282 const ParticleFlowObject *const pDeltaRayPfo(iter->second);
283 const PfoList &deltaRayPfoList(this->GetDeltaRayPfoList());
284
285 return (std::find(deltaRayPfoList.begin(), deltaRayPfoList.end(), pDeltaRayPfo) != deltaRayPfoList.end());
286}
287
288//------------------------------------------------------------------------------------------------------------------------------------------
289
290void OneViewDeltaRayMatchingAlgorithm::GetClusterSpanX(const ClusterList &clusterList, float &spanMinX, float &spanMaxX)
291{
292 spanMinX = std::numeric_limits<float>::max();
293 spanMaxX = -std::numeric_limits<float>::max();
294
295 for (const Cluster *const pCluster : clusterList)
296 {
297 float minX(0.f), maxX(0.f);
298 pCluster->GetClusterSpanX(minX, maxX);
299
300 if (minX < spanMinX)
301 spanMinX = minX;
302
303 if (maxX > spanMaxX)
304 spanMaxX = maxX;
305 }
306}
307
308//------------------------------------------------------------------------------------------------------------------------------------------
309
310void OneViewDeltaRayMatchingAlgorithm::CreateDeltaRay(const Cluster *const pAvailableCluster, const PfoVector &nearbyMuonPfoVector, ClusterSet &modifiedClusters)
311{
312 ClusterList clusterGroup, consideredClusters;
313 this->GetNearbyAvailableClusters(pAvailableCluster, consideredClusters, clusterGroup);
314
315 for (const Cluster *const pModifiedCluster : clusterGroup)
316 modifiedClusters.insert(pModifiedCluster);
317
318 const HitType hitType(LArClusterHelper::GetClusterHitType(pAvailableCluster));
319 const HitType projectedHitType1((hitType == TPC_VIEW_U) ? TPC_VIEW_V : (hitType == TPC_VIEW_V) ? TPC_VIEW_W : TPC_VIEW_U);
320 const HitType projectedHitType2((projectedHitType1 == TPC_VIEW_U) ? TPC_VIEW_V : (projectedHitType1 == TPC_VIEW_V) ? TPC_VIEW_W : TPC_VIEW_U);
321 ClusterList projectedClusters1, projectedClusters2;
322
323 for (const ParticleFlowObject *const pNearbyMuonPfo : nearbyMuonPfoVector)
324 {
325 const Cluster *const pProjectedCluster1(this->GetBestProjectedCluster(clusterGroup, pNearbyMuonPfo, projectedHitType1, true));
326 const Cluster *const pProjectedCluster2(this->GetBestProjectedCluster(clusterGroup, pNearbyMuonPfo, projectedHitType2, true));
327
328 if ((!pProjectedCluster1) && (!pProjectedCluster2))
329 continue;
330
331 ClusterList consideredClusters1;
332 if (pProjectedCluster1)
333 this->GetNearbyAvailableClusters(pProjectedCluster1, consideredClusters1, projectedClusters1);
334
335 ClusterList consideredClusters2;
336 if (pProjectedCluster2)
337 this->GetNearbyAvailableClusters(pProjectedCluster2, consideredClusters2, projectedClusters2);
338 }
339
340 const Cluster *const pCluster1(this->MergeClusterGroup(clusterGroup));
341 const Cluster *const pCluster2(this->MergeClusterGroup(projectedClusters1));
342 const Cluster *const pCluster3(this->MergeClusterGroup(projectedClusters2));
343
344 this->CreatePfo(pCluster1, pCluster2, pCluster3);
345}
346
347//------------------------------------------------------------------------------------------------------------------------------------------
348
349void OneViewDeltaRayMatchingAlgorithm::GetNearbyAvailableClusters(const Cluster *const pCluster, ClusterList &consideredClusters, ClusterList &foundClusters)
350{
351 const HitType hitType(LArClusterHelper::GetClusterHitType(pCluster));
353
354 consideredClusters.push_back(pCluster);
355
356 if (!pCluster->IsAvailable())
357 return;
358
359 if (std::find(foundClusters.begin(), foundClusters.end(), pCluster) == foundClusters.end())
360 foundClusters.push_back(pCluster);
361
362 const DeltaRayMatchingContainers::ClusterProximityMap::const_iterator proximityIter(clusterProximityMap.find(pCluster));
363
364 if (proximityIter == clusterProximityMap.end())
365 return;
366
367 for (const Cluster *const pNearbyCluster : proximityIter->second)
368 {
369 if (!pNearbyCluster->IsAvailable())
370 continue;
371
372 if (std::find(consideredClusters.begin(), consideredClusters.end(), pNearbyCluster) != consideredClusters.end())
373 continue;
374
375 if (std::find(foundClusters.begin(), foundClusters.end(), pNearbyCluster) != foundClusters.end())
376 continue;
377
378 this->GetNearbyAvailableClusters(pNearbyCluster, consideredClusters, foundClusters);
379 }
380}
381
382//------------------------------------------------------------------------------------------------------------------------------------------
383
385{
386 if (clusterGroup.empty())
387 return nullptr;
388
389 const Cluster *const pClusterToEnlarge(clusterGroup.front());
390
391 if (clusterGroup.size() == 1)
392 return pClusterToEnlarge;
393
394 const HitType hitType(LArClusterHelper::GetClusterHitType(pClusterToEnlarge));
395 const std::string inputClusterListName(
397
398 for (const Cluster *const pClusterToDelete : clusterGroup)
399 {
401
402 if (pClusterToDelete != pClusterToEnlarge)
403 {
404 PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::ReplaceCurrentList<Cluster>(*this, inputClusterListName));
405 PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::MergeAndDeleteClusters(*this, pClusterToEnlarge, pClusterToDelete));
406 }
407 }
408
409 m_deltaRayMatchingContainers.AddClustersToContainers({pClusterToEnlarge}, {nullptr});
410
411 return pClusterToEnlarge;
412}
413
414//------------------------------------------------------------------------------------------------------------------------------------------
415
416void OneViewDeltaRayMatchingAlgorithm::CreatePfo(const Cluster *const pCluster1, const Cluster *const pCluster2, const Cluster *const pCluster3)
417{
418 const PfoList *pPfoList(nullptr);
419 std::string pfoListName;
420 PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::CreateTemporaryListAndSetCurrent(*this, pPfoList, pfoListName));
421
422 PandoraContentApi::ParticleFlowObject::Parameters pfoParameters;
423 pfoParameters.m_particleId = E_MINUS;
424 pfoParameters.m_charge = PdgTable::GetParticleCharge(E_MINUS);
425 pfoParameters.m_mass = PdgTable::GetParticleMass(E_MINUS);
426 pfoParameters.m_energy = 0.f;
427 pfoParameters.m_momentum = CartesianVector(0.f, 0.f, 0.f);
428
429 if (pCluster1)
430 pfoParameters.m_clusterList.push_back(pCluster1);
431
432 if (pCluster2)
433 pfoParameters.m_clusterList.push_back(pCluster2);
434
435 if (pCluster3)
436 pfoParameters.m_clusterList.push_back(pCluster3);
437
438 if (pfoParameters.m_clusterList.empty())
439 throw StatusCodeException(STATUS_CODE_FAILURE);
440
441 const ParticleFlowObject *pPfo(nullptr);
442
443 PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::ParticleFlowObject::Create(*this, pfoParameters, pPfo));
446
448}
449
450//------------------------------------------------------------------------------------------------------------------------------------------
451
453{
454 const ClusterList &inputClusterList(this->GetInputClusterList(hitType));
455
456 for (const Cluster *const pCluster : inputClusterList)
457 {
458 if (!pCluster->IsAvailable())
459 continue;
460
461 if (pCluster->GetNCaloHits() < m_minClusterHits)
462 continue;
463
464 this->CreatePfo(pCluster, nullptr, nullptr);
465 }
466}
467
468//------------------------------------------------------------------------------------------------------------------------------------------
469
471{
472 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle, "MuonPfoListName", m_muonPfoListName));
473
474 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle, "DeltaRayPfoListName", m_deltaRayPfoListName));
475
476 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle, "InputClusterListNameU", m_inputClusterListNameU));
477
478 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle, "InputClusterListNameV", m_inputClusterListNameV));
479
480 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle, "InputClusterListNameW", m_inputClusterListNameW));
481
482 PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle, "OutputPfoListName", m_outputPfoListName));
483
484 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=,
486
488 STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "OverlapExtension", m_overlapExtension));
489
490 PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "MinClusterHits", m_minClusterHits));
491
492 return STATUS_CODE_SUCCESS;
493}
494
495} // namespace lar_content
Grouping of header files for many classes of use in particle flow algorithms.
Header file for the kd tree linker algo template class.
Header file for the cluster helper class.
Header file for the pfo helper class.
Header file for the one viw delta ray matching algorithm.
#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 ReplaceCurrentList(const pandora::Algorithm &algorithm, const std::string &newListName)
Replace the current list with a pre-saved list; use this new list as a permanent replacement for the ...
static pandora::StatusCode AddToPfo(const pandora::Algorithm &algorithm, const pandora::ParticleFlowObject *const pPfo, const T *const pT)
Add a cluster to a particle flow object.
static pandora::StatusCode CreateTemporaryListAndSetCurrent(const pandora::Algorithm &algorithm, const T *&pT, std::string &temporaryListName)
Create a temporary list and set it to be the current list, enabling object creation.
static pandora::StatusCode MergeAndDeleteClusters(const pandora::Algorithm &algorithm, const pandora::Cluster *const pClusterToEnlarge, const pandora::Cluster *const pClusterToDelete)
Merge two clusters in the current list, enlarging one cluster and deleting the second.
static pandora::StatusCode GetList(const pandora::Algorithm &algorithm, const std::string &listName, const T *&pT)
Get a named list.
float m_searchRegion1D
Search region, applied to each dimension, for look-up from kd-tree.
void FillContainers(const pandora::PfoList &inputPfoList, const pandora::ClusterList &inputClusterList1, const pandora::ClusterList &inputClusterList2=pandora::ClusterList(), const pandora::ClusterList &inputClusterList3=pandora::ClusterList())
Fill the HitToClusterMap, the ClusterProximityMap and the ClusterToPfoMap in all input views.
void ClearContainers()
Empty all algorithm containers.
std::map< const pandora::Cluster *, pandora::ClusterList > ClusterProximityMap
void AddClustersToPfoMaps(const pandora::ParticleFlowObject *const pPfo)
Add the clusters of a cosmic ray/delta ray pfo to the cluster to pfo maps.
std::map< const pandora::Cluster *, const pandora::ParticleFlowObject * > ClusterToPfoMap
const ClusterToPfoMap & GetClusterToPfoMap(const pandora::HitType hitType) const
Get the mapping of clusters to the pfos to which they belong.
const ClusterProximityMap & GetClusterProximityMap(const pandora::HitType hitType) const
Get the mapping of clusters to to their neighbouring clusters.
void AddClustersToContainers(const pandora::ClusterVector &newClusterVector, const pandora::PfoVector &pfoVector)
Add a list of clusters to the hit to cluster and cluster proximity maps and, if appropriate,...
void RemoveClusterFromContainers(const pandora::Cluster *const pDeletedCluster)
Remove an input cluster's hits from the hit to cluster and cluster proximity maps and,...
static pandora::HitType GetClusterHitType(const pandora::Cluster *const pCluster)
Get the hit type associated with a two dimensional cluster.
static bool SortByNHits(const pandora::Cluster *const pLhs, const pandora::Cluster *const pRhs)
Sort clusters by number of hits, then layer span, then inner layer, then position,...
static float GetClosestDistance(const pandora::ClusterList &clusterList1, const pandora::ClusterList &clusterList2)
Get closest distance between clusters in a pair of cluster lists.
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.
const pandora::Cluster * GetBestProjectedCluster(const pandora::ClusterList &deltaRayClusterGroup, const pandora::ParticleFlowObject *const pNearbyMuonPfo, const pandora::HitType hitType, const bool findAvailable)
Get the best matched available or unavailable cluster of a remaining delta ray cluster group wrt a co...
DeltaRayMatchingContainers m_deltaRayMatchingContainers
The class of hit, cluster and pfo ownership and proximity maps.
const pandora::ClusterList GetInputClusterList(const pandora::HitType hitType)
Get the input cluster list of a given hit type.
std::string m_outputPfoListName
The list to receive the created delta ray pfos.
void PerformRecovery(const pandora::HitType hitType)
Create a delta ray pfo from any remaining, significant clusters.
std::string m_inputClusterListNameW
The list of reconstructed W clusters.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
const pandora::PfoList GetDeltaRayPfoList()
Get the input delta ray pfo list.
void CreatePfo(const pandora::Cluster *const pCluster1, const pandora::Cluster *const pCluster2, const pandora::Cluster *const pCluster3)
Create a pfo from the input clusters updating the cluster to pfo map accordingly.
float m_overlapExtension
The extension to each side of the x overlap region in which to search for matched clusters.
const pandora::Cluster * MergeClusterGroup(const pandora::ClusterList &clusterGroup)
Merge a collection of available clusters together updating hit containers accordingly.
unsigned int m_minClusterHits
The minimum number of hits for a cluster to be significant.
void GetNearbyAvailableClusters(const pandora::Cluster *const pCluster, pandora::ClusterList &consideredClusters, pandora::ClusterList &foundClusters)
In the view of the input available cluster, gather nearby available clusters.
bool IsMuonPfo(const pandora::Cluster *const pCluster)
Determine whether an input cluster belongs to a cosmic ray pfo.
std::string m_deltaRayPfoListName
The list of reconstructed delta ray pfos.
bool AddIntoExistingDeltaRay(const pandora::Cluster *const pAvailableCluster, const pandora::PfoVector &nearbyMuonPfoVector)
Use nearby muon pfos to project into other views and attempt to add a remaining delta ray cluster int...
const pandora::PfoList GetMuonPfoList()
Get the input cosmic ray pfo list.
std::string m_muonPfoListName
The list of reconstructed cosmic ray pfos.
void PerformOneViewMatching(const pandora::HitType hitType)
Use nearby muon pfos to project into other views and attempt to match the remaining delta ray cluster...
void CreateDeltaRay(const pandora::Cluster *const pAvailableCluster, const pandora::PfoVector &nearbyMuonPfoVector, pandora::ClusterSet &modifiedClusters)
Use nearby muon pfos to project into other views and attempt to match a remaining delta ray cluster t...
std::string m_inputClusterListNameV
The list of reconstructed V clusters.
void GetClusterSpanX(const pandora::ClusterList &clusterList, float &spanMinX, float &spanMaxX)
Determine cluster span (in x) of a group of clusters.
std::string m_inputClusterListNameU
The list of reconstructed U clusters.
bool IsDeltaRayPfo(const pandora::Cluster *const pCluster)
Determine whether an input cluster belongs to a delta ray pfo.
CartesianVector class.
Cluster class.
Definition Cluster.h:31
bool IsAvailable() const
Whether the cluster is available to be added to a particle flow object.
Definition Cluster.h:582
ParticleFlowObject class.
static float GetParticleMass(const int pdgCode)
Get the mass of a particle type.
Definition PdgTable.h:205
static int GetParticleCharge(const int pdgCode)
Get the charge of a particle type.
Definition PdgTable.h:227
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
HitType
Calorimeter hit type enum.
std::vector< const Cluster * > ClusterVector
MANAGED_CONTAINER< const Cluster * > ClusterList
std::vector< const ParticleFlowObject * > PfoVector
std::unordered_set< const Cluster * > ClusterSet
StatusCode
The StatusCode enum.
MANAGED_CONTAINER< const ParticleFlowObject * > PfoList