25 #include <gsl/gsl_rng.h>
35 , _energy_threshold(0.95
e-6)
38 cout <<
Name() <<
" random seed: " << seed << endl;
43 cout <<
"Creating PHG4MvtxDigitizer with name = " << name << endl;
62 cout <<
PHWHERE <<
"DST Node missing, doing nothing." << endl;
74 cout <<
"====================== PHG4MvtxDigitizer::InitRun() =====================" << endl;
75 for (std::map<int, unsigned short>::iterator iter =
_max_adc.begin();
79 cout <<
" Max ADC in Layer #" << iter->first <<
" = " << iter->second << endl;
81 for (std::map<int, float>::iterator iter =
_energy_scale.begin();
85 cout <<
" Energy per ADC in Layer #" << iter->first <<
" = " << 1.0e6 * iter->second <<
" keV" << endl;
87 cout <<
"===========================================================================" << endl;
107 if (!geom_container)
return;
110 cout <<
"Found CYLINDERGEOM_MVTX node" << endl;
114 layeriter != layerrange.second;
117 int layer = layeriter->second->get_layer();
118 float thickness = (layeriter->second)->get_pixel_thickness();
119 float pitch = (layeriter->second)->get_pixel_x();
120 float length = (layeriter->second)->get_pixel_z();
122 float minpath = pitch;
123 if (length < minpath) minpath =
length;
124 if (thickness < minpath) minpath =
thickness;
125 float mip_e = 0.003876 * minpath;
128 cout <<
"mip_e = " << mip_e << endl;
149 TrkrHitSetContainer *trkrhitsetcontainer = findNode::getClass<TrkrHitSetContainer>(topNode,
"TRKR_HITSET");
150 if (!trkrhitsetcontainer)
152 cout <<
"Could not locate TRKR_HITSET node, quit! " << endl;
157 auto hittruthassoc = findNode::getClass<TrkrHitTruthAssoc>(topNode,
"TRKR_HITTRUTHASSOC");
164 hitset_iter != hitset_range.second;
171 if (
Verbosity() > 1) cout <<
"PHG4MvtxDigitizer: found hitset with key: " << hitsetkey <<
" in layer " << layer << endl;
176 std::set<TrkrDefs::hitkey> hits_rm;
178 hit_iter != hit_range.second;
181 TrkrHit *hit = hit_iter->second;
186 cout <<
" PHG4MvtxDigitizer: found hit with key: " << hit_iter->first <<
" and signal " << hit->
getEnergy() / TrkrDefs::MvtxEnergyScaleup <<
" in layer " << layer << std::endl;
195 if (rm_hit) hits_rm.insert(hit_iter->first);
198 for(
const auto& key:hits_rm )
200 if (
Verbosity() > 0) cout <<
" PHG4MvtxDigitizer: remove hit with key: " << key << endl;
202 if( hittruthassoc ) hittruthassoc->removeAssoc(hitsetkey, key);