CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
SideBandSubtract Class Reference

#include <SideBandSubtraction.h>

Public Member Functions

void addSideBandRegion (Double_t min, Double_t max)
 
void addSignalRegion (Double_t min, Double_t max)
 
void doFastSubtraction (TH1F &Total, TH1F &Result, SbsRegion &leftRegion, SbsRegion &rightRegion)
 
int doGlobalFit ()
 
int doSubtraction (RooRealVar *variable, Double_t stsratio, Int_t index)
 
std::vector< TH1F * > getBaseHistos ()
 
RooFitResult * getFitResult ()
 
std::vector< TH1F > getRawHistos ()
 
std::vector< TH1F > getSBSHistos ()
 
Double_t getSTSRatio ()
 
void printResults (std::string prefix="")
 
void resetSBSProducts ()
 
void saveResults (std::string outname)
 
void setDataSet (RooDataSet *newData)
 
 SideBandSubtract ()
 
 SideBandSubtract (RooAbsPdf *model_shape, RooAbsPdf *bkg_shape, RooDataSet *data, RooRealVar *sep_var, const std::vector< TH1F * > &base, bool verb)
 
 ~SideBandSubtract ()
 

Private Member Functions

Double_t getYield (const std::vector< SbsRegion > &Regions, RooAbsPdf *PDF)
 
void print_plot (RooRealVar *printVar, std::string outname)
 

Private Attributes

RooAbsPdf * BackgroundPDF
 
TH1F * base_histo
 
std::vector< TH1F * > BaseHistos
 
RooDataSet * Data
 
RooFitResult * fit_result
 
RooAbsPdf * ModelPDF
 
std::vector< TH1F > RawHistos
 
std::vector< TH1F > SBSHistos
 
RooRealVar * SeparationVariable
 
std::vector< TH1F > SideBandHistos
 
std::vector< SbsRegionSideBandRegions
 
std::vector< SbsRegionSignalRegions
 
Double_t SignalSidebandRatio
 
bool verbose
 

Detailed Description

Definition at line 19 of file SideBandSubtraction.h.

Constructor & Destructor Documentation

SideBandSubtract::SideBandSubtract ( )

Definition at line 290 of file SideBandSubtraction.cc.

291  : BackgroundPDF(nullptr),
292  ModelPDF(nullptr),
293  Data(nullptr),
294  SeparationVariable(nullptr),
295  verbose(false),
296  SignalRegions(),
297  SideBandRegions(),
298  SideBandHistos(0),
299  RawHistos(0),
300  SBSHistos(0),
301  BaseHistos(0),
302  fit_result(nullptr),
304  // Default constructor so we can do fast subtraction
305 }
RooAbsPdf * BackgroundPDF
std::vector< TH1F > SideBandHistos
RooFitResult * fit_result
std::vector< TH1F > SBSHistos
RooRealVar * SeparationVariable
std::vector< SbsRegion > SideBandRegions
std::vector< SbsRegion > SignalRegions
std::vector< TH1F * > BaseHistos
std::vector< TH1F > RawHistos
SideBandSubtract::SideBandSubtract ( RooAbsPdf *  model_shape,
RooAbsPdf *  bkg_shape,
RooDataSet *  data,
RooRealVar *  sep_var,
const std::vector< TH1F * > &  base,
bool  verb 
)

Definition at line 306 of file SideBandSubtraction.cc.

312  : BackgroundPDF(bkg_shape),
313  ModelPDF(model_shape),
314  Data(data),
315  SeparationVariable(sep_var),
316  verbose(verb),
317  SignalRegions(),
318  SideBandRegions(),
319  SideBandHistos(),
320  RawHistos(),
321  SBSHistos(),
322  BaseHistos(base),
323  base_histo(nullptr),
324  fit_result(nullptr),
325  SignalSidebandRatio(0) {}
RooAbsPdf * BackgroundPDF
std::vector< TH1F > SideBandHistos
base
Main Program
Definition: newFWLiteAna.py:92
RooFitResult * fit_result
std::vector< TH1F > SBSHistos
RooRealVar * SeparationVariable
std::vector< SbsRegion > SideBandRegions
std::vector< SbsRegion > SignalRegions
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
std::vector< TH1F * > BaseHistos
std::vector< TH1F > RawHistos
SideBandSubtract::~SideBandSubtract ( )

