#include "SimListUtils.h"
Definition at line 22 of file SimListUtils.h.
Definition at line 24 of file SimListUtils.cxx.
References sim::LArVoxelList::Add(), sim::LArVoxelList::find(), art::ProductRetriever::getView(), sim::LArG4Parameters::GeVToElectrons(), detinfo::sampling_rate(), detinfo::trigger_offset(), x, y, and z.
Referenced by evdb_tool::DrawLArVoxel3D::Draw(), evd::SimulationDrawer::MCTruth3D(), and evd::SimulationDrawer::MCTruthOrtho().
30 std::vector<const sim::SimChannel*> sccol;
31 evt.
getView(moduleLabel, sccol);
36 for (
auto itr = sccol.begin(); itr != sccol.end(); ++itr) {
39 const auto& idemap = (*itr)->TDCIDEMap();
42 for (
auto mitr = idemap.begin(); mitr != idemap.end(); mitr++) {
48 const std::vector<sim::IDE>& ide = (*mitr).second;
49 for (
size_t i = 0; i < ide.size(); ++i) {
54 voxList.
Add(larVoxelID, ide[i].numElectrons / lgp->
GeVToElectrons(), ide[i].trackID);
57 (*voxList.
find(larVoxelID)).
second.SetVoxelID(larVoxelID);
iterator find(const key_type &key)
std::size_t getView(std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName, std::vector< ELEMENT const * > &result) const
int trigger_offset(DetectorClocksData const &data)
void Add(const key_type &key, const double &energy)
second_as<> second
Type of time stored in seconds, in double precision.
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
double GeVToElectrons() const
get the voxels from the event handle
loop over the pmthits and put them into the list
make an entry in the list for this pmt id
add the photons to the entry
Definition at line 69 of file SimListUtils.cxx.
References art::ProductRetriever::getByLabel(), and sim::SimPhotons::SetChannel().
Referenced by opdet::OptDetDigitizer::produce(), and opdet::OpMCDigi::produce().
75 const std::vector<sim::SimPhotons>& pmt(*pmtHandle);
82 for (
auto itr = pmt.begin(); itr != pmt.end(); ++itr) {
84 int ch = (*itr).OpChannel();
86 if (pmtList.find(ch) == pmtList.end()) {
91 new_photons.reserve((*itr).size());
92 pmtList.insert(std::pair<int, sim::SimPhotons>(ch, new_photons));
96 for (
auto pitr = (*itr).begin(); pitr != (*itr).end(); ++pitr)
All information of a photon entering the sensitive optical detector volume.
void SetChannel(int ch)
Sets the optical detector channel number this object is associated to.
Collection of photons which recorded on one channel.
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Collection of sim::SimPhotons, indexed by channel number.
The documentation for this class was generated from the following files: