FairRoot/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 
27  TClonesArray* fPidChargedCand;
28  TClonesArray* fPidChargedProb;
29 
31 
32 
33  void DoPidMatch(PndPidCandidate* pidcand, PndPidProbability* prob);
34 
35 // Double_t GetPdf(Double_t thetaC, Double_t mom, Double_t emc, Int_t charge);
36  void GetPdf(Double_t pp1, Double_t th1, Double_t ph1,
37  Double_t z20, Double_t z53, Double_t LAT, Double_t EP1,
38  Int_t charge, Double_t *proba);
39 
40 // variables used
41  Int_t fNvar[6]; // nr of bins in p, th, ph, varx, vary, EP
42  Int_t fNbins; // total number of bins
43  TH2D *fBayesEP[10];
44  TH2D *fBayesTH[10];
45  TH2D *fBayesZZ[10];
47 
48  Int_t fevcounter;
49 
50  public:
51 
52  virtual void Exec(Option_t * option);
53  virtual InitStatus Init(); //
54 
55  void SetupEnvironment(char *filename);
56 
57  void Register();
58  void Reset();
59 
60  PndPidEmcBayesAssociatorTask(const char *name, const char *title="Pnd Task");
63 
64  void SetVerbose(Bool_t verb) { fVerbose = verb ;};
65 
67  virtual void SetParContainers();
68  virtual void Finish();
69 
70  void SetOutputBranch(TString branch) { fTrackBranchNamePidHypo = branch; };
71 
72  ClassDef(PndPidEmcBayesAssociatorTask,1) // PndPidDrcTask
73 
74  };
75 
76 #endif
int fVerbose
Definition: poormantracks.C:24
TClonesArray * fPidChargedProb
PndPidCandidate TCA for charged particles.
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)
void DoPidMatch(PndPidCandidate *pidcand, PndPidProbability *prob)
Double_t
virtual void Exec(Option_t *option)
TString fTrackBranchNamePidHypo
PndPidProbability TCA for charged particles.
TString name
const string filename