10 #include "art/Framework/Core/EDFilter.h"
11 #include "art/Framework/Core/ModuleMacros.h"
12 #include "art/Framework/Principal/Event.h"
13 #include "art/Framework/Principal/SubRun.h"
14 #include "art/Framework/Principal/Handle.h"
15 #include "art/Framework/Principal/View.h"
16 #include "canvas/Persistency/Common/Ptr.h"
17 #include "canvas/Persistency/Common/PtrVector.h"
18 #include "art/Framework/Services/Registry/ServiceHandle.h"
19 #include "art_root_io/TFileService.h"
20 #include "art_root_io/TFileDirectory.h"
21 #include "canvas/Persistency/Common/FindMany.h"
22 #include "canvas/Persistency/Common/FindManyP.h"
23 #include "canvas/Persistency/Common/FindOneP.h"
24 #include "fhiclcpp/ParameterSet.h"
25 #include "messagefacility/MessageLogger/MessageLogger.h"
31 #include "nusimdata/SimulationBase/GTruth.h"
32 #include "nusimdata/SimulationBase/MCTruth.h"
33 #include "nusimdata/SimulationBase/MCFlux.h"
81 #include "TDirectory.h"
89 #include "TGraphErrors.h"
92 #include "TTimeStamp.h"
98 #include "TTimeStamp.h"
102 #include "TPaveStats.h"
118 explicit ToFFilter(fhicl::ParameterSet
const&
p);
149 ToFFilter::ToFFilter(fhicl::ParameterSet
const& pset):
151 ftofLhitLabel(pset.get<art::InputTag>(
"tofLhitLabel")),
152 ftofChitLabel(pset.get<art::InputTag>(
"tofChitLabel")),
153 ftofLflashLabel(pset.get<art::InputTag>(
"tofLflashLabel")),
154 ftofCflashLabel(pset.get<art::InputTag>(
"tofCflashLabel")),
155 ftofLflashhitLabel(pset.get<art::InputTag>(
"tofLflashhitLabel")),
156 ftofCflashhitLabel(pset.get<art::InputTag>(
"tofCflashhitLabel")),
157 fuse_Lhit(pset.get<
bool>(
"use_Lhit")),
158 fuse_Chit(pset.get<
bool>(
"use_Chit")),
159 fuse_Lflsh(pset.get<
bool>(
"use_Lflsh")),
160 fuse_Cflsh(pset.get<
bool>(
"use_Cflsh")),
161 fuse_Lflsh_hit(pset.get<
bool>(
"use_Lflsh_hit")),
162 fuse_Cflsh_hit(pset.get<
bool>(
"use_Cflsh_hit")),
163 ftof_Lhit_cut(pset.get<
float>(
"tof_Lhit_cut")),
164 ftof_Chit_cut(pset.get<
float>(
"tof_Chit_cut")),
165 ftof_Lflsh_cut(pset.get<
float>(
"tof_Lflsh_cut")),
166 ftof_Cflsh_cut(pset.get<
float>(
"tof_Cflsh_cut")),
167 ftof_Lflshhit_cut(pset.get<
float>(
"tof_Lflshhit_cut")),
168 ftof_Cflshhit_cut(pset.get<
float>(
"tof_Cflshhit_cut"))
174 bool keep_event =
true;
179 art::Handle< std::vector<sbnd::ToF::ToF> > tofLhitListHandle;
180 std::vector< art::Ptr<sbnd::ToF::ToF> > tofLhitList;
182 art::fill_ptr_vector(tofLhitList, tofLhitListHandle);
184 std::vector<bool> is_cos_like;
186 for(
auto const& tf_lhit : tofLhitList){
187 if(tf_lhit->tof >=
ftof_Lhit_cut) is_cos_like.push_back(
false);
188 else is_cos_like.push_back(
true);
191 if(is_cos_like.size()){
193 for(
auto itr: is_cos_like){
200 if(!found_nu) keep_event=
false;
209 art::Handle< std::vector<sbnd::ToF::ToF> > tofChitListHandle;
210 std::vector< art::Ptr<sbnd::ToF::ToF> > tofChitList;
212 art::fill_ptr_vector(tofChitList, tofChitListHandle);
214 std::vector<bool> is_cos_like;
216 for(
auto const& tf_chit : tofChitList){
217 if(tf_chit->tof >=
ftof_Chit_cut) is_cos_like.push_back(
false);
218 else is_cos_like.push_back(
true);
221 if(is_cos_like.size()){
223 for(
auto itr: is_cos_like){
230 if(!found_nu) keep_event=
false;
239 art::Handle< std::vector<sbnd::ToF::ToF> > tofLflashListHandle;
240 std::vector< art::Ptr<sbnd::ToF::ToF> > tofLflashList;
242 art::fill_ptr_vector(tofLflashList, tofLflashListHandle);
244 std::vector<bool> is_cos_like;
246 for(
auto const& tf_lflash : tofLflashList){
247 if(tf_lflash->tof >=
ftof_Lflsh_cut) is_cos_like.push_back(
false);
248 else is_cos_like.push_back(
true);
251 if(is_cos_like.size()){
253 for(
auto itr: is_cos_like){
260 if(!found_nu) keep_event=
false;
269 art::Handle< std::vector<sbnd::ToF::ToF> > tofCflashListHandle;
270 std::vector< art::Ptr<sbnd::ToF::ToF> > tofCflashList;
272 art::fill_ptr_vector(tofCflashList, tofCflashListHandle);
274 std::vector<bool> is_cos_like;
276 for(
auto const& tf_cflash : tofCflashList){
277 if(tf_cflash->tof >=
ftof_Cflsh_cut) is_cos_like.push_back(
false);
278 else is_cos_like.push_back(
true);
281 if(is_cos_like.size()){
283 for(
auto itr: is_cos_like){
290 if(!found_nu) keep_event=
false;
299 art::Handle< std::vector<sbnd::ToF::ToF> > tofLflashhitListHandle;
300 std::vector< art::Ptr<sbnd::ToF::ToF> > tofLflashhitList;
302 art::fill_ptr_vector(tofLflashhitList, tofLflashhitListHandle);
304 std::vector<bool> is_cos_like;
306 for(
auto const& tf_lflashhit : tofLflashhitList){
308 else is_cos_like.push_back(
true);
311 if(is_cos_like.size()){
313 for(
auto itr: is_cos_like){
320 if(!found_nu) keep_event=
false;
329 art::Handle< std::vector<sbnd::ToF::ToF> > tofCflashhitListHandle;
330 std::vector< art::Ptr<sbnd::ToF::ToF> > tofCflashhitList;
332 art::fill_ptr_vector(tofCflashhitList, tofCflashhitListHandle);
334 std::vector<bool> is_cos_like;
336 for(
auto const& tf_cflashhit : tofCflashhitList){
338 else is_cos_like.push_back(
true);
341 if(is_cos_like.size()){
343 for(
auto itr: is_cos_like){
350 if(!found_nu) keep_event=
false;
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
Implementation of the Projection Matching Algorithm.
Declaration of signal hit object.
art::InputTag ftofCflashLabel
Definition of basic raw digits.
art::InputTag ftofChitLabel
object containing MC truth information necessary for making RawDigits and doing back tracking ...
art::InputTag ftofCflashhitLabel
Declaration of cluster object.
Definition of data types for geometry description.
art::InputTag ftofLflashhitLabel
Provides recob::Track data product.
bool filter(art::Event &evt) override
object containing MC truth information necessary for making RawDigits and doing back tracking ...
Class def header for MCShower data container.
stream1 can override from command line with o or output services user sbnd
helper function for LArPandoraInterface producer module
art::InputTag ftofLflashLabel
art framework interface to geometry description
art::InputTag ftofLhitLabel