Hold on to -dependent resolution. This class acts as a function object and returns Vector_Resolution as a function of . It does not assume symmetry between and . The interpretation of as physics or detector is left to users's implementation. More...
#include <EtaDepResolution.h>
Public Member Functions | |
const bool | CheckEta (double eta) const |
Check is an input value is within the valid -range of this instance. More... | |
bool | CheckNoOverlap (const std::vector< EtaDepResElement > &v) |
Check for non-overlapping -range between -dependent resolution elements in a list. More... | |
EtaDepResolution () | |
Default constructor, instantiate an EtaDepResolution object with empty list of -dependent resolution elements. More... | |
EtaDepResolution (const std::string &default_file) | |
Instantiate an EtaDepResolution object with a filename which contains information about -dependent resolution. More... | |
const double | EtaMax () const |
Return the upper limit of the valid -range. More... | |
const double | EtaMin () const |
Return the lower limit of the valid -range. More... | |
const std::vector< EtaDepResElement > | GetEtaDepResElement () const |
Access the internal list of -dependent resolution elements. More... | |
EtaDepResElement | GetEtaDepResElement (double &eta) const |
Return the corresponding -dependent resolution element (of type EtaDepResElement)for a value of . More... | |
Vector_Resolution | GetResolution (double &eta) const |
Return the corresponding resolution for a value of . More... | |
Vector_Resolution | operator() (double &eta) |
Allow users to call this instance as a function to access the corresponding resolution for an input value of . More... | |
std::vector< EtaDepResElement >::size_type | Read (const Defaults_Text &defs) |
Read the -dependent resolution information from a Defaults_Text object. More... | |
std::vector< EtaDepResElement >::size_type | Read (const std::string &default_file) |
Read the -dependent resolution information from an ASCII text file. More... | |
void | sort () |
~EtaDepResolution () | |
Private Member Functions | |
std::vector< EtaDepResElement >::const_iterator | FindResolution (double &eta) const |
Internal method to return the corresponding -dependent resolution element for a given value. More... | |
Private Attributes | |
std::vector< EtaDepResElement > | _EtaDepResElement |
Hold on to -dependent resolution. This class acts as a function object and returns Vector_Resolution as a function of . It does not assume symmetry between and . The interpretation of as physics or detector is left to users's implementation.
etadep_etaminX = etamin
etadep_etamaxX = etamax
etadep_vecresX = vecres
where:
X is an integer starting from 0 (0, 1, 2, 3, ...). Users can write as many resolutions as long as each of them has different integer, and complete information regarding range an resolution.
etamin is a floating-point number, the lower limit of the valid range.
etamax is a floating-point number, the upper limit of the valid range.
vecres is a string-encoded Vector_Resolution, see the documentation for Vector_Resolution class for details.
The constructor will read the ASCII text file and read all resolutions in the file. Then it will instantiate the EtaDepResolution and sort the internal list of EtaDepResElement.
Definition at line 86 of file EtaDepResolution.h.
hitfit::EtaDepResolution::EtaDepResolution | ( | ) |
Default constructor, instantiate an EtaDepResolution object with empty list of -dependent resolution elements.
Definition at line 43 of file EtaDepResolution.cc.
hitfit::EtaDepResolution::EtaDepResolution | ( | const std::string & | default_file | ) |
Instantiate an EtaDepResolution object with a filename which contains information about -dependent resolution.
default_file | The input ASCII text file. |
Definition at line 45 of file EtaDepResolution.cc.
References Read().
hitfit::EtaDepResolution::~EtaDepResolution | ( | ) |
const bool hitfit::EtaDepResolution::CheckEta | ( | double | eta | ) | const |
Check is an input value is within the valid -range of this instance.
eta | The value to be check. |
Definition at line 112 of file EtaDepResolution.cc.
References _EtaDepResElement, PVValHelper::eta, and FindResolution().
bool hitfit::EtaDepResolution::CheckNoOverlap | ( | const std::vector< EtaDepResElement > & | v | ) |
Check for non-overlapping -range between -dependent resolution elements in a list.
v | The list of -dependent resolution elements to check. |
Definition at line 87 of file EtaDepResolution.cc.
References mps_fire::i, dqmiolumiharvest::j, and findQualityFiles::v.
Referenced by Read().
const double hitfit::EtaDepResolution::EtaMax | ( | ) | const |
Return the upper limit of the valid -range.
Definition at line 105 of file EtaDepResolution.cc.
References _EtaDepResElement.
const double hitfit::EtaDepResolution::EtaMin | ( | ) | const |
Return the lower limit of the valid -range.
Definition at line 98 of file EtaDepResolution.cc.
References _EtaDepResElement.
|
private |
Internal method to return the corresponding -dependent resolution element for a given value.
eta | The value of whose corresponding resolution is to be found. |
Definition at line 31 of file EtaDepResolution.cc.
References _EtaDepResElement, and PVValHelper::eta.
Referenced by CheckEta(), GetEtaDepResElement(), and GetResolution().
const std::vector< EtaDepResElement > hitfit::EtaDepResolution::GetEtaDepResElement | ( | ) | const |
Access the internal list of -dependent resolution elements.
Definition at line 130 of file EtaDepResolution.cc.
References _EtaDepResElement.
EtaDepResElement hitfit::EtaDepResolution::GetEtaDepResElement | ( | double & | eta | ) | const |
Return the corresponding -dependent resolution element (of type EtaDepResElement)for a value of .
eta | The value for which the corresponding element |
Definition at line 128 of file EtaDepResolution.cc.
References PVValHelper::eta, and FindResolution().
Vector_Resolution hitfit::EtaDepResolution::GetResolution | ( | double & | eta | ) | const |
Return the corresponding resolution for a value of .
eta | The value for which the corresponding resolution is desired. |
Definition at line 116 of file EtaDepResolution.cc.
References _EtaDepResElement, PVValHelper::eta, and FindResolution().
Referenced by operator()().
Vector_Resolution hitfit::EtaDepResolution::operator() | ( | double & | eta | ) |
Allow users to call this instance as a function to access the corresponding resolution for an input value of .
eta | The value for which the corresponding resolution is desired. |
Definition at line 114 of file EtaDepResolution.cc.
References PVValHelper::eta, and GetResolution().
std::vector< EtaDepResElement >::size_type hitfit::EtaDepResolution::Read | ( | const Defaults_Text & | defs | ) |
Read the -dependent resolution information from a Defaults_Text object.
defs | The Defaults_Text object to read. |
Definition at line 55 of file EtaDepResolution.cc.
References _EtaDepResElement, CheckNoOverlap(), muonTiming_cfi::etamax, muonTiming_cfi::etamin, hitfit::Defaults_Text::exists(), hitfit::Defaults_Text::get_float(), hitfit::Defaults_Text::get_string(), mps_fire::i, and sort().
std::vector< EtaDepResElement >::size_type hitfit::EtaDepResolution::Read | ( | const std::string & | default_file | ) |
Read the -dependent resolution information from an ASCII text file.
default_file | The ASCII text file to read. |
Definition at line 49 of file EtaDepResolution.cc.
References _EtaDepResElement.
Referenced by EtaDepResolution().
void hitfit::EtaDepResolution::sort | ( | ) |
Sort the internal list of -dependent resolution elements.
Definition at line 41 of file EtaDepResolution.cc.
References _EtaDepResElement.
Referenced by Read().
|
private |
List of -dependent resolution elements.
Definition at line 91 of file EtaDepResolution.h.
Referenced by CheckEta(), EtaMax(), EtaMin(), FindResolution(), GetEtaDepResElement(), GetResolution(), Read(), and sort().