19 #include <sys/types.h> 50 namespace geo {
class Geometry; }
157 "X charge depositions;X (cm);Events",
160 "Y charge depositions;Y (cm);Events",
161 101, -halfHeight, halfHeight);
163 "Z charge depositions;Z (cm);Events",
166 "Active TDC;TDCs;Events;",
170 "TDCs per channel entry;# TDCs;Events",
173 "IDE per channel entry;# IDEs;Events",
176 "Electrons per channel;Electrons;Events",
179 "Energy per channel;energy;Events",
182 "Electrons per IDE;Electrons;Events",
185 "Energy per IDE;energy;Events",
188 "Electrons per TDC;Electrons;Events",
191 "Energy per YDC;energy;Events",
205 throw cet::exception(
"LArSimChannelAna") <<
"Not for use on Data yet...\n";
214 const std::vector<sim::SimChannel>& scVec(*chanHandle);
219 unsigned int totalIDEs = 0;
220 double totalElectrons = 0;
221 double totalEnergy = 0;
222 for (
const auto& sc : scVec ) {
223 const auto & tdcidemap=sc.TDCIDEMap();
226 for (
const auto& tdcide : tdcidemap) {
227 unsigned int tdc = tdcide.first;
228 const std::vector<sim::IDE>& ideVec = tdcide.second;
229 totalIDEs += ideVec.size();
230 double tdcElectrons=0;
235 for (
const auto& ide : ideVec) {
236 totalElectrons += ide.numElectrons;
237 totalEnergy += ide.energy;
238 tdcElectrons += ide.numElectrons;
239 tdcEnergy += ide.energy;
virtual ~LArSimChannelAna()
TH1D * fTDCsPerChannel
Number of TDCs with activity.
std::string fLArG4ModuleLabel
Detector simulation of raw signals on wires.
TH1D * fElectrons
Electrons in the whole channel entry.
TH1D * fChargeXpos
position of the MC Truth charge deposition
double Length() const
Length is associated with z coordinate [cm].
void reconfigure(fhicl::ParameterSet const &p)
#define DEFINE_ART_MODULE(klass)
T get(std::string const &key) const
virtual unsigned int NumberTimeSamples() const =0
TH1D * fChargeYpos
position of the MC Truth charge deposition
Base class for creation of raw signals on wires.
void analyze(const art::Event &evt)
read/write access to event
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
T * make(ARGS...args) const
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
object containing MC truth information necessary for making RawDigits and doing back tracking ...
TPCGeo const & TPC(unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified TPC.
TH1D * fTDC
Which TDCs have activity.
Namespace collecting geometry-related classes utilities.
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.