Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
Validation.C File Reference

Implementation of validation functionality. More...

#include "TChain.h"
#include "TH1F.h"
#include "Validation.h"
#include <iomanip>
#include <iostream>
#include <fstream>
#include <sstream>
Include dependency graph for Validation.C:

Go to the source code of this file.

Functions

void Validation (const std::string &inputFiles, const Parameters &parameters)
 Validation - Main entry point for analysis.
 
int ReadNextEvent (TChain *const pTChain, const int iEntry, SimpleMCEvent &simpleMCEvent, const Parameters &parameters)
 Read the next event from the chain.
 
void DisplaySimpleMCEventMatches (const SimpleMCEvent &simpleMCEvent, const Parameters &parameters)
 Print matching details to screen for a simple mc event.
 
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.
 
bool PassFiducialCut (const SimpleMCTarget &simpleMCTarget, const Parameters &parameters)
 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 &parameters)
 Print details to screen for a provided interaction type to counting map.
 
void AnalyseInteractionTargetResultMap (const InteractionTargetResultMap &interactionTargetResultMap, const Parameters &parameters)
 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 &parameters, 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.
 

Detailed Description

Implementation of validation functionality.

Log

Definition in file Validation.C.

Function Documentation

◆ AnalyseInteractionTargetResultMap()

void AnalyseInteractionTargetResultMap ( const InteractionTargetResultMap interactionTargetResultMap,
const Parameters parameters 
)

Opportunity to fill histograms, perform post-processing of information collected in main loop over ntuple, etc.

Parameters
interactionTargetResultMapthe interaction target result map
parametersthe parameters

Definition at line 533 of file Validation.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CountPfoMatches()

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.

Parameters
simpleMCEventthe simple mc event
parametersthe parameters
interactionCountingMapthe interaction counting map, to be populated
interactionTargetResultMapthe interaction target outcome map, to be populated

Definition at line 311 of file Validation.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DisplayInteractionCountingMap()

void DisplayInteractionCountingMap ( const InteractionCountingMap interactionCountingMap,
const Parameters parameters 
)

Print details to screen for a provided interaction type to counting map.

Parameters
interactionCountingMapthe interaction counting map
parametersthe parameters

Definition at line 484 of file Validation.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DisplaySimpleMCEventMatches()

void DisplaySimpleMCEventMatches ( const SimpleMCEvent simpleMCEvent,
const Parameters parameters 
)

Print matching details to screen for a simple mc event.

Parameters
simpleMCEventthe simple mc event
parametersthe parameters

Definition at line 212 of file Validation.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FillPrimaryHistogramCollection()

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.

Parameters
histPrefixthe histogram prefix
parametersthe parameters
primaryResultthe primary result
primaryHistogramCollectionthe primary histogram collection

Definition at line 655 of file Validation.C.

Here is the caller graph for this function:

◆ FillTargetHistogramCollection()

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.

Parameters
histPrefixthe histogram prefix
targetResultthe target result
targetHistogramCollectionthe target histogram collection

Definition at line 613 of file Validation.C.

Here is the caller graph for this function:

◆ GetExpectedPrimary()

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.

Parameters
simpleMCPrimarythe simple mc primary
simpleMCPrimaryListthe simple mc primary list
Returns
the expected primary

Definition at line 433 of file Validation.C.

Here is the caller graph for this function:

◆ IsGoodParticleIdMatch()

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.

Parameters
simpleMCPrimarythe simple mc primary
bestMatchPfoPdgCodethe best matched pfo pdg code
Returns
boolean

Definition at line 469 of file Validation.C.

Here is the caller graph for this function:

◆ PassFiducialCut()

bool PassFiducialCut ( const SimpleMCTarget simpleMCTarget,
const Parameters parameters 
)

Whether a simple mc event passes the relevant fiducial cut, applied to target vertices.

Parameters
simpleMCTargetthe simple mc target
parametersthe parameters
Returns
boolean

Definition at line 382 of file Validation.C.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PassSBNDFiducialCut()

bool PassSBNDFiducialCut ( const SimpleMCTarget simpleMCTarget)

Whether a simple mc event passes sbnd fiducial cut, applied to target vertices.

Parameters
simpleMCTargetthe simple mc target
Returns
boolean

Definition at line 415 of file Validation.C.

Here is the caller graph for this function:

◆ PassUbooneFiducialCut()

bool PassUbooneFiducialCut ( const SimpleMCTarget simpleMCTarget)

Whether a simple mc event passes uboone fiducial cut, applied to target vertices.

Parameters
simpleMCTargetthe simple mc target
Returns
boolean

Definition at line 398 of file Validation.C.

Here is the caller graph for this function:

◆ ProcessHistogramCollections()

void ProcessHistogramCollections ( const InteractionPrimaryHistogramMap interactionPrimaryHistogramMap)

Process histograms stored in the provided map e.g. calculating final efficiencies, normalising, etc.

Parameters
interactionPrimaryHistogramMapthe interaction primary histogram map

Definition at line 729 of file Validation.C.

Here is the caller graph for this function:

◆ ReadNextEvent()

int ReadNextEvent ( TChain *const  pTChain,
const int  iEntry,
SimpleMCEvent simpleMCEvent,
const Parameters parameters 
)

Read the next event from the chain.

Parameters
pTChainthe address of the chain
iEntrythe first chain entry to read
simpleMCEventthe event to be populated
parametersthe parameters
Returns
the number of chain entries read

Definition at line 55 of file Validation.C.

Here is the caller graph for this function:

◆ ToString() [1/2]

std::string ToString ( const ExpectedPrimary  expectedPrimary)

Get a string representation of an interaction type.

Parameters
interactionTypethe interaction type
Returns
string

Definition at line 769 of file Validation.C.

Here is the caller graph for this function:

◆ ToString() [2/2]

std::string ToString ( const InteractionType  interactionType)

Get a string representation of an interaction type.

Parameters
interactionTypethe interaction type
Returns
string

Definition at line 792 of file Validation.C.

◆ Validation()

void Validation ( const std::string &  inputFiles,
const Parameters parameters = Parameters() 
)

Validation - Main entry point for analysis.

Parameters
inputFilesthe regex identifying the input root files
parametersthe parameters

Definition at line 18 of file Validation.C.

Here is the call graph for this function: