Pandora
Pandora source code navigator
|
Implementation of validation functionality. More...
#include "TChain.h"
#include "TH1F.h"
#include "Validation.h"
#include <iomanip>
#include <iostream>
#include <fstream>
#include <sstream>
Go to the source code of this file.
Functions | |
void | Validation (const std::string &inputFiles, const Parameters ¶meters) |
Validation - Main entry point for analysis. | |
int | ReadNextEvent (TChain *const pTChain, const int iEntry, SimpleMCEvent &simpleMCEvent, const Parameters ¶meters) |
Read the next event from the chain. | |
void | DisplaySimpleMCEventMatches (const SimpleMCEvent &simpleMCEvent, const Parameters ¶meters) |
Print matching details to screen for a simple mc event. | |
void | CountPfoMatches (const SimpleMCEvent &simpleMCEvent, const Parameters ¶meters, InteractionCountingMap &interactionCountingMap, InteractionTargetResultMap &interactionTargetResultMap) |
CountPfoMatches Relies on fact that primary list is sorted by number of true good hits. | |
bool | PassFiducialCut (const SimpleMCTarget &simpleMCTarget, const Parameters ¶meters) |
Whether a simple mc event passes the relevant fiducial cut, applied to target vertices. | |
bool | PassUbooneFiducialCut (const SimpleMCTarget &simpleMCTarget) |
Whether a simple mc event passes uboone fiducial cut, applied to target vertices. | |
bool | PassSBNDFiducialCut (const SimpleMCTarget &simpleMCTarget) |
Whether a simple mc event passes sbnd fiducial cut, applied to target vertices. | |
ExpectedPrimary | GetExpectedPrimary (const SimpleMCPrimary &simpleMCPrimary, const SimpleMCPrimaryList &simpleMCPrimaryList) |
Work out which of the primary particles (expected for a given interaction types) corresponds to the provided primary id ATTN: Relies on fact that primary list is sorted by number of true hits. | |
bool | IsGoodParticleIdMatch (const SimpleMCPrimary &simpleMCPrimary, const int bestMatchPfoPdgCode) |
Whether a provided mc primary and best matched pfo are deemed to have a good particle id match. | |
void | DisplayInteractionCountingMap (const InteractionCountingMap &interactionCountingMap, const Parameters ¶meters) |
Print details to screen for a provided interaction type to counting map. | |
void | AnalyseInteractionTargetResultMap (const InteractionTargetResultMap &interactionTargetResultMap, const Parameters ¶meters) |
Opportunity to fill histograms, perform post-processing of information collected in main loop over ntuple, etc. | |
void | FillTargetHistogramCollection (const std::string &histPrefix, const TargetResult &targetResult, TargetHistogramCollection &targetHistogramCollection) |
Fill histograms in the provided target histogram collection, using information in the provided target result. | |
void | FillPrimaryHistogramCollection (const std::string &histPrefix, const Parameters ¶meters, const PrimaryResult &primaryResult, PrimaryHistogramCollection &primaryHistogramCollection) |
Fill histograms in the provided histogram collection, using information in the provided primary result. | |
void | ProcessHistogramCollections (const InteractionPrimaryHistogramMap &interactionPrimaryHistogramMap) |
Process histograms stored in the provided map e.g. calculating final efficiencies, normalising, etc. | |
std::string | ToString (const ExpectedPrimary expectedPrimary) |
Get a string representation of an interaction type. | |
std::string | ToString (const InteractionType interactionType) |
Get a string representation of an interaction type. | |
void AnalyseInteractionTargetResultMap | ( | const InteractionTargetResultMap & | interactionTargetResultMap, |
const Parameters & | parameters | ||
) |
Opportunity to fill histograms, perform post-processing of information collected in main loop over ntuple, etc.
interactionTargetResultMap | the interaction target result map |
parameters | the parameters |
Definition at line 533 of file Validation.C.
void CountPfoMatches | ( | const SimpleMCEvent & | simpleMCEvent, |
const Parameters & | parameters, | ||
InteractionCountingMap & | interactionCountingMap, | ||
InteractionTargetResultMap & | interactionTargetResultMap | ||
) |
CountPfoMatches Relies on fact that primary list is sorted by number of true good hits.
simpleMCEvent | the simple mc event |
parameters | the parameters |
interactionCountingMap | the interaction counting map, to be populated |
interactionTargetResultMap | the interaction target outcome map, to be populated |
Definition at line 311 of file Validation.C.
void DisplayInteractionCountingMap | ( | const InteractionCountingMap & | interactionCountingMap, |
const Parameters & | parameters | ||
) |
Print details to screen for a provided interaction type to counting map.
interactionCountingMap | the interaction counting map |
parameters | the parameters |
Definition at line 484 of file Validation.C.
void DisplaySimpleMCEventMatches | ( | const SimpleMCEvent & | simpleMCEvent, |
const Parameters & | parameters | ||
) |
Print matching details to screen for a simple mc event.
simpleMCEvent | the simple mc event |
parameters | the parameters |
Definition at line 212 of file Validation.C.
void FillPrimaryHistogramCollection | ( | const std::string & | histPrefix, |
const Parameters & | parameters, | ||
const PrimaryResult & | primaryResult, | ||
PrimaryHistogramCollection & | primaryHistogramCollection | ||
) |
Fill histograms in the provided histogram collection, using information in the provided primary result.
histPrefix | the histogram prefix |
parameters | the parameters |
primaryResult | the primary result |
primaryHistogramCollection | the primary histogram collection |
Definition at line 655 of file Validation.C.
void FillTargetHistogramCollection | ( | const std::string & | histPrefix, |
const TargetResult & | targetResult, | ||
TargetHistogramCollection & | targetHistogramCollection | ||
) |
Fill histograms in the provided target histogram collection, using information in the provided target result.
histPrefix | the histogram prefix |
targetResult | the target result |
targetHistogramCollection | the target histogram collection |
Definition at line 613 of file Validation.C.
ExpectedPrimary GetExpectedPrimary | ( | const SimpleMCPrimary & | simpleMCPrimary, |
const SimpleMCPrimaryList & | simpleMCPrimaryList | ||
) |
Work out which of the primary particles (expected for a given interaction types) corresponds to the provided primary id ATTN: Relies on fact that primary list is sorted by number of true hits.
simpleMCPrimary | the simple mc primary |
simpleMCPrimaryList | the simple mc primary list |
Definition at line 433 of file Validation.C.
bool IsGoodParticleIdMatch | ( | const SimpleMCPrimary & | simpleMCPrimary, |
const int | bestMatchPfoPdgCode | ||
) |
Whether a provided mc primary and best matched pfo are deemed to have a good particle id match.
simpleMCPrimary | the simple mc primary |
bestMatchPfoPdgCode | the best matched pfo pdg code |
Definition at line 469 of file Validation.C.
bool PassFiducialCut | ( | const SimpleMCTarget & | simpleMCTarget, |
const Parameters & | parameters | ||
) |
Whether a simple mc event passes the relevant fiducial cut, applied to target vertices.
simpleMCTarget | the simple mc target |
parameters | the parameters |
Definition at line 382 of file Validation.C.
bool PassSBNDFiducialCut | ( | const SimpleMCTarget & | simpleMCTarget | ) |
Whether a simple mc event passes sbnd fiducial cut, applied to target vertices.
simpleMCTarget | the simple mc target |
Definition at line 415 of file Validation.C.
bool PassUbooneFiducialCut | ( | const SimpleMCTarget & | simpleMCTarget | ) |
Whether a simple mc event passes uboone fiducial cut, applied to target vertices.
simpleMCTarget | the simple mc target |
Definition at line 398 of file Validation.C.
void ProcessHistogramCollections | ( | const InteractionPrimaryHistogramMap & | interactionPrimaryHistogramMap | ) |
Process histograms stored in the provided map e.g. calculating final efficiencies, normalising, etc.
interactionPrimaryHistogramMap | the interaction primary histogram map |
Definition at line 729 of file Validation.C.
int ReadNextEvent | ( | TChain *const | pTChain, |
const int | iEntry, | ||
SimpleMCEvent & | simpleMCEvent, | ||
const Parameters & | parameters | ||
) |
Read the next event from the chain.
pTChain | the address of the chain |
iEntry | the first chain entry to read |
simpleMCEvent | the event to be populated |
parameters | the parameters |
Definition at line 55 of file Validation.C.
std::string ToString | ( | const ExpectedPrimary | expectedPrimary | ) |
Get a string representation of an interaction type.
interactionType | the interaction type |
Definition at line 769 of file Validation.C.
std::string ToString | ( | const InteractionType | interactionType | ) |
Get a string representation of an interaction type.
interactionType | the interaction type |
Definition at line 792 of file Validation.C.
void Validation | ( | const std::string & | inputFiles, |
const Parameters & | parameters = Parameters() |
||
) |
Validation - Main entry point for analysis.
inputFiles | the regex identifying the input root files |
parameters | the parameters |
Definition at line 18 of file Validation.C.