LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
lar_content::VertexMonitoringAlgorithm Class Reference

VertexMonitoringAlgorithm class. More...

#include "VertexMonitoringAlgorithm.h"

Inheritance diagram for lar_content::VertexMonitoringAlgorithm:

Public Member Functions

 VertexMonitoringAlgorithm ()
 Default constructor. More...
 
virtual ~VertexMonitoringAlgorithm ()
 

Private Member Functions

pandora::StatusCode AssessVertices () const
 
pandora::StatusCode AssessSecondaryVertices () const
 
pandora::StatusCode Run ()
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 

Private Attributes

bool m_visualise
 Whether to produce visual monitoring output. More...
 
bool m_writeFile
 Whether to produce ROOT output file. More...
 
bool m_useSecondaries
 Whether to assess secondary vertices. More...
 
std::string m_filename
 The filename of the ROOT output file. More...
 
std::string m_treename
 The name of the ROOT tree. More...
 
std::string m_secVertexListName
 The name of the list containing secondary vertices. More...
 
float m_transparencyThresholdE
 Cell energy for which transparency is saturated (0%, fully opaque) More...
 
float m_energyScaleThresholdE
 Cell energy for which color is at top end of continous color palette. More...
 
float m_scalingFactor
 TEve works with [cm], Pandora usually works with [mm] (but LArContent went with cm too) More...
 

Detailed Description

VertexMonitoringAlgorithm class.

Definition at line 19 of file VertexMonitoringAlgorithm.h.

Constructor & Destructor Documentation

lar_content::VertexMonitoringAlgorithm::VertexMonitoringAlgorithm ( )

Default constructor.

Definition at line 25 of file VertexMonitoringAlgorithm.cc.

References m_energyScaleThresholdE, m_scalingFactor, m_transparencyThresholdE, m_useSecondaries, and m_writeFile.

25  :
26  m_visualise{true},
27  m_writeFile{false},
28  m_useSecondaries{false},
31  m_scalingFactor{1.f}
32 {
33 }
bool m_useSecondaries
Whether to assess secondary vertices.
bool m_writeFile
Whether to produce ROOT output file.
float m_energyScaleThresholdE
Cell energy for which color is at top end of continous color palette.
float m_scalingFactor
TEve works with [cm], Pandora usually works with [mm] (but LArContent went with cm too) ...
bool m_visualise
Whether to produce visual monitoring output.
float m_transparencyThresholdE
Cell energy for which transparency is saturated (0%, fully opaque)
lar_content::VertexMonitoringAlgorithm::~VertexMonitoringAlgorithm ( )
virtual

Definition at line 37 of file VertexMonitoringAlgorithm.cc.

References m_filename, m_treename, and m_writeFile.

38 {
39  if (m_writeFile)
40  {
41  PANDORA_MONITORING_API(SaveTree(this->GetPandora(), m_treename.c_str(), m_filename.c_str(), "UPDATE"));
42  }
43 }
bool m_writeFile
Whether to produce ROOT output file.
std::string m_filename
The filename of the ROOT output file.
std::string m_treename
The name of the ROOT tree.

Member Function Documentation

StatusCode lar_content::VertexMonitoringAlgorithm::AssessSecondaryVertices ( ) const
private

Definition at line 229 of file VertexMonitoringAlgorithm.cc.

References lar_content::LArEventTopology::ConstructVisibleHierarchy(), f, lar_content::LArEventTopology::GetVertices(), m_secVertexListName, m_treename, m_visualise, and m_writeFile.

Referenced by Run().

230 {
231 #ifdef MONITORING
232  const CaloHitList *pCaloHitList2D{nullptr};
233  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetList(*this, "CaloHitList2D", pCaloHitList2D));
234  LArEventTopology eventTopology(*pCaloHitList2D);
235  eventTopology.ConstructVisibleHierarchy();
236  //eventTopology.PruneHierarchy();
237  CartesianPointVector trueVertices;
238  eventTopology.GetVertices(trueVertices);
239  if (trueVertices.empty())
240  return STATUS_CODE_SUCCESS;
241 
242  const VertexList *pRecoVertexList{nullptr};
243  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetList(*this, m_secVertexListName, pRecoVertexList));
244  CartesianPointVector recoVertices;
245  for (const Vertex *const pVertex : *pRecoVertexList)
246  recoVertices.emplace_back(pVertex->GetPosition());
247 
248  std::vector<std::pair<CartesianVector, CartesianVector>> matches;
249  for (const CartesianVector &recoVertex : recoVertices)
250  {
251  float best{std::numeric_limits<float>::max()};
252  matches.emplace_back(std::make_pair(recoVertex, trueVertices.front()));
253  for (const CartesianVector &trueVertex : trueVertices)
254  {
255  const float current{(recoVertex - trueVertex).GetMagnitudeSquared()};
256  if (current < best)
257  {
258  best = current;
259  matches.back().second = trueVertex;
260  }
261  }
262 
263  if (m_writeFile)
264  {
265  const CartesianVector delta{recoVertex - matches.back().second};
266  const float dx{delta.GetX()}, dy{delta.GetY()}, dz{delta.GetZ()}, dr{delta.GetMagnitude()};
267  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "dx", dx));
268  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "dy", dy));
269  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "dz", dz));
270  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "dr", dr));
271  PANDORA_MONITORING_API(FillTree(this->GetPandora(), m_treename.c_str()));
272  }
273 
274  if (m_visualise)
275  {
276  std::cout << "(" << matches.back().first.GetX() << "," << matches.back().first.GetY() << "," << matches.back().first.GetZ() << ")"
277  << " == " << matches.back().second.GetX() << "," << matches.back().second.GetY() << ","
278  << matches.back().second.GetZ() << std::endl;
279  const LArTransformationPlugin *transform{this->GetPandora().GetPlugins()->GetLArTransformationPlugin()};
280  const CartesianVector ur(matches.back().first.GetX(), 0.f,
281  static_cast<float>(transform->YZtoU(matches.back().first.GetY(), matches.back().first.GetZ())));
282  const CartesianVector vr(matches.back().first.GetX(), 0.f,
283  static_cast<float>(transform->YZtoV(matches.back().first.GetY(), matches.back().first.GetZ())));
284  const CartesianVector wr(matches.back().first.GetX(), 0.f,
285  static_cast<float>(transform->YZtoW(matches.back().second.GetY(), matches.back().first.GetZ())));
286  const CartesianVector ut(matches.back().second.GetX(), 0.f,
287  static_cast<float>(transform->YZtoU(matches.back().second.GetY(), matches.back().second.GetZ())));
288  const CartesianVector vt(matches.back().second.GetX(), 0.f,
289  static_cast<float>(transform->YZtoV(matches.back().second.GetY(), matches.back().second.GetZ())));
290  const CartesianVector wt(matches.back().second.GetX(), 0.f,
291  static_cast<float>(transform->YZtoW(matches.back().second.GetY(), matches.back().second.GetZ())));
292 
293  PANDORA_MONITORING_API(SetEveDisplayParameters(this->GetPandora(), true, DETECTOR_VIEW_XZ, -1.f, 1.f, 1.f));
294  PANDORA_MONITORING_API(AddMarkerToVisualization(this->GetPandora(), &ur, "Ur", RED, 1));
295  PANDORA_MONITORING_API(AddMarkerToVisualization(this->GetPandora(), &vr, "Vr", RED, 1));
296  PANDORA_MONITORING_API(AddMarkerToVisualization(this->GetPandora(), &wr, "Wr", RED, 1));
297  PANDORA_MONITORING_API(AddMarkerToVisualization(this->GetPandora(), &ut, "Ut", BLUE, 1));
298  PANDORA_MONITORING_API(AddMarkerToVisualization(this->GetPandora(), &vt, "Vt", BLUE, 1));
299  PANDORA_MONITORING_API(AddMarkerToVisualization(this->GetPandora(), &wt, "Wt", BLUE, 1));
300  PANDORA_MONITORING_API(ViewEvent(this->GetPandora()));
301  }
302  }
303 #endif
304 
305  return STATUS_CODE_SUCCESS;
306 }
bool m_writeFile
Whether to produce ROOT output file.
TFile f
Definition: plotHisto.C:6
bool m_visualise
Whether to produce visual monitoring output.
std::string m_secVertexListName
The name of the list containing secondary vertices.
std::string m_treename
The name of the ROOT tree.
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex
Definition: ModuleGraph.h:25
std::list< Vertex > VertexList
Definition: DCEL.h:169
StatusCode lar_content::VertexMonitoringAlgorithm::AssessVertices ( ) const
private

