19 #include "art_root_io/TFileService.h" 114 tfs->make<TH1D>(
"hChargeXpos",
"X charge depositions;X (cm);Events", 101, 0.0, width);
116 "hChargeYpos",
"Y charge depositions;Y (cm);Events", 101, -halfHeight, halfHeight);
118 tfs->make<TH1D>(
"hChargeZpos",
"Z charge depositions;Z (cm);Events", 101, 0.0, length);
119 fTDC = tfs->make<TH1D>(
"hTDC",
"Active TDC;TDCs;Events;", nTimeSamples, 0, nTimeSamples);
121 "hTDCsPerChannel",
"TDCs per channel entry;# TDCs;Events", 128, 0, nTimeSamples);
123 tfs->make<TH1D>(
"hIDEsPerChannel",
"IDE per channel entry;# IDEs;Events", 100, 0, 20000);
125 tfs->make<TH1D>(
"hElectrons",
"Electrons per channel;Electrons;Events", 100, 0, 2e7);
126 fEnergy = tfs->make<TH1D>(
"hEnergy",
"Energy per channel;energy;Events", 100, 0, 2500);
128 tfs->make<TH1D>(
"hElectronsPerIDE",
"Electrons per IDE;Electrons;Events", 100, 0, 10000);
129 fEnergyPerIDE = tfs->make<TH1D>(
"hEnergyPerIDE",
"Energy per IDE;energy;Events", 100, 0, 50);
131 tfs->make<TH1D>(
"hElectronsPerTDC",
"Electrons per TDC;Electrons;Events", 100, 0, 10000);
132 fEnergyPerTDC = tfs->make<TH1D>(
"hEnergyPerTDC",
"Energy per YDC;energy;Events", 100, 0, 50);
140 throw cet::exception(
"LArSimChannelAna") <<
"Not for use on Data yet...\n";
154 unsigned int totalIDEs = 0;
155 double totalElectrons = 0;
156 double totalEnergy = 0;
157 for (
const auto& sc : scVec) {
158 const auto& tdcidemap = sc.TDCIDEMap();
161 for (
auto const& [tdc, ideVec] : tdcidemap) {
162 totalIDEs += ideVec.size();
163 double tdcElectrons = 0;
164 double tdcEnergy = 0;
168 for (
const auto& ide : ideVec) {
169 totalElectrons += ide.numElectrons;
170 totalEnergy += ide.energy;
171 tdcElectrons += ide.numElectrons;
172 tdcEnergy += ide.energy;
TH1D * fTDCsPerChannel
Number of TDCs with activity.
std::string fLArG4ModuleLabel
Detector simulation of raw signals on wires.
EDAnalyzer(fhicl::ParameterSet const &pset)
TH1D * fElectrons
Electrons in the whole channel entry.
TH1D * fChargeXpos
position of the MC Truth charge deposition
art framework interface to geometry description
void ensureHists(unsigned int const nTimeSamples)
double Length() const
Length is associated with z coordinate [cm].
LArSimChannelAna(fhicl::ParameterSet const &pset)
#define DEFINE_ART_MODULE(klass)
void analyze(const art::Event &evt) override
T get(std::string const &key) const
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
TH1D * fChargeYpos
position of the MC Truth charge deposition
Base class for creation of raw signals on wires.
TH1D * fEnergy
Energy in the whole channel entry.
double HalfHeight() const
Height is associated with y coordinate [cm].
TH1D * fChargeZpos
position of the MC Truth charge deposition
TPCGeo const & TPC(unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified TPC.
TH1D * fTDC
Which TDCs have activity.
double HalfWidth() const
Width is associated with x coordinate [cm].
cet::coded_exception< error, detail::translate > exception
Encapsulate the construction of a single detector plane.