Common Analysis Framework » QFRAMEWORK » TQSystematicsManager

class TQSystematicsManager

__________________________________________________________________________________|___________

Function Members (Methods)

public:
virtual~TQSystematicsManager()
static TClass*Class()
static voiderror(TString message)
TH1*getHisto(TString path, bool verbose = true)
TQSampleFolder*getSampleFolder(TQTaggable* var)
TH1*getSysHisto(const TString& path, bool verbose = true)
TH1*getVarHisto(const TString& path, bool verbose = true)
TH1*getVarHisto(const TString& nameVariation, const TString& nameChannel, const TString& nameSample, bool verbose = true)
boolincludeHistoSys(TQFolder* sysFolder, TQFolder* sys, const TString& nameChannel, const TString& nameSample)
boolincludeOverallSys(TQFolder* sysFolder, TQFolder* sys, const TString& nameChannel, const TString& nameSample)
static voidinfo(TString message)
virtual TClass*IsA() const
boolisBlacklistedSys(TQFolder* sys, const vector<TString>& systBlacklist, const vector<TString>& types = {"OverallSys", "HistoSys"})
boolisNegligibleSys(TQFolder* sys, TQTaggable* parameters)
boolisProtectedSys(TQFolder* sys, TQTaggable* parameters, const TString& prefix) const
Bool_tisSystBlacklisted(TQFolder* sys, const vector<TString>& systBlacklist, const vector<TString>& types = {"OverallSys", "HistoSys"})
TQSystematicsManager&operator=(const TQSystematicsManager&)
boolprocessHistoSys(TQTaggable* parameters, TQFolder* sys)
boolprocessHistoSys_checkCutoff(TQTaggable* parameters, TH1* ratio)
boolprocessHistoSys_isFlat(TQTaggable* parameters, TQFolder* sys, TH1* ratio)
boolprocessHistoSys_smoothVariation(TQTaggable* parameters, TQFolder* sys, TH1* nom, TH1* up, TH1* down)
boolprocessHistoSys_systsToSymmetrizeBins(TQTaggable* parameters, TQFolder* sys, TH1* nom, TH1* up, TH1* down)
boolprocessHistoSys_systsToSymmetrizeMaxBins(TQTaggable* parameters, TQFolder* sys, TH1* nom, TH1* up, TH1* down, bool force = false)
boolprocessOverallSys(TQTaggable* parameters, TQFolder* sys)
TQFolder*repository()
voidsetRepository(TQFolder* histos)
voidsetSampleFolder(const TString& path, TQSampleFolder* sf)
voidsetSystematicPrefix(const TString& prefix)
voidsetVariationPrefix(const TString& prefix)
virtual voidShowMembers(TMemberInspector& insp) const
TStringstoreSysHisto(TH1* histo, const TString& path)
TStringstoreSysHisto(TH1* histo, const TString& nameVariation, const TString& direction, const TString& nameChannel)
TStringstoreVarHisto(TH1* histo, const TString& path)
TStringstoreVarHisto(TH1* histo, const TString& nameVariation, const TString& nameChannel)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
TQSystematicsManager()
TQSystematicsManager(TQFolder* h)
TQSystematicsManager(const TQSystematicsManager&)
static voidwarn(TString message)
protected:
TH1*computeHistogramVariation(TQFolder* computeFolder, const TString& nameChannel, const TString& nameSample)
boolemitError()
vector<int>getSmoothedBinBorders(TQFolder* sysConfig)
voidmagnifyShapeVariation(TH1*& shape_Var, const TH1* h_Nom, Double_t magnification)
TH1*normalizeShapeVariation(const TH1* h_Var, const TH1* h_Nom, const TH1* h_Sym)
boolsmoothHist(const TString& alg, TH1* nom, TH1* var)
private:
virtual Bool_tCheckTObjectHashConsistency() const

Data Members

private:
map<TString,TQSampleFolder*>_inputCache
TQFolder*histos
intnErrorThreshold
intnErrors
TStringsysPrefix
TStringvarPrefix

Class Charts

Inheritance Chart:
TQSystematicsManager
TQSystematicsHandler

Function documentation

bool emitError()
void setSampleFolder(const TString& path, TQSampleFolder* sf)
 register a sample folder to the given path
TQSampleFolder* getSampleFolder(TQTaggable* var)
 retrieve the sample folder for the variation given
bool isBlacklistedSys(TQFolder* sys, const vector<TString>& systBlacklist, const vector<TString>& types = {"OverallSys", "HistoSys"})
 return true if a systematic matches the blacklist filter
bool includeOverallSys(TQFolder* sysFolder, TQFolder* sys, const TString& nameChannel, const TString& nameSample)
 include a normalization systematic
bool includeHistoSys(TQFolder* sysFolder, TQFolder* sys, const TString& nameChannel, const TString& nameSample)
 include a histogram systematic
bool processHistoSys_smoothVariation(TQTaggable* parameters, TQFolder* sys, TH1* nom, TH1* up, TH1* down)
 process a systematic by smoothing it
 return true if a smoothing has been performed, false otherwise
