Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
bpfit::BreakPoint Class Reference
Inheritance diagram for bpfit::BreakPoint:
art::EDProducer art::detail::Producer art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Public Types

using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
template<typename UserConfig , typename KeysToIgnore = void>
using Table = Modifier::Table< UserConfig, KeysToIgnore >
 

Public Member Functions

void reconfigure (fhicl::ParameterSet const &p)
 
 BreakPoint (fhicl::ParameterSet const &p)
 
virtual ~BreakPoint ()
 
void FindSlices (const art::Event &evt, art::Handle< std::vector< rb::Cluster > > &h, art::PtrVector< rb::Cluster > &s)
 
void FindProngs (art::Event &evt, unsigned int islice, art::FindManyP< rb::Prong > &prongh, std::vector< art::Ptr< rb::Vertex > > &vertexp, std::vector< art::Ptr< rb::Prong > > &prongp)
 
bool GoodProng (art::Ptr< rb::Prong > &t)
 
void FillHitList (art::Ptr< rb::Prong > &prongp, bpfit::HitList3D &hits)
 
void AverageXY (bpfit::HitList3D &h)
 
void DebugHitList (bpfit::HitList3D &h, int which)
 
void FillTrackNt (const HitList3D &h, const Lutz &lx, const Lutz &ly, const Path &path, int pdg_id)
 
void FillExceptNt (BPException Ex)
 
void MakeBasis (art::Ptr< rb::Vertex > &vtx, const HitList3D &hits, bpfit::TrackBasis &sys)
 
void ClampToDetector (double *p)
 
void FindEndPoints (HitList3D &h, bpfit::TrackBasis &sys, double *p0, double *p1)
 
void DebugScatSurf (bpfit::ScatteringSurfaces &s, int pdgid)
 
void DebugFitList (unsigned int which, const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z)
 
void LogResiduals (bpfit::HitList3D &hit, bpfit::ScatteringSurfaces &scat, bpfit::Lutz &xfit, bpfit::Lutz &yfit, double *alphax, double *alphay, float pdgid)
 
void FitTracks (art::Ptr< rb::Vertex > &vertexp, art::Ptr< rb::Prong > &prongp, std::vector< rb::Track > &tracks, std::vector< rb::FitSum > &fitsums)
 
void produce (art::Event &evt)
 
std::string workerType () const
 
void doBeginJob ()
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< TconsumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< TmayConsumeView (InputTag const &tag)
 

Public Attributes

const art::ProductToken< std::vector< rb::Cluster > > fSliceToken
 
bool fDebugHitList0
 Debug the detector-frame hit list? More...
 
bool fDebugHitList1
 Debug the track-frame hit list? More...
 
bool fDebugScatSurf
 Debug the scattering surfaces. More...
 
bool fDebugFitList0
 Debug the fitted track locations (det. frame) More...
 
bool fDebugFitList1
 Debug the fitted track locations (track frame) More...
 
bool fLogResiduals
 Make ntuple of residuals? More...
 
bool fFillTrackNt
 Fill ntuple of tracking results? More...
 
bool fFillExceptNt
 Fill ntuple of exception cases? More...
 
bool fVerbose
 Run in verbose mode (print messages about all exceptions?) More...
 
bool fFitAsMuon
 Fit tracks under the assumption of a muon? More...
 
bool fFitAsPion
 Fit tracks under the assumption of a pion? More...
 
bool fFitAsProton
 Fit tracks under the assumption of a proton? More...
 
double fExtendUp
 Fractionally, how far to extend track into upstream dead material. More...
 
double fExtendDn
 Fractionally, how far to extend track into downstream dead material. More...
 
std::string fVertexLabel
 Where to find vertices in event. More...
 
std::string fClusterLabel
 Where to find clusters in event. More...
 
std::string fClusterInstance
 Which instance of clusters to find. More...
 
unsigned int fNhitX
 Require prongs to have this many x hits. More...
 
unsigned int fNhitY
 Require prongs to have this many y hits. More...
 
unsigned int fNhit
 Require this many hits total. More...
 
double fChi2Cutoff
 Drop hits with this chi2 or greater. More...
 
double fdStol
 Scattering surface ds tolerance. More...
 
double fdXtol
 Scattering surface dx tolerance. More...
 
double fdTtol
 Scattering surface dt tolerance. More...
 
double fSigAdj
 Multiplier to adjust sigmaXYZ for hits (see comment in the FillHitList function.) Set to 1.0 if no adjustment is desired. More...
 
unsigned int fMaxSliceHits
 Don't bother processing a slice if it has more than this many hits. This is to prevent computing problems. More...
 
int fRun
 
int fSubrun
 
int fEvent
 
unsigned int fSlice
 
unsigned int fProng
 
TNtuple * fHitList0Nt
 
TNtuple * fHitList1Nt
 
TNtuple * fScatSurfNt
 
TNtuple * fFitList0Nt
 
TNtuple * fFitList1Nt
 
TNtuple * fResidNt
 
TNtuple * fTrackNt
 
TNtuple * fExceptNt
 
std::vector< intfPartList
 List of particle types (by pdg code) to be used for track fits. More...
 

Protected Member Functions

ConsumesCollector & consumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< Tconsumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Detailed Description

Definition at line 34 of file BreakPoint_module.cc.

Member Typedef Documentation

Definition at line 17 of file EDProducer.h.

template<typename UserConfig , typename KeysToIgnore = void>
using art::detail::Producer::Table = Modifier::Table<UserConfig, KeysToIgnore>
inherited

Definition at line 25 of file Producer.h.

using art::EDProducer::WorkerType = WorkerT<EDProducer>
inherited

Definition at line 18 of file EDProducer.h.

Constructor & Destructor Documentation

bpfit::BreakPoint::BreakPoint ( fhicl::ParameterSet const &  p)
inlineexplicit

Definition at line 127 of file BreakPoint_module.cc.

References reconfigure().

127  :
128  EDProducer(p),
129  fSliceToken(consumes<std::vector<rb::Cluster>>(p.get<std::string>("SliceLabel"))),
130  fRun(0),
131  fSubrun(0),
132  fEvent(0),
133  fProng(0),
134  fHitList0Nt(0),
135  fHitList1Nt(0),
136  fScatSurfNt(0),
137  fFitList0Nt(0),
138  fFitList1Nt(0),
139  fResidNt(0),
140  fTrackNt(0),
141  fExceptNt(0)
142  {
143  produces< std::vector<rb::Track> >();
144  produces< std::vector<rb::FitSum> >();
145  produces< art::Assns<rb::Track, rb::Prong> >();
146  produces< art::Assns<rb::Track, rb::Cluster> >();
147  produces< art::Assns<rb::FitSum, rb::Track> >();
148  this->reconfigure(p);
149  }
const char * p
Definition: xmltok.h:285
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
const art::ProductToken< std::vector< rb::Cluster > > fSliceToken
void reconfigure(fhicl::ParameterSet const &p)
ProductToken< T > consumes(InputTag const &)
Definition: ModuleBase.h:55
enum BeamMode string
virtual bpfit::BreakPoint::~BreakPoint ( )
inlinevirtual

Definition at line 153 of file BreakPoint_module.cc.

153 { }

Member Function Documentation

void bpfit::BreakPoint::AverageXY ( bpfit::HitList3D h)
inline

If there are less than 10 hits in one view with the same z then take the average x or y depending on view and use that when fitting the track.

Definition at line 308 of file BreakPoint_module.cc.

References bpfit::HitList3D::CompleteOrtho(), MECModelEnuComparisons::i, calib::j, geo::kX, geo::kY, bpfit::HitList3D::SetHit(), bpfit::HitList3D::SortByZ(), and std::sqrt().