Definition at line 372 of file SideBandSubtraction.cc.

References resetSBSProducts().

372  {
373  //**WARNING**
374 
375  // We don't delete objects that we don't own (duh) so, all of our
376  // pointers just hang out and get handled by other people :)
377 
378  // We DO own the BaseHistos IFF the user didn't provide us with
379  // them and we constructed them from the dataset... in this case
380  // base_histo will be non-null and we want to delete the vector
381  // of histograms...
383  /*
384  if(base_histo!=NULL)
385  {
386  BaseHistos.clear();
387  }
388  */
389 }

Member Function Documentation

void SideBandSubtract::addSideBandRegion ( Double_t  min,
Double_t  max 
)

Definition at line 400 of file SideBandSubtraction.cc.

References SbsRegion::max, SiStripPI::max, SbsRegion::min, min(), SbsRegion::RegionName, SeparationVariable, SideBandRegions, and stringify().

400  {
401  SbsRegion sideband;
402  sideband.min = min;
403  sideband.max = max;
404  sideband.RegionName = "SideBand" + stringify(SideBandRegions.size());
405  if (SeparationVariable != nullptr)
406  SeparationVariable->setRange(sideband.RegionName.c_str(), sideband.min, sideband.max);
407  SideBandRegions.push_back(sideband);
408  return;
409 }
std::string stringify(const T &t)
RooRealVar * SeparationVariable
std::string RegionName
std::vector< SbsRegion > SideBandRegions
T min(T a, T b)
Definition: MathUtil.h:58
void SideBandSubtract::addSignalRegion ( Double_t  min,
Double_t  max 
)

Definition at line 390 of file SideBandSubtraction.cc.

References SbsRegion::max, SiStripPI::max, SbsRegion::min, min(), SbsRegion::RegionName, SeparationVariable, SignalRegions, and stringify().

390  {
391  SbsRegion signal;
392  signal.min = min;
393  signal.max = max;
394  signal.RegionName = "Signal" + stringify(SignalRegions.size());
395  if (SeparationVariable != nullptr)
396  SeparationVariable->setRange(signal.RegionName.c_str(), signal.min, signal.max);
397  SignalRegions.push_back(signal);
398  return;
399 }
std::string stringify(const T &t)
RooRealVar * SeparationVariable
std::string RegionName
T min(T a, T b)
Definition: MathUtil.h:58
std::vector< SbsRegion > SignalRegions
void SideBandSubtract::doFastSubtraction ( TH1F &  Total,
TH1F &  Result,
SbsRegion leftRegion,
SbsRegion rightRegion 
)

Definition at line 451 of file SideBandSubtraction.cc.

References spclusmultinvestigator_cfi::binMax, eeNoiseFilter_cfi::Intercept, SbsRegion::max, SbsRegion::min, eeNoiseFilter_cfi::Slope, testProducerWithPsetDescEmpty_cfi::x1, testProducerWithPsetDescEmpty_cfi::x2, geometryCSVtoXML::xx, testProducerWithPsetDescEmpty_cfi::y1, and testProducerWithPsetDescEmpty_cfi::y2.

