42 std::cerr <<
"<<" << __PRETTY_FUNCTION__ <<
">>" 44 <<
"Invalid channel: " << opchannel <<
"\033[00m" << std::endl;
66 for (
auto it = StepPhotonTable->begin(); it != StepPhotonTable->end(); it++) {
67 for (
auto in_it = it->second.begin(); in_it != it->second.end(); in_it++) {
90 std::vector<sim::OpDetBacktrackerRecord>& RecordsCol,
91 std::map<int, int>& ChannelMap,
96 if (channelPosition == ChannelMap.end()) {
97 ChannelMap[iChan] = RecordsCol.size();
98 RecordsCol.emplace_back(std::move(soc));
101 unsigned int idtest = channelPosition->second;
103 for (
auto const& timePDclockSDP : timePDclockSDPsMap) {
104 for (
auto const& sdp : timePDclockSDP.second) {
105 double xyz[3] = {sdp.x, sdp.y, sdp.z};
106 RecordsCol.at(idtest).AddScintillationPhotons(
107 sdp.trackID, timePDclockSDP.first, sdp.numPhotons, xyz, sdp.energy);
120 std::vector<sim::OpDetBacktrackerRecord> result;
136 std::vector<sim::OpDetBacktrackerRecord> result;
163 (it->second).clear();
165 (it->second).clear();
174 std::cerr <<
"<<" << __PRETTY_FUNCTION__ <<
">>" 175 <<
"Invalid channel Number: " << opchannel << std::endl;
184 std::cerr <<
"<<" << __PRETTY_FUNCTION__ <<
">>" 185 <<
"Invalid channel Number: " << opchannel << std::endl;
206 std::string
const& vol)
228 std::unordered_map<std::string, std::vector<sim::SimEnergyDeposit>>
const&
235 std::unordered_map<std::string, std::vector<sim::SimEnergyDeposit>>
std::vector< sim::OpDetBacktrackerRecord > YieldReflectedOpDetBacktrackerRecords()
All information of a photon entering the sensitive optical detector volume.
OpDetPhotonTable * TheOpDetPhotonTable
std::unordered_map< std::string, std::vector< sim::SimEnergyDeposit > > YieldSimEnergyDeposits()
Yields the map of energy deposits by volume name, and resets the internal one.
sim::SimPhotons & GetReflectedPhotonsForOpChannel(size_t opchannel)
Energy deposited on a readout Optical Detector by simulated tracks.
sim::SimPhotons & GetPhotonsForOpChannel(size_t opchannel)
std::map< int, std::map< int, int > > fLitePhotons
Simulation objects for optical detectors.
int OpDetNum() const
Returns the readout Optical Detector this object describes.
std::unordered_map< std::string, std::vector< sim::SimEnergyDeposit > > const & GetSimEnergyDeposits() const
Returns the map of energy deposits by volume name.
void AddPhoton(size_t opchannel, sim::OnePhoton &&photon, bool Reflected=false)
std::vector< sim::OpDetBacktrackerRecord > cReflectedOpDetBacktrackerRecordsCol
std::vector< sim::SimPhotons > fReflectedDetectedPhotons
void AddOpDetBacktrackerRecord(sim::OpDetBacktrackerRecord soc, bool Reflected=false)
void AddLitePhoton(int opchannel, int time, int nphotons, bool Reflected=false)
static OpDetPhotonTable * Instance(bool LitePhotons=false)
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Collection of photons which recorded on one channel.
std::vector< sim::OpDetBacktrackerRecord > YieldOpDetBacktrackerRecords()
std::unordered_map< std::string, std::vector< sim::SimEnergyDeposit > > fSimEDepCol
contains information for a single step in the detector simulation
std::vector< sim::OpDetBacktrackerRecord > cOpDetBacktrackerRecordsCol
void ClearTable(size_t nch=0)
void AddEnergyDeposit(int n_photon, int n_elec, double scint_yield, double energy, float start_x, float start_y, float start_z, float end_x, float end_y, float end_z, double start_time, double end_time, int trackid, int pdgcode, int g4trackid, std::string const &vol="EMPTY")
std::vector< sim::SimPhotons > fDetectedPhotons
std::map< int, std::map< int, int > > fReflectedLitePhotons
timePDclockSDPs_t const & timePDclockSDPsMap() const
Returns all the deposited energy information as stored.
cet::coded_exception< error, detail::translate > exception
void ClearEnergyDeposits()
std::map< int, int > cOpChannelToSOCMap
std::map< int, int > cReflectedOpChannelToSOCMap