47 std::cerr <<
"<<" << __PRETTY_FUNCTION__ <<
">>"
49 <<
"Invalid channel: " << opchannel
52 throw std::exception();
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,
99 std::map<int, int>::iterator channelPosition = ChannelMap.find(iChan);
100 if (channelPosition == ChannelMap.end() ){
101 ChannelMap[iChan] = RecordsCol.size();
102 RecordsCol.emplace_back(std::move(soc));
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,
207 int trackid,
int pdgcode,
int g4trackid,
208 std::string
const& vol)
210 fSimEDepCol[vol].emplace_back(n_photon, n_elec, scint_yield,
215 trackid,pdgcode,g4trackid);
std::vector< sim::OpDetBacktrackerRecord > YieldReflectedOpDetBacktrackerRecords()
std::map< int, std::map< int, int > > fLitePhotons
process_name can override from command line with o or output photon
BEGIN_PROLOG could also be cerr
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.
then echo fcl sbnd_project sbnd_project sbnd_project sbnd_project production production end_time
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::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)
std::vector< sim::OpDetBacktrackerRecord > cReflectedOpDetBacktrackerRecordsCol
Collection of photons which recorded on one channel.
then echo fcl sbnd_project sbnd_project sbnd_project sbnd_project production production start_time
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
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
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
timePDclockSDPs_t const & timePDclockSDPsMap() const
Returns all the deposited energy information as stored.
void ClearEnergyDeposits()
std::map< int, int > cOpChannelToSOCMap
std::map< int, int > cReflectedOpChannelToSOCMap