LDMX Software
PtErrorAccessor Struct Reference

Public Member Functions

float operator() (ULong64_t entry)
 

Public Attributes

std::vector< float > * qop_value = nullptr
 
std::vector< float > * qop_error = nullptr
 
std::vector< float > * theta_value = nullptr
 
std::vector< float > * theta_error = nullptr
 

Detailed Description

Definition at line 348 of file CommonUtils.h.

Member Function Documentation

◆ operator()()

float PtErrorAccessor::operator() ( ULong64_t entry)
inline
Returns
the calculated error on pT
Parameters
entrythe entry in the tree

Definition at line 358 of file CommonUtils.h.

358 {
359 if (qop_value != nullptr && qop_error != nullptr &&
360 theta_value != nullptr && theta_error != nullptr) {
361 float qop_v = qop_value->at(entry);
362 float qop_e = qop_error->at(entry);
363 float theta_v = theta_value->at(entry);
364 float theta_e = theta_error->at(entry);
365 return std::cos(theta_v) / qop_v * theta_e -
366 std::sin(theta_v) / (qop_v * qop_v) * qop_e;
367 }
368 return std::numeric_limits<float>::infinity();
369 }

Member Data Documentation

◆ qop_error

std::vector<float>* PtErrorAccessor::qop_error = nullptr

Definition at line 350 of file CommonUtils.h.

◆ qop_value

std::vector<float>* PtErrorAccessor::qop_value = nullptr

Definition at line 349 of file CommonUtils.h.

◆ theta_error

std::vector<float>* PtErrorAccessor::theta_error = nullptr

Definition at line 353 of file CommonUtils.h.

◆ theta_value

std::vector<float>* PtErrorAccessor::theta_value = nullptr

Definition at line 352 of file CommonUtils.h.


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