Diana Software
MEnergyFilter.hh
Go to the documentation of this file.
1 #ifndef _M_ENERGYFILTER_HH_
2 #define _M_ENERGYFILTER_HH_
3 
44 #include "QFilter.hh"
45 #include <map>
46 #include <set>
47 #include <string>
48 #include "QEventLabel.hh"
49 #include "QInterval.hh"
50 #include "QRunData.hh"
51 
53 
54 class MEnergyFilter : public Diana::QFilter {
55 
56 public:
58  void GetCuts(const Diana::QEvent& ev);
59 
61  bool Filter(const Diana::QEvent& ev);
62 
63  void Done();
64 
65 private:
67  int fDataset;
68 
70  std::set<int> fMissingChannels;
71 
73  std::string fRangesInput;
74 
76  std::string fRangesOutput;
77 
79  double fEnergyMin;
80 
82  double fEnergyMax;
83 
84  Diana::QEventLabel fEnergyLabel;
85  Diana::QInterval fEnergyRange;
86  std::set<int> fBlackList;
87  std::set<int> fChannelList;
89  std::string fRangesName;
90  std::string fRangesOwner;
91  std::set<QEnergyRangesHandle*> fHandles;
92 };
93 
94 #endif
95 
Applies an energy threshold depending on the channel.
std::string fRangesOwner
std::string fRangesName
std::set< QEnergyRangesHandle * > fHandles
std::string fRangesInput
Input for energy ranges (file or DB, for the moment only file works)
Diana::QInterval fEnergyRange
std::string fRangesOutput
Output for energy ranges (file or DB, for the moment only file works)
std::set< int > fMissingChannels
Set of channels missing from ranges file.
std::set< int > fBlackList
void GetCuts(const Diana::QEvent &ev)
Get cuts from config file.
double fEnergyMin
cfg defined minimum energy, to be applied to channels for which no energy range is defined
bool Filter(const Diana::QEvent &ev)
return true if ev passes the cuts
std::set< int > fChannelList
int fDataset
Dataset number.
double fEnergyMax
cfg defined maximum energy, to be applied to channels for which no energy range is defined
Diana::QEventLabel fEnergyLabel
QRunData fRunData
global handle for EnergyRanges
Basic run based info.
Definition: QRunData.hh:20