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