1 #ifndef OPENMC_TALLIES_FILTER_DELAYEDGROUP_H
2 #define OPENMC_TALLIES_FILTER_DELAYEDGROUP_H
3 
4 #include <gsl/gsl>
5 
6 #include "openmc/tallies/filter.h"
7 #include "openmc/vector.h"
8 
9 namespace openmc {
10 
11 //==============================================================================
12 //! Bins outgoing fission neutrons in their delayed groups.
13 //!
14 //! The get_all_bins functionality is not actually used.  The bins are manually
15 //! iterated over in the scoring subroutines.
16 //==============================================================================
17 
18 class DelayedGroupFilter : public Filter
19 {
20 public:
21   //----------------------------------------------------------------------------
22   // Constructors, destructors
23 
24   ~DelayedGroupFilter() = default;
25 
26   //----------------------------------------------------------------------------
27   // Methods
28 
type()29   std::string type() const override {return "delayedgroup";}
30 
31   void from_xml(pugi::xml_node node) override;
32 
33   void get_all_bins(const Particle& p, TallyEstimator estimator, FilterMatch& match)
34   const override;
35 
36   void to_statepoint(hid_t filter_group) const override;
37 
38   std::string text_label(int bin) const override;
39 
40   //----------------------------------------------------------------------------
41   // Accessors
42 
groups()43   const vector<int>& groups() const { return groups_; }
44 
45   void set_groups(gsl::span<int> groups);
46 
47 private:
48   //----------------------------------------------------------------------------
49   // Data members
50 
51   vector<int> groups_;
52 };
53 
54 } // namespace openmc
55 #endif // OPENMC_TALLIES_FILTER_DELAYEDGROUP_H
56