17 #include <phparameter/PHParameterInterface.h>
33 #include <gsl/gsl_randist.h>
34 #include <gsl/gsl_rng.h>
42 #include <type_traits>
50 std::cout <<
Name() <<
" random seed: " << seed << std::endl;
62 std::cout <<
"PHG4InttDigitizer::InitRun: detector = " <<
detector << std::endl;
74 std::cout <<
PHWHERE <<
"DST Node missing, doing nothing." << std::endl;
116 std::cout <<
"====================== PHG4InttDigitizer::InitRun() =====================" << std::endl;
117 for (std::map<int, unsigned int>::iterator iter1 =
_max_adc.begin();
121 std::cout <<
" Max ADC in Layer #" << iter1->first <<
" = " << iter1->second << std::endl;
123 for (std::map<int, float>::iterator iter2 =
_energy_scale.begin();
127 std::cout <<
" Energy per ADC in Layer #" << iter2->first <<
" = " << 1.0e6 * iter2->second <<
" keV" << std::endl;
129 std::cout <<
"===========================================================================" << std::endl;
150 if (!geom_container)
return;
154 layeriter != layerrange.second;
157 int layer = layeriter->second->get_layer();
160 std::cout <<
"Error: _max_fphx_adc is not available." << std::endl;
163 float thickness = (layeriter->second)->get_thickness();
176 const InttDeadMap *deadmap = findNode::getClass<InttDeadMap>(topNode,
"DEADMAP_INTT");
181 std::cout <<
"PHG4InttDigitizer::DigitizeLadderCells - Use deadmap ";
186 std::cout <<
"PHG4InttDigitizer::DigitizeLadderCells - Can not find deadmap, all channels enabled " << std::endl;
191 TrkrHitSetContainer *trkrhitsetcontainer = findNode::getClass<TrkrHitSetContainer>(topNode,
"TRKR_HITSET");
192 if (!trkrhitsetcontainer)
194 std::cout <<
"Could not locate TRKR_HITSET node, quit! " << std::endl;
199 auto hittruthassoc = findNode::getClass<TrkrHitTruthAssoc>(topNode,
"TRKR_HITTRUTHASSOC");
208 hitset_iter != hitset_range.second;
220 std::cout <<
"PHG4InttDigitizer: found hitset with key: " << hitsetkey <<
" in layer " << layer << std::endl;
225 std::set<TrkrDefs::hitkey> dead_hits;
227 hit_iter != hit_range.second;
232 TrkrHit *hit = hit_iter->second;
251 std::cout <<
"PHG4InttDigitizer::DigitizeLadderCells - dead strip at layer " << layer <<
": ";
255 dead_hits.insert(hit_iter->first);
262 assert(!
"Error: _energy_scale has two or more keys.");
269 auto irange = std::upper_bound(vadcrange.begin(), vadcrange.end(),
271 int adc = (irange-vadcrange.begin())-1;
272 if (adc == -1) adc = 0;
278 std::cout <<
"PHG4InttDigitizer: found hit with layer " << layer <<
" ladder_z " << ladder_z <<
" ladder_phi " << ladder_phi
279 <<
" strip_col " << strip_col <<
" strip_row " << strip_row <<
" adc " << hit->
getAdc() << std::endl;
284 for (
const auto &key : dead_hits)
288 std::cout <<
" PHG4InttDigitizer: remove hit with key: " << key << std::endl;
292 if (hittruthassoc) hittruthassoc->removeAssoc(hitsetkey, key);
304 std::cout <<
"PHG4InttDigitizer::End - processed "
338 std::cout <<
"Error: vector in set_fphx_adc_scale(vector) must have eight elements." << std::endl;
341 std::sort(userrange.begin(), userrange.end());