Definition at line 70 of file VertexMonitoringAlgorithm.cc.

References lar_content::LArInteractionTypeHelper::GetInteractionDescriptor(), lar_content::LArMCParticleHelper::GetPrimaryMCParticleList(), lar_content::LArPfoHelper::GetVertex(), lar_content::LArVertexHelper::IsInFiducialVolume(), lar_content::LArMCParticleHelper::IsNeutrino(), lar_content::LArPfoHelper::IsNeutrino(), m_treename, m_visualise, and m_writeFile.

Referenced by Run().

71 {
72 #ifdef MONITORING
73  const MCParticleList *pMCParticleList{nullptr};
74  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetCurrentList(*this, pMCParticleList));
75  const PfoList *pPfoList{nullptr};
76  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetCurrentList(*this, pPfoList));
77 
79  MCParticleVector primaries;
80  LArMCParticleHelper::GetPrimaryMCParticleList(pMCParticleList, primaries);
81  const MCParticle *pTrueNeutrino{nullptr};
82  const ParticleFlowObject *pRecoNeutrino{nullptr};
83  if (!primaries.empty())
84  {
85  for (const MCParticle *primary : primaries)
86  {
87  const MCParticleList &parents{primary->GetParentList()};
88  if (parents.size() == 1 && LArMCParticleHelper::IsNeutrino(parents.front()))
89  {
90  pTrueNeutrino = parents.front();
91  break;
92  }
93  }
94  }
95 
96  for (const ParticleFlowObject *pPfo : *pPfoList)
97  {
98  if (LArPfoHelper::IsNeutrino(pPfo))
99  {
100  pRecoNeutrino = pPfo;
101  break;
102  }
103  }
104 
105  MCParticleList primariesList(primaries.begin(), primaries.end());
106  const InteractionDescriptor descriptor{LArInteractionTypeHelper::GetInteractionDescriptor(primariesList)};
107 
108  if (pRecoNeutrino && pTrueNeutrino)
109  {
110  const LArTransformationPlugin *transform{this->GetPandora().GetPlugins()->GetLArTransformationPlugin()};
111  const CartesianVector &trueVertex{pTrueNeutrino->GetVertex()};
112  const CartesianVector &recoVertex{LArPfoHelper::GetVertex(pRecoNeutrino)->GetPosition()};
113  if (m_visualise)
114  {
115  const CartesianVector tu(trueVertex.GetX(), 0.f, static_cast<float>(transform->YZtoU(trueVertex.GetY(), trueVertex.GetZ())));
116  const CartesianVector tv(trueVertex.GetX(), 0.f, static_cast<float>(transform->YZtoV(trueVertex.GetY(), trueVertex.GetZ())));
117  const CartesianVector tw(trueVertex.GetX(), 0.f, static_cast<float>(transform->YZtoW(trueVertex.GetY(), trueVertex.GetZ())));
118 
119  const CartesianVector ru(recoVertex.GetX(), 0.f, static_cast<float>(transform->YZtoU(recoVertex.GetY(), recoVertex.GetZ())));
120  const CartesianVector rv(recoVertex.GetX(), 0.f, static_cast<float>(transform->YZtoV(recoVertex.GetY(), recoVertex.GetZ())));
121  const CartesianVector rw(recoVertex.GetX(), 0.f, static_cast<float>(transform->YZtoW(recoVertex.GetY(), recoVertex.GetZ())));
122 
123  const float du{(ru - tu).GetMagnitude()};
124  const float dv{(rv - tv).GetMagnitude()};
125  const float dw{(rw - tw).GetMagnitude()};
126 
127  std::cout << "delta(u, v, w): (" << du << ", " << dv << "," << dw << ")" << std::endl;
128 
129  PANDORA_MONITORING_API(AddMarkerToVisualization(this->GetPandora(), &tu, "U true vertex", BLUE, 2));
130  PANDORA_MONITORING_API(AddMarkerToVisualization(this->GetPandora(), &tv, "V true vertex", BLUE, 2));
131  PANDORA_MONITORING_API(AddMarkerToVisualization(this->GetPandora(), &tw, "W true vertex", BLUE, 2));
132  PANDORA_MONITORING_API(AddMarkerToVisualization(this->GetPandora(), &ru, "U reco vertex", RED, 2));
133  PANDORA_MONITORING_API(AddMarkerToVisualization(this->GetPandora(), &rv, "V reco vertex", RED, 2));
134  PANDORA_MONITORING_API(AddMarkerToVisualization(this->GetPandora(), &rw, "W reco vertex", RED, 2));
135  }
136 
137  if (m_writeFile && LArVertexHelper::IsInFiducialVolume(this->GetPandora(), trueVertex, "dune_fd_hd"))
138  {
139  const CartesianVector delta{recoVertex - trueVertex};
140  const float dx{delta.GetX()}, dy{delta.GetY()}, dz{delta.GetZ()}, dr{delta.GetMagnitude()};
141  const float trueNuEnergy{pTrueNeutrino->GetEnergy()};
142  const int success{1};
143  const int isCC{descriptor.IsCC()};
144  const int isQE{descriptor.IsQE()};
145  const int isRes{descriptor.IsResonant()};
146  const int isDIS{descriptor.IsDIS()};
147  const int isCoh{descriptor.IsCoherent()};
148  const int isOther{!(isCC || isQE || isRes || isDIS)};
149  const int isMu{descriptor.IsMuonNeutrino()};
150  const int isElectron{descriptor.IsElectronNeutrino()};
151  const int nPiZero{static_cast<int>(descriptor.GetNumPiZero())};
152  const int nPiPlus{static_cast<int>(descriptor.GetNumPiPlus())};
153  const int nPiMinus{static_cast<int>(descriptor.GetNumPiMinus())};
154  const int nPhotons{static_cast<int>(descriptor.GetNumPhotons())};
155  const int nProtons{static_cast<int>(descriptor.GetNumProtons())};
156  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "success", success));
157  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "trueNuEnergy", trueNuEnergy));
158  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "isCC", isCC));
159  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "isQE", isQE));
160  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "isRes", isRes));
161  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "isDIS", isDIS));
162  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "isCoh", isCoh));
163  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "isOther", isOther));
164  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "isMu", isMu));
165  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "isElectron", isElectron));
166  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "nPiZero", nPiZero));
167  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "nPiPlus", nPiPlus));
168  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "nPiMinus", nPiMinus));
169  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "nPhotons", nPhotons));
170  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "nProtons", nProtons));
171  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "dx", dx));
172  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "dy", dy));
173  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "dz", dz));
174  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "dr", dr));
175  PANDORA_MONITORING_API(FillTree(this->GetPandora(), m_treename.c_str()));
176  }
177  }
178  else if (pTrueNeutrino)
179  {
180  const CartesianVector &trueVertex{pTrueNeutrino->GetVertex()};
181 
182  if (m_writeFile && LArVertexHelper::IsInFiducialVolume(this->GetPandora(), trueVertex, "dune_fd_hd"))
183  {
184  const int success{0};
185  const float dx{-999.f}, dy{-999.f}, dz{-999.f}, dr{-999.f};
186  const float trueNuEnergy{pTrueNeutrino->GetEnergy()};
187  const int isCC{descriptor.IsCC()};
188  const int isQE{descriptor.IsQE()};
189  const int isRes{descriptor.IsResonant()};
190  const int isDIS{descriptor.IsDIS()};
191  const int isCoh{descriptor.IsCoherent()};
192  const int isOther{!(isCC || isQE || isRes || isDIS)};
193  const int isMu{descriptor.IsMuonNeutrino()};
194  const int isElectron{descriptor.IsElectronNeutrino()};
195  const int nPiZero{static_cast<int>(descriptor.GetNumPiZero())};
196  const int nPiPlus{static_cast<int>(descriptor.GetNumPiPlus())};
197  const int nPiMinus{static_cast<int>(descriptor.GetNumPiMinus())};
198  const int nPhotons{static_cast<int>(descriptor.GetNumPhotons())};
199  const int nProtons{static_cast<int>(descriptor.GetNumProtons())};
200  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "success", success));
201  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "trueNuEnergy", trueNuEnergy));
202  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "isCC", isCC));
203  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "isQE", isQE));
204  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "isRes", isRes));
205  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "isDIS", isDIS));
206  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "isCoh", isCoh));
207  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "isOther", isOther));
208  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "isMu", isMu));
209  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "isElectron", isElectron));
210  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "nPiZero", nPiZero));
211  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "nPiPlus", nPiPlus));
212  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "nPiMinus", nPiMinus));
213  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "nPhotons", nPhotons));
214  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "nProtons", nProtons));
215  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "dx", dx));
216  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "dy", dy));
217  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "dz", dz));
218  PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(), m_treename.c_str(), "dr", dr));
219  PANDORA_MONITORING_API(FillTree(this->GetPandora(), m_treename.c_str()));
220  }
221  }
222 #endif
223 
224  return STATUS_CODE_SUCCESS;
225 }
std::unordered_map< const pandora::MCParticle *, pandora::CaloHitList > MCContributionMap
bool m_writeFile
Whether to produce ROOT output file.
static const pandora::Vertex * GetVertex(const pandora::ParticleFlowObject *const pPfo)
Get the pfo vertex.
bool m_visualise
Whether to produce visual monitoring output.
std::vector< art::Ptr< simb::MCParticle > > MCParticleVector
static bool IsNeutrino(const pandora::ParticleFlowObject *const pPfo)
Whether a pfo is a neutrino or (antineutrino)
static bool IsInFiducialVolume(const pandora::Pandora &pandora, const pandora::CartesianVector &vertex, const std::string &detector)
Determine if a vertex is within a detector&#39;s fiducial volume. This throws a STATUS_CODE_INVALID_PARAM...
static void GetPrimaryMCParticleList(const pandora::MCParticleList *const pMCParticleList, pandora::MCParticleVector &mcPrimaryVector)
Get vector of primary MC particles from an input list of MC particles.
std::string m_treename
The name of the ROOT tree.
static InteractionDescriptor GetInteractionDescriptor(const pandora::MCParticleList &mcPrimaryList)
Get the interaction descriptor of an event.
static bool IsNeutrino(const pandora::MCParticle *const pMCParticle)
Whether a mc particle is a neutrino or antineutrino.
StatusCode lar_content::VertexMonitoringAlgorithm::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
private

Definition at line 310 of file VertexMonitoringAlgorithm.cc.

References m_energyScaleThresholdE, m_filename, m_scalingFactor, m_secVertexListName, m_transparencyThresholdE, m_treename, m_useSecondaries, m_visualise, and m_writeFile.

311 {
312  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "Visualize", m_visualise));
313  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "WriteFile", m_writeFile));
314  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "UseSecondaries", m_useSecondaries));
315 
316  if (m_writeFile)
317  {
318  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle, "Filename", m_filename));
319  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle, "Treename", m_treename));
320  }
321  if (m_useSecondaries)
322  {
323  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, XmlHelper::ReadValue(xmlHandle, "SecondaryVertexListName", m_secVertexListName));
324  }
325 
326  PANDORA_RETURN_RESULT_IF_AND_IF(
327  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "TransparencyThresholdE", m_transparencyThresholdE));
328  PANDORA_RETURN_RESULT_IF_AND_IF(
329  STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "EnergyScaleThresholdE", m_energyScaleThresholdE));
330  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, "ScalingFactor", m_scalingFactor));
331 
332  return STATUS_CODE_SUCCESS;
333 }
bool m_useSecondaries
Whether to assess secondary vertices.
bool m_writeFile
Whether to produce ROOT output file.
float m_energyScaleThresholdE
Cell energy for which color is at top end of continous color palette.
float m_scalingFactor
TEve works with [cm], Pandora usually works with [mm] (but LArContent went with cm too) ...
bool m_visualise
Whether to produce visual monitoring output.
std::string m_secVertexListName
The name of the list containing secondary vertices.
std::string m_filename
The filename of the ROOT output file.
std::string m_treename
The name of the ROOT tree.
float m_transparencyThresholdE
Cell energy for which transparency is saturated (0%, fully opaque)
StatusCode lar_content::VertexMonitoringAlgorithm::Run ( )
private

