PfoCreator.cxx
Go to the documentation of this file.
1 #include "PfoCreator.h"
2 
3 #include "Api/PandoraApi.h"
4 
5 #include "Objects/Cluster.h"
6 #include "Objects/ParticleFlowObject.h"
7 #include "Objects/Track.h"
8 
9 #include "Pandora/PdgTable.h"
10 
11 #include <algorithm>
12 #include <cmath>
13 
16 
17 namespace gar {
18  namespace gar_pandora {
19 
20  PfoCreator::PfoCreator(const Settings &settings, const pandora::Pandora *const pPandora, const RotationTransformation *const pRotation)
21  : m_settings(settings),
22  m_pandora(*pPandora),
23  m_rotation(*pRotation)
24  {
25  }
26 
27  //------------------------------------------------------------------------------------------------------------------------------------------
28 
30  {
31  }
32 
33  //------------------------------------------------------------------------------------------------------------------------------------------
34 
36  {
37  PFParticleCollection outputParticles( new std::vector<rec::PFParticle> );
38  ClusterCollection outputClusters( new std::vector<rec::Cluster> );
39 
40  const pandora::PfoList *pPandoraPfoList = NULL;
41  PANDORA_RETURN_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::GetCurrentPfoList(m_pandora, pPandoraPfoList));
42 
43  pandora::StringVector subDetectorNames;
44  this->InitialiseSubDetectorNames(subDetectorNames);
45 
46  for (pandora::PfoList::const_iterator pIter = pPandoraPfoList->begin(), pIterEnd = pPandoraPfoList->end(); pIter != pIterEnd; ++pIter)
47  {
48  const pandora::ParticleFlowObject *const pPandoraPfo(*pIter);
49  gar::rec::PFParticle pReconstructedParticle;
50 
51  const bool hasTrack(!pPandoraPfo->GetTrackList().empty());
52  const pandora::ClusterList &clusterList(pPandoraPfo->GetClusterList());
53 
54  float clustersTotalEnergy(0.f);
55  pandora::CartesianVector referencePoint(0.f, 0.f, 0.f), clustersWeightedPosition(0.f, 0.f, 0.f);
56 
57  for (pandora::ClusterList::const_iterator cIter = clusterList.begin(), cIterEnd = clusterList.end(); cIter != cIterEnd; ++cIter)
58  {
59  const pandora::Cluster *const pPandoraCluster(*cIter);
60  pandora::CaloHitList pandoraCaloHitList;
61  pPandoraCluster->GetOrderedCaloHitList().FillCaloHitList(pandoraCaloHitList);
62  pandoraCaloHitList.insert(pandoraCaloHitList.end(), pPandoraCluster->GetIsolatedCaloHitList().begin(), pPandoraCluster->GetIsolatedCaloHitList().end());
63 
64  pandora::FloatVector hitE, hitX, hitY, hitZ;
65  gar::rec::Cluster pCluster;
66  this->SetClusterSubDetectorEnergies(subDetectorNames, pandoraCaloHitList, hitE, hitX, hitY, hitZ);
67 
68  float clusterCorrectEnergy(0.f);
69  this->SetClusterEnergyAndError(pPandoraPfo, pPandoraCluster, pCluster, clusterCorrectEnergy);
70 
71  pandora::CartesianVector clusterPosition(0.f, 0.f, 0.f);
72  const unsigned int nHitsInCluster(pandoraCaloHitList.size());
73  this->SetClusterPositionAndError(nHitsInCluster, hitE, hitX, hitY, hitZ, pCluster, clusterPosition);
74 
75  if (!hasTrack)
76  {
77  clustersWeightedPosition += clusterPosition * clusterCorrectEnergy;
78  clustersTotalEnergy += clusterCorrectEnergy;
79  }
80 
81  MF_LOG_DEBUG("PfoCreator::CreateParticleFlowObjects")
82  << "Adding cluster " << &pCluster
83  << " with energy " << pCluster.Energy();
84 
85  outputClusters->emplace_back(pCluster);
86  }
87 
88  if (!hasTrack)
89  {
90  if (clustersTotalEnergy < std::numeric_limits<float>::epsilon())
91  {
92  MF_LOG_DEBUG("PfoCreator::CreateParticleFlowObjects")
93  << "invalid cluster energy " << clustersTotalEnergy;
94  throw pandora::StatusCodeException(pandora::STATUS_CODE_FAILURE);
95  }
96  else
97  {
98  referencePoint = clustersWeightedPosition * (1.f / clustersTotalEnergy);
99  }
100  }
101  else
102  {
103  PANDORA_RETURN_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, this->CalculateTrackBasedReferencePoint(pPandoraPfo, referencePoint));
104  }
105 
106  this->SetRecoParticleReferencePoint(referencePoint, pReconstructedParticle);
107  this->AddTracksToRecoParticle(pPandoraPfo, pReconstructedParticle);
108  this->SetRecoParticlePropertiesFromPFO(pPandoraPfo, pReconstructedParticle);
109 
110  MF_LOG_DEBUG("PfoCreator::CreateParticleFlowObjects")
111  << "Adding PFO " << &pReconstructedParticle
112  << " with energy " << pReconstructedParticle.Energy()
113  << " , mass " << pReconstructedParticle.Mass();
114 
115  // a hack to make clang happy -- make sure m_rotation is used in the code
116  // this should never print
117 
118  if (pReconstructedParticle.Energy() < -1000)
119  MF_LOG_DEBUG("PfoCreator::CreateParticleFlowObjects")
120  << " Negative energy. Message should not be printed. " << m_rotation.kAxisX;
121 
122  outputParticles->emplace_back(pReconstructedParticle);
123  }
124 
125  pEvent.put(std::move(outputParticles));
126  pEvent.put(std::move(outputClusters));
127 
128  return pandora::STATUS_CODE_SUCCESS;
129  }
130 
131  //------------------------------------------------------------------------------------------------------------------------------------------
132 
134  {
135  subDetectorNames.push_back("ecal");
136  }
137 
138  //------------------------------------------------------------------------------------------------------------------------------------------
139 
140  void PfoCreator::SetClusterSubDetectorEnergies(const pandora::StringVector & /* subDetectorNames */, const pandora::CaloHitList &pandoraCaloHitList, pandora::FloatVector &hitE, pandora::FloatVector &hitX, pandora::FloatVector &hitY, pandora::FloatVector &hitZ) const
141  {
142  for (pandora::CaloHitList::const_iterator hIter = pandoraCaloHitList.begin(), hIterEnd = pandoraCaloHitList.end(); hIter != hIterEnd; ++hIter)
143  {
144  const pandora::CaloHit *const pPandoraCaloHit(*hIter);
145  gar::rec::CaloHit *const pCalorimeterHit = (gar::rec::CaloHit*)(pPandoraCaloHit->GetParentAddress());
146 
147  MF_LOG_DEBUG("PfoCreator::SetClusterSubDetectorEnergies")
148  << " hit " << pCalorimeterHit
149  << " energy " << pCalorimeterHit->Energy()
150  << " position x " << pCalorimeterHit->Position()[0]
151  << " y " << pCalorimeterHit->Position()[1]
152  << " z " << pCalorimeterHit->Position()[2];
153 
154  const float caloHitEnergy(pCalorimeterHit->Energy());
155  hitE.push_back(caloHitEnergy);
156  hitX.push_back(pCalorimeterHit->Position()[0]);
157  hitY.push_back(pCalorimeterHit->Position()[1]);
158  hitZ.push_back(pCalorimeterHit->Position()[2]);
159  }
160  }
161 
162  //------------------------------------------------------------------------------------------------------------------------------------------
163 
164  void PfoCreator::SetClusterEnergyAndError(const pandora::ParticleFlowObject *const pPandoraPfo, const pandora::Cluster *const pPandoraCluster, gar::rec::Cluster &pCluster, float &clusterCorrectEnergy) const
165  {
166  const bool isEmShower((pandora::PHOTON == pPandoraPfo->GetParticleId()) || (pandora::E_MINUS == std::abs(pPandoraPfo->GetParticleId())));
167  clusterCorrectEnergy = (isEmShower ? pPandoraCluster->GetCorrectedElectromagneticEnergy(m_pandora) : pPandoraCluster->GetCorrectedHadronicEnergy(m_pandora));
168 
169  if (clusterCorrectEnergy < std::numeric_limits<float>::epsilon())
170  throw pandora::StatusCodeException(pandora::STATUS_CODE_FAILURE);
171 
172  const float stochasticTerm(isEmShower ? m_settings.m_emStochasticTerm : m_settings.m_hadStochasticTerm);
173  const float constantTerm(isEmShower ? m_settings.m_emConstantTerm : m_settings.m_hadConstantTerm);
174  const float energyError(std::sqrt(stochasticTerm * stochasticTerm / clusterCorrectEnergy + constantTerm * constantTerm) * clusterCorrectEnergy);
175 
176  pCluster.setEnergy(clusterCorrectEnergy);
177  pCluster.setEnergyError(energyError);
178  }
179 
180  //------------------------------------------------------------------------------------------------------------------------------------------
181 
182  void PfoCreator::SetClusterPositionAndError(const unsigned int nHitsInCluster, pandora::FloatVector &hitE, pandora::FloatVector &hitX, pandora::FloatVector &hitY, pandora::FloatVector &hitZ, gar::rec::Cluster &pCluster, pandora::CartesianVector &clusterPositionVec) const
183  {
184  util::ClusterShapes pClusterShapes(nHitsInCluster, hitE.data(), hitX.data(), hitY.data(), hitZ.data());
185 
186  try
187  {
188  pCluster.setIPhi(std::atan2(pClusterShapes.getEigenVecInertia()[1], pClusterShapes.getEigenVecInertia()[0]));
189  pCluster.setITheta(std::acos(pClusterShapes.getEigenVecInertia()[2]));
190  pCluster.setPosition(pClusterShapes.getCenterOfGravity());
191  //pCluster->setPositionError(pClusterShapes->getCenterOfGravityErrors());
192  //pCluster->setDirectionError(pClusterShapes->getEigenVecInertiaErrors());
193  clusterPositionVec.SetValues(pClusterShapes.getCenterOfGravity()[0], pClusterShapes.getCenterOfGravity()[1], pClusterShapes.getCenterOfGravity()[2]);
194  }
195  catch (...)
196  {
197  MF_LOG_WARNING("PfoCreator::SetClusterPositionAndError")
198  << "unidentified exception caught.";
199  }
200  }
201 
202  //------------------------------------------------------------------------------------------------------------------------------------------
203 
204  pandora::StatusCode PfoCreator::CalculateTrackBasedReferencePoint(const pandora::ParticleFlowObject *const pPandoraPfo, pandora::CartesianVector &referencePoint) const
205  {
206  const pandora::TrackList &trackList(pPandoraPfo->GetTrackList());
207 
208  float totalTrackMomentumAtDca(0.f), totalTrackMomentumAtStart(0.f);
209  pandora::CartesianVector referencePointAtDCAWeighted(0.f, 0.f, 0.f), referencePointAtStartWeighted(0.f, 0.f, 0.f);
210 
211  bool hasSiblings(false);
212  for (pandora::TrackList::const_iterator tIter = trackList.begin(), tIterEnd = trackList.end(); tIter != tIterEnd; ++tIter)
213  {
214  const pandora::Track *const pPandoraTrack(*tIter);
215 
216  if (!this->IsValidParentTrack(pPandoraTrack, trackList))
217  continue;
218 
219  if (this->HasValidSiblingTrack(pPandoraTrack, trackList))
220  {
221  // Presence of sibling tracks typically represents a conversion
222  const pandora::CartesianVector &trackStartPoint((pPandoraTrack->GetTrackStateAtStart()).GetPosition());
223  const float trackStartMomentum(((pPandoraTrack->GetTrackStateAtStart()).GetMomentum()).GetMagnitude());
224  referencePointAtStartWeighted += trackStartPoint * trackStartMomentum;
225  totalTrackMomentumAtStart += trackStartMomentum;
226  hasSiblings = true;
227  }
228  // else
229  // {
230  // const gar::rec::Track *const pTrack = (gar::rec::Track*)(pPandoraTrack->GetParentAddress());
231  // const float z0(pPandoraTrack->GetZ0());
232  // pandora::CartesianVector intersectionPoint(0.f, 0.f, 0.f);
233  //
234  // intersectionPoint.SetValues(pTrack->getD0() * std::cos(pTrack->getPhi()), pTrack->getD0() * std::sin(pTrack->getPhi()), z0);
235  // const float trackMomentumAtDca((pPandoraTrack->GetMomentumAtDca()).GetMagnitude());
236  // referencePointAtDCAWeighted += intersectionPoint * trackMomentumAtDca;
237  // totalTrackMomentumAtDca += trackMomentumAtDca;
238  // }
239  }
240 
241  if (hasSiblings)
242  {
243  if (totalTrackMomentumAtStart < std::numeric_limits<float>::epsilon())
244  {
245  MF_LOG_WARNING("PfoCreator::CalculateTrackBasedReferencePoint")
246  << "invalid track momentum " << totalTrackMomentumAtStart;
247  throw pandora::StatusCodeException(pandora::STATUS_CODE_FAILURE);
248  }
249  else
250  {
251  referencePoint = referencePointAtStartWeighted * (1.f / totalTrackMomentumAtStart);
252  }
253  }
254  else
255  {
256  if (totalTrackMomentumAtDca < std::numeric_limits<float>::epsilon())
257  {
258  MF_LOG_WARNING("PfoCreator::CalculateTrackBasedReferencePoint")
259  << "invalid track momentum " << totalTrackMomentumAtDca;
260  throw pandora::StatusCodeException(pandora::STATUS_CODE_FAILURE);
261  }
262  else
263  {
264  referencePoint = referencePointAtDCAWeighted * (1.f / totalTrackMomentumAtDca);
265  }
266  }
267 
268  return pandora::STATUS_CODE_SUCCESS;
269  }
270 
271  //------------------------------------------------------------------------------------------------------------------------------------------
272 
273  bool PfoCreator::IsValidParentTrack(const pandora::Track *const pPandoraTrack, const pandora::TrackList &allTrackList) const
274  {
275  const pandora::TrackList &parentTrackList(pPandoraTrack->GetParentList());
276 
277  for (pandora::TrackList::const_iterator iter = parentTrackList.begin(), iterEnd = parentTrackList.end(); iter != iterEnd; ++iter)
278  {
279  if (allTrackList.end() != std::find(allTrackList.begin(), allTrackList.end(), *iter))
280  continue;
281 
282  // ATTN This track must have a parent not in the all track list; still use it if it is the closest to the ip
283  MF_LOG_WARNING("PfoCreator::IsValidParentTrack")
284  << "mismatch in track relationship information, use information as available ";
285 
286  if (this->IsClosestTrackToIP(pPandoraTrack, allTrackList))
287  return true;
288 
289  return false;
290  }
291 
292  // Ideal case: All parents are associated to same pfo
293  return true;
294  }
295 
296  //------------------------------------------------------------------------------------------------------------------------------------------
297 
298  bool PfoCreator::HasValidSiblingTrack(const pandora::Track *const pPandoraTrack, const pandora::TrackList &allTrackList) const
299  {
300  const pandora::TrackList &siblingTrackList(pPandoraTrack->GetSiblingList());
301  for (pandora::TrackList::const_iterator iter = siblingTrackList.begin(), iterEnd = siblingTrackList.end(); iter != iterEnd; ++iter) {
302  if (allTrackList.end() != std::find(allTrackList.begin(), allTrackList.end(), *iter))
303  continue;
304 
305  // ATTN This track must have a sibling not in the all track list; still use it if it has a second sibling that is in the list
306  MF_LOG_WARNING("PfoCreator::HasValidSiblingTrack") << "mismatch in track relationship information, use information as available ";
307 
308  if (this->AreAnyOtherSiblingsInList(pPandoraTrack, allTrackList))
309  return true;
310 
311  return false;
312  }
313 
314  return true;
315  }
316 
317  //------------------------------------------------------------------------------------------------------------------------------------------
318 
319  bool PfoCreator::IsClosestTrackToIP(const pandora::Track *const pPandoraTrack, const pandora::TrackList &allTrackList) const
320  {
321  const pandora::Track *pClosestTrack(NULL);
322  float closestTrackDisplacement(std::numeric_limits<float>::max());
323 
324  for (pandora::TrackList::const_iterator iter = allTrackList.begin(), iterEnd = allTrackList.end(); iter != iterEnd; ++iter)
325  {
326  const pandora::Track *const pTrack(*iter);
327  const float trialTrackDisplacement(pTrack->GetTrackStateAtStart().GetPosition().GetMagnitude());
328 
329  if (trialTrackDisplacement < closestTrackDisplacement)
330  {
331  closestTrackDisplacement = trialTrackDisplacement;
332  pClosestTrack = pTrack;
333  }
334  }
335 
336  return (pPandoraTrack == pClosestTrack);
337  }
338 
339  //------------------------------------------------------------------------------------------------------------------------------------------
340 
341  bool PfoCreator::AreAnyOtherSiblingsInList(const pandora::Track *const pPandoraTrack, const pandora::TrackList &allTrackList) const
342  {
343  const pandora::TrackList &siblingTrackList(pPandoraTrack->GetSiblingList());
344 
345  for (pandora::TrackList::const_iterator iter = siblingTrackList.begin(), iterEnd = siblingTrackList.end(); iter != iterEnd; ++iter)
346  {
347  if (allTrackList.end() != std::find(allTrackList.begin(), allTrackList.end(), *iter))
348  return true;
349  }
350 
351  return false;
352  }
353 
354  //------------------------------------------------------------------------------------------------------------------------------------------
355 
356  void PfoCreator::SetRecoParticleReferencePoint(const pandora::CartesianVector &referencePoint, gar::rec::PFParticle &pReconstructedParticle) const
357  {
358  const float referencePointArray[3] = {referencePoint.GetX(), referencePoint.GetY(), referencePoint.GetZ()};
359  pReconstructedParticle.setPosition(referencePointArray);
360  }
361 
362  //------------------------------------------------------------------------------------------------------------------------------------------
363 
364  void PfoCreator::AddTracksToRecoParticle(const pandora::ParticleFlowObject *const pPandoraPfo, gar::rec::PFParticle & /* pReconstructedParticle */) const
365  {
366  const pandora::TrackList &trackList(pPandoraPfo->GetTrackList());
367 
368  for (pandora::TrackList::const_iterator tIter = trackList.begin(), tIterEnd = trackList.end(); tIter != tIterEnd; ++tIter)
369  {
370  // const pandora::Track *const pTrack(*tIter);
371  // pReconstructedParticle->addTrack((gar::rec::Track*)(pTrack->GetParentAddress()));
372  }
373  }
374 
375  //------------------------------------------------------------------------------------------------------------------------------------------
376 
377  void PfoCreator::SetRecoParticlePropertiesFromPFO(const pandora::ParticleFlowObject *const pPandoraPfo, gar::rec::PFParticle &pReconstructedParticle) const
378  {
379  const float momentum[3] = {pPandoraPfo->GetMomentum().GetX(), pPandoraPfo->GetMomentum().GetY(), pPandoraPfo->GetMomentum().GetZ()};
380  pReconstructedParticle.setMomentum(momentum);
381  pReconstructedParticle.setEnergy(pPandoraPfo->GetEnergy());
382  pReconstructedParticle.setMass(pPandoraPfo->GetMass());
383  pReconstructedParticle.setCharge(pPandoraPfo->GetCharge());
384  pReconstructedParticle.setType(pPandoraPfo->GetParticleId());
385  }
386 
387  //------------------------------------------------------------------------------------------------------------------------------------------
388 
390  m_emStochasticTerm(0.17f),
391  m_emConstantTerm(0.01f),
392  m_hadStochasticTerm(0.30f),
393  m_hadConstantTerm(0.01f)
394  {
395  }
396  }
397 }
void SetRecoParticleReferencePoint(const pandora::CartesianVector &referencePoint, gar::rec::PFParticle &pReconstructedParticle) const
Set reference point of the reconstructed particle.
Definition: PfoCreator.cxx:356
bool AreAnyOtherSiblingsInList(const pandora::Track *const pPandoraTrack, const pandora::TrackList &allTrackList) const
Whether at least one track sibling track is associated to the reconstructed particle.
Definition: PfoCreator.cxx:341
bool IsClosestTrackToIP(const pandora::Track *const pPandoraTrack, const pandora::TrackList &allTrackList) const
Whether the track is the closest (of those associated with the same pfo) to the interaction point...
Definition: PfoCreator.cxx:319
std::unique_ptr< std::vector< rec::PFParticle > > PFParticleCollection
Definition: PfoCreator.h:24
pandora::StatusCode CalculateTrackBasedReferencePoint(const pandora::ParticleFlowObject *const pPandoraPfo, pandora::CartesianVector &referencePoint) const
Calculate reference point for pfo with tracks.
Definition: PfoCreator.cxx:204
void setMass(float mass)
Definition: PFParticle.cxx:80
float m_hadConstantTerm
The constant term for HAD shower energy resolution.
Definition: PfoCreator.h:35
float Mass() const
Definition: PFParticle.h:94
bool IsValidParentTrack(const pandora::Track *const pPandoraTrack, const pandora::TrackList &allTrackList) const
Whether parent and daughter tracks are associated with the same pfo.
Definition: PfoCreator.cxx:273
void SetClusterEnergyAndError(const pandora::ParticleFlowObject *const pPandoraPfo, const pandora::Cluster *const pPandoraCluster, gar::rec::Cluster &pCluster, float &clusterCorrectEnergy) const
Set cluster energies and errors.
Definition: PfoCreator.cxx:164
PfoCreator(const Settings &settings, const pandora::Pandora *const pPandora, const RotationTransformation *const pRotation)
Definition: PfoCreator.cxx:20
void setEnergy(float energy)
Definition: PFParticle.cxx:61
std::set< const gar::rec::Track * > TrackList
Definition: TrackCreator.h:14
float m_hadStochasticTerm
The stochastic term for HAD shower energy resolution.
Definition: PfoCreator.h:34
intermediate_table::const_iterator const_iterator
float Energy() const
Definition: PFParticle.h:91
void setEnergyError(float energy_error)
Definition: Cluster.cxx:23
const pandora::Pandora & m_pandora
Reference to the pandora object from which to extract the pfos.
Definition: PfoCreator.h:161
T abs(T value)
const RotationTransformation & m_rotation
Definition: PfoCreator.h:162
void setEnergy(float energy)
Definition: Cluster.cxx:18
float m_emConstantTerm
The constant term for EM shower energy resolution.
Definition: PfoCreator.h:33
void setPosition(const float *position)
Definition: Cluster.cxx:34
def move(depos, offset)
Definition: depos.py:107
void SetRecoParticlePropertiesFromPFO(const pandora::ParticleFlowObject *const pPandoraPfo, gar::rec::PFParticle &pReconstructedParticle) const
Set properties of reconstructed particle from pandora pfo.
Definition: PfoCreator.cxx:377
bool HasValidSiblingTrack(const pandora::Track *const pPandoraTrack, const pandora::TrackList &allTrackList) const
Whether sibling tracks are associated with the same pfo.
Definition: PfoCreator.cxx:298
float Energy() const
Definition: CaloHit.h:69
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: DataViewImpl.h:686
static int max(int a, int b)
void SetClusterSubDetectorEnergies(const pandora::StringVector &subDetectorNames, const pandora::CaloHitList &pandoraCaloHitList, pandora::FloatVector &hitE, pandora::FloatVector &hitX, pandora::FloatVector &hitY, pandora::FloatVector &hitZ) const
Set sub detector energies for a cluster.
Definition: PfoCreator.cxx:140
float m_emStochasticTerm
The stochastic term for EM shower energy resolution.
Definition: PfoCreator.h:32
void SetClusterPositionAndError(const unsigned int nHitsInCluster, pandora::FloatVector &hitE, pandora::FloatVector &hitX, pandora::FloatVector &hitY, pandora::FloatVector &hitZ, gar::rec::Cluster &pCluster, pandora::CartesianVector &clusterPositionVec) const
Set cluster position, errors and other shape info, by calculating culster shape first.
Definition: PfoCreator.cxx:182
General GArSoft Utilities.
const float * Position() const
Definition: CaloHit.h:70
void setIPhi(float phi)
Definition: Cluster.cxx:44
void setMomentum(const float mom[3])
Definition: PFParticle.cxx:73
void setITheta(float theta)
Definition: Cluster.cxx:39
void InitialiseSubDetectorNames(pandora::StringVector &subDetectorNames) const
initialise sub detector name strings
Definition: PfoCreator.cxx:133
void AddTracksToRecoParticle(const pandora::ParticleFlowObject *const pPandoraPfo, gar::rec::PFParticle &pReconstructedParticle) const
Add tracks to reconstructed particle.
Definition: PfoCreator.cxx:364
pandora::StatusCode CreateParticleFlowObjects(art::Event &pEvent)
Definition: PfoCreator.cxx:35
std::vector< string > StringVector
Definition: fcldump.cxx:29
void setPosition(const float pos[3])
Definition: PFParticle.cxx:66
void setCharge(float charge)
Definition: PFParticle.cxx:85
#define MF_LOG_DEBUG(id)
void setType(int type)
Definition: PFParticle.cxx:56
std::unique_ptr< std::vector< rec::Cluster > > ClusterCollection
Definition: PfoCreator.h:25
TrackCollectionProxyElement< TrackCollProxy > Track
Proxy to an element of a proxy collection of recob::Track objects.
Definition: Track.h:1036
Dft::FloatVector FloatVector
#define MF_LOG_WARNING(category)
def momentum(x1, x2, x3, scale=1.)
const Settings m_settings
The pfo creator settings.
Definition: PfoCreator.h:160
float Energy() const
Definition: Cluster.h:92