451  {
452  Int_t binMin = Total.FindBin(leftRegion.max, 0.0, 0.0);
453  Int_t binMax = Total.FindBin(leftRegion.min, 0.0, 0.0);
454  double numLeft = Total.Integral(binMin, binMax);
455 
456  binMin = Total.FindBin(rightRegion.max, 0.0, 0.0);
457  binMax = Total.FindBin(rightRegion.min, 0.0, 0.0);
458  double numRight = Total.Integral(binMin, binMax);
459 
460  const unsigned int nbinsx = Total.GetNbinsX();
461  const double x1 = (leftRegion.max + leftRegion.min) / 2.0;
462  const double x2 = (rightRegion.max + rightRegion.min) / 2.0;
463 
464  const double y1 = numLeft / (leftRegion.max - leftRegion.min);
465  const double y2 = numRight / (rightRegion.max - rightRegion.min);
466 
467  const double Slope = (y2 - y1) / (x2 - x1);
468  const double Intercept = y1 - Slope * x1;
469  // Evantually we want to handle more complicated functions, but for
470  // now... just use a linear one
471  TF1 function("sbs_function_line", "[0]*x + [1]", Total.GetMinimum(), Total.GetMaximum());
472  for (unsigned int binx = 1; binx <= nbinsx; ++binx) {
473  double binWidth = Total.GetBinWidth(binx);
474  function.SetParameter(0, Slope * binWidth);
475  function.SetParameter(1, Intercept * binWidth);
476 
477  double xx = Total.GetBinCenter(binx);
478  double cu = Total.GetBinContent(binx) - function.Eval(xx);
479  // TODO: Propogate the error on the parameters in function.
480  double error1 = Total.GetBinError(binx);
481 
482  Result.SetBinContent(binx, cu);
483  Result.SetBinError(binx, error1);
484  }
485  Result.SetEntries(Result.Integral());
486 }
int SideBandSubtract::doGlobalFit ( )

Definition at line 410 of file SideBandSubtraction.cc.

References BackgroundPDF, BaseHistos, beam_dqm_sourceclient-live_cfg::cerr, gather_cfg::cout, Data, doSubtraction(), fit_result, getYield(), mps_fire::i, ModelPDF, resetSBSProducts(), SeparationVariable, SideBandRegions, SignalRegions, SignalSidebandRatio, AlCaHLTBitMon_QueryRunRegistry::string, and taus_updatedMVAIds_cff::variable.

410  {
411  if (verbose)
412  cout << "Beginning SideBand Subtraction\n";
413 
414  if (ModelPDF != nullptr && Data != nullptr && SeparationVariable != nullptr) {
415  fit_result = ModelPDF->fitTo(*Data, "r");
416  } else {
417  cerr << "ERROR: doGobalFit, no ModelPDF, SeparationVariable or Data specified\n";
418  return -1;
419  }
420 
421  Double_t SideBandYield = getYield(SideBandRegions, BackgroundPDF);
422  Double_t BackgroundInSignal = getYield(SignalRegions, BackgroundPDF);
423 
424  SignalSidebandRatio = BackgroundInSignal / SideBandYield;
425  if (verbose) {
426  cout << "Finished fitting background!\n";
427  cout << "Attained a Signal to Sideband ratio of: " << SignalSidebandRatio << endl;
428  }
429  //I can't see a way around a double loop for each variable. Maybe I
430  //can get a C++/RooFit guru to save me the trouble here?
431 
432  //need to grab sbs objects after each global fit, because they get reset
434  TIterator* iter = (TIterator*)Data->get()->createIterator();
435  RooAbsArg* variable;
436  while ((variable = (RooAbsArg*)iter->Next())) {
437  for (unsigned int i = 0; i < BaseHistos.size(); i++) {
438  if ((string)variable->GetName() != (string)SeparationVariable->GetName() &&
439  (string)variable->GetName() == (string)BaseHistos[i]->GetName())
441  }
442  }
443 
444  // clean up our memory...
445  if (variable)
446  delete variable;
447  if (iter)
448  delete iter;
449  return 0;
450 }
RooAbsPdf * BackgroundPDF
Double_t getYield(const std::vector< SbsRegion > &Regions, RooAbsPdf *PDF)
RooFitResult * fit_result
int doSubtraction(RooRealVar *variable, Double_t stsratio, Int_t index)
RooRealVar * SeparationVariable
std::vector< SbsRegion > SideBandRegions
std::vector< SbsRegion > SignalRegions
std::vector< TH1F * > BaseHistos
int SideBandSubtract::doSubtraction ( RooRealVar *  variable,
Double_t  stsratio,
Int_t  index 
)

Definition at line 77 of file SideBandSubtraction.cc.

