PandaRoot
PndPidEmcBayesAssociatorTask.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef PID_EMCBAYESASSOCIATOR_H
14 #define PID_EMCBAYESASSOCIATOR_H
15 
16 // **************************************************************************
17 // Author: Ronald Kunne e-mail: kunne@ipno.in2p3.fr
18 //
19 // Probability density functions from E/p distributions
20 //
21 // Created: 01-04-11
22 // Modified: 16-01-12 New formalism including moments
23 //
24 // **************************************************************************
25 
26 #include "TClonesArray.h"
27 #include "FairTask.h"
28 #include "TF1.h"
29 #include "TString.h"
30 
31 class PndPidCandidate;
32 class PndPidProbability;
33 class TH2D;
34 
35 class PndPidEmcBayesAssociatorTask : public FairTask {
36 
37  protected:
38  TClonesArray *fPidChargedCand;
39  TClonesArray *fPidChargedProb;
40 
42 
43  void DoPidMatch(PndPidCandidate *pidcand, PndPidProbability *prob);
44 
45  // Double_t GetPdf(Double_t thetaC, Double_t mom, Double_t emc, Int_t charge);
46  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);
47 
48  // variables used
49  Int_t fNvar[6]; // nr of bins in p, th, ph, varx, vary, EP
50  Int_t fNbins; // total number of bins
51  TH2D *fBayesEP[10];
52  TH2D *fBayesTH[10];
53  TH2D *fBayesZZ[10];
54  TString fDirectory[10];
55 
56  Int_t fevcounter;
57 
58  public:
59  virtual void Exec(Option_t *option);
60  virtual InitStatus Init(); //
61 
62  void SetupEnvironment(char *filename);
63 
64  void Register();
65  void Reset();
66 
67  PndPidEmcBayesAssociatorTask(const char *name, const char *title = "Pnd Task");
70 
71  void SetVerbose(Bool_t verb) { fVerbose = verb; };
72 
74  virtual void SetParContainers();
75  virtual void Finish();
76 
77  void SetOutputBranch(TString branch) { fTrackBranchNamePidHypo = branch; };
78 
79  ClassDef(PndPidEmcBayesAssociatorTask, 1) // PndPidDrcTask
80 };
81 
82 #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)