All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
lar_pandora::LArPandoraEvent::Labels Class Reference

Class to handle the required producer labels. More...

#include <LArPandoraEvent.h>

Public Types

enum  LabelType {
  PFParticleLabel, SpacePointLabel, ClusterLabel, VertexLabel,
  SliceLabel, TrackLabel, ShowerLabel, T0Label,
  PFParticleMetadataLabel, PCAxisLabel, HitLabel, PFParticleToSpacePointLabel,
  PFParticleToClusterLabel, PFParticleToVertexLabel, PFParticleToSliceLabel, PFParticleToTrackLabel,
  PFParticleToShowerLabel, PFParticleToT0Label, PFParticleToMetadataLabel, PFParticleToPCAxisLabel,
  SpacePointToHitLabel, ClusterToHitLabel, SliceToHitLabel, TrackToHitLabel,
  ShowerToHitLabel, ShowerToPCAxisLabel
}
 Label type enumeration. More...
 

Public Member Functions

 Labels (const std::string &pfParticleProducerLabel, const std::string &hitProducerLabel)
 Minimal parametrised constructor. Sets all collection labels to be the same as the PFParticle producer label. More...
 
 Labels (const std::string &pfParticleProducerLabel, const std::string &trackProducerLabel, const std::string &showerProducerLabel, const std::string &hitProducerLabel)
 Track / Shower parametrised constructor. Sets all collection labels to be the same as the PFParticle producer label, except those relating to track and shower production, which are supplied. More...
 
const std::string & GetLabel (const LabelType type) const
 Get the label of a given type. More...
 
void SetLabel (const LabelType type, const std::string &label)
 Set the label of a given type. More...
 

Private Attributes

std::map< LabelType, std::string > m_labels
 Map holding the labels. More...
 

Detailed Description

Class to handle the required producer labels.

Definition at line 98 of file LArPandoraEvent.h.

Member Enumeration Documentation

Label type enumeration.

Enumerator
PFParticleLabel 
SpacePointLabel 
ClusterLabel 
VertexLabel 
SliceLabel 
TrackLabel 
ShowerLabel 
T0Label 
PFParticleMetadataLabel 
PCAxisLabel 
HitLabel 
PFParticleToSpacePointLabel 
PFParticleToClusterLabel 
PFParticleToVertexLabel 
PFParticleToSliceLabel 
PFParticleToTrackLabel 
PFParticleToShowerLabel 
PFParticleToT0Label 
PFParticleToMetadataLabel 
PFParticleToPCAxisLabel 
SpacePointToHitLabel 
ClusterToHitLabel 
SliceToHitLabel 
TrackToHitLabel 
ShowerToHitLabel 
ShowerToPCAxisLabel 

Definition at line 104 of file LArPandoraEvent.h.

105  {
108  ClusterLabel,
109  VertexLabel,
110  SliceLabel,
111  TrackLabel,
112  ShowerLabel,
113  T0Label,
115  PCAxisLabel,
116  HitLabel,
132  };

Constructor & Destructor Documentation

lar_pandora::LArPandoraEvent::Labels::Labels ( const std::string &  pfParticleProducerLabel,
const std::string &  hitProducerLabel 
)

Minimal parametrised constructor. Sets all collection labels to be the same as the PFParticle producer label.

Definition at line 144 of file LArPandoraEvent.cxx.

145 {
146  m_labels.emplace(PFParticleLabel, pfParticleProducerLabel);
147  m_labels.emplace(SpacePointLabel, pfParticleProducerLabel);
148  m_labels.emplace(ClusterLabel, pfParticleProducerLabel);
149  m_labels.emplace(VertexLabel, pfParticleProducerLabel);
150  m_labels.emplace(SliceLabel, pfParticleProducerLabel);
151  m_labels.emplace(TrackLabel, pfParticleProducerLabel);
152  m_labels.emplace(ShowerLabel, pfParticleProducerLabel);
153  m_labels.emplace(T0Label, pfParticleProducerLabel);
154  m_labels.emplace(PFParticleMetadataLabel, pfParticleProducerLabel);
155  m_labels.emplace(PCAxisLabel, pfParticleProducerLabel);
156  m_labels.emplace(HitLabel, hitProducerLabel);
157 
158  m_labels.emplace(PFParticleToSpacePointLabel, pfParticleProducerLabel);
159  m_labels.emplace(PFParticleToClusterLabel, pfParticleProducerLabel);
160  m_labels.emplace(PFParticleToVertexLabel, pfParticleProducerLabel);
161  m_labels.emplace(PFParticleToSliceLabel, pfParticleProducerLabel);
162  m_labels.emplace(PFParticleToTrackLabel, pfParticleProducerLabel);
163  m_labels.emplace(PFParticleToShowerLabel, pfParticleProducerLabel);
164  m_labels.emplace(PFParticleToT0Label, pfParticleProducerLabel);
165  m_labels.emplace(PFParticleToMetadataLabel, pfParticleProducerLabel);
166  m_labels.emplace(PFParticleToPCAxisLabel, pfParticleProducerLabel);
167  m_labels.emplace(SpacePointToHitLabel, pfParticleProducerLabel);
168  m_labels.emplace(ClusterToHitLabel, pfParticleProducerLabel);
169  m_labels.emplace(SliceToHitLabel, pfParticleProducerLabel);
170  m_labels.emplace(TrackToHitLabel, pfParticleProducerLabel);
171  m_labels.emplace(ShowerToHitLabel, pfParticleProducerLabel);
172  m_labels.emplace(ShowerToPCAxisLabel, pfParticleProducerLabel);
173 }
std::map< LabelType, std::string > m_labels
Map holding the labels.
lar_pandora::LArPandoraEvent::Labels::Labels ( const std::string &  pfParticleProducerLabel,
const std::string &  trackProducerLabel,
const std::string &  showerProducerLabel,
const std::string &  hitProducerLabel 
)

