207 const int isTestBeam{pMCNode->IsTestBeamParticle() ? 1 : 0};
208 const int isCosmicRay{!isTestBeam && pMCNode->IsCosmicRay() ? 1 : 0};
209 const int isNeutrinoInt{!(isTestBeam || isCosmicRay) ? 1 : 0};
210 const int mcId{pMCNode->GetId()};
211 const int pdg{pMCNode->GetParticleId()};
212 const int tier{pMCNode->GetHierarchyTier()};
213 const int mcHits{
static_cast<int>(pMCNode->GetCaloHits().size())};
214 const int isLeadingLepton{pMCNode->IsLeadingLepton() ? 1 : 0};
216 const MCParticleList &parentList{pMCNode->GetLeadingMCParticle()->GetParentList()};
217 const int isElectron{
std::abs(pMCNode->GetLeadingMCParticle()->GetParticleId()) == E_MINUS ? 1 : 0};
218 const int hasMuonParent{parentList.size() == 1 &&
std::abs(parentList.front()->GetParticleId()) == MU_MINUS ? 1 : 0};
222 const int nMatches{
static_cast<int>(nodeVector.size())};
223 IntVector recoIdVector, nRecoHitsVector, nSharedHitsVector;
225 FloatVector purityAdcVector, completenessAdcVector;
226 FloatVector purityVectorU, purityVectorV, purityVectorW, completenessVectorU, completenessVectorV, completenessVectorW;
227 FloatVector purityAdcVectorU, purityAdcVectorV, purityAdcVectorW, completenessAdcVectorU, completenessAdcVectorV, completenessAdcVectorW;
228 const CartesianVector &trueVertex{pMCNode->GetLeadingMCParticle()->GetVertex()};
229 float vtxDx{0.f}, vtxDy{0.f}, vtxDz{0.f}, vtxDr{0.f};
232 recoIdVector.emplace_back(pRecoNode->GetParticleId());
233 nRecoHitsVector.emplace_back(static_cast<int>(pRecoNode->GetCaloHits().size()));
234 nSharedHitsVector.emplace_back(static_cast<int>(
matches.GetSharedHits(pRecoNode)));
235 purityVector.emplace_back(
matches.GetPurity(pRecoNode));
236 completenessVector.emplace_back(
matches.GetCompleteness(pRecoNode));
237 purityAdcVector.emplace_back(
matches.GetPurity(pRecoNode,
true));
238 completenessAdcVector.emplace_back(
matches.GetCompleteness(pRecoNode,
true));
239 purityVectorU.emplace_back(
matches.GetPurity(pRecoNode, TPC_VIEW_U));
240 purityVectorV.emplace_back(
matches.GetPurity(pRecoNode, TPC_VIEW_V));
241 purityVectorW.emplace_back(
matches.GetPurity(pRecoNode, TPC_VIEW_W));
242 completenessVectorU.emplace_back(
matches.GetCompleteness(pRecoNode, TPC_VIEW_U));
243 completenessVectorV.emplace_back(
matches.GetCompleteness(pRecoNode, TPC_VIEW_V));
244 completenessVectorW.emplace_back(
matches.GetCompleteness(pRecoNode, TPC_VIEW_W));
245 purityAdcVectorU.emplace_back(
matches.GetPurity(pRecoNode, TPC_VIEW_U,
true));
246 purityAdcVectorV.emplace_back(
matches.GetPurity(pRecoNode, TPC_VIEW_V,
true));
247 purityAdcVectorW.emplace_back(
matches.GetPurity(pRecoNode, TPC_VIEW_W,
true));
248 completenessAdcVectorU.emplace_back(
matches.GetCompleteness(pRecoNode, TPC_VIEW_U,
true));
249 completenessAdcVectorV.emplace_back(
matches.GetCompleteness(pRecoNode, TPC_VIEW_V,
true));
250 completenessAdcVectorW.emplace_back(
matches.GetCompleteness(pRecoNode, TPC_VIEW_W,
true));
255 vtxDx = recoVertex.GetX() - trueVertex.GetX();
256 vtxDy = recoVertex.GetY() - trueVertex.GetY();
257 vtxDz = recoVertex.GetZ() - trueVertex.GetZ();
258 vtxDr = std::sqrt(vtxDx * vtxDx + vtxDy * vtxDy + vtxDz * vtxDz);
264 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"event",
m_event));
265 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"mcId", mcId));
266 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"mcPDG",
pdg));
267 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"mcTier", tier));
268 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"mcNHits", mcHits));
269 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"isNuInteration", isNeutrinoInt));
270 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"isCosmicRay", isCosmicRay));
271 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"isTestBeam", isTestBeam));
272 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"isLeadingLepton", isLeadingLepton));
273 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"isMichel", isMichel));
274 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"nMatches", nMatches));
275 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"recoIdVector", &recoIdVector));
276 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"nRecoHitsVector", &nRecoHitsVector));
277 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"nSharedHitsVector", &nSharedHitsVector));
278 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"purityVector", &purityVector));
279 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"completenessVector", &completenessVector));
280 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"purityAdcVector", &purityAdcVector));
281 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"completenessAdcVector", &completenessAdcVector));
282 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"purityVectorU", &purityVectorU));
283 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"purityVectorV", &purityVectorV));
284 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"purityVectorW", &purityVectorW));
285 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"completenessVectorU", &completenessVectorU));
286 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"completenessVectorV", &completenessVectorV));
287 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"completenessVectorW", &completenessVectorW));
288 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"purityAdcVectorU", &purityAdcVectorU));
289 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"purityAdcVectorV", &purityAdcVectorV));
290 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"purityAdcVectorW", &purityAdcVectorW));
291 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"completenessAdcVectorU", &completenessAdcVectorU));
292 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"completenessAdcVectorV", &completenessAdcVectorV));
293 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"completenessAdcVectorW", &completenessAdcVectorW));
294 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"vtxDx", vtxDx));
295 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"vtxDy", vtxDy));
296 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"vtxDz", vtxDz));
297 PANDORA_MONITORING_API(SetTreeVariable(this->GetPandora(),
m_treename.c_str(),
"vtxDr", vtxDr));
298 PANDORA_MONITORING_API(FillTree(this->GetPandora(),
m_treename.c_str()));
std::vector< const Node * > NodeVector
static const pandora::Vertex * GetVertex(const pandora::ParticleFlowObject *const pPfo)
Get the pfo vertex.
int m_event
The current event.
static bool IsDecay(const pandora::MCParticle *const pMCParticle)
Check whether or not an MC particle comes from a decay process.
std::vector< int > IntVector
Dft::FloatVector FloatVector
std::string m_treename
The name of the ROOT tree to write.