LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
A basic "skeleton" to read in art::Event records from a file, access their information, and do something with them. More...
#include "lardataobj/Simulation/SimChannel.h"
#include "lardataobj/RecoBase/Hit.h"
#include "lardataobj/RecoBase/Cluster.h"
#include "lardata/DetectorInfoServices/DetectorPropertiesService.h"
#include "lardata/DetectorInfoServices/DetectorClocksService.h"
#include "larcore/Geometry/Geometry.h"
#include "larcorealg/Geometry/GeometryCore.h"
#include "larcoreobj/SimpleTypesAndConstants/geo_types.h"
#include "nusimdata/SimulationBase/MCParticle.h"
#include "nusimdata/SimulationBase/MCTruth.h"
#include "larsim/Simulation/LArG4Parameters.h"
#include "art/Framework/Core/EDAnalyzer.h"
#include "art/Framework/Principal/Event.h"
#include "art/Framework/Principal/Handle.h"
#include "art/Framework/Services/Registry/ServiceHandle.h"
#include "art/Framework/Services/Optional/TFileService.h"
#include "art/Framework/Core/ModuleMacros.h"
#include "canvas/Persistency/Common/FindManyP.h"
#include "canvas/Utilities/Exception.h"
#include "messagefacility/MessageLogger/MessageLogger.h"
#include "fhiclcpp/ParameterSet.h"
#include "fhiclcpp/types/Table.h"
#include "fhiclcpp/types/Atom.h"
#include "cetlib/pow.h"
#include "TH1.h"
#include "TH2.h"
#include "TTree.h"
#include "TLorentzVector.h"
#include "TVector3.h"
#include <map>
#include <vector>
#include <string>
#include <cmath>
Go to the source code of this file.
Classes | |
class | lar::example::AnalysisExample |
Example analyzer module. More... | |
struct | lar::example::AnalysisExample::Config |
Namespaces | |
lar | |
LArSoft-specific namespace. | |
lar::example | |
LArSoft examples. | |
A basic "skeleton" to read in art::Event records from a file, access their information, and do something with them.
See https://cdcvs.fnal.gov/redmine/projects/larsoft/wiki/Using_art_in_LArSoft for a description of the ART classes used here.
Almost everything you see in the code below may have to be changed by you to suit your task. The example task is to make histograms and n-tuples related to of particle tracks in the detector.
As you try to understand why things are done a certain way in this example ("What's all this stuff about 'auto const&'?"), it will help to read ADDITIONAL_NOTES.md in the same directory as this file.
Also note that, despite our efforts, the documentation and the practices in this code may fall out of date. In doubt, ask!
The last revision of this code was done in August 2017 with LArSoft v06_44_00.
This is in-source documentation in Doxygen format. Doxygen is a utility that creates web pages from specially-formatted comments in program code. If your package is ever added to an official LArSoft release, the doxygen-style comments will be added to the LArSoft doxygen pages at http://nusoft.fnal.gov/larsoft/doxsvn/html/.
You can see the doxygenated version of the following lines at http://nusoft.fnal.gov/larsoft/doxsvn/html/classlar_1_1example_1_1AnalysisExample.html
Doxygen tips:
In general, comments that start with "///" or in C++ comment blocks (like this one) will appear in the web pages created by Doxygen.
A comment starting with "///" will be associated wth the next code line that follows it, while one starting with "///<" will be associated with the one above it.
For more on doxygen, see the documentation at http://www.stack.nl/~dimitri/doxygen/manual/index.html
Definition in file AnalysisExample_module.cc.