References beam_dqm_sourceclient-live_cfg::cerr, mps_fire::i, dqmiolumiharvest::j, SiStripPI::max, min(), setHistOptions(), AlCaHLTBitMon_QueryRunRegistry::string, and trigObjTnPSource_cfi::var.

Referenced by doGlobalFit().

80 {
81  if (Data == nullptr || SeparationVariable == nullptr) {
82  cerr << "ERROR: Data or SeparationVariable is NULL returning now!\n";
83  return -1;
84  }
85  TH1F* SideBandHist = (TH1F*)BaseHistos[index]->Clone();
86  setHistOptions(SideBandHist,
87  (string)variable->GetName() + "Sideband",
88  (string)SideBandHist->GetTitle() + " Sideband",
89  (string)variable->getUnit());
90 
91  TH1F* SignalHist = (TH1F*)BaseHistos[index]->Clone();
92  setHistOptions(SignalHist,
93  (string)variable->GetName() + "SignalHist",
94  (string)SignalHist->GetTitle() + " Raw Signal",
95  (string)variable->getUnit());
96 
97  //Begin a loop over the data to fill our histograms. I should figure
98  //out how to do this in one shot to avoid a loop
99  //O(N_vars*N_events)...
100 
101  TIterator* iter = (TIterator*)Data->get()->createIterator();
102  RooAbsArg* var = nullptr;
103  RooRealVar* sep_var = nullptr;
104  while ((var = (RooAbsArg*)iter->Next())) {
105  if ((string)var->GetName() == (string)SeparationVariable->GetName()) {
106  sep_var = (RooRealVar*)var;
107  break;
108  }
109  }
110  for (int i = 0; i < Data->numEntries(); i++) {
111  Data->get(i);
112  Double_t value = variable->getVal();
113  Double_t cutval = sep_var->getVal();
114 
115  for (unsigned int j = 0; j < SideBandRegions.size(); j++) //UGLY! Find better solution!
116  {
117  if (cutval > SideBandRegions[j].min && cutval < SideBandRegions[j].max)
118  SideBandHist->Fill(value);
119  }
120  for (unsigned int j = 0; j < SignalRegions.size(); j++) {
121  if (cutval > SignalRegions[j].min && cutval < SignalRegions[j].max)
122  SignalHist->Fill(value);
123  }
124  }
125  //Save pre-subtracted histo
126  SignalHist->Sumw2();
127  SideBandHist->Sumw2();
128  //SignalHist->SetDirectory(0); SideBandHist->SetDirectory(0);
129  RawHistos.push_back(*SignalHist);
130 
131  SignalHist->Add(SideBandHist, -stsratio);
132 
133  SignalHist->SetTitle(((string)BaseHistos[index]->GetTitle() + " SBS Signal").c_str());
134  //Save subtracted histo
135  SBSHistos.push_back(*SignalHist);
136  //Save Sideband histo
137  SideBandHistos.push_back(*SideBandHist);
138 
139  if (SideBandHist)
140  delete SideBandHist;
141  return 0;
142 }
std::vector< TH1F > SideBandHistos
static void setHistOptions(TH1F *histo, string name, string title, string axis_label)
std::vector< TH1F > SBSHistos
RooRealVar * SeparationVariable
std::vector< SbsRegion > SideBandRegions
Definition: value.py:1
T min(T a, T b)
Definition: MathUtil.h:58
std::vector< SbsRegion > SignalRegions
std::vector< TH1F * > BaseHistos
std::vector< TH1F > RawHistos
vector< TH1F * > SideBandSubtract::getBaseHistos ( )

Definition at line 488 of file SideBandSubtraction.cc.

References BaseHistos.

488 { return BaseHistos; }
std::vector< TH1F * > BaseHistos
RooFitResult * SideBandSubtract::getFitResult ( )

Definition at line 487 of file SideBandSubtraction.cc.

References fit_result.

487 { return fit_result; }
RooFitResult * fit_result
vector< TH1F > SideBandSubtract::getRawHistos ( )

Definition at line 489 of file SideBandSubtraction.cc.

References RawHistos.

