Skip to content
Snippets Groups Projects
Commit 9fa69a84 authored by Carsten Burgard's avatar Carsten Burgard :speech_balloon:
Browse files

added check to compare tags on samples to be transferred to different channels

parent 71df969c
No related branches found
No related tags found
1 merge request!664analysis developments
Pipeline #2455050 passed
......@@ -151,14 +151,17 @@ namespace TSBaseActions {
bool performTransfer(TQFolder * config,TQFolder* model,Log& log) const {
TString mode = config->getTagStringDefault("mode","sample");
mode.ToLower();
TQFolder* histograms = model->getFolder(".Histograms");
bool verbose = config->getTagBoolDefault("~verbose",false);
TString tagCheckFilter = config->getTagStringDefault("compareTags","rebin*,include*flow,remap");
std::vector<TString> exceptRegions = config->getTagVString("except.Channels");
std::vector<TString> exceptSamples = config->getTagVString("except.Samples");
std::vector<TString> exceptSystematics = config->getTagVString("except");
manager->info(TString::Format("performing transfer '%s'",config->GetName()));
manager->info(TString::Format("performing transfer '%s' in mode '%s'",config->GetName(),mode.Data()));
std::vector<TString> targetSamples = config->getTagVString("select.Samples");
if(targetSamples.empty()){
......@@ -346,6 +349,10 @@ namespace TSBaseActions {
delete copy;
continue;
}
if(!systematic->getBase()->tagsAreEquivalentTo(sample,tagCheckFilter)){
manager->error(TString::Format("cowardly refusing to transfer histogram with inconsistent production tags!"));
continue;
}
TQHistogramUtils::normalize(lowHist,nomHist);
lowHist->Divide(nomHist);
lowHist->Multiply(TargetnomHist);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment