NCFS-Pack
A generic (astro)particle physics analysis framework
 
Loading...
Searching...
No Matches
NcPsiDistrib.h
Go to the documentation of this file.
1#ifndef NcPsiDistrib_h
2#define NcPsiDistrib_h
3// Copyright(c) 2008 NCFS/IIHE, All Rights Reserved.
4// See cxx source for full Copyright notice.
5
6#include "TCanvas.h"
7#include "TH1D.h"
8
9#include "NcMath.h"
10#include "NcRandom.h"
11#include "NcSample.h"
12
14
16{
17 public :
18 NcPsiDistrib(); // Constructor
19 virtual ~NcPsiDistrib(); // Destructor
20
21 void SetNtrials(Long_t n); // Set number of trials
22 void SetNevents(Int_t n); // Set number of events to simulate
23 void SetNoutcomes(Int_t n, Double_t* p=0); // Set number of possible outcomes
24 void SetProbabilities(Double_t* p); // Set probabilities of the possible outcomes
25 void SetSignal(Int_t* s); // Set signal counts for each outcome
26 void SetPsiRange(Int_t nb, Float_t low, Float_t high); // Set lower edge of psi histogram
27 void SetReferencePsi(Double_t ref); // Set reference psi
28 void SetPrintFreq(Int_t freq); // Set print frequency
29
30 void Distribute(Int_t storemode=0); // Make psi distribution
31
32 TH1D* GetPsiHisto(); // Get the histogram with the psi distribution
33 NcSample* GetPsiSample(); // Get the sample containing information on the psi distribution
34 Double_t GetFracBelow(); // Get fraction of trials in which a psi smaller than the reference psi is observed
35 Double_t GetFracAbove(); // Get fraction of trials in which a psi larger than the reference psi is observed
36
37 protected :
38 Long_t fNtrials;
39 Int_t fNevents;
41 Double_t* fProbs;
42 Int_t* fSignal;
43 Bool_t fRangeSet;
44 Double_t fRefPsi;
45 Long_t fNbelow;
46 Long_t fNabove;
47 TH1D* fPsiHisto;
50
51 Float_t FindMaxPsi();
52
53 ClassDef(NcPsiDistrib,0) // Simple class to simulate Bayesian psi distributions
54};
55#endif
void Distribute(Int_t storemode=0)
void SetNevents(Int_t n)
void SetReferencePsi(Double_t ref)
Double_t GetFracBelow()
Bool_t fRangeSet
Double_t fRefPsi
Double_t GetFracAbove()
void SetNtrials(Long_t n)
TH1D * GetPsiHisto()
NcSample * fSample
Int_t * fSignal
void SetPrintFreq(Int_t freq)
virtual ~NcPsiDistrib()
Long_t fNtrials
void SetNoutcomes(Int_t n, Double_t *p=0)
void SetSignal(Int_t *s)
Double_t * fProbs
TH1D * fPsiHisto
void SetProbabilities(Double_t *p)
Float_t FindMaxPsi()
NcSample * GetPsiSample()
void SetPsiRange(Int_t nb, Float_t low, Float_t high)
Sampling and statistics tools for various multi-dimensional data samples.
Definition NcSample.h:28