309  {
310 
311  // NOTE: To the reader of this code - I think there is a mistake below.
312  // I don't think the intention is to set the weight of any hits
313  // to 1e-9. I think that the weights should be left as 1.0. But
314  // we aren't currently using this function...
315 
316  for(unsigned int i=0;i<h.size();i++){
317 
318  int lastj = i;
319  int n_xhits = 0;
320  int n_yhits = 0;
321  unsigned int i_xhits[384], i_yhits[384]; // Max number of hits at the same z = # cells per plane
322  double sumx = 0.0;
323  double sumy = 0.0;
324  double sigx2 = 0.0;
325  double sigy2 = 0.0;
326 
327  for(unsigned int j=i+1;j<h.size();j++){
328  // Look for hits in the same view that have the
329  // same z coordinate.
330  if((fabs(h[i].fZ-h[j].fZ)<0.1)){
331  if(h[i].fView == h[j].fView){
332  lastj = j;
333  if(h[i].fView == geo::kX){
334  if(n_xhits==0) i_xhits[n_xhits] = i;
335  else i_xhits[n_xhits] = j;
336  n_xhits++;
337  }
338  else{
339  if(h[i].fView == geo::kY){
340  if(n_yhits==0) i_yhits[n_yhits] = i;
341  else i_yhits[n_yhits] = j;
342  n_yhits++;
343  }
344  }
345  }
346  }
347  else continue;
348  } // end j loop over hitlist3D
349 
350  if(n_xhits>0 && n_xhits<10){
351  // Averaging x
352  for(int xi=0; xi<n_xhits; xi++){
353  sumx += h[i_xhits[xi]].fX;
354  sigx2 += h[i_xhits[xi]].fSigX*h[i_xhits[xi]].fSigX;
355 
356  // Since we will be adding the averaged hit to
357  // the hitlist we need to reweight the same z hits
358  // to something very small.
359  if(xi!=0)h[i_xhits[xi]].fW = 1.0E-9;
360  }
361  double xave = sumx/n_xhits;
362  // Replace first hit in series that has the same z with
363  // new average x coordinate.
364  h.SetHit(i_xhits[0], h[i_xhits[0]].fView, xave, h[i_xhits[0]].fY, h[i_xhits[0]].fZ,
365  h[i_xhits[0]].fT, sqrt(sigx2), h[i_xhits[0]].fSigY,
366  h[i_xhits[0]].fSigZ, h[i_xhits[0]].fSigT, h[i_xhits[0]].fW);
367  } // end n_xhits requirement
368 
369  if(n_yhits>0 && n_yhits<10){
370  // Averaging y
371  for(int yi=0; yi<n_yhits; yi++){
372  sumy += h[i_yhits[yi]].fY;
373  sigy2 += h[i_yhits[yi]].fSigY*h[i_yhits[yi]].fSigY;
374  // Since we will be adding the averaged hit to
375  // the hitlist we need to reweight the same z hits
376  // to something very small.
377  if(yi!=0) h[i_yhits[yi]].fW = 1.0E-9;
378  }
379  double yave = sumy/n_yhits;
380  // Replace first hit in series that has the same z with
381  // new average y coordinate.
382  h.SetHit(i_yhits[0], h[i_yhits[0]].fView, h[i_yhits[0]].fX, yave, h[i_yhits[0]].fZ,
383  h[i_yhits[0]].fT, h[i_yhits[0]].fSigX, sqrt(sigy2),
384  h[i_yhits[0]].fSigZ, h[i_yhits[0]].fSigT, h[i_yhits[0]].fW);
385  } // end n_yhits requirement
386 
387  i = lastj;
388  } // end i loop over hitlist3D
389 
390  h.CompleteOrtho();
391 
392  h.SortByZ();
393 
394  } // end function definition
T sqrt(T number)
Definition: d0nt_math.hpp:156
Vertical planes which measure X.
Definition: PlaneGeo.h:28
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
void CompleteOrtho(Interp3D interp=0)
Definition: HitList3D.cxx:145
const double j
Definition: BetheBloch.cxx:29
void SetHit(unsigned int i, geo::View_t, double x, double y, double z, double t, double sig_x, double sig_y, double sig_z, double sig_t, double w=1.0)
Definition: HitList3D.cxx:29
void bpfit::BreakPoint::ClampToDetector ( double *  p)
inline

Definition at line 560 of file BreakPoint_module.cc.

References geo::GeometryBase::DetHalfHeight(), geo::GeometryBase::DetHalfWidth(), geo::GeometryBase::DetLength(), and geom().

Referenced by FillHitList(), FindEndPoints(), and FitTracks().

561  {
563  if (p[0]>geom->DetHalfWidth()) p[0] = geom->DetHalfWidth();
564  if (p[1]>geom->DetHalfHeight()) p[1] = geom->DetHalfHeight();
565  if (p[2]>geom->DetLength()) p[2] = geom->DetLength();
566 
567  if (p[0]<-geom->DetHalfWidth()) p[0] = -geom->DetHalfWidth();
568  if (p[1]<-geom->DetHalfHeight()) p[1] = -geom->DetHalfHeight();
569  if (p[2]<0) p[2] = 0;
570  }
const char * p
Definition: xmltok.h:285
double DetLength() const
double DetHalfHeight() const
double DetHalfWidth() const
void geom(int which=0)
Definition: geom.C:163
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::consumes ( InputTag const &  tag)
protectedinherited

Definition at line 55 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::consumes(), T, and getGoodRuns4SAM::tag.

