34 if(!TheOpDetPhotonTable){
47 std::cerr <<
"<<" << __PRETTY_FUNCTION__ <<
">>" 49 <<
"Invalid channel: " << opchannel
72 for(
auto it = StepPhotonTable->begin(); it!=StepPhotonTable->end(); it++)
74 for(
auto in_it = it->second.begin(); in_it!=it->second.end(); in_it++)
96 std::map<int, int> & ChannelMap,
100 if (channelPosition == ChannelMap.end() ){
101 ChannelMap[iChan] = RecordsCol.size();
104 unsigned int idtest = channelPosition->second;
106 for(
auto const& timePDclockSDP : timePDclockSDPsMap){
107 for(
auto const& sdp : timePDclockSDP.second){
108 double xyz[3] = {sdp.x, sdp.y, sdp.z};
109 RecordsCol.at(idtest).AddScintillationPhotons(
111 timePDclockSDP.first,
128 std::vector<sim::OpDetBacktrackerRecord>
result;
143 std::vector<sim::OpDetBacktrackerRecord>
result;
171 (it->second).clear();
173 (it->second).clear();
182 std::cerr <<
"<<" << __PRETTY_FUNCTION__ <<
">>" 183 <<
"Invalid channel Number: " << opchannel
193 std::cerr <<
"<<" << __PRETTY_FUNCTION__ <<
">>" 194 <<
"Invalid channel Number: " << opchannel
204 float start_x,
float start_y,
float start_z,
205 float end_x,
float end_y,
float end_z,
206 double start_time,
double end_time,
210 fSimEDepCol[vol].emplace_back(n_photon, n_elec, scint_yield,
std::vector< sim::OpDetBacktrackerRecord > YieldReflectedOpDetBacktrackerRecords()
std::map< int, std::map< int, int > > fLitePhotons
All information of a photon entering the sensitive optical detector volume.
OpDetPhotonTable * TheOpDetPhotonTable
std::map< int, std::map< int, int > > fReflectedLitePhotons
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)
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)
void swap(Handle< T > &a, Handle< T > &b)
std::vector< sim::SimPhotons > fReflectedDetectedPhotons
void AddOpDetBacktrackerRecord(sim::OpDetBacktrackerRecord soc, bool Reflected=false)
void AddLitePhoton(int opchannel, int time, int nphotons, bool Reflected=false)
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
static OpDetPhotonTable * Instance(bool LitePhotons=false)
std::vector< sim::OpDetBacktrackerRecord > cReflectedOpDetBacktrackerRecordsCol
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
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, std::string const &vol="EMPTY")
std::vector< sim::OpDetBacktrackerRecord > cOpDetBacktrackerRecordsCol
void ClearTable(size_t nch=0)
std::vector< sim::SimPhotons > fDetectedPhotons
timePDclockSDPs_t const & timePDclockSDPsMap() const
Returns all the deposited energy information as stored.
cet::coded_exception< error, detail::translate > exception
void ClearEnergyDeposits()
QTextStream & endl(QTextStream &s)
std::map< int, int > cOpChannelToSOCMap
std::map< int, int > cReflectedOpChannelToSOCMap