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/Handle.h"
14 #include "art/Framework/Principal/Run.h"
15 #include "art/Framework/Principal/SubRun.h"
16 #include "canvas/Utilities/InputTag.h"
17 #include "fhiclcpp/ParameterSet.h"
18 #include "messagefacility/MessageLogger/MessageLogger.h"
19 #include "art_root_io/TFileService.h"
24 #include "TGeoManager.h"
26 #include "nusimdata/SimulationBase/MCFlux.h"
27 #include "nusimdata/SimulationBase/MCTruth.h"
48 bool filter(art::Event&
e)
override;
59 std::cout<<
"Configuring flux filter."<<std::endl;
60 std::vector<std::string> tmp=
p.get<std::vector<std::string> >(
"volumes");
61 fVolFlux.insert(tmp.begin(),tmp.end());
63 std::cout<<
"Filtering flux through volumes: "<<std::endl;
64 for (
auto s: fVolFlux)
std::cout<<
"\t"<<
s<<std::endl;
81 art::Handle< std::vector<simb::MCTruth> > mctruthHandle;
82 e.getByLabel(
"flux",mctruthHandle);
83 std::vector<simb::MCTruth>
const& mclist = *mctruthHandle;
85 for(
unsigned int inu = 0; inu < mclist.size(); inu++){
86 simb::MCParticle
nu = mclist[inu].GetNeutrino().Nu();
87 rgeo->SetCurrentPoint(nu.Vx(),nu.Vy(),nu.Vz());
88 rgeo->SetCurrentDirection(nu.Px(),nu.Py(),nu.Pz());
89 TGeoNode* node=rgeo->FindNode();
91 std::string volname=node->GetVolume()->GetName();
92 rgeo->FindNextBoundary();
93 node=gGeoManager->Step();
Utilities related to art service access.
TGeoManager * ROOTGeoManager() const
Access to the ROOT geometry description manager.
std::set< std::string > fVolFlux
Description of geometry of one entire detector.
FluxGeoFilter & operator=(FluxGeoFilter const &)=delete
then echo File list $list not found else cat $list while read file do echo $file sed s
FluxGeoFilter(fhicl::ParameterSet const &p)
bool filter(art::Event &e) override
art framework interface to geometry description
BEGIN_PROLOG could also be cout