11 #ifndef LARDATAOBJ_SIMULATION_SIMCHANNEL_H 12 #define LARDATAOBJ_SIMULATION_SIMCHANNEL_H 37 : trackID(id), energyFrac(ef), energy(e), numElectrons(ne),
origTrackID(gid)
94 IDE(
IDE const& ide,
int offset);
118 typedef std::pair<unsigned short, std::vector<sim::IDE>>
TDCIDE;
174 void AddIonizationElectrons(TrackID_t
trackID,
176 double numberElectrons,
201 std::vector<sim::IDE> TrackIDsAndEnergies(TDC_t startTDC, TDC_t endTDC)
const;
215 TDCIDEs_t
const& TDCIDEMap()
const;
218 double Charge(TDC_t tdc)
const;
221 double Energy(TDC_t tdc)
const;
245 std::vector<sim::TrackIDE> TrackIDEs(TDC_t startTDC, TDC_t endTDC)
const;
278 std::pair<TrackID_t, TrackID_t> MergeSimChannel(
const SimChannel& channel,
int offset);
287 template <
typename Stream>
288 void Dump(Stream&& out, std::string
indent, std::string first_indent)
const;
291 template <
typename Stream>
313 return fChannel < other.
Channel();
317 return fChannel == other.
Channel();
331 template <
class Stream>
334 out << first_indent <<
"channel #" << Channel() <<
" read " << fTDCIDEs.size() <<
" TDCs:\n";
335 double channel_energy = 0., channel_charge = 0.;
336 for (
const auto& TDCinfo : fTDCIDEs) {
337 auto const tdc = TDCinfo.first;
338 out << indent <<
" TDC #" << tdc <<
" with " << TDCinfo.second.size() <<
" IDEs\n";
339 double tdc_energy = 0., tdc_charge = 0.;
340 for (
const sim::IDE& ide : TDCinfo.second) {
341 out << indent <<
" (" << ide.
x <<
", " << ide.
y <<
", " << ide.
z <<
") " 347 out << indent <<
" => TDC #" << tdc <<
" CH #" << Channel() <<
" collected " << tdc_charge
348 <<
" electrons and " << tdc_energy <<
" MeV\n";
349 channel_energy += tdc_energy;
350 channel_charge += tdc_charge;
352 out << indent <<
" => channel #" << Channel() <<
" collected " << channel_charge
353 <<
" electrons and " << channel_energy <<
" MeV\n";
356 #endif // LARDATAOBJ_SIMULATION_SIMCHANNEL_H
TrackID_t trackID
Geant4 supplied track ID.
raw::ChannelID_t fChannel
readout channel where electrons are collected
float z
z position of ionization [cm]
Energy deposited on a readout channel by simulated tracks.
std::pair< unsigned short, std::vector< sim::IDE > > TDCIDE
List of energy deposits at the same time (on this channel)
void Dump(Stream &&out, std::string indent, std::string first_indent) const
Dumps the full content of the SimChannel into a stream.
float numElectrons
number of electrons from the particle detected on the wires
void Dump(Stream &&out, std::string indent="") const
Documentation at Dump(Stream&&, std::string, std::string) const.
TrackID_t origTrackID
Geant4 supplied track ID (remains true trackID even for shower secondaries/tertiaries etc) ...
constexpr int kBogusI
obviously bogus integer value
float energy
energy from the particle with this trackID [MeV]
std::vector< TDCIDE > TDCIDEs_t
Type of list of energy deposits for each TDC with signal.
float x
x position of ionization [cm]
IDE(TrackID_t tid, float nel, float e, float xpos, float ypos, float zpos, TrackID_t gid=util::kBogusI)
Constructor: sets all data members.
TDCIDEs_t fTDCIDEs
list of energy deposits for each TDC with signal
Ionization at a point of the TPC sensitive volume.
int origTrackID
Geant4 supplied trackID, including no modification for shower secondaries/tertiaries.
float energy
energy deposited by ionization by this track ID and time [MeV]
std::string indent(std::size_t const i)
float energyFrac
fraction of hit energy from the particle with this trackID
TrackIDE(int id, float ef, float e, float ne, int gid=util::kBogusI)
float y
y position of ionization [cm]
bool operator==(const SimChannel &other) const
Comparison: true if SimChannels have the same channel ID.
raw::ChannelID_t Channel() const
Returns the readout channel this object describes.
int trackID
Geant4 supplied trackID.
bool operator<(const SimChannel &other) const
Comparison: sorts by channel ID.
IDE::TrackID_t TrackID_t
Type of track ID (the value comes from Geant4)
TDCIDEs_t const & TDCIDEMap() const
Returns all the deposited energy information as stored.
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Collection of Physical constants used in LArSoft.
int TrackID_t
Type of track ID (the value comes from Geant4)
Ionization energy from a Geant4 track.
bool operator==(infinite_endcount_iterator< T > const &, count_iterator< T > const &)
bool operator<(const BeamGateInfo &lhs, const BeamGateInfo &rhs)
float numElectrons
number of electrons at the readout for this track ID and time
TDCIDE::first_type StoredTDC_t
Type for TDC tick used in the internal representation.