LDMX Software
ResidualPullHandle Struct Reference

A Parameter handle struct to deal with residuals and pulls. More...

#include <CommonUtils.h>

Public Member Functions

void fill (unsigned int entry)
 Fill the entry.
 

Public Attributes

std::string tag = ""
 A tag name.
 
std::string residualStr = ""
 Title and names: residual.
 
std::string residualUnit = ""
 
std::string errorStr = ""
 Title and names: error.
 
std::string rangeDrawStr = ""
 The rangeDrawStr draw string.
 
std::string rangeMaxStr = ""
 
std::string rangeCutStr = ""
 
std::array< float, 2 > range = {0., 0.}
 The range array.
 
std::function< float(ULong64_t)> value
 Value function that allows to create combined parameters.
 
std::function< float(ULong64_t)> error
 The associated error accessor.
 
std::function< bool(ULong64_t)> accept
 The acceptance.
 
TH1F * rangeHist = nullptr
 
TH1F * residualHist = nullptr
 
TH1F * pullHist = nullptr
 
ULong64_t accepted = 0
 

Detailed Description

A Parameter handle struct to deal with residuals and pulls.

This struct allows to define accessors and cuts for residual and pull analysis in order to be able to access them in an ROOT event loop

Definition at line 115 of file CommonUtils.h.

Member Function Documentation

◆ fill()

void ResidualPullHandle::fill ( unsigned int entry)
inline

Fill the entry.

Parameters
entryis the current TTree entry to be processed

Definition at line 155 of file CommonUtils.h.

155 {
156 if (accept(entry)) {
157 // Access the value, error
158 float v = value(entry);
159 residualHist->Fill(v);
160 pullHist->Fill(v / error(entry));
161 // Count the accessor
162 ++accepted;
163 }
164 };
std::function< bool(ULong64_t)> accept
The acceptance.
std::function< float(ULong64_t)> error
The associated error accessor.
std::function< float(ULong64_t)> value
Value function that allows to create combined parameters.

References accept, error, and value.

Member Data Documentation

◆ accept

std::function<bool(ULong64_t)> ResidualPullHandle::accept

The acceptance.

Definition at line 142 of file CommonUtils.h.

Referenced by fill().

◆ accepted

ULong64_t ResidualPullHandle::accepted = 0

Definition at line 150 of file CommonUtils.h.

◆ error

std::function<float(ULong64_t)> ResidualPullHandle::error

The associated error accessor.

Definition at line 139 of file CommonUtils.h.

Referenced by fill().

◆ errorStr

std::string ResidualPullHandle::errorStr = ""

Title and names: error.

Definition at line 124 of file CommonUtils.h.

◆ pullHist

TH1F* ResidualPullHandle::pullHist = nullptr

Definition at line 148 of file CommonUtils.h.

◆ range

std::array<float, 2> ResidualPullHandle::range = {0., 0.}

The range array.

Definition at line 132 of file CommonUtils.h.

132{0., 0.};

◆ rangeCutStr

std::string ResidualPullHandle::rangeCutStr = ""

Definition at line 129 of file CommonUtils.h.

◆ rangeDrawStr

std::string ResidualPullHandle::rangeDrawStr = ""

The rangeDrawStr draw string.

Definition at line 127 of file CommonUtils.h.

◆ rangeHist

TH1F* ResidualPullHandle::rangeHist = nullptr

Definition at line 144 of file CommonUtils.h.

◆ rangeMaxStr

std::string ResidualPullHandle::rangeMaxStr = ""

Definition at line 128 of file CommonUtils.h.

◆ residualHist

TH1F* ResidualPullHandle::residualHist = nullptr

Definition at line 146 of file CommonUtils.h.

◆ residualStr

std::string ResidualPullHandle::residualStr = ""

Title and names: residual.

Definition at line 120 of file CommonUtils.h.

◆ residualUnit

std::string ResidualPullHandle::residualUnit = ""

Definition at line 121 of file CommonUtils.h.

◆ tag

std::string ResidualPullHandle::tag = ""

A tag name.

Definition at line 117 of file CommonUtils.h.

◆ value

std::function<float(ULong64_t)> ResidualPullHandle::value

Value function that allows to create combined parameters.

Definition at line 136 of file CommonUtils.h.

Referenced by fill().


The documentation for this struct was generated from the following file: