Public Member Functions | Private Member Functions | Private Attributes | List of all members
vertex::AggregateVertexAna Class Reference
Inheritance diagram for vertex::AggregateVertexAna:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Public Member Functions

 AggregateVertexAna (fhicl::ParameterSet const &pset)
 
 ~AggregateVertexAna ()
 
- Public Member Functions inherited from art::EDAnalyzer
 EDAnalyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDAnalyzer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Analyzer
virtual ~Analyzer () noexcept
 
 Analyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 Analyzer (Table< Config > const &config)
 
void doBeginJob (SharedResources const &resources)
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
- Public Member Functions inherited from art::Observer
 ~Observer () noexcept
 
 Observer (Observer const &)=delete
 
 Observer (Observer &&)=delete
 
Observeroperator= (Observer const &)=delete
 
Observeroperator= (Observer &&)=delete
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
fhicl::ParameterSetID selectorConfig () const
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Private Member Functions

void analyze (const art::Event &evt)
 
void beginJob ()
 

Private Attributes

TH1F * HnTrksVtx
 
TH1F * HnVtxes
 
TH1F * HVtxSep
 
TH2F * HVtxRZ
 
std::string fDBScanModuleLabel
 
std::string fHoughModuleLabel
 
std::string fHitModuleLabel
 
std::string fTrack3DModuleLabel
 
std::string fEndPointModuleLabel
 
std::string fVertexModuleLabel
 
art::PtrVector< recob::Hitfhitlist
 
art::PtrVector< recob::EndPoint2Dfeplist
 
art::PtrVector< recob::Trackftracklist
 
art::PtrVector< recob::VertexfVertexlist
 

Additional Inherited Members

- Public Types inherited from art::EDAnalyzer
using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 
- Protected Member Functions inherited from art::Observer
std::string const & processName () const
 
bool wantAllEvents () const noexcept
 
bool wantEvent (ScheduleID id, Event const &e) const
 
Handle< TriggerResultsgetTriggerResults (Event const &e) const
 
 Observer (fhicl::ParameterSet const &config)
 
 Observer (std::vector< std::string > const &select_paths, std::vector< std::string > const &reject_paths, fhicl::ParameterSet const &config)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Detailed Description

Definition at line 34 of file AggregateVertexAna_module.cc.

Constructor & Destructor Documentation

vertex::AggregateVertexAna::AggregateVertexAna ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 71 of file AggregateVertexAna_module.cc.

72  : EDAnalyzer(pset)
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"))
77  {
78 
79 
80  }
std::string string
Definition: nybbler.cc:12
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:25
vertex::AggregateVertexAna::~AggregateVertexAna ( )

Definition at line 83 of file AggregateVertexAna_module.cc.

84  {
85  }

Member Function Documentation

void vertex::AggregateVertexAna::analyze ( const art::Event evt)
private

Definition at line 101 of file AggregateVertexAna_module.cc.

102  {
103  art::Handle< std::vector<recob::Hit> > hitListHandle;
104  evt.getByLabel(fHitModuleLabel,hitListHandle);
105  for(unsigned int ii = 0; ii < hitListHandle->size(); ++ii){
106  art::Ptr<recob::Hit> hit(hitListHandle, ii);
107  fhitlist.push_back(hit); // class member
108  }
109 
111  evt.getByLabel(fEndPointModuleLabel,epListHandle);
112  for(unsigned int ii = 0; ii < epListHandle->size(); ++ii){
113  art::Ptr<recob::EndPoint2D> ep(epListHandle, ii);
114  feplist.push_back(ep); // class member
115  }
116 
117  art::Handle< std::vector<recob::Track> > trackListHandle;
118  evt.getByLabel(fTrack3DModuleLabel,trackListHandle);
119  for(unsigned int ii = 0; ii < trackListHandle->size(); ++ii){
120  art::Ptr<recob::Track> track(trackListHandle, ii);
121  ftracklist.push_back(track); // class member
122  }
123 
124  art::Handle< std::vector<recob::Vertex> > vertexListHandle;
125  evt.getByLabel(fVertexModuleLabel,vertexListHandle);
126  for(unsigned int ii = 0; ii < vertexListHandle->size(); ++ii){
127  art::Ptr<recob::Vertex> vertex(vertexListHandle, ii);
128  fVertexlist.push_back(vertex); // class member
129  }
130 
131  HnVtxes->Fill(feplist.size(),1);
132 
133  art::FindManyP<recob::Track> fmt(vertexListHandle, evt, fVertexModuleLabel);
134  art::FindManyP<recob::Hit> fmh(vertexListHandle, evt, fVertexModuleLabel);
135 
136  for(size_t v1 = 0; v1 < fVertexlist.size(); ++v1) {
137 
138  std::vector< art::Ptr<recob::Track> > tvlist = fmt.at(v1);
139 
140  HnTrksVtx->Fill(tvlist.size(),1);
141 
142  if(tvlist.size() < 1) continue;
143 
144  std::vector< art::Ptr<recob::Hit> > hitvlist = fmh.at(v1);
145 
146  // Hits no longer has XYZ() method. To get 3d hit position info I'm going to have to
147  // loop on all the SpacePoints and loop on all Hits from there till it matches
148  // one from this vertex. This affects the two Fill() efforts below. EC, 19-Nov-2010.
149  art::PtrVector<recob::Hit>::const_iterator hitv = hitvlist.begin();
150 
151  for(size_t v2 = v1+1; v2 < fVertexlist.size(); ++v2){
152 
153  std::vector< art::Ptr<recob::Hit> > hitvlist2 = fmh.at(v2);
154 
155  std::vector< art::Ptr<recob::Hit> >::const_iterator hitv2 = hitvlist2.begin();
156 
157  // These two whiles should be each precisely one iteration long.
158  while( hitv != hitvlist.end() ){
159  while( hitv2 != hitvlist2.end() ){
160  TVector3 dist;
161  mf::LogInfo("AggregateVertexAna") << "AggregateVertexAna: dist is " << dist.Mag() << ".";
162  HVtxSep->Fill(dist.Mag(),1);
163  hitv2++;
164  }
165  hitv++;
166  }// end loop over hitv entries
167 
168  }// end loop over v2
169  }// end loop over v1
170 
171  return;
172  }// end analyze
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
art::PtrVector< recob::Track > ftracklist
art::PtrVector< recob::Hit > fhitlist
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Definition: DataViewImpl.h:633
art::PtrVector< recob::EndPoint2D > feplist
typename data_t::const_iterator const_iterator
Definition: PtrVector.h:55
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:435
size_type size() const
Definition: PtrVector.h:302
Detector simulation of raw signals on wires.
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
art::PtrVector< recob::Vertex > fVertexlist
vertex reconstruction
void vertex::AggregateVertexAna::beginJob ( )
privatevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 88 of file AggregateVertexAna_module.cc.

89  {
91 
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);
96 
97  return;
98  }

Member Data Documentation

std::string vertex::AggregateVertexAna::fDBScanModuleLabel
private

Definition at line 51 of file AggregateVertexAna_module.cc.

std::string vertex::AggregateVertexAna::fEndPointModuleLabel
private

Definition at line 55 of file AggregateVertexAna_module.cc.

art::PtrVector<recob::EndPoint2D> vertex::AggregateVertexAna::feplist
private

Definition at line 59 of file AggregateVertexAna_module.cc.

art::PtrVector<recob::Hit> vertex::AggregateVertexAna::fhitlist
private

Definition at line 58 of file AggregateVertexAna_module.cc.

std::string vertex::AggregateVertexAna::fHitModuleLabel
private

Definition at line 53 of file AggregateVertexAna_module.cc.

std::string vertex::AggregateVertexAna::fHoughModuleLabel
private

Definition at line 52 of file AggregateVertexAna_module.cc.

std::string vertex::AggregateVertexAna::fTrack3DModuleLabel
private

Definition at line 54 of file AggregateVertexAna_module.cc.

art::PtrVector<recob::Track> vertex::AggregateVertexAna::ftracklist
private

Definition at line 60 of file AggregateVertexAna_module.cc.

art::PtrVector<recob::Vertex> vertex::AggregateVertexAna::fVertexlist
private

Definition at line 61 of file AggregateVertexAna_module.cc.

std::string vertex::AggregateVertexAna::fVertexModuleLabel
private

Definition at line 56 of file AggregateVertexAna_module.cc.

TH1F* vertex::AggregateVertexAna::HnTrksVtx
private

Definition at line 46 of file AggregateVertexAna_module.cc.

TH1F* vertex::AggregateVertexAna::HnVtxes
private

Definition at line 47 of file AggregateVertexAna_module.cc.

TH2F* vertex::AggregateVertexAna::HVtxRZ
private

Definition at line 49 of file AggregateVertexAna_module.cc.

TH1F* vertex::AggregateVertexAna::HVtxSep
private

Definition at line 48 of file AggregateVertexAna_module.cc.


The documentation for this class was generated from the following file: