PandaRoot
PndPidEmcBayesAssociatorTask.h
Go to the documentation of this file.
1 #ifndef PID_EMCBAYESASSOCIATOR_H
2 #define PID_EMCBAYESASSOCIATOR_H
3 
4 // **************************************************************************
5 // Author: Ronald Kunne e-mail: kunne@ipno.in2p3.fr
6 //
7 // Probability density functions from E/p distributions
8 //
9 // Created: 01-04-11
10 // Modified: 16-01-12 New formalism including moments
11 //
12 // **************************************************************************
13 
14 #include "TClonesArray.h"
15 #include "FairTask.h"
16 #include "TF1.h"
17 #include "TString.h"
18 
19 class PndPidCandidate;
20 class PndPidProbability;
21 class TH2D;
22 
23 class PndPidEmcBayesAssociatorTask : public FairTask {
24 
25  protected:
26  TClonesArray *fPidChargedCand;
27  TClonesArray *fPidChargedProb;
28 
30 
31  void DoPidMatch(PndPidCandidate *pidcand, PndPidProbability *prob);
32 
33  // Double_t GetPdf(Double_t thetaC, Double_t mom, Double_t emc, Int_t charge);
34  void GetPdf(Double_t pp1, Double_t th1, Double_t ph1, Double_t z20, Double_t z53, Double_t LAT, Double_t EP1, Int_t charge, Double_t *proba);
35 
36  // variables used
37  Int_t fNvar[6]; // nr of bins in p, th, ph, varx, vary, EP
38  Int_t fNbins; // total number of bins
39  TH2D *fBayesEP[10];
40  TH2D *fBayesTH[10];
41  TH2D *fBayesZZ[10];
42  TString fDirectory[10];
43 
44  Int_t fevcounter;
45 
46  public:
47  virtual void Exec(Option_t *option);
48  virtual InitStatus Init(); //
49 
50  void SetupEnvironment(char *filename);
51 
52  void Register();
53  void Reset();
54 
55  PndPidEmcBayesAssociatorTask(const char *name, const char *title = "Pnd Task");
58 
59  void SetVerbose(Bool_t verb) { fVerbose = verb; };
60 
62  virtual void SetParContainers();
63  virtual void Finish();
64 
65  void SetOutputBranch(TString branch) { fTrackBranchNamePidHypo = branch; };
66 
67  ClassDef(PndPidEmcBayesAssociatorTask, 1) // PndPidDrcTask
68 };
69 
70 #endif
TClonesArray * fPidChargedProb
PndPidCandidate TCA for charged particles.
virtual void SetParContainers()
void GetPdf(Double_t pp1, Double_t th1, Double_t ph1, Double_t z20, Double_t z53, Double_t LAT, Double_t EP1, Int_t charge, Double_t *proba)
virtual void Exec(Option_t *option)
void DoPidMatch(PndPidCandidate *pidcand, PndPidProbability *prob)
TString fTrackBranchNamePidHypo
PndPidProbability TCA for charged particles.
virtual InitStatus Init()
void SetupEnvironment(char *filename)