Track / Shower parametrised constructor. Sets all collection labels to be the same as the PFParticle producer label, except those relating to track and shower production, which are supplied.

Definition at line 177 of file LArPandoraEvent.cxx.

179 {
180  m_labels.emplace(PFParticleLabel, pfParticleProducerLabel);
181  m_labels.emplace(SpacePointLabel, pfParticleProducerLabel);
182  m_labels.emplace(ClusterLabel, pfParticleProducerLabel);
183  m_labels.emplace(VertexLabel, pfParticleProducerLabel);
184  m_labels.emplace(SliceLabel, pfParticleProducerLabel);
185  m_labels.emplace(TrackLabel, trackProducerLabel);
186  m_labels.emplace(ShowerLabel, showerProducerLabel);
187  m_labels.emplace(T0Label, pfParticleProducerLabel);
188  m_labels.emplace(PFParticleMetadataLabel, pfParticleProducerLabel);
189  m_labels.emplace(PCAxisLabel, showerProducerLabel);
190  m_labels.emplace(HitLabel, hitProducerLabel);
191 
192  m_labels.emplace(PFParticleToSpacePointLabel, pfParticleProducerLabel);
193  m_labels.emplace(PFParticleToClusterLabel, pfParticleProducerLabel);
194  m_labels.emplace(PFParticleToVertexLabel, pfParticleProducerLabel);
195  m_labels.emplace(PFParticleToSliceLabel, pfParticleProducerLabel);
196  m_labels.emplace(PFParticleToTrackLabel, trackProducerLabel);
197  m_labels.emplace(PFParticleToShowerLabel, showerProducerLabel);
198  m_labels.emplace(PFParticleToT0Label, pfParticleProducerLabel);
199  m_labels.emplace(PFParticleToMetadataLabel, pfParticleProducerLabel);
200  m_labels.emplace(PFParticleToPCAxisLabel, showerProducerLabel);
201  m_labels.emplace(SpacePointToHitLabel, pfParticleProducerLabel);
202  m_labels.emplace(ClusterToHitLabel, pfParticleProducerLabel);
203  m_labels.emplace(SliceToHitLabel, pfParticleProducerLabel);
204  m_labels.emplace(TrackToHitLabel, trackProducerLabel);
205  m_labels.emplace(ShowerToHitLabel, showerProducerLabel);
206  m_labels.emplace(ShowerToPCAxisLabel, showerProducerLabel);
207 }
std::map< LabelType, std::string > m_labels
Map holding the labels.

Member Function Documentation

const std::string & lar_pandora::LArPandoraEvent::Labels::GetLabel ( const LabelType  type) const

Get the label of a given type.

Parameters
typethe label type to retrieve
Returns
the label

Definition at line 211 of file LArPandoraEvent.cxx.

212 {
213  if (m_labels.find(type) == m_labels.end())
214  throw cet::exception("LArPandora") << " LArPandoraEvent::GetLabel -- Label map doesn't contain label of requested type" << std::endl;
215 
216  return m_labels.at(type);
217 }
std::map< LabelType, std::string > m_labels
Map holding the labels.
void lar_pandora::LArPandoraEvent::Labels::SetLabel ( const LabelType  type,
const std::string &  label 
)

Set the label of a given type.

Parameters
typethe label type to set
labelthe label to set

Definition at line 221 of file LArPandoraEvent.cxx.

222 {
223  m_labels[type] = label;
224 }
std::map< LabelType, std::string > m_labels
Map holding the labels.

Member Data Documentation

std::map<LabelType, std::string> lar_pandora::LArPandoraEvent::Labels::m_labels
private

Map holding the labels.

Definition at line 166 of file LArPandoraEvent.h.


The documentation for this class was generated from the following files: