Example analyzer module. More...
Classes | |
struct | Config |
Public Types | |
using | Parameters = art::EDAnalyzer::Table< Config > |
Public Types inherited from art::EDAnalyzer | |
using | WorkerType = WorkerT< EDAnalyzer > |
using | ModuleType = EDAnalyzer |
Public Member Functions | |
AnalysisExample (Parameters const &config) | |
Constructor: configures the module (see the Config structure above) More... | |
virtual void | beginJob () override |
virtual void | beginRun (const art::Run &run) override |
virtual void | analyze (const art::Event &event) override |
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 | |
Observer & | operator= (Observer const &)=delete |
Observer & | operator= (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 ¤t_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 Attributes | |
art::InputTag | fSimulationProducerLabel |
art::InputTag | fHitProducerLabel |
The name of the producer that created hits. More... | |
art::InputTag | fClusterProducerLabel |
int | fSelectedPDG |
PDG code of particle we'll focus on. More... | |
double | fBinSize |
For dE/dx work: the value of dx. More... | |
TH1D * | fPDGCodeHist |
PDG code of all particles. More... | |
TH1D * | fMomentumHist |
momentum [GeV] of all selected particles More... | |
TH1D * | fTrackLengthHist |
true length [cm] of all selected particles More... | |
TTree * | fSimulationNtuple |
tuple with simulated data More... | |
TTree * | fReconstructionNtuple |
tuple with reconstructed data More... | |
geo::GeometryCore const * | fGeometryService |
pointer to Geometry provider More... | |
double | fElectronsToGeV |
conversion factor More... | |
int | fTriggerOffset |
(units of ticks) time of expected neutrino event More... | |
The variables that will go into both n-tuples. | |
int | fEvent |
number of the event being processed More... | |
int | fRun |
number of the run being processed More... | |
int | fSubRun |
The variables that will go into the simulation n-tuple. | |
int | fSimPDG |
PDG ID of the particle being processed. More... | |
int | fSimTrackID |
GEANT ID of the particle being processed. More... | |
double | fStartXYZT [4] |
(x,y,z,t) of the true start of the particle More... | |
double | fEndXYZT [4] |
(x,y,z,t) of the true end of the particle More... | |
double | fStartPE [4] |
(Px,Py,Pz,E) at the true start of the particle More... | |
double | fEndPE [4] |
(Px,Py,Pz,E) at the true end of the particle More... | |
int | fSimNdEdxBins |
Number of dE/dx bins in a given track. More... | |
std::vector< double > | fSimdEdxBins |
Variables used in the reconstruction n-tuple | |
int | fRecoPDG |
PDG ID of the particle being processed. More... | |
int | fRecoTrackID |
GEANT ID of the particle being processed. More... | |
int | fRecoNdEdxBins |
Number of dE/dx bins in a given track. More... | |
std::vector< double > | fRecodEdxBins |
Additional Inherited Members | |
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< TriggerResults > | getTriggerResults (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 | |
ConsumesCollector & | consumesCollector () |
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 () |
Example analyzer module.
This class extracts information from the generated and reconstructed particles.
It produces histograms for the simulated particles in the input file:
It also produces two ROOT trees.
The first ROOT tree contains information on the simulated particles, including "dEdx", a binned histogram of collected charge as function of track range.
The second ROOT tree contains information on the reconstructed hits.
Definition at line 177 of file AnalysisExample_module.cc.
Definition at line 235 of file AnalysisExample_module.cc.
|
explicit |
Constructor: configures the module (see the Config structure above)
Definition at line 373 of file AnalysisExample_module.cc.
|
overridevirtual |
Definition at line 483 of file AnalysisExample_module.cc.
|
overridevirtual |
Reimplemented from art::EDAnalyzer.
Definition at line 403 of file AnalysisExample_module.cc.
|
overridevirtual |
Definition at line 471 of file AnalysisExample_module.cc.
|
private |
For dE/dx work: the value of dx.
Definition at line 296 of file AnalysisExample_module.cc.
|
private |
The name of the producer that created clusters
Definition at line 293 of file AnalysisExample_module.cc.
|
private |
conversion factor
Definition at line 352 of file AnalysisExample_module.cc.
|
private |
(Px,Py,Pz,E) at the true end of the particle
Definition at line 326 of file AnalysisExample_module.cc.
|
private |
(x,y,z,t) of the true end of the particle
Definition at line 324 of file AnalysisExample_module.cc.
|
private |
number of the event being processed
Definition at line 310 of file AnalysisExample_module.cc.
|
private |
pointer to Geometry provider
Definition at line 351 of file AnalysisExample_module.cc.
|
private |
The name of the producer that created hits.
Definition at line 292 of file AnalysisExample_module.cc.
|
private |
momentum [GeV] of all selected particles
Definition at line 300 of file AnalysisExample_module.cc.
|
private |
PDG code of all particles.
Definition at line 299 of file AnalysisExample_module.cc.
|
private |
The vector that will be used to accumulate dE/dx values as a function of range.
Definition at line 346 of file AnalysisExample_module.cc.
|
private |
Number of dE/dx bins in a given track.
Definition at line 342 of file AnalysisExample_module.cc.
|
private |
tuple with reconstructed data
Definition at line 305 of file AnalysisExample_module.cc.
|
private |
PDG ID of the particle being processed.
Definition at line 338 of file AnalysisExample_module.cc.
|
private |
GEANT ID of the particle being processed.
Definition at line 339 of file AnalysisExample_module.cc.
|
private |
number of the run being processed
Definition at line 311 of file AnalysisExample_module.cc.
|
private |
PDG code of particle we'll focus on.
Definition at line 295 of file AnalysisExample_module.cc.
|
private |
The vector that will be used to accumulate dE/dx values as a function of range.
Definition at line 333 of file AnalysisExample_module.cc.
|
private |
Number of dE/dx bins in a given track.
Definition at line 329 of file AnalysisExample_module.cc.
|
private |
PDG ID of the particle being processed.
Definition at line 317 of file AnalysisExample_module.cc.
|
private |
GEANT ID of the particle being processed.
Definition at line 318 of file AnalysisExample_module.cc.
|
private |
tuple with simulated data
Definition at line 304 of file AnalysisExample_module.cc.
|
private |
The name of the producer that tracked simulated particles through the detector
Definition at line 290 of file AnalysisExample_module.cc.
|
private |
(Px,Py,Pz,E) at the true start of the particle
Definition at line 325 of file AnalysisExample_module.cc.
|
private |
(x,y,z,t) of the true start of the particle
Definition at line 323 of file AnalysisExample_module.cc.
|
private |
number of the sub-run being processed
Definition at line 312 of file AnalysisExample_module.cc.
|
private |
true length [cm] of all selected particles
Definition at line 301 of file AnalysisExample_module.cc.
|
private |
(units of ticks) time of expected neutrino event
Definition at line 353 of file AnalysisExample_module.cc.