AliPhysics  59e0e03 (59e0e03)
AliSignificanceCalculator.h
Go to the documentation of this file.
1 #ifndef ALISIGNIFICANCECALCULATOR_H
2 #define ALISIGNIFICANCECALCULATOR_H
3 
4 /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice */
6 
7 /* $Id$ */
8 
16 
17 #include "TObject.h"
18 
19 class AliMultiDimVector;
20 
22  public:
26 
28 
29  void SetSignal(AliMultiDimVector* sig, Float_t norm=1.){
30  if(fSignal) delete fSignal;
31  fSignal=sig;
32  fNormSig=norm;
34  }
36  if(fBackground) delete fBackground;
37  fBackground=bac;
38  fNormBkg=norm;
40  }
41  void SetErrSquareSignal(AliMultiDimVector* err2sig, Float_t norm=1.){
43  fErrSquareSignal=err2sig;
44  fNormSig=norm;
46  }
49  fErrSquareBackground=err2bkg;
50  fNormBkg=norm;
52  }
53 
54  void SetNormalizations(Float_t normSig, Float_t normBkg){
55  fNormSig=normSig;
56  fNormBkg=normBkg;
58  }
59 
60  AliMultiDimVector* GetSignal() const {return fSignal;}
64 
65  void CalculateSignificance();
66  Float_t GetMaxSignificance(Int_t* cutIndices, Int_t ptbin) const{
67  Float_t sigMax=0;
68  if(fSignificance) fSignificance->FindMaximum(sigMax,cutIndices,ptbin);
69  return sigMax;
70  }
75 
76  private:
77  Bool_t Check() const;
80 
89 
91  ClassDef(AliSignificanceCalculator,0);
92 };
94 
95 #endif
void SetErrSquareSignal(AliMultiDimVector *err2sig, Float_t norm=1.)
Float_t GetMaxSignificance(Int_t *cutIndices, Int_t ptbin) const
AliMultiDimVector * fBackground
matrix with err^2 for signal
AliMultiDimVector * fSignificance
matrix with err^2 for background
AliMultiDimVector * CalculatePurity() const
void SetErrSquareBackground(AliMultiDimVector *err2bkg, Float_t norm=1.)
AliMultiDimVector * GetSignificanceError() const
void SetNormalizations(Float_t normSig, Float_t normBkg)
TCanvas * c
Definition: TestFitELoss.C:172
AliMultiDimVector * fErrSquareBackground
background matrix
AliMultiDimVector * GetSignificance() const
AliMultiDimVector * CalculatePurityError() const
AliMultiDimVector * GetBackground() const
void FindMaximum(Float_t &max_value, Int_t *ind, Int_t ptbin)
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
void SetBackground(AliMultiDimVector *bac, Float_t norm=1.)
AliMultiDimVector * CalculateSOverBError() const
AliMultiDimVector * fErrSquareSignal
signal matrix
Float_t fNormBkg
signal normalization
AliMultiDimVector * CalculateSOverB() const
AliMultiDimVector * GetSignal() const
AliMultiDimVector * fErrSignificance
significance matrix
AliSignificanceCalculator & operator=(const AliSignificanceCalculator &c)
bool Bool_t
Definition: External.C:53
Float_t fNormSig
matrix with error on significance
void SetSignal(AliMultiDimVector *sig, Float_t norm=1.)