FairRoot/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 //--------------------------------------------
33 // Collaborating class forward declarations --
34 // -------------------------------------------
35 #include "ArgList.h"
36 #include "RhoBase/RhoCandList.h"
37 
38 //typedef std::vector<PndListProvider*>;
39 
40 class TParticlePDG;
41 class TDatabasePDG;
51 
52 class TH1F;
53 
54 
56 {
57  public:
58 
59  //--------------------
60  // Public interface --
61  //--------------------
62 
63  //
64  // Constructors
65  //
66 
67  PndListProvider(std::string name, std::string pdgType="");
68  PndListProvider(std::string name, int pdgcode);
69 
70  //
71  // Destructor
72  //
73  virtual ~PndListProvider();
74 
75  //
76  // Modifiers + Accessors to contained information
77  //
78 
79  std::string GetName() {return fName;}
80  bool IsGeneric() {return fIsGeneric;}
81  bool ToDump() {return fToDump;}
82 
83  void SetType(std::string pdgType);
84  void SetType(int pdgcode);
85  void SetGeneric(bool isgeneric=true) {fIsGeneric=isgeneric;}
86  void SetToDump(bool todump=true) {fToDump=todump;}
87  void SetHisto(TH1F* h) {fHisto=h;}
88  void SetCandList(RhoCandList& cl);
89  void SetMassSelector(double mean, double width);
90 
92  void AddDecayProduct(std::string dname);
93  void AddDaughterType(std::string dtype);
94  void AddDaughterType(int pdgcode);
95  int GetType();
96  int GetDaughterType(int i);
97  std::string GetDecayProdName(int i);
98  int GetNDaughters() {return fNDaughters;}
99 
100  void GetCandList(RhoCandList& tl);
101  int GetNCandidates();
102 
103  TH1F* GetHisto() {return fHisto;}
104  void FillHisto();
105 
106  void Reset();
107  void Print();
108 
109 
110  private:
111  std::string fName;
112 
114 
118 
119  TH1F* fHisto;
120 
121  TParticlePDG* fParticlePDG;
122  std::vector<TParticlePDG*> fDaughterPDG;
124  std::vector<PndListProvider*> fDaughterPointers;
125 
127 
129  bool fToDump;
132 
133 };
134 
135 #endif
PndListProvider(std::string name, std::string pdgType="")
RhoMinusParticleSelector * fMinusSel
void SetType(std::string pdgType)
std::string GetName()
Int_t i
Definition: run_full.C:25
void SetGeneric(bool isgeneric=true)
void AddDecayProduct(std::string dname)
RhoCandList fOwnList
void SetToDump(bool todump=true)
RhoMassParticleSelector * fMassSel
Double_t p
Definition: anasim.C:58
std::vector< PndListProvider * > fDaughterPointers
virtual ~PndListProvider()
RhoPlusParticleSelector * fPlusSel
void SetMassSelector(double mean, double width)
ArgVector fDaughterListNames
std::string fName
void AddDaughterPointer(PndListProvider *p)
TString name
std::string GetDecayProdName(int i)
int GetDaughterType(int i)
void SetCandList(RhoCandList &cl)
void SetHisto(TH1F *h)
std::vector< TParticlePDG * > fDaughterPDG
void AddDaughterType(std::string dtype)
Double_t mean[nsteps]
Definition: dedx_bands.C:65
std::vector< std::string > ArgVector
Definition: ArgList.h:8
TParticlePDG * fParticlePDG
void GetCandList(RhoCandList &tl)