489 { return RawHistos; }
std::vector< TH1F > RawHistos
vector< TH1F > SideBandSubtract::getSBSHistos ( )

Definition at line 490 of file SideBandSubtraction.cc.

References SBSHistos.

490 { return SBSHistos; }
std::vector< TH1F > SBSHistos
Double_t SideBandSubtract::getSTSRatio ( )

Definition at line 491 of file SideBandSubtraction.cc.

References SignalSidebandRatio.

491 { return SignalSidebandRatio; }
Double_t SideBandSubtract::getYield ( const std::vector< SbsRegion > &  Regions,
RooAbsPdf *  PDF 
)
private

Definition at line 51 of file SideBandSubtraction.cc.

References gather_cfg::cout, and mps_fire::i.

Referenced by doGlobalFit().

51  {
52  if (PDF == nullptr || SeparationVariable == nullptr)
53  return 0.0;
54 
55  Double_t yield = 0;
56  RooAbsReal* intPDF;
57  for (unsigned int i = 0; i < Regions.size(); i++) {
58  if (verbose)
59  cout << "Integrating over Range: " << Regions[i].RegionName << " from " << Regions[i].min << " to "
60  << Regions[i].max << endl;
61  intPDF = PDF->createIntegral(*SeparationVariable, Range(Regions[i].RegionName.c_str()));
62  yield += intPDF->getVal();
63  if (verbose)
64  cout << "Current yield: " << yield << endl;
65  }
66  return yield;
67 }
PixelRecoRange< float > Range
RooRealVar * SeparationVariable
void SideBandSubtract::print_plot ( RooRealVar *  printVar,
std::string  outname 
)
private

Definition at line 274 of file SideBandSubtraction.cc.

References beam_dqm_sourceclient-live_cfg::cerr.

274  {
275  if (Data == nullptr || ModelPDF == nullptr) {
276  cerr << "ERROR: print_plot, Data or ModelPDF are NULL\n";
277  return;
278  }
279 
280  RooPlot* genericFrame = printVar->frame();
281  Data->plotOn(genericFrame);
282  ModelPDF->plotOn(genericFrame);
283  TCanvas genericCanvas;
284  genericFrame->Draw();
285  outname = outname + ".eps";
286  genericCanvas.SaveAs(outname.c_str());
287  outname.replace(outname.size() - 3, 3, "gif");
288  genericCanvas.SaveAs(outname.c_str());
289 }
void SideBandSubtract::printResults ( std::string  prefix = "")

Definition at line 151 of file SideBandSubtraction.cc.

References beam_dqm_sourceclient-live_cfg::cerr, gather_cfg::cout, corrVsCorr::filename, mps_fire::i, MillePedeFileConverter_cfg::out, DeadROCCounter_Phase1::outname, convertSQLitetoXML_cfg::output, print_histo(), AlCaHLTBitMon_QueryRunRegistry::string, and EcalTangentSkim_cfg::Verbose.

151  { //handles *all* printing
152  //spool over vectors of histograms and print them, then print
153  //separation variable plots and the results text file.
154  if (SeparationVariable == nullptr) {
155  cerr << "ERROR: printResults, SeparationVariable is NULL!\n";
156  return;
157  }
158  string filename; //output file name
159  for (unsigned int i = 0; i < RawHistos.size(); ++i) {
160  filename = prefix + "Raw_" + (string)RawHistos[i].GetName();
161  print_histo(&RawHistos[i], filename);
162  }
163  for (unsigned int i = 0; i < SBSHistos.size(); ++i) {
164  filename = prefix + "SBS_" + (string)RawHistos[i].GetName();
165  print_histo(&SBSHistos[i], filename);
166  }
167  if (verbose) {
168  for (unsigned int i = 0; i < SideBandHistos.size(); ++i) {
169  filename = prefix + "SideBand_" + (string)RawHistos[i].GetName();
170  print_histo(&SideBandHistos[i], filename);
171  }
172  }
173 
174  string outname = prefix + (string)SeparationVariable->GetName() + "_fitted.eps";
175  if (Data != nullptr && ModelPDF != nullptr) {
176  RooPlot* SepVarFrame = SeparationVariable->frame();
177  Data->plotOn(SepVarFrame);
178  ModelPDF->plotOn(SepVarFrame);
179  TCanvas Canvas;
180  SepVarFrame->Draw();
181  Canvas.SaveAs(outname.c_str());
182  outname.replace(outname.size() - 3, 3, "gif");
183  Canvas.SaveAs(outname.c_str());
184  } else
185  cerr << "ERROR: printResults, Data or ModelPDF is NULL!\n";
186 
187  string result_outname = prefix + "_fit_results.txt";
188  std::ofstream output(result_outname.c_str(), std::ios::out);
189  if (!output) {
190  cout << "ERROR: Could not open file for writing!\n";
191  return;
192  }
193 
194  if (fit_result != nullptr) {
195 #if ROOT_VERSION_CODE <= ROOT_VERSION(5, 19, 0)
196  fit_result->printToStream(output, Verbose);
197 #else
198  fit_result->printMultiline(output, kTRUE);
199 #endif
200  }
201 }
std::vector< TH1F > SideBandHistos
RooFitResult * fit_result
static void print_histo(TH1F *plot, string outname)
std::vector< TH1F > SBSHistos
RooRealVar * SeparationVariable
std::vector< TH1F > RawHistos
void SideBandSubtract::resetSBSProducts ( )

Definition at line 492 of file SideBandSubtraction.cc.

References RawHistos, SBSHistos, and SideBandHistos.

Referenced by doGlobalFit(), and ~SideBandSubtract().

492  {
493  //cout <<"Starting to reset products \n";
494 
495  if (!SideBandHistos.empty())
496  SideBandHistos.clear();
497 
498  if (!RawHistos.empty())
499  RawHistos.clear();
500  if (!SBSHistos.empty())
501  SBSHistos.clear();
502 }
std::vector< TH1F > SideBandHistos
std::vector< TH1F > SBSHistos
std::vector< TH1F > RawHistos
void SideBandSubtract::saveResults ( std::string  outname)

Definition at line 203 of file SideBandSubtraction.cc.

References beam_dqm_sourceclient-live_cfg::cerr, BTVHLTOfflineSource_cfi::dirname, mps_fire::i, crabWrapper::key, getGTfromDQMFile::obj, convertSQLitetoXML_cfg::output, and stringify().

203  {
204  //saves the ephemeral stuff to a root file for future
205  //use/modification (ie everything printed by printResults())
206 
207  TFile output(outname.c_str(), "UPDATE"); //open the output file,
208  //create it if it doesn't
209  //exist
210  //Since keys are only available from files on disk, we need to write
211  //out a new file. If the file already existed, then we opened to
212  //update, and are writing nothing new.
213  output.Write();
214  TString dirname;
215  TIter nextkey(output.GetListOfKeys());
216  TKey* key;
217  TDirectory* curDir = nullptr;
218  while ((key = (TKey*)nextkey.Next())) {
219  if (key == nullptr)
220  break;
221  TObject* obj = key->ReadObj();
222  if (obj->IsA()->InheritsFrom("TDirectory"))
223  dirname = obj->GetName();
224  }
225 
226  if (dirname == "") {
227  //we didn't find any directories so, we'll make a new one
228  curDir = output.mkdir("run0", "Run 0");
229  output.cd("run0");
230  } else {
231  //manipulate last dir string, make a new one, and get ready to fill
232  dirname.Remove(0, 3);
233  Int_t run_num = dirname.Atoi();
234  run_num++;
235  dirname = "run" + stringify(run_num);
236  curDir = output.mkdir(dirname.Data(), ("Run " + stringify(run_num)).c_str());
237  output.cd(dirname.Data());
238  }
239  if (curDir == nullptr)
240  curDir = output.GetDirectory("", kTRUE, "");
241 
242  //these should all be the same size, but to be pedantic we'll loop
243  //over each one individually, also, we need to associate them with
244  //the directory because by default they "float" in memory to avoid
245  //conflicts with other root files the user has open. If they want to
246  //write to those files, they need to close their file, pass the name
247  //here, and then let us work.
248  for (unsigned int i = 0; i < SideBandHistos.size(); ++i) {
249  SideBandHistos[i].SetDirectory(curDir);
250  SideBandHistos[i].Write();
251  }
252  for (unsigned int i = 0; i < RawHistos.size(); ++i) {
253  RawHistos[i].SetDirectory(curDir);
254  RawHistos[i].Write();
255  }
256  for (unsigned int i = 0; i < SBSHistos.size(); ++i) {
257  SBSHistos[i].SetDirectory(curDir);
258  SBSHistos[i].Write();
259  }
260  if (Data != nullptr && ModelPDF != nullptr && BackgroundPDF != nullptr && SeparationVariable != nullptr) {
261  RooPlot* sep_varFrame = SeparationVariable->frame();
262  Data->plotOn(sep_varFrame);
263  ModelPDF->plotOn(sep_varFrame);
264  BackgroundPDF->plotOn(sep_varFrame);
265  sep_varFrame->Write();
266  } else
267  cerr << "ERROR: saveResults, did not save RooPlot of data and fit\n";
268  output.Write();
269 }
RooAbsPdf * BackgroundPDF
std::vector< TH1F > SideBandHistos
std::string stringify(const T &t)
std::vector< TH1F > SBSHistos
RooRealVar * SeparationVariable
std::vector< TH1F > RawHistos
void SideBandSubtract::setDataSet ( RooDataSet *  newData)

