#include <SimListUtils.h>
Definition at line 22 of file SimListUtils.h.
sim::LArVoxelList sim::SimListUtils::GetLArVoxelList |
( |
const art::Event & |
evt, |
|
|
std::string |
moduleLabel |
|
) |
| |
|
static |
Definition at line 25 of file SimListUtils.cxx.
27 art::ServiceHandle<sim::LArG4Parameters const> lgp;
28 auto const clocks = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(
evt);
31 std::vector<const sim::SimChannel*> sccol;
32 evt.getView(moduleLabel, sccol);
37 for (
auto itr = sccol.begin(); itr != sccol.end(); ++itr) {
40 const auto& idemap = (*itr)->TDCIDEMap();
43 for (
auto mitr = idemap.begin(); mitr != idemap.end(); mitr++) {
49 const std::vector<sim::IDE>& ide = (*mitr).second;
50 for (
size_t i = 0; i < ide.size(); ++i) {
55 voxList.
Add(larVoxelID, ide[i].numElectrons / lgp->GeVToElectrons(), ide[i].trackID);
58 (*voxList.
find(larVoxelID)).
second.SetVoxelID(larVoxelID);
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
process_name opflash particleana ie ie y
iterator find(const key_type &key)
int trigger_offset(DetectorClocksData const &data)
void Add(const key_type &key, const double &energy)
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
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 71 of file SimListUtils.cxx.
74 art::Handle<std::vector<sim::SimPhotons>> pmtHandle;
75 evt.getByLabel(moduleLabel, pmtHandle);
76 const std::vector<sim::SimPhotons>& pmt(*pmtHandle);
83 for (
auto itr = pmt.begin(); itr != pmt.end(); ++itr) {
85 int ch = (*itr).OpChannel();
87 if (pmtList.find(ch) == pmtList.end()) {
92 new_photons.reserve((*itr).size());
93 pmtList.insert(std::pair<int, sim::SimPhotons>(ch, new_photons));
97 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.
Collection of sim::SimPhotons, indexed by channel number.
The documentation for this class was generated from the following files: