PandaRoot
PndPidTestTask.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 PndPidTestTask_H
14 #define PndPidTestTask_H 1
15 
16 #include "FairTask.h"
17 #include <map>
18 #include <string>
19 #include "TLorentzVector.h"
20 
21 class TClonesArray;
22 class TObjectArray;
23 class TH1F;
24 class TH2F;
25 
27 class PndAnalysis;
28 class RhoCandList;
29 class RhoTuple;
30 
31 class PndPidTestTask : public FairTask {
32 
33  public:
34  // ** Default constructor
36 
37  // ** Destructor
39 
40  // ** Virtual method Init
41  virtual InitStatus Init();
42 
43  // ** Virtual method Exec
44  virtual void Exec(Option_t *opt);
45 
46  virtual void Finish();
47 
48  void SetClassifier(TString val) { fClassifier = val; }
49 
50  void SetSelector(TString val) { fSelector = val; }
51 
52  void PrintConfusionMatrix(bool relative = false);
53 
54  std::vector<std::vector<int>> GetConfusionMatrix() const { return fConfusionMatrix; }
55 
56  protected:
57  private:
58  // *** event counter
59  int fEvtCount;
60 
61  std::vector<std::vector<int>> fConfusionMatrix;
62  std::map<int, int> fPdgIndex;
63  std::vector<std::string> fParticleNames;
64 
65  // *** the PndAnalysis object
66  PndAnalysis *fAnalysis;
67 
68  // *** Get parameter containers
69  virtual void SetParContainers();
70 
71  TString fClassifier;
72  TString fSelector;
73  std::vector<RhoCandList *> fCandLists;
74 
75  ClassDef(PndPidTestTask, 1);
76 };
77 
78 #endif
void PrintConfusionMatrix(bool relative=false)
std::vector< std::vector< int > > GetConfusionMatrix() const
virtual void Finish()
void SetClassifier(TString val)
virtual InitStatus Init()
virtual void Exec(Option_t *opt)
void SetSelector(TString val)