19 #include "art_root_io/TFileService.h" 107 auto const& tpc = geom->
TPC();
109 double halfHeight = tpc.HalfHeight();
110 double length = tpc.Length();
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);
139 throw cet::exception(
"LArSimChannelAna") <<
"Not for use on Data yet...\n";
153 unsigned int totalIDEs = 0;
154 double totalElectrons = 0;
155 double totalEnergy = 0;
156 for (
const auto&
sc : scVec) {
157 const auto& tdcidemap =
sc.TDCIDEMap();
160 for (
auto const& [tdc, ideVec] : tdcidemap) {
161 totalIDEs += ideVec.size();
162 double tdcElectrons = 0;
163 double tdcEnergy = 0;
167 for (
const auto& ide : ideVec) {
168 totalElectrons += ide.numElectrons;
169 totalEnergy += ide.energy;
170 tdcElectrons += ide.numElectrons;
171 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
void ensureHists(unsigned int const nTimeSamples)
TPCGeo const & TPC(TPCID const &tpcid=tpc_zero) const
Returns the specified TPC.
LArSimChannelAna(fhicl::ParameterSet const &pset)
#define DEFINE_ART_MODULE(klass)
void analyze(const art::Event &evt) override
T get(std::string const &key) 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.
TH1D * fChargeZpos
position of the MC Truth charge deposition
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
object containing MC truth information necessary for making RawDigits and doing back tracking ...
TH1D * fTDC
Which TDCs have activity.
art framework interface to geometry description
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.