10 #include "art/Framework/Principal/Event.h"
11 #include "fhiclcpp/ParameterSet.h"
12 #include "art/Framework/Principal/Handle.h"
13 #include "art/Framework/Services/Registry/ServiceHandle.h"
14 #include "art_root_io/TFileService.h"
15 #include "messagefacility/MessageLogger/MessageLogger.h"
16 #include "art/Framework/Core/ModuleMacros.h"
17 #include "art/Framework/Core/EDAnalyzer.h"
18 #include "canvas/Persistency/Common/FindManyP.h"
19 #include "canvas/Persistency/Common/Ptr.h"
20 #include "canvas/Persistency/Common/PtrVector.h"
59 art::PtrVector<recob::EndPoint2D>
feplist;
73 , fHitModuleLabel (pset.
get<
std::string >(
"FFFTHitModuleLabel"))
74 , fTrack3DModuleLabel (pset.
get<
std::string >(
"Track3DModuleLabel"))
75 , fEndPointModuleLabel(pset.
get<
std::string >(
"EndPointModuleLabel"))
76 , fVertexModuleLabel (pset.
get<
std::string >(
"VertexModuleLabel"))
90 art::ServiceHandle<art::TFileService const>
tfs;
92 HnVtxes = tfs->make<TH1F>(
"Num Vertices",
"Num Vertices",8,-0.5,7.5);
93 HVtxSep = tfs->make<TH1F>(
"Vertices spacing",
"Vertices spacing",20,0.001,5.0);
94 HVtxRZ = tfs->make<TH2F>(
"Vtx in RZ",
"Vtx in RZ",20,-50.0,+50.0,20,0.0,50.0);
95 HnTrksVtx = tfs->make<TH1F>(
"Tracks per vtx",
"Tracks per vtx",8,-0.5,7.5);
103 art::Handle< std::vector<recob::Hit> > hitListHandle;
105 for(
unsigned int ii = 0; ii < hitListHandle->size(); ++ii){
106 art::Ptr<recob::Hit>
hit(hitListHandle, ii);
110 art::Handle< std::vector<recob::EndPoint2D> > epListHandle;
112 for(
unsigned int ii = 0; ii < epListHandle->size(); ++ii){
113 art::Ptr<recob::EndPoint2D> ep(epListHandle, ii);
117 art::Handle< std::vector<recob::Track> > trackListHandle;
119 for(
unsigned int ii = 0; ii < trackListHandle->size(); ++ii){
120 art::Ptr<recob::Track>
track(trackListHandle, ii);
124 art::Handle< std::vector<recob::Vertex> > vertexListHandle;
126 for(
unsigned int ii = 0; ii < vertexListHandle->size(); ++ii){
127 art::Ptr<recob::Vertex>
vertex(vertexListHandle, ii);
136 for(
size_t v1 = 0; v1 <
fVertexlist.size(); ++v1) {
138 std::vector< art::Ptr<recob::Track> > tvlist = fmt.at(v1);
142 if(tvlist.size() < 1)
continue;
144 std::vector< art::Ptr<recob::Hit> > hitvlist = fmh.at(v1);
149 art::PtrVector<recob::Hit>::const_iterator hitv = hitvlist.begin();
151 for(
size_t v2 = v1+1; v2 <
fVertexlist.size(); ++v2){
153 std::vector< art::Ptr<recob::Hit> > hitvlist2 = fmh.at(v2);
155 std::vector< art::Ptr<recob::Hit> >::const_iterator hitv2 = hitvlist2.begin();
158 while( hitv != hitvlist.end() ){
159 while( hitv2 != hitvlist2.end() ){
161 mf::LogInfo(
"AggregateVertexAna") <<
"AggregateVertexAna: dist is " << dist.Mag() <<
".";
177 DEFINE_ART_MODULE(AggregateVertexAna)
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
std::string fTrack3DModuleLabel
Declaration of signal hit object.
art::PtrVector< recob::Track > ftracklist
std::string fHoughModuleLabel
process_name use argoneut_mc_hitfinder track
art::PtrVector< recob::Hit > fhitlist
void analyze(const art::Event &evt)
std::string fVertexModuleLabel
std::string fHitModuleLabel
art::PtrVector< recob::EndPoint2D > feplist
Provides recob::Track data product.
std::string fEndPointModuleLabel
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
art::PtrVector< recob::Vertex > fVertexlist
art::ServiceHandle< art::TFileService > tfs
std::string fDBScanModuleLabel
AggregateVertexAna(fhicl::ParameterSet const &pset)