11 #ifndef LARSIMOBJ_SIMULATION_OPDETBACKTRACKERRECORD_H 12 #define LARSIMOBJ_SIMULATION_OPDETBACKTRACKERRECORD_H 31 TrackSDP(
int id,
float phF,
float ph) : trackID(id), energyFrac(phF), energy (ph) {}
76 SDP(
SDP const& sdp,
int offset);
162 void AddScintillationPhotons(TrackID_t
trackID,
163 timePDclock_t timePDclock,
164 double numberPhotons,
169 int OpDetNum()
const;
188 std::vector<sim::SDP> TrackIDsAndEnergies(timePDclock_t startTimePDclock,
189 timePDclock_t endTimePDclock)
const;
203 timePDclockSDPs_t
const& timePDclockSDPsMap()
const;
207 double Photons(timePDclock_t iTimePDclock)
const;
210 double Energy(timePDclock_t iTimePDclock)
const;
234 std::vector<sim::TrackSDP> TrackSDPs(timePDclock_t startTimePDclock,
235 timePDclock_t endTimePDclock)
const;
268 std::pair<TrackID_t,TrackID_t> MergeOpDetBacktrackerRecord
279 template <
typename Stream>
283 template <
typename Stream>
297 (storedTimePDclock_t timePDclock)
const;
314 template <
class Stream>
318 out << first_indent <<
"OpDet #" << OpDetNum() <<
" read " << timePDclockSDPs.size()
319 <<
" timePDclocks:\n";
320 double opDet_energy = 0., opDet_photons = 0.;
321 for (
const auto& timePDclockinfo: timePDclockSDPs) {
322 auto const iTimePDclock = timePDclockinfo.first;
323 out << indent <<
" timePDclock #" << iTimePDclock
324 <<
" with " << timePDclockinfo.second.size() <<
" SDPs\n";
325 double timePDclock_energy = 0., timePDclock_photons = 0.;
326 for (
const sim::SDP& sdp: timePDclockinfo.second) {
328 <<
" (" << sdp.
x <<
", " << sdp.
y <<
", " << sdp.
z <<
") " 331 timePDclock_energy += sdp.
energy;
334 out << indent <<
" => timePDclock #" << iTimePDclock <<
" CH #" << OpDetNum()
335 <<
" collected " << timePDclock_energy <<
" MeV and " 336 << timePDclock_photons <<
" photons. \n";
337 opDet_energy += timePDclock_energy;
338 opDet_photons += timePDclock_photons;
340 out << indent <<
" => channel #" << OpDetNum() <<
" collected " 341 << opDet_photons <<
" photons and "<< opDet_energy <<
" MeV.\n" ;
345 #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.
Code to link reconstructed objects back to the MC truth information.
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]
timePDclockSDPs_t const & timePDclockSDPsMap() const
Returns all the deposited energy information as stored.
bool operator<(const BeamGateInfo &lhs, const BeamGateInfo &rhs)
bool operator==(ModuleKeyAndType const &a, ModuleKeyAndType const &b) noexcept