PandaRoot
PndPidSttAssociatorTask.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 //
14 // PndPidSttAssociatorTask.h
15 //
16 // STANDARD PROCEDURE:
17 //
18 // @ fixed momentum, the de/dx_mean values distribute as a gaussian:
19 // its mean and sigma is evaluated from the distribution of de/dx
20 // from truncated mean vs momentum from global tracking for the
21 // different particles.
22 //
23 // The candidate pid is evaluated as the probability density function
24 // value of the gaussian @ the reconstructed momentum, evaluated for
25 // the measured dedx_mean of the track.
26 //
27 // ============================================
28 
29 #ifndef PID_STT_ASSOCIATOR_H
30 #define PID_STT_ASSOCIATOR_H
31 
32 #include "FairTask.h"
33 
34 #include "TF1.h"
35 #include "TClonesArray.h"
36 
37 class PndPidCandidate;
38 class PndPidProbability;
39 
40 class PndPidSttAssociatorTask : public FairTask {
41 
42  protected:
43  TClonesArray *fPidChargedCand;
44  TClonesArray *fPidChargedProb;
45 
47 
48  // assign probabilities
49  void DoPidMatch(PndPidCandidate *pidcand, PndPidProbability *prob);
50 
51  // calculate probability
52  Double_t GetPdf(Double_t dedx, Double_t mean, Double_t sigma);
53 
55  void MuonDEDXMeanFunction();
56  void PionDEDXMeanFunction();
57  void KaonDEDXMeanFunction();
60 
62  void MuonDEDXSigmaFunction();
63  void PionDEDXSigmaFunction();
64  void KaonDEDXSigmaFunction();
67 
74 
81 
82  public:
85 
86  PndPidSttAssociatorTask(const char *name, const char *title = "Pnd Task");
87 
89  virtual ~PndPidSttAssociatorTask();
90 
92  virtual InitStatus Init();
93 
95  virtual void Exec(Option_t *opt);
96 
97  void SetVerbose(Bool_t verb) { fVerbose = verb; };
98  void SetOutputBranch(TString branch) { fTrackBranchNamePidHypo = branch; };
99 
100  void SetDefaultMassHypo(Bool_t hypo) { fDefaultHypo = hypo; }
101  Bool_t IsDefaultMassHypo() { return fDefaultHypo; }
102 
103  // when using the Kalman performed only with the muon hypothesis
104  // and the pid with the default hypothesis
107 };
108 
109 #endif
void SetOutputBranch(TString branch)
Double_t GetPdf(Double_t dedx, Double_t mean, Double_t sigma)
TClonesArray * fPidChargedProb
charged candidates
virtual ~PndPidSttAssociatorTask()
void DoPidMatch(PndPidCandidate *pidcand, PndPidProbability *prob)
void SetDefaultMassHypo(Bool_t hypo)
virtual InitStatus Init()
ClassDef(PndPidSttAssociatorTask, 1)
virtual void Exec(Option_t *opt)