PandaRoot
PndListProvider.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 // Description:
15 // Class PndListProvider
16 //
17 // List Container for PndSimpleAnalysis
18 //
19 // This software was developed for the PANDA collaboration. If you
20 // use all or part of it, please give an appropriate acknowledgement.
21 //
22 // Author List:
23 // Klaus Goetzen Original Author
24 //
25 // Copyright Information:
26 // Copyright (C) 2008 GSI
27 //
28 //------------------------------------------------------------------------
29 
30 #ifndef PNDLISTPROVIDER_H
31 #define PNDLISTPROVIDER_H
32 
33 //----------------------
34 // Base Class Headers --
35 //----------------------
36 
37 #include <string>
38 
39 //-------------------------------
40 // Collaborating class Headers --
41 //-------------------------------
42 
43 //--------------------------------------------
44 // Collaborating class forward declarations --
45 // -------------------------------------------
46 #include "ArgList.h"
47 #include "RhoCandList.h"
48 
49 // typedef std::vector<PndListProvider*>;
50 
51 class TParticlePDG;
52 class TDatabasePDG;
58 #include "RhoSimpleKaonSelector.h"
59 #include "RhoSimpleMuonSelector.h"
60 #include "RhoSimplePionSelector.h"
62 
63 class TH1F;
64 
66  public:
67  //--------------------
68  // Public interface --
69  //--------------------
70 
71  //
72  // Constructors
73  //
74 
75  PndListProvider(std::string name, std::string pdgType = "");
76  PndListProvider(std::string name, int pdgcode);
77 
78  //
79  // Destructor
80  //
81  virtual ~PndListProvider();
82 
83  //
84  // Modifiers + Accessors to contained information
85  //
86 
87  std::string GetName() { return fName; }
88  bool IsGeneric() { return fIsGeneric; }
89  bool ToDump() { return fToDump; }
90 
91  void SetType(std::string pdgType);
92  void SetType(int pdgcode);
93  void SetGeneric(bool isgeneric = true) { fIsGeneric = isgeneric; }
94  void SetToDump(bool todump = true) { fToDump = todump; }
95  void SetHisto(TH1F *h) { fHisto = h; }
96  void SetCandList(RhoCandList &cl);
97  void SetMassSelector(double mean, double width);
98 
100  void AddDecayProduct(std::string dname);
101  void AddDaughterType(std::string dtype);
102  void AddDaughterType(int pdgcode);
103  int GetType();
104  int GetDaughterType(int i);
105  std::string GetDecayProdName(int i);
106  int GetNDaughters() { return fNDaughters; }
107 
108  void GetCandList(RhoCandList &tl);
109  int GetNCandidates();
110 
111  TH1F *GetHisto() { return fHisto; }
112  void FillHisto();
113 
114  void Reset();
115  void Print();
116 
117  private:
118  std::string fName;
119 
120  RhoCandList fOwnList;
121 
122  RhoMinusParticleSelector *fMinusSel;
123  RhoPlusParticleSelector *fPlusSel;
124  RhoMassParticleSelector *fMassSel;
125 
126  TH1F *fHisto;
127 
128  TParticlePDG *fParticlePDG;
129  std::vector<TParticlePDG *> fDaughterPDG;
130  ArgVector fDaughterListNames;
131  std::vector<PndListProvider *> fDaughterPointers;
132 
133  int fNDaughters;
134 
135  bool fIsGeneric;
136  bool fToDump;
137  bool fCandsUptodate;
138  bool fHistoFilled;
139 };
140 
141 #endif
PndListProvider(std::string name, std::string pdgType="")
void SetType(std::string pdgType)
std::string GetName()
void SetGeneric(bool isgeneric=true)
void AddDecayProduct(std::string dname)
void SetToDump(bool todump=true)
unsigned int i
Definition: P4_F32vec4.h:33
void SetMassSelector(double mean, double width)
void AddDaughterPointer(PndListProvider *p)
std::string GetDecayProdName(int i)
int GetDaughterType(int i)
void SetCandList(RhoCandList &cl)
void SetHisto(TH1F *h)
void AddDaughterType(std::string dtype)
std::vector< std::string > ArgVector
Definition: ArgList.h:20
virtual ~PndListProvider()
void GetCandList(RhoCandList &tl)