25 #include "art_root_io/TFileService.h" 27 #include "cetlib_except/exception.h" 43 double bdist(
const TVector3& pos)
50 double d2 = 2. * tpc.HalfWidth() - pos.X();
51 double d3 = pos.Y() + tpc.HalfHeight();
52 double d4 = tpc.HalfHeight() - pos.Y();
54 double d6 = tpc.Length() - pos.Z();
56 return std::min({d1, d2, d3, d4, d5, d6});
73 double mctime = mctrk.
Start().
T();
80 int ntraj = mctrk.size();
81 for (
int itraj = 0; itraj < ntraj; ++itraj) {
82 const TLorentzVector& vec = mctrk[itraj].Position();
83 double dx = pos[0] - vec.X() - mcdx;
84 double dy = pos[1] - vec.Y();
85 double dz = pos[2] - vec.Z();
86 double dist = std::sqrt(dx * dx + dy * dy + dz * dz);
87 if (best_traj < 0 || dist < max_dist) {
114 double xmax = 2. * tpc.HalfWidth();
115 double ymin = -tpc.HalfHeight();
116 double ymax = tpc.HalfHeight();
118 double zmax = tpc.Length();
121 int n = mctrk.size();
124 for (
int i = 0; i <
n; ++i) {
125 TVector3 pos = mctrk[i].Position().Vect();
131 if (pos.X() >= xmin && pos.X() <= xmax && pos.Y() >= ymin && pos.Y() <= ymax &&
132 pos.Z() >= zmin && pos.Z() <= zmax) {
138 startmom = 0.001 * mctrk[i].Momentum().Vect();
142 result += disp.Mag();
147 endmom = 0.001 * mctrk[i].Momentum().Vect();
157 void effcalc(
const TH1* hnum,
const TH1* hden, TH1* heff)
159 int nbins = hnum->GetNbinsX();
160 if (nbins != hden->GetNbinsX())
161 throw cet::exception(
"SeedAna") <<
"effcalc[" __FILE__
"]: incompatible histograms (I)\n";
162 if (nbins != heff->GetNbinsX())
163 throw cet::exception(
"SeedAna") <<
"effcalc[" __FILE__
"]: incompatible histograms (II)\n";
167 for (
int ibin = 0; ibin <= nbins + 1; ++ibin) {
168 double num = hnum->GetBinContent(ibin);
169 double den = hden->GetBinContent(ibin);
171 heff->SetBinContent(ibin, 0.);
172 heff->SetBinError(ibin, 0.);
175 double eff = num /
den;
176 if (eff < 0.) eff = 0.;
177 if (eff > 1.) eff = 1.;
178 double err = std::sqrt(eff * (1. - eff) / den);
179 heff->SetBinContent(ibin, eff);
180 heff->SetBinError(ibin, err);
184 heff->SetMinimum(0.);
185 heff->SetMaximum(1.05);
186 heff->SetMarkerStyle(20);
191 void mulcalc(
const TH1* hnum,
const TH1* hden, TH1* hmul)
193 int nbins = hnum->GetNbinsX();
194 if (nbins != hden->GetNbinsX())
195 throw cet::exception(
"SeedAna") <<
"mulcalc[" __FILE__
"]: incompatible histograms (I)\n";
196 if (nbins != hmul->GetNbinsX())
197 throw cet::exception(
"SeedAna") <<
"mulcalc[" __FILE__
"]: incompatible histograms (II)\n";
201 for (
int ibin = 0; ibin <= nbins + 1; ++ibin) {
202 double num = hnum->GetBinContent(ibin);
203 double den = hden->GetBinContent(ibin);
205 hmul->SetBinContent(ibin, 0.);
206 hmul->SetBinError(ibin, 0.);
209 double mul = num /
den;
210 if (mul < 0.) mul = 0.;
211 double err = std::sqrt((1. + mul) * mul / den);
212 hmul->SetBinContent(ibin, mul);
213 hmul->SetBinError(ibin, err);
217 hmul->SetMinimum(0.);
218 hmul->SetMarkerStyle(20);
248 MCHists(
const std::string& subdir);
252 TH2F* fHduvcosth{
nullptr};
253 TH1F* fHcosth{
nullptr};
254 TH1F* fHmcu{
nullptr};
255 TH1F* fHmcv{
nullptr};
256 TH1F* fHmcw{
nullptr};
257 TH1F* fHmcdudw{
nullptr};
258 TH1F* fHmcdvdw{
nullptr};
262 TH1F* fHmcstartx{
nullptr};
263 TH1F* fHmcstarty{
nullptr};
264 TH1F* fHmcstartz{
nullptr};
265 TH1F* fHmcendx{
nullptr};
266 TH1F* fHmcendy{
nullptr};
267 TH1F* fHmcendz{
nullptr};
268 TH1F* fHmctheta{
nullptr};
269 TH1F* fHmcphi{
nullptr};
270 TH1F* fHmctheta_xz{
nullptr};
271 TH1F* fHmctheta_yz{
nullptr};
272 TH1F* fHmcmom{
nullptr};
273 TH1F* fHmclen{
nullptr};
277 TH1F* fHmstartx{
nullptr};
278 TH1F* fHmstarty{
nullptr};
279 TH1F* fHmstartz{
nullptr};
280 TH1F* fHmendx{
nullptr};
281 TH1F* fHmendy{
nullptr};
282 TH1F* fHmendz{
nullptr};
283 TH1F* fHmtheta{
nullptr};
284 TH1F* fHmphi{
nullptr};
285 TH1F* fHmtheta_xz{
nullptr};
286 TH1F* fHmtheta_yz{
nullptr};
287 TH1F* fHmmom{
nullptr};
288 TH1F* fHmlen{
nullptr};
292 TH1F* fHgstartx{
nullptr};
293 TH1F* fHgstarty{
nullptr};
294 TH1F* fHgstartz{
nullptr};
295 TH1F* fHgendx{
nullptr};
296 TH1F* fHgendy{
nullptr};
297 TH1F* fHgendz{
nullptr};
298 TH1F* fHgtheta{
nullptr};
299 TH1F* fHgphi{
nullptr};
300 TH1F* fHgtheta_xz{
nullptr};
301 TH1F* fHgtheta_yz{
nullptr};
302 TH1F* fHgmom{
nullptr};
303 TH1F* fHglen{
nullptr};
307 TH1F* fHmulstartx{
nullptr};
308 TH1F* fHmulstarty{
nullptr};
309 TH1F* fHmulstartz{
nullptr};
310 TH1F* fHmulendx{
nullptr};
311 TH1F* fHmulendy{
nullptr};
312 TH1F* fHmulendz{
nullptr};
313 TH1F* fHmultheta{
nullptr};
314 TH1F* fHmulphi{
nullptr};
315 TH1F* fHmultheta_xz{
nullptr};
316 TH1F* fHmultheta_yz{
nullptr};
317 TH1F* fHmulmom{
nullptr};
318 TH1F* fHmullen{
nullptr};
322 TH1F* fHestartx{
nullptr};
323 TH1F* fHestarty{
nullptr};
324 TH1F* fHestartz{
nullptr};
325 TH1F* fHeendx{
nullptr};
326 TH1F* fHeendy{
nullptr};
327 TH1F* fHeendz{
nullptr};
328 TH1F* fHetheta{
nullptr};
329 TH1F* fHephi{
nullptr};
330 TH1F* fHetheta_xz{
nullptr};
331 TH1F* fHetheta_yz{
nullptr};
332 TH1F* fHemom{
nullptr};
333 TH1F* fHelen{
nullptr};
376 art::TFileDirectory topdir = tfs->mkdir(
"seedana",
"SeedAna histograms");
377 art::TFileDirectory
dir = topdir.mkdir(subdir);
381 fHx = dir.make<TH1F>(
"x",
"X Position", 100, -2. * tpc.HalfWidth(), 4. * tpc.HalfWidth());
382 fHy = dir.make<TH1F>(
"y",
"Y Position", 100, -tpc.HalfHeight(), tpc.HalfHeight());
383 fHz = dir.make<TH1F>(
"z",
"Z Position", 100, 0., tpc.Length());
384 fHdist = dir.make<TH1F>(
"dist",
"Position Distance to Boundary", 100, -10., tpc.HalfWidth());
385 fHtheta = dir.make<TH1F>(
"theta",
"Theta", 100, 0., 3.142);
386 fHphi = dir.make<TH1F>(
"phi",
"Phi", 100, -3.142, 3.142);
387 fHtheta_xz = dir.make<TH1F>(
"theta_xz",
"Theta_xz", 100, -3.142, 3.142);
388 fHtheta_yz = dir.make<TH1F>(
"theta_yz",
"Theta_yz", 100, -3.142, 3.142);
402 art::TFileDirectory topdir = tfs->mkdir(
"seedana",
"SeedAna histograms");
403 art::TFileDirectory
dir = topdir.mkdir(subdir);
408 dir.make<TH2F>(
"duvcosth",
"Delta(uv) vs. Colinearity", 100, 0.95, 1., 100, 0., 1.);
409 fHcosth = dir.make<TH1F>(
"colin",
"Colinearity", 100, 0.95, 1.);
410 fHmcu = dir.make<TH1F>(
"mcu",
"MC Truth U", 100, -5., 5.);
411 fHmcv = dir.make<TH1F>(
"mcv",
"MC Truth V", 100, -5., 5.);
412 fHmcw = dir.make<TH1F>(
"mcw",
"MC Truth W", 100, -20., 20.);
413 fHmcdudw = dir.make<TH1F>(
"mcdudw",
"MC Truth U Slope", 100, -0.2, 0.2);
414 fHmcdvdw = dir.make<TH1F>(
"mcdvdw",
"MV Truth V Slope", 100, -0.2, 0.2);
416 fHmcstartx = dir.make<TH1F>(
417 "mcxstart",
"MC X Start Position", 10, -2. * tpc.HalfWidth(), 4. * tpc.HalfWidth());
419 dir.make<TH1F>(
"mcystart",
"MC Y Start Position", 10, -tpc.HalfHeight(), tpc.HalfHeight());
420 fHmcstartz = dir.make<TH1F>(
"mczstart",
"MC Z Start Position", 10, 0., tpc.Length());
421 fHmcendx = dir.make<TH1F>(
422 "mcxend",
"MC X End Position", 10, -2. * tpc.HalfWidth(), 4. * tpc.HalfWidth());
424 dir.make<TH1F>(
"mcyend",
"MC Y End Position", 10, -tpc.HalfHeight(), tpc.HalfHeight());
425 fHmcendz = dir.make<TH1F>(
"mczend",
"MC Z End Position", 10, 0., tpc.Length());
426 fHmctheta = dir.make<TH1F>(
"mctheta",
"MC Theta", 20, 0., 3.142);
427 fHmcphi = dir.make<TH1F>(
"mcphi",
"MC Phi", 10, -3.142, 3.142);
428 fHmctheta_xz = dir.make<TH1F>(
"mctheta_xz",
"MC Theta_xz", 40, -3.142, 3.142);
429 fHmctheta_yz = dir.make<TH1F>(
"mctheta_yz",
"MC Theta_yz", 40, -3.142, 3.142);
430 fHmcmom = dir.make<TH1F>(
"mcmom",
"MC Momentum", 10, 0., 10.);
431 fHmclen = dir.make<TH1F>(
"mclen",
"MC Particle Length", 10, 0., 1.1 * tpc.Length());
433 fHmstartx = dir.make<TH1F>(
434 "mxstart",
"Matched X Start Position", 10, -2. * tpc.HalfWidth(), 4. * tpc.HalfWidth());
435 fHmstarty = dir.make<TH1F>(
436 "mystart",
"Matched Y Start Position", 10, -tpc.HalfHeight(), tpc.HalfHeight());
437 fHmstartz = dir.make<TH1F>(
"mzstart",
"Matched Z Start Position", 10, 0., tpc.Length());
438 fHmendx = dir.make<TH1F>(
439 "mxend",
"Matched X End Position", 10, -2. * tpc.HalfWidth(), 4. * tpc.HalfWidth());
441 dir.make<TH1F>(
"myend",
"Matched Y End Position", 10, -tpc.HalfHeight(), tpc.HalfHeight());
442 fHmendz = dir.make<TH1F>(
"mzend",
"Matched Z End Position", 10, 0., tpc.Length());
443 fHmtheta = dir.make<TH1F>(
"mtheta",
"Matched Theta", 20, 0., 3.142);
444 fHmphi = dir.make<TH1F>(
"mphi",
"Matched Phi", 10, -3.142, 3.142);
445 fHmtheta_xz = dir.make<TH1F>(
"mtheta_xz",
"Matched Theta_xz", 40, -3.142, 3.142);
446 fHmtheta_yz = dir.make<TH1F>(
"mtheta_yz",
"Matched Theta_yz", 40, -3.142, 3.142);
447 fHmmom = dir.make<TH1F>(
"mmom",
"Matched Momentum", 10, 0., 10.);
448 fHmlen = dir.make<TH1F>(
"mlen",
"Matched Particle Length", 10, 0., 1.1 * tpc.Length());
450 fHgstartx = dir.make<TH1F>(
451 "gxstart",
"Good X Start Position", 10, -2. * tpc.HalfWidth(), 4. * tpc.HalfWidth());
453 dir.make<TH1F>(
"gystart",
"Good Y Start Position", 10, -tpc.HalfHeight(), tpc.HalfHeight());
454 fHgstartz = dir.make<TH1F>(
"gzstart",
"Good Z Start Position", 10, 0., tpc.Length());
455 fHgendx = dir.make<TH1F>(
456 "gxend",
"Good X End Position", 10, -2. * tpc.HalfWidth(), 4. * tpc.HalfWidth());
458 dir.make<TH1F>(
"gyend",
"Good Y End Position", 10, -tpc.HalfHeight(), tpc.HalfHeight());
459 fHgendz = dir.make<TH1F>(
"gzend",
"Good Z End Position", 10, 0., tpc.Length());
460 fHgtheta = dir.make<TH1F>(
"gtheta",
"Good Theta", 20, 0., 3.142);
461 fHgphi = dir.make<TH1F>(
"gphi",
"Good Phi", 10, -3.142, 3.142);
462 fHgtheta_xz = dir.make<TH1F>(
"gtheta_xz",
"Good Theta_xz", 40, -3.142, 3.142);
463 fHgtheta_yz = dir.make<TH1F>(
"gtheta_yz",
"Good Theta_yz", 40, -3.142, 3.142);
464 fHgmom = dir.make<TH1F>(
"gmom",
"Good Momentum", 10, 0., 10.);
465 fHglen = dir.make<TH1F>(
"glen",
"Good Particle Length", 10, 0., 1.1 * tpc.Length());
467 fHmulstartx = dir.make<TH1F>(
"mulxstart",
468 "Multiplicity vs. X Start Position",
470 -2. * tpc.HalfWidth(),
471 4. * tpc.HalfWidth());
472 fHmulstarty = dir.make<TH1F>(
473 "mulystart",
"Multiplicity vs. Y Start Position", 10, -tpc.HalfHeight(), tpc.HalfHeight());
475 dir.make<TH1F>(
"mulzstart",
"Multiplicity vs. Z Start Position", 10, 0., tpc.Length());
476 fHmulendx = dir.make<TH1F>(
"mulxend",
477 "Multiplicity vs. X End Position",
479 -2. * tpc.HalfWidth(),
480 4. * tpc.HalfWidth());
481 fHmulendy = dir.make<TH1F>(
482 "mulyend",
"Multiplicity vs. Y End Position", 10, -tpc.HalfHeight(), tpc.HalfHeight());
483 fHmulendz = dir.make<TH1F>(
"mulzend",
"Multiplicity vs. Z End Position", 10, 0., tpc.Length());
484 fHmultheta = dir.make<TH1F>(
"multheta",
"Multiplicity vs. Theta", 20, 0., 3.142);
485 fHmulphi = dir.make<TH1F>(
"mulphi",
"Multiplicity vs. Phi", 10, -3.142, 3.142);
486 fHmultheta_xz = dir.make<TH1F>(
"multheta_xz",
"Multiplicity vs. Theta_xz", 40, -3.142, 3.142);
487 fHmultheta_yz = dir.make<TH1F>(
"multheta_yz",
"Multiplicity vs. Theta_yz", 40, -3.142, 3.142);
488 fHmulmom = dir.make<TH1F>(
"mulmom",
"Multiplicity vs. Momentum", 10, 0., 10.);
490 dir.make<TH1F>(
"mullen",
"Multiplicity vs. Particle Length", 10, 0., 1.1 * tpc.Length());
492 fHestartx = dir.make<TH1F>(
"exstart",
493 "Efficiency vs. X Start Position",
495 -2. * tpc.HalfWidth(),
496 4. * tpc.HalfWidth());
497 fHestarty = dir.make<TH1F>(
498 "eystart",
"Efficiency vs. Y Start Position", 10, -tpc.HalfHeight(), tpc.HalfHeight());
499 fHestartz = dir.make<TH1F>(
"ezstart",
"Efficiency vs. Z Start Position", 10, 0., tpc.Length());
500 fHeendx = dir.make<TH1F>(
501 "exend",
"Efficiency vs. X End Position", 10, -2. * tpc.HalfWidth(), 4. * tpc.HalfWidth());
502 fHeendy = dir.make<TH1F>(
503 "eyend",
"Efficiency vs. Y End Position", 10, -tpc.HalfHeight(), tpc.HalfHeight());
504 fHeendz = dir.make<TH1F>(
"ezend",
"Efficiency vs. Z End Position", 10, 0., tpc.Length());
505 fHetheta = dir.make<TH1F>(
"etheta",
"Efficiency vs. Theta", 20, 0., 3.142);
506 fHephi = dir.make<TH1F>(
"ephi",
"Efficiency vs. Phi", 10, -3.142, 3.142);
507 fHetheta_xz = dir.make<TH1F>(
"etheta_xz",
"Efficiency vs. Theta_xz", 40, -3.142, 3.142);
508 fHetheta_yz = dir.make<TH1F>(
"etheta_yz",
"Efficiency vs. Theta_yz", 40, -3.142, 3.142);
509 fHemom = dir.make<TH1F>(
"emom",
"Efficiency vs. Momentum", 10, 0., 10.);
510 fHelen = dir.make<TH1F>(
"elen",
"Efficiency vs. Particle Length", 10, 0., 1.1 * tpc.Length());
525 mf::LogInfo(
"SeedAna") <<
"SeedAna configured with the following parameters:\n" 528 <<
" Dump = " <<
fDump <<
"\n" 529 <<
" MinMCKE = " <<
fMinMCKE <<
"\n" 539 std::unique_ptr<mf::LogInfo> pdump;
542 pdump = std::make_unique<mf::LogInfo>(
"TrackAna");
556 std::map<const recob::Seed*, int> seedmap;
568 *pdump <<
"MC Tracks\n" 569 <<
" Id pdg x y z dx dy dz " 571 <<
"--------------------------------------------------------------------------------" 580 for (
auto const& mctrk : *mctrackh) {
599 double mctime = mctrk.
Start().
T();
608 double plen = length(detProp, mctrk, mcdx, mcstart, mcend, mcstartmom, mcendmom);
613 if (plen <= std::max(
fMinMCLen, 0.)) {
continue; }
618 double pstart = mcstartmom.Mag();
619 double pend = mcendmom.Mag();
620 *pdump <<
"\nOffset" << std::setw(3) << mctrk.
TrackID() << std::setw(6) << mctrk.
PdgCode()
621 <<
" " << std::fixed << std::setprecision(2) << std::setw(10) << mcdx
622 <<
"\nStart " << std::setw(3) << mctrk.
TrackID() << std::setw(6) << mctrk.
PdgCode()
623 <<
" " << std::fixed << std::setprecision(2) << std::setw(10) << mcstart[0]
624 << std::setw(10) << mcstart[1] << std::setw(10) << mcstart[2];
626 *pdump <<
" " << std::fixed << std::setprecision(3) << std::setw(10)
627 << mcstartmom[0] / pstart << std::setw(10) << mcstartmom[1] / pstart
628 << std::setw(10) << mcstartmom[2] / pstart;
631 *pdump << std::setw(32) <<
" ";
632 *pdump << std::setw(12) << std::fixed << std::setprecision(3) << pstart;
633 *pdump <<
"\nEnd " << std::setw(3) << mctrk.
TrackID() << std::setw(6) << mctrk.
PdgCode()
634 <<
" " << std::fixed << std::setprecision(2) << std::setw(10) << mcend[0]
635 << std::setw(10) << mcend[1] << std::setw(10) << mcend[2];
637 *pdump <<
" " << std::fixed << std::setprecision(3) << std::setw(10)
638 << mcendmom[0] / pend << std::setw(10) << mcendmom[1] / pend << std::setw(10)
639 << mcendmom[2] / pend;
642 *pdump << std::setw(32) <<
" ";
643 *pdump << std::setw(12) << std::fixed << std::setprecision(3) << pend <<
"\n";
649 std::ostringstream ostr;
655 double mctheta_xz = std::atan2(mcstartmom.X(), mcstartmom.Z());
656 double mctheta_yz = std::atan2(mcstartmom.Y(), mcstartmom.Z());
664 mchists.
fHmctheta->Fill(mcstartmom.Theta());
665 mchists.
fHmcphi->Fill(mcstartmom.Phi());
668 mchists.
fHmcmom->Fill(mcstartmom.Mag());
674 if (!seedh.
isValid()) {
continue; }
678 int nseed = seedh->size();
679 for (
int i = 0; i < nseed; ++i) {
682 if (seedmap.count(&seed) == 0) seedmap[&seed] = -1;
696 double dirmag = dir.Mag();
697 double diryz = std::sqrt(dir.Y() * dir.Y() + dir.Z() * dir.Z());
699 double sinth = dir.X() / dirmag;
700 double costh = diryz / dirmag;
704 sinphi = -dir.Y() / diryz;
705 cosphi = dir.Z() / diryz;
710 rot(0, 1) = sinth * sinphi;
712 rot(2, 1) = -costh * sinphi;
713 rot(0, 2) = -sinth * cosphi;
715 rot(2, 2) = costh * cosphi;
719 int itraj = mcmatch(detProp, mctrk, seed);
720 if (itraj < 0) {
continue; }
724 TVector3 mcpos = mctrk[itraj].Position().Vect() - pos;
725 TVector3 mcmom = mctrk[itraj].Momentum().Vect();
731 TVector3 mcmoml = rot * mcmom;
732 TVector3 mcposl = rot * mcpos;
734 if (mcmoml.Z() < 0.) mcmoml = -mcmoml;
735 costh = mcmoml.Z() / mcmoml.Mag();
737 double u = mcposl.X();
738 double v = mcposl.Y();
739 double w = mcposl.Z();
741 double pu = mcmoml.X();
742 double pv = mcmoml.Y();
743 double pw = mcmoml.Z();
745 double dudw = pu / pw;
746 double dvdw = pv / pw;
748 double u0 = u - w * dudw;
749 double v0 = v - w * dvdw;
750 double uv0 = std::sqrt(u0 * u0 + v0 * v0);
767 mchists.
fHmcu->Fill(u0);
768 mchists.
fHmcv->Fill(v0);
769 mchists.
fHmcw->Fill(w);
784 mchists.
fHmendx->Fill(mcend.X());
785 mchists.
fHmendy->Fill(mcend.Y());
786 mchists.
fHmendz->Fill(mcend.Z());
787 mchists.
fHmtheta->Fill(mcstartmom.Theta());
788 mchists.
fHmphi->Fill(mcstartmom.Phi());
791 mchists.
fHmmom->Fill(mcstartmom.Mag());
792 mchists.
fHmlen->Fill(plen);
798 if (nmatch == 0) {
continue; }
803 mchists.
fHgendx->Fill(mcend.X());
804 mchists.
fHgendy->Fill(mcend.Y());
805 mchists.
fHgendz->Fill(mcend.Z());
806 mchists.
fHgtheta->Fill(mcstartmom.Theta());
807 mchists.
fHgphi->Fill(mcstartmom.Phi());
810 mchists.
fHgmom->Fill(mcstartmom.Mag());
811 mchists.
fHglen->Fill(plen);
821 int nseed = seedh->size();
823 if (nseed > 0 && pdump != 0) {
824 *pdump <<
"\nReconstructed Seeds\n" 825 <<
" MCid x y z dx dy dz " 827 <<
"--------------------------------------------------------------------------------" 831 for (
int i = 0; i < nseed; ++i) {
842 double mdir = dir.Mag();
843 if (mdir != 0.) { dir *= (1. / mdir); }
845 double dpos = bdist(pos);
846 double theta_xz = std::atan2(dir.X(), dir.Z());
847 double theta_yz = std::atan2(dir.Y(), dir.Z());
852 int mcid = seedmap[&
seed];
853 *pdump << std::setw(15) << mcid <<
" " << std::fixed << std::setprecision(2)
854 << std::setw(10) << pos[0] << std::setw(10) << pos[1] << std::setw(10) << pos[2]
855 <<
" " << std::fixed << std::setprecision(3) << std::setw(10) << dir[0]
856 << std::setw(10) << dir[1] << std::setw(10) << dir[2] <<
"\n";
864 rhists.
fHx->Fill(pos.X());
865 rhists.
fHy->Fill(pos.Y());
866 rhists.
fHz->Fill(pos.Z());
867 rhists.
fHdist->Fill(dpos);
868 rhists.
fHtheta->Fill(dir.Theta());
869 rhists.
fHphi->Fill(dir.Phi());
887 const MCHists& mchists = i->second;
905 const MCHists& mchists = i->second;
std::string fMCTrackModuleLabel
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
void GetPoint(double *Pt, double *Err) const
constexpr auto abs(T v)
Returns the absolute value of the argument.
std::string fSeedModuleLabel
unsigned int ReadOutWindowSize() const
EDAnalyzer(fhicl::ParameterSet const &pset)
tick ticks
Alias for common language habits.
MCHists(const std::string &subdir)
void analyze(const art::Event &evt) override
bool isValid() const noexcept
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
#define DEFINE_ART_MODULE(klass)
double ConvertXToTicks(double X, int p, int t, int c) const
double DriftVelocity(double efield=0., double temperature=0.) const
cm/us
Class def header for mctrack data container.
std::map< int, RecoHists > fRecoHistMap
const TLorentzVector & Momentum() const
SeedAna(fhicl::ParameterSet const &pset)
decltype(auto) get(T &&obj)
ADL-aware version of std::to_string.
std::map< int, MCHists > fMCHistMap
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
double dist(const TReal *x, const TReal *y, const unsigned int dimension)
const MCStep & Start() const
unsigned int TrackID() const
void GetDirection(double *Dir, double *Err) const
art framework interface to geometry description
cet::coded_exception< error, detail::translate > exception
RecoHists(const std::string &subdir)