PandaRoot
PndAnaPidCombiner.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 // PndAnaPidCombiner.h
15 // PANDAROOT
16 //
17 // Created by Ralf Kliemt on 12/16/11.
18 //
19 #ifndef PNDANAPIDCOMBINER_H
20 #define PNDANAPIDCOMBINER_H
21 
22 #include <iostream>
23 #include "TNamed.h"
24 #include "FairRootManager.h"
25 #include <map>
26 #include <vector>
27 
28 class RhoCandidate;
29 class RhoCandList;
30 class PndPidCandidate;
31 class TClonesArray;
32 class PndPidProbability;
33 class TString;
34 
35 class PndAnaPidCombiner : public TNamed {
36 
37  public:
38  // Constructor
39  PndAnaPidCombiner(const char *name = "PndAnaPidCombiner", TString tcanames = "");
40  // Destructor
41  ~PndAnaPidCombiner(){/*empty*/};
42  // void AddTcaName(const TString& tcaname) {fPidArrays[tcaname]=0;};
43  void SetTcaNames(TString &names, TString postfix = "");
44  void SetDefaults();
45  void ClearNames() { fPidArrays.clear(); };
46  void Init();
47 
48  void ApplyFlat(RhoCandidate *tc);
49  Bool_t Apply(RhoCandidate *tc);
50  Bool_t Apply(RhoCandList &tcl);
51 
52  private:
53  TClonesArray *ReadTCA(const TString &tcaname);
54  FairRootManager *fRootManager;
55  std::map<TString, TClonesArray *> fPidArrays;
56  std::vector<TString> fCurrentPidArrays;
57  PndPidProbability *fPidResult;
58  Bool_t fInitialized;
59 
60  public:
61  ClassDef(PndAnaPidCombiner, 1)
62 };
63 
64 #endif
void SetTcaNames(TString &names, TString postfix="")
void ApplyFlat(RhoCandidate *tc)
Bool_t Apply(RhoCandidate *tc)
PndAnaPidCombiner(const char *name="PndAnaPidCombiner", TString tcanames="")