Definition at line 270 of file SideBandSubtraction.cc.

270  {
271  if (newData != nullptr)
272  Data = newData;
273 }

Member Data Documentation

RooAbsPdf* SideBandSubtract::BackgroundPDF
private

Definition at line 23 of file SideBandSubtraction.h.

Referenced by doGlobalFit().

TH1F* SideBandSubtract::base_histo
private

Definition at line 34 of file SideBandSubtraction.h.

std::vector<TH1F*> SideBandSubtract::BaseHistos
private

Definition at line 33 of file SideBandSubtraction.h.

Referenced by doGlobalFit(), and getBaseHistos().

RooDataSet* SideBandSubtract::Data
private

Definition at line 25 of file SideBandSubtraction.h.

Referenced by doGlobalFit().

RooFitResult* SideBandSubtract::fit_result
private

Definition at line 35 of file SideBandSubtraction.h.

Referenced by doGlobalFit(), and getFitResult().

RooAbsPdf* SideBandSubtract::ModelPDF
private

Definition at line 24 of file SideBandSubtraction.h.

Referenced by doGlobalFit().

std::vector<TH1F> SideBandSubtract::RawHistos
private

Definition at line 31 of file SideBandSubtraction.h.

Referenced by getRawHistos(), and resetSBSProducts().

std::vector<TH1F> SideBandSubtract::SBSHistos
private

Definition at line 32 of file SideBandSubtraction.h.

Referenced by getSBSHistos(), and resetSBSProducts().

RooRealVar* SideBandSubtract::SeparationVariable
private

Definition at line 26 of file SideBandSubtraction.h.

Referenced by addSideBandRegion(), addSignalRegion(), and doGlobalFit().

std::vector<TH1F> SideBandSubtract::SideBandHistos
private

Definition at line 30 of file SideBandSubtraction.h.

Referenced by resetSBSProducts().

std::vector<SbsRegion> SideBandSubtract::SideBandRegions
private

Definition at line 29 of file SideBandSubtraction.h.

Referenced by addSideBandRegion(), and doGlobalFit().

std::vector<SbsRegion> SideBandSubtract::SignalRegions
private

Definition at line 28 of file SideBandSubtraction.h.

Referenced by addSignalRegion(), and doGlobalFit().

Double_t SideBandSubtract::SignalSidebandRatio
private

Definition at line 36 of file SideBandSubtraction.h.

Referenced by doGlobalFit(), and getSTSRatio().

bool SideBandSubtract::verbose
private

Definition at line 27 of file SideBandSubtraction.h.