16 fType = GetString(
"Type",
"Noise");
17 fKeepType = GetBool(
"KeepType",
true);
18 fTimeThreshold = GetDouble(
"PulserTimeThreshold", 0.04);
20 ev.Require<
QHeader>(
"DAQ",
"Header");
30 GlobalData().Get(
"",&
rHandle,
"");
39 const std::vector<QSampleInfo>& samplesInfo = pulseInfo.GetSamplesInfo();
40 if(!samplesInfo.empty()) {
41 std::vector<QSampleInfo>::const_iterator sampleInfo = samplesInfo.begin();
42 while(sampleInfo != samplesInfo.end()) {
43 const int trigpos = pulseInfo.GetMasterSample().GetSampleIndex();
44 bool same = (
abs(trigpos-(
int)sampleInfo->GetSampleIndex())<sampleThreshold);
46 if(
fType ==
"Noise" && !sampleInfo->GetIsNoise())
return false;
47 else if(
fType ==
"Signal" && !sampleInfo->GetIsSignal() && same)
return false;
48 else if(
fType ==
"Heater" && !sampleInfo->GetIsPulser() && same)
return false;
49 else if(
fType ==
"LED" && !sampleInfo->GetIsLED() && same)
return false;
51 if(
fType ==
"Noise" && sampleInfo->GetIsNoise())
return false;
52 else if(
fType ==
"Signal" && sampleInfo->GetIsSignal())
return false;
53 else if(
fType ==
"Heater" && sampleInfo->GetIsPulser())
return false;
54 else if(
fType ==
"LED" && sampleInfo->GetIsLED())
return false;
QRunDataHandle rHandle(753)
#define REGISTER_MODULE(clazz)
Diana::QVector abs(const Diana::QVector &v)
discards events with secondary triggers different to a specified type.
bool Filter(const Diana::QEvent &ev)
return true if ev passes the cuts
bool fKeepType
If True it keeps only trigger of certain type, if false removes all trigger of that type.
double fTimeThreshold
Time threshold within which a pulser flag and the corresponding trigger are considered as one.
basic channel and run based info. Used in the QRunData object.
double fSamplingFrequency
sampling frequency in Hz
Raw event: bolometer channel, trigger positions and types.
const int & GetChannelId() const
Get ChannelId.
global handle for QRunData
const QChannelRunData & GetChannelRunData(const int channel) const
get channel based run data quantities
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...