bool smoothHist(const TString& alg, TH1* nom, TH1* var)
bool processHistoSys_systsToSymmetrizeMaxBins(TQTaggable* parameters, TQFolder* sys, TH1* nom, TH1* up, TH1* down, bool force = false)
 Fix shape by symmetrizing maximum relative variation in each bin
 alternative to systsToSymmetrizeMaxBins
 return true if a symmetrization has been performed, false otherwise
bool processHistoSys_checkCutoff(TQTaggable* parameters, TH1* ratio)
 Cut-off systs with artificially high bins
 return true if histogram is found to violate the cutoff, false if it is found to be ok
bool processHistoSys_isFlat(TQTaggable* parameters, TQFolder* sys, TH1* ratio)
 Check flatness of a shape histogram using a chi2 fit of a flat line
 return true if histogram is found to be flat, false otherwise
bool processHistoSys_systsToSymmetrizeBins(TQTaggable* parameters, TQFolder* sys, TH1* nom, TH1* up, TH1* down)
 Fix shape by symmetrizing one-sided bins
 return true if a symmetrization has been performed, false otherwise
bool processHistoSys(TQTaggable* parameters, TQFolder* sys)
 returns true if the systematic is kept, false causes the systematic to be dropped
bool isProtectedSys(TQFolder* sys, TQTaggable* parameters, const TString& prefix) const
 checks if a systematic should be extempt from some treatment
 'select.tag'/'select.name' specifies whitelist(s) for systematics that some treatment should be applied to
 'except.tag'/'except.name' specifies blacklist(s) for systematics that some treatment should NOT be applied to
bool processOverallSys(TQTaggable* parameters, TQFolder* sys)
 process the overall systematics, applying pruning and symmetrization
TH1 * getVarHisto(const TString& nameVariation, const TString& nameChannel, const TString& nameSample, bool verbose = true)
 attempt to obtain a histogram from the folder
TH1 * getVarHisto(const TString& path, bool verbose = true)
 attempt to obtain a histogram from the folder
TH1 * getSysHisto(const TString& path, bool verbose = true)
 attempt to obtain a histogram from the folder
TH1 * getHisto(TString path, bool verbose = true)
 attempt to obtain a histogram from the folder
bool isNegligibleSys(TQFolder* sys, TQTaggable* parameters)
 Pruning based on contribution of sample in channel.
 If a sample contributes less in the channel than 'threshold' percent of the specified total,
 the systematic attached to that sample is pruned.
TH1* computeHistogramVariation(TQFolder* computeFolder, const TString& nameChannel, const TString& nameSample)
 compute the variation based on the information in the computeFolder
@tag: [Mode] mode used for the computation of the Up/Down variations from the input variations. Possible values include: single,difference,minimum,maximum,envelope,stddev,hessian
@tag: [Variations] list of input variations to use for the computation of the Up/Down variations
@tag: [Baseline] baseline variation to be used (default: Nominal)
@tag: [StatError] stat error histogram to be used
@tag: [Direction] direction of this variation (+1 for Up, -1 for Down)
@tag: [Scale] scale up or down this variation by some arbitrary factor
@tag: [TransferRelative] transfer relative variation instead of absolute (default: true)
 @tag[Smoothing.SmoothBins]: A vector of integers specifying the bin boundaries to be used for
     calculating the relative variation between nominal and a variation. This relative variation
     is applied to the nominal histogram to get the smoothed variation.
     Example: Given a nominal histogram with 7 bins and the following tag applied Smoothing.SmoothBins={1, 2, 3, 5, 8}
     means the relative variation would be calculated for the last 3 bins merged, that is, the sum of bin 5, 6, 7
     for nominal (Nom_567) and the variation (Var_567) is taken and the smoothed variational histogram
bins will become:  Var_5 = Var_567/Nom_567*Nom_5, Var_6=Var_567/Nom_567*Nom_6, ... 
TH1* normalizeShapeVariation(const TH1* h_Var, const TH1* h_Nom, const TH1* h_Sym)
 normalize histogram variation to get shape variation
void setSystematicPrefix(const TString& prefix)
 set the prefix of all systematics histogram to use in the repository
void setVariationPrefix(const TString& prefix)
 set the prefix of all variations histogram to use in the repository
TString storeSysHisto(TH1* histo, const TString& nameVariation, const TString& direction, const TString& nameChannel)
 store a variation (input) histogram
TString storeVarHisto(TH1* histo, const TString& nameVariation, const TString& nameChannel)
 store a variation (input) histogram
TString storeSysHisto(TH1* histo, const TString& path)
 store a systematic (output) histogram
TString storeVarHisto(TH1* histo, const TString& path)
 store a variation (input) histogram
void magnifyShapeVariation(TH1*& shape_Var, const TH1* h_Nom, Double_t magnification)
 magnify a variation by an exponent
void info(TString message)
 print an info message
void error(TString message)
 print a red error message
void warn(TString message)
 print a yellow warning message
void setRepository(TQFolder* histos)
TQFolder* repository()
~TQSystematicsManager()
Bool_t isSystBlacklisted(TQFolder* sys, const std::vector<TString>& systBlacklist, const std::vector<TString>& types = {"OverallSys","HistoSys"})
std::vector<int> getSmoothedBinBorders(TQFolder* sysConfig)
 bins to smooth histograms manually
TQSystematicsManager(TQFolder* h)
{}
TQSystematicsManager()
{}