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);
70 std::string moduleLabel)
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)
Store parameters for running LArG4.
static sim::LArVoxelList GetLArVoxelList(const art::Event &evt, std::string moduleLabel)
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.
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
Collection of photons which recorded on one channel.
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
object containing MC truth information necessary for making RawDigits and doing back tracking ...
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.
Collection of sim::SimPhotons, indexed by channel number.
double GeVToElectrons() const
static sim::SimPhotonsCollection GetSimPhotonsCollection(const art::Event &evt, std::string moduleLabel)