Definition at line 47 of file VertexMonitoringAlgorithm.cc.

References AssessSecondaryVertices(), AssessVertices(), m_energyScaleThresholdE, m_scalingFactor, m_transparencyThresholdE, m_useSecondaries, and m_visualise.

48 {
49  if (m_visualise)
50  {
51  PANDORA_MONITORING_API(SetEveDisplayParameters(
52  this->GetPandora(), true, DETECTOR_VIEW_XZ, m_transparencyThresholdE, m_energyScaleThresholdE, m_scalingFactor));
53  }
54 
55  if (!m_useSecondaries)
56  this->AssessVertices();
57  else
59 
60  if (m_visualise)
61  {
62  PANDORA_MONITORING_API(ViewEvent(this->GetPandora()));
63  }
64 
65  return STATUS_CODE_SUCCESS;
66 }
bool m_useSecondaries
Whether to assess secondary vertices.
float m_energyScaleThresholdE
Cell energy for which color is at top end of continous color palette.
float m_scalingFactor
TEve works with [cm], Pandora usually works with [mm] (but LArContent went with cm too) ...
bool m_visualise
Whether to produce visual monitoring output.
pandora::StatusCode AssessSecondaryVertices() const
float m_transparencyThresholdE
Cell energy for which transparency is saturated (0%, fully opaque)

Member Data Documentation

float lar_content::VertexMonitoringAlgorithm::m_energyScaleThresholdE
private

Cell energy for which color is at top end of continous color palette.

Definition at line 43 of file VertexMonitoringAlgorithm.h.

Referenced by ReadSettings(), Run(), and VertexMonitoringAlgorithm().

std::string lar_content::VertexMonitoringAlgorithm::m_filename
private

The filename of the ROOT output file.

Definition at line 39 of file VertexMonitoringAlgorithm.h.

Referenced by ReadSettings(), and ~VertexMonitoringAlgorithm().

float lar_content::VertexMonitoringAlgorithm::m_scalingFactor
private

TEve works with [cm], Pandora usually works with [mm] (but LArContent went with cm too)

Definition at line 44 of file VertexMonitoringAlgorithm.h.

Referenced by ReadSettings(), Run(), and VertexMonitoringAlgorithm().

std::string lar_content::VertexMonitoringAlgorithm::m_secVertexListName
private

The name of the list containing secondary vertices.

Definition at line 41 of file VertexMonitoringAlgorithm.h.

Referenced by AssessSecondaryVertices(), and ReadSettings().

float lar_content::VertexMonitoringAlgorithm::m_transparencyThresholdE
private

Cell energy for which transparency is saturated (0%, fully opaque)

Definition at line 42 of file VertexMonitoringAlgorithm.h.

Referenced by ReadSettings(), Run(), and VertexMonitoringAlgorithm().

std::string lar_content::VertexMonitoringAlgorithm::m_treename
private

The name of the ROOT tree.

Definition at line 40 of file VertexMonitoringAlgorithm.h.

Referenced by AssessSecondaryVertices(), AssessVertices(), ReadSettings(), and ~VertexMonitoringAlgorithm().

bool lar_content::VertexMonitoringAlgorithm::m_useSecondaries
private

Whether to assess secondary vertices.

Definition at line 38 of file VertexMonitoringAlgorithm.h.

Referenced by ReadSettings(), Run(), and VertexMonitoringAlgorithm().

bool lar_content::VertexMonitoringAlgorithm::m_visualise
private

Whether to produce visual monitoring output.

Definition at line 36 of file VertexMonitoringAlgorithm.h.

Referenced by AssessSecondaryVertices(), AssessVertices(), ReadSettings(), and Run().

bool lar_content::VertexMonitoringAlgorithm::m_writeFile
private

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