12 #include "fhiclcpp/types/Atom.h"
13 #include "fhiclcpp/types/Name.h"
14 #include "fhiclcpp/types/Comment.h"
17 #include "art/Framework/Core/EDAnalyzer.h"
18 #include "art/Framework/Core/ModuleMacros.h"
19 #include "art/Framework/Principal/Event.h"
20 #include "canvas/Persistency/Common/FindOne.h"
21 #include "canvas/Utilities/InputTag.h"
54 Name(
"HitModuleLabel"),
55 Comment(
"tag of the producer used to create the recob::Hit collection")
59 Name(
"OutputCategory"),
60 Comment(
"the messagefacility category used for the output"),
65 Name(
"CheckRawDigitAssociation"),
66 Comment(
"verify the associated raw digits are on the same channel as the hit"),
71 Name(
"CheckWireAssociation"),
72 Comment(
"verify the associated wire is on the same channel as the hit"),
106 #include "messagefacility/MessageLogger/MessageLogger.h"
109 #include "art/Framework/Principal/Handle.h"
122 : EDAnalyzer (config)
123 , fHitsModuleLabel (config().HitModuleLabel())
124 , fOutputCategory (config().OutputCategory())
125 , bCheckRawDigits (config().CheckRawDigitAssociation())
126 , bCheckWires (config().CheckWireAssociation())
137 <<
"The event contains " <<
Hits->size() <<
" '"
140 std::unique_ptr<art::FindOne<raw::RawDigit>> HitToRawDigit;
144 if (!HitToRawDigit->isValid()) {
145 throw art::Exception(art::errors::ProductNotFound)
146 <<
"DumpHits: can't find associations between raw digits and hits from '"
151 std::unique_ptr<art::FindOne<recob::Wire>>
HitToWire;
154 if (!HitToWire->isValid()) {
155 throw art::Exception(art::errors::ProductNotFound)
156 <<
"DumpHits: can't find associations between wires and hits from '"
161 unsigned int iHit = 0;
166 <<
"Hit #" << iHit <<
": " <<
hit;
170 if (assChannelID != hit.Channel()) {
171 throw art::Exception(art::errors::DataCorruption)
172 <<
"Hit #" << iHit <<
" on channel " << hit.Channel()
173 <<
" is associated with raw digit on channel " << assChannelID
180 if (assChannelID != hit.Channel()) {
181 throw art::Exception(art::errors::DataCorruption)
182 <<
"Hit #" << iHit <<
" on channel " << hit.Channel()
183 <<
" is associated with wire on channel " << assChannelID
fhicl::Atom< bool > CheckWireAssociation
art::InputTag fHitsModuleLabel
name of module that produced the hits
fhicl::Atom< bool > CheckRawDigitAssociation
art::EDAnalyzer::Table< Config > Parameters
Prints the content of all the hits on screen.
fhicl::Atom< art::InputTag > HitModuleLabel
void analyze(const art::Event &evt)
Does the printing.
std::string fOutputCategory
category for LogInfo output
Declaration of signal hit object.
Definition of basic raw digits.
fhicl::Atom< std::string > OutputCategory
details::FindAllP< recob::Hit, recob::Wire > HitToWire
Query object connecting a hit to a wire.
BEGIN_PROLOG vertical distance to the surface Name
art::PtrVector< recob::Hit > Hits
bool bCheckWires
check associations with wires
bool bCheckRawDigits
check associations with raw digits
DumpHits(Parameters const &config)
Default constructor.
Declaration of basic channel signal object.
2D representation of charge deposited in the TDC/wire plane
unsigned int ChannelID_t
Type representing the ID of a readout channel.