AliCFUnfolding() | |
AliCFUnfolding(const Char_t* name, const Char_t* title, const Int_t nVar, const THnSparse* response, const THnSparse* efficiency, const THnSparse* measured, const THnSparse* prior = 0x0, Double_t maxConvergencePerDOF = 1.e-06, UInt_t randomSeed = 0, Int_t maxNumIterations = 10) | |
virtual | ~AliCFUnfolding() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TNamed::Clear(Option_t* option = "") |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
virtual void | TNamed::Copy(TObject& named) const |
virtual void | TObject::Delete(Option_t* option = "")MENU |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual void | TNamed::FillBuffer(char*& buffer) |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
THnSparse* | GetConditional() const |
THnSparse* | GetDeltaUnfoldedProfile() const |
Int_t | GetDOF() |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
const THnSparse* | GetEfficiency() const |
THnSparse* | GetEstMeasured() const |
virtual const char* | TObject::GetIconName() const |
THnSparse* | GetInverseResponse() const |
const THnSparse* | GetMeasured() const |
virtual const char* | TNamed::GetName() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
const THnSparse* | GetOriginalPrior() const |
THnSparse* | GetPrior() const |
const THnSparse* | GetResponse() const |
TF1* | GetSmoothFunction() const |
virtual const char* | TNamed::GetTitle() const |
THnSparse* | GetUnfolded() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TNamed::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() constMENU |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TNamed::IsSortable() const |
Bool_t | TObject::IsZombie() const |
virtual void | TNamed::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
virtual Bool_t | TObject::Notify() |
void | TObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | TNamed::Print(Option_t* option = "") const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "") |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
void | SetMaxNumberOfIterations(Int_t n = 10) |
virtual void | TNamed::SetName(const char* name)MENU |
virtual void | TNamed::SetNameTitle(const char* name, const char* title) |
void | SetNRandomIterations(Int_t n = 100) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | TNamed::SetTitle(const char* title = "")MENU |
virtual void | TObject::SetUniqueID(UInt_t uid) |
void | SetUseCorrelatedErrors() |
virtual void | ShowMembers(TMemberInspector&) |
virtual Int_t | TNamed::Sizeof() const |
static Short_t | SmoothUsingNeighbours(THnSparse*) |
virtual void | Streamer(TBuffer&) |
void | StreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
void | Unfold() |
void | UnsetCorrelatedErrors() |
virtual void | TObject::UseCurrentStyle() |
void | UseSmoothing(TF1* fcn = 0x0, Option_t* opt = "iremn") |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
void | TObject::MakeZombie() |
AliCFUnfolding(const AliCFUnfolding& c) | |
void | CalculateCorrelatedErrors() |
void | CreateConditional() |
void | CreateEstMeasured() |
void | CreateFlatPrior() |
void | CreateInvResponse() |
void | CreateRandomizedDist() |
void | CreateUnfolded() |
void | FillDeltaUnfoldedProfile() |
Double_t | GetChi2() |
Double_t | GetConvergence() |
void | GetCoordinates() |
void | Init() |
AliCFUnfolding& | operator=(const AliCFUnfolding& c) |
void | SetMaxConvergencePerDOF(Double_t val) |
Short_t | Smooth() |
Short_t | SmoothUsingFunction() |
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
TString | TNamed::fName | object identifier |
TString | TNamed::fTitle | object title |
THnSparse* | fConditional | Matrix holding the conditional probabilities P(M|T) |
Int_t* | fCoordinates2N | Coordinates in 2N (measured,true) space |
Int_t* | fCoordinatesN_M | Coordinates in measured space |
Int_t* | fCoordinatesN_T | Coordinates in true space |
THnSparse* | fDeltaUnfoldedN | Entries of the delta-unfolded distribution (count for each bin) |
THnSparse* | fDeltaUnfoldedP | Profile of the delta-unfolded distribution |
THnSparse* | fEfficiency | Copy of original efficiency (modified) |
const THnSparse* | fEfficiencyOrig | Efficiency map : dimensions must be N = number of variables (modified) |
THnSparse* | fInverseResponse | Inverse response matrix |
Double_t | fMaxConvergence | Convergence criterion in case of correlated error calculation |
Int_t | fMaxNumIterations | Maximum number of iterations to be performed |
THnSparse* | fMeasured | Copy of the original measureed spectrum (modified) |
THnSparse* | fMeasuredEstimate | Estimation of the measured (M) spectrum given the a priori (T) distribution |
const THnSparse* | fMeasuredOrig | Measured spectrum to be unfolded : dimensions must be N = number of variables (modified) |
Short_t | fNCalcCorrErrors | Book-keeping to prevend infinite loop |
Int_t | fNRandomIterations | Number of random distributed measured spectra |
Int_t | fNVariables | Number of variables used in analysis spectra (pt, y, ...) |
THnSparse* | fPrior | Copy of the original prior spectrum (modified) |
const THnSparse* | fPriorOrig | This is the assumed generated distribution : dimensions must be N = number of variables |
TRandom3* | fRandom3 | Object to get random number following Poisson distribution |
THnSparse* | fRandomEfficiency | Randomized distribution for each bin of the efficiency spectrum to calculate correlated errors |
THnSparse* | fRandomMeasured | Randomized distribution for each bin of the measured spectrum to calculate correlated errors |
THnSparse* | fRandomResponse | Randomized distribution for each bin of the response matrix to calculate correlated errors |
UInt_t | fRandomSeed | Random seed |
THnSparse* | fResponse | Copy of the original response matrix (modified) |
const THnSparse* | fResponseOrig | Response matrix : dimensions must be 2N = 2 x (number of variables) |
TF1* | fSmoothFunction | Function used to smooth the unfolded spectrum |
Option_t* | fSmoothOption | Option to use during the fit (with fSmoothFunction) ; default is "iremn" |
THnSparse* | fUnfolded | Unfolded spectrum (modified before and during error calculation) |
THnSparse* | fUnfoldedFinal | Final unfolded spectrum |
Bool_t | fUseSmoothing | Smooth the unfolded sectrum at each iteration; default is kFALSE |
Inheritance Chart: | ||||||||
|
named constructor
This function creates a estimate (M) of the reconstructed spectrum given the a priori distribution (T), the efficiency (E) and the conditional matrix (COND) --> P(M) = SUM { P(M|T) * P(T) } --> M(i) = SUM_k { COND(i,k) * T(k) * E (k)} This is needed to calculate the inverse response matrix
Creates the inverse response matrix (INV) with Bayesian method : uses the conditional matrix (COND), the prior probabilities (T) and the efficiency map (E) --> P(T|M) = P(M|T) * P(T) * eff(T) / SUM { P(M|T) * P(T) } --> INV(i,j) = COND(i,j) * T(j) * E(j) / SUM_k { COND(i,k) * T(k) }
Main routine called by the user : it calculates the unfolded spectrum from the response matrix, measured spectrum and efficiency several iterations are performed until a reasonable chi2 or convergence criterion is reached
Creates the unfolded (T) spectrum from the measured spectrum (M) and the inverse response matrix (INV) We have P(T) = SUM { P(T|M) * P(M) } --> T(i) = SUM_k { INV(i,k) * M(k) }
Create randomized dist from original measured distribution This distribution is created several times, each time with a different random number
Store difference of unfolded spectrum from measured distribution and unfolded spectrum from randomized distribution The delta profile has been set to a THnSparse to handle N dimension The THnSparse contains in each bin the mean value and spread of the difference This function updates the profile wrt to its previous mean and error The relation between iterations (n+1) and n is as follows : mean_{n+1} = (n*mean_n + value_{n+1}) / (n+1) sigma_{n+1} = sqrt { 1/(n+1) * [ n*sigma_n^2 + (n^2+n)*(mean_{n+1}-mean_n)^2 ] } (can this be optimized?)
assign coordinates in Measured and True spaces (dim=N) from coordinates in global space (dim=2N)
creates the conditional probability matrix (R*) holding the P(M|T), given the reponse matrix R --> R*(i,j) = R(i,j) / SUM_k{ R(k,j) }
Returns the chi2 between unfolded and a priori spectrum This function became absolute with the correlated error calculation. Errors on the unfolded distribution are not known until the end Use the convergence criterion instead
Returns convergence criterion = \sum_t ((U_t^{n-1}-U_t^n)/U_t^{n-1})^2 U is unfolded spectrum, t is the bin, n = current, n-1 = previous
Max. convergence criterion per degree of freedom : user setting convergence criterion = DOF*val; DOF = number of bins In Jan-Fiete's multiplicity note: Convergence criterion = DOF*0.001^2
Smoothes the unfolded spectrum By default each cell content is replaced by the average with the neighbouring bins (but not diagonally-neighbouring bins) However, if a specific function fcn has been defined in UseSmoothing(fcn), the unfolded will be fit and updated using fcn