![]() |
ATLAS Offline Software
|
#include <ResolutionHelper.h>
Classes | |
| struct | resolutionResultInBin |
| package the output of a single bin resolution measurement More... | |
Public Types | |
| enum | methods { iterRMS_convergence , Gauss_fit , fusion_iterRMS_Gaussfit , iterGaussFit_convergence } |
| methods acc to which mean&RMS can be evaluated More... | |
Public Member Functions | |
| ResolutionHelper () | |
| ~ResolutionHelper () | |
| void | makeResolutions (const TH2 *h_input2D, TH1 *hwidth, TH1 *hmean, TH1 *hproj[], bool saveProjections, IDPVM::ResolutionHelper::methods theMethod=IDPVM::ResolutionHelper::iterRMS_convergence) |
| extract 1D resolution plots from a 2D "residual vs observable" histogram. | |
| void | makeResolutions (const TH2 *h_input2D, TH1 *hwidth, TH1 *hmean, IDPVM::ResolutionHelper::methods theMethod=IDPVM::ResolutionHelper::iterRMS_convergence) |
| extract 1D resolution plots from a 2D "residual vs observable" histogram. | |
| resolutionResultInBin | ResolutionHelperResultsModUnits (TH1D *p_input_hist, IDPVM::ResolutionHelper::methods theMethod=IDPVM::ResolutionHelper::iterRMS_convergence) |
| single-bin resolution evaluation, also internally used by makeResolutions | |
| void | setResults (TH1 *p_input_hist, methods p_method) |
| wrapper to set mean,rms,and fraction of events in tails nb: some of the methods are allowed to modify input histogram | |
| double | getMean () |
| results getters | |
| double | getMeanError () |
| double | getRMS () |
| double | getRMSError () |
| double | getFracOut () |
| fraction of events that is within the range of input histogram, but goes out-of range during width and mean evaluation if this is large, you should refine the method for width and mean evaluation can be done during post-processing, does not require new InDetPVM run | |
| double | getFracOutUnc () |
| double | getFracUOflow () |
| fraction of events in under- and over-flow bins of input histogram if this is large, the input histogram range needs to be increased requires InDetPVM code-change and re-run | |
| const std::vector< std::string > & | getDebugs () |
| return accumulated messages | |
| const std::vector< std::string > & | getInfos () |
| const std::vector< std::string > & | getWarnings () |
| const std::vector< std::string > & | getErrors () |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. | |
| MsgStream & | msg () const |
| The standard message stream. | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. | |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. | |
Static Public Member Functions | |
| static std::string | reportUOBinVal (const std::string &p_histName, const std::vector< std::pair< unsigned int, double > > &p_vecBinVal) |
| helper to report bin and fraction of under-/over- flow events, as accumulated by top-level pull or resolution histogram | |
Private Member Functions | |
| int | setGaussFit (TH1 *p_input_hist) |
| int | setIterativeConvergence (TH1 *p_input_hist) |
| iteratively change histogram range, until convergence return # remaining iterations before hitting the max. | |
| int | setIterativeGaussFitConvergence (TH1 *p_input_hist) |
| same as above but performs a gaussian fit at avery iteration, until convergence | |
| void | setFout (double p_nsig, double p_ntot) |
| evaluate the fraction of evens out of signal region and its uncertainty | |
| void | setLargeError () |
| set large mean and RMS errors in case we eg. exclude too many events during evaluation | |
| bool | initialize (TH1 *p_input_hist) |
| helper to fill-in starting values of the results vector | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. | |
Static Private Member Functions | |
| static void | cloneHistogram (TH1D *h, TH1 *hcopy) |
Private Attributes | |
| double | m_mean {0.} |
| results/outputs: | |
| double | m_meanError {0.} |
| double | m_RMS {0.} |
| double | m_RMSError {0.} |
| double | m_FracOut {0.} |
| double | m_FracOutUnc {0.} |
| double | m_FracUOflow {0.} |
| std::vector< std::string > | m_debugs |
| std::vector< std::string > | m_infos |
| std::vector< std::string > | m_warnings |
| std::vector< std::string > | m_errors |
| std::string | m_inHistName {""} |
| double | m_largeErrorFact {10.} |
| double | m_maxUOflowFrac {0.05} |
| std::string | m_nm |
| Message source name. | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels) | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging) | |
Definition at line 28 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
methods acc to which mean&RMS can be evaluated
| Enumerator | |
|---|---|
| iterRMS_convergence | |
| Gauss_fit | |
| fusion_iterRMS_Gaussfit | |
| iterGaussFit_convergence | |
Definition at line 36 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
| IDPVM::ResolutionHelper::ResolutionHelper | ( | ) |
Definition at line 25 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ResolutionHelper.cxx.
|
inline |
Definition at line 31 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
staticprivate |
Definition at line 417 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ResolutionHelper.cxx.
|
inline |
return accumulated messages
Definition at line 100 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
inline |
Definition at line 103 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
inline |
fraction of events that is within the range of input histogram, but goes out-of range during width and mean evaluation if this is large, you should refine the method for width and mean evaluation can be done during post-processing, does not require new InDetPVM run
Definition at line 87 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
inline |
Definition at line 88 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
inline |
fraction of events in under- and over-flow bins of input histogram if this is large, the input histogram range needs to be increased requires InDetPVM code-change and re-run
Definition at line 93 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
inline |
Definition at line 101 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
inline |
results getters
Definition at line 78 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
inline |
Definition at line 79 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
inline |
Definition at line 80 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
inline |
Definition at line 81 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
inline |
Definition at line 102 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
private |
helper to fill-in starting values of the results vector
Definition at line 30 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ResolutionHelper.cxx.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
| void IDPVM::ResolutionHelper::makeResolutions | ( | const TH2 * | h_input2D, |
| TH1 * | hwidth, | ||
| TH1 * | hmean, | ||
| IDPVM::ResolutionHelper::methods | theMethod = IDPVM::ResolutionHelper::iterRMS_convergence ) |
extract 1D resolution plots from a 2D "residual vs observable" histogram.
| [in] | h_input2D | input histogram (x = observable, y = residuals) |
| [out] | hwidth | output histogram, will be filled with the width of the residuals (-> resolution) |
| [out] | hmean | output histogram, will be filled with the mean of the residuals (-> bias) |
| [out] | hproj | array of histograms, will be populated by an array of 1-dimensional projections of Y within bins in X |
| [in] | saveProjections | steers the filling of hpoj |
| [in] | theMethod | the method used to extract the width and mean. Default is iterative RMS. |
Definition at line 351 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ResolutionHelper.cxx.
| void IDPVM::ResolutionHelper::makeResolutions | ( | const TH2 * | h_input2D, |
| TH1 * | hwidth, | ||
| TH1 * | hmean, | ||
| TH1 * | hproj[], | ||
| bool | saveProjections, | ||
| IDPVM::ResolutionHelper::methods | theMethod = IDPVM::ResolutionHelper::iterRMS_convergence ) |
extract 1D resolution plots from a 2D "residual vs observable" histogram.
| [in] | h_input2D | input histogram (x = observable, y = residuals) |
| [out] | hwidth | output histogram, will be filled with the width of the residuals (-> resolution) |
| [out] | hmean | output histogram, will be filled with the mean of the residuals (-> bias) |
| [out] | hproj | array of histograms, will be populated by an array of 1-dimensional projections of Y within bins in X |
| [in] | saveProjections | steers the filling of hpoj |
| [in] | theMethod | the method used to extract the width and mean. Default is iterative RMS. |
Definition at line 382 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ResolutionHelper.cxx.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 163 of file AthMessaging.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 178 of file AthMessaging.h.
|
inlineinherited |
Test the output level.
| lvl | The message level to test against |
| true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
|
static |
helper to report bin and fraction of under-/over- flow events, as accumulated by top-level pull or resolution histogram
Definition at line 78 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ResolutionHelper.cxx.
| ResolutionHelper::resolutionResultInBin IDPVM::ResolutionHelper::ResolutionHelperResultsModUnits | ( | TH1D * | p_input_hist, |
| IDPVM::ResolutionHelper::methods | theMethod = IDPVM::ResolutionHelper::iterRMS_convergence ) |
single-bin resolution evaluation, also internally used by makeResolutions
| p_input_hist | input histogram, 1D distribution of the residual |
| theMethod | method to use (default: iterative RMS) |
Definition at line 332 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ResolutionHelper.cxx.
|
private |
evaluate the fraction of evens out of signal region and its uncertainty
Definition at line 89 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ResolutionHelper.cxx.
|
private |
Definition at line 104 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ResolutionHelper.cxx.
|
private |
iteratively change histogram range, until convergence return # remaining iterations before hitting the max.
allowed
Definition at line 130 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ResolutionHelper.cxx.
|
private |
same as above but performs a gaussian fit at avery iteration, until convergence
First intialise mean and RMS to 0
iteration parameters: max iteration steps
width of cutting range in [RMS]
first perform a single Gauss fit across full range of histogram or in a specified range
performs a second fit with range determined by first fit i.e. mean +/- nRMS_width * RMS
now iteratively perform gaus fits until recomputed mean and RMS stabilise (differ by <= 0.0005 )
update fit results
refitting adjusting new range
refitting
set the iteration results that are accessible to clients:
get fraction of excluded events + its ~ uncertainty
disregard under- and over- flow
return number of remaining allowed iteration steps
Definition at line 196 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ResolutionHelper.cxx.
|
private |
set large mean and RMS errors in case we eg. exclude too many events during evaluation
Definition at line 69 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ResolutionHelper.cxx.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
| void IDPVM::ResolutionHelper::setResults | ( | TH1 * | p_input_hist, |
| methods | p_method ) |
wrapper to set mean,rms,and fraction of events in tails nb: some of the methods are allowed to modify input histogram
Definition at line 287 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ResolutionHelper.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
|
private |
Definition at line 131 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
private |
Definition at line 134 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
private |
Definition at line 127 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
private |
Definition at line 128 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
private |
Definition at line 129 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
mutableprivateinherited |
|
private |
Definition at line 132 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
private |
Definition at line 139 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
private |
Definition at line 142 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
mutableprivateinherited |
|
private |
Definition at line 144 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
private |
results/outputs:
Definition at line 123 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
private |
Definition at line 124 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
private |
Definition at line 125 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
private |
Definition at line 126 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.
|
private |
Definition at line 133 of file InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/ResolutionHelper.h.