56  {
57  return collector_.consumes<T, BT>(tag);
58  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ProductToken< T > consumes(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
ConsumesCollector& art::ModuleBase::consumesCollector ( )
protectedinherited
template<typename T , BranchType BT>
void art::ModuleBase::consumesMany ( )
protectedinherited

Definition at line 69 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::consumesMany(), and T.

70  {
71  collector_.consumesMany<T, BT>();
72  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::consumesView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::consumesView ( InputTag const &  tag)
inherited

Definition at line 62 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::consumesView(), T, and getGoodRuns4SAM::tag.

63  {
64  return collector_.consumesView<T, BT>(tag);
65  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ViewToken< Element > consumesView(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
void bpfit::BreakPoint::DebugFitList ( unsigned int  which,
const std::vector< double > &  x,
const std::vector< double > &  y,
const std::vector< double > &  z 
)
inline

Definition at line 625 of file BreakPoint_module.cc.

References fEvent, fFitList0Nt, fFitList1Nt, fProng, fRun, fSlice, fSubrun, MECModelEnuComparisons::i, nt, and registry_explorer::v.

Referenced by FitTracks().

629  {
630  TNtuple* nt = 0;
631  if (which==0) {
632  if (fFitList0Nt==0) {
634  fFitList0Nt = tfs->make<TNtuple>("fit0",
635  "fitted track - det. frame",
636  "run:subrun:evt:trk:x:y:z:slice");
637  }
638  nt = fFitList0Nt;
639  }
640  if (which==1) {
641  if (fFitList1Nt==0) {
643  fFitList1Nt = tfs->make<TNtuple>("fit1",
644  "fitted track - track frame",
645  "run:subrun:evt:trk:x:y:z:slice");
646  }
647  nt = fFitList1Nt;
648  }
649 
650  unsigned int i;
651  float v[8];
652  v[0] = fRun;
653  v[1] = fSubrun;
654  v[2] = fEvent;
655  v[3] = fProng;
656  v[7] = fSlice;
657  for (i=0; i<z.size(); ++i) {
658  v[4] = x[i];
659  v[5] = y[i];
660  v[6] = z[i];
661  nt->Fill(v);
662  }
663  }
z
Definition: test.py:28
TNtuple * nt
Definition: drawXsec.C:2
void bpfit::BreakPoint::DebugHitList ( bpfit::HitList3D h,
int  which 
)
inline

Dump the hit list to an ntuple we can study offline for debugging

Definition at line 401 of file BreakPoint_module.cc.

References fEvent, fHitList0Nt, fHitList1Nt, fProng, fRun, fSlice, fSubrun, MECModelEnuComparisons::i, nt, and submit_syst::x.

Referenced by FitTracks().

402  {
403  TNtuple* nt = 0;
404 
405  if (which==0) {
406  if (fHitList0Nt==0) {
408  fHitList0Nt = tfs->make<TNtuple>("hits0",
409  "Det Frame Hit List Debugging",
410  "run:subrun:evt:trk:v:x:y:z:sx:sy:sz:slice");
411  }
412  nt = fHitList0Nt;
413  }
414  if (which==1) {
415  if (fHitList1Nt==0) {
417  fHitList1Nt = tfs->make<TNtuple>("hits1",
418  "Trk Frame Hit List Debugging",
419  "run:subrun:evt:trk:v:x:y:z:sx:sy:sz:slice");
420  }
421  nt = fHitList1Nt;
422  }
423  float x[12];
424  x[0] = fRun;
425  x[1] = fSubrun;
426  x[2] = fEvent;
427  x[3] = fProng;
428  x[11]= fSlice;
429  for (unsigned int i=0; i<h.size(); ++i) {
430  x[4] = h[i].fView;
431  x[5] = h[i].fX;
432  x[6] = h[i].fY;
433  x[7] = h[i].fZ;
434  x[8] = h[i].fSigX;
435  x[9] = h[i].fSigY;
436  x[10] = h[i].fSigZ;
437  nt->Fill(x);
438  }
439  }
TNtuple * nt
Definition: drawXsec.C:2
void bpfit::BreakPoint::DebugScatSurf ( bpfit::ScatteringSurfaces s,
int  pdgid 
)
inline

Definition at line 601 of file BreakPoint_module.cc.

References fEvent, fProng, fRun, fSlice, fSubrun, MECModelEnuComparisons::i, bpfit::ScatteringSurfaces::N(), bpfit::ScatteringSurfaces::S(), bpfit::ScatteringSurfaces::SigAlpha(), and submit_syst::x.

Referenced by FitTracks().

602  {
603  if (fScatSurfNt==0) {
605  fScatSurfNt = tfs->make<TNtuple>("scat",
606  "Scattering Surfaces",
607  "run:subrun:evt:trk:s:sigalpha:pdgid:slice");
608  }
609  float x[8];
610  x[0] = fRun;
611  x[1] = fSubrun;
612  x[2] = fEvent;
613  x[3] = fProng;
614  x[7] = fSlice;
615  for (unsigned int i=0; i<s.N(); ++i) {
616  x[4] = s.S(i);
617  x[5] = s.SigAlpha(i);
618  x[6] = pdgid;
619  fScatSurfNt->Fill(x);
620  }
621  }
unsigned int N() const
The number of scattering planes constructed.
double SigAlpha(unsigned int i) const
The predicted RMS scattering angle at plane i.
double S(unsigned int i) const
The location of the ith scattering plane.
void art::detail::Producer::doBeginJob ( )
inherited
bool art::detail::Producer::doBeginRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited
bool art::detail::Producer::doBeginSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited
void art::detail::Producer::doEndJob ( )
inherited
bool art::detail::Producer::doEndRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited
bool art::detail::Producer::doEndSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited
bool art::detail::Producer::doEvent ( EventPrincipal ep,
ModuleContext const &  mc,
std::atomic< std::size_t > &  counts_run,
std::atomic< std::size_t > &  counts_passed,
std::atomic< std::size_t > &  counts_failed 
)
inherited
void art::detail::Producer::doRespondToCloseInputFile ( FileBlock const &  fb)
inherited
void art::detail::Producer::doRespondToCloseOutputFiles ( FileBlock const &  fb)
inherited
void art::detail::Producer::doRespondToOpenInputFile ( FileBlock const &  fb)
inherited
void art::detail::Producer::doRespondToOpenOutputFiles ( FileBlock const &  fb)
inherited
void bpfit::BreakPoint::FillExceptNt ( BPException  Ex)
inline

Definition at line 507 of file BreakPoint_module.cc.

References fEvent, bpfit::BPException::fFlag, fProng, fRun, fSlice, fSubrun, bpfit::BPException::fValue, and submit_syst::x.

Referenced by FitTracks().

508  {
509 
510  if (fExceptNt == 0) {
512  fExceptNt = tfs->make<TNtuple>("except",
513  "Exception summary",
514  "run:subrun:evt:slice:prong:flag:value");
515  }
516 
517  float x[7];
518  x[0] = fRun;
519  x[1] = fSubrun;
520  x[2] = fEvent;
521  x[3] = fSlice;
522  x[4] = fProng;
523  x[5] = Ex.fFlag;
524  x[6] = Ex.fValue;
525  fExceptNt->Fill(x);
526 
527  }
void bpfit::BreakPoint::FillHitList ( art::Ptr< rb::Prong > &  prongp,
bpfit::HitList3D hits 
)
inline

Definition at line 213 of file BreakPoint_module.cc.

References plot_validation_datamc::c, rb::CellHit::Cell(), rb::Cluster::Cell(), ClampToDetector(), bpfit::HitList3D::CompleteOrtho(), fSigAdj, geom(), art::Ptr< T >::get(), geo::CellGeo::GetCenter(), make_syst_table_plots::h, geo::CellGeo::HalfD(), geo::CellGeo::HalfW(), MECModelEnuComparisons::i, ip, geo::kX, geo::kY, rb::Cluster::NCell(), rb::CellHit::Plane(), geo::GeometryBase::Plane(), bpfit::HitList3D::SetHit(), bpfit::HitList3D::SortByZ(), rb::CellHit::TNS(), geo::PlaneGeo::View(), and w.

Referenced by FitTracks().

215  {
217  unsigned int itr, i;
218  unsigned int n = prongp->NCell();
219  //
220  // Build the 3D hits in two passes. In the first we don't have
221  // information about where transversly we are along a cell. In the
222  // second iteration, we do.
223  //
224  for (itr=0; itr<2; ++itr) {
225  for (i=0; i<n; ++i) {
226  const rb::CellHit* h = prongp->Cell(i).get();
227 
228  unsigned int ip = h->Plane();
229  unsigned int ic = h->Cell();
230 
231  const geo::PlaneGeo* p = geom->Plane(ip);
232  const geo::CellGeo* c = p-> Cell(ic);
233 
234  double xyz[3] = {0,0,0};;
235  double sigx=0, sigy=0, sigz=0, sigt=50;
236  double w = 1.0;
237  if (itr==0) {
238  //
239  // On first iteration we don't have information from other
240  // view. Use cell centers for position estimates.
241  //
242 
243  // NOTE: BPF appears to be giving too much weight to the hits
244  // when doing the track fit (the total chi2 distribution
245  // does not have a mean of 1.0.) I believe this to be
246  // related to the fact that the true particle location
247  // within a cell is not Gaussian distributed around the
248  // cell center. Introducing the fSigAdj factor adjusts
249  // this and brings the mean of the chi2 distribution down
250  // to 1.0 allowing for the fit scattering angles to be better.
251  c->GetCenter(xyz);
252  if (p->View()==geo::kX) sigx = c->HalfW()*fSigAdj;
253  if (p->View()==geo::kY) sigy = c->HalfW()*fSigAdj;
254  sigz = c->HalfD()*fSigAdj;
255  }
256  else {
257  //
258  // On second iteration, we have more information about where
259  // in the cell we are. Use the estimated location from the
260  // other view. Otherwise, most information is a copy of what
261  // is already there.
262  //
263  if (p->View()==geo::kX) c->GetCenter(xyz, hits[i].fY);
264  if (p->View()==geo::kY) c->GetCenter(xyz, hits[i].fX);
265  sigx = hits[i].fSigX;
266  sigy = hits[i].fSigY;
267  sigz = hits[i].fSigZ;
268  sigt = hits[i].fSigT;
269  w = hits[i].fW;
270  }
271 
272  if (p->View()==geo::kX) {
273  hits.SetHit(i, geo::kX, xyz[0], xyz[1], xyz[2], h->TNS(),
274  sigx, sigy, sigz, sigt, w);
275  }
276  else if (p->View()==geo::kY) {
277  hits.SetHit(i,
278  geo::kY, xyz[0], xyz[1], xyz[2], h->TNS(),
279  sigx, sigy, sigz, sigt, w);
280  }
281  else abort();
282  } // loop on hits
283  hits.CompleteOrtho();
284  } // iterations
285  //
286  // Keep all hits inside the detector
287  //
288  double xyz[3];
289  for (i=0; i<hits.size(); ++i) {
290  xyz[0] = hits[i].fX;
291  xyz[1] = hits[i].fY;
292  xyz[2] = hits[i].fZ;
293  this->ClampToDetector(xyz);
294  hits[i].fX = xyz[0];
295  hits[i].fY = xyz[1];
296  hits[i].fZ = xyz[2];
297  }
298 
299  hits.SortByZ();
300  }
float TNS() const
Definition: CellHit.h:46
double fSigAdj
Multiplier to adjust sigmaXYZ for hits (see comment in the FillHitList function.) Set to 1...
double HalfD() const
Definition: CellGeo.cxx:205
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
void GetCenter(double *xyz, double localz=0.0) const
Definition: CellGeo.cxx:159
unsigned short Plane() const
Definition: CellHit.h:39
const char * p
Definition: xmltok.h:285
Vertical planes which measure X.
Definition: PlaneGeo.h:28
double HalfW() const
Definition: CellGeo.cxx:191
TString ip
Definition: loadincs.C:5
const PlaneGeo * Plane(unsigned int i) const
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
unsigned short Cell() const
Definition: CellHit.h:40
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:53
void CompleteOrtho(Interp3D interp=0)
Definition: HitList3D.cxx:145
void ClampToDetector(double *p)
std::void_t< T > n
Geometry information for a single readout plane.
Definition: PlaneGeo.h:36
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
A rawdata::RawDigit with channel information decoded.
Definition: CellHit.h:27
void geom(int which=0)
Definition: geom.C:163
T const * get() const
Definition: Ptr.h:149
Encapsulate the cell geometry.
Definition: CellGeo.h:25
Float_t w
Definition: plot.C:20
void SetHit(unsigned int i, geo::View_t, double x, double y, double z, double t, double sig_x, double sig_y, double sig_z, double sig_t, double w=1.0)
Definition: HitList3D.cxx:29
void bpfit::BreakPoint::FillTrackNt ( const HitList3D h,
const Lutz lx,
const Lutz ly,
const Path path,
int  pdg_id 
)
inline

Definition at line 443 of file BreakPoint_module.cc.

References std::acos(), std::atan2(), bpfit::Lutz::Chi2Beta(), bpfit::Lutz::Chi2XI(), dx, dy, dz, E, fEvent, fProng, fRun, fSlice, fSubrun, bpfit::Path::fXYZ, MECModelEnuComparisons::i, geo::kX, geo::kY, bpfit::Path::Length(), M_PI, bpfit::Path::MuonParams(), bpfit::Path::PionParams(), bpfit::Path::ProtonParams(), std::sqrt(), and submit_syst::x.

Referenced by FitTracks().

448  {
449  if (fTrackNt==0) {
451  fTrackNt = tfs->make<TNtuple>("trks",
452  "Track summary",
453  "run:subrun:evt:slice:trk:"
454  "nhitx:nhity:x0:y0:z0:x1:y1:z1:length:p:"
455  "theta:phi:"
456  "chi2xh:chi2xa:chi2yh:chi2ya:pdgID");
457  }
458  unsigned int i;
459  unsigned int nhitx = 0, nhity = 0;
460  for (i=0; i<h.size(); ++i) {
461  if (h[i].fView==geo::kX && h[i].fW > 1.0E-9) ++nhitx;
462  if (h[i].fView==geo::kY && h[i].fW > 1.0E-9) ++nhity;
463  }
464 
465  double p, len;
466  len = path.Length();
467  if (pdg_id == 13) path.MuonParams(0, 0, &p, 0, 0);
468  else if (pdg_id == 211) path.PionParams(0, 0, &p, 0, 0);
469  else if (pdg_id == 2212) path.ProtonParams(0, 0, &p, 0, 0);
470  // Can't get here unless we are one of the above particle types,
471  // but why leave traps...?
472  else path.MuonParams(0, 0, &p, 0, 0);
473  i = h.size()-1;
474  double dx = path.fXYZ[1].X() - path.fXYZ[0].X();
475  double dy = path.fXYZ[1].Y() - path.fXYZ[0].Y();
476  double dz = path.fXYZ[1].Z() - path.fXYZ[0].Z();
477  if (dz==0.0) dz = 1.0E-9;
478 
479  float x[22];
480  x[0] = fRun;
481  x[1] = fSubrun;
482  x[2] = fEvent;
483  x[3] = fSlice;
484  x[4] = fProng;
485  x[5] = nhitx;
486  x[6] = nhity;
487  x[7] = h[0].fX;
488  x[8] = h[0].fY;
489  x[9] = h[0].fZ;
490  x[10] = h[i].fX;
491  x[11] = h[i].fY;
492  x[12] = h[i].fZ;
493  x[13] = len;
494  x[14] = p;
495  x[15] = 180.0*acos(dz/sqrt(dx*dx+dy*dy+dz*dz))/M_PI;
496  x[16] = 180.0*atan2(dy,dx)/M_PI;
497  x[17] = lx.Chi2XI();
498  x[18] = lx.Chi2Beta();
499  x[19] = ly.Chi2XI();
500  x[20] = ly.Chi2Beta();
501  x[21] = pdg_id;
502  fTrackNt->Fill(x);
503  }
const XML_Char int len
Definition: expat.h:262
const char * p
Definition: xmltok.h:285
T sqrt(T number)
Definition: d0nt_math.hpp:156
Vertical planes which measure X.
Definition: PlaneGeo.h:28
T acos(T number)
Definition: d0nt_math.hpp:54
#define M_PI
Definition: SbMath.h:34
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
double dy[NP][NC]
double dx[NP][NC]
double dz[NP][NC]
Float_t E
Definition: plot.C:20
const std::string path
Definition: plot_BEN.C:43
T atan2(T number)
Definition: d0nt_math.hpp:72
void bpfit::BreakPoint::FindEndPoints ( HitList3D h,
bpfit::TrackBasis sys,
double *  p0,
double *  p1 
)
inline

Definition at line 574 of file BreakPoint_module.cc.

References ClampToDetector(), dx, dy, dz, MECModelEnuComparisons::i, bpfit::TrackBasis::TrkToDet(), and make_true_q0q3_plots::zmax.

Referenced by FitTracks().

578  {
579  unsigned int i;
580  double zmin = 9e9;
581  double zmax = -9e9;
582  for (i=0; i<h.size(); ++i) {
583  if (h[i].fZ<zmin) zmin = h[i].fZ;
584  if (h[i].fZ>zmax) zmax = h[i].fZ;
585  }
586  p0[0] = 0.0; p0[1] = 0.0; p0[2] = zmin;
587  p1[0] = 0.0; p1[1] = 0.0; p1[2] = zmax;
588  double dx;
589  double dy;
590  double dz;
591  sys.TrkToDet(0, 0, zmin, 0, 0, 0,
592  &p0[0], &p0[1], &p0[2], &dx, &dy, &dz);
593  sys.TrkToDet(0, 0, zmax, 0, 0, 0,
594  &p1[0], &p1[1], &p1[2], &dx, &dy, &dz);
595  this->ClampToDetector(p0);
596  this->ClampToDetector(p1);
597  }
double dy[NP][NC]
double dx[NP][NC]
double dz[NP][NC]
void ClampToDetector(double *p)
void TrkToDet(double x, double y, double z, double dx, double dy, double dz, double *x1, double *y1, double *z1, double *dx1, double *dy1, double *dz1)
Definition: TrackBasis.cxx:218
void bpfit::BreakPoint::FindProngs ( art::Event evt,
unsigned int  islice,
art::FindManyP< rb::Prong > &  prongh,
std::vector< art::Ptr< rb::Vertex > > &  vertexp,
std::vector< art::Ptr< rb::Prong > > &  prongp 
)
inline

Definition at line 170 of file BreakPoint_module.cc.

References om::cerr, and allTimeWatchdog::endl.

Referenced by produce().

175  {
176  if (prongh.isValid()) {
177  prongp = prongh.at(islice);
178  }
179  else {
180  //
181  // Hmm... No prongs associated with slice - try the vertex.
182  //
183  art::FindManyP<rb::Prong> prongh2(vertexp, evt, fClusterLabel);
184  if (prongh2.isValid()) {
185  if (prongh2.size()==1) {
186  prongp = prongh2.at(0);
187  }
188  else {
189  std::cerr << __FILE__ << ":" << __LINE__
190  << " Multiple vertices breaks our assumptions."
191  << std::endl;
192  }
193  }
194  }
195  }
OStream cerr
Definition: OStream.cxx:7
std::string fClusterLabel
Where to find clusters in event.
void bpfit::BreakPoint::FindSlices ( const art::Event evt,
art::Handle< std::vector< rb::Cluster > > &  h,
art::PtrVector< rb::Cluster > &  s 
)
inline

Definition at line 157 of file BreakPoint_module.cc.

References art::DataViewImpl::getByToken(), make_syst_table_plots::h, MECModelEnuComparisons::i, and art::PtrVector< T >::push_back().

Referenced by produce().

160  {
161  unsigned int i;
162  evt.getByToken(fSliceToken, h);
163  for (i=0; i<h->size(); ++i) {
165  }
166  }
bool getByToken(ProductToken< PROD > const &, Handle< PROD > &result) const
Definition: DataViewImpl.h:462
const art::ProductToken< std::vector< rb::Cluster > > fSliceToken
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:435
void bpfit::BreakPoint::FitTracks ( art::Ptr< rb::Vertex > &  vertexp,
art::Ptr< rb::Prong > &  prongp,
std::vector< rb::Track > &  tracks,
std::vector< rb::FitSum > &  fitsums 
)
inline

\ TODO: For now we initialize it to the prong that it is fit from.

Definition at line 740 of file BreakPoint_module.cc.

References bpfit::Path::AdjustEndPoint(), bpfit::Path::AdjustStartPoint(), rb::Track::AppendTrajectoryPoint(), rb::Cluster::Cell(), ClampToDetector(), DebugFitList(), DebugHitList(), DebugScatSurf(), bpfit::TrackBasis::DetToTrk(), bpfit::Path::Dir(), dx, dy, dz, E, FillExceptNt(), FillHitList(), FillTrackNt(), FindEndPoints(), bpfit::Path::fXYZ, geom(), art::Ptr< T >::get(), MECModelEnuComparisons::i, calib::j, bpfit::kBAD_NDOF, bpfit::kNPLANES, geo::kX, geo::kY, LogResiduals(), MakeBasis(), bpfit::ScatteringSurfaces::MakeSurfaces(), make_training::momentum, bpfit::Path::MuonParams(), bpfit::ScatteringSurfaces::N(), rb::Cluster::NCell(), PandAna.Demos.pi0_spectra::p0, plot_validation_datamc::p1, path, bpfit::Path::PionParams(), rb::CellHit::Plane(), geo::GeometryBase::Plane(), NDAPDHVSetting::plane, bpfit::BPException::Print(), bpfit::Path::ProtonParams(), bpfit::ScatteringSurfaces::S(), bpfit::Path::Scrub(), rb::FitSum::SetChi2(), rb::Prong::SetDir(), rb::FitSum::SetKin(), bpfit::Lutz::SetMeasurement(), rb::FitSum::SetPDG(), bpfit::Path::SetPoint(), rb::Track::SetStart(), bpfit::ScatteringSurfaces::SigAlpha(), std::sqrt(), confusionMatrixTree::t, track, bpfit::TrackBasis::TrkToDet(), and geo::PlaneGeo::View().

Referenced by produce().

744  {
745  unsigned int i, j;
746  bpfit::TrackBasis sys;
747  double p0[3], p1[3];
748 
749  bpfit::HitList3D hits0(prongp->NCell());
750  bpfit::HitList3D hits1(prongp->NCell());
751  std::vector<double> s(hits1.size());
752 
753  // This first try/catch block is to pick out hit list errors. These
754  // will cause all particle track fit assumptions to fail.
755  try {
756  // First check that this prong has hits in more than one plane in
757  // each view. If not, we won't try to fit it.
759  std::set<unsigned int> Xplanes;
760  std::set<unsigned int> Yplanes;
761  for(unsigned int p = 0; p < prongp->NCell(); ++p) {
762  unsigned int plane = prongp->Cell(p).get()->Plane();
763  if(geom->Plane(plane)->View() == geo::kX) Xplanes.insert(plane);
764  if(geom->Plane(plane)->View() == geo::kY) Yplanes.insert(plane);
765  }
766  if(Xplanes.size() == 1 && Yplanes.size() == 1) {
767  throw BPException(__FILE__, __LINE__, kNPLANES, 2);
768  }
769  if(Xplanes.size() == 1) {
770  throw BPException(__FILE__, __LINE__, kNPLANES, 0);
771  }
772  if(Yplanes.size() == 1) {
773  throw BPException(__FILE__, __LINE__, kNPLANES, 1);
774  }
775 
776  //
777  // Track fitting starts with a hit list
778  //
779  this->FillHitList(prongp, hits0);
780 
781  /*
782  // Only average hits if either view has a small number of hits.
783  if(prongp->NXCell()<10 || prongp->NYCell()<10){
784  // Currently commented out the use of the averagexy function...
785  // I have verified that for most fits nothing is affected but there are still
786  // a few I need to dive deeper into.
787 
788  this->AverageXY(hits0);
789  }
790  */
791 
792  for(i=0; i<hits0.size(); ++i){
793  hits1.SetHit(i,hits0[i].fView, hits0[i].fX, hits0[i].fY, hits0[i].fZ, hits0[i].fT,
794  hits0[i].fSigX, hits0[i].fSigY, hits0[i].fSigZ, hits0[i].fSigT,
795  hits0[i].fW);
796  }
797 
798  if (fDebugHitList0) this->DebugHitList(hits0, 0);
799  //
800  // Then we want to swing around to a track-based coordinate system
801  // so that we can properly locate the scattering planes
802  //
803  this->MakeBasis(vertexp, hits0, sys);
804 
805  for (i=0; i<hits0.size(); ++i) {
806  sys.DetToTrk(hits0[i].fX, hits0[i].fY, hits0[i].fZ,
807  hits0[i].fSigX, hits0[i].fSigY, hits0[i].fSigZ,
808  &hits1[i].fX, &hits1[i].fY, &hits1[i].fZ,
809  &hits1[i].fSigX, &hits1[i].fSigY, &hits1[i].fSigZ);
810  }
811  if (fDebugHitList1) this->DebugHitList(hits1, 1);
812  hits1.SortByZ();
813 
814  //
815  // Get the extent of the track and z1 locations of measurement
816  // planes
817  //
818  this->FindEndPoints(hits1, sys, p0, p1);
819 
820  for (i=0; i<hits1.size(); ++i) {
821  s[i] = hits1[i].fZ;
822  }
823 
824  } // end of try block
825  catch (BPException& Ex) {
826  if(fVerbose) Ex.Print();
827  if(fFillExceptNt) this->FillExceptNt(Ex);
828  return;
829  } // end of catch block
830 
831  //
832  // Loop over the list of particle assumptions requested for this fit,
833  // and make one track for each of those assumptions.
834  //
835  for(unsigned int t = 0; t < fPartList.size(); ++t) {
836  // This second try/catch block is to pick out track fitting errors.
837  // This will cause one particle fit assumption to fail but not all.
838  try {
839 
840  // Make the track to be fit.
841  //
842  ///\ TODO: For now we initialize it to the prong that it is fit from.
843  // We should be putting in the hits from the prongs with the
844  // weights used to calculate the track.
845  rb::Track track(*prongp);
846  rb::FitSum fitsum;
847 
850  scat_surf.MakeSurfaces(*geom, p0, p1, s);
851 
852  if (fDebugScatSurf) this->DebugScatSurf(scat_surf, fPartList[t]);
853 
854  bpfit::Lutz lutzx(hits1.size(), scat_surf.N());
855  bpfit::Lutz lutzy(hits1.size(), scat_surf.N());
856  for (i=0; i<hits1.size(); ++i) {
857  lutzx.SetMeasurement(i, hits1[i].fZ, hits1[i].fX, hits1[i].fSigX);
858  lutzy.SetMeasurement(i, hits1[i].fZ, hits1[i].fY, hits1[i].fSigY);
859  }
860  for (j=0; j<scat_surf.N(); ++j) {
861  lutzx.SetScatteringPlane(j, scat_surf.S(j), scat_surf.SigAlpha(j));
862  lutzy.SetScatteringPlane(j, scat_surf.S(j), scat_surf.SigAlpha(j));
863  }
864  double alphax[scat_surf.N()];
865  double alphay[scat_surf.N()];
866  lutzx.Fit(0, 0, alphax, 0);
867  lutzy.Fit(0, 0, alphay, 0);
868  //
869  // Check the fit results and remove far-away outliers
870  //
871  double chix, chiy, chim, fac;
872  for (i=0; i<hits1.size(); ++i) {
873  chix = lutzx.Chi2XIi(i);
874  chiy = lutzy.Chi2XIi(i);
875  chim = (chix>chiy) ? chix : chiy;
876  fac = sqrt(chim);
877  if (chim>fChi2Cutoff) {
878  hits1[i].fW = 1.0E-9;
879  hits1[i].fSigX *= fac;
880  hits1[i].fSigY *= fac;
881  hits1[i].fSigZ *= fac;
882  }
883  }
884  //
885  // Need to recompute the projection from orthogonal projection as
886  // outliers would have biased the estimates
887  //
888  hits1.CompleteOrtho();
889  for (i=0; i<hits1.size(); ++i) {
890  lutzx.SetMeasurement(i, hits1[i].fZ, hits1[i].fX, hits1[i].fSigX);
891  lutzy.SetMeasurement(i, hits1[i].fZ, hits1[i].fY, hits1[i].fSigY);
892  }
893  lutzx.Fit(0, 0, alphax, 0);
894  lutzy.Fit(0, 0, alphay, 0);
895 
896  //
897  // Get the fitted track positions in the track frame. Take the
898  // start and end points from the hits and insert the track
899  // locations from the scattering surfaces.
900  //
901  std::vector<double> xfit(scat_surf.N()+2);
902  std::vector<double> yfit(scat_surf.N()+2);
903  std::vector<double> zfit(scat_surf.N()+2);
904  zfit[0] = hits1[0].fZ;
905  for (j=0; j<scat_surf.N(); ++j) {
906  zfit[1+j] = scat_surf.S(j);
907  }
908  zfit[1+j] = hits1[hits1.size()-1].fZ;
909  for (j=0; j<zfit.size(); ++j) {
910  xfit[j] = lutzx.X(zfit[j]);
911  yfit[j] = lutzy.X(zfit[j]);
912  }
913 
914  if (fDebugFitList1) this->DebugFitList(1, xfit, yfit, zfit);
915  if (fLogResiduals) {
916  this->LogResiduals(hits1, scat_surf, lutzx, lutzy, alphax, alphay, fPartList[t]);
917  }
918 
919  //
920  // Translate back to the detector frame and build a path
921  //
922  std::vector<double> xfit_det;
923  std::vector<double> yfit_det;
924  std::vector<double> zfit_det;
925  double xyz[3], dx, dy, dz;
926  bpfit::Path path(*geom, zfit.size(), 0.0);
927  for (j=0; j<zfit.size(); ++j) {
928  sys.TrkToDet(xfit[j], yfit[j], zfit[j], 0, 0, 0,
929  &xyz[0], &xyz[1], &xyz[2], &dx, &dy, &dz);
930  this->ClampToDetector(xyz);
931  path.SetPoint(j, xyz);
932  xfit_det.push_back(xyz[0]);
933  yfit_det.push_back(xyz[1]);
934  zfit_det.push_back(xyz[2]);
935  }
936  path.Scrub();
937  if (fExtendUp!=0) path.AdjustStartPoint(fExtendUp);
938  if (fExtendDn!=0) path.AdjustEndPoint(fExtendDn);
939 
940  // Debugging fit parameters in track frame.
941  if (fDebugFitList0) this->DebugFitList(1, xfit, yfit, zfit);
942  // Debugging fit parameters in detector frame.
943  // if (fDebugFitList0) this->DebugFitList(0, xfit_det, yfit_det, zfit_det);
944 
945  //
946  // Log the track parameters
947  //
948  if (fFillTrackNt) this->FillTrackNt(hits1, lutzx, lutzy, path, fPartList[t]);
949 
950  //
951  // Build the track before returning
952  //
953  track.SetDir(path.Dir(0.0));
954  track.SetStart(path.fXYZ[0]);
955  for (i=1; i<path.fXYZ.size(); ++i) {
956  track.AppendTrajectoryPoint(path.fXYZ[i]);
957  }
958 
959  // Calculate the degrees of freedom for each track.
960  unsigned int nhitx = 0, nhity = 0;
961  for (unsigned int i=0; i<hits1.size(); ++i) {
962  if (hits1[i].fView==geo::kX && hits1[i].fW > 1.0E-9) ++nhitx;
963  if (hits1[i].fView==geo::kY && hits1[i].fW > 1.0E-9) ++nhity;
964  }
965 
966  // Check that the number of hits used in each view isn't too small.
967  // The number of degrees of freedom for each track fit is N Hits
968  // that went into making the track minus 4, so if used 0 hits in
969  // either view or <= 4 total, we will throw this exception.
970  if (nhitx < 1 || nhity < 1 || (nhitx+nhity) <= 4) {
971  throw BPException(__FILE__, __LINE__, kBAD_NDOF, nhitx+nhity);
972  }
973 
974  double momentum = 0.0;
975  double mass = 0.0;
976 
977  if(fPartList[t] == 13) {
978  path.MuonParams(0, 0, &momentum, 0, 0);
979  mass = 105.658E-3;
980  }
981  if(fPartList[t] == 211) {
982  path.PionParams(0, 0, &momentum, 0, 0);
983  mass = 139.570E-3;
984  }
985  if(fPartList[t] == 2212) {
986  path.ProtonParams(0, 0, &momentum, 0, 0);
987  mass = 938.272E-3;
988  }
989 
990  // set the kinematic information and chi2 and ndof...
991  fitsum.SetKin(path.Dir(0.0), momentum, mass);
992  fitsum.SetPDG(fPartList[t]);
993  fitsum.SetChi2(lutzx.Chi2XI(),lutzy.Chi2XI(),
994  lutzx.Chi2Beta(),lutzy.Chi2Beta(),
995  nhitx, nhity, scat_surf.N(), scat_surf.N());
996 
997  tracks.push_back(track);
998  fitsums.push_back(fitsum);
999 
1000  } // end of try block
1001  catch (BPException& Ex) {
1002  if(fVerbose) Ex.Print();
1003  if(fFillExceptNt) this->FillExceptNt(Ex);
1004  } // end of catch block
1005  } // end loop over fPartList
1006 
1007  return;
1008 
1009  }
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
double fdStol
Scattering surface ds tolerance.
void SetMeasurement(unsigned int i, double z, double x, double sigx)
Add measurements.
Definition: Lutz.cxx:38
void FillTrackNt(const HitList3D &h, const Lutz &lx, const Lutz &ly, const Path &path, int pdg_id)
double fdTtol
Scattering surface dt tolerance.
unsigned short Plane() const
Definition: CellHit.h:39
bool fFillTrackNt
Fill ntuple of tracking results?
Construct scattering surfaces for Lutz.
double fExtendDn
Fractionally, how far to extend track into downstream dead material.
const char * p
Definition: xmltok.h:285
T sqrt(T number)
Definition: d0nt_math.hpp:156
Vertical planes which measure X.
Definition: PlaneGeo.h:28
Definition: event.h:19
A rb::Prong with full reconstructed trajectory.
Definition: Track.h:20
const PlaneGeo * Plane(unsigned int i) const
void DebugFitList(unsigned int which, const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z)
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
bool fDebugFitList0
Debug the fitted track locations (det. frame)
const XML_Char * s
Definition: expat.h:262
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:53
double dy[NP][NC]
double dx[NP][NC]
Break-point track fitter.
Definition: Lutz.h:20
double dz[NP][NC]
void FillHitList(art::Ptr< rb::Prong > &prongp, bpfit::HitList3D &hits)
Track parameters (s, X0, KE, beta, ...) along a particular path in the detector.
Definition: Path.h:18
Float_t E
Definition: plot.C:20
void ClampToDetector(double *p)
void SetPDG(int pdg)
Definition: FitSum.h:38
const double j
Definition: BetheBloch.cxx:29
std::vector< int > fPartList
List of particle types (by pdg code) to be used for track fits.
double fExtendUp
Fractionally, how far to extend track into upstream dead material.
const unsigned int kNPLANES
too few planes in one (or both) views
Definition: BPException.h:28
double fChi2Cutoff
Drop hits with this chi2 or greater.
void DetToTrk(double x, double y, double z, double dx, double dy, double dz, double *x1, double *y1, double *z1, double *dx1, double *dy1, double *dz1)
Definition: TrackBasis.cxx:194
bool fDebugScatSurf
Debug the scattering surfaces.
void SetChi2(double chi2_hit1, double chi2_hit2, double chi2_angle1, double chi2_angle2, int Ndof_hit1, int Ndof_hit2, int Ndof_angle1, int Ndof_angle2)
Definition: FitSum.h:43
void FillExceptNt(BPException Ex)
const unsigned int kBAD_NDOF
too few hits used to make the track
Definition: BPException.h:27
void MakeBasis(art::Ptr< rb::Vertex > &vtx, const HitList3D &hits, bpfit::TrackBasis &sys)
const std::string path
Definition: plot_BEN.C:43
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
void DebugScatSurf(bpfit::ScatteringSurfaces &s, int pdgid)
bool fLogResiduals
Make ntuple of residuals?
void geom(int which=0)
Definition: geom.C:163
void TrkToDet(double x, double y, double z, double dx, double dy, double dz, double *x1, double *y1, double *z1, double *dx1, double *dy1, double *dz1)
Definition: TrackBasis.cxx:218
bool fVerbose
Run in verbose mode (print messages about all exceptions?)
void SetKin(TVector3 dir, double momentum, double mass)
Definition: FitSum.cxx:48
bool fDebugHitList1
Debug the track-frame hit list?
T const * get() const
Definition: Ptr.h:149
void LogResiduals(bpfit::HitList3D &hit, bpfit::ScatteringSurfaces &scat, bpfit::Lutz &xfit, bpfit::Lutz &yfit, double *alphax, double *alphay, float pdgid)
Float_t track
Definition: plot.C:35
Essential 3D information for tracking.
Definition: HitList3D.h:58
bool fDebugFitList1
Debug the fitted track locations (track frame)
bool fFillExceptNt
Fill ntuple of exception cases?
void FindEndPoints(HitList3D &h, bpfit::TrackBasis &sys, double *p0, double *p1)
bool fDebugHitList0
Debug the detector-frame hit list?
A container for kinematic information.
Definition: FitSum.h:22
double fdXtol
Scattering surface dx tolerance.
void DebugHitList(bpfit::HitList3D &h, int which)
std::array<std::vector<ProductInfo>, NumBranchTypes> const& art::ModuleBase::getConsumables ( ) const
inherited
bool bpfit::BreakPoint::GoodProng ( art::Ptr< rb::Prong > &  t)
inline

Definition at line 199 of file BreakPoint_module.cc.

References rb::Cluster::Is2D(), rb::Cluster::NXCell(), and rb::Cluster::NYCell().

Referenced by produce().

200  {
201  if (t->Is2D()) return false;
202 
203  unsigned int nx = t->NXCell();
204  unsigned int ny = t->NYCell();
205  if (nx<fNhitX || ny<fNhitY) return false;
206  if (nx+ny<fNhit) return false;
207 
208  return true;
209  }
unsigned int fNhitY
Require prongs to have this many y hits.
bool Is2D() const
Definition: Cluster.h:96
unsigned int fNhitX
Require prongs to have this many x hits.
unsigned int NYCell() const
Number of cells in the y-view.
Definition: Cluster.h:108
unsigned int fNhit
Require this many hits total.
unsigned int NXCell() const
Number of cells in the x-view.
Definition: Cluster.h:106
void bpfit::BreakPoint::LogResiduals ( bpfit::HitList3D hit,
bpfit::ScatteringSurfaces scat,
bpfit::Lutz xfit,
bpfit::Lutz yfit,
double *  alphax,
double *  alphay,
float  pdgid 
)
inline

Definition at line 681 of file BreakPoint_module.cc.

References fEvent, fProng, fRun, fSlice, fSubrun, MECModelEnuComparisons::i, geo::kX, geo::kY, bpfit::ScatteringSurfaces::N(), bpfit::ScatteringSurfaces::S(), bpfit::ScatteringSurfaces::SigAlpha(), registry_explorer::v, and bpfit::Lutz::X().

Referenced by FitTracks().

688  {
689  if (fResidNt==0) {
691  fResidNt = tfs->make<TNtuple>("resid",
692  "resid",
693  "run:subrun:evt:trk:m:sig:fit:w:pdgid:zs:slice");
694  }
695  unsigned int i;
696  float v[11];
697  v[0] = fRun;
698  v[1] = fSubrun;
699  v[2] = fEvent;
700  v[3] = fProng;
701  v[10]= fSlice;
702  v[8] = pdgid;
703  for (i=0; i<hit.size(); ++i) {
704  v[4] = hit[i].fX;
705  v[5] = hit[i].fSigX;
706  v[6] = xfit.X(hit[i].fZ);
707  v[9] = hit[i].fZ;
708  if (hit[i].fView==geo::kX) v[7] = 0;
709  if (hit[i].fView==geo::kY) v[7] = 1;
710  fResidNt->Fill(v);
711 
712  v[4] = hit[i].fY;
713  v[5] = hit[i].fSigY;
714  v[6] = yfit.X(hit[i].fZ);
715  v[9] = hit[i].fZ;
716  if (hit[i].fView==geo::kY) v[7] = 2;
717  if (hit[i].fView==geo::kX) v[7] = 3;
718  fResidNt->Fill(v);
719  }
720  for (i=0; i<scat.N(); ++i) {
721  v[4] = 0;
722  v[5] = scat.SigAlpha(i);
723  v[6] = alphax[i];
724  v[7] = 4;
725  v[9] = scat.S(i);
726  fResidNt->Fill(v);
727 
728  v[4] = 0;
729  v[5] = scat.SigAlpha(i);
730  v[6] = alphay[i];
731  v[7] = 5;
732  v[9] = scat.S(i);
733  fResidNt->Fill(v);
734  }
735 
736  }
Vertical planes which measure X.
Definition: PlaneGeo.h:28
double X(double z) const
After fit, best-fit x location of track at location z.
Definition: Lutz.cxx:207
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
unsigned int N() const
The number of scattering planes constructed.
double SigAlpha(unsigned int i) const
The predicted RMS scattering angle at plane i.
double S(unsigned int i) const
The location of the ith scattering plane.
void bpfit::BreakPoint::MakeBasis ( art::Ptr< rb::Vertex > &  vtx,
const HitList3D hits,
bpfit::TrackBasis sys 
)
inline

Definition at line 531 of file BreakPoint_module.cc.

References dx, dy, dz, rb::Vertex::GetX(), rb::Vertex::GetY(), rb::Vertex::GetZ(), MECModelEnuComparisons::i, bpfit::TrackBasis::MakeBasis(), submit_syst::x, submit_syst::y, and test::z.

Referenced by FitTracks().

534  {
535  //
536  // Extract hits into format expected by TrackBasis
537  //
538  unsigned int i;
539  std::vector<double> x(hits.size());
540  std::vector<double> y(hits.size());
541  std::vector<double> z(hits.size());
542  std::vector<double> dx(hits.size());
543  std::vector<double> dy(hits.size());
544  std::vector<double> dz(hits.size());
545 
546  for (i=0; i<hits.size(); ++i) {
547  x[i] = hits[i].fX;
548  y[i] = hits[i].fY;
549  z[i] = hits[i].fZ;
550  dx[i] = hits[i].fSigX;
551  dy[i] = hits[i].fSigY;
552  dz[i] = hits[i].fSigZ;
553  }
554 
555  sys.MakeBasis(x,y,z,dx,dy,dz,vtx->GetX(),vtx->GetY(),vtx->GetZ());
556  }
void MakeBasis(const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z, const std::vector< double > &dx, const std::vector< double > &dy, const std::vector< double > &dz, double vx, double vy, double vz)
Definition: TrackBasis.cxx:61
double GetX() const
Definition: Vertex.h:23
double GetY() const
Definition: Vertex.h:24
double GetZ() const
Definition: Vertex.h:25
void hits()
Definition: readHits.C:15
double dy[NP][NC]
double dx[NP][NC]
double dz[NP][NC]
z
Definition: test.py:28
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::mayConsume ( InputTag const &  tag)
protectedinherited

Definition at line 76 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::mayConsume(), T, and getGoodRuns4SAM::tag.

77  {
78  return collector_.mayConsume<T, BT>(tag);
79  }
ProductToken< T > mayConsume(InputTag const &)
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
template<typename T , BranchType BT>
void art::ModuleBase::mayConsumeMany ( )
protectedinherited

Definition at line 90 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::mayConsumeMany(), and T.

91  {
93  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::mayConsumeView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::mayConsumeView ( InputTag const &  tag)
inherited

Definition at line 83 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::mayConsumeView(), T, and getGoodRuns4SAM::tag.

84  {
85  return collector_.mayConsumeView<T, BT>(tag);
86  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ViewToken< Element > mayConsumeView(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
ModuleDescription const& art::ModuleBase::moduleDescription ( ) const
inherited
void bpfit::BreakPoint::produce ( art::Event evt)
inlinevirtual

Implements art::EDProducer.

Definition at line 1013 of file BreakPoint_module.cc.

References ana::assert(), util::CreateAssn(), DEFINE_ART_MODULE(), art::EventID::event(), FindProngs(), FindSlices(), FitTracks(), fMaxSliceHits, fProng, GoodProng(), art::Event::id(), art::DataViewImpl::put(), art::DataViewImpl::run(), art::PtrVector< T >::size(), art::DataViewImpl::subRun(), and confusionMatrixTree::t.

1014  {
1015  //
1016  // Allocations for the track products and their associations
1017  //
1018  std::unique_ptr<std::vector<rb::Track> >
1019  trackcol(new std::vector<rb::Track>);
1020  std::unique_ptr<std::vector<rb::FitSum> >
1021  fitcol(new std::vector<rb::FitSum>);
1022  std::unique_ptr< art::Assns<rb::Track, rb::Prong> >
1023  trkPrngAssns(new art::Assns<rb::Track, rb::Prong>);
1024  std::unique_ptr< art::Assns<rb::Track, rb::Cluster> >
1025  trkSlcAssns(new art::Assns<rb::Track, rb::Cluster>);
1026  std::unique_ptr< art::Assns<rb::FitSum, rb::Track> >
1027  fitTrkAssns(new art::Assns<rb::FitSum, rb::Track>);
1028 
1029  fRun = evt.run();
1030  fSubrun = evt.subRun();
1031  fEvent = evt.id().event();
1032  fSlice = 0;
1033  //
1034  // Extract the slices, vertices, and tracks we need as inputs
1035  //
1038  this->FindSlices(evt, sliceh, slicep);
1039  art::FindManyP<rb::Vertex> vertexh(sliceh, evt, fVertexLabel);
1041  prongh(sliceh, evt, art::InputTag(fClusterLabel,fClusterInstance));
1042  if (!vertexh.isValid()) {
1043  return;
1044  }
1045 
1046  unsigned int islice;
1047  for (islice=0; islice<slicep.size(); ++islice) {
1048  fSlice = islice;
1049 
1050  //
1051  // Skip the noise slice - no physics there
1052  //
1053  if (slicep[islice]->IsNoise()) continue;
1054 
1055  //
1056  // To avoid problems with jobs running out of memory and/or taking too
1057  // long to process a single event, skip the slice if it has too many
1058  // hits since the reconstruction will be junk anyway.
1059  //
1060  if (slicep[islice]->NCell() > fMaxSliceHits) continue;
1061 
1062  //
1063  // Find vertex associated with this slice
1064  //
1065  std::vector< art::Ptr<rb::Vertex> > vertexp;
1066  vertexp = vertexh.at(islice);
1067  if (vertexp.size()!=1) continue;
1068 
1069  //
1070  // Find the tracks associated with this slice
1071  //
1072  std::vector< art::Ptr<rb::Prong> > prongp;
1073  this->FindProngs(evt, islice, prongh, vertexp, prongp);
1074  if (prongp.size()==0) continue;
1075 
1076  //
1077  // At this point we should have a list of tracks to fit. Go
1078  // ahead and process them
1079  //
1080  unsigned int nprong_good = 0; // How many tracks pass selection cuts
1081  for (fProng=0; fProng<prongp.size(); ++fProng) {
1082  //
1083  // Figure out if the track has enough information to be
1084  // fit. If not, skip to the next track
1085  //
1086  if (!this->GoodProng(prongp[fProng])) continue;
1087  ++nprong_good;
1088 
1089  //
1090  // Fit the tracks under the requested assumptions.
1091  //
1092  std::vector<rb::Track> tracks;
1093  std::vector<rb::FitSum> fitsums;
1094 
1095  this->FitTracks(vertexp[0], prongp[fProng], tracks, fitsums);
1096 
1097  // Add all returned tracks to the full list and make the appropriate Assns.
1098  assert(tracks.size() == fitsums.size());
1099  for(unsigned int t = 0; t < tracks.size(); ++t) {
1100  trackcol->push_back(tracks[t]);
1101  fitcol->push_back(fitsums[t]);
1102  util::CreateAssn(evt, *trackcol, prongp[fProng], *trkPrngAssns);
1103  util::CreateAssn(evt, *trackcol, slicep[islice] , *trkSlcAssns);
1104  util::CreateAssn(evt, *fitTrkAssns, *fitcol, *trackcol);
1105  }
1106 
1107  } // Loop on prongs
1108  } // Loop on slices
1109 
1110  evt.put(std::move(trackcol));
1111  evt.put(std::move(fitcol));
1112  evt.put(std::move(trkPrngAssns));
1113  evt.put(std::move(trkSlcAssns));
1114  evt.put(std::move(fitTrkAssns));
1115 
1116  } // produce() method
std::string fClusterInstance
Which instance of clusters to find.
static bool CreateAssn(art::EDProducer const &prod, art::Event &evt, std::vector< T > &a, art::Ptr< U > b, art::Assns< T, U > &assn, size_t indx=UINT_MAX, std::string const &instance=std::string())
Create a 1 to 1 association between a new product and one already in the event.
unsigned int fMaxSliceHits
Don&#39;t bother processing a slice if it has more than this many hits. This is to prevent computing prob...
bool GoodProng(art::Ptr< rb::Prong > &t)
std::string fClusterLabel
Where to find clusters in event.
void FindProngs(art::Event &evt, unsigned int islice, art::FindManyP< rb::Prong > &prongh, std::vector< art::Ptr< rb::Vertex > > &vertexp, std::vector< art::Ptr< rb::Prong > > &prongp)
void FindSlices(const art::Event &evt, art::Handle< std::vector< rb::Cluster > > &h, art::PtrVector< rb::Cluster > &s)
SubRunNumber_t subRun() const
RunNumber_t run() const
size_type size() const
Definition: PtrVector.h:302
void FitTracks(art::Ptr< rb::Vertex > &vertexp, art::Ptr< rb::Prong > &prongp, std::vector< rb::Track > &tracks, std::vector< rb::FitSum > &fitsums)
EventNumber_t event() const
Definition: EventID.h:116
assert(nhit_max >=nhit_nbins)
std::string fVertexLabel
Where to find vertices in event.
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:730
EventID id() const
void bpfit::BreakPoint::reconfigure ( fhicl::ParameterSet const &  p)
inline

Definition at line 88 of file BreakPoint_module.cc.

References fhicl::ParameterSet::get(), and string.

Referenced by BreakPoint().

89  {
90  fDebugHitList0 = p.get<bool>("DebugHitList0");
91  fDebugHitList1 = p.get<bool>("DebugHitList1");
92  fDebugScatSurf = p.get<bool>("DebugScatSurf");
93  fDebugFitList0 = p.get<bool>("DebugFitList0");
94  fDebugFitList1 = p.get<bool>("DebugFitList1");
95  fLogResiduals = p.get<bool>("LogResiduals");
96  fFillTrackNt = p.get<bool>("FillTrackNt");
97  fFillExceptNt = p.get<bool>("FillExceptNt");
98  fVerbose = p.get<bool>("Verbose");
99 
100  fExtendUp = p.get<double>("ExtendUp");
101  fExtendDn = p.get<double>("ExtendDn");
102  fFitAsMuon = p.get<bool>("FitAsMuon");
103  fFitAsPion = p.get<bool>("FitAsPion");
104  fFitAsProton = p.get<bool>("FitAsProton");
105  fPartList.clear();
106  if(fFitAsMuon) fPartList.push_back(13);
107  if(fFitAsPion) fPartList.push_back(211);
108  if(fFitAsProton) fPartList.push_back(2212);
109 
110  fVertexLabel = p.get<std::string>("VertexLabel");
111  fClusterLabel = p.get<std::string>("ClusterLabel");
112  fClusterInstance = p.get<std::string>("ClusterInstance");
113 
114  fNhitX = p.get<unsigned int>("NhitX");
115  fNhitY = p.get<unsigned int>("NhitY");
116  fNhit = p.get<unsigned int>("Nhit");
117  fChi2Cutoff = p.get<double>("Chi2Cutoff");
118  fdStol = p.get<double>("dStol");
119  fdXtol = p.get<double>("dXtol");
120  fdTtol = p.get<double>("dTtol");
121  fSigAdj = p.get<double>("SigmaAdjust");
122  fMaxSliceHits = p.get<unsigned int>("MaxSliceHits");
123  }
std::string fClusterInstance
Which instance of clusters to find.
double fSigAdj
Multiplier to adjust sigmaXYZ for hits (see comment in the FillHitList function.) Set to 1...
double fdStol
Scattering surface ds tolerance.
unsigned int fMaxSliceHits
Don&#39;t bother processing a slice if it has more than this many hits. This is to prevent computing prob...
unsigned int fNhitY
Require prongs to have this many y hits.
double fdTtol
Scattering surface dt tolerance.
bool fFillTrackNt
Fill ntuple of tracking results?
unsigned int fNhitX
Require prongs to have this many x hits.
double fExtendDn
Fractionally, how far to extend track into downstream dead material.
const char * p
Definition: xmltok.h:285
std::string fClusterLabel
Where to find clusters in event.
bool fFitAsPion
Fit tracks under the assumption of a pion?
bool fDebugFitList0
Debug the fitted track locations (det. frame)
bool fFitAsMuon
Fit tracks under the assumption of a muon?
std::vector< int > fPartList
List of particle types (by pdg code) to be used for track fits.
double fExtendUp
Fractionally, how far to extend track into upstream dead material.
double fChi2Cutoff
Drop hits with this chi2 or greater.
bool fDebugScatSurf
Debug the scattering surfaces.
bool fLogResiduals
Make ntuple of residuals?
unsigned int fNhit
Require this many hits total.
bool fVerbose
Run in verbose mode (print messages about all exceptions?)
bool fFitAsProton
Fit tracks under the assumption of a proton?
std::string fVertexLabel
Where to find vertices in event.
bool fDebugHitList1
Debug the track-frame hit list?
bool fDebugFitList1
Debug the fitted track locations (track frame)
bool fFillExceptNt
Fill ntuple of exception cases?
bool fDebugHitList0
Debug the detector-frame hit list?
double fdXtol
Scattering surface dx tolerance.
enum BeamMode string
void art::ModuleBase::setModuleDescription ( ModuleDescription const &  )
inherited
void art::ModuleBase::sortConsumables ( std::string const &  current_process_name)
inherited
std::string art::EDProducer::workerType ( ) const
inherited

Member Data Documentation

double bpfit::BreakPoint::fChi2Cutoff

Drop hits with this chi2 or greater.

Definition at line 60 of file BreakPoint_module.cc.

std::string bpfit::BreakPoint::fClusterInstance

Which instance of clusters to find.

Definition at line 56 of file BreakPoint_module.cc.

std::string bpfit::BreakPoint::fClusterLabel

Where to find clusters in event.

Definition at line 55 of file BreakPoint_module.cc.

bool bpfit::BreakPoint::fDebugFitList0

Debug the fitted track locations (det. frame)

Definition at line 43 of file BreakPoint_module.cc.

bool bpfit::BreakPoint::fDebugFitList1

Debug the fitted track locations (track frame)

Definition at line 44 of file BreakPoint_module.cc.

bool bpfit::BreakPoint::fDebugHitList0

Debug the detector-frame hit list?

Definition at line 40 of file BreakPoint_module.cc.

bool bpfit::BreakPoint::fDebugHitList1

Debug the track-frame hit list?

Definition at line 41 of file BreakPoint_module.cc.

bool bpfit::BreakPoint::fDebugScatSurf

Debug the scattering surfaces.

Definition at line 42 of file BreakPoint_module.cc.

double bpfit::BreakPoint::fdStol

Scattering surface ds tolerance.

Definition at line 61 of file BreakPoint_module.cc.

double bpfit::BreakPoint::fdTtol

Scattering surface dt tolerance.

Definition at line 63 of file BreakPoint_module.cc.

double bpfit::BreakPoint::fdXtol

Scattering surface dx tolerance.

Definition at line 62 of file BreakPoint_module.cc.

int bpfit::BreakPoint::fEvent
TNtuple* bpfit::BreakPoint::fExceptNt

Definition at line 81 of file BreakPoint_module.cc.

double bpfit::BreakPoint::fExtendDn

Fractionally, how far to extend track into downstream dead material.

Definition at line 53 of file BreakPoint_module.cc.

double bpfit::BreakPoint::fExtendUp

Fractionally, how far to extend track into upstream dead material.

Definition at line 52 of file BreakPoint_module.cc.

bool bpfit::BreakPoint::fFillExceptNt

Fill ntuple of exception cases?

Definition at line 47 of file BreakPoint_module.cc.

bool bpfit::BreakPoint::fFillTrackNt

Fill ntuple of tracking results?

Definition at line 46 of file BreakPoint_module.cc.

bool bpfit::BreakPoint::fFitAsMuon

Fit tracks under the assumption of a muon?

Definition at line 49 of file BreakPoint_module.cc.

bool bpfit::BreakPoint::fFitAsPion

Fit tracks under the assumption of a pion?

Definition at line 50 of file BreakPoint_module.cc.

bool bpfit::BreakPoint::fFitAsProton

Fit tracks under the assumption of a proton?

Definition at line 51 of file BreakPoint_module.cc.

TNtuple* bpfit::BreakPoint::fFitList0Nt

Definition at line 77 of file BreakPoint_module.cc.

Referenced by DebugFitList().

TNtuple* bpfit::BreakPoint::fFitList1Nt

Definition at line 78 of file BreakPoint_module.cc.

Referenced by DebugFitList().

TNtuple* bpfit::BreakPoint::fHitList0Nt

Definition at line 74 of file BreakPoint_module.cc.

Referenced by DebugHitList().

TNtuple* bpfit::BreakPoint::fHitList1Nt

Definition at line 75 of file BreakPoint_module.cc.

Referenced by DebugHitList().

bool bpfit::BreakPoint::fLogResiduals

Make ntuple of residuals?

Definition at line 45 of file BreakPoint_module.cc.

unsigned int bpfit::BreakPoint::fMaxSliceHits

Don't bother processing a slice if it has more than this many hits. This is to prevent computing problems.

Definition at line 65 of file BreakPoint_module.cc.

Referenced by produce().

unsigned int bpfit::BreakPoint::fNhit

Require this many hits total.

Definition at line 59 of file BreakPoint_module.cc.

unsigned int bpfit::BreakPoint::fNhitX

Require prongs to have this many x hits.

Definition at line 57 of file BreakPoint_module.cc.

unsigned int bpfit::BreakPoint::fNhitY

Require prongs to have this many y hits.

Definition at line 58 of file BreakPoint_module.cc.

std::vector<int> bpfit::BreakPoint::fPartList

List of particle types (by pdg code) to be used for track fits.

Definition at line 83 of file BreakPoint_module.cc.

unsigned int bpfit::BreakPoint::fProng
TNtuple* bpfit::BreakPoint::fResidNt

Definition at line 79 of file BreakPoint_module.cc.

int bpfit::BreakPoint::fRun
TNtuple* bpfit::BreakPoint::fScatSurfNt

Definition at line 76 of file BreakPoint_module.cc.

double bpfit::BreakPoint::fSigAdj

Multiplier to adjust sigmaXYZ for hits (see comment in the FillHitList function.) Set to 1.0 if no adjustment is desired.

Definition at line 64 of file BreakPoint_module.cc.

Referenced by FillHitList().

unsigned int bpfit::BreakPoint::fSlice
const art::ProductToken<std::vector<rb::Cluster> > bpfit::BreakPoint::fSliceToken

Definition at line 37 of file BreakPoint_module.cc.

int bpfit::BreakPoint::fSubrun
TNtuple* bpfit::BreakPoint::fTrackNt

Definition at line 80 of file BreakPoint_module.cc.

bool bpfit::BreakPoint::fVerbose

Run in verbose mode (print messages about all exceptions?)

Definition at line 48 of file BreakPoint_module.cc.

std::string bpfit::BreakPoint::fVertexLabel

Where to find vertices in event.

Definition at line 54 of file BreakPoint_module.cc.


The documentation for this class was generated from the following file: