ROOTPWA
waveSetGenerator.h
Go to the documentation of this file.
1 
2 //
3 // Copyright 2010
4 //
5 // This file is part of rootpwa
6 //
7 // rootpwa is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // rootpwa is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with rootpwa. If not, see <http://www.gnu.org/licenses/>.
19 //
21 //-------------------------------------------------------------------------
22 // File and Version Information:
23 // $Rev:: $: revision of last commit
24 // $Author:: $: author of last commit
25 // $Date:: $: date of last commit
26 //
27 // Description:
28 // class that generates set of isobar decay topologies from a
29 // template and according to user defined criteria
30 //
31 //
32 // Author List:
33 // Boris Grube TUM (original author)
34 //
35 //
36 //-------------------------------------------------------------------------
37 
38 
39 #ifndef WAVESETGENERATOR_H
40 #define WAVESETGENERATOR_H
41 
42 
43 #include <boost/tuple/tuple.hpp>
44 
45 #include "isobarDecayTopology.h"
46 
47 
48 namespace rpwa {
49 
50 
52 
53  public:
54 
55  // some typedefs for convenience
56  typedef isobarDecayTopology::nodeDesc nodeDesc;
57  typedef isobarDecayTopology::adjIterator adjIterator;
58 
59 
61  virtual ~waveSetGenerator();
62 
63  bool setWaveSetParameters(const std::string& templateKeyFileName);
64 
65  // wave set parameter accessors
66  // !note! isospin and angular momentum quantum numbers are in units of hbar / 2
67  void setIsospinRange (const int maxI = 2,
68  const int minI = 0) { _isospinRange = boost::tuples::make_tuple(minI, maxI); }
69  void setJRange (const int maxJ = 6,
70  const int minJ = 0) { _JRange = boost::tuples::make_tuple(minJ, maxJ); }
71  void setLRange (const int maxL = 6,
72  const int minL = 0) { _LRange = boost::tuples::make_tuple(minL, maxL); }
73  void setSRange (const int maxS = 6,
74  const int minS = 0) { _SRange = boost::tuples::make_tuple(minS, maxS); }
75  void setIsobarBlackList (const std::vector<std::string>& isobarList)
76  { _isobarBlackList = isobarList; }
77  void setIsobarWhiteList (const std::vector<std::string>& isobarList)
78  { _isobarWhiteList = isobarList; }
79  void setAllowSpinExotics (const bool flag ) { _allowSpinExotics = flag; }
80  void setRequireMinIsobarMass (const bool flag ) { _requireMinIsobarMass = flag; }
81  void setForceDecayCheck (const bool flag ) { _forceDecayCheck = flag; }
82  void setIsobarMassWindowSigma(const double sigma = 1) { _isobarMassWindowSigma = sigma; }
83 
84  std::size_t generateWaveSet();
85 
86  std::vector<isobarDecayTopology>& waveSet() { return _waveSet; }
87  const std::vector<isobarDecayTopology>& waveSet() const { return _waveSet; }
88 
89  bool writeKeyFiles(const std::string& dirName = "",
90  const bool newKeyFileNameConvention = false);
91 
92  virtual void reset();
93 
94  virtual std::ostream& print(std::ostream& out) const;
95 
96  static bool debug() { return _debug; }
97  static void setDebug(const bool debug = true) { _debug = debug; }
98 
99 
100  private:
101 
103  const isobarDecayVertexPtr& parentVertex,
104  const int L,
105  const int S,
106  const particleProperties& isobar,
107  const int parentCharge);
108 
109  std::set<std::size_t> findBoseSymDecays() const;
110 
111  boost::tuples::tuple<int, int> _isospinRange;
112  boost::tuples::tuple<int, int> _JRange;
113  boost::tuples::tuple<int, int> _spinProjRange;
117  boost::tuples::tuple<int, int> _LRange;
118  boost::tuples::tuple<int, int> _SRange;
119  std::vector<std::string> _isobarBlackList;
120  std::vector<std::string> _isobarWhiteList;
124 
126 
127  std::vector<isobarDecayTopology> _waveSet;
128 
129  static bool _debug;
130 
131  };
132 
133 
134  inline
135  std::ostream&
136  operator <<(std::ostream& out,
137  const waveSetGenerator& gen)
138  {
139  return gen.print(out);
140  }
141 
142 
143 } // namespace rpwa
144 
145 
146 #endif // WAVESETGENERATOR_H