23 , outfilename(filename)
37 std::cout <<
"Detector not set via Detector(<name>) method" << std::endl;
38 std::cout <<
"(it is the name appended to the G4HIT_<name> nodename)" << std::endl;
39 std::cout <<
"you do not want to run like this, exiting now" << std::endl;
44 ntup =
new TNtuple(
"sfntup", title.c_str(),
"theta:phi:eta:p:escin:eabs:eion:light:esum");
73 double gpx = primary->
get_px();
74 double gpy = primary->
get_py();
75 phi = atan2(gpy, gpx) * 180. /
M_PI;
76 double gpz = primary->
get_pz();
77 double gpt = std::sqrt(gpx * gpx + gpy * gpy);
78 mom = std::sqrt(gpx * gpx + gpy * gpy + gpz * gpz);
81 eta = asinh(gpz / gpt);
86 std::cout <<
"this only works for single particle events"
87 <<
" here I see " << justone <<
" primaries" << std::endl;
104 escin += hit_iter->second->get_edep();
105 eion += hit_iter->second->get_eion();
106 light += hit_iter->second->get_light_yield();
111 std::cout <<
"could not find " <<
m_HitNodeName << std::endl;
119 eabs += hit_iter->second->get_edep();
134 eabs += hit_iter->second->get_edep();
143 ntup->Fill(theta, phi, eta, mom, escin, eabs, eion, light, esum);
179 std::cout <<
"SamplingFractionReco::Print(const std::string &what) const Printing info for " << what << std::endl;