![]() |
AliPhysics
07fddbf (07fddbf)
|
Helper class creating user defined custom binning. More...
#include <TCustomBinning.h>
Classes | |
class | MinNotSetException |
Exception thrown in case the minimum is not set. More... | |
Public Member Functions | |
TCustomBinning () | |
virtual | ~TCustomBinning () |
virtual TBinning * | MakeCopy () const |
void | SetMinimum (Double_t min) |
void | AddStep (Double_t max, Double_t binwidth) |
virtual void | CreateBinEdges (TArrayD &edges) const |
![]() | |
TBinning () | |
virtual | ~TBinning () |
Private Attributes | |
Double_t | fMinimum |
Minimum of the binning. More... | |
Bool_t | fMinimumSet |
Define whether minimum is set. Attention: Bin edges will not be created without minimum. More... | |
std::map< double, double > | fSteps |
List of ranges with common bin width. More... | |
Helper class creating user defined custom binning.
A custom binning is defined by a user an can contain bins of different width. The user has to define ranges in which the bin width is equal, bin edges are calculated accordingly. Do do so, the first step is to define a minimum for the range.
Now ranges can be added via the AddStep function:
In this example the binning is done:
The binning can be converted to a TArrayD which contains the bin edges in increasing order:
Definition at line 52 of file TCustomBinning.h.
TCustomBinning::TCustomBinning | ( | ) |
|
inlinevirtual |
Destructor
Definition at line 93 of file TCustomBinning.h.
Add new step. Will create bins in steps of the binwidth from the previous maximum to the maximum assigned here.
[in] | max | New maximum of the binning |
[in] | binwidth | Width of the bin |
Definition at line 32 of file TCustomBinning.cxx.
Referenced by AliEmcalCellMonitorTask::AliEmcalCellMonitorAmplitudeBinning::AliEmcalCellMonitorAmplitudeBinning(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalClusterMatched::EnergyBinning::EnergyBinning(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalPatchesRef::EnergyBinning::EnergyBinning(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalClustersRef::EnergyBinning::EnergyBinning(), EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesMCTriggerMimic::PtBinning::PtBinning(), and EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesRef::PtBinning::PtBinning().
|
virtual |
Create bin edges from the minimum and the ranges. Bin edges will be stored in the array edges in increasing order
[out] | edges | Array storing bin edges |
MinNotSetException | in case the minimum is not defined |
Implements TBinning.
Definition at line 40 of file TCustomBinning.cxx.
|
virtual |
Implementation of the copy function for the custom binning class
Implements TBinning.
Definition at line 69 of file TCustomBinning.cxx.
|
inline |
Set the minumum (the lowest bin edge). As the bin edges are calculated based on the minumum this information is cructial to be provided by the user.
[in] | minimum | bin edge |
Definition at line 107 of file TCustomBinning.h.
Referenced by AliEmcalCellMonitorTask::AliEmcalCellMonitorAmplitudeBinning::AliEmcalCellMonitorAmplitudeBinning(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalClusterMatched::EnergyBinning::EnergyBinning(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalPatchesRef::EnergyBinning::EnergyBinning(), EMCalTriggerPtAnalysis::AliAnalysisTaskEmcalClustersRef::EnergyBinning::EnergyBinning(), EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesMCTriggerMimic::PtBinning::PtBinning(), and EMCalTriggerPtAnalysis::AliAnalysisTaskChargedParticlesRef::PtBinning::PtBinning().
|
private |
Minimum of the binning.
Definition at line 126 of file TCustomBinning.h.
Referenced by CreateBinEdges(), and SetMinimum().
|
private |
Define whether minimum is set. Attention: Bin edges will not be created without minimum.
Definition at line 127 of file TCustomBinning.h.
Referenced by CreateBinEdges(), and SetMinimum().
|
private |
List of ranges with common bin width.
Definition at line 128 of file TCustomBinning.h.
Referenced by AddStep(), and CreateBinEdges().