CbmRoot
PairAnalysisSignalExt.h
Go to the documentation of this file.
1 #ifndef PAIRANALYSISSIGNALEXT_H
2 #define PAIRANALYSISSIGNALEXT_H
3 
4 //#############################################################
5 //# #
6 //# Class PairAnalysisSignalExt #
7 //# Authors: #
8 //# Julian Book, Uni Ffm / Julian.Book@cern.ch #
9 //# #
10 //#############################################################
11 
12 
13 #include <TF1.h>
14 #include <TH1F.h>
15 #include <TMath.h>
16 #include <TNamed.h>
17 #include <TVectorD.h>
18 
19 #include "PairAnalysis.h"
20 #include "PairAnalysisFunction.h"
21 
22 class TObjArray;
23 class TPaveText;
24 
26 
27 public:
29  kFittedMC = 0,
39  kCocktail
40  };
41 
49  kUserFunc
50  };
51 
53 
55  PairAnalysisSignalExt(const char* name, const char* title);
56 
58 
60  // signal
61 
62  void SetMCSignalShape(TH1F* hist) {
63  fgHistSimPM = hist;
64  fHistSignalMC = hist;
65  }
66  void SetIntegralRange(Double_t min, Double_t max) {
67  fIntMin = min;
68  fIntMax = max;
69  }
70  void SetPlotRange(Double_t min, Double_t max) {
71  fPlotMin = min;
72  fPlotMax = max;
73  }
74  void SetRebin(Int_t factor) { fRebin = factor; }
75  void SetStatRebin(Double_t stat) { fRebinStat = stat; }
76  void SetRebin(TArrayD* limits) { fBinLimits = limits; }
77  void SetRebin(TVectorD* limits) {
78  fBinLimits = new TArrayD(limits->GetNrows() - 1, limits->GetMatrixArray());
79  }
81  PairAnalysisFunction* sigF = 0x0) {
82  fPeakMethod = method;
83  fExtrFunc = sigF;
84  }
85  void SetMixingCorrection(Bool_t mixcorr = kTRUE) { fMixingCorr = mixcorr; }
86 
87  // background
88 
89  void SetMethod(EBackgroundMethod method) { fMethod = method; }
90  void SetNTrackRotations(Int_t iterations) { fNiterTR = iterations; }
92  Double_t intMin,
93  Double_t intMax,
94  Double_t intMin2 = 0.,
95  Double_t intMax2 = 0.) {
96  fSclMethod = method;
97  fScaleMin = intMin;
98  fScaleMax = intMax;
99  fScaleMin2 = intMin2;
100  fScaleMax2 = intMax2;
101  }
102  void SetCocktailContribution(TObjArray* arr, Bool_t subtract = kTRUE) {
103  fArrCocktail = arr;
104  fCocktailSubtr = subtract;
105  }
106 
107  // Getter
108 
109  Bool_t IsCocktailSubtracted() const { return fCocktailSubtr; }
110  Double_t GetIntegralMin() const { return fIntMin; }
111  Double_t GetIntegralMax() const { return fIntMax; }
112  Int_t GetRebin() const { return fRebin; }
113  TArrayD* GetRebinLimits() const { return fBinLimits; }
115  EBackgroundMethod GetMethod() const { return fMethod; }
116  Double_t GetScaleMin() const { return fScaleMin; }
117  Double_t GetScaleMax() const { return fScaleMax; }
118  Double_t GetScaleMin2() const { return fScaleMin2; }
119  Double_t GetScaleMax2() const { return fScaleMax2; }
120 
121  // values of results
122 
123  Double_t GetScaleFactor() const { return fScaleFactor; }
124  const TVectorD& GetValues() const { return fValues; }
125  const TVectorD& GetErrors() const { return fErrors; }
126  Double_t GetSignal() const { return fValues(0); }
127  Double_t GetSignalError() const { return fErrors(0); }
128  Double_t GetBackground() const { return fValues(1); }
129  Double_t GetBackgroundError() const { return fErrors(1); }
130  Double_t GetSignificance() const { return fValues(2); }
131  Double_t GetSignificanceError() const { return fErrors(2); }
132  Double_t GetSB() const { return fValues(3); }
133  Double_t GetSBError() const { return fErrors(3); }
134  Double_t GetMass() const { return fValues(4); }
135  Double_t GetMassError() const { return fErrors(4); }
136  Double_t GetMassWidth() const { return fValues(5); }
137  Double_t GetMassWidthError() const { return fErrors(5); }
138  Double_t GetMatchChi2NDF() const { return fValues(6); }
139  Double_t GetMatchChi2NDFError() const { return fErrors(6); }
140  static const char* GetValueName(Int_t i) {
141  return (i >= 0 && i < 7) ? fgkValueNames[i] : "";
142  }
143 
144  // objects
145 
146  TH1* GetMCSignalShape() const { return fHistSignalMC; }
147  TH1* GetSignalHistogram() const { return fHistSignal; }
148  TH1* GetSoverBHistogram() const { return fHistSB; }
149  TH1* GetSignificanceHistogram() const { return fHistSgn; }
150  TH1* GetBackgroundHistogram() const { return fHistBackground; }
151  TH1* GetUnlikeSignHistogram() const { return fHistDataPM; }
152  TH1* GetCocktailHistogram() const { return fHistCocktail; }
153  TH1* GetRfactorHistogram() const { return fHistRfactor; }
154  TObject* GetPeakShape() const { return fgPeakShape; }
155 
156 
158  Bool_t replaceValErr = kFALSE,
159  TH1F* mcShape = 0x0);
160  TPaveText* DrawStats(Double_t x1 = 0.,
161  Double_t y1 = 0.,
162  Double_t x2 = 0.,
163  Double_t y2 = 0.,
164  TString opt = "pRnbsSmrc");
165  Double_t ScaleHistograms(TH1* histRaw,
166  TH1* histBackground,
167  Double_t intMin,
168  Double_t intMax);
169  Double_t ScaleHistograms(TH1* histRaw,
170  TH1* histBackground,
171  Double_t intMin,
172  Double_t intMax,
173  Double_t intMin2,
174  Double_t intMax2);
175 
176  static TH1* MergeObjects(TH1* obj1, TH1* obj2, Double_t val = +1.);
177  void Print(Option_t* option = "") const;
178 
187  //virtual void Process(TObjArray * const /*arrhist*/) = 0;
188  void Process(TObjArray* const arrhist);
189  void ProcessLS(); // like-sign method
190  void ProcessEM(); // event mixing method
191  void ProcessTR(); // track rotation method
192  void ProcessCocktail(); // cocktail method
193 
194  void Draw(const Option_t* option = "");
195 
196  TObject* FindObject(TObjArray* arrhist, PairAnalysis::EPairType type) const;
197  TObject* FindObjectByTitle(TObjArray* arrhist, TString ref);
198 
199  // implemented to remove warnings
200  TObject* FindObject(const char*) const {
201  TObject* bla = new TObject();
202  return bla;
203  }
204  TObject* FindObject(const TObject*) const {
205  TObject* bla = new TObject();
206  return bla;
207  }
208 
209 protected:
210  TObjArray* fArrHists = NULL; // array of input histograms
211  TObjArray* fArrCocktail = NULL; // array of cocktail histograms
212  TH1* fHistSignal = NULL; // histogram of pure signal
213  TH1* fHistSB = NULL; // histogram of signal to bgrd
214  TH1* fHistSgn = NULL; // histogram of significance
216  NULL; // histogram of background (fitted=0, like-sign=1, event mixing=2)
217  TH1* fHistCocktail = NULL; // histogram of cocktail
218  TH1* fHistDataPM = NULL; // histogram of selected +- pair candidates
219  TH1* fHistDataPP = NULL; // histogram of selected ++ pair candidates
220  TH1* fHistDataMM = NULL; // histogram of selected -- pair candidates
221  TH1* fHistDataME =
222  NULL; // histogram of selected +- pair candidates from mixed event
223  TH1* fHistRfactor = NULL; // histogram of R factors
224  TH1* fHistSignalMC = NULL; // histogram of signal MC shape
225 
226  TH1* fHistMixPM = NULL; // histogram of selected +- pair candidates
227  TH1* fHistMixPP = NULL; // histogram of selected ++ pair candidates
228  TH1* fHistMixMM = NULL; // histogram of selected -- pair candidates
229  TH1* fHistMixMP = NULL; // histogram of selected +- pair candidates
230  TH1* fHistDataTR = NULL; // histogram of selected +- pair candidates
231 
232  TVectorD fValues; // values
233  TVectorD fErrors; // value errors
234 
235  Double_t fIntMin = 0.; // signal extraction range min
236  Double_t fIntMax = 0.; // signal extraction range max
237  Double_t fPlotMin = 0.; // plot range lowest inv. mass
238  Double_t fPlotMax = 0.; // plot range highest inv. mass
239 
240  Int_t fRebin = 1; // histogram rebin factor
241  Double_t fRebinStat = 1.; // rebin until bins have max. stat. error
242  TArrayD* fBinLimits = NULL; // bin limits from stat. rebinning
243 
244  void ScaleBackground();
245  EBackgroundMethod fMethod = kLikeSign; // method for background substraction
246  EScalingMethod fSclMethod = kSclToRaw; // method for background normalization
247  Double_t fScaleMin = 0.; // min for scaling
248  Double_t fScaleMax = 0.; // max for scaling
249  Double_t fScaleMin2 = 0.; // min2 for scaling
250  Double_t fScaleMax2 = 0.; // max2 for scaling
251  Int_t fNiterTR =
252  1; // track rotation scale factor according to number of rotations
253  Double_t fScaleFactor = 1.; // scale factor of histogram scaling
254  Bool_t fMixingCorr =
255  kFALSE; // switch for bin by bin correction with R factor
256  Bool_t fCocktailSubtr = kFALSE; // switch for cocktail subtraction
257 
258  PairAnalysisFunction* fExtrFunc = NULL; // signal extraction function
260  kBinCounting; // method for peak description and signal extraction
261  static TObject*
262  fgPeakShape; // histogram or function used to describe the extracted signal
263  Bool_t fPeakIsTF1 = kFALSE; // flag
264 
265  Bool_t fProcessed = kFALSE; // flag
266  static TH1F* fgHistSimPM; // simulated peak shape
267 
268  void FillSignificance(TH1* hfill, TObject* signal, TH1* hbgrd);
269  void SetSignificanceAndSOB(); // calculate the significance and S/B
270  void SetFWHM(); // calculate the fwhm
271 
272  static const char* fgkValueNames[7]; //value names
273  static const char*
274  fgkBackgroundMethodNames[11]; // background estimator names
275 
278 
279  ClassDef(PairAnalysisSignalExt, 3) // Class for signal extraction
280 };
281 
282 inline TObject*
284  PairAnalysis::EPairType type) const {
285  //
286  // shortcut to find a certain pair type object in array
287  //
288 
289  // return ( arrhist->FindObject(Form("Pair.%s",PairAnalysis::PairClassName(type))) );
290  TString ref = Form("Pair.%s", PairAnalysis::PairClassName(type));
291  for (Int_t i = 0; i < arrhist->GetEntriesFast(); i++) {
292  if (!ref.CompareTo(arrhist->UncheckedAt(i)->GetTitle()))
293  return arrhist->UncheckedAt(i);
294  }
295  return 0x0;
296 }
297 
298 inline TObject* PairAnalysisSignalExt::FindObjectByTitle(TObjArray* arrhist,
299  TString ref) {
300  //
301  // shortcut to find a certain pair type object in array
302  //
303  if (!arrhist) return 0x0;
304  // return ( arrhist->FindObject(Form("Pair.%s",PairAnalysis::PairClassName(type))) );
305  // TString ref=Form("Pair.%s",PairAnalysis::PairClassName(type));
306  for (Int_t i = 0; i < arrhist->GetEntriesFast(); i++) {
307  if (!ref.CompareTo(arrhist->UncheckedAt(i)->GetTitle())) {
308  return arrhist->UncheckedAt(i);
309  }
310  }
311  return 0x0;
312 }
313 
315  //
316  // Calculate S/B and significance
317  //
318 
319  // Signal/Background
320  fValues(3) = (fValues(1) > 0 ? fValues(0) / fValues(1) : 0);
321  Float_t epsSig = (fValues(0) > 0 ? fErrors(0) / fValues(0) : 0);
322  Float_t epsBknd = (fValues(1) > 0 ? fErrors(1) / fValues(1) : 0);
323  fErrors(3) = fValues(3) * TMath::Sqrt(epsSig * epsSig + epsBknd * epsBknd);
324  // Significance
325  fValues(2) = ((fValues(0) + fValues(1)) > 0
326  ? fValues(0) / TMath::Sqrt(fValues(0) + fValues(1))
327  : 0);
328  Float_t s = (fValues(0) > 0 ? fValues(0) : 0);
329  Float_t b = fValues(1);
330  Float_t se = fErrors(0);
331  Float_t be = fErrors(1);
332  // fErrors(2) = ((s+b)>0 ? TMath::Sqrt((s*(s+2*b)*(s+2*b)+b*s*s)/(4*TMath::Power(s+b,3))) : 0); // old implementation
333  fErrors(2) =
334  ((s + b) > 0
335  ? fValues(2)
336  * TMath::Sqrt(be * be + TMath::Power(se * (s + 2 * b) / s, 2)) / 2
337  / (s + b)
338  : 0);
339 }
340 
342  //
343  // calculate the full width at half maximum (fwhm)
344  //
345 
346  if (!fgPeakShape) return;
347 
348  // case for TF1
349  if (fgPeakShape->IsA() == TF1::Class()) {
350  TF1* fit = (TF1*) fgPeakShape->Clone("fit");
351  TF1* pfit = (TF1*) fit->Clone("pfit");
352  TF1* mfit = (TF1*) fit->Clone("mfit");
353  for (Int_t i = 0; i < fit->GetNpar(); i++) {
354  pfit->SetParameter(i, fit->GetParameter(i) + fit->GetParError(i));
355  mfit->SetParameter(i, fit->GetParameter(i) - fit->GetParError(i));
356  }
357  Double_t maxX = fit->GetMaximumX();
358  Double_t maxY = fit->GetHistogram()->GetMaximum();
359  Double_t xAxMin = fit->GetXmin();
360  Double_t xAxMax = fit->GetXmax();
361  // fwhms
362  Double_t fwhmMin = fit->GetX(.5 * maxY, xAxMin, maxX);
363  Double_t fwhmMax = fit->GetX(.5 * maxY, maxX, xAxMax);
364  Double_t pfwhmMin = pfit->GetX(.5 * maxY, xAxMin, maxX);
365  Double_t pfwhmMax = pfit->GetX(.5 * maxY, maxX, xAxMax);
366  Double_t mfwhmMin = mfit->GetX(.5 * maxY, xAxMin, maxX);
367  Double_t mfwhmMax = mfit->GetX(.5 * maxY, maxX, xAxMax);
368  Double_t pError = TMath::Abs((fwhmMax - fwhmMin) - (pfwhmMax - pfwhmMin));
369  Double_t mError = TMath::Abs((fwhmMax - fwhmMin) - (mfwhmMax - mfwhmMin));
370  fValues(5) = (fwhmMax - fwhmMin);
371  fErrors(5) = (pError >= mError ? pError : mError);
372  delete fit;
373  delete pfit;
374  delete mfit;
375  } else if (fgPeakShape->IsA() == TH1F::Class()) {
376  // th1 calculation
377  TH1F* hist = (TH1F*) fgPeakShape->Clone("hist");
378  Int_t bin1 = hist->FindFirstBinAbove(hist->GetMaximum() / 2);
379  Int_t bin2 = hist->FindLastBinAbove(hist->GetMaximum() / 2);
380  fValues(5) = hist->GetBinCenter(bin2) - hist->GetBinCenter(bin1);
381  fErrors(5) = 0.0; // not defined
382  delete hist;
383  }
384 }
385 
387  TObject* signal,
388  TH1* hbgrd) {
393 
394 
395  /* hfill->Reset("CEIS"); */
396  hfill->SetYTitle(GetValueName(2));
397 
398  Double_t s = 0.;
399  Double_t b = 0.;
400  Double_t se = 0.;
401  Double_t be = 0.;
402  for (Int_t i = 1; i <= hfill->GetNbinsX(); i++) {
403 
404  if (signal->IsA() == TF1::Class())
405  s = static_cast<TF1*>(signal)->Eval(hfill->GetBinCenter(i));
406  else {
407  s = static_cast<TH1*>(signal)->GetBinContent(i);
408  se = static_cast<TH1*>(signal)->GetBinError(i);
409  }
410 
411  b = hbgrd->GetBinContent(i);
412  be = hbgrd->GetBinError(i);
413 
414  Double_t sgn = ((s + b) > 0. ? s / TMath::Sqrt(s + b) : 0.);
415  // printf("s %.3e b %.3e \t s/b: %.3e sgn %.3e \n",s,b,s/b,sgn);
416  hfill->SetBinContent(i, sgn);
417  hfill->SetBinError(
418  i,
419  ((s + b) > 0.
420  ? sgn * TMath::Sqrt(be * be + TMath::Power(se * (s + 2 * b) / s, 2))
421  / 2 / (s + b)
422  : 0));
423  }
424 }
425 
426 
427 #endif
PairAnalysisSignalExt::GetMass
Double_t GetMass() const
Definition: PairAnalysisSignalExt.h:134
PairAnalysisSignalExt::GetSignificance
Double_t GetSignificance() const
Definition: PairAnalysisSignalExt.h:130
PairAnalysisSignalExt::fHistDataTR
TH1 * fHistDataTR
Definition: PairAnalysisSignalExt.h:230
PairAnalysisSignalExt::GetExtractionMethod
ESignalExtractionMethod GetExtractionMethod() const
Definition: PairAnalysisSignalExt.h:114
PairAnalysisSignalExt::ProcessLS
void ProcessLS()
Definition: PairAnalysisSignalExt.cxx:915
PairAnalysisSignalExt::fIntMax
Double_t fIntMax
Definition: PairAnalysisSignalExt.h:236
PairAnalysisSignalExt::kFittedMC
@ kFittedMC
Definition: PairAnalysisSignalExt.h:29
PairAnalysisSignalExt::kLikeSignRcorr
@ kLikeSignRcorr
Definition: PairAnalysisSignalExt.h:33
PairAnalysisSignalExt::PairAnalysisSignalExt
PairAnalysisSignalExt()
Definition: PairAnalysisSignalExt.cxx:65
PairAnalysisSignalExt::fPlotMin
Double_t fPlotMin
Definition: PairAnalysisSignalExt.h:237
PairAnalysisSignalExt::SetFWHM
void SetFWHM()
Definition: PairAnalysisSignalExt.h:341
PairAnalysisSignalExt::kLikeSignFit
@ kLikeSignFit
Definition: PairAnalysisSignalExt.h:35
PairAnalysisSignalExt::fPlotMax
Double_t fPlotMax
Definition: PairAnalysisSignalExt.h:238
PairAnalysisFunction
Definition: PairAnalysisFunction.h:22
PairAnalysisSignalExt::fCocktailSubtr
Bool_t fCocktailSubtr
Definition: PairAnalysisSignalExt.h:256
PairAnalysisSignalExt::Print
void Print(Option_t *option="") const
Definition: PairAnalysisSignalExt.cxx:214
PairAnalysisSignalExt::GetValueName
static const char * GetValueName(Int_t i)
Definition: PairAnalysisSignalExt.h:140
PairAnalysisSignalExt::EBackgroundMethod
EBackgroundMethod
Definition: PairAnalysisSignalExt.h:28
PairAnalysisSignalExt::fErrors
TVectorD fErrors
Definition: PairAnalysisSignalExt.h:233
PairAnalysisSignalExt::fMixingCorr
Bool_t fMixingCorr
Definition: PairAnalysisSignalExt.h:254
PairAnalysisSignalExt::fgkBackgroundMethodNames
static const char * fgkBackgroundMethodNames[11]
Definition: PairAnalysisSignalExt.h:274
PairAnalysisSignalExt::SetMethod
void SetMethod(EBackgroundMethod method)
Definition: PairAnalysisSignalExt.h:89
PairAnalysisSignalExt::GetMassWidthError
Double_t GetMassWidthError() const
Definition: PairAnalysisSignalExt.h:137
PairAnalysisSignalExt::EScalingMethod
EScalingMethod
Definition: PairAnalysisSignalExt.h:52
PairAnalysisSignalExt::fArrCocktail
TObjArray * fArrCocktail
Definition: PairAnalysisSignalExt.h:211
PairAnalysisSignalExt::fHistDataME
TH1 * fHistDataME
Definition: PairAnalysisSignalExt.h:221
PairAnalysisSignalExt::SetCocktailContribution
void SetCocktailContribution(TObjArray *arr, Bool_t subtract=kTRUE)
Definition: PairAnalysisSignalExt.h:102
PairAnalysis::EPairType
EPairType
Definition: PairAnalysis.h:26
PairAnalysisSignalExt
Definition: PairAnalysisSignalExt.h:25
PairAnalysisSignalExt::GetMatchChi2NDFError
Double_t GetMatchChi2NDFError() const
Definition: PairAnalysisSignalExt.h:139
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
PairAnalysisSignalExt::kRotation
@ kRotation
Definition: PairAnalysisSignalExt.h:38
PairAnalysisSignalExt::fHistDataPP
TH1 * fHistDataPP
Definition: PairAnalysisSignalExt.h:219
PairAnalysisSignalExt::ProcessCocktail
void ProcessCocktail()
Definition: PairAnalysisSignalExt.cxx:1120
PairAnalysisSignalExt::fScaleMin
Double_t fScaleMin
Definition: PairAnalysisSignalExt.h:247
PairAnalysisSignalExt::SetRebin
void SetRebin(Int_t factor)
Definition: PairAnalysisSignalExt.h:74
PairAnalysisSignalExt::ProcessTR
void ProcessTR()
Definition: PairAnalysisSignalExt.cxx:1070
PairAnalysisSignalExt::kUserFunc
@ kUserFunc
Definition: PairAnalysisSignalExt.h:49
PairAnalysisSignalExt::fHistMixMP
TH1 * fHistMixMP
Definition: PairAnalysisSignalExt.h:229
PairAnalysisSignalExt::fHistDataPM
TH1 * fHistDataPM
Definition: PairAnalysisSignalExt.h:218
PairAnalysisSignalExt::GetBackgroundHistogram
TH1 * GetBackgroundHistogram() const
Definition: PairAnalysisSignalExt.h:150
PairAnalysisSignalExt::GetPeakShape
TObject * GetPeakShape() const
Definition: PairAnalysisSignalExt.h:154
PairAnalysisSignalExt::fMethod
EBackgroundMethod fMethod
Definition: PairAnalysisSignalExt.h:245
PairAnalysisSignalExt::GetSignificanceHistogram
TH1 * GetSignificanceHistogram() const
Definition: PairAnalysisSignalExt.h:149
PairAnalysisSignalExt::fBinLimits
TArrayD * fBinLimits
Definition: PairAnalysisSignalExt.h:242
PairAnalysisSignalExt::IsCocktailSubtracted
Bool_t IsCocktailSubtracted() const
Definition: PairAnalysisSignalExt.h:109
PairAnalysisSignalExt::kEventMixingFit
@ kEventMixingFit
Definition: PairAnalysisSignalExt.h:37
PairAnalysisSignalExt::FindObjectByTitle
TObject * FindObjectByTitle(TObjArray *arrhist, TString ref)
Definition: PairAnalysisSignalExt.h:298
PairAnalysisSignalExt::kCocktail
@ kCocktail
Definition: PairAnalysisSignalExt.h:39
PairAnalysisSignalExt::kLikeSign
@ kLikeSign
Definition: PairAnalysisSignalExt.h:31
PairAnalysisSignalExt::GetSignalHistogram
TH1 * GetSignalHistogram() const
Definition: PairAnalysisSignalExt.h:147
PairAnalysisSignalExt::SetPlotRange
void SetPlotRange(Double_t min, Double_t max)
Definition: PairAnalysisSignalExt.h:70
PairAnalysisSignalExt::fHistMixPP
TH1 * fHistMixPP
Definition: PairAnalysisSignalExt.h:227
PairAnalysisSignalExt::fHistSignal
TH1 * fHistSignal
Definition: PairAnalysisSignalExt.h:212
PairAnalysisSignalExt::SetIntegralRange
void SetIntegralRange(Double_t min, Double_t max)
Definition: PairAnalysisSignalExt.h:66
min
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
Definition: L1/vectors/P4_F32vec4.h:33
PairAnalysisSignalExt::SetRebin
void SetRebin(TArrayD *limits)
Definition: PairAnalysisSignalExt.h:76
PairAnalysisSignalExt::fArrHists
TObjArray * fArrHists
Definition: PairAnalysisSignalExt.h:210
PairAnalysisSignalExt::fExtrFunc
PairAnalysisFunction * fExtrFunc
Definition: PairAnalysisSignalExt.h:258
PairAnalysisSignalExt::kMCScaledMax
@ kMCScaledMax
Definition: PairAnalysisSignalExt.h:44
PairAnalysisSignalExt::fScaleMax2
Double_t fScaleMax2
Definition: PairAnalysisSignalExt.h:250
PairAnalysisFunction.h
sgn
friend F32vec4 sgn(const F32vec4 &a)
Definition: L1/vectors/P4_F32vec4.h:65
PairAnalysis.h
PairAnalysisSignalExt::kEventMixing
@ kEventMixing
Definition: PairAnalysisSignalExt.h:36
PairAnalysisSignalExt::GetScaleFactor
Double_t GetScaleFactor() const
Definition: PairAnalysisSignalExt.h:123
PairAnalysisSignalExt::fHistDataMM
TH1 * fHistDataMM
Definition: PairAnalysisSignalExt.h:220
PairAnalysisSignalExt::kFitted
@ kFitted
Definition: PairAnalysisSignalExt.h:30
PairAnalysisSignalExt::GetSBError
Double_t GetSBError() const
Definition: PairAnalysisSignalExt.h:133
PairAnalysisSignalExt::fRebin
Int_t fRebin
Definition: PairAnalysisSignalExt.h:240
PairAnalysis::PairClassName
static const char * PairClassName(Int_t i)
Definition: PairAnalysis.h:169
PairAnalysisSignalExt::GetMassError
Double_t GetMassError() const
Definition: PairAnalysisSignalExt.h:135
PairAnalysisSignalExt::GetMCSignalShape
TH1 * GetMCSignalShape() const
Definition: PairAnalysisSignalExt.h:146
PairAnalysisSignalExt::fProcessed
Bool_t fProcessed
Definition: PairAnalysisSignalExt.h:265
PairAnalysisSignalExt::fIntMin
Double_t fIntMin
Definition: PairAnalysisSignalExt.h:235
PairAnalysisSignalExt::fgkValueNames
static const char * fgkValueNames[7]
Definition: PairAnalysisSignalExt.h:272
PairAnalysisSignalExt::FillSignificance
void FillSignificance(TH1 *hfill, TObject *signal, TH1 *hbgrd)
Definition: PairAnalysisSignalExt.h:386
PairAnalysisSignalExt::DescribePeakShape
TObject * DescribePeakShape(ESignalExtractionMethod method=kMCFitted, Bool_t replaceValErr=kFALSE, TH1F *mcShape=0x0)
Definition: PairAnalysisSignalExt.cxx:388
PairAnalysisSignalExt::GetRebinLimits
TArrayD * GetRebinLimits() const
Definition: PairAnalysisSignalExt.h:113
PairAnalysisSignalExt::GetMassWidth
Double_t GetMassWidth() const
Definition: PairAnalysisSignalExt.h:136
PairAnalysisSignalExt::SetMixingCorrection
void SetMixingCorrection(Bool_t mixcorr=kTRUE)
Definition: PairAnalysisSignalExt.h:85
PairAnalysisSignalExt::ScaleHistograms
Double_t ScaleHistograms(TH1 *histRaw, TH1 *histBackground, Double_t intMin, Double_t intMax)
Definition: PairAnalysisSignalExt.cxx:243
PairAnalysisSignalExt::GetScaleMin
Double_t GetScaleMin() const
Definition: PairAnalysisSignalExt.h:116
PairAnalysisSignalExt::GetRebin
Int_t GetRebin() const
Definition: PairAnalysisSignalExt.h:112
PairAnalysisSignalExt::GetBackground
Double_t GetBackground() const
Definition: PairAnalysisSignalExt.h:128
PairAnalysisSignalExt::Draw
void Draw(const Option_t *option="")
Definition: PairAnalysisSignalExt.cxx:1154
PairAnalysisSignalExt::fNiterTR
Int_t fNiterTR
Definition: PairAnalysisSignalExt.h:251
PairAnalysisSignalExt::fValues
TVectorD fValues
Definition: PairAnalysisSignalExt.h:232
PairAnalysisSignalExt::GetIntegralMin
Double_t GetIntegralMin() const
Definition: PairAnalysisSignalExt.h:110
PairAnalysisSignalExt::GetScaleMax
Double_t GetScaleMax() const
Definition: PairAnalysisSignalExt.h:117
PairAnalysisSignalExt::Process
void Process(TObjArray *const arrhist)
Definition: PairAnalysisSignalExt.cxx:596
PairAnalysisSignalExt::fHistMixMM
TH1 * fHistMixMM
Definition: PairAnalysisSignalExt.h:228
PairAnalysisSignalExt::GetRfactorHistogram
TH1 * GetRfactorHistogram() const
Definition: PairAnalysisSignalExt.h:153
PairAnalysisSignalExt::SetNTrackRotations
void SetNTrackRotations(Int_t iterations)
Definition: PairAnalysisSignalExt.h:90
PairAnalysisSignalExt::fHistSgn
TH1 * fHistSgn
Definition: PairAnalysisSignalExt.h:214
PairAnalysisSignalExt::FindObject
TObject * FindObject(TObjArray *arrhist, PairAnalysis::EPairType type) const
Definition: PairAnalysisSignalExt.h:283
PairAnalysisSignalExt::ESignalExtractionMethod
ESignalExtractionMethod
Definition: PairAnalysisSignalExt.h:42
PairAnalysisSignalExt::GetCocktailHistogram
TH1 * GetCocktailHistogram() const
Definition: PairAnalysisSignalExt.h:152
PairAnalysisSignalExt::kSclToRaw
@ kSclToRaw
Definition: PairAnalysisSignalExt.h:52
PairAnalysisSignalExt::GetBackgroundError
Double_t GetBackgroundError() const
Definition: PairAnalysisSignalExt.h:129
PairAnalysisSignalExt::kGaus
@ kGaus
Definition: PairAnalysisSignalExt.h:48
PairAnalysisSignalExt::SetMCSignalShape
void SetMCSignalShape(TH1F *hist)
Definition: PairAnalysisSignalExt.h:62
PairAnalysisSignalExt::SetStatRebin
void SetStatRebin(Double_t stat)
Definition: PairAnalysisSignalExt.h:75
PairAnalysisSignalExt::kCrystalBall
@ kCrystalBall
Definition: PairAnalysisSignalExt.h:47
PairAnalysisSignalExt::operator=
PairAnalysisSignalExt & operator=(const PairAnalysisSignalExt &c)
PairAnalysisSignalExt::fHistMixPM
TH1 * fHistMixPM
Definition: PairAnalysisSignalExt.h:226
PairAnalysisSignalExt::fSclMethod
EScalingMethod fSclMethod
Definition: PairAnalysisSignalExt.h:246
PairAnalysisSignalExt::fHistRfactor
TH1 * fHistRfactor
Definition: PairAnalysisSignalExt.h:223
PairAnalysisSignalExt::SetRebin
void SetRebin(TVectorD *limits)
Definition: PairAnalysisSignalExt.h:77
PairAnalysisSignalExt::ProcessEM
void ProcessEM()
Definition: PairAnalysisSignalExt.cxx:1020
PairAnalysisSignalExt::ScaleBackground
void ScaleBackground()
Definition: PairAnalysisSignalExt.cxx:1551
PairAnalysisSignalExt::kLikeSignArithmRcorr
@ kLikeSignArithmRcorr
Definition: PairAnalysisSignalExt.h:34
PairAnalysisSignalExt::GetUnlikeSignHistogram
TH1 * GetUnlikeSignHistogram() const
Definition: PairAnalysisSignalExt.h:151
PairAnalysisSignalExt::fHistSignalMC
TH1 * fHistSignalMC
Definition: PairAnalysisSignalExt.h:224
PairAnalysisSignalExt::GetSB
Double_t GetSB() const
Definition: PairAnalysisSignalExt.h:132
PairAnalysisSignalExt::fScaleFactor
Double_t fScaleFactor
Definition: PairAnalysisSignalExt.h:253
PairAnalysisSignalExt::FindObject
TObject * FindObject(const char *) const
Definition: PairAnalysisSignalExt.h:200
PairAnalysisSignalExt::fRebinStat
Double_t fRebinStat
Definition: PairAnalysisSignalExt.h:241
PairAnalysisSignalExt::kMCFitted
@ kMCFitted
Definition: PairAnalysisSignalExt.h:46
PairAnalysisSignalExt::kSclToLikeSign
@ kSclToLikeSign
Definition: PairAnalysisSignalExt.h:52
PairAnalysisSignalExt::kLikeSignArithm
@ kLikeSignArithm
Definition: PairAnalysisSignalExt.h:32
PairAnalysisSignalExt::GetSignificanceError
Double_t GetSignificanceError() const
Definition: PairAnalysisSignalExt.h:131
PairAnalysisSignalExt::fPeakMethod
ESignalExtractionMethod fPeakMethod
Definition: PairAnalysisSignalExt.h:259
PairAnalysisSignalExt::GetValues
const TVectorD & GetValues() const
Definition: PairAnalysisSignalExt.h:124
PairAnalysisSignalExt::MergeObjects
static TH1 * MergeObjects(TH1 *obj1, TH1 *obj2, Double_t val=+1.)
Definition: PairAnalysisSignalExt.cxx:321
PairAnalysisSignalExt::fHistSB
TH1 * fHistSB
Definition: PairAnalysisSignalExt.h:213
PairAnalysisSignalExt::GetScaleMin2
Double_t GetScaleMin2() const
Definition: PairAnalysisSignalExt.h:118
PairAnalysisSignalExt::fHistBackground
TH1 * fHistBackground
Definition: PairAnalysisSignalExt.h:215
PairAnalysisSignalExt::GetSignal
Double_t GetSignal() const
Definition: PairAnalysisSignalExt.h:126
PairAnalysisSignalExt::SetSignificanceAndSOB
void SetSignificanceAndSOB()
Definition: PairAnalysisSignalExt.h:314
PairAnalysisSignalExt::fgPeakShape
static TObject * fgPeakShape
Definition: PairAnalysisSignalExt.h:262
PairAnalysisSignalExt::fHistCocktail
TH1 * fHistCocktail
Definition: PairAnalysisSignalExt.h:217
PairAnalysisSignalExt::SetScaleBackgroundTo
void SetScaleBackgroundTo(EScalingMethod method, Double_t intMin, Double_t intMax, Double_t intMin2=0., Double_t intMax2=0.)
Definition: PairAnalysisSignalExt.h:91
PairAnalysisSignalExt::fScaleMax
Double_t fScaleMax
Definition: PairAnalysisSignalExt.h:248
PairAnalysisSignalExt::kMCScaledInt
@ kMCScaledInt
Definition: PairAnalysisSignalExt.h:45
PairAnalysisSignalExt::GetErrors
const TVectorD & GetErrors() const
Definition: PairAnalysisSignalExt.h:125
max
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: L1/vectors/P4_F32vec4.h:36
PairAnalysisSignalExt::kBinCounting
@ kBinCounting
Definition: PairAnalysisSignalExt.h:43
PairAnalysisSignalExt::GetSoverBHistogram
TH1 * GetSoverBHistogram() const
Definition: PairAnalysisSignalExt.h:148
PairAnalysisSignalExt::GetMatchChi2NDF
Double_t GetMatchChi2NDF() const
Definition: PairAnalysisSignalExt.h:138
PairAnalysisSignalExt::GetMethod
EBackgroundMethod GetMethod() const
Definition: PairAnalysisSignalExt.h:115
PairAnalysisSignalExt::GetScaleMax2
Double_t GetScaleMax2() const
Definition: PairAnalysisSignalExt.h:119
PairAnalysisSignalExt::DrawStats
TPaveText * DrawStats(Double_t x1=0., Double_t y1=0., Double_t x2=0., Double_t y2=0., TString opt="pRnbsSmrc")
Definition: PairAnalysisSignalExt.cxx:140
PairAnalysisSignalExt::FindObject
TObject * FindObject(const TObject *) const
Definition: PairAnalysisSignalExt.h:204
PairAnalysisSignalExt::~PairAnalysisSignalExt
~PairAnalysisSignalExt()
Definition: PairAnalysisSignalExt.cxx:117
PairAnalysisSignalExt::fgHistSimPM
static TH1F * fgHistSimPM
Definition: PairAnalysisSignalExt.h:266
PairAnalysisSignalExt::fScaleMin2
Double_t fScaleMin2
Definition: PairAnalysisSignalExt.h:249
PairAnalysisSignalExt::GetSignalError
Double_t GetSignalError() const
Definition: PairAnalysisSignalExt.h:127
PairAnalysisSignalExt::fPeakIsTF1
Bool_t fPeakIsTF1
Definition: PairAnalysisSignalExt.h:263
PairAnalysisSignalExt::SetExtractionMethod
void SetExtractionMethod(ESignalExtractionMethod method, PairAnalysisFunction *sigF=0x0)
Definition: PairAnalysisSignalExt.h:80
PairAnalysisSignalExt::GetIntegralMax
Double_t GetIntegralMax() const
Definition: PairAnalysisSignalExt.h:111