23 #include "DAQDataFormats/DAQDataFormats.h" 27 #include <unordered_set> 67 produces< std::vector<novaddt::TriggerDecision> >();
88 std::unique_ptr<std::vector<novaddt::TriggerDecision>> td(
new std::vector<novaddt::TriggerDecision>);
115 std::unordered_set<int> XplaneList;
116 std::unordered_set<int> YplaneList;
117 std::unordered_set<int> planeList;
120 for(
unsigned int i=0;
i<hits->n_groups(); ++
i){
128 bool fContinuity =
false;
134 if (theSliceHits.size() >=
_minHits){
136 for(
unsigned int j=0;
j < theSliceHits.size(); ++
j){
137 auto thePlane = theSliceHits.at(
j).Plane().val;
138 auto theView = theSliceHits.at(
j).View().val;
142 planeList.insert(thePlane);
145 if((XplaneList.size() + YplaneList.size()) >=
_minPlanes){
154 for(
auto iPlane=planeList.begin(); iPlane!=planeList.end(); ++iPlane)
158 unsigned int fNearPlanes = 0;
160 fNearPlanes += planeList.count(*iPlane+
j);
162 if(fNearPlanes >= _minNearPlanes)
176 td->emplace_back(theSliceHits.front().TDC().val,
177 theSliceHits.back().TDC().val - theSliceHits.front().TDC().val,
188 bool goodTrigger = (td->size() > 0);
190 e.
put(std::move(td));
virtual ~ActivityTrigger()
unsigned int _prescale
holds prescaling variable from fcl file
std::vector< DAQHit > HitList
unsigned int _minPlanes
Minimum planes (unique) the hits are spread in any view.
std::string _hitsInstanceLabel
instance label making the HitList
DEFINE_ART_MODULE(TestTMapFile)
virtual bool filter(art::Event &e)
Identifier for the Y measuring view of the detector (side)
ProductID put(std::unique_ptr< PROD > &&product)
Identifier for the X measuring view of the detector (top)
ActivityTrigger(fhicl::ParameterSet const &p)
unsigned int _triggerCounts
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
unsigned int _maxNearWindow
Maximum window where to look for near planes.
std::string _hitsModuleLabel
label of module making the HitList
unsigned int _minNearPlanes
Minimum number of near planes.
unsigned int _minPlanesView
Minimum planes (unique) on each view.
unsigned int _minHits
Minimum number of hits in the slice.