12 #ifndef LARSIMOBJ_SIMULATION_OPDETBACKTRACKERRECORD_H 13 #define LARSIMOBJ_SIMULATION_OPDETBACKTRACKERRECORD_H 35 TrackSDP(
int id,
float phF,
float ph) : trackID(id), energyFrac(phF), energy (ph) {}
80 SDP(
SDP const& sdp,
int offset);
166 void AddScintillationPhotons(TrackID_t
trackID,
167 timePDclock_t timePDclock,
168 double numberPhotons,
173 int OpDetNum()
const;
192 std::vector<sim::SDP> TrackIDsAndEnergies(timePDclock_t startTimePDclock,
193 timePDclock_t endTimePDclock)
const;
207 timePDclockSDPs_t
const& timePDclockSDPsMap()
const;
211 double Photons(timePDclock_t iTimePDclock)
const;
214 double Energy(timePDclock_t iTimePDclock)
const;
238 std::vector<sim::TrackSDP> TrackSDPs(timePDclock_t startTimePDclock,
239 timePDclock_t endTimePDclock)
const;
272 std::pair<TrackID_t,TrackID_t> MergeOpDetBacktrackerRecord
283 template <
typename Stream>
284 void Dump(Stream&& out, std::string
indent, std::string first_indent)
const;
287 template <
typename Stream>
301 (storedTimePDclock_t timePDclock)
const;
319 template <
class Stream>
321 (Stream&& out, std::string
indent, std::string first_indent)
const 323 out << first_indent <<
"OpDet #" << OpDetNum() <<
" read " << timePDclockSDPs.size()
324 <<
" timePDclocks:\n";
325 double opDet_energy = 0., opDet_photons = 0.;
326 for (
const auto& timePDclockinfo: timePDclockSDPs) {
327 auto const iTimePDclock = timePDclockinfo.first;
328 out << indent <<
" timePDclock #" << iTimePDclock
329 <<
" with " << timePDclockinfo.second.size() <<
" SDPs\n";
330 double timePDclock_energy = 0., timePDclock_photons = 0.;
331 for (
const sim::SDP& sdp: timePDclockinfo.second) {
333 <<
" (" << sdp.
x <<
", " << sdp.
y <<
", " << sdp.
z <<
") " 336 timePDclock_energy += sdp.
energy;
339 out << indent <<
" => timePDclock #" << iTimePDclock <<
" CH #" << OpDetNum()
340 <<
" collected " << timePDclock_energy <<
" MeV and " 341 << timePDclock_photons <<
" photons. \n";
342 opDet_energy += timePDclock_energy;
343 opDet_photons += timePDclock_photons;
345 out << indent <<
" => channel #" << OpDetNum() <<
" collected " 346 << opDet_photons <<
" photons and "<< opDet_energy <<
" MeV.\n" ;
350 #endif // LARSIMOBJ_SIMULATION_OPDETBACKTRACKERRECORD_H
int iOpDetNum
OpticalDetector where the photons were detected.
float x
x position of ionization [cm]
bool operator<(const OpDetBacktrackerRecord &other) const
Comparison: sorts by Optical Detector ID.
SDP(TrackID_t tid, float nPh, float e, float xpos, float ypos, float zpos)
Constructor: sets all data members.
std::vector< timePDclockSDP_t > timePDclockSDPs_t
Type of list of energy deposits for each timePDclock with signal.
void Dump(Stream &&out, std::string indent="") const
Documentation at Dump(Stream&&, std::string, std::string) const.
timePDclockSDP_t::first_type storedTimePDclock_t
Type for timePDclock tick used in the internal representation.
Energy deposited on a readout Optical Detector by simulated tracks.
timePDclockSDPs_t timePDclockSDPs
list of energy deposits for each timePDclock with signal
int OpDetNum() const
Returns the readout Optical Detector this object describes.
int trackID
Geant4 supplied trackID.
TrackID_t trackID
Geant4 supplied track ID.
SDP::TrackID_t TrackID_t
Type of track ID (the value comes from Geant4)
void Dump(Stream &&out, std::string indent, std::string first_indent) const
Dumps the full content of the OpDetBacktrackerRecord into a stream.
float energyFrac
fraction of OpHit energy from the particle with this trackID
double timePDclock_t
Type for iTimePDclock tick used in the interface.
std::string indent(std::size_t const i)
Definition of data types for geometry description.
Ionization photons from a Geant4 track.
float y
y position of ionization [cm]
int TrackID_t
Type of track ID (the value comes from Geant4)
TrackSDP(int id, float phF, float ph)
std::pair< double, std::vector< sim::SDP > > timePDclockSDP_t
List of energy deposits at the same time (on this Optical Detector)
float numPhotons
number of photons at the optical detector for this track ID and time
float energy
energy deposited by ionization
bool operator==(const OpDetBacktrackerRecord &other) const
Comparison: true if OpDetBacktrackerRecords have the same Optical Detector ID.
float energy
energy from the particle with this trackID [MeV]
float z
z position of ionization [cm]
bool operator==(geometry_element_iterator< GEOIDITER > const &iter, GEOIDITER const &id_iter)
Comparison operator: geometry ID and element point to the same ID.
timePDclockSDPs_t const & timePDclockSDPsMap() const
Returns all the deposited energy information as stored.
bool operator<(const BeamGateInfo &lhs, const BeamGateInfo &rhs)