41 std::vector<const sim::SimChannel*> sccol;
42 evt.
getView(moduleLabel, sccol);
47 for(
auto itr = sccol.begin(); itr != sccol.end(); ++itr){
50 const auto &idemap = (*itr)->TDCIDEMap();
54 for(
auto mitr = idemap.begin(); mitr != idemap.end(); mitr++){
60 const std::vector<sim::IDE> &ide = (*mitr).second;
61 for(
size_t i = 0; i < ide.size(); ++i){
69 voxList.
Add(larVoxelID, ide[i].numElectrons/lgp->
GeVToElectrons(), ide[i].trackID);
72 (*voxList.
find(larVoxelID)).second.SetVoxelID(larVoxelID);
89 const std::vector<sim::SimPhotons>& pmt(*pmtHandle);
96 for(
auto itr = pmt.begin(); itr != pmt.end(); ++itr){
98 int ch = (*itr).OpChannel();
100 if(pmtList.find(ch) == pmtList.end()) {
105 new_photons.reserve((*itr).size());
106 pmtList.insert(std::pair<int,sim::SimPhotons>(ch,new_photons));
110 for(
auto pitr = (*itr).begin(); pitr != (*itr).end(); ++pitr)
Store parameters for running LArG4.
virtual int TriggerOffset() const =0
static sim::LArVoxelList GetLArVoxelList(const art::Event &evt, std::string moduleLabel)
virtual double SamplingRate() const =0
Returns the period of the TPC readout electronics clock.
std::size_t getView(std::string const &moduleLabel, std::string const &productInstanceName, std::vector< ELEMENT const * > &result) const
iterator find(const key_type &key)
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
object containing MC truth information necessary for making RawDigits and doing back tracking ...
void Add(const key_type &key, const double &energy)
double GeVToElectrons() const
static sim::SimPhotonsCollection GetSimPhotonsCollection(const art::Event &evt, std::string moduleLabel)