1 #ifndef __FLASHFINDERFMWKINTERFACE_CXX__
2 #define __FLASHFINDERFMWKINTERFACE_CXX__
4 #include "art/Framework/Core/EDProducer.h"
5 #include "art/Framework/Core/ModuleMacros.h"
6 #include "art/Framework/Principal/Event.h"
7 #include "art/Framework/Principal/Handle.h"
8 #include "art/Framework/Principal/Run.h"
9 #include "art/Framework/Principal/SubRun.h"
10 #include "canvas/Utilities/InputTag.h"
11 #include "fhiclcpp/ParameterSet.h"
12 #include "messagefacility/MessageLogger/MessageLogger.h"
13 #include "art_root_io/TFileService.h"
20 std::vector<size_t> res;
21 ::art::ServiceHandle<geo::Geometry> geo;
23 for(
size_t opch=0; opch<geo->MaxOpChannel(); ++opch) {
24 if(geo->IsValidOpChannel(opch))
continue;
28 auto const& bbox = geo->Cryostat(cryostat).Boundaries();
29 for(
size_t opch=0; opch<geo->MaxOpChannel(); ++opch) {
30 if(geo->IsValidOpChannel(opch))
continue;
31 auto const& pt = geo->OpDetGeoFromOpChannel(opch).GetCenter();
32 if(!bbox.ContainsPosition(pt))
continue;
40 std::vector<size_t> res;
41 ::art::ServiceHandle<geo::Geometry> geo;
43 for(
size_t opdet=0; opdet<geo->NOpDets(); ++opdet) {
47 auto const& bbox = geo->Cryostat(cryostat).Boundaries();
48 for(
size_t opdet=0; opdet<geo->NOpDets(); ++opdet) {
49 auto const& pt = geo->OpDetGeoFromOpDet(opdet).GetCenter();
50 if(!bbox.ContainsPosition(pt))
continue;
58 ::art::ServiceHandle<geo::Geometry> geo;
60 return geo->NOpDets();
62 return geo->Cryostat(cryostat).NOpDet();
66 std::vector<size_t> res;
67 ::art::ServiceHandle<geo::Geometry> geo;
69 for(
size_t opch=0; opch<geo->MaxOpChannel(); ++opch) {
70 if(geo->IsValidOpChannel(opch))
continue;
75 for(
size_t opch=0; opch<geo->MaxOpChannel(); ++opch) {
76 if(!geo->IsValidOpChannel(opch))
continue;
77 auto const& pt = geo->OpDetGeoFromOpChannel(opch).GetCenter();
80 if(pt.X() < 0 && tpc == 0) {
83 if(pt.X() > 0 && tpc == 1) {
93 std::vector<int> out_ch_v;
97 for (
auto name : pd_names) {
99 out_ch_v.insert(out_ch_v.end(), ch_v.begin(), ch_v.end());
107 ::art::ServiceHandle<geo::Geometry> geo;
108 return geo->OpDetFromOpChannel(opch);
112 ::art::ServiceHandle<geo::Geometry> geo;
113 geo->OpDetGeoFromOpChannel(opch).GetCenter(xyz);
std::vector< int > PDNamesToList(std::vector< std::string > pd_names)
std::vector< size_t > ListOpDets(int cryostat)
std::vector< size_t > ListOpChannelsByTPC(int tpc)
std::vector< int > getChannelsOfType(std::string pdname) const
void OpDetCenterFromOpChannel(size_t opch, double *xyz)
size_t NOpDets(int cryostat)
std::vector< size_t > ListOpChannels(int cryostat)
size_t OpDetFromOpChannel(size_t opch)
art framework interface to geometry description