All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FillReco.cxx
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////
2 // \file FillReco.cxx
3 // \brief Fill reco SR branches
4 // \author $Author: psihas@fnal.gov
5 //////////////////////////////////////////////////////////////////////
6 
7 #include "FillReco.h"
8 #include "RecoUtils/RecoUtils.h"
9 
10 namespace caf
11 {
12 
13  //......................................................................
14  bool SelectSlice(const caf::SRSlice &slice, bool cut_clear_cosmic) {
15  return (!slice.is_clear_cosmic || !cut_clear_cosmic) // No clear cosmics
16  && slice.primary.size() > 0; // must have primary tracks/showers
17  }
18 
19  void FillStubVars(const sbn::Stub &stub,
20  const art::Ptr<recob::PFParticle> stubpfp,
21  caf::SRStub &srstub,
22  bool allowEmpty) {
23 
24  // allowEmpty does not (yet) matter here
25  (void) allowEmpty;
26 
27  // Copy the stub object over
28  srstub.vtx.x = stub.vtx.x();
29  srstub.vtx.y = stub.vtx.y();
30  srstub.vtx.z = stub.vtx.z();
31 
32  srstub.end.x = stub.end.x();
33  srstub.end.y = stub.end.y();
34  srstub.end.z = stub.end.z();
35 
36  srstub.efield_vtx = stub.efield_vtx;
37  srstub.efield_end = stub.efield_end;
38 
39  for (unsigned ip = 0; ip < stub.plane.size(); ip++) {
40  caf::SRStubPlane plane;
41  plane.p = (caf::Plane_t)stub.plane[ip].Plane;
42  plane.pitch = stub.pitch[ip];
43  plane.trkpitch = stub.trkpitch[ip];
44  plane.vtx_w = stub.vtx_w[ip];
45  plane.hit_w = stub.hit_w[ip];
46  for (unsigned ih = 0; ih < stub.hits[ip].size(); ih++) {
48  hit.charge = stub.hits[ip][ih].charge;
49  hit.wire = stub.hits[ip][ih].wire;
50  hit.ontrack = stub.hits[ip][ih].ontrack;
51 
52  plane.hits.push_back(hit);
53  }
54 
55  srstub.planes.push_back(plane);
56  }
57 
58  // If there is an overlaid PFParticle, save its ID
59  if (stubpfp) srstub.pfpid = stubpfp->Self();
60 
61  }
62 
64  uint64_t gate_start_timestamp,
65  bool use_ts0,
66  caf::SRCRTHit &srhit,
67  bool allowEmpty) {
68 
69  srhit.time = (use_ts0 ? (float)hit.ts0() : hit.ts1()) / 1000.;
70  srhit.t0 = ((long long)(hit.ts0())-(long long)(gate_start_timestamp))/1000.;
71  srhit.t1 = hit.ts1()/1000.;
72 
73  srhit.position.x = hit.x_pos;
74  srhit.position.y = hit.y_pos;
75  srhit.position.z = hit.z_pos;
76 
77  srhit.position_err.x = hit.x_err;
78  srhit.position_err.y = hit.y_err;
79  srhit.position_err.z = hit.z_err;
80 
81  srhit.pe = hit.peshit;
82  srhit.plane = hit.plane;
83 
84  }
85 
87  bool use_ts0,
88  caf::SRCRTTrack &srtrack,
89  bool allowEmpty) {
90 
91  srtrack.time = (use_ts0 ? (float)track.ts0_ns : track.ts1_ns) / 1000.;
92 
93  srtrack.hita.position.x = track.x1_pos;
94  srtrack.hita.position.y = track.y1_pos;
95  srtrack.hita.position.z = track.z1_pos;
96 
97  srtrack.hita.position_err.x = track.x1_err;
98  srtrack.hita.position_err.y = track.y1_err;
99  srtrack.hita.position_err.z = track.z1_err;
100 
101  srtrack.hita.plane = track.plane1;
102 
103  srtrack.hitb.position.x = track.x2_pos;
104  srtrack.hitb.position.y = track.y2_pos;
105  srtrack.hitb.position.z = track.z2_pos;
106 
107  srtrack.hitb.position_err.x = track.x2_err;
108  srtrack.hitb.position_err.y = track.y2_err;
109  srtrack.hitb.position_err.z = track.z2_err;
110 
111  srtrack.hitb.plane = track.plane2;
112  }
113 
114  void FillOpFlash(const recob::OpFlash &flash,
115  int cryo,
116  caf::SROpFlash &srflash,
117  bool allowEmpty) {
118 
119  srflash.setDefault();
120 
121  srflash.time = flash.Time();
122  srflash.timewidth = flash.TimeWidth();
123  srflash.cryo = cryo; // 0 in SBND, 0/1 for E/W in ICARUS
124 
125  // Sum over each wall, not very SBND-compliant
126  float sumEast = 0.;
127  float sumWest = 0.;
128  int countingOffset = 0;
129  if ( cryo == 1 ) countingOffset += 180;
130  for ( int PMT = 0 ; PMT < 180 ; PMT++ ) {
131  if ( PMT <= 89 ) sumEast += flash.PEs().at(PMT + countingOffset);
132  else sumWest += flash.PEs().at(PMT + countingOffset);
133  }
134  srflash.peperwall[0] = sumEast;
135  srflash.peperwall[1] = sumWest;
136 
137  srflash.totalpe = flash.TotalPE();
138  srflash.fasttototal = flash.FastToTotal();
139  srflash.onbeamtime = flash.OnBeamTime();
140 
141  srflash.center.SetXYZ( -9999.f, flash.YCenter(), flash.ZCenter() );
142  srflash.width.SetXYZ( -9999.f, flash.YWidth(), flash.ZWidth() );
143 
144  // Checks if ( recob::OpFlash.XCenter() != std::numeric_limits<double>::max() )
145  // See LArSoft OpFlash.h at https://nusoft.fnal.gov/larsoft/doxsvn/html/OpFlash_8h_source.html
146  if ( flash.hasXCenter() ) {
147  srflash.center.SetX( flash.XCenter() );
148  srflash.width.SetX( flash.XWidth() );
149  }
150  }
151 
152  std::vector<float> double_to_float_vector(const std::vector<double>& v)
153  {
154  std::vector<float> ret;
155  ret.reserve(v.size());
156  for(double x: v) ret.push_back(x);
157  return ret;
158  }
159 
160  //......................................................................
162  const recob::Vertex* vertex,
163  const std::vector<art::Ptr<recob::Hit>> &hits,
164  const geo::GeometryCore *geom,
165  unsigned producer,
166  caf::SRShower &srshower,
167  bool allowEmpty)
168  {
169 
170  srshower.producer = producer;
171 
172  // We need to convert the energy from MeV to GeV
173  // Also convert -999 -> -5 for consistency with other defaults in the CAFs
174  for(int i = 0; i < 3; ++i){
175  const float e = shower.Energy()[i];
176  srshower.plane[i].energy = e > 0 ? e / 1000.f : -5.f;
177  srshower.plane[i].dEdx = shower.dEdx()[i];
178  }
179 
180  srshower.dir = SRVector3D( shower.Direction() );
181  srshower.start = SRVector3D( shower.ShowerStart() );
182 
183  // TO DO: work out conversion gap
184  // It's sth like this but not quite. And will need to pass a simb::MCtruth object vtx position anyway.
185  // srshower.conversion_gap = (shower.ShowerStart() - vertex.Position()).Mag();
186 
187  if(shower.best_plane() != -999){
188  srshower.bestplane = shower.best_plane();
189  srshower.bestplane_dEdx = srshower.plane[shower.best_plane()].dEdx;
190  srshower.bestplane_energy = srshower.plane[shower.best_plane()].energy;
191  }
192 
193  if(shower.has_open_angle())
194  srshower.open_angle = shower.OpenAngle();
195  if(shower.has_length())
196  srshower.len = shower.Length();
197 
198  // We want density to be in MeV/cm so need to convert the energy back to MeV from GeV
199  if(srshower.len > std::numeric_limits<float>::epsilon() && srshower.bestplane_energy > 0)
200  srshower.density = 1000.f * srshower.bestplane_energy / srshower.len;
201 
202  if (vertex && shower.ShowerStart().Z()>-990) {
203  // Need to do some rearranging to make consistent types
204  const geo::Point_t vertexPos(vertex->position());
205  const TVector3 vertexTVec3{vertexPos.X(), vertexPos.Y(), vertexPos.Z()};
206 
207  srshower.conversion_gap = (shower.ShowerStart() - vertexTVec3).Mag();
208  }
209 
210  if (shower.Direction().Z()>-990 && shower.ShowerStart().Z()>-990 && shower.Length()>0) {
211  srshower.end = shower.ShowerStart()+ (shower.Length() * shower.Direction());
212  }
213 
214  for(int p = 0; p < 3; ++p) srshower.plane[p].nHits = 0;
215  for (auto const& hit:hits) ++srshower.plane[hit->WireID().Plane].nHits;
216 
217  for (geo::PlaneGeo const& plane: geom->IteratePlanes()) {
218 
219  const double angleToVert(geom->WireAngleToVertical(plane.View(), plane.ID()) - 0.5*M_PI);
220  const double cosgamma(std::abs(std::sin(angleToVert)*shower.Direction().Y()+std::cos(angleToVert)*shower.Direction().Z()));
221 
222  srshower.plane[plane.ID().Plane].wirePitch = plane.WirePitch()/cosgamma;
223  }
224  }
225 
226  void FillShowerRazzle(const art::Ptr<sbn::MVAPID> razzle,
227  caf::SRShower& srshower,
228  bool allowEmpty)
229  {
230  srshower.razzle.electronScore = razzle->mvaScoreMap.at(11);
231  srshower.razzle.photonScore = razzle->mvaScoreMap.at(22);
232  srshower.razzle.otherScore = razzle->mvaScoreMap.at(0);
233 
234  srshower.razzle.pdg = razzle->BestPDG();
235  srshower.razzle.bestScore = razzle->BestScore();
236  }
237 
238 
239  void FillShowerCosmicDist(const std::vector<art::Ptr<float> >& cosmicDistVec,
240  caf::SRShower& srshower)
241  {
242  if (cosmicDistVec.size() != 1)
243  return;
244  srshower.cosmicDist = *cosmicDistVec.front();
245  }
246 
247  void FillShowerResiduals(const std::vector<art::Ptr<float> >& residuals,
248  caf::SRShower& srshower)
249  {
250  for (auto const& res: residuals) {
251  srshower.selVars.showerResiduals.push_back(*res);
252  }
253  }
254 
256  caf::SRShower& srshower)
257  {
258  srshower.selVars.trackLength = trackFit.mTrackLength;
259  srshower.selVars.trackWidth = trackFit.mTrackWidth;
260  }
261 
263  caf::SRShower& srshower)
264  {
265  srshower.selVars.densityGradient = densityFit.mDensityGrad;
266  srshower.selVars.densityGradientPower = densityFit.mDensityPow;
267  }
268 
269  void FillSliceVars(const recob::Slice& slice,
270  const recob::PFParticle *primary /* can be null */,
271  unsigned producer,
272  caf::SRSlice &srslice,
273  bool allowEmpty)
274  {
275 
276  srslice.producer = producer;
277  srslice.charge = slice.Charge();
278 
279  // get the primary tracks/showers
280  if (primary != NULL) {
281  for (unsigned id: primary->Daughters()) {
282  srslice.primary.push_back(id);
283  }
284  srslice.self = primary->Self();
285  srslice.nu_pdg = primary->PdgCode();
286  }
287  else {
288  srslice.self = -1;
289  }
290  }
291 
293  caf::SRSlice &srslice,
294  bool allowEmpty)
295  {
296  // default values
297  srslice.nu_score = -1;
298  srslice.is_clear_cosmic = true;
299  srslice.nuid.setDefault();
300 
301  // collect the properties
302  if (primary_meta != NULL) {
303  auto const &properties = primary_meta->GetPropertiesMap();
304  if (properties.count("IsClearCosmic")) {
305  assert(!properties.count("IsNeutrino"));
306  srslice.is_clear_cosmic = true;
307  }
308  else {
309  assert(properties.count("IsNeutrino"));
310  srslice.is_clear_cosmic = false;
311  }
312  if (properties.count("NuScore")) {
313  srslice.nu_score = properties.at("NuScore");
314  }
315  else {
316  srslice.nu_score = -1;
317  }
318  // NeutrinoID (SliceID) features
319  CopyPropertyIfSet(properties, "NuNFinalStatePfos", srslice.nuid.nufspfos);
320  CopyPropertyIfSet(properties, "NuNHitsTotal", srslice.nuid.nutothits);
321  CopyPropertyIfSet(properties, "NuVertexY", srslice.nuid.nuvtxy);
322  CopyPropertyIfSet(properties, "NuWeightedDirZ", srslice.nuid.nuwgtdirz);
323  CopyPropertyIfSet(properties, "NuNSpacePointsInSphere", srslice.nuid.nusps);
324  CopyPropertyIfSet(properties, "NuEigenRatioInSphere", srslice.nuid.nueigen);
325  CopyPropertyIfSet(properties, "CRLongestTrackDirY", srslice.nuid.crlongtrkdiry);
326  CopyPropertyIfSet(properties, "CRLongestTrackDeflection", srslice.nuid.crlongtrkdef);
327  CopyPropertyIfSet(properties, "CRFracHitsInLongestTrack", srslice.nuid.crlongtrkhitfrac);
328  CopyPropertyIfSet(properties, "CRNHitsMax", srslice.nuid.crmaxhits);
329  }
330 
331  }
332 
333 
335  caf::SRSlice& slice,
336  bool allowEmpty) {
337  if (vertex != NULL) {
338  slice.vertex.x = vertex->position().X();
339  slice.vertex.y = vertex->position().Y();
340  slice.vertex.z = vertex->position().Z();
341  }
342  }
343 
344 
346  caf::SRSlice& slice,
347  bool allowEmpty) {
348  if (crumbs != nullptr) {
349  slice.crumbs_result.score = crumbs->score;
350  slice.crumbs_result.ccnumuscore = crumbs->ccnumuscore;
351  slice.crumbs_result.ccnuescore = crumbs->ccnuescore;
352  slice.crumbs_result.ncscore = crumbs->ncscore;
353  slice.crumbs_result.bestscore = crumbs->bestscore;
354  slice.crumbs_result.bestid = crumbs->bestid;
358  slice.crumbs_result.tpc.crnhitsmax = crumbs->tpc_CRNHitsMax;
363  slice.crumbs_result.tpc.nuvertexy = crumbs->tpc_NuVertexY;
367  slice.crumbs_result.pds.fmpe = crumbs->pds_FMPE;
368  slice.crumbs_result.pds.fmtime = crumbs->pds_FMTime;
369  slice.crumbs_result.crt.trackscore = crumbs->crt_TrackScore;
370  slice.crumbs_result.crt.hitscore = crumbs->crt_HitScore;
371  slice.crumbs_result.crt.tracktime = crumbs->crt_TrackTime;
372  slice.crumbs_result.crt.hittime = crumbs->crt_HitTime;
373  }
374  }
375 
376 
377  //......................................................................
378 
379  void FillTrackCRTHit(const std::vector<art::Ptr<anab::T0>> &t0match,
380  caf::SRTrack &srtrack,
381  bool allowEmpty)
382  {
383  if (t0match.size()) {
384  assert(t0match.size() == 1);
385  srtrack.crthit.distance = t0match[0]->fTriggerConfidence;
386  srtrack.crthit.hit.time = t0match[0]->fTime / 1e3; /* ns -> us */
387 
388  // TODO/FIXME: FILL THESE ONCE WE HAVE THE CRT HIT!!!
389  // srtrack.crthit.hit.position.x = hitmatch[0]->x_pos;
390  // srtrack.crthit.hit.position.y = hitmatch[0]->y_pos;
391  // srtrack.crthit.hit.position.z = hitmatch[0]->z_pos;
392  // srtrack.crthit.hit.position_err.x = hitmatch[0]->x_err;
393  // srtrack.crthit.hit.position_err.y = hitmatch[0]->y_err;
394  // srtrack.crthit.hit.position_err.z = hitmatch[0]->z_err;
395 
396  }
397  }
398 
399  void FillTrackCRTTrack(const std::vector<art::Ptr<anab::T0>> &t0match,
400  caf::SRTrack &srtrack,
401  bool allowEmpty)
402  {
403  if (t0match.size()) {
404  assert(t0match.size() == 1);
405  srtrack.crttrack.angle = t0match[0]->fTriggerConfidence;
406  srtrack.crttrack.time = t0match[0]->fTime / 1e3; /* ns -> us */
407 
408  // TODO/FIXME: FILL MORE ONCE WE HAVE THE CRT HIT!!!
409 
410  }
411  }
412 
414  const std::array<std::vector<art::Ptr<recob::MCSFitResult>>, 4> &mcs_results,
415  caf::SRTrack& srtrack,
416  bool allowEmpty)
417  {
418  // gather MCS fits
419  if (mcs_results[0].size()) {
420  recob::MCSFitResult mcs_fit_muon = *mcs_results[0][0];
421 
422  srtrack.mcsP.fwdP_muon = mcs_fit_muon.fwdMomentum();
423  srtrack.mcsP.fwdP_err_muon = mcs_fit_muon.fwdMomUncertainty();
424  srtrack.mcsP.bwdP_muon = mcs_fit_muon.bwdMomentum();
425  srtrack.mcsP.bwdP_err_muon = mcs_fit_muon.bwdMomUncertainty();
426  }
427 
428  if (mcs_results[1].size()) {
429  recob::MCSFitResult mcs_fit_proton = *mcs_results[1][0];
430 
431  srtrack.mcsP.fwdP_proton = mcs_fit_proton.fwdMomentum();
432  srtrack.mcsP.fwdP_err_proton = mcs_fit_proton.fwdMomUncertainty();
433  srtrack.mcsP.bwdP_proton = mcs_fit_proton.bwdMomentum();
434  srtrack.mcsP.bwdP_err_proton = mcs_fit_proton.bwdMomUncertainty();
435  }
436 
437  if (mcs_results[2].size()) {
438  recob::MCSFitResult mcs_fit_pion = *mcs_results[2][0];
439 
440  srtrack.mcsP.fwdP_pion = mcs_fit_pion.fwdMomentum();
441  srtrack.mcsP.fwdP_err_pion = mcs_fit_pion.fwdMomUncertainty();
442  srtrack.mcsP.bwdP_pion = mcs_fit_pion.bwdMomentum();
443  srtrack.mcsP.bwdP_err_pion = mcs_fit_pion.bwdMomUncertainty();
444  }
445 
446  if (mcs_results[3].size()) {
447  recob::MCSFitResult mcs_fit_kaon = *mcs_results[3][0];
448 
449  srtrack.mcsP.fwdP_kaon = mcs_fit_kaon.fwdMomentum();
450  srtrack.mcsP.fwdP_err_kaon = mcs_fit_kaon.fwdMomUncertainty();
451  srtrack.mcsP.bwdP_kaon = mcs_fit_kaon.bwdMomentum();
452  srtrack.mcsP.bwdP_err_kaon = mcs_fit_kaon.bwdMomUncertainty();
453  }
454  }
455 
457  const std::array<std::vector<art::Ptr<sbn::RangeP>>, 3> &range_results,
458  caf::SRTrack& srtrack,
459  bool allowEmpty)
460  {
461  if (range_results[0].size()) {
462  srtrack.rangeP.p_muon = range_results[0][0]->range_p;
463  assert(track.ID() == range_results[0][0]->trackID);
464  }
465 
466  if (range_results[1].size()) {
467  srtrack.rangeP.p_pion = range_results[1][0]->range_p;
468  assert(track.ID() == range_results[1][0]->trackID);
469  }
470 
471  if (range_results[2].size()) {
472  srtrack.rangeP.p_proton = range_results[2][0]->range_p;
473  assert(track.ID() == range_results[2][0]->trackID);
474  }
475  }
476 
477  void FillPlaneChi2PID(const anab::ParticleID &particle_id, caf::SRTrkChi2PID &srpid) {
478 
479  // Assign dummy values.
480 
481  srpid.chi2_muon = 0.;
482  srpid.chi2_pion = 0.;
483  srpid.chi2_kaon = 0.;
484  srpid.chi2_proton = 0.;
485  srpid.pid_ndof = 0;
486  srpid.pida = 0.;
487 
488  // Loop over algorithm scores and extract the ones we want.
489  // Get the ndof from any chi2 algorithm
490 
491  std::vector<anab::sParticleIDAlgScores> AlgScoresVec = particle_id.ParticleIDAlgScores();
492  for (size_t i_algscore=0; i_algscore<AlgScoresVec.size(); i_algscore++){
493  anab::sParticleIDAlgScores AlgScore = AlgScoresVec.at(i_algscore);
494  if (AlgScore.fAlgName == "Chi2"){
495  if (TMath::Abs(AlgScore.fAssumedPdg) == 13) { // chi2mu
496  srpid.chi2_muon = AlgScore.fValue;
497  srpid.pid_ndof = AlgScore.fNdf;
498  }
499  else if (TMath::Abs(AlgScore.fAssumedPdg) == 211) { // chi2pi
500  srpid.chi2_pion = AlgScore.fValue;
501  srpid.pid_ndof = AlgScore.fNdf;
502  }
503  else if (TMath::Abs(AlgScore.fAssumedPdg) == 321) { // chi2ka
504  srpid.chi2_kaon = AlgScore.fValue;
505  srpid.pid_ndof = AlgScore.fNdf;
506  }
507  else if (TMath::Abs(AlgScore.fAssumedPdg) == 2212) { // chi2pr
508  srpid.chi2_proton = AlgScore.fValue;
509  srpid.pid_ndof = AlgScore.fNdf;
510  }
511  }
512  else if (AlgScore.fVariableType==anab::kPIDA){
513  srpid.pida = AlgScore.fValue;
514  }
515  }
516  }
517 
518  void FillTrackChi2PID(const std::vector<art::Ptr<anab::ParticleID>> particleIDs,
519  const geo::GeometryCore *geom,
520  caf::SRTrack& srtrack,
521  bool allowEmpty)
522  {
523  // get the particle ID's
524  for (unsigned i = 0; i < particleIDs.size(); i++) {
525  const anab::ParticleID &particle_id = *particleIDs[i];
526  if (particle_id.PlaneID()) {
527  unsigned plane_id = particle_id.PlaneID().Plane;
528  assert(plane_id < 3);
529  FillPlaneChi2PID(particle_id, srtrack.chi2pid[plane_id]);
530  }
531  }
532  }
533 
535  const std::vector<art::Ptr<recob::Hit>> &hits,
536  bool fill_calo_points, float fillhit_rrstart, float fillhit_rrend,
537  const detinfo::DetectorPropertiesData &dprop,
538  caf::SRTrackCalo &srcalo) {
539 
540  // Collect info from Calorimetry
541  const std::vector<float> &dqdx = calo.dQdx();
542  const std::vector<float> &dedx = calo.dEdx();
543  const std::vector<float> &pitch = calo.TrkPitchVec();
544  const std::vector<float> &rr = calo.ResidualRange();
545  const std::vector<geo::Point_t> &xyz = calo.XYZ();
546  const std::vector<size_t> &tps = calo.TpIndices();
547 
548  srcalo.charge = 0.;
549  srcalo.ke = 0.;
550  srcalo.nhit = 0;
551 
552  float rrmax = !rr.empty() ? *std::max_element(rr.begin(), rr.end()) : 0.;
553 
554  for (unsigned i = 0; i < dedx.size(); i++) {
555  // Save the points we need to
556  if (fill_calo_points && (
557  (rrmax - rr[i]) < fillhit_rrstart || // near start
558  rr[i] < fillhit_rrend)) { // near end
559 
560  // Point information
562  p.rr = rr[i];
563  p.dqdx = dqdx[i];
564  p.dedx = dedx[i];
565  p.pitch = pitch[i];
566  p.t = dprop.ConvertXToTicks(xyz[i].x(), calo.PlaneID());
567  p.p.x = xyz[i].x();
568  p.p.y = xyz[i].y();
569  p.p.z = xyz[i].z();
570 
571  // lookup the wire -- the Calorimery object makes this
572  // __way__ harder than it should be
573  for (const art::Ptr<recob::Hit> &h: hits) {
574  if (h.key() == tps[i]) {
575  p.wire = h->WireID().Wire;
576  p.sumadc = h->SummedADC();
577  p.integral = h->Integral();
578  }
579  }
580 
581  // Save
582  srcalo.points.push_back(p);
583  }
584 
585  if (dedx[i] > 1000.) continue;
586  srcalo.nhit ++;
587  srcalo.charge += dqdx[i] * pitch[i]; // ADC
588  srcalo.ke += dedx[i] * pitch[i];
589  }
590 
591  // Sort the points by residual range hi->lo
592  std::sort(srcalo.points.begin(), srcalo.points.end(),
593  [](const caf::SRCaloPoint &lhs, const caf::SRCaloPoint &rhs) {
594  return lhs.rr > rhs.rr;
595  });
596 
597  }
598 
599  void FillTrackScatterClosestApproach(const art::Ptr<sbn::ScatterClosestApproach> closestapproach,
600  caf::SRTrack& srtrack,
601  bool allowEmpty)
602  {
603  srtrack.scatterClosestApproach.mean = closestapproach->mean;
604  srtrack.scatterClosestApproach.stdDev = closestapproach->stdDev;
605  srtrack.scatterClosestApproach.max = closestapproach->max;
606  }
607 
608  void FillTrackStoppingChi2Fit(const art::Ptr<sbn::StoppingChi2Fit> stoppingChi2,
609  caf::SRTrack& srtrack,
610  bool allowEmpty)
611  {
612  srtrack.stoppingChi2Fit.pol0Chi2 = stoppingChi2->pol0Chi2;
613  srtrack.stoppingChi2Fit.expChi2 = stoppingChi2->expChi2;
614  srtrack.stoppingChi2Fit.pol0Fit = stoppingChi2->pol0Fit;
615  }
616 
617  void FillTrackDazzle(const art::Ptr<sbn::MVAPID> dazzle,
618  caf::SRTrack& srtrack,
619  bool allowEmpty)
620  {
621  srtrack.dazzle.muonScore = dazzle->mvaScoreMap.at(13);
622  srtrack.dazzle.pionScore = dazzle->mvaScoreMap.at(211);
623  srtrack.dazzle.protonScore = dazzle->mvaScoreMap.at(2212);
624  srtrack.dazzle.otherScore = dazzle->mvaScoreMap.at(0);
625 
626  srtrack.dazzle.pdg = dazzle->BestPDG();
627  srtrack.dazzle.bestScore = dazzle->BestScore();
628  }
629 
630  void FillTrackCalo(const std::vector<art::Ptr<anab::Calorimetry>> &calos,
631  const std::vector<art::Ptr<recob::Hit>> &hits,
632  bool fill_calo_points, float fillhit_rrstart, float fillhit_rrend,
633  const geo::GeometryCore *geom, const detinfo::DetectorPropertiesData &dprop,
634  caf::SRTrack& srtrack,
635  bool allowEmpty)
636  {
637  // count up the kinetic energy on each plane --
638  // ignore any charge with a deposition > 1000 MeV/cm
639  // TODO: ignore first and last hit???
640  // assert(calos.size() == 0 || calos == 3);
641  for (unsigned i = 0; i < calos.size(); i++) {
642  const anab::Calorimetry &calo = *calos[i];
643  if (calo.PlaneID()) {
644  unsigned plane_id = calo.PlaneID().Plane;
645  assert(plane_id < 3);
646  FillTrackPlaneCalo(calo, hits, fill_calo_points, fillhit_rrstart, fillhit_rrend, dprop, srtrack.calo[plane_id]);
647  }
648  }
649 
650  // Set the plane with the most hits
651  //
652  // We expect the noise to be lowest at planes 2 -> 0 -> 1, so use this to break ties
653  caf::Plane_t bestplane = caf::kUnknown;
654  int bestnhit = -1;
655  for(int plane: {2, 0, 1}){
656  if(srtrack.calo[plane].nhit > bestnhit){
657  bestplane = caf::Plane_t(plane);
658  bestnhit = srtrack.calo[plane].nhit;
659  }
660  }
661 
662  srtrack.bestplane = bestplane;
663 
664  }
665 
666  // TODO: crt matching
667 
669  unsigned producer,
670  caf::SRTrack& srtrack,
671  bool allowEmpty)
672  {
673 
674  srtrack.producer = producer;
675  srtrack.npts = track.CountValidPoints();
676  srtrack.len = track.Length();
677  srtrack.costh = track.StartDirection().Z() / sqrt(track.StartDirection().Mag2());
678  srtrack.phi = track.StartDirection().Phi();
679 
680  srtrack.dir_end.x = track.EndDirection().X();
681  srtrack.dir_end.y = track.EndDirection().Y();
682  srtrack.dir_end.z = track.EndDirection().Z();
683 
684  srtrack.dir.x = track.StartDirection().X();
685  srtrack.dir.y = track.StartDirection().Y();
686  srtrack.dir.z = track.StartDirection().Z();
687 
688  srtrack.start.x = track.Start().X();
689  srtrack.start.y = track.Start().Y();
690  srtrack.start.z = track.Start().Z();
691 
692  srtrack.end.x = track.End().X();
693  srtrack.end.y = track.End().Y();
694  srtrack.end.z = track.End().Z();
695 
696  }
697 
698  void FillPFPVars(const recob::PFParticle &particle,
699  const recob::PFParticle *primary,
700  const larpandoraobj::PFParticleMetadata *pfpMeta,
701  caf::SRPFP& srpfp,
702  bool allowEmpty)
703  {
704  srpfp.id = particle.Self();
705  srpfp.slcID = (primary) ? primary->Self() : -1;
706 
707  // set the daughters in the particle flow
708  for (unsigned id: particle.Daughters()) {
709  srpfp.daughters.push_back(id);
710  }
711  srpfp.ndaughters = srpfp.daughters.size();
712 
713  srpfp.parent = particle.Parent();
715  || (primary && particle.Parent() == primary->Self());
716 
717  if (pfpMeta) {
718  auto const &propertiesMap (pfpMeta->GetPropertiesMap());
719  auto const &pfpTrackScoreIter(propertiesMap.find("TrackScore"));
720  srpfp.trackScore = (pfpTrackScoreIter == propertiesMap.end()) ? -5.f : pfpTrackScoreIter->second;
721 
722  // Pfo Characterisation features
723  srpfp.pfochar.setDefault();
724 
725  CopyPropertyIfSet(propertiesMap, "LArThreeDChargeFeatureTool_EndFraction", srpfp.pfochar.chgendfrac);
726  CopyPropertyIfSet(propertiesMap, "LArThreeDChargeFeatureTool_FractionalSpread", srpfp.pfochar.chgfracspread);
727  CopyPropertyIfSet(propertiesMap, "LArThreeDLinearFitFeatureTool_DiffStraightLineMean", srpfp.pfochar.linfitdiff);
728  CopyPropertyIfSet(propertiesMap, "LArThreeDLinearFitFeatureTool_Length", srpfp.pfochar.linfitlen);
729  CopyPropertyIfSet(propertiesMap, "LArThreeDLinearFitFeatureTool_MaxFitGapLength", srpfp.pfochar.linfitgaplen);
730  CopyPropertyIfSet(propertiesMap, "LArThreeDLinearFitFeatureTool_SlidingLinearFitRMS", srpfp.pfochar.linfitrms);
731  CopyPropertyIfSet(propertiesMap, "LArThreeDOpeningAngleFeatureTool_AngleDiff", srpfp.pfochar.openanglediff);
732  CopyPropertyIfSet(propertiesMap, "LArThreeDPCAFeatureTool_SecondaryPCARatio", srpfp.pfochar.pca2ratio);
733  CopyPropertyIfSet(propertiesMap, "LArThreeDPCAFeatureTool_TertiaryPCARatio", srpfp.pfochar.pca3ratio);
734  CopyPropertyIfSet(propertiesMap, "LArThreeDVertexDistanceFeatureTool_VertexDistance", srpfp.pfochar.vtxdist);
735  }
736  }
737 
739  unsigned producer,
740  const recob::SpacePoint& spacepoint,
741  const recob::PFParticle& particle,
742  caf::SRHit& srhit,
743  bool allowEmpty)
744  {
745  srhit.setDefault();
746 
747  srhit.peakTime = hit.PeakTime();
748  srhit.RMS = hit.RMS();
749 
750  srhit.peakAmplitude = hit.PeakAmplitude();
751  srhit.integral = hit.Integral();
752 
753  const geo::WireID wire = hit.WireID();
754  srhit.cryoID = wire.Cryostat;
755  srhit.tpcID = wire.TPC;
756  srhit.planeID = wire.Plane;
757  srhit.wireID = wire.Wire;
758  srhit.spacepoint.XYZ = SRVector3D (spacepoint.XYZ());
759  srhit.spacepoint.chisq = spacepoint.Chisq();
760  srhit.spacepoint.pfpID = particle.Self();
761  srhit.spacepoint.ID = spacepoint.ID();
762  }
763  //......................................................................
764 
765  void SetNuMuCCPrimary(std::vector<caf::StandardRecord> &recs,
766  std::vector<caf::SRTrueInteraction> &srneutrinos) {
767  // // set is_primary to true by default
768  // for (caf::StandardRecord &rec: recs) {
769  // rec.slc.tmatch.is_numucc_primary = true;
770  // }
771 
772  // for (unsigned i = 0; i < srneutrinos.size(); i++) {
773  // ApplyNumuCCMatching(recs, srneutrinos, i);
774  // }
775  }
776 
777  void ApplyNumuCCMatching(std::vector<caf::StandardRecord> &recs,
778  const std::vector<caf::SRTrueInteraction> &srneutrinos,
779  unsigned truth_ind) {
780 
781  // std::vector<unsigned> matches_truth;
782  // for (unsigned i = 0; i < recs.size(); i++) {
783  // if (recs[i].slc.tmatch.index == (int)truth_ind) {
784  // matches_truth.push_back(i);
785  // }
786  // }
787 
788  // // first -- remove any cases where most of the slice
789  // // matches to non-primary particles of the neutrino
790  // unsigned ind = 0;
791  // std::vector<float> matching_primary_energy;
792  // while (ind < matches_truth.size()) {
793  // const caf::SRSliceRecoBranch &reco = recs[matches_truth[ind]].reco;
794  // const caf::SRSlice &slice = recs[matches_truth[ind]].slc;
795 
796  // caf::SRVector3D vertex = slice.vertex;
797 
798  // float primary_energy = 0.;
799  // float total_energy = 0.;
800 
801  // // check the primary tracks of the slice
802  // for (const caf::SRTrack &track: reco.trk) {
803  // caf::SRVector3D start = track.start;
804  // float dist = sqrt((start.x - vertex.x) * (start.x - vertex.x) +
805  // (start.y - vertex.y) * (start.y - vertex.y) +
806  // (start.z - vertex.z) * (start.z - vertex.z));
807 
808  // if (track.parent == slice.self && dist < 10.) {
809  // for (const caf::SRTrackTruth::ParticleMatch &pmatch: track.truth.matches) {
810  // total_energy += pmatch.energy;
811  // for (unsigned i_part = 0; i_part < recs[0].true_particles.size(); i_part++) {
812  // const caf::SRTrueParticle &particle = recs[0].true_particles[i_part];
813  // if (particle.G4ID == pmatch.G4ID) {
814  // if (particle.start_process == caf::kG4primary) {
815  // primary_energy += pmatch.energy;
816  // }
817  // break;
818  // }
819  // }
820  // }
821  // }
822  // }
823  // if (primary_energy / total_energy < 0.5) {
824  // recs[matches_truth[ind]].slc.tmatch.is_numucc_primary = false;
825  // matches_truth.erase(matches_truth.begin()+ind);
826  // }
827  // else {
828  // matching_primary_energy.push_back(primary_energy);
829  // ind ++;
830  // }
831  // }
832 
833  // // less than two matches! All good
834  // if (matches_truth.size() < 2) return;
835 
836  // // If this is a numu CC interaction, break
837  // // tie by matching the muon
838  // // Whoever has a track matching closer to the
839  // // start of the muon wins
840  // if (abs(srneutrinos[truth_ind].pdg == 14) && srneutrinos[truth_ind].iscc) {
841  // const caf::SRTrueParticle &muon = srneutrinos[truth_ind].prim[0];
842  // float closest_dist = -1;
843  // int best_index = -1;
844  // for (unsigned ind = 0; ind < matches_truth.size(); ind++) {
845  // const caf::SRSliceRecoBranch &reco = recs[matches_truth[ind]].reco;
846  // const caf::SRSlice &slice = recs[matches_truth[ind]].slc;
847 
848  // caf::SRVector3D vertex = slice.vertex;
849 
850  // for (const caf::SRTrack &track: reco.trk) {
851  // caf::SRVector3D start = track.start;
852  // float dist = sqrt((start.x - vertex.x) * (start.x - vertex.x) +
853  // (start.y - vertex.y) * (start.y - vertex.y) +
854  // (start.z - vertex.z) * (start.z - vertex.z));
855 
856  // if (track.parent == slice.self && dist < 10. && track.truth.matches.size()) {
857  // const caf::SRTrackTruth::ParticleMatch &pmatch = track.truth.matches[0];
858  // if (pmatch.energy / muon.planeVisE > 0.05 && pmatch.G4ID == muon.G4ID) {
859  // caf::SRVector3D start = track.start;
860  // caf::SRVector3D end = track.end;
861  // float start_dist = sqrt((start.x - muon.start.x) * (start.x - muon.start.x) +
862  // (start.y - muon.start.y) * (start.y - muon.start.y) +
863  // (start.z - muon.start.z) * (start.z - muon.start.z));
864  // float end_dist = sqrt((end.x - muon.start.x) * (end.x - muon.start.x) +
865  // (end.y - muon.start.y) * (end.y - muon.start.y) +
866  // (end.z - muon.start.z) * (end.z - muon.start.z));
867  // float this_dist = std::min(start_dist, end_dist);
868  // if (closest_dist < 0. || this_dist < closest_dist) {
869  // closest_dist = this_dist;
870  // best_index = ind;
871  // }
872  // }
873  // }
874  // }
875  // }
876 
877  // // found a match!
878  // if (best_index >= 0) {
879  // for (unsigned i = 0; i < matches_truth.size(); i++) {
880  // if ((int)i == best_index) recs[matches_truth[i]].slc.tmatch.is_numucc_primary = true;
881  // else recs[matches_truth[i]].slc.tmatch.is_numucc_primary = false;
882  // }
883  // return;
884  // }
885  // // no match :( fallback on non numu-CC matching
886  // else {}
887  // }
888 
889  // // Otherwise, take the most energetic one
890  // unsigned best_index = std::distance(matching_primary_energy.begin(),
891  // std::max_element(matching_primary_energy.begin(), matching_primary_energy.end()));
892 
893  // for (unsigned i = 0; i < matches_truth.size(); i++) {
894  // if (i == best_index) recs[matches_truth[i]].slc.tmatch.is_numucc_primary = true;
895  // else recs[matches_truth[i]].slc.tmatch.is_numucc_primary = false;
896  // }
897  return;
898  }
899 
900  //......................................................................
901  template<class T, class U>
902  void CopyPropertyIfSet( const std::map<std::string, T>& props, const std::string& search, U& value )
903  {
904  auto it = props.find(search);
905  if ( it != props.end() ) value = it->second;
906  }
907 
908 } // end namespace
void FillHitVars(const recob::Hit &hit, unsigned producer, const recob::SpacePoint &spacepoint, const recob::PFParticle &particle, caf::SRHit &srhit, bool allowEmpty)
Definition: FillReco.cxx:738
void FillSliceVertex(const recob::Vertex *vertex, caf::SRSlice &slice, bool allowEmpty)
Definition: FillReco.cxx:334
SRVector3D position_err
Definition: SRCRTHit.h:19
int64_t ts0() const
Definition: CRTHit.hh:49
float z_err
position uncertainty in z-direction (cm).
Definition: CRTHit.hh:43
int bestplane
shower best reconstructed plane
Definition: SRShower.h:33
float integral
Hit Charge Integral [ADC].
Definition: SRTrackCalo.h:25
process_name vertex
Definition: cheaterreco.fcl:51
void FillCRTHit(const sbn::crt::CRTHit &hit, uint64_t gate_start_timestamp, bool use_ts0, caf::SRCRTHit &srhit, bool allowEmpty)
Definition: FillReco.cxx:63
float crlongtrackdefl
1 - the cosine of the angle between the starting and finishing directions of the longest track (cosmi...
SRVector3D dir
Direction of track at start.
Definition: SRTrack.h:41
void FillShowerRazzle(const art::Ptr< sbn::MVAPID > razzle, caf::SRShower &srshower, bool allowEmpty)
Definition: FillReco.cxx:226
float tpc_CRFracHitsInLongestTrack
fraction of slice’s space points in longest track (cosmic reco)
Definition: CRUMBSResult.h:29
double chisq
Definition: SRHit.h:20
float x_err
position uncertainty in x-direction (cm).
Definition: CRTHit.hh:39
double XWidth() const
Definition: OpFlash.h:114
const std::vector< size_t > & Daughters() const
Returns the collection of daughter particles.
Definition: PFParticle.h:114
const geo::PlaneID & PlaneID() const
Definition: ParticleID.h:67
float chi2_kaon
dE/dx v. residual range Chi2 (kaon hypothesis)
Definition: SRTrkChi2PID.h:21
float bwdP_muon
Momentum result from end-&gt;start fit for muon [Ge/c].
Definition: SRTrkMCS.h:28
void FillTrackCRTHit(const std::vector< art::Ptr< anab::T0 >> &t0match, caf::SRTrack &srtrack, bool allowEmpty)
Definition: FillReco.cxx:379
float crt_HitTime
the time associated with the matched CRT hit [us]
Definition: CRUMBSResult.h:46
int nu_pdg
PDG assigned to the PFParticle Neutrino.
Definition: SRSlice.h:47
A 3-vector with more efficient storage than TVector3.
Definition: SRVector3D.h:16
void FillShowerResiduals(const std::vector< art::Ptr< float > > &residuals, caf::SRShower &srshower)
Definition: FillReco.cxx:247
float tpc_CRLongestTrackDeflection
1 - the cosine of the angle between the starting and finishing directions of the longest track (cosmi...
Definition: CRUMBSResult.h:30
bool has_length() const
Returns whether the shower has a valid length.
Definition: Shower.h:211
Plane_t
Definition: SREnums.h:14
float chgendfrac
Definition: SRPFOChar.h:19
SRVector3D dir
direction cosines at the start of the shower
Definition: SRShower.h:41
void SetXYZ(float x, float y, float z)
Definition: SRVector3D.cxx:33
float fwdP_err_kaon
Error on momentum from start-&gt;end fit for kaon [GeV/c].
Definition: SRTrkMCS.h:25
void FillSliceVars(const recob::Slice &slice, const recob::PFParticle *primary, unsigned producer, caf::SRSlice &srslice, bool allowEmpty)
Definition: FillReco.cxx:269
double FastToTotal() const
Definition: OpFlash.h:119
size_t Self() const
Returns the index of this particle.
Definition: PFParticle.h:92
float bwdP_err_proton
Error on momentum from end-&gt;start fit for proton [GeV/c].
Definition: SRTrkMCS.h:36
IteratorBox< plane_iterator,&GeometryCore::begin_plane,&GeometryCore::end_plane > IteratePlanes() const
Enables ranged-for loops on all planes of the detector.
float ccnuescore
CRUMBS result, for CCNuE signal.
process_name opflash particleana ie x
std::vector< geo::PlaneID > plane
The plane ID.
Definition: Stub.h:25
void FillTrackRangeP(const recob::Track &track, const std::array< std::vector< art::Ptr< sbn::RangeP >>, 3 > &range_results, caf::SRTrack &srtrack, bool allowEmpty)
Definition: FillReco.cxx:456
double TimeWidth() const
Definition: OpFlash.h:107
int plane
Name of the CRT wall (in the form of numbers).
Definition: CRTHit.hh:36
#define PMT
Definition: NestAlg.cxx:19
float pitch
Pitch of the stub on each wire [cm].
Definition: SRStub.h:32
float wirePitch
Wire pitch corrected for the angle of the shower for this plane [cm].
Definition: SRShower.h:23
void SetX(float _x)
Definition: SRVector3D.h:32
static constexpr size_t kPFParticlePrimary
Define index to signify primary particle.
Definition: PFParticle.h:61
bool parent_is_primary
If this is a primary daughter of a neutrino/cosmic.
Definition: SRPFP.h:23
SRCRTHit hit
The CRT hit.
Definition: SRCRTHitMatch.h:19
float peshit
Total photo-electron (PE) in a crt hit.
Definition: CRTHit.hh:27
float bwdMomentum() const
momentum value from fit assuming a backward track direction
Definition: MCSFitResult.h:38
geo::WireID WireID() const
Definition: Hit.h:233
float peakTime
Definition: SRHit.h:32
float RMS() const
RMS of the hit shape, in tick units.
Definition: Hit.h:220
float nuwgtdirz
NuWeightedDirZ feature in NeutrinoID.
Definition: SRNuID.h:22
float nufspfos
NuNFinalStatePfos feature in NeutrinoID.
Definition: SRNuID.h:19
float y_err
position uncertainty in y-direction (cm).
Definition: CRTHit.hh:41
const TVector3 & Direction() const
Definition: Shower.h:189
int tpc_NuNHitsTotal
the total number of space points (nu reco)
Definition: CRUMBSResult.h:35
int pfpid
PFP ID of an object that &quot;overlays&quot; the stub. -1 if there is no such object.
Definition: SRStub.h:51
float fmtime
the time associated with the flash [us]
float score
CRUMBS result, for inclusive neutrino signal.
float dEdx
shower calculated dEdx for this plane [MeV/cm]
Definition: SRShower.h:20
int plane
Plane that the CRT hit is on.
Definition: SRCRTHit.h:24
void FillShowerDensityFit(const sbn::ShowerDensityFit &densityFit, caf::SRShower &srshower)
Definition: FillReco.cxx:262
float densityGradient
Constant in the density gradient fit.
pdgs p
Definition: selectors.fcl:22
bool has_open_angle() const
Returns whether the shower has a valid opening angle.
Definition: Shower.h:210
std::vector< std::vector< StubHit > > hits
Hits on each plane. Ordered vtx-&gt;end.
Definition: Stub.h:32
float fwdMomUncertainty() const
momentum uncertainty from fit assuming a forward track direction
Definition: MCSFitResult.h:32
const std::vector< double > & dEdx() const
Definition: Shower.h:203
SRVector3D width
Geometric width in &lt;x,y,z&gt; [cm].
Definition: SROpFlash.h:34
geo::Point_t end
End of Stub. Space charge corrected. [cm].
Definition: Stub.h:19
SRVector3D vertex
Candidate neutrino vertex in local detector coordinates [cm].
Definition: SRSlice.h:34
int parent
ID of parent particle of this pfp.
Definition: SRPFP.h:22
SRVector3D p
Position of deposition [cm].
Definition: SRTrackCalo.h:24
float ncscore
CRUMBS result, for NC signal.
Definition: CRUMBSResult.h:26
int bestid
ID corresponding to the best score, 14 for CCNuMu, 12 for CCNuE, 1 for NC.
Definition: CRUMBSResult.h:28
unsigned producer
Definition: SRSlice.h:31
const geo::PlaneID & PlaneID() const
Definition: Calorimetry.h:116
float density
shower density [MeV/cm]
Definition: SRShower.h:37
int nufinalstatepfos
the number of final state pfos (nu reco)
int best_plane() const
Definition: Shower.h:200
Double32_t Chisq() const
Definition: SpacePoint.h:78
float crlongtrackhitfrac
fraction of slice’s space points in longest track (cosmic reco)
float distance
Distance from the projected TPC track to the CRT hit [cm].
Definition: SRCRTHitMatch.h:20
float bestplane_dEdx
shower dEdx at best plane [MeV/cm]
Definition: SRShower.h:34
int slcID
Definition: SRPFP.h:28
const std::vector< Point_t > & XYZ() const
Definition: Calorimetry.h:114
short hit_w
Wire of the end-point-hit.
Definition: SRStub.h:35
float sumadc
Hit Charge SummedADC [ADC].
Definition: SRTrackCalo.h:26
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:212
float x1_pos
X position of first CRTHit.
Definition: CRTTrack.hh:33
std::size_t size(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:561
process_name crumbs
float chi2_proton
dE/dx v. residual range Chi2 (proton hypothesis)
Definition: SRTrkChi2PID.h:22
void FillTrackCalo(const std::vector< art::Ptr< anab::Calorimetry >> &calos, const std::vector< art::Ptr< recob::Hit >> &hits, bool fill_calo_points, float fillhit_rrstart, float fillhit_rrend, const geo::GeometryCore *geom, const detinfo::DetectorPropertiesData &dprop, caf::SRTrack &srtrack, bool allowEmpty)
Definition: FillReco.cxx:630
int PdgCode() const
Return the type of particle as a PDG ID.
Definition: PFParticle.h:83
float Integral() const
Integral under the calibrated signal waveform of the hit, in tick x ADC units.
Definition: Hit.h:224
void FillTrackScatterClosestApproach(const art::Ptr< sbn::ScatterClosestApproach > closestapproach, caf::SRTrack &srtrack, bool allowEmpty)
Definition: FillReco.cxx:599
WireID_t Wire
Index of the wire within its plane.
Definition: geo_types.h:580
process_name use argoneut_mc_hitfinder track
float pca3ratio
Definition: SRPFOChar.h:27
float linfitgaplen
Definition: SRPFOChar.h:23
std::vector< SRStubPlane > planes
Definition: SRStub.h:47
float bwdP_pion
Momentum result from end-&gt;start fit for pion [Ge/c].
Definition: SRTrkMCS.h:29
process_name hit
Definition: cheaterreco.fcl:51
float fValue
Result of Particle ID algorithm/test.
Definition: ParticleID.h:28
float totalpe
Total number of PE across all PMTs.
Definition: SROpFlash.h:29
void FillShowerVars(const recob::Shower &shower, const recob::Vertex *vertex, const std::vector< art::Ptr< recob::Hit >> &hits, const geo::GeometryCore *geom, unsigned producer, caf::SRShower &srshower, bool allowEmpty)
Definition: FillReco.cxx:161
float y1_err
Y position error of first CRTHit.
Definition: CRTTrack.hh:36
void FillStubVars(const sbn::Stub &stub, const art::Ptr< recob::PFParticle > stubpfp, caf::SRStub &srstub, bool allowEmpty)
Definition: FillReco.cxx:19
Optical Flash – a summary of multiple optical hits that have been determined to be associated...
Definition: SROpFlash.h:16
void setDefault()
Definition: SRNuID.cxx:14
SRTrkChi2PID chi2pid[3]
Per-plane Chi2 Particle ID.
Definition: SRTrack.h:47
int wireID
Definition: SRHit.h:42
float hittime
the time associated with the matched CRT hit [us]
SRShowerPlaneInfo plane[3]
Definition: SRShower.h:40
float pida
PIDA.
Definition: SRTrkChi2PID.h:24
short wire
Wire number of the hit.
Definition: SRStub.h:22
float ccnumuscore
CRUMBS result, for CCNuMu signal.
SRTrackDazzle dazzle
Results from the track PID MVA.
Definition: SRTrack.h:61
SRCRTTrackMatch crttrack
CRT Track match.
Definition: SRTrack.h:56
float tpc_NuEigenRatioInSphere
the ratio between the first and second eigenvalues from a PCA of spacepoints within 10cm of the verte...
Definition: CRUMBSResult.h:33
process_name shower
Definition: cheaterreco.fcl:51
geo::Point_t vtx
Interaction Vertex / Start of Stub. Space charge corrected. [cm].
Definition: Stub.h:18
Definition of vertex object for LArSoft.
Definition: Vertex.h:35
float fwdP_proton
Momentum from start-&gt;end fit for proton [GeV/c].
Definition: SRTrkMCS.h:21
float RMS
Definition: SRHit.h:34
float bwdP_kaon
Momentum result from end-&gt;start fit for kaon [Ge/c].
Definition: SRTrkMCS.h:30
float cosmicDist
Distance of closest approach to cosmic ray [cm].
Definition: SRShower.h:44
float crlongtrkhitfrac
CRFracHitsInLongestTrack feature in NeutrinoID.
Definition: SRNuID.h:27
float hitscore
the best distance from an extrapolated TPC track to a CRT hit [cm]
float fmpe
the total number of photoelectrons in the associated flash
float pds_FMTotalScore
the total flash match score
Definition: CRUMBSResult.h:40
float ccnumuscore
CRUMBS result, for CCNuMu signal.
Definition: CRUMBSResult.h:24
unsigned int ndaughters
Number of daughters.
Definition: SRPFP.h:19
float fmtotalscore
the total flash match score
bool hasXCenter() const
Returns whether the estimated center on x direction is available.
Definition: OpFlash.h:112
float score
CRUMBS result, for inclusive neutrino signal.
Definition: CRUMBSResult.h:23
Representation of a rb::Hit, knows hit amplitude and integral, geometric IDs, and time...
Definition: SRHit.h:27
double Length() const
Definition: Shower.h:201
int planeID
Definition: SRHit.h:41
float open_angle
shower opening angle [rad]
Definition: SRShower.h:39
void FillTrackCRTTrack(const std::vector< art::Ptr< anab::T0 >> &t0match, caf::SRTrack &srtrack, bool allowEmpty)
Definition: FillReco.cxx:399
float PeakAmplitude() const
The estimated amplitude of the hit at its peak, in ADC units.
Definition: Hit.h:221
unsigned short npts
number of points (recob Track.NPoints)
Definition: SRTrack.h:37
std::vector< float > vtx_w
Wire coordinate of the vertex on this plane.
Definition: Stub.h:29
const std::vector< float > & ResidualRange() const
Definition: Calorimetry.h:103
int bestid
ID corresponding to the bestscore, 14 for CCNuMu, 12 for CCNuE, 1 for NC.
float tpc_NuVertexY
the vertex position in Y (nu reco) [cm]
Definition: CRUMBSResult.h:37
SRNuID nuid
Neutrino ID Features (BDT inputs) going into nu_score calculation.
Definition: SRSlice.h:51
int self
ID of the particle representing this slice.
Definition: SRSlice.h:54
float peakAmplitude
Definition: SRHit.h:36
std::string fAlgName
&lt; determined particle ID
Definition: ParticleID.h:23
bool SelectSlice(const caf::SRSlice &slice, bool cut_clear_cosmic)
Definition: FillReco.cxx:14
while getopts h
float timewidth
Width of the flash in time [us].
Definition: SROpFlash.h:25
float phi
Angle of the start direction of the track in the x-y plane.
Definition: SRTrack.h:40
float z_pos
position in z-direction (cm).
Definition: CRTHit.hh:42
double ZCenter() const
Definition: OpFlash.h:117
process_name can override from command line with o or output calo
Definition: pid.fcl:40
float pds_FMTime
the time associated with the flash [us]
Definition: CRUMBSResult.h:42
unsigned int CountValidPoints() const
float dqdx
dE/dx [MeV/cm]
Definition: SRTrackCalo.h:20
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
int fNdf
Number of degrees of freedom used by algorithm, if applicable. Set to -9999 by default.
Definition: ParticleID.h:26
caf::Plane_t p
Plane number.
Definition: SRStub.h:31
int cryoID
Definition: SRHit.h:39
T abs(T value)
float t1
Relatvie time w.r.t. beam early warning (from T1 module) [us].
Definition: SRCRTHit.h:22
int nutothits
NuNHitsTotal feature in NeutrinoID.
Definition: SRNuID.h:20
float fwdP_pion
Momentum from start-&gt;end fit for pion [GeV/c].
Definition: SRTrkMCS.h:19
void setDefault()
Definition: SROpFlash.cxx:17
float crt_TrackTime
the time associated with the matched CRT track [us]
Definition: CRUMBSResult.h:45
float rr
Residual Range [cm].
Definition: SRTrackCalo.h:19
float z1_err
Z position error of first CRTHit.
Definition: CRTTrack.hh:38
float bestscore
Best score from the three signal-specific versions.
double Time() const
Definition: OpFlash.h:106
float nu_score
Score of how neutrino-like the slice is according to pandora.
Definition: SRSlice.h:48
float charge
Deposited charge as seen by wireplane (pre recombination and electric lifetime corrections) [ADC]...
Definition: SRTrackCalo.h:41
kVariableType fVariableType
Variable type enum: defined in ParticleID_VariableTypeEnums.h. Set to kNotSet by default.
Definition: ParticleID.h:24
int tpc_CRNHitsMax
the number of space points in the largest pfp
Definition: CRUMBSResult.h:32
void FillTrackVars(const recob::Track &track, unsigned producer, caf::SRTrack &srtrack, bool allowEmpty)
Definition: FillReco.cxx:668
float y2_err
Y position error of second CRTHit.
Definition: CRTTrack.hh:42
Vector_t StartDirection() const
Access to track direction at different points.
void FillShowerTrackFit(const sbn::ShowerTrackFit &trackFit, caf::SRShower &srshower)
Definition: FillReco.cxx:255
float p_pion
momentum estimate from trk range (pion hypothesis)
Definition: SRTrkRange.h:18
const std::vector< anab::sParticleIDAlgScores > & ParticleIDAlgScores() const
Definition: ParticleID.h:65
double Length(size_t p=0) const
Access to various track properties.
void FillSliceCRUMBS(const sbn::CRUMBSResult *crumbs, caf::SRSlice &slice, bool allowEmpty)
Definition: FillReco.cxx:345
float bwdP_err_muon
Error on momentum from end-&gt;start fit for muon [GeV/c].
Definition: SRTrkMCS.h:33
then echo ***************************************echo array
Definition: find_fhicl.sh:28
float fasttototal
Fast to total light ratio.
Definition: SROpFlash.h:30
void FillTrackChi2PID(const std::vector< art::Ptr< anab::ParticleID >> particleIDs, const geo::GeometryCore *geom, caf::SRTrack &srtrack, bool allowEmpty)
Definition: FillReco.cxx:518
const std::vector< float > & dQdx() const
Definition: Calorimetry.h:102
float chi2_pion
dE/dx v. residual range Chi2 (pion hypothesis)
Definition: SRTrkChi2PID.h:20
double ts1_ns
Average T1 (nanosecond) of the two hits making the track.
Definition: CRTTrack.hh:28
Metadata associated to PFParticles.
float pds_FMPE
the total number of photoelectrons in the associated flash
Definition: CRUMBSResult.h:41
void ApplyNumuCCMatching(std::vector< caf::StandardRecord > &recs, const std::vector< caf::SRTrueInteraction > &srneutrinos, unsigned truth_ind)
Definition: FillReco.cxx:777
int OnBeamTime() const
Definition: OpFlash.h:123
Point_t const & Start() const
Access to track position at different points.
int pid_ndof
Number of degress of freedom in Chi2 PID fit.
Definition: SRTrkChi2PID.h:18
std::vector< size_t > primary
ID&#39;s of primary tracks and showers in slice.
Definition: SRSlice.h:53
bool ontrack
Whether this hit is also on an overlaid track.
Definition: SRStub.h:23
SRVector3D center
Geometric center in &lt;x,y,z&gt; [cm].
Definition: SROpFlash.h:33
float fwdP_muon
Momentum from start-&gt;end fit for muon [GeV/c].
Definition: SRTrkMCS.h:18
bool is_clear_cosmic
Whether pandora marks the slice as a &quot;clear&quot; cosmic.
Definition: SRSlice.h:46
size_t Parent() const
Definition: PFParticle.h:96
double OpenAngle() const
Definition: Shower.h:202
float crt_HitScore
the best distance from an extrapolated TPC track to a CRT hit [cm]
Definition: CRUMBSResult.h:44
float nusphereeigenratio
the ratio between the first and second eigenvalues from a PCA of spacepoints within 10cm of the verte...
SRVector3D XYZ
Definition: SRHit.h:19
std::vector< short > hit_w
Wire of the end point hit on this plane.
Definition: Stub.h:30
for($it=0;$it< $RaceTrack_number;$it++)
SRSpacePoint spacepoint
Definition: SRHit.h:44
SRCRUMBSCRTVars crt
CRT input variables.
int crmaxhits
CRNHitsMax feature in NeutrinoID.
Definition: SRNuID.h:28
float vtxdist
Definition: SRPFOChar.h:28
float linfitlen
Definition: SRPFOChar.h:22
std::vector< SRCaloPoint > points
Information saved per-point.
Definition: SRTrackCalo.h:42
float costh
Costh of start direction of track.
Definition: SRTrack.h:39
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
Definition: PlaneGeo.h:82
const PropertiesMap & GetPropertiesMap() const
SRTrackScatterClosestApproach scatterClosestApproach
Scattering variables relating to spread about interpolated track.
Definition: SRTrack.h:59
float bwdP_err_kaon
Error on momentum from end-&gt;start fit for kaon [GeV/c].
Definition: SRTrkMCS.h:35
unsigned int nHits
Number of hits associated to the shower for this plane.
Definition: SRShower.h:22
Track PID from dE/dx v. residual range Chi2.
Definition: SRTrkChi2PID.h:10
SRVector3D start
Start point of track.
Definition: SRTrack.h:43
SRTrkMCS mcsP
Definition: SRTrack.h:51
void FillTrackStoppingChi2Fit(const art::Ptr< sbn::StoppingChi2Fit > stoppingChi2, caf::SRTrack &srtrack, bool allowEmpty)
Definition: FillReco.cxx:608
double ConvertXToTicks(double X, int p, int t, int c) const
float trackscore
a combination of the DCA and angle between the best matched TPC &amp; CRT tracks
double ts0_ns
Average T0 (nanosecond) of the two hits making the track.
Definition: CRTTrack.hh:26
std::vector< float > showerResiduals
Vector of residuals, size (sliceShowers-1) [cm].
SRCRUMBSResult crumbs_result
Score of how neutrino-like the slice is according to the CRUMBS ID.
Definition: SRSlice.h:49
float time
Combined time of CRT Track.
Definition: SRCRTTrack.h:20
const Double32_t * XYZ() const
Definition: SpacePoint.h:76
int nuspherespacepoints
the total number of space points within 10cm of the vertex (nu reco)
float dedx
dQ/dx [ADC/cm] – pre calibration and electron lifetime correction
Definition: SRTrackCalo.h:21
int tpcID
Definition: SRHit.h:40
SRVector3D end
End point of track.
Definition: SRTrack.h:44
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:493
j template void())
Definition: json.hpp:3108
Description of geometry of one entire detector.
SRVector3D start
shower start point in detector coordinates [cm]
Definition: SRShower.h:42
An SRSlice contains overarching information for a slice.
Definition: SRSlice.h:24
A hit from the CRT.
Definition: SRCRTHit.h:12
void FillCRTTrack(const sbn::crt::CRTTrack &track, bool use_ts0, caf::SRCRTTrack &srtrack, bool allowEmpty)
Definition: FillReco.cxx:86
float vtx_w
Wire coordinate of vertex on this plane (not space charge corrected).
Definition: SRStub.h:34
float trackWidth
Width of fitted track (Average redidual) [cm].
int cryo
0 for SBND/ICARUS East, 1 for ICARUS West.
Definition: SROpFlash.h:22
void FillTrackPlaneCalo(const anab::Calorimetry &calo, const std::vector< art::Ptr< recob::Hit >> &hits, bool fill_calo_points, float fillhit_rrstart, float fillhit_rrend, const detinfo::DetectorPropertiesData &dprop, caf::SRTrackCalo &srcalo)
Definition: FillReco.cxx:534
float trackScore
The MVA score that determines how track/shower like a PFP is.
Definition: SRPFP.h:25
float efield_end
The E-Field at the stub end point.
Definition: Stub.h:21
float pe
Definition: SRCRTHit.h:23
Calorimetry information.
Definition: SRTrackCalo.h:32
float t0
Hit time (from absolute time T0) relative to the gate start time [us].
Definition: SRCRTHit.h:21
float bwdP_err_pion
Error on momentum from end-&gt;start fit for pion [GeV/c].
Definition: SRTrkMCS.h:34
float efield_vtx
The E-Field at the reconstructed vertex.
Definition: Stub.h:22
float openanglediff
Definition: SRPFOChar.h:25
SRCRUMBSTPCVars tpc
TPC input variables.
float pca2ratio
Definition: SRPFOChar.h:26
bool onbeamtime
Is this in time with beam?
Definition: SROpFlash.h:21
float integral
Definition: SRHit.h:37
float nusps
NuNSpacePointsInSphere feature in NeutrinoID.
Definition: SRNuID.h:23
float trkpitch
Pitch of the overlaid track on each wire [cm].
Definition: SRStub.h:33
Class storing the result of the Maximum Likelihood fit of Multiple Coulomb Scattering angles between ...
Definition: MCSFitResult.h:19
const std::vector< float > & dEdx() const
Definition: Calorimetry.h:101
SRShowerRazzle razzle
Results from the shower PID MVA.
Definition: SRShower.h:48
float z1_pos
Z position of first CRTHit.
Definition: CRTTrack.hh:37
void FillOpFlash(const recob::OpFlash &flash, int cryo, caf::SROpFlash &srflash, bool allowEmpty)
Definition: FillReco.cxx:114
float ncscore
CRUMBS result, for NC signal.
float p_muon
momentum estimate from trk range (muon hypothesis)
Definition: SRTrkRange.h:17
float time
Definition: SRCRTHit.h:20
float y_pos
position in y-direction (cm).
Definition: CRTHit.hh:40
float charge
Calorimetric energy.
Definition: SRSlice.h:33
float tpc_NuWeightedDirZ
the Z component of the space-point weighted direction of the final state pfos (nu reco) ...
Definition: CRUMBSResult.h:38
float fwdP_err_pion
Error on momentum from start-&gt;end fit for pion [GeV/c].
Definition: SRTrkMCS.h:24
SRPFOChar pfochar
The MVA inputs (features) in determination of the track score (PFO Characterisation) ...
Definition: SRPFP.h:26
float angle
Relative angle between the TPC track and CRT track [rad].
double YWidth() const
Definition: OpFlash.h:116
float bwdP_proton
Momentum result from end-&gt;start fit for proton [Ge/c].
Definition: SRTrkMCS.h:31
std::vector< double > const & PEs() const
Returns a vector with a number of photoelectrons per channel.
Definition: OpFlash.h:111
void FillSliceMetadata(const larpandoraobj::PFParticleMetadata *primary_meta, caf::SRSlice &srslice, bool allowEmpty)
Definition: FillReco.cxx:292
float chgfracspread
Definition: SRPFOChar.h:20
float ke
Kinetic energy deposited on this plane [GeV].
Definition: SRTrackCalo.h:40
SRCRTHit hita
First hit in CRT track.
Definition: SRCRTTrack.h:18
SRTrackCalo calo[3]
Per-plane Calorimetry information.
Definition: SRTrack.h:48
ID_t ID() const
Definition: SpacePoint.h:75
float PeakTime() const
Time of the signal peak, in tick units.
Definition: Hit.h:218
float len
track length [cm]
Definition: SRTrack.h:38
const std::vector< size_t > & TpIndices() const
Definition: Calorimetry.h:115
const std::vector< float > & TrkPitchVec() const
Definition: Calorimetry.h:107
float bwdMomUncertainty() const
momentum uncertainty from fit assuming a backward track direction
Definition: MCSFitResult.h:41
float tpc_CRLongestTrackDirY
relative direction of the longest track in Y (cosmic reco)
Definition: CRUMBSResult.h:31
Hierarchical representation of particle flow.
Definition: PFParticle.h:44
float trackLength
Lenth of fitted track [cm].
void setDefault()
Definition: SRPFOChar.cxx:14
void CopyPropertyIfSet(const std::map< std::string, T > &props, const std::string &search, U &value)
Definition: FillReco.cxx:902
SRTrackStoppingChi2Fit stoppingChi2Fit
Fit results from Pol0 and Exp to dEdx vs res. range.
Definition: SRTrack.h:60
int plane1
Plane ID of first CRTHit.
Definition: CRTTrack.hh:30
SRVector3D dir_end
Direction of track at end.
Definition: SRTrack.h:42
SRVector3D end
End position of stub [cm].
Definition: SRStub.h:45
SRVector3D end
shower end point (start+len*dir) in detector coordinates [cm]
Definition: SRShower.h:43
void FillPFPVars(const recob::PFParticle &particle, const recob::PFParticle *primary, const larpandoraobj::PFParticleMetadata *pfpMeta, caf::SRPFP &srpfp, bool allowEmpty)
Definition: FillReco.cxx:698
unsigned producer
Index of the producer that produced this object. In ICARUS, this is the same as the cryostat...
Definition: SRTrack.h:36
void FillTrackDazzle(const art::Ptr< sbn::MVAPID > dazzle, caf::SRTrack &srtrack, bool allowEmpty)
Definition: FillReco.cxx:617
float z2_pos
Z position of second CRTHit.
Definition: CRTTrack.hh:43
float x_pos
position in x-direction (cm).
Definition: CRTHit.hh:38
float bestscore
Best score from the three signal-specific versions.
Definition: CRUMBSResult.h:27
float charge
Calibrated and electron-lifetime-corrected charge [#elec].
Definition: SRStub.h:21
Vector_t EndDirection() const
float crlongtrkdef
CRLongestTrackDeflection feature in NeutrinoID.
Definition: SRNuID.h:26
int64_t ts1() const
Definition: CRTHit.hh:50
int nutotalhits
the total number of space points (nu reco)
SRVector3D position
Definition: SRCRTHit.h:18
float y2_pos
Y position of second CRTHit.
Definition: CRTTrack.hh:41
float chi2_muon
dE/dx v. residual range Chi2 (muon hypothesis)
Definition: SRTrkChi2PID.h:19
std::vector< SRStubHit > hits
List of all the hits on this plane.
Definition: SRStub.h:36
float y1_pos
Y position of first CRTHit.
Definition: CRTTrack.hh:35
SRCRTHit hitb
Second git in CRT Track.
Definition: SRCRTTrack.h:19
SRCRTHitMatch crthit
CRT Hit match.
Definition: SRTrack.h:55
float densityGradientPower
Power in the density gradient fit.
const std::vector< double > & Energy() const
Definition: Shower.h:195
void FillShowerCosmicDist(const std::vector< art::Ptr< float > > &cosmicDistVec, caf::SRShower &srshower)
Definition: FillReco.cxx:239
SRTrkRange rangeP
Definition: SRTrack.h:52
float efield_end
Electric field at the end position of the stub [kV/cm].
Definition: SRStub.h:49
int tpc_NuNFinalStatePfos
the number of final state pfos (nu reco)
Definition: CRUMBSResult.h:34
int id
ID of this pfp (taken from the pandora particle &quot;ID&quot; of this PFP)
Definition: SRPFP.h:18
do i e
void setDefault()
Definition: SRHit.cxx:20
float bestplane_energy
shower energy at best plane [GeV]
Definition: SRShower.h:35
float fwdP_kaon
Momentum from start-&gt;end fit for kaon [GeV/c].
Definition: SRTrkMCS.h:20
float nuvtxy
NuVertexY feature in NeutrinoID.
Definition: SRNuID.h:21
void SetNuMuCCPrimary(std::vector< caf::StandardRecord > &recs, std::vector< caf::SRTrueInteraction > &srneutrinos)
Definition: FillReco.cxx:765
const TVector3 & ShowerStart() const
Definition: Shower.h:192
unsigned producer
Index of the producer that produced this object. In ICARUS, this is the same as the cryostat...
Definition: SRShower.h:52
float tpc_StoppingChi2CosmicRatio
a ratio of chi2 values intended to find Bragg peaks in stopping muon tracks
Definition: CRUMBSResult.h:39
Point_t const & End() const
float x2_pos
X position of second CRTHit.
Definition: CRTTrack.hh:39
float crlongtrkdiry
CRLongestTrackDirY feature in NeutrinoID.
Definition: SRNuID.h:25
float nuwgtdirz
the Z component of the space-point weighted direction of the final state pfos (nu reco) ...
float time
Time of the CRT Track [us].
float crt_TrackScore
a combination of the DCA and angle between the best matched TPC &amp; CRT tracks
Definition: CRUMBSResult.h:43
float conversion_gap
shower start and vertex position difference [cm]
Definition: SRShower.h:36
float ccnuescore
CRUMBS result, for CCNuE signal.
Definition: CRUMBSResult.h:25
temporary value
std::vector< float > trkpitch
Pitch of the matched track on each wire [cm].
Definition: Stub.h:28
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:48
float tracktime
the time associated with the matched CRT track [us]
double TotalPE() const
Definition: OpFlash.cxx:68
SRCRUMBSPDSVars pds
PDS input variables.
int tpc_NuNSpacePointsInSphere
the total number of space points within 10cm of the vertex (nu reco)
Definition: CRUMBSResult.h:36
float fwdMomentum() const
momentum value from fit assuming a forward track direction
Definition: MCSFitResult.h:29
float p_proton
momentum estimate from trk range (proton hypothesis)
Definition: SRTrkRange.h:19
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:406
Definition: Stub.h:16
double XCenter() const
Returns the estimated center on x direction (.
Definition: OpFlash.h:113
float t
Time of deposition [ticks].
Definition: SRTrackCalo.h:23
int nhit
Number of hits on this plane counted in the calorimetry.
Definition: SRTrackCalo.h:39
float x1_err
X position error of first CRTHit.
Definition: CRTTrack.hh:34
std::vector< float > double_to_float_vector(const std::vector< double > &v)
Definition: FillReco.cxx:152
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:184
std::vector< float > pitch
Pitch of stub on each wire [cm].
Definition: Stub.h:27
double YCenter() const
Definition: OpFlash.h:115
float fwdP_err_proton
Error on momentum from start-&gt;end fit for proton [GeV/c].
Definition: SRTrkMCS.h:26
float energy
shower calculated energy for this plane [GeV]
Definition: SRShower.h:21
float len
shower length [cm]
Definition: SRShower.h:38
int plane2
Plane ID of second CRTHit.
Definition: CRTTrack.hh:31
SRVector3D vtx
Vertex/start position of stub [cm].
Definition: SRStub.h:44
float fwdP_err_muon
Error on momentum from start-&gt;end fit for muon [GeV/c].
Definition: SRTrkMCS.h:23
float z2_err
Z position error of second CRTHit.
Definition: CRTTrack.hh:44
float peperwall[2]
Definition: SROpFlash.h:31
float nuvertexy
the vertex position in Y (nu reco) [cm]
float x2_err
X position error of second CRTHit.
Definition: CRTTrack.hh:40
Plane_t bestplane
Plane index with the most hits. -1 if no calorimetry.
Definition: SRTrack.h:49
float efield_vtx
Electric field at the vertex position of the stub [kV/cm].
Definition: SRStub.h:48
double WireAngleToVertical(geo::View_t view, geo::TPCID const &tpcid) const
Returns the angle of the wires in the specified view from vertical.
const Point_t & position() const
Return vertex 3D position.
Definition: Vertex.h:60
float stoppingchi2ratio
a ratio of chi2 values intended to find Bragg peaks in stopping muon tracks
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a &quot;fitted&quot; track:
float pitch
Track pitch [cm].
Definition: SRTrackCalo.h:22
Representation of a rb::PFParticle, with hierarchy and Pandora metadata.
Definition: SRPFP.h:13
float linfitdiff
Definition: SRPFOChar.h:21
float crlongtrackdiry
relative direction of the longest track in Y (cosmic reco)
void FillPlaneChi2PID(const anab::ParticleID &particle_id, caf::SRTrkChi2PID &srpid)
Definition: FillReco.cxx:477
int fAssumedPdg
PDG of particle hypothesis assumed by algorithm, if applicable. Set to 0 by default.
Definition: ParticleID.h:27
double ZWidth() const
Definition: OpFlash.h:118
void FillTrackMCS(const recob::Track &track, const std::array< std::vector< art::Ptr< recob::MCSFitResult >>, 4 > &mcs_results, caf::SRTrack &srtrack, bool allowEmpty)
Definition: FillReco.cxx:413
short wire
Wire of Calo-Point.
Definition: SRTrackCalo.h:27
float linfitrms
Definition: SRPFOChar.h:24
int crnhitsmax
the number of space points in the largest pfp
std::vector< int > daughters
ID&#39;s of daughters of this pfp.
Definition: SRPFP.h:20
float time
Time on trigger time scale [us].
Definition: SROpFlash.h:24
float nueigen
NuEigenRatioInSphere feature in NeutrinoID.
Definition: SRNuID.h:24
SRShowerSelection selVars
Definition: SRShower.h:49