Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
jmshower::JMShower Class Reference

TODO. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-10-20/RecoJMShower/JMShower.h"

Inheritance diagram for jmshower::JMShower:
rb::Shower rb::Prong rb::Cluster

Public Types

enum  ESaveGeVMode { kInitializeTotalGeV = 0, kResetTotalGeV = 1 }
 

Public Member Functions

 JMShower ()
 
virtual ~JMShower ()
 
 JMShower (const rb::Prong &prong, int id=0, double length=0)
 
void SetWindowSize (unsigned int nplane)
 
void SetHitColSize (unsigned int ncell)
 
void SetIsFiducial (bool isfiducial)
 
bool IsFiducial () const
 
void SetDistToEdge (double disttoedge)
 
double DistToEdge () const
 
void SetBackTag (bool backtag)
 
bool BackTag () const
 
void SetGap (double gap)
 
double Gap () const
 
void SetContGap (double gap)
 
double ContGap () const
 
void SetVtxDoca (double vtxdoca)
 
double VtxDoca () const
 
void SetDepositEnergy (double depositenergy)
 
double DepositEnergy () const
 
void SetExclEnergy (double exclenergy)
 
double ExclEnergy () const
 
void SetEnergy (double energy)
 
double Energy () const
 
void SetVtxGeV (double gev)
 
double VtxGeV () const
 
void SetVtxCenterGeV (double gev)
 
double VtxCenterGeV () const
 
void SetVtxCenterGeV5cell (double gev)
 
double VtxCenterGeV5cell () const
 
void SetVtxCenterGeV10cell (double gev)
 
double VtxCenterGeV10cell () const
 
void SetVtxCenterGeV15cell (double gev)
 
double VtxCenterGeV15cell () const
 
void SetVtxCenterGeV20cell (double gev)
 
double VtxCenterGeV20cell () const
 
void SetPi0Mgg (double pi0mass)
 
double Pi0Mgg () const
 
void SetPi0G2ID (int id)
 
int Pi0G2ID () const
 
void SetTheta (double theta)
 
double Theta () const
 
void SetTrkGeV (double gev)
 
double TrkGeV () const
 
void SetSliceGeV (double gev)
 
double SliceGeV () const
 
void SetSliceEtot (double etot)
 
double SliceEtot () const
 
void SetNueEnergy (double nueenergy)
 
double NueEnergy () const
 
void SetSliceEdge10GeV (double gev)
 
double SliceEdge10GeV () const
 
void SetSliceEdge5GeV (double gev)
 
double SliceEdge5GeV () const
 
void SetSliceEdge2GeV (double gev)
 
double SliceEdge2GeV () const
 
void SetNCellToEdge (int nce)
 
int NCellToEdge () const
 
void SetClosetEdge (int edge)
 
int ClosetEdge () const
 
void SetEdge20GeV (double gev)
 
double Edge20GeV () const
 
void SetEdge15GeV (double gev)
 
double Edge15GeV () const
 
void SetEdge10GeV (double gev)
 
double Edge10GeV () const
 
void SetEdge5GeV (double gev)
 
double Edge5GeV () const
 
void SetEdge2GeV (double gev)
 
double Edge2GeV () const
 
void SetSliceExclGeV (double gev)
 
double SliceExclGeV () const
 
void SetRadius (double radius)
 
double Radius () const
 
void SetSumDRadius (double dradius)
 
double SumDRadius () const
 
void SetSum10DRadius (double dradius)
 
double Sum10DRadius () const
 
void SetCentroid (TVector3 centroid)
 
TVector3 Centroid () const
 
void SetStartPlane (unsigned int startplane)
 
unsigned int StartPlane () const
 
void SetStopPlane (unsigned int stopplane)
 
unsigned int StopPlane () const
 
void SetNPlane (unsigned int nplane)
 
unsigned int NPlane () const
 
void SetXNPlane (unsigned int xnplane)
 
unsigned int XNPlane () const
 
void SetYNPlane (unsigned int ynplane)
 
unsigned int YNPlane () const
 
void SetXMinPlane (unsigned int xminplane)
 
unsigned int XMinPlane () const
 
void SetYMinPlane (unsigned int yminplane)
 
unsigned int YMinPlane () const
 
void SetXMaxPlane (unsigned int xmaxplane)
 
unsigned int XMaxPlane () const
 
void SetYMaxPlane (unsigned int ymaxplane)
 
unsigned int YMaxPlane () const
 
void SetStop (TVector3 stop)
 
TVector3 Stop () const
 
void SetPlaneHitXYZ (unsigned int plane, TVector3 xyz)
 
TVector3 PlaneHitXYZ (unsigned int plane) const
 
void SetPlaneHitCell (unsigned int plane, unsigned int cell)
 
unsigned int PlaneHitCell (unsigned int plane) const
 
void SetPlaneE1Cell (unsigned int plane, int cell)
 
int PlaneE1Cell (unsigned int plane) const
 
void SetPlaneE2Cell (unsigned int plane, int cell)
 
int PlaneE2Cell (unsigned int plane) const
 
void SetPlaneCentroidCell (unsigned int plane, int cell)
 
int PlaneCentroidCell (unsigned int plane) const
 
void SetPlaneRadius (unsigned int plane, double planerad)
 
double PlaneRadius (unsigned int plane) const
 
void SetPlaneDedx (unsigned int plane, double planededx)
 
double PlaneDedx (unsigned int plane) const
 
void SetDedxLongLL (double dedxlongll, int type)
 
double DedxLongLL (int type) const
 
void SetDedxInvLongLL (double dedxlongll, int type)
 
double DedxInvLongLL (int type) const
 
void SetPlaneProb (unsigned int plane, double planeprob, int type)
 
double PlaneProb (unsigned int plane, int type) const
 
void SetCellTransDedx (unsigned int tcell, double celldedx)
 
double CellTransDedx (unsigned int tcell) const
 
void SetDedxTransLL (double dedxtransll, int type)
 
double DedxTransLL (int type) const
 
void SetIsMuon (bool ismuon)
 
bool IsMuon () const
 
void SetIsInvPhoton (bool isinvphoton)
 
bool IsInvPhoton () const
 
void SetNMIPPlane (int nmipplane)
 
int NMIPPlane () const
 
void SetISlice (unsigned int islice)
 
unsigned int ISlice () const
 
void SetHitDist (unsigned int cell, double dist)
 
double HitDist (unsigned int cell) const
 
void SetHitDeconvE (unsigned int cell, double deconve)
 
double HitDeconvE (unsigned int cell) const
 
void SetHitSumE (unsigned int cell, double sume)
 
double HitSumE (unsigned int cell) const
 
void SetNodes (std::vector< TVector3 > nodespos, std::vector< double > nodese, std::vector< geo::OfflineChan > xid, std::vector< geo::OfflineChan > yid)
 
int NNode () const
 
TVector3 NodePos (int node) const
 
double NodeE (int node) const
 
geo::OfflineChan NodeXID (int node) const
 
geo::OfflineChan NodeYID (int node) const
 
void SetIxyz (TVector3 ixyz)
 
TVector3 Ixyz () const
 
void SetAsym (double asym)
 
double Asym () const
 
void SetANN (unsigned int mode, double ann)
 
double ANN (unsigned int mode) const
 
double Efrac_2slides () const
 
void SetEfrac_2slides (double efrac_2slides)
 
double Efrac_4slides () const
 
void SetEfrac_4slides (double efrac_4slides)
 
double Efrac_6slides () const
 
void SetEfrac_6slides (double efrac_6slides)
 
double Efrac_20slides () const
 
void SetEfrac_20slides (double efrac_20slides)
 
double Efrac_2sigmaHOR () const
 
void SetEfrac_2sigmaHOR (double efrac_2sigmaHOR)
 
double Efrac_4sigmaHOR () const
 
void SetEfrac_4sigmaHOR (double efrac_4sigmaHOR)
 
double Eiso_2sigmaHOR () const
 
void SetEiso_2sigmaHOR (double eiso_2sigmaHOR)
 
double Eiso_4sigmaHOR () const
 
void SetEiso_4sigmaHOR (double eiso_4sigmaHOR)
 
double Eiso_6sigmaHOR () const
 
void SetEiso_6sigmaHOR (double eiso_6sigmaHOR)
 
std::map< int, std::vector< int > > GetPlaneHits ()
 Returns a map where the first element is plane number and the second is vector of global cell indices in a shower of cells that belong to that plane. More...
 
std::map< int, std::vector< int > > GetTransHits ()
 Returns a map where the first index is the number of cells away from the track core, and the second is a vector of global cell indices in a shower that are that many cells from the track core. It callapses the transverse profile of the shower to a single plane. More...
 
virtual double TotalLength () const
 Length (cm) of a shower. More...
 
void SetTotalLength (double length)
 Set length of a shower. More...
 
virtual bool Is3D () const
 
virtual TVector3 Start () const
 
virtual TVector3 Dir () const
 Unit vector describing prong direction. More...
 
virtual void SetStart (TVector3 start)
 
virtual void SetStart (double v0, double z0)
 
virtual void SetDir (TVector3 dir)
 
virtual void SetDir (double dv, double dz)
 
virtual double W (const rb::CellHit *chit) const
 Estimate the unmeasured coordinate of chit. More...
 
virtual double DistanceFromStart (double z) const
 
bool operator< (const Prong &other) const
 
bool operator< (const Cluster &other) const
 
virtual void Add (const art::Ptr< rb::CellHit > &cell, double weight=1)
 
virtual void Add (const art::PtrVector< rb::CellHit > &cells, const std::vector< double > &weights=std::vector< double >())
 
void SetID (int id)
 
const int ID () const
 
bool Is2D () const
 
virtual geo::View_t View () const
 kXorY for 3D clusters. More...
 
rb::Cluster Exclude (const rb::Cluster *excl) const
 Create a cluster from this one, but with the hits of excl removed. More...
 
rb::RecoHit RecoHit (const art::Ptr< rb::CellHit > &chit) const
 Return calibrated hit based on assumed W coordinate. More...
 
rb::RecoHit RecoHit (geo::View_t view, unsigned int viewIdx) const
 
rb::RecoHit RecoHit (unsigned int globalIdx) const
 
virtual void Clear ()
 Forget about all owned cell hits. More...
 
void RemoveHit (const art::Ptr< rb::CellHit > hit)
 Remove hit from current cluster. More...
 
void RemoveHit (unsigned int globalIdx)
 Remove the ith hit from current cluster. More...
 
void SetNoise (bool noise)
 Declare the cluster to consist of noise hits or not. More...
 
bool IsNoise () const
 Is the noise flag set? More...
 
void SetWeight (unsigned int globalIdx, double weight)
 Set weight of the cell at this index. More...
 
void SetWeight (geo::View_t view, unsigned int viewIdx, double weight)
 Set weight of the cell at this index in this view. More...
 
void StandardSort ()
 Put the cells in the cluster into a standard order. More...
 
void SavePrecalcTotalGeV (ESaveGeVMode savemode)
 Store the current result of TotalGeV / CalorimetricEnergy. More...
 
Cell counts
unsigned int NCell (geo::View_t view) const
 Number of cells in view view. More...
 
unsigned int NCell () const
 Number of cells in either view. More...
 
unsigned int NXCell () const
 Number of cells in the x-view. More...
 
unsigned int NYCell () const
 Number of cells in the y-view. More...
 
Cell Accessors
art::Ptr< rb::CellHitCell (geo::View_t view, unsigned int viewIdx) const
 Get the ith cell from view view. More...
 
art::Ptr< rb::CellHitCell (unsigned int globalIdx) const
 Get the ith cell from either view. More...
 
art::Ptr< rb::CellHitXCell (unsigned int xIdx) const
 Get the ith cell in the x-view. More...
 
art::Ptr< rb::CellHitYCell (unsigned int yIdx) const
 Get the ith cell in the y-view. More...
 
const art::PtrVector< rb::CellHit > & XCells () const
 Get all cells from the x-view. More...
 
const art::PtrVector< rb::CellHit > & YCells () const
 Get all cells from the x-view. More...
 
art::PtrVector< rb::CellHitAllCells () const
 Get all cells from both views. More...
 
std::vector< geo::OfflineChanOfflineChans () const
 Positions of all the CellHits. More...
 
std::vector< rb::WeightedHitWeightedHits () const
 Get all hits from both views, with weights attached. More...
 
double Weight (unsigned int globalIdx) const
 Weight assigned to the cell. More...
 
double Weight (geo::View_t view, unsigned int viewIdx) const
 Weight assigned to the cell. More...
 
Minima

The "lower" corner of a box containing all the hits

TVector3 MinXYZ () const
 
double MinV (geo::View_t view) const
 
double MinX () const
 
double MinY () const
 
double MinZ () const
 
double MinTNS () const
 
unsigned int MinPlane (geo::View_t view=geo::kXorY) const
 
unsigned int MinCell (geo::View_t view) const
 
Maxima

The "upper" corner of a box containing all the hits

TVector3 MaxXYZ () const
 
double MaxV (geo::View_t view) const
 
double MaxX () const
 
double MaxY () const
 
double MaxZ () const
 
double MaxTNS () const
 
unsigned int MaxPlane (geo::View_t view=geo::kXorY) const
 
unsigned int MaxCell (geo::View_t view) const
 
Means

The unweighted mean position and time of all the hits in the cluster

TVector3 MeanXYZ (rb::AveragingScheme=kDefaultScheme) const
 
double MeanV (geo::View_t view, rb::AveragingScheme scheme=kDefaultScheme) const
 
double MeanX (rb::AveragingScheme scheme=kDefaultScheme) const
 
double MeanY (rb::AveragingScheme scheme=kDefaultScheme) const
 
double MeanZ (rb::AveragingScheme scheme=kDefaultScheme) const
 
double MeanTNS (rb::AveragingScheme scheme=kDefaultScheme) const
 
void MinMaxMeanXYZ (TVector3 &lo, TVector3 &hi, TVector3 &mean, rb::AveragingScheme scheme=kDefaultScheme) const
 Gets the min/max/mean all at once, called by the functions above. More...
 
Extents

The size of a box containing all the hits

TVector3 ExtentXYZ () const
 
double ExtentV (geo::View_t view) const
 
double ExtentX () const
 
double ExtentY () const
 
double ExtentZ () const
 
unsigned int ExtentPlane (geo::View_t view=geo::kXorY) const
 
unsigned int ExtentCell (geo::View_t view) const
 
double ExtentTNS () const
 
Connectedness measures
int MostContiguousPlanes (geo::View_t view) const
 Longest run of adjacent planes with hits. More...
 
int MostMissingPlanes (geo::View_t view) const
 Longest run of adjacent planes with no hits. More...
 
int NMissingPlanes (geo::View_t view) const
 Total number of missing planes in cluster. More...
 

Protected Member Functions

Internal helpers
void EnsureWeightAlloc ()
 Helper. Resizes weights vectors to match cell vectors. More...
 

Protected Attributes

double fTotalLength
 
TVector3 fStart
 Start location (xyz, cm) More...
 
TVector3 fDir
 Direction at starting point. More...
 
geo::View_t fView
 view this cluster is in More...
 
art::PtrVector< rb::CellHitfXCell
 collection of x-view cells in cluster More...
 
art::PtrVector< rb::CellHitfYCell
 collection of y-view cells in cluster More...
 
std::vector< double > fXWeights
 Weights, matching cell indexing. More...
 
std::vector< double > fYWeights
 May be empty, means all weights are 1. More...
 
int fID
 ID for cluster. More...
 
bool fNoiseCluster
 flag for whether this is a noise cluster More...
 
double fPrecalcTotalGeV
 -1 = uninitialized More...
 

Private Attributes

std::vector< double > fHitDistCol
 
std::vector< double > fHitDeconvECol
 
std::vector< double > fHitSumECol
 
std::vector< TVector3 > fNodesPos
 
std::vector< double > fNodesE
 
std::vector< geo::OfflineChanfNodesXID
 
std::vector< geo::OfflineChanfNodesYID
 
int fNNode
 
TVector3 fStop
 
bool fIsFiducial
 
double fDistToEdge
 
double fDepositEnergy
 
double fExclEnergy
 
double fEnergy
 
double fVtxGeV
 
double fVtxCenterGeV
 
double fVtxCenterGeV5cell
 
double fVtxCenterGeV10cell
 
double fVtxCenterGeV15cell
 
double fVtxCenterGeV20cell
 
double fPi0Mgg
 
int fPi0G2ID
 
double fTheta
 
double fTrkGeV
 
double fSliceGeV
 
double fSliceEtot
 
double fNueEnergy
 
double fSliceEdge10GeV
 
double fSliceEdge5GeV
 
double fSliceEdge2GeV
 
int fNCellToEdge
 
int fClosetEdge
 
double fEdge20GeV
 
double fEdge15GeV
 
double fEdge10GeV
 
double fEdge5GeV
 
double fEdge2GeV
 
double fSliceExclGeV
 
double fRadius
 
double fSumDRadius
 
double fSum10DRadius
 
unsigned fStartPlane
 
unsigned fStopPlane
 
unsigned fNPlane
 
unsigned fXNPlane
 
unsigned fYNPlane
 
unsigned fXMinPlane
 
unsigned fYMinPlane
 
unsigned fXMaxPlane
 
unsigned fYMaxPlane
 
int fNMIPPlane
 
unsigned int fISlice
 
std::vector< double > fPlaneDedx
 
std::vector< double > fPlaneRadius
 
std::vector< double > fPlaneProbE
 
std::vector< double > fPlaneProbEqe
 
std::vector< double > fPlaneProbEres
 
std::vector< double > fPlaneProbEdis
 
std::vector< double > fPlaneProbEcoh
 
std::vector< double > fPlaneProbG
 
std::vector< double > fPlaneProbMu
 
std::vector< double > fPlaneProbPi0
 
std::vector< double > fPlaneProbHad
 
std::vector< double > fPlaneProbProton
 
std::vector< double > fPlaneProbNuetron
 
std::vector< double > fPlaneProbPion
 
std::vector< TVector3 > fPlaneHitXYZ
 
std::vector< intfPlaneE1Cell
 
std::vector< intfPlaneE2Cell
 
std::vector< intfPlaneCentroidCell
 
std::vector< unsigned intfPlaneHitCell
 
double fDedxLongLL [20]
 
double fDedxInvLongLL [20]
 
double fCelltransDedx [20]
 
double fDedxTransLL [20]
 
bool fIsMuon
 
bool fIsInvPhoton
 
bool fBackTag
 
double fGap
 
double fContGap
 
double fVtxDoca
 
TVector3 fCentroid
 
TVector3 fIxyz
 
double fAsym
 
double fANN [20]
 
double fEfrac_2slides
 
double fEfrac_4slides
 
double fEfrac_6slides
 
double fEfrac_20slides
 
double fEfrac_2sigmaHOR
 
double fEfrac_4sigmaHOR
 
double fEiso_2sigmaHOR
 
double fEiso_4sigmaHOR
 
double fEiso_6sigmaHOR
 

Totals

double TotalADC () const
 Sum of the ADC of all the contained hits. More...
 
double TotalPE () const
 Sum of the PE value of all the contained hits. More...
 
double TotalGeV (EEnergyCalcScheme escheme=kRecomputeEnergy) const
 Simple sum of the estimated GeV of all the hits. More...
 
double TotalWeight () const
 Sum of all the weights. The effective number of hits. More...
 
double CalorimetricEnergy (EEnergyCalcScheme escheme=kRecomputeEnergy) const
 Simple estimate of neutrino energy. More...
 
enum  EEnergyCalcScheme { kRecomputeEnergy = 0, kUsePrecalcEnergy = 1 }
 

Detailed Description

TODO.

Definition at line 65 of file JMShower.h.

Member Enumeration Documentation

Enumerator
kRecomputeEnergy 

Default. Ask Calibrator about each hit, and sum.

kUsePrecalcEnergy 

Use a value computed by a previous call to SavePrecalcTotalGeV.

Definition at line 177 of file Cluster.h.

177  {
178  kRecomputeEnergy = 0, ///< Default. Ask Calibrator about each hit, and sum
179  kUsePrecalcEnergy = 1 ///< Use a value computed by a previous call to \ref SavePrecalcTotalGeV
180  };
Use a value computed by a previous call to SavePrecalcTotalGeV.
Definition: Cluster.h:179
Default. Ask Calibrator about each hit, and sum.
Definition: Cluster.h:178
enum rb::Cluster::ESaveGeVMode
inherited
Enumerator
kInitializeTotalGeV 

Default, this is the initial/only call.

kResetTotalGeV 

Altering the already-set value is not an error.

Definition at line 281 of file Cluster.h.

281  {
282  kInitializeTotalGeV = 0, ///< Default, this is the initial/only call
283  kResetTotalGeV = 1 ///< Altering the already-set value is not an error
284  };
Default, this is the initial/only call.
Definition: Cluster.h:282
Altering the already-set value is not an error.
Definition: Cluster.h:283

Constructor & Destructor Documentation

jmshower::JMShower::JMShower ( )
inline

Definition at line 69 of file JMShower.h.

69 {}
virtual jmshower::JMShower::~JMShower ( )
inlinevirtual
jmshower::JMShower::JMShower ( const rb::Prong prong,
int  id = 0,
double  length = 0 
)

Definition at line 13 of file JMShower.cxx.

16  : rb::Shower(prong,
17  id,
18  length)
19  {
20  }
length
Definition: demo0.py:21
A rb::Prong with a length.
Definition: Shower.h:18

Member Function Documentation

void rb::Cluster::Add ( const art::Ptr< rb::CellHit > &  cell,
double  weight = 1 
)
virtualinherited

Definition at line 84 of file Cluster.cxx.

References ana::assert(), rb::Cluster::EnsureWeightAlloc(), rb::Cluster::fPrecalcTotalGeV, rb::Cluster::fView, rb::Cluster::fXCell, rb::Cluster::fXWeights, rb::Cluster::fYCell, rb::Cluster::fYWeights, geo::kX, geo::kY, art::PtrVector< T >::push_back(), and rb::CellHit::View().

Referenced by rb::Cluster::Add(), fuzz::FuzzyKVertex::AddProng(), bpfit::BPFTmvaTrainer::analyze(), bpf::BPFCVNAna::analyze(), htk::HoughTrack::analyze(), rb::Cluster::Cluster(), ddthelpers::cluster_hits(), sn::SNMichelAnalyzer::ClusterAroundTrackEnds(), tdslicer::TDSlicer::DBSCAN(), slicemergeviews::SliceMergeViews::DoMerge(), rb::Cluster::Exclude(), comi::NumiFiltering::filter(), mono::MonopoleCluster::filter(), bsf::BremShowerFilter::filter(), mono::MonopoleTrack::filter(), mono::MonopoleCluster::find_isolated_hits(), trk::KalmanTrack::FindTracks(), cosrej::CosRejFxs::getActivity(), numusand::NumuSandFxs::getActivityVtx(), ndreco::NDRecoFxs::getProngActivity(), ndreco::NDRecoFxs::getProngDedx(), ndreco::NDRecoFxs::getTrackActivity(), ndreco::NDRecoFxs::getTrackDedx(), trk::KalmanTrackMerge::JoinTracks(), trk::WindowTrackingAlg::LookForBremsstrahlungHits(), mono::Cluster::make(), me::MEFinder::MakeSlcME(), fuzz::ViewMatchAlg::MakeTestProng(), nerd::ViewMatchAlg::MakeTestProng(), trk::WindowTrackingAlg::MakeTrack(), airshower::AirSlicer::MakeTrackSlices(), me::MEFinder::MakeTrkME(), numue::NumuEAlg::MakeVertexCluster(), fuzz::ViewMatchAlg::Matching(), nerd::ViewMatchAlg::Matching(), trk::KalmanTrackMerge::MatchTracks(), cheat::BackTracker::MCTruthToCluster(), qeef::QeFinder::produce(), slicer::Slicer4D::produce(), nuesand::FillNueSandbox::produce(), slid::Recluster::produce(), numusand::FillSandbox::produce(), cvn::CVNCosmicMapper::produce(), zcl::SPCluster::produce(), airshower::AirSlicer::produce(), zcl::SMMCluster::produce(), sn::SNSlicer::produce(), zcl::FMMTracker::produce(), sn::SupernovaMCCluster::produce(), cvn::CVNMapper::produce(), dif::DiFShowerFinder::produce(), bpfit::BPFEnergyEstimator::produce(), bpfit::BPFEnergyEstimatorOnly::produce(), tdslicer::TDSlicer::produce(), trk::WindowTrackingAlg::ShortTrack(), trk::WindowTrackingAlg::ShortTrackExtraPlane(), airshower::AirSlicer::TemporalClusters(), dt::Cand::ToTrack(), htk::Track3D::Track3D(), mono::Track3D::Track3D(), zcl::FMMTracker::Tracking2D(), slicemergeviews::SliceMergeViews::TrimNoise(), tdslicer::TDSlicer::TrimNoise(), trk::KalmanTrackMerge::ViewMergeTracks(), slicer::MMSlicer::WindowSlice(), and slicer::Slicer::WindowSlice().

85  {
86  fPrecalcTotalGeV = -1; // Invalidate any cached value
87 
88  assert(weight >= 0 && weight <= 1);
89 
90  // Are we optimizing (omitting) the weights storage?
91  const bool optWeights = (weight == 1 && fXWeights.empty() && fYWeights.empty());
92  if(!optWeights) EnsureWeightAlloc();
93 
94  if(cell->View() == geo::kX){
95  assert(fView != geo::kY);
96  fXCell.push_back(cell);
97  if(!optWeights) fXWeights.push_back(weight);
98  }
99  else{
100  assert(fView != geo::kX);
101  fYCell.push_back(cell);
102  if(!optWeights) fYWeights.push_back(weight);
103  }
104  }
double fPrecalcTotalGeV
-1 = uninitialized
Definition: Cluster.h:324
const Var weight
geo::View_t View() const
Definition: CellHit.h:41
Vertical planes which measure X.
Definition: PlaneGeo.h:28
art::PtrVector< rb::CellHit > fYCell
collection of y-view cells in cluster
Definition: Cluster.h:318
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
art::PtrVector< rb::CellHit > fXCell
collection of x-view cells in cluster
Definition: Cluster.h:317
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
geo::View_t fView
view this cluster is in
Definition: Cluster.h:316
std::vector< double > fXWeights
Weights, matching cell indexing.
Definition: Cluster.h:319
assert(nhit_max >=nhit_nbins)
void EnsureWeightAlloc()
Helper. Resizes weights vectors to match cell vectors.
Definition: Cluster.cxx:712
std::vector< double > fYWeights
May be empty, means all weights are 1.
Definition: Cluster.h:320
void rb::Cluster::Add ( const art::PtrVector< rb::CellHit > &  cells,
const std::vector< double > &  weights = std::vector<double>() 
)
virtualinherited

Definition at line 107 of file Cluster.cxx.

References rb::Cluster::Add(), ana::assert(), art::PtrVector< T >::empty(), getGoodRuns4SAM::n, and art::PtrVector< T >::size().

109  {
110  const unsigned int N = cells.size();
111 
112  assert(weights.empty() || weights.size() == N);
113 
114  for(unsigned int n = 0; n < N; ++n){
115  assert(weights.empty() || (weights[n] >= 0 && weights[n] <= 1));
116  Add(cells[n], weights.empty() ? 1 : weights[n]);
117  }
118  }
virtual void Add(const art::Ptr< rb::CellHit > &cell, double weight=1)
Definition: Cluster.cxx:84
Var weights
size_type size() const
Definition: PtrVector.h:308
assert(nhit_max >=nhit_nbins)
art::PtrVector< rb::CellHit > rb::Cluster::AllCells ( ) const
inherited

Get all cells from both views.

Definition at line 180 of file Cluster.cxx.

References plot_validation_datamc::c, rb::Cluster::fXCell, rb::Cluster::fYCell, art::PtrVector< T >::push_back(), and art::PtrVector< T >::size().

Referenced by caf::AddSlcMEToVec(), caf::AddTrkMEToVec(), qeef::QeFinderVal::analyze(), calib::TestParticleCorrections::analyze(), sn::SNSlicerAna::analyze(), murem::MuonRemoveAna::analyze(), calib::HitEfficiency::analyze(), validation::NoiseClusterAnalysis::analyze(), showere::ShowerEnergyAna::analyze(), hough::HoughValidate::analyze(), zcl::FastMMStudy::analyze(), upmuana::UpMuRecoAna::analyze(), upmuana::UpMuAnalysis::analyze(), htk::HoughTrack::analyze(), murem::MRCCAna::analyze(), trk::KalmanTrackAna::CheckAssociations(), air::AirKalmanAna::CheckAssociations(), cheat::RecoCheckAna::CheckRecoClusters(), trk::KalmanTrackAna::CheckRecoTracks(), trk::WindowTrackingAlg::CheckTrackDirectionInY(), bpfit::dEdxCalculator::computeDEDX(), skim::SkimmingUtils::CopySlice(), murem::TrackCleanUpAlg::DeDxInPlane(), nnbar::NNbarUtilities::energyBalancingVertex(), dt::ViewMerger::FakeThirdDimension(), caf::FillDiFShowerVars(), caf::FillDiFVars(), calib::StopperThreshold::FillHist(), calib::CosmicTrends::FillHistograms(), caf::FillProngVars(), caf::FillShowerVars(), calib::StopperThreshold::FillTree(), trk::CosmicTrackAna::FillTrueInfo(), showere::ShowerEnergyFilterMC::filter(), sn::SNSlicer::FinalizeCluster(), cvn::Get2DProngEfficiencyByPDG(), cvn::Get2DProngEnergyByPDG(), cvn::Get2DProngPurityByPDG(), nnbar::NNbarUtilities::getCoordinateOfHits(), nuesand::FillNueSandbox::GetdEdx(), numusand::NumuSandFxs::getMissingE(), nnbar::NNbarUtilities::getMultipleCellFraction(), ndreco::NDRecoFxs::getProngActivity(), ndreco::NDRecoFxs::getProngDedx(), cvn::GetProngEfficiencyByPDG(), cvn::GetProngEnergyByPDG(), cvn::GetProngPurityByPDG(), nnbar::NNbarUtilities::getSliceBoundary(), nnbar::NNbarUtilities::getSliceTimeWindow(), ndreco::NDRecoFxs::getTrackActivity(), ndreco::NDRecoFxs::getTrackDedx(), nnbar::NNbarUtilities::getXyAsymmetry(), nnbar::NNbarUtilities::isFebFlasher(), novaddt::HorizontalMuonAna::IsHorzMuonTrack(), caf::IsTrueDiF(), calib::RockMuonStopperSelection::IsTrulyContainedStopper(), calib::StopperSelection::IsTrulyContainedStopper(), calib::RockMuonStopperSelection::IsTrulyInFiducial(), calib::ThroughgoingSelection::IsTrulyUncontained(), trk::KalmanTrackMerge::JoinTracks(), dt::ViewMerger::JoinTracks(), trk::WindowTrackingAlg::MakeTrack(), airshower::AirSlicer::MakeTrackSlices(), murem::FindParent::MatchToOrigSlice(), numue::NumuEAlg::MCTruthEnergyVariables(), murem::MuonRemove::MuonInfo(), mono::Monopole::n_mc_hits(), dq::FlasherFinder::Nflash(), zcl::FastMonopoleTriggers::NumberOfCellsPerLength(), zcl::FastMMStudy::NumberOfCellsPerLength(), zcl::FastMonopoleTriggers::NumberOfHitsInOverlapPlanesCut(), zcl::FastMMStudy::NumberOfHitsInOverlapPlanesCut(), mono::operator<<(), skim::ParametersNumu::ParametersNumu(), calib::PCHitsList::ProcessTrackForBelowThresholdHits(), calib::PCHitsList::ProcessTrackForFLSHits(), trk::TrkAssn::produce(), slid::Recluster::produce(), numusand::FillSandbox::produce(), hough::MultiHoughT::produce(), cosrej::CosRej::produce(), numue::NumuEnergy::produce(), earms::ElasticArmsHS::produce(), ndreco::NDReco::produce(), vdt::VertexDT::produce(), upmuana::UpMuProb::produce(), fuzz::FuzzyKVertex::produce(), nerd::NERDProng::produce(), caf::CAFMaker::produce(), cvn::ProngClassify(), sn::SliceRemover::remove(), murem::MuonRemove::RemoveByEfficiency(), trk::WindowTrackingAlg::SetTrackEndPoints(), trk::WindowTrackingAlg::ShortTrack(), cheat::BackTracker::SliceToMCTruth(), cheat::BackTracker::SliceToNeutrinoInteractions(), cosrej::MakeNueCosRej::SparsenessAsymmetry(), zcl::FastMonopoleTriggers::StdevCellsPerPlane(), zcl::FastMMStudy::StdevCellsPerPlane(), htk::Track3D::time_fit(), mono::Track3D::time_fit(), htk::Track3D::Track3D(), mono::Track3D::Track3D(), slid::NuEEnergyAlg::VertexEnergy(), zcl::FastMonopoleTriggers::WeightedCenterCut(), zcl::FastMMStudy::WeightedCenterCut(), moonshadowana::MoonShadowAna::WriteTrackInfo(), moonshadowana::MoonShadowAnaHough::WriteTrackInfo(), rb::Cluster::YCells(), dt::ViewMerger::ZipVerticalTracks(), and rb::Track::ZipWith().

181  {
183  for(size_t c = 0; c < fXCell.size(); ++c) all.push_back(fXCell[c]);
184  for(size_t c = 0; c < fYCell.size(); ++c) all.push_back(fYCell[c]);
185 
186  return all;
187  }
art::PtrVector< rb::CellHit > fYCell
collection of y-view cells in cluster
Definition: Cluster.h:318
art::PtrVector< rb::CellHit > fXCell
collection of x-view cells in cluster
Definition: Cluster.h:317
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
size_type size() const
Definition: PtrVector.h:308
double jmshower::JMShower::ANN ( unsigned int  mode) const

Definition at line 758 of file JMShower.cxx.

References fANN, and submit_nova_art::mode.

759  {
760  return fANN[mode];
761  }
double fANN[20]
Definition: JMShower.h:423
double jmshower::JMShower::Asym ( ) const

Definition at line 905 of file JMShower.cxx.

References fAsym.

906  {
907  return fAsym;
908  }
bool jmshower::JMShower::BackTag ( ) const

Definition at line 404 of file JMShower.cxx.

References fBackTag.

405  {
406  return fBackTag;
407  }
double rb::Cluster::CalorimetricEnergy ( EEnergyCalcScheme  escheme = kRecomputeEnergy) const
inherited

Simple estimate of neutrino energy.

Uses a simple scale factor to correct for dead material and thresholds, could be more advanced, but this is simple enough to use for preselection etc.

Definition at line 439 of file Cluster.cxx.

References calib::Calibrator::GetGeVToCalorimetricScale(), and rb::Cluster::TotalGeV().

Referenced by caf::AddSlcMEToVec(), caf::AddTrkMEToVec(), tbem::TBRecoAna::analyze(), ncid::CompareByCalEnergy(), cosrej::CompareByCalEnergy(), caf::FillDiFShowerVars(), caf::FillDiFVars(), caf::FillHadClustVars(), caf::FillProngVars(), caf::FillShowerVars(), caf::FillSliceVars(), xsrec::MakeXSecCCPi0Inc::GetPhLL(), numue::NumuEAlg::GetUCMuonENonSingle(), numue::NumuEAlg::GetUCMuonESingle(), SliceLID::BasicProngVars::initBasicVars(), LSTME::BasicProngVars::initBasicVars(), me::MEFinder::MakeSlcME(), me::MEFinder::MakeTrkME(), skim::ParametersNue::ParametersNue(), skim::ParametersNumu::ParametersNumu(), me::MEFinder::PassesMEPresel(), presel::LEMPresel::produce(), numusand::FillSandbox::produce(), presel::NuePresel::produce(), cosrej::CosRej::produce(), cosrej::MakeNueCosRej::produce(), caf::CAFMaker::produce(), showerByEnergyNue(), showerByEnergyNumu(), lem::LEMSummarizer::SliceToLEMInput(), and ncid::NCNNKeras::TransMomFraction().

440  {
442  return cal->GetGeVToCalorimetricScale()*TotalGeV(escheme);
443  }
double GetGeVToCalorimetricScale() const
For use by RecoBase classes.
double TotalGeV(EEnergyCalcScheme escheme=kRecomputeEnergy) const
Simple sum of the estimated GeV of all the hits.
Definition: Cluster.cxx:378
art::Ptr< rb::CellHit > rb::Cluster::Cell ( geo::View_t  view,
unsigned int  viewIdx 
) const
inherited

Get the ith cell from view view.

Definition at line 145 of file Cluster.cxx.

References ana::assert(), geo::kX, geo::kXorY, geo::kY, rb::Cluster::XCell(), and rb::Cluster::YCell().

Referenced by dqsf::DQSpillFlags::AccumulateSyncMetric(), rb::HitMap::Add(), fuzz::FuzzyKVertex::AddProng(), dif::DiFShowerFinder::adjustPlane(), dif::DiFShowerFinder::adjustPlane_end(), tut::TutAnalyzer::analyze(), qeef::QeFinderVal::analyze(), rsim::RecordNoiseSpectrumFile::analyze(), chaninfo::CosmicEff::analyze(), remid::ReMIdValidate::analyze(), comi::CosmicMetrics::analyze(), dprf::ChannelPlots::analyze(), calib::TestParticleCorrections::analyze(), remid::ReMIdTrain::analyze(), mcchk::MonopoleAna::analyze(), dprf::TrackPlots::analyze(), mcchk::RockAna::analyze(), align::Alignment::analyze(), align::SplitTracks::analyze(), murem::MuonRemoveAna::analyze(), pa::ClusterEva::analyze(), vf::TrackEva::analyze(), comi::NumiFilteringAna::analyze(), tbem::TBRecoAna::analyze(), zcl::FmmTriggerAna::analyze(), zcl::FmmTrackerAna::analyze(), zcl::FmmTrackerValidation::analyze(), showere::ShowerEnergyAna::analyze(), bpfit::BPFTmvaTrainer::analyze(), bpf::BPFCVNAna::analyze(), calib::CosmicTrends::analyze(), calib::CalibAna::analyze(), ncs::Xeff::analyze(), ncs::ROCKMRE::analyze(), ncs::NCAna::analyze(), bpfit::DimuonFitter::AnaSlice(), me::MEFinder::BestSlcMatch(), fuzz::ViewMatchAlg::CalcEnergyProfile(), nerd::ViewMatchAlg::CalcEnergyProfile(), trk::KalmanTrackMerge::CalcMatchScore(), slid::ParticleIDAlg::CalcPlaneHits(), trk::KalmanTrackMerge::CanJoinTracks(), slid::NuEEnergyAlg::CellEnergy(), murem::TrackCleanUpAlg::CleanUpTrack(), bpfit::dEdxCalculator::computeDEDX(), remid::ReMIdTrain::ContainedEvent(), remid::ReMIdDedx::ContainedEvent(), remid::ReMIdDedxRock::ContainedEvent(), remid::ReMIdDedxStudies::ContainedEvent(), cvn::RegPixelMapProducer::CreateMapGivenBoundary(), cvn::PixelMapProducer::CreateMapGivenBoundary(), cvn::RegPixelMapProducer::CreateMapGivenShowerVertex(), cvn::RegPixelMapProducer::CreateMapGivenVertex(), jmshower::RecoJMShower::DepositEnergy(), evd::RecoBaseDrawer::DrawTrack2D(), skim::ParametersNumu::EarliestLatestHitPos(), jmshower::RecoJMShower::Energy(), dif::DiFShowerFinder::eparm(), rb::Cluster::Exclude(), dt::ViewMerger::Extremes(), caf::FillHadClustVars(), calib::StopperThreshold::FillHist(), bpfit::BreakPoint::FillHitList(), sn::SupernovaAna::FillPlaneSeperations(), dqsf::DQSpillFlags::FillPopulatedDCMs(), caf::FillProngVars(), trk::CosmicTrackAna::FillRecoInfo(), caf::FillSliceInfo(), caf::FillSliceVars(), trk::CosmicTrackAna::FillTrackHistograms(), calib::StopperThreshold::FillTree(), comi::NumiFiltering::filter(), bsf::BremShowerFilter::filter(), showere::ShowerEnergyFilterMC::filter(), cvn::RegPixelMapProducer::FindCenterMedian(), cvn::PixelMapProducer::FindCenterMedian(), airshower::AirSlicer::FindNeighbors(), bsf::BremShowerFilter::findShowerByReco(), dif::DiFShowerFinder::findShowerByReco(), trk::KalmanTrack::FindTracks(), trk::CosmicTrackUtilities::FindTriCells(), cvn::RegPixelMapProducer::FindVertexMaxGap(), cvn::PixelMapProducer::FindVertexMaxGap(), cvn::RegPixelMapProducer::FindVertexWindowThreshold(), cvn::PixelMapProducer::FindVertexWindowThreshold(), bpfit::DimuonFitter::FindVertexZ(), bpfit::BreakPoint::FitTracks(), bpfit::DimuonFitter::FitView(), nuesand::FillNueSandbox::FracAngChanges(), nuesand::FillNueSandbox::FracModalHits(), nuesand::FillNueSandbox::FracNonContiguous(), numusand::NumuSandFxs::getActivity(), numusand::NumuSandFxs::getAveTrackdEdx(), numusand::NumuSandFxs::getAveTrackdEdxLast4Cells(), numusand::NumuSandFxs::getAveTrackdEdxLast6Cells(), numusand::NumuSandFxs::getAveTrackdEdxLast8Cells(), trackinfo::TrackInfoFxs::getAveTrackdEdxLastCells(), cosrej::CosRejFxs::getBBC(), evd::SliceNavigator::GetBounds(), evd::SliceNavigator::GetBox(), evd::RecoBaseDrawer::GetClusterOutlines(), evd::RecoBaseDrawer::GetClusterOutlinesConvexHull(), nuesand::FillNueSandbox::GetdEdx(), cosrej::CosRejFxs::getFits(), jmshower::RecoJMShower::GetPlaneCentroidCell(), jmshower::RecoJMShower::GetPlaneE1Cell(), GetPlaneHits(), jmshower::RecoJMShower::GetRVPStats(), GetTransHits(), calib::PCHitsList::GetTrueEnergyPathAndLightForCell(), slid::DeconvolveAlg::GetWeights(), slid::NuEEnergyAlg::HadronicDepEnergy(), rb::HitList::HitList(), cvn::HitNuIndex(), tf::TimingFitAlg::HoughFit(), zcl::FastMonopoleTriggers::is_trigger_by_epoch1_fmmtrigger(), trk::CosmicTrackSelection::IsCalibTrack(), calib::RockMuonStopperSelection::IsContainedStopper(), calib::PCHitsList::IsGoodTrack(), trk::CosmicTrackAlg::IsTrackDownstreamFromTiming(), trk::KalmanTrackMerge::JoinTracks(), fuzz::ViewMatchAlg::MakeTestProng(), nerd::ViewMatchAlg::MakeTestProng(), trk::CosmicTrackAlg::MakeTrack(), me::MEFinder::MakeTrkME(), murem::FindParent::MatchToOrigSlice(), rb::Cluster::MaxCell(), nuesand::FillNueSandbox::MaxGap(), nuesand::FillNueSandbox::MaxHits(), rb::Cluster::MaxPlane(), rb::Cluster::MaxTNS(), rb::Cluster::MeanTNS(), dt::DiscreteTracker::MergeParasiteTracks(), rb::Cluster::MinCell(), nerd::NERDProng::MinHitClusterDist(), me::MEFinder::MinHitSlcDist(), rb::Cluster::MinMaxMeanXYZ(), rb::Cluster::MinPlane(), rb::Cluster::MinTNS(), rb::Cluster::MostContiguousPlanes(), rb::Cluster::MostMissingPlanes(), murem::MuonRemove::MuonInfo(), dif::DiFShowerFinder::muonstub(), rb::Cluster::NCell(), numue::NumuEAlg::NDEnergy(), numue::NumuEAlg::NDTrackEnergySplitting(), rb::Cluster::NMissingPlanes(), zcl::FmmTriggerEvd::NumberOfCellsPerLength(), zcl::FmmTriggerEvd::NumberOfHitsInOverlapPlanesCut(), zcl::FastMonopoleTriggers::NumberOfSurfaceHits(), zcl::FastMMStudy::NumberOfSurfaceHits(), rb::Cluster::OfflineChans(), skim::ParametersNumu::ParametersNumu(), zcl::FastMonopoleTriggers::passed_epoch2_fmmtrigger(), rb::Track::PlaneDirMap(), slid::ParticleIDAlg::PlaneRadius(), calib::PCHitsList::ProcessTrack(), calib::PCHitsList::ProcessTrackTrajectory(), trk::TrkAssn::produce(), vf::VertexFinder::produce(), qeef::QeFinder::produce(), hv::HoughVertex::produce(), nuesand::FillNueSandbox::produce(), slid::Recluster::produce(), numusand::FillSandbox::produce(), presel::NuePresel::produce(), lem::Preselection::produce(), slid::SliceLIDBuilder::produce(), zcl::SPCluster::produce(), lem::MakeLibrary::produce(), earms::ElasticArmsHS::produce(), dt::DiscreteTracker::produce(), zcl::SMMCluster::produce(), zcl::FMMTracker::produce(), zcl::FmmTriggerEvd::produce(), jmshower::NueSel::produce(), dif::DiFShowerFinder::produce(), rvp::RecVarPID::produce(), jmshower::NueSelLID::produce(), bpfit::BPFEnergyEstimator::produce(), bpfit::BPFEnergyEstimatorOnly::produce(), caf::CAFMaker::produce(), slid::ParticleIDAlg::Radius(), jmshower::RecoJMShower::Radius(), jmshower::RecoJMShower::RadiusV(), rb::Cluster::RecoHit(), jmshower::RecoJMShower::RecoShowers(), murem::MuonRemove::RemoveByTruth(), trk::KalmanTrack::RemoveHitsFromSignal(), trk::KalmanTrackMerge::ShiftInterpolationPoints(), lem::MakeLibrary::SliceMeanPosEWeighted(), lem::MakeLibrary::SliceOrigin(), lem::LEMSummarizer::SliceToLEMInput(), zcl::FmmTriggerEvd::StdevCellsPerPlane(), calib::StopperThreshold::testPath(), rb::Cluster::TotalADC(), dt::ViewMerger::TotalChargePerView(), rb::Prong::TotalLength(), rb::Cluster::TotalPE(), trk::CosmicTrackUtilities::TrackResiduals(), trk::KalmanTrackMerge::ViewMergeTracks(), rb::Prong::W(), rb::Track::W(), and rb::Cluster::WeightedHits().

147  {
148  switch(view){
149  case geo::kX: return XCell(viewIdx);
150  case geo::kY: return YCell(viewIdx);
151  case geo::kXorY: return Cell(viewIdx);
152  default: assert(0 && "Unknown view");
153  }
154  }
art::Ptr< rb::CellHit > XCell(unsigned int xIdx) const
Get the ith cell in the x-view.
Definition: Cluster.cxx:157
X or Y views.
Definition: PlaneGeo.h:30
Vertical planes which measure X.
Definition: PlaneGeo.h:28
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
art::Ptr< rb::CellHit > YCell(unsigned int yIdx) const
Get the ith cell in the y-view.
Definition: Cluster.cxx:165
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
assert(nhit_max >=nhit_nbins)
art::Ptr< rb::CellHit > rb::Cluster::Cell ( unsigned int  globalIdx) const
inherited

Get the ith cell from either view.

Definition at line 173 of file Cluster.cxx.

References rb::Cluster::NXCell(), rb::Cluster::XCell(), and rb::Cluster::YCell().

174  {
175  if(globalIdx < NXCell()) return XCell(globalIdx);
176  return YCell(globalIdx-NXCell());
177  }
art::Ptr< rb::CellHit > XCell(unsigned int xIdx) const
Get the ith cell in the x-view.
Definition: Cluster.cxx:157
art::Ptr< rb::CellHit > YCell(unsigned int yIdx) const
Get the ith cell in the y-view.
Definition: Cluster.cxx:165
unsigned int NXCell() const
Number of cells in the x-view.
Definition: Cluster.h:106
double jmshower::JMShower::CellTransDedx ( unsigned int  tcell) const

Definition at line 696 of file JMShower.cxx.

References fCelltransDedx.

697  {
698  if(tcell>=20)return 0;
699  return fCelltransDedx[tcell];
700  }
double fCelltransDedx[20]
Definition: JMShower.h:411
TVector3 jmshower::JMShower::Centroid ( ) const

Definition at line 445 of file JMShower.cxx.

References fCentroid.

446  {
447  return fCentroid;
448  }
TVector3 fCentroid
Definition: JMShower.h:419
void rb::Cluster::Clear ( )
virtualinherited

Forget about all owned cell hits.

Virtual function because derived classes may have more stuff to clear

Definition at line 279 of file Cluster.cxx.

References art::PtrVector< T >::clear(), rb::Cluster::fPrecalcTotalGeV, rb::Cluster::fXCell, rb::Cluster::fXWeights, rb::Cluster::fYCell, and rb::Cluster::fYWeights.

Referenced by bsf::BremShowerFilter::filter(), mono::Cluster::make(), calib::PCHitsList::ProcessTrackForFLSHits(), nuesand::FillNueSandbox::produce(), cvn::CVNCosmicMapper::produce(), jmshower::RecoJMShower::RecoShowers(), and rb::Cluster::YCells().

280  {
281  fPrecalcTotalGeV = -1; // Invalidate any cached value
282 
283  fXCell.clear();
284  fYCell.clear();
285  fXWeights.clear();
286  fYWeights.clear();
287  }
double fPrecalcTotalGeV
-1 = uninitialized
Definition: Cluster.h:324
art::PtrVector< rb::CellHit > fYCell
collection of y-view cells in cluster
Definition: Cluster.h:318
art::PtrVector< rb::CellHit > fXCell
collection of x-view cells in cluster
Definition: Cluster.h:317
std::vector< double > fXWeights
Weights, matching cell indexing.
Definition: Cluster.h:319
void clear()
Definition: PtrVector.h:537
std::vector< double > fYWeights
May be empty, means all weights are 1.
Definition: Cluster.h:320
int jmshower::JMShower::ClosetEdge ( ) const

Definition at line 311 of file JMShower.cxx.

References fClosetEdge.

312  {
313  return fClosetEdge;
314  }
double jmshower::JMShower::ContGap ( ) const

Definition at line 425 of file JMShower.cxx.

References fContGap.

426  {
427  return fContGap;
428  }
double jmshower::JMShower::DedxInvLongLL ( int  type) const

Definition at line 684 of file JMShower.cxx.

References fDedxInvLongLL.

Referenced by jmshower::RecoJMShower::IsInvPhoton().

685  {
686  if(type>=20)return -9999;
687  return fDedxInvLongLL[type];
688  }
double fDedxInvLongLL[20]
Definition: JMShower.h:410
double jmshower::JMShower::DedxLongLL ( int  type) const

Definition at line 672 of file JMShower.cxx.

References fDedxLongLL.

Referenced by jmshower::RecoJMShower::CalcANN(), jmshower::RecoJMShower::IsInvPhoton(), and jmshower::RecoJMShower::IsMuon().

673  {
674  if(type>=20)return -9999;
675  return fDedxLongLL[type];
676  }
double fDedxLongLL[20]
Definition: JMShower.h:409
double jmshower::JMShower::DedxTransLL ( int  type) const

Definition at line 708 of file JMShower.cxx.

References fDedxTransLL.

Referenced by jmshower::RecoJMShower::CalcANN(), and jmshower::RecoJMShower::IsMuon().

709  {
710  if(type>=20)return -9999;
711  return fDedxTransLL[type];
712  }
double fDedxTransLL[20]
Definition: JMShower.h:412
double jmshower::JMShower::DepositEnergy ( ) const

Definition at line 127 of file JMShower.cxx.

References fDepositEnergy.

128  {
129  return fDepositEnergy;
130  }
double fDepositEnergy
Definition: JMShower.h:340
virtual TVector3 rb::Prong::Dir ( ) const
inlinevirtualinherited

Unit vector describing prong direction.

For 2D prongs the unmeasured component is zero

Definition at line 77 of file Prong.h.

References rb::Prong::DistanceFromStart(), rb::Prong::fDir, rb::Prong::operator<(), fhicl::other, rb::Prong::SetDir(), rb::Prong::SetStart(), rb::Prong::TotalLength(), rb::Prong::W(), and test::z.

Referenced by dif::DiFShowerFinder::adjustPlane(), dif::DiFShowerFinder::adjustPlane_end(), comi::CosmicMetrics::analyze(), murem::MuonRemoveAna::analyze(), vf::TrackEva::analyze(), calib::HitEfficiency::analyze(), tbem::TBRecoAna::analyze(), trk::KalmanTrackAna::analyze(), bpf::BPFCVNAna::analyze(), calib::CalibAna::analyze(), upmuana::UpMuAnalysis::analyze(), red::EWCosmics::analyze(), slid::ParticleIDAlg::CalcAsymIneria(), slid::ParticleIDAlg::CalcCellPlaneTransverseDedx(), slid::ParticleIDAlg::CalcInterPlaneDedxProb(), slid::ParticleIDAlg::CalcPlaneHits(), slid::ParticleIDAlg::CalcPlaneTransverseDedx(), slid::ParticleIDAlg::CalcTrkHitPath(), remid::ReMIdTrain::ContainedEvent(), remid::ReMIdDedx::ContainedEvent(), remid::ReMIdDedxFD::ContainedEvent(), remid::ReMIdDedxRock::ContainedEvent(), remid::ReMIdDedxStudies::ContainedEvent(), murem::TrackCleanUpAlg::DeDxInPlane(), slid::ParticleIDAlg::DedxInverseLongLL(), slid::ParticleIDAlg::DedxLongLL(), dif::DiFShowerFinder::distancefromtrack(), slid::DeconvolveAlg::DistanceToCore(), vf::DOCAInfo::DOCAInfo(), dif::DiFShowerFinder::eparm(), dt::ViewMerger::FakeThirdDimension(), caf::FillDiFShowerVars(), calib::CosmicTrends::FillHistograms(), caf::FillProngVars(), trk::CosmicTrackAna::FillRecoInfo(), fnex::NuMuAnalysisSetup::FillRecoVars(), caf::FillShowerVars(), filter::Filter::FillTrackVariables(), trk::CosmicTrackAna::FillTrueInfo(), comi::NumiFiltering::filter(), bsf::BremShowerFilter::findShowerByReco(), dif::DiFShowerFinder::findShowerByReco(), bsf::BremShowerFilter::findShowerByTruth(), trk::KalmanTrack::FindTracks(), jmshower::RecoJMShower::GetCellTransDedx(), cosrej::CosRejFxs::getCVVars(), nuesand::FillNueSandbox::GetdEdx(), cosrej::CosRejFxs::getFits(), jmshower::RecoJMShower::GetInterPlaneDedxProb(), ndreco::NDRecoFxs::getProngActivity(), ndreco::NDRecoFxs::getProngDedx(), ndreco::NDRecoFxs::getProngProximity(), jmshower::RecoJMShower::GetShwStop(), nuesand::FillNueSandbox::GetTrackAngle(), GetTransHits(), jmshower::RecoJMShower::GetTrkHitPath(), jmshower::RecoJMShower::GetTrkHitPos(), jmshower::RecoJMShower::GetTrkPlaneCell(), jmshower::RecoJMShower::GetTrkPlaneDistToEdge(), jmshower::RecoJMShower::GetTrkPlanePos(), trk::CosmicTrackSelection::GoodReco(), tf::TimingFitAlg::HoughFit(), LSTME::BasicProngVars::initBasicVars(), trk::CosmicTrackSelection::IsCalibTrack(), calib::PCHitsList::IsGoodTrack(), fuzz::ViewMatchAlg::MakeTestProng(), nerd::ViewMatchAlg::MakeTestProng(), trk::CosmicTrackAlg::MakeTrack(), fuzz::ViewMatchAlg::Matching(), nerd::ViewMatchAlg::Matching(), murem::MuonRemove::MuonInfo(), cosrej::MakeNueCosRej::MuonParentByDist(), cosrej::MakeNueCosRej::MuonParentByTime(), dif::DiFShowerFinder::muonstub(), skim::ParametersNumu::ParametersNumu(), slid::ParticleIDAlg::PlaneHitCell(), slid::ParticleIDAlg::PlaneHitXYZ(), slid::ParticleIDAlg::PlaneRadius(), wsnumu::WSNumu::produce(), presel::CosmicVeto::produce(), trackinfo::TrackInfo::produce(), nussand::FillNusSandbox::produce(), slid::Recluster::produce(), slid::SliceLIDBuilder::produce(), cosrej::CosRej::produce(), ndreco::NDReco::produce(), remid::RecoMuon::produce(), cosrej::MakeNueCosRej::produce(), fuzz::FuzzyKVertex::produce(), nerd::NERDProng::produce(), slid::ParticleIDAlg::Radius(), jmshower::RecoJMShower::RecoShowers(), trk::WindowTrackingAlg::SetTrackEndPoints(), trk::WindowTrackingAlg::ShortTrack(), trk::WindowTrackingAlg::ShortTrackExtraPlane(), slid::NuEEnergyAlg::VertexEnergy(), and trk::KalmanTrackMerge::ViewMergeTracks().

77 {return fDir;}
TVector3 fDir
Direction at starting point.
Definition: Prong.h:112
double rb::Prong::DistanceFromStart ( double  z) const
virtualinherited
Parameters
zz-coordinate to evaluate trajectory at
Returns
Distance from Start measured along the trajectory

Reimplemented in rb::Track.

Definition at line 214 of file Prong.cxx.

References rb::Prong::fDir, and rb::Prong::fStart.

Referenced by rb::Prong::Dir().

215  {
216  // A prong is a straight line so this is easy
217 
218  // For a completely vertical track any answer is nonsense
219  if(fDir.Z() == 0) return 0;
220 
221  return (z-fStart.Z())/fDir.Z();
222  }
TVector3 fDir
Direction at starting point.
Definition: Prong.h:112
z
Definition: test.py:28
TVector3 fStart
Start location (xyz, cm)
Definition: Prong.h:111
double jmshower::JMShower::DistToEdge ( ) const

Definition at line 117 of file JMShower.cxx.

References fDistToEdge.

118  {
119  return fDistToEdge;
120  }
double fDistToEdge
Definition: JMShower.h:339
double jmshower::JMShower::Edge10GeV ( ) const

Definition at line 340 of file JMShower.cxx.

References fEdge10GeV.

341  {
342  return fEdge10GeV;
343  }
double jmshower::JMShower::Edge15GeV ( ) const

Definition at line 330 of file JMShower.cxx.

References fEdge15GeV.

331  {
332  return fEdge15GeV;
333  }
double jmshower::JMShower::Edge20GeV ( ) const

Definition at line 321 of file JMShower.cxx.

References fEdge20GeV.

322  {
323  return fEdge20GeV;
324  }
double jmshower::JMShower::Edge2GeV ( ) const

Definition at line 358 of file JMShower.cxx.

References fEdge2GeV.

359  {
360  return fEdge2GeV;
361  }
double jmshower::JMShower::Edge5GeV ( ) const

Definition at line 349 of file JMShower.cxx.

References fEdge5GeV.

350  {
351  return fEdge5GeV;
352  }
double jmshower::JMShower::Efrac_20slides ( ) const

Definition at line 794 of file JMShower.cxx.

References fEfrac_20slides.

795  {
796  return fEfrac_20slides;
797  }
double fEfrac_20slides
Definition: JMShower.h:428
double jmshower::JMShower::Efrac_2sigmaHOR ( ) const

Definition at line 803 of file JMShower.cxx.

References fEfrac_2sigmaHOR.

804  {
805  return fEfrac_2sigmaHOR;
806  }
double fEfrac_2sigmaHOR
Definition: JMShower.h:429
double jmshower::JMShower::Efrac_2slides ( ) const

Definition at line 767 of file JMShower.cxx.

References fEfrac_2slides.

768  {
769  return fEfrac_2slides;
770  }
double fEfrac_2slides
Definition: JMShower.h:425
double jmshower::JMShower::Efrac_4sigmaHOR ( ) const

Definition at line 812 of file JMShower.cxx.

References fEfrac_4sigmaHOR.

813  {
814  return fEfrac_4sigmaHOR;
815  }
double fEfrac_4sigmaHOR
Definition: JMShower.h:430
double jmshower::JMShower::Efrac_4slides ( ) const

Definition at line 776 of file JMShower.cxx.

References fEfrac_4slides.

777  {
778  return fEfrac_4slides;
779  }
double fEfrac_4slides
Definition: JMShower.h:426
double jmshower::JMShower::Efrac_6slides ( ) const

Definition at line 785 of file JMShower.cxx.

References fEfrac_6slides.

786  {
787  return fEfrac_6slides;
788  }
double fEfrac_6slides
Definition: JMShower.h:427
double jmshower::JMShower::Eiso_2sigmaHOR ( ) const

Definition at line 821 of file JMShower.cxx.

References fEiso_2sigmaHOR.

822  {
823  return fEiso_2sigmaHOR;
824  }
double fEiso_2sigmaHOR
Definition: JMShower.h:431
double jmshower::JMShower::Eiso_4sigmaHOR ( ) const

Definition at line 829 of file JMShower.cxx.

References fEiso_4sigmaHOR.

830  {
831  return fEiso_4sigmaHOR;
832  }
double fEiso_4sigmaHOR
Definition: JMShower.h:432
double jmshower::JMShower::Eiso_6sigmaHOR ( ) const

Definition at line 837 of file JMShower.cxx.

References fEiso_6sigmaHOR.

838  {
839  return fEiso_6sigmaHOR;
840  }
double fEiso_6sigmaHOR
Definition: JMShower.h:433
double jmshower::JMShower::Energy ( ) const

Definition at line 147 of file JMShower.cxx.

References fEnergy.

Referenced by jmshower::RecoJMShower::CalcANN().

148  {
149  return fEnergy;
150  }
void rb::Cluster::EnsureWeightAlloc ( )
protectedinherited

Helper. Resizes weights vectors to match cell vectors.

Definition at line 712 of file Cluster.cxx.

References rb::Cluster::fXCell, rb::Cluster::fXWeights, rb::Cluster::fYCell, rb::Cluster::fYWeights, and art::PtrVector< T >::size().

Referenced by rb::Cluster::Add(), and rb::Cluster::SetWeight().

713  {
714  if(fXWeights.size() != fXCell.size()) fXWeights.resize(fXCell.size(), 1);
715  if(fYWeights.size() != fYCell.size()) fYWeights.resize(fYCell.size(), 1);
716  }
art::PtrVector< rb::CellHit > fYCell
collection of y-view cells in cluster
Definition: Cluster.h:318
art::PtrVector< rb::CellHit > fXCell
collection of x-view cells in cluster
Definition: Cluster.h:317
size_type size() const
Definition: PtrVector.h:308
std::vector< double > fXWeights
Weights, matching cell indexing.
Definition: Cluster.h:319
std::vector< double > fYWeights
May be empty, means all weights are 1.
Definition: Cluster.h:320
double jmshower::JMShower::ExclEnergy ( ) const

Definition at line 136 of file JMShower.cxx.

References fExclEnergy.

137  {
138  return fExclEnergy;
139  }
double fExclEnergy
Definition: JMShower.h:341
rb::Cluster rb::Cluster::Exclude ( const rb::Cluster excl) const
inherited

Create a cluster from this one, but with the hits of excl removed.

Definition at line 233 of file Cluster.cxx.

References rb::Cluster::Add(), rb::Cluster::Cell(), rb::Cluster::fID, rb::Cluster::fNoiseCluster, rb::Cluster::fView, MECModelEnuComparisons::i, calib::j, genie::utils::mec::J(), rb::Cluster::NCell(), runNovaSAM::ret, rb::Cluster::SetNoise(), and rb::Cluster::Weight().

Referenced by mono::MonopoleCluster::filter(), slid::Recluster::produce(), slid::NuEEnergyAlg::VertexEnergy(), and rb::Cluster::YCells().

234  {
236  ret.SetNoise(fNoiseCluster);
237 
238  const unsigned int I = NCell();
239  const unsigned int J = excl->NCell();
240  for(unsigned int i = 0; i < I; ++i){
241  const art::Ptr<rb::CellHit> chit = Cell(i);
242  bool clash = false;
243  for(unsigned int j = 0; j < J; ++j){
244  if(excl->Cell(j) == chit){
245  clash = true;
246  break;
247  }
248  } // end for j
249  if(!clash) ret.Add(chit, Weight(i));
250  }
251 
252  if(ret.NCell() == 0)
253  mf::LogWarning("Cluster") << "Exclude created empty cluster";
254 
255  return ret;
256  }
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
double J(double q0, double q3, double Enu, double ml)
Definition: MECUtils.cxx:141
A collection of associated CellHits.
Definition: Cluster.h:47
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
geo::View_t fView
view this cluster is in
Definition: Cluster.h:316
bool fNoiseCluster
flag for whether this is a noise cluster
Definition: Cluster.h:322
const double j
Definition: BetheBloch.cxx:29
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
int fID
ID for cluster.
Definition: Cluster.h:321
double Weight(unsigned int globalIdx) const
Weight assigned to the cell.
Definition: Cluster.cxx:209
unsigned int rb::Cluster::ExtentCell ( geo::View_t  view) const
inherited

Definition at line 570 of file Cluster.cxx.

References rb::Cluster::MaxCell(), and rb::Cluster::MinCell().

Referenced by sn::SNSlicerAna::analyze(), sn::SNSlicer::ClusterIsGood(), and rb::Cluster::ExtentPlane().

571  {
572  return MaxCell(view)-MinCell(view)+1;
573  }
unsigned int MaxCell(geo::View_t view) const
Definition: Cluster.cxx:518
unsigned int MinCell(geo::View_t view) const
Definition: Cluster.cxx:472
unsigned int rb::Cluster::ExtentPlane ( geo::View_t  view = geo::kXorY) const
inlineinherited
double rb::Cluster::ExtentTNS ( ) const
inlineinherited
double rb::Cluster::ExtentV ( geo::View_t  view) const
inlineinherited

Definition at line 246 of file Cluster.h.

References rb::Cluster::MaxV(), and rb::Cluster::MinV().

246 {return MaxV(view)-MinV(view);}
double MinV(geo::View_t view) const
Definition: Cluster.cxx:454
double MaxV(geo::View_t view) const
Definition: Cluster.cxx:500
double rb::Cluster::ExtentX ( ) const
inlineinherited

Definition at line 247 of file Cluster.h.

References rb::Cluster::ExtentXYZ().

247 {return ExtentXYZ().X();}
TVector3 ExtentXYZ() const
Definition: Cluster.h:245
TVector3 rb::Cluster::ExtentXYZ ( ) const
inlineinherited

Definition at line 245 of file Cluster.h.

References rb::Cluster::MaxXYZ(), and rb::Cluster::MinXYZ().

Referenced by rb::Cluster::ExtentX(), rb::Cluster::ExtentY(), and rb::Cluster::ExtentZ().

245 {return MaxXYZ()-MinXYZ();}
TVector3 MaxXYZ() const
Definition: Cluster.cxx:492
TVector3 MinXYZ() const
Definition: Cluster.cxx:446
double rb::Cluster::ExtentY ( ) const
inlineinherited

Definition at line 248 of file Cluster.h.

References rb::Cluster::ExtentXYZ().

248 {return ExtentXYZ().Y();}
TVector3 ExtentXYZ() const
Definition: Cluster.h:245
double rb::Cluster::ExtentZ ( ) const
inlineinherited

Definition at line 249 of file Cluster.h.

References rb::Cluster::ExtentXYZ().

Referenced by air::AirFilter::parallel_muon_slice().

249 {return ExtentXYZ().Z();}
TVector3 ExtentXYZ() const
Definition: Cluster.h:245
double jmshower::JMShower::Gap ( ) const

Definition at line 415 of file JMShower.cxx.

References fGap.

Referenced by jmshower::RecoJMShower::CalcANN().

416  {
417  return fGap;
418  }
std::map< int, std::vector< int > > jmshower::JMShower::GetPlaneHits ( )

Returns a map where the first element is plane number and the second is vector of global cell indices in a shower of cells that belong to that plane.

Definition at line 911 of file JMShower.cxx.

References rb::Cluster::Cell(), MECModelEnuComparisons::i, rb::Cluster::NCell(), ncells, and rb::CellHit::Plane().

912  {
913  std::map< int, std::vector< int > > mapP;
914  int ncells = this->NCell();
915  for( int i = 0; i < ncells; ++i){
916  mapP[ this->Cell(i)->Plane() ].push_back( i );
917  }// end loop over cells
918 
919  return mapP;
920  }// end of GetPlaneHits
unsigned short Plane() const
Definition: CellHit.h:39
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
int ncells
Definition: geom.C:124
std::map< int, std::vector< int > > jmshower::JMShower::GetTransHits ( )

Returns a map where the first index is the number of cells away from the track core, and the second is a vector of global cell indices in a shower that are that many cells from the track core. It callapses the transverse profile of the shower to a single plane.

Definition at line 925 of file JMShower.cxx.

References stan::math::ceil(), getBrightness::cell, rb::CellHit::Cell(), geo::PlaneGeo::Cell(), rb::Cluster::Cell(), dir, rb::Prong::Dir(), stan::math::fabs(), geom(), geo::CellGeo::GetCenter(), geo::CellGeo::HalfW(), MECModelEnuComparisons::i, geo::kX, rb::Cluster::NCell(), ncells, rb::CellHit::Plane(), geo::GeometryBase::Plane(), NDAPDHVSetting::plane, febshutoff_auto::start, rb::Prong::Start(), Stop(), POTSpillRate::view, and rb::CellHit::View().

926  {
927 
928  std::map< int, std::vector< int > > mapT;
930  int ncells = this->NCell();
931  TVector3 dir = this->Dir();
932  TVector3 start = this->Start();
933  TVector3 stop = this->Stop();
934 
935  float xslope = dir.X()/dir.Z();
936  float yslope = dir.Y()/dir.Z();
937  float planeX = (start.X() - stop.X() ) /2.0;
938  float planeY = (start.Y() - stop.Y() ) /2.0;
939 
940 
941  for( int i = 0; i < ncells; ++i){
942 
943  int plane = this->Cell(i)->Plane();
944  int cell = this->Cell(i)->Cell();
945  geo::View_t view = this->Cell(i)->View();
946 
947  // Find the cell in this plane that the shower
948  // core passes through
949  TVector3 cellCenter;
950 
951  geom->Plane(plane)->Cell(0)->GetCenter( cellCenter );
952  float cellW = geom->Plane( plane )->Cell(0)->HalfW();
953 
954  if( fabs(dir.Z()) > 0.0001 ){
955  planeX = start.X() + ( cellCenter.Z() - start.Z() )*xslope;
956  planeY = start.Y() + ( cellCenter.Z() - start.Z() )*yslope;
957  }
958  int trkCell = ( view == geo::kX )? std::ceil( (planeX- cellCenter.X())/cellW )
959  : std::ceil( (planeY- cellCenter.Y())/cellW );
960 
961 
962  mapT[ trkCell - cell ].push_back( i );
963  }// end loop over cells
964 
965  return mapT;
966  }
void GetCenter(double *xyz, double localz=0.0) const
Definition: CellGeo.cxx:159
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
unsigned short Plane() const
Definition: CellHit.h:39
geo::View_t View() const
Definition: CellHit.h:41
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
Vertical planes which measure X.
Definition: PlaneGeo.h:28
double HalfW() const
Definition: CellGeo.cxx:191
const PlaneGeo * Plane(unsigned int i) const
virtual TVector3 Start() const
Definition: Prong.h:73
unsigned short Cell() const
Definition: CellHit.h:40
TVector3 Stop() const
Definition: JMShower.cxx:67
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
virtual TVector3 Dir() const
Unit vector describing prong direction.
Definition: Prong.h:77
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
TDirectory * dir
Definition: macro.C:5
void geom(int which=0)
Definition: geom.C:163
int ncells
Definition: geom.C:124
fvar< T > ceil(const fvar< T > &x)
Definition: ceil.hpp:11
double jmshower::JMShower::HitDeconvE ( unsigned int  cell) const

Definition at line 87 of file JMShower.cxx.

References getBrightness::cell, and fHitDeconvECol.

88  {
89  return fHitDeconvECol[cell];
90  }
std::vector< double > fHitDeconvECol
Definition: JMShower.h:328
double jmshower::JMShower::HitDist ( unsigned int  cell) const

Definition at line 77 of file JMShower.cxx.

References getBrightness::cell, and fHitDistCol.

78  {
79  return fHitDistCol[cell];
80  }
std::vector< double > fHitDistCol
Definition: JMShower.h:327
double jmshower::JMShower::HitSumE ( unsigned int  cell) const

Definition at line 98 of file JMShower.cxx.

References getBrightness::cell, and fHitSumECol.

99  {
100  return fHitSumECol[cell];
101  }
std::vector< double > fHitSumECol
Definition: JMShower.h:329
const int rb::Cluster::ID ( ) const
inlineinherited
bool rb::Cluster::Is2D ( ) const
inlineinherited
virtual bool rb::Prong::Is3D ( ) const
inlinevirtualinherited
bool jmshower::JMShower::IsFiducial ( ) const

Definition at line 108 of file JMShower.cxx.

References fIsFiducial.

109  {
110  return fIsFiducial;
111  }
bool jmshower::JMShower::IsInvPhoton ( ) const

Definition at line 729 of file JMShower.cxx.

References fIsInvPhoton.

730  {
731  return fIsInvPhoton;
732  }
unsigned int jmshower::JMShower::ISlice ( ) const

Definition at line 748 of file JMShower.cxx.

References fISlice.

749  {
750  return fISlice;
751  }
unsigned int fISlice
Definition: JMShower.h:384
bool jmshower::JMShower::IsMuon ( ) const

Definition at line 719 of file JMShower.cxx.

References fIsMuon.

720  {
721  return fIsMuon;
722  }
bool rb::Cluster::IsNoise ( ) const
inlineinherited

Is the noise flag set?

Definition at line 163 of file Cluster.h.

References rb::Cluster::fNoiseCluster, rb::Cluster::SetWeight(), rb::Cluster::TotalADC(), rb::Cluster::TotalPE(), and ana::weight.

Referenced by qeef::QeFinderVal::analyze(), rsim::RecordNoiseSpectrumFile::analyze(), tut::RecoValidationTutorial::analyze(), calib::TestParticleCorrections::analyze(), mcchk::MonopoleAna::analyze(), sn::SupernovaAna::analyze(), comi::DataCheck::analyze(), validation::NoiseClusterAnalysis::analyze(), comi::NumiFilteringAna::analyze(), showere::ShowerEnergyAna::analyze(), hough::HoughValidate::analyze(), rockmuon::NDRockMuon::analyze(), ncid::NCNNKerasVal::analyze(), bpf::BPFCVNAna::analyze(), ncs::Xbeam::analyze(), ncs::Xeff::analyze(), ncs::ROCKMRE::analyze(), slid::LIDTraining::analyze(), ncs::NCAna::analyze(), me::MEFinder::BestSlcMatch(), trk::KalmanTrackAna::CheckAssociations(), air::AirKalmanAna::CheckAssociations(), evd::RecoBaseDrawer::DrawCluster2D(), LSTME::FillLSTME::fillEnergies(), SliceLID::FillSliceLID::fillSliceLIDPreds(), filter::Filter::FillSliceVariables(), comi::NumiFiltering::filter(), bsf::BremShowerFilter::filter(), showere::ShowerEnergyFilterMC::filter(), me::MEFinder::GetPhysNoiseSlcs(), mono::HighEnergySliceRemoval::is_high_energy_slice(), novaddt::HorizontalMuonAna::IsHorzMuonTrack(), skim::EvaluatorNue::KeepSlice(), airshower::AirSlicer::MakeTrackSlices(), murem::FindParent::MatchToOrigSlice(), air::AirFilter::parallel_muon_slice(), lem::LEMAssociator::produce(), presel::LEMPresel::produce(), qeef::QeFinder::produce(), hough::HoughT::produce(), hv::HoughVertex::produce(), nuesand::FillNueSandbox::produce(), lem::UnTranspose::produce(), numue::TrackOverlapECalc::produce(), wsnumu::WSNumu::produce(), presel::RockPresel::produce(), lem::LEMSummarizer::produce(), trackinfo::TrackInfo::produce(), slid::Recluster::produce(), nussand::FillNusSandbox::produce(), presel::CosmicVeto::produce(), numusand::FillSandbox::produce(), jmshower::JMTrackMerge::produce(), presel::NuePresel::produce(), lem::Preselection::produce(), presel::CosmicCVNVeto::produce(), hough::MultiHoughT::produce(), cosrej::CosRej::produce(), numue::NumuEnergy::produce(), earms::ElasticArmsHS::produce(), dt::DiscreteTracker::produce(), ndreco::NDReco::produce(), jmshower::JMClusterMerge::produce(), vdt::VertexDT::produce(), ncpi0::MakeNCPi0BkgRej::produce(), jmshower::NueSel::produce(), dif::DiFShowerFinder::produce(), rvp::RecVarPID::produce(), crvtx::CosmicRayVertex::produce(), xnue::XnuePID::produce(), jmshower::NueSelLID::produce(), ncid::MakeNCCosRej::produce(), cosrej::MakeNueCosRej::produce(), ncid::NCNNKeras::produce(), murem::FindParent::produce(), fuzz::FuzzyKVertex::produce(), nerd::NERDProng::produce(), caf::CAFMaker::produce(), bpfit::DimuonFitter::produce(), jmshower::RecoJMShower::RecoShowers(), and sn::SliceRemover::remove().

163 {return fNoiseCluster;}
bool fNoiseCluster
flag for whether this is a noise cluster
Definition: Cluster.h:322
TVector3 jmshower::JMShower::Ixyz ( ) const

Definition at line 896 of file JMShower.cxx.

References fIxyz.

897  {
898  return fIxyz;
899  }
TVector3 fIxyz
Definition: JMShower.h:420
unsigned int rb::Cluster::MaxCell ( geo::View_t  view) const
inherited

Definition at line 518 of file Cluster.cxx.

References ana::assert(), rb::CellHit::Cell(), rb::Cluster::Cell(), MECModelEnuComparisons::i, rb::Cluster::NCell(), and runNovaSAM::ret.

Referenced by align::SplitTracks::analyze(), cvn::PixelMapProducer::DefineBoundary(), rb::Cluster::ExtentCell(), caf::FillHadClustVars(), caf::FillSliceVars(), hough::HoughT::is_good_slice(), rb::Cluster::MaxZ(), lem::MeanCell(), dt::View::View(), trk::KalmanTrackMerge::ViewMergeTracks(), and dt::ViewMerger::ZipVerticalTracks().

519  {
520  assert(NCell(view) > 0);
521  unsigned int ret = 0;
522  for(unsigned int i = 0; i < NCell(view); ++i)
523  if(Cell(view, i)->Cell() > ret) ret = Cell(view, i)->Cell();
524  return ret;
525  }
unsigned short Cell() const
Definition: CellHit.h:40
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
assert(nhit_max >=nhit_nbins)
unsigned int rb::Cluster::MaxPlane ( geo::View_t  view = geo::kXorY) const
inherited

Definition at line 508 of file Cluster.cxx.

References ana::assert(), rb::Cluster::Cell(), MECModelEnuComparisons::i, rb::Cluster::NCell(), rb::CellHit::Plane(), and runNovaSAM::ret.

Referenced by dif::DiFShowerFinder::adjustPlane(), dif::DiFShowerFinder::adjustPlane_end(), align::SplitTracks::analyze(), calib::HitEfficiency::analyze(), tbem::TBRecoAna::analyze(), trk::KalmanTrackMerge::CalcMatchScore(), slid::ParticleIDAlg::CalcPlaneHits(), trk::KalmanTrackMerge::CanJoinTracks(), skim::Evaluator::CheckSliceQuality(), remid::ReMIdTrain::ContainedEvent(), remid::ReMIdDedx::ContainedEvent(), remid::ReMIdDedxRock::ContainedEvent(), remid::ReMIdDedxStudies::ContainedEvent(), murem::TrackCleanUpAlg::DeDxInPlane(), lem::DefaultVertex(), cvn::PixelMapProducer::DefineBoundary(), dif::DiFShowerFinder::eparm(), rb::Cluster::ExtentPlane(), caf::FillDiFVars(), caf::FillHadClustVars(), trk::CosmicTrackAna::FillRecoInfo(), caf::FillSliceInfo(), caf::FillSliceVars(), bsf::BremShowerFilter::findShowerByReco(), dif::DiFShowerFinder::findShowerByReco(), bsf::BremShowerFilter::findShowerByTruth(), trk::KalmanTrack::FindTracks(), cvn::RegPixelMapProducer::FindVertexWindowThreshold(), cvn::PixelMapProducer::FindVertexWindowThreshold(), hough::HoughT::is_good_slice(), trk::CosmicTrackSelection::IsCalibTrack(), calib::PCHitsList::IsGoodTrack(), trk::KalmanTrackMerge::JoinTracks(), dt::ViewMerger::JoinTracks(), dt::ViewMerger::MatchScore(), murem::FindParent::MatchToOrigSlice(), rb::Cluster::MaxZ(), dif::DiFShowerFinder::muonstub(), skim::ParametersNumu::ParametersNumu(), slid::Recluster::produce(), remid::RecoMuon::produce(), fuzz::FuzzyKVertex::produce(), nerd::NERDProng::produce(), dt::ViewMerger::ScoreForExtension(), dt::ViewMerger::ScoreForJoinPlusExtension(), trk::WindowTrackingAlg::SetTrackEndPoints(), cosrej::MakeNueCosRej::SparsenessAsymmetry(), slid::NuEEnergyAlg::VertexEnergy(), dt::View::View(), and trk::KalmanTrackMerge::ViewMergeTracks().

509  {
510  assert(NCell(view) > 0);
511  unsigned int ret = 0;
512  for(unsigned int i = 0; i < NCell(view); ++i)
513  if(Cell(view, i)->Plane() > ret) ret = Cell(view, i)->Plane();
514  return ret;
515  }
unsigned short Plane() const
Definition: CellHit.h:39
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
assert(nhit_max >=nhit_nbins)
double rb::Cluster::MaxTNS ( ) const
inherited
double rb::Cluster::MaxV ( geo::View_t  view) const
inherited

Definition at line 500 of file Cluster.cxx.

References ana::assert(), geo::kX, geo::kY, and rb::Cluster::MaxXYZ().

Referenced by rb::Cluster::ExtentV(), rb::Cluster::MinZ(), fuzz::FuzzyKVertex::produce(), and nerd::NERDProng::produce().

501  {
502  assert(view == geo::kX || view == geo::kY);
503  if(view == geo::kX) return MaxXYZ().X();
504  return MaxXYZ().Y();
505  }
Vertical planes which measure X.
Definition: PlaneGeo.h:28
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
TVector3 MaxXYZ() const
Definition: Cluster.cxx:492
assert(nhit_max >=nhit_nbins)
double rb::Cluster::MaxX ( ) const
inlineinherited

Definition at line 217 of file Cluster.h.

References rb::Cluster::MaxXYZ().

Referenced by caf::FillProngVars(), and presel::CosmicVeto::produce().

217 {return MaxXYZ().X();}
TVector3 MaxXYZ() const
Definition: Cluster.cxx:492
TVector3 rb::Cluster::MaxXYZ ( ) const
inherited

Definition at line 492 of file Cluster.cxx.

References hi(), and rb::Cluster::MinMaxMeanXYZ().

Referenced by comi::NumiFilteringAna::analyze(), rb::Cluster::ExtentXYZ(), comi::NumiFiltering::filter(), evd::SliceNavigator::GetBounds(), evd::SliceNavigator::GetBox(), skim::EvaluatorNue::KeepSlice(), rb::Cluster::MaxV(), rb::Cluster::MaxX(), rb::Cluster::MaxY(), rb::Cluster::MaxZ(), rb::Cluster::MinZ(), skim::ParametersNumu::ParametersNumu(), nuesand::FillNueSandbox::produce(), presel::CosmicVeto::produce(), cosrej::CosRej::produce(), and caf::CAFMaker::produce().

493  {
494  TVector3 hi, junk;
495  MinMaxMeanXYZ(junk, hi, junk);
496  return hi;
497  }
TSpline3 hi("hi", xhi, yhi, 18,"0")
void MinMaxMeanXYZ(TVector3 &lo, TVector3 &hi, TVector3 &mean, rb::AveragingScheme scheme=kDefaultScheme) const
Gets the min/max/mean all at once, called by the functions above.
Definition: Cluster.cxx:582
double rb::Cluster::MaxY ( ) const
inlineinherited

Definition at line 218 of file Cluster.h.

References rb::Cluster::MaxXYZ().

Referenced by caf::FillProngVars(), and presel::CosmicVeto::produce().

218 {return MaxXYZ().Y();}
TVector3 MaxXYZ() const
Definition: Cluster.cxx:492
double rb::Cluster::MaxZ ( ) const
inlineinherited
double rb::Cluster::MeanTNS ( rb::AveragingScheme  scheme = kDefaultScheme) const
inherited

Definition at line 554 of file Cluster.cxx.

References ana::assert(), rb::Cluster::Cell(), MECModelEnuComparisons::i, rb::kByEnergy, rb::Cluster::NCell(), rb::CellHit::PE(), runNovaSAM::ret, rb::CellHit::TNS(), w, and rb::Cluster::Weight().

Referenced by me::MEFinder::AddMEHit(), sn::SNSlicerAna::analyze(), tbem::TBRecoAna::analyze(), ncs::NCAna::analyze(), sn::SNMichelAnalyzer::analyze(), me::MEFinder::BestSlcMatch(), skim::Evaluator::CheckTiming(), sn::SNMichelAnalyzer::ClusterAroundTrackEnds(), remid::ReMIdDedx::ContainedEvent(), remid::ReMIdDedxRock::ContainedEvent(), remid::ReMIdDedxStudies::ContainedEvent(), caf::FillProngVars(), caf::FillSliceVars(), comi::NumiFiltering::filter(), bsf::BremShowerFilter::filter(), tf::TimingFitAlg::HoughFit(), skim::EvaluatorNue::KeepSlice(), me::MEFinder::MakeSlcME(), me::MEFinder::MakeTrkME(), rb::Cluster::MeanZ(), cosrej::MakeNueCosRej::MuonParentByDist(), cosrej::MakeNueCosRej::MuonParentByTime(), calib::PCHitsList::ProcessTrackForFLSHits(), recodemo::RecoDemo::produce(), hv::HoughVertex::produce(), presel::CosmicVeto::produce(), presel::CosmicCVNVeto::produce(), sn::SupernovaMCCluster::produce(), vdt::VertexDT::produce(), jmshower::NueSel::produce(), dif::DiFShowerFinder::produce(), jmshower::NueSelLID::produce(), and caf::CAFMaker::produce().

555  {
556  assert(NCell() > 0);
557  double ret = 0;
558  double totW = 0;
559  for(unsigned int i = 0; i < NCell(); ++i){
560  double w = Weight(i);
561  if(scheme == kByEnergy) w *= Cell(i)->PE();
562 
563  ret += Cell(i)->TNS()*w;
564  totW += w;
565  }
566  return ret/totW;
567  }
float TNS() const
Definition: CellHit.h:46
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
float PE() const
Definition: CellHit.h:42
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
assert(nhit_max >=nhit_nbins)
Float_t w
Definition: plot.C:20
In addition to the intrinsic weights.
Definition: Cluster.h:30
double Weight(unsigned int globalIdx) const
Weight assigned to the cell.
Definition: Cluster.cxx:209
double rb::Cluster::MeanV ( geo::View_t  view,
rb::AveragingScheme  scheme = kDefaultScheme 
) const
inherited

Definition at line 546 of file Cluster.cxx.

References ana::assert(), geo::kX, geo::kY, and rb::Cluster::MeanXYZ().

Referenced by nerd::NERDProng::AddProngs(), rb::Cluster::MaxZ(), and rb::Cluster::W().

547  {
548  assert(view == geo::kX || view == geo::kY);
549  if(view == geo::kX) return MeanXYZ(scheme).X();
550  return MeanXYZ(scheme).Y();
551  }
Vertical planes which measure X.
Definition: PlaneGeo.h:28
TVector3 MeanXYZ(rb::AveragingScheme=kDefaultScheme) const
Definition: Cluster.cxx:538
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
assert(nhit_max >=nhit_nbins)
double rb::Cluster::MeanX ( rb::AveragingScheme  scheme = kDefaultScheme) const
inlineinherited
TVector3 rb::Cluster::MeanXYZ ( rb::AveragingScheme  scheme = kDefaultScheme) const
inherited

Definition at line 538 of file Cluster.cxx.

References extractScale::mean, and rb::Cluster::MinMaxMeanXYZ().

Referenced by sn::SNMichelAnalyzer::ClusterAroundTrackEnds(), jmshower::RecoJMShower::GetRVPStats(), tf::TimingFitAlg::HoughFit(), rb::Cluster::MaxZ(), rb::Cluster::MeanV(), rb::Cluster::MeanX(), rb::Cluster::MeanY(), rb::Cluster::MeanZ(), nuesand::FillNueSandbox::produce(), presel::NuePresel::produce(), lem::Preselection::produce(), and rb::Cluster::TotalGeVFastClusterOnly().

539  {
540  TVector3 mean, junk;
541  MinMaxMeanXYZ(junk, junk, mean, scheme);
542  return mean;
543  }
void MinMaxMeanXYZ(TVector3 &lo, TVector3 &hi, TVector3 &mean, rb::AveragingScheme scheme=kDefaultScheme) const
Gets the min/max/mean all at once, called by the functions above.
Definition: Cluster.cxx:582
double rb::Cluster::MeanY ( rb::AveragingScheme  scheme = kDefaultScheme) const
inlineinherited
double rb::Cluster::MeanZ ( rb::AveragingScheme  scheme = kDefaultScheme) const
inlineinherited
unsigned int rb::Cluster::MinCell ( geo::View_t  view) const
inherited

Definition at line 472 of file Cluster.cxx.

References ana::assert(), rb::CellHit::Cell(), rb::Cluster::Cell(), MECModelEnuComparisons::i, rb::Cluster::NCell(), and runNovaSAM::ret.

Referenced by calib::TestParticleCorrections::analyze(), align::SplitTracks::analyze(), cvn::PixelMapProducer::DefineBoundary(), rb::Cluster::ExtentCell(), caf::FillHadClustVars(), caf::FillSliceVars(), hough::HoughT::is_good_slice(), lem::MeanCell(), rb::Cluster::MinZ(), dt::View::View(), trk::KalmanTrackMerge::ViewMergeTracks(), and dt::ViewMerger::ZipVerticalTracks().

473  {
474  assert(NCell(view) > 0);
475  unsigned int ret = UINT_MAX;
476  for(unsigned int i = 0; i < NCell(view); ++i)
477  if(Cell(view, i)->Cell() < ret) ret = Cell(view, i)->Cell();
478  return ret;
479  }
unsigned short Cell() const
Definition: CellHit.h:40
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
assert(nhit_max >=nhit_nbins)
void rb::Cluster::MinMaxMeanXYZ ( TVector3 &  lo,
TVector3 &  hi,
TVector3 &  mean,
rb::AveragingScheme  scheme = kDefaultScheme 
) const
inherited

Gets the min/max/mean all at once, called by the functions above.

Todo:
Won't be quite right in the FD when cells aren't at right angles?

Definition at line 582 of file Cluster.cxx.

References ana::assert(), rb::CellHit::Cell(), rb::Cluster::Cell(), geom(), make_syst_table_plots::h, hi(), MECModelEnuComparisons::i, rb::kByEnergy, geo::kX, geo::kY, lo(), extractScale::mean, getGoodRuns4SAM::n, rb::Cluster::NCell(), rb::CellHit::PE(), rb::CellHit::Plane(), geo::GeometryBase::Plane(), POTSpillRate::view, rb::Cluster::View(), ana::weight, rb::Cluster::Weight(), submit_syst::x, submit_syst::y, and test::z.

Referenced by caf::FillHadClustVars(), caf::FillSliceVars(), rb::Cluster::MaxXYZ(), rb::Cluster::MeanXYZ(), rb::Cluster::MeanZ(), and rb::Cluster::MinXYZ().

584  {
585  // If this becomes a bottleneck we can cache the results
586 
587  /// \todo Won't be quite right in the FD when cells aren't at right angles?
588 
589  assert(NCell() > 0);
590 
592 
593  double Wx = 0;
594  double Wy = 0;
595  for(int n = 0; n < 3; ++n){
596  lo(n) = DBL_MAX;
597  hi(n) = -DBL_MAX;
598  mean(n) = 0;
599  }
600 
601  for(unsigned int i = 0; i < NCell(); ++i){
602  const art::Ptr<rb::CellHit>& h = Cell(i);
603  double xyz[3];
604  geom->Plane(h->Plane())->Cell(h->Cell())->GetCenter(xyz);
605  const double x = xyz[0];
606  const double y = xyz[1];
607  const double z = xyz[2];
608  const geo::View_t view = geom->Plane(h->Plane())->View();
609  double weight = Weight(i);
610  if(scheme == kByEnergy) weight *= h->PE();
611 
612  if(view == geo::kX){
613  if(x < lo.X()) lo.SetX(x);
614  if(x > hi.X()) hi.SetX(x);
615  mean.SetX(mean.X()+x*weight);
616  Wx += weight;
617  }
618  if(view == geo::kY){
619  if(y < lo.Y()) lo.SetY(y);
620  if(y > hi.Y()) hi.SetY(y);
621  mean.SetY(mean.Y()+y*weight);
622  Wy += weight;
623  }
624  if(z < lo.Z()) lo.SetZ(z);
625  if(z > hi.Z()) hi.SetZ(z);
626  mean.SetZ(mean.Z()+z*weight);
627  }
628 
629  if(Wx) mean.SetX(mean.X()/Wx);
630  if(Wy) mean.SetY(mean.Y()/Wy);
631  if(Wx || Wy) mean.SetZ(mean.Z()/(Wx+Wy));
632  }
virtual geo::View_t View() const
kXorY for 3D clusters.
Definition: Cluster.h:99
TSpline3 lo("lo", xlo, ylo, 12,"0")
const Var weight
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
unsigned short Plane() const
Definition: CellHit.h:39
Vertical planes which measure X.
Definition: PlaneGeo.h:28
const PlaneGeo * Plane(unsigned int i) const
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
unsigned short Cell() const
Definition: CellHit.h:40
TSpline3 hi("hi", xhi, yhi, 18,"0")
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
float PE() const
Definition: CellHit.h:42
z
Definition: test.py:28
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 geom(int which=0)
Definition: geom.C:163
assert(nhit_max >=nhit_nbins)
In addition to the intrinsic weights.
Definition: Cluster.h:30
double Weight(unsigned int globalIdx) const
Weight assigned to the cell.
Definition: Cluster.cxx:209
unsigned int rb::Cluster::MinPlane ( geo::View_t  view = geo::kXorY) const
inherited

Definition at line 462 of file Cluster.cxx.

References ana::assert(), rb::Cluster::Cell(), MECModelEnuComparisons::i, rb::Cluster::NCell(), rb::CellHit::Plane(), and runNovaSAM::ret.

Referenced by dif::DiFShowerFinder::adjustPlane(), dif::DiFShowerFinder::adjustPlane_end(), align::AlignInspect::analyze(), calib::TestParticleCorrections::analyze(), align::SplitTracks::analyze(), calib::HitEfficiency::analyze(), ncs::ROCKMRE::analyze(), ncs::NCAna::analyze(), trk::KalmanTrackMerge::CalcMatchScore(), slid::ParticleIDAlg::CalcPlaneHits(), trk::KalmanTrackMerge::CanJoinTracks(), skim::Evaluator::CheckSliceQuality(), remid::ReMIdTrain::ContainedEvent(), remid::ReMIdDedx::ContainedEvent(), remid::ReMIdDedxRock::ContainedEvent(), remid::ReMIdDedxStudies::ContainedEvent(), murem::TrackCleanUpAlg::DeDxInPlane(), lem::DefaultVertex(), cvn::PixelMapProducer::DefineBoundary(), dif::DiFShowerFinder::eparm(), rb::Cluster::ExtentPlane(), caf::FillDiFVars(), caf::FillHadClustVars(), trk::CosmicTrackAna::FillRecoInfo(), caf::FillSliceInfo(), caf::FillSliceVars(), bsf::BremShowerFilter::findShowerByReco(), dif::DiFShowerFinder::findShowerByReco(), bsf::BremShowerFilter::findShowerByTruth(), trk::KalmanTrack::FindTracks(), cvn::RegPixelMapProducer::FindVertexMaxGap(), cvn::PixelMapProducer::FindVertexMaxGap(), cvn::RegPixelMapProducer::FindVertexWindowThreshold(), cvn::PixelMapProducer::FindVertexWindowThreshold(), jmshower::RecoJMShower::GetRVPStats(), hough::HoughT::is_good_slice(), trk::CosmicTrackSelection::IsCalibTrack(), calib::PCHitsList::IsGoodTrack(), trk::KalmanTrackMerge::JoinTracks(), dt::ViewMerger::JoinTracks(), dt::ViewMerger::MatchScore(), murem::FindParent::MatchToOrigSlice(), rb::Cluster::MinZ(), skim::ParametersNue::ParametersNue(), skim::ParametersNumu::ParametersNumu(), slid::Recluster::produce(), rvp::RecVarPID::produce(), remid::RecoMuon::produce(), fuzz::FuzzyKVertex::produce(), nerd::NERDProng::produce(), jmshower::RecoJMShower::RecoShowers(), dt::ViewMerger::ScoreForExtension(), dt::ViewMerger::ScoreForJoinPlusExtension(), trk::WindowTrackingAlg::SetTrackEndPoints(), cosrej::MakeNueCosRej::SparsenessAsymmetry(), slid::NuEEnergyAlg::VertexEnergy(), dt::View::View(), trk::KalmanTrackMerge::ViewMergeTracks(), and dt::ViewMerger::ZipVerticalTracks().

463  {
464  assert(NCell(view) > 0);
465  unsigned int ret = UINT_MAX;
466  for(unsigned int i = 0; i < NCell(view); ++i)
467  if(Cell(view, i)->Plane() < ret) ret = Cell(view, i)->Plane();
468  return ret;
469  }
unsigned short Plane() const
Definition: CellHit.h:39
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
assert(nhit_max >=nhit_nbins)
double rb::Cluster::MinTNS ( ) const
inherited

Definition at line 482 of file Cluster.cxx.

References ana::assert(), rb::Cluster::Cell(), MECModelEnuComparisons::i, rb::Cluster::NCell(), runNovaSAM::ret, and rb::CellHit::TNS().

Referenced by align::AlignInspect::analyze(), sn::SNSlicerAna::analyze(), tbem::TBRecoAna::analyze(), nnbar::ShowerMuonCoincidence::analyze(), ncs::NCAna::analyze(), rb::CompareTracksByTime(), evd::RecoBaseDrawer::DrawCluster2D(), evd::RecoBaseDrawer::DrawTrack2D(), rb::Cluster::ExtentTNS(), caf::FillProngVars(), caf::FillSliceVars(), bsf::BremShowerFilter::findShowerByTruth(), rb::Cluster::MinZ(), murem::MuonRemove::MuonInfo(), skim::ParametersNumu::ParametersNumu(), trk::TrkAssn::produce(), jmshower::JMTrackMerge::produce(), earms::ElasticArmsHS::produce(), jmshower::JMClusterMerge::produce(), caf::CAFMaker::produce(), sn::TrackActivityRemover::remove(), sn::SortClustersByTime(), and sn::SortTracksByTime().

483  {
484  assert(NCell() > 0);
485  double ret = DBL_MAX;
486  for(unsigned int i = 0; i < NCell(); ++i)
487  if(Cell(i)->TNS() < ret) ret = Cell(i)->TNS();
488  return ret;
489  }
float TNS() const
Definition: CellHit.h:46
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
assert(nhit_max >=nhit_nbins)
double rb::Cluster::MinV ( geo::View_t  view) const
inherited

Definition at line 454 of file Cluster.cxx.

References ana::assert(), geo::kX, geo::kY, and rb::Cluster::MinXYZ().

Referenced by rb::Cluster::ExtentV(), fuzz::FuzzyKVertex::produce(), and nerd::NERDProng::produce().

455  {
456  assert(view == geo::kX || view == geo::kY);
457  if(view == geo::kX) return MinXYZ().X();
458  return MinXYZ().Y();
459  }
Vertical planes which measure X.
Definition: PlaneGeo.h:28
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
TVector3 MinXYZ() const
Definition: Cluster.cxx:446
assert(nhit_max >=nhit_nbins)
double rb::Cluster::MinX ( ) const
inlineinherited

Definition at line 204 of file Cluster.h.

References rb::Cluster::MinXYZ().

Referenced by caf::FillProngVars(), and presel::CosmicVeto::produce().

204 {return MinXYZ().X();}
TVector3 MinXYZ() const
Definition: Cluster.cxx:446
TVector3 rb::Cluster::MinXYZ ( ) const
inherited

Definition at line 446 of file Cluster.cxx.

References lo(), and rb::Cluster::MinMaxMeanXYZ().

Referenced by comi::NumiFilteringAna::analyze(), rb::Cluster::ExtentXYZ(), comi::NumiFiltering::filter(), evd::SliceNavigator::GetBounds(), evd::SliceNavigator::GetBox(), rb::Cluster::MinV(), rb::Cluster::MinX(), rb::Cluster::MinY(), rb::Cluster::MinZ(), skim::ParametersNumu::ParametersNumu(), nuesand::FillNueSandbox::produce(), presel::CosmicVeto::produce(), cosrej::CosRej::produce(), and caf::CAFMaker::produce().

447  {
448  TVector3 lo, junk;
449  MinMaxMeanXYZ(lo, junk, junk);
450  return lo;
451  }
TSpline3 lo("lo", xlo, ylo, 12,"0")
void MinMaxMeanXYZ(TVector3 &lo, TVector3 &hi, TVector3 &mean, rb::AveragingScheme scheme=kDefaultScheme) const
Gets the min/max/mean all at once, called by the functions above.
Definition: Cluster.cxx:582
double rb::Cluster::MinY ( ) const
inlineinherited

Definition at line 205 of file Cluster.h.

References rb::Cluster::MinXYZ().

Referenced by caf::FillProngVars(), and presel::CosmicVeto::produce().

205 {return MinXYZ().Y();}
TVector3 MinXYZ() const
Definition: Cluster.cxx:446
double rb::Cluster::MinZ ( ) const
inlineinherited
int rb::Cluster::MostContiguousPlanes ( geo::View_t  view) const
inherited

Longest run of adjacent planes with hits.

view may be kXorY to require hits on every plane no matter the view

Definition at line 635 of file Cluster.cxx.

References rb::Cluster::Cell(), MECModelEnuComparisons::i, geo::kXorY, std::max(), rb::Cluster::NCell(), and NDAPDHVSetting::plane.

Referenced by ncid::NCNNKerasVal::analyze(), rb::Cluster::ExtentTNS(), caf::FillDiFShowerVars(), caf::FillDiFVars(), caf::FillHadClustVars(), caf::FillProngVars(), caf::FillShowerVars(), caf::FillSliceInfo(), caf::FillSliceVars(), and skim::ParametersNumu::ParametersNumu().

636  {
637  std::set<int> planes;
638 
639  for(unsigned int i = 0; i < NCell(view); ++i)
640  planes.insert(Cell(view, i)->Plane());
641 
642  if(planes.empty()) return 0;
643 
644  // In 3D expect a hit every plane, in 2D only every other plane.
645  //
646  // This isn't right if the planes aren't alternating in views, but
647  // thankfully we stopped building detectors like that.
648  const int expGap = (view == geo::kXorY) ? 1 : 2;
649 
650  int prevPlane = -999;
651  int curRun = 1;
652  int longestRun = 0;
653  for(auto plane: planes){
654  if(plane - prevPlane == expGap){
655  ++curRun;
656  longestRun = std::max(longestRun, curRun);
657  }
658  else{
659  curRun = 1;
660  }
661  prevPlane = plane;
662  } // end for plane
663 
664  return longestRun;
665  }
T max(const caf::Proxy< T > &a, T b)
X or Y views.
Definition: PlaneGeo.h:30
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
int rb::Cluster::MostMissingPlanes ( geo::View_t  view) const
inherited

Longest run of adjacent planes with no hits.

view may be kXorY to allow a hit in either view to end the run

Definition at line 668 of file Cluster.cxx.

References rb::Cluster::Cell(), MECModelEnuComparisons::i, geo::kXorY, std::max(), rb::Cluster::NCell(), and NDAPDHVSetting::plane.

Referenced by rb::Cluster::ExtentTNS(), caf::FillDiFShowerVars(), caf::FillDiFVars(), caf::FillProngVars(), caf::FillShowerVars(), and xsrec::MakeXSecCCPi0Inc::GetPhLL().

669  {
670  std::set<int> planes;
671 
672  for(unsigned int i = 0; i < NCell(view); ++i)
673  planes.insert(Cell(view, i)->Plane());
674 
675  if(planes.empty()) return 0;
676 
677  int maxDiff = 1;
678  int prevPlane = *planes.begin();
679  for(int plane: planes){
680  maxDiff = std::max(maxDiff, plane-prevPlane);
681  prevPlane = plane;
682  }
683 
684  // One plane difference as expected in 3D isn't a gap
685  if(view == geo::kXorY) return maxDiff-1;
686 
687  // Two plane difference in 2D isn't a gap. Beyond that, every two planes
688  // difference only indicates one missing plane of hits.
689  return (maxDiff-2)/2;
690  }
T max(const caf::Proxy< T > &a, T b)
X or Y views.
Definition: PlaneGeo.h:30
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
unsigned int rb::Cluster::NCell ( geo::View_t  view) const
inherited

Number of cells in view view.

Definition at line 134 of file Cluster.cxx.

References ana::assert(), geo::kX, geo::kXorY, geo::kY, rb::Cluster::NCell(), rb::Cluster::NXCell(), and rb::Cluster::NYCell().

Referenced by dqsf::DQSpillFlags::AccumulateSyncMetric(), rb::HitMap::Add(), fuzz::FuzzyKVertex::AddProng(), dif::DiFShowerFinder::adjustPlane(), dif::DiFShowerFinder::adjustPlane_end(), tut::TutAnalyzer::analyze(), qeef::QeFinderVal::analyze(), rsim::RecordNoiseSpectrumFile::analyze(), chaninfo::CosmicEff::analyze(), remid::ReMIdValidate::analyze(), comi::CosmicMetrics::analyze(), align::AlignInspect::analyze(), tut::RecoValidationTutorial::analyze(), calib::TestParticleCorrections::analyze(), dprf::ChannelPlots::analyze(), remid::ReMIdTrain::analyze(), dprf::TrackPlots::analyze(), mcchk::MonopoleAna::analyze(), align::Alignment::analyze(), mcchk::RockAna::analyze(), sn::SNSlicerAna::analyze(), sn::SupernovaAna::analyze(), align::SplitTracks::analyze(), murem::MuonRemoveAna::analyze(), pa::ClusterEva::analyze(), comi::DataCheck::analyze(), vf::TrackEva::analyze(), comi::NumiFilteringAna::analyze(), tbem::TBRecoAna::analyze(), zcl::FmmTriggerAna::analyze(), zcl::FmmTrackerValidation::analyze(), zcl::FmmTrackerAna::analyze(), trk::KalmanTrackAna::analyze(), showere::ShowerEnergyAna::analyze(), hough::HoughValidate::analyze(), rockmuon::NDRockMuon::analyze(), zcl::FastMMStudy::analyze(), bpfit::BPFTmvaTrainer::analyze(), bpf::BPFCVNAna::analyze(), calib::CosmicTrends::analyze(), calib::CalibAna::analyze(), ncs::Xeff::analyze(), moonshadowana::MoonShadowAna::analyze(), ncs::ROCKMRE::analyze(), ncs::NCAna::analyze(), htk::HoughTrack::analyze(), bpfit::DimuonFitter::AnaSlice(), me::MEFinder::BestSlcMatch(), fuzz::ViewMatchAlg::CalcEnergyProfile(), nerd::ViewMatchAlg::CalcEnergyProfile(), trk::KalmanTrackMerge::CalcMatchScore(), slid::ParticleIDAlg::CalcPlaneHits(), trk::KalmanTrackMerge::CanJoinTracks(), trk::KalmanTrackAna::CheckRecoTracks(), murem::TrackCleanUpAlg::CleanUpTrack(), sn::SNMichelAnalyzer::ClusterAroundTrackEnds(), sn::SNSlicer::ClusterIsGood(), murem::TrackCleanUpAlg::ComputeVertexRegion(), remid::ReMIdTrain::ContainedEvent(), remid::ReMIdDedx::ContainedEvent(), remid::ReMIdDedxFD::ContainedEvent(), remid::ReMIdDedxRock::ContainedEvent(), remid::ReMIdDedxStudies::ContainedEvent(), nnbar::NNbarUtilities::correlationTCell(), nnbar::NNbarUtilities::correlationTPlane(), cvn::RegPixelMapProducer::CreateMapGivenBoundary(), cvn::PixelMapProducer::CreateMapGivenBoundary(), cvn::RegPixelMapProducer::CreateMapGivenShowerVertex(), cvn::RegPixelMapProducer::CreateMapGivenVertex(), jmshower::RecoJMShower::DepositEnergy(), evd::RecoBaseDrawer::DrawTrack2D(), skim::ParametersNumu::EarliestLatestHitPos(), jmshower::RecoJMShower::Energy(), dif::DiFShowerFinder::eparm(), rb::Cluster::Exclude(), dt::ViewMerger::Extremes(), numue::NumuEAlg::FDEnergy(), caf::FillDiFShowerVars(), caf::FillDiFVars(), caf::FillHadClustVars(), calib::StopperThreshold::FillHist(), bpfit::BreakPoint::FillHitList(), sn::SupernovaAna::FillPlaneSeperations(), dqsf::DQSpillFlags::FillPopulatedDCMs(), caf::FillProngVars(), trk::CosmicTrackAna::FillRecoInfo(), caf::FillShowerVars(), caf::FillSliceInfo(), filter::Filter::FillSliceVariables(), caf::FillSliceVars(), trk::CosmicTrackAna::FillTrackHistograms(), calib::StopperThreshold::FillTree(), comi::NumiFiltering::filter(), bsf::BremShowerFilter::filter(), showere::ShowerEnergyFilterMC::filter(), mono::MonopoleTrack::filter(), cvn::RegPixelMapProducer::FindCenterMedian(), cvn::PixelMapProducer::FindCenterMedian(), airshower::AirSlicer::FindNeighbors(), bsf::BremShowerFilter::findShowerByReco(), dif::DiFShowerFinder::findShowerByReco(), trk::KalmanTrack::FindTracks(), trk::CosmicTrackUtilities::FindTriCells(), cvn::RegPixelMapProducer::FindVertexMaxGap(), cvn::PixelMapProducer::FindVertexMaxGap(), cvn::RegPixelMapProducer::FindVertexWindowThreshold(), cvn::PixelMapProducer::FindVertexWindowThreshold(), bpfit::DimuonFitter::FindVertexZ(), bpfit::BreakPoint::FitTracks(), bpfit::DimuonFitter::FitView(), nuesand::FillNueSandbox::FracAngChanges(), nuesand::FillNueSandbox::FracModalHits(), nuesand::FillNueSandbox::FracNonContiguous(), cosrej::CosRejFxs::getActivity(), numusand::NumuSandFxs::getActivity(), numusand::NumuSandFxs::getActivityVtx(), numusand::NumuSandFxs::getAveTrackdEdx(), numusand::NumuSandFxs::getAveTrackdEdxLast4Cells(), numusand::NumuSandFxs::getAveTrackdEdxLast6Cells(), numusand::NumuSandFxs::getAveTrackdEdxLast8Cells(), trackinfo::TrackInfoFxs::getAveTrackdEdxLastCells(), cosrej::CosRejFxs::getBBC(), evd::SliceNavigator::GetBounds(), evd::SliceNavigator::GetBox(), xsrec::MakeXSecCCPi0Inc::GetBPI(), evd::RecoBaseDrawer::GetClusterOutlines(), evd::RecoBaseDrawer::GetClusterOutlinesConvexHull(), cosrej::CosRejFxs::getCVVars(), cosrej::CosRejFxs::getFits(), xsrec::MakeXSecCCPi0Inc::GetPhLL(), me::MEFinder::GetPhysNoiseSlcs(), jmshower::RecoJMShower::GetPlaneCentroidCell(), jmshower::RecoJMShower::GetPlaneE1Cell(), ndreco::NDRecoFxs::getProngActivity(), ndreco::NDRecoFxs::getProngDedx(), jmshower::RecoJMShower::GetRVPStats(), ndreco::NDRecoFxs::getTrackActivity(), ndreco::NDRecoFxs::getTrackDedx(), numue::NumuEAlg::GetUCMuonENonSingle(), numue::NumuEAlg::GetUCMuonESingle(), fuzz::FuzzyKValidate::GeVCalc(), slid::NuEEnergyAlg::HadronicDepEnergy(), dt::DiscreteTracker::HighActivity(), nnbar::NNbarUtilities::hitCountInView(), rb::HitList::HitList(), cvn::HitNuIndex(), jmshower::hitSort(), tf::TimingFitAlg::HoughFit(), LSTME::BasicProngVars::initBasicVars(), hough::HoughT::is_good_slice(), zcl::FastMonopoleTriggers::is_trigger_by_epoch1_fmmtrigger(), trk::CosmicTrackSelection::IsCalibTrack(), calib::RockMuonStopperSelection::IsContainedStopper(), calib::PCHitsList::IsGoodTrack(), trk::CosmicTrackAlg::IsTrackDownstreamFromTiming(), trk::KalmanTrackMerge::JoinTracks(), me::MEFinder::MakeSlcME(), fuzz::ViewMatchAlg::MakeTestProng(), nerd::ViewMatchAlg::MakeTestProng(), trk::CosmicTrackAlg::MakeTrack(), trk::WindowTrackingAlg::MakeTrack(), airshower::AirSlicer::MakeTrackSlices(), me::MEFinder::MakeTrkME(), murem::FindParent::MatchToOrigSlice(), nuesand::FillNueSandbox::MaxGap(), nuesand::FillNueSandbox::MaxHits(), dt::DiscreteTracker::MergeParasiteTracks(), nerd::NERDProng::MinHitClusterDist(), me::MEFinder::MinHitSlcDist(), dt::ViewMerger::MissingChargeByExtension(), murem::MuonRemove::MuonInfo(), dif::DiFShowerFinder::muonstub(), numue::NumuEAlg::NDEnergy(), numue::NumuEAlg::NDTrackEnergySplitting(), zcl::FmmTriggerEvd::NumberOfCellsPerLength(), zcl::FastMonopoleTriggers::NumberOfHitsInOverlapPlanesCut(), zcl::FmmTriggerEvd::NumberOfHitsInOverlapPlanesCut(), zcl::FastMMStudy::NumberOfHitsInOverlapPlanesCut(), zcl::FastMonopoleTriggers::NumberOfSurfaceHits(), zcl::FastMMStudy::NumberOfSurfaceHits(), rb::operator<<(), air::AirFilter::parallel_muon_slice(), skim::ParametersNumu::ParametersNumu(), zcl::FastMonopoleTriggers::passed_epoch2_fmmtrigger(), me::MEFinder::PassesMEPresel(), calib::PCHitsList::ProcessTrack(), calib::PCHitsList::ProcessTrackTrajectory(), trk::TrkAssn::produce(), vf::VertexFinder::produce(), qeef::QeFinder::produce(), hv::HoughVertex::produce(), nuesand::FillNueSandbox::produce(), wsnumu::WSNumu::produce(), presel::CosmicVeto::produce(), slid::Recluster::produce(), lem::Preselection::produce(), numusand::FillSandbox::produce(), presel::CosmicCVNVeto::produce(), presel::NuePresel::produce(), slid::SliceLIDBuilder::produce(), zcl::SPCluster::produce(), cosrej::CosRej::produce(), numue::NumuEnergy::produce(), earms::ElasticArmsHS::produce(), lem::MakeLibrary::produce(), dt::DiscreteTracker::produce(), calib::PCHitsList::produce(), ndreco::NDReco::produce(), sn::SNSlicer::produce(), sn::SupernovaMCCluster::produce(), vdt::VertexDT::produce(), zcl::FmmTriggerEvd::produce(), jmshower::NueSel::produce(), rvp::RecVarPID::produce(), dif::DiFShowerFinder::produce(), jmshower::NueSelLID::produce(), bpfit::BPFEnergyEstimator::produce(), bpfit::BPFEnergyEstimatorOnly::produce(), cosrej::MakeNueCosRej::produce(), ncid::NCNNKeras::produce(), murem::MuonRemove::produce(), fuzz::FuzzyKVertex::produce(), nerd::NERDProng::produce(), caf::CAFMaker::produce(), slid::ParticleIDAlg::Radius(), jmshower::RecoJMShower::Radius(), jmshower::RecoJMShower::RadiusV(), jmshower::RecoJMShower::RecoShowers(), murem::MuonRemove::RemoveByTruth(), trk::KalmanTrack::RemoveHitsFromSignal(), dt::ViewMerger::ScoreForJoinPlusExtension(), trk::KalmanTrackMerge::ShiftInterpolationPoints(), slid::NuEEnergyAlg::ShowerDepEnergy(), lem::MakeLibrary::SliceMeanPosEWeighted(), lem::MakeLibrary::SliceOrigin(), lem::LEMSummarizer::SliceToLEMInput(), remid::ReMIdValidate::SortByHits(), remid::ReMIdTrain::SortByHits(), htk::sortByNCell(), zcl::FmmTriggerEvd::StdevCellsPerPlane(), nnbar::NNbarUtilities::temporalExpand(), calib::StopperThreshold::testPath(), htk::Track3D::time_fit(), mono::Track3D::time_fit(), dt::ViewMerger::TotalChargePerView(), nnbar::NNbarUtilities::totalVisibleEnergyInView(), murem::TrackCleanUpAlg::TrackEinMIP(), zcl::FMMTracker::Tracking2D(), dprf::ChannelPlots::TrackOK(), dprf::TrackPlots::TrackOK(), trk::CosmicTrackUtilities::TrackResiduals(), slid::NuEEnergyAlg::VertexEnergy(), and trk::KalmanTrackMerge::ViewMergeTracks().

135  {
136  switch(view){
137  case geo::kX: return NXCell();
138  case geo::kY: return NYCell();
139  case geo::kXorY: return NCell();
140  default: assert(0 && "Unknown view");
141  }
142  }
X or Y views.
Definition: PlaneGeo.h:30
Vertical planes which measure X.
Definition: PlaneGeo.h:28
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
unsigned int NYCell() const
Number of cells in the y-view.
Definition: Cluster.h:108
unsigned int NXCell() const
Number of cells in the x-view.
Definition: Cluster.h:106
assert(nhit_max >=nhit_nbins)
unsigned int rb::Cluster::NCell ( ) const
inlineinherited
int jmshower::JMShower::NCellToEdge ( ) const

Definition at line 301 of file JMShower.cxx.

References fNCellToEdge.

302  {
303  return fNCellToEdge;
304  }
int jmshower::JMShower::NMIPPlane ( ) const

Definition at line 739 of file JMShower.cxx.

References fNMIPPlane.

740  {
741  return fNMIPPlane;
742  }
int rb::Cluster::NMissingPlanes ( geo::View_t  view) const
inherited

Total number of missing planes in cluster.

Put simply, number of planes spanned minus number of hit planes. If track is 2D, only planes in that view are counted.

Definition at line 693 of file Cluster.cxx.

References rb::Cluster::Cell(), MECModelEnuComparisons::i, geo::kXorY, rb::Cluster::NCell(), update_sam_good_runs_metadata::stride, and rb::Cluster::View().

Referenced by bpf::BPFCVNAna::analyze(), rb::Cluster::ExtentTNS(), caf::FillTrackVars(), skim::ParametersNue::ParametersNue(), wsnumu::WSNumu::produce(), and slid::SliceLIDBuilder::produce().

694  {
695  if(view == geo::kXorY) view = View();
696 
697  const int stride = (view == geo::kXorY) ? 1 : 2;
698 
699  std::set<int> planes;
700 
701  for(unsigned int i = 0; i < NCell(view); ++i)
702  planes.insert(Cell(view, i)->Plane());
703 
704  if(planes.empty()) return 0;
705 
706  return (*planes.rbegin() - *planes.begin())/stride - (int)planes.size() + 1;
707 
708  }
virtual geo::View_t View() const
kXorY for 3D clusters.
Definition: Cluster.h:99
X or Y views.
Definition: PlaneGeo.h:30
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
int jmshower::JMShower::NNode ( ) const

Definition at line 858 of file JMShower.cxx.

References fNNode.

859  {
860  return fNNode;
861  }
double jmshower::JMShower::NodeE ( int  node) const

Definition at line 871 of file JMShower.cxx.

References fNodesE, and file_size_ana::node.

872  {
873  double nodee=0;
874  if(node>=(int)fNodesE.size())return nodee;
875  nodee = fNodesE[node];
876  return nodee;
877  }
std::vector< double > fNodesE
Definition: JMShower.h:332
TVector3 jmshower::JMShower::NodePos ( int  node) const

Definition at line 863 of file JMShower.cxx.

References fNodesPos, and file_size_ana::node.

864  {
865  TVector3 nodepos(0,0,0);
866  if(node>=(int)fNodesPos.size())return nodepos;
867  nodepos = fNodesPos[node];
868  return nodepos;
869  }
std::vector< TVector3 > fNodesPos
Definition: JMShower.h:331
geo::OfflineChan jmshower::JMShower::NodeXID ( int  node) const

Definition at line 879 of file JMShower.cxx.

References fNodesXID, and file_size_ana::node.

880  {
881  geo::OfflineChan key0(0,0);
882  if(node>=(int)fNodesXID.size())return key0;
883  return fNodesXID[node];
884  }
std::vector< geo::OfflineChan > fNodesXID
Definition: JMShower.h:333
A (plane, cell) pair.
Definition: OfflineChan.h:17
geo::OfflineChan jmshower::JMShower::NodeYID ( int  node) const

Definition at line 885 of file JMShower.cxx.

References fNodesYID, and file_size_ana::node.

886  {
887  geo::OfflineChan key0(0,0);
888  if(node>=(int)fNodesYID.size())return key0;
889  return fNodesYID[node];
890  }
std::vector< geo::OfflineChan > fNodesYID
Definition: JMShower.h:334
A (plane, cell) pair.
Definition: OfflineChan.h:17
unsigned int jmshower::JMShower::NPlane ( ) const
double jmshower::JMShower::NueEnergy ( ) const

Definition at line 263 of file JMShower.cxx.

References fNueEnergy.

Referenced by jmshower::RecoJMShower::CalcANN().

264  {
265  return fNueEnergy;
266  }
unsigned int rb::Cluster::NXCell ( ) const
inlineinherited

Number of cells in the x-view.

Definition at line 106 of file Cluster.h.

References rb::Cluster::fXCell, and art::PtrVector< T >::size().

Referenced by caf::AddSlcMEToVec(), caf::AddTrkMEToVec(), chaninfo::CosmicEff::analyze(), comi::CosmicMetrics::analyze(), align::AlignInspect::analyze(), align::Alignment::analyze(), align::SplitTracks::analyze(), sn::SNSlicerAna::analyze(), calib::HitEfficiency::analyze(), calib::PEResponse::analyze(), trk::KalmanTrackAna::analyze(), hough::HoughValidate::analyze(), slid::LIDTraining::analyze(), red::EWCosmics::analyze(), bpfit::DimuonFitter::AnaSlice(), rb::Cluster::Cell(), sn::SNMichelAnalyzer::ClusterAroundTrackEnds(), sn::SNSlicer::ClusterIsGood(), cvn::PixelMapProducer::CreateMapGivenBoundary(), me::TrkME::DistToTrk(), evd::RecoBaseDrawer::DrawCluster2D(), caf::FillDiFShowerVars(), caf::FillDiFVars(), caf::FillHadClustVars(), caf::FillProngVars(), trk::CosmicTrackAna::FillRecoInfo(), caf::FillShowerVars(), filter::Filter::FillSliceVariables(), caf::FillSliceVars(), sn::SNSlicer::FinalizeCluster(), cvn::Get2DProngEfficiencyByPDG(), cvn::Get2DProngEnergyByPDG(), cvn::Get2DProngPurityByPDG(), jmshower::RecoJMShower::GetCentroid(), cvn::GetProngEfficiencyByPDG(), cvn::GetProngEnergyByPDG(), cvn::GetProngPurityByPDG(), jmshower::RecoJMShower::GetRVPStats(), bpfit::BreakPoint::GoodProng(), LSTME::BasicProngVars::initBasicVars(), trk::CosmicTrackSelection::IsCalibTrack(), calib::PCHitsList::IsGoodTrack(), skim::EvaluatorNue::KeepSlice(), nerd::NERDProng::MakeCluster(), trk::CosmicTrackAlg::MakeTrack(), rb::Cluster::NCell(), skim::ParametersNue::ParametersNue(), skim::ParametersNumu::ParametersNumu(), hough::HoughT::produce(), nuesand::FillNueSandbox::produce(), nussand::FillNusSandbox::produce(), hough::MultiHoughT::produce(), lem::Preselection::produce(), presel::NuePresel::produce(), earms::ElasticArmsHS::produce(), jmshower::JMClusterMerge::produce(), sn::SNSlicer::produce(), vdt::VertexDT::produce(), sn::SupernovaMCCluster::produce(), jmshower::NueSel::produce(), rvp::RecVarPID::produce(), cvntf::CVNProngEvaluatorTF::produce(), jmshower::NueSelLID::produce(), remid::RecoMuon::produce(), fuzz::FuzzyKVertex::produce(), nerd::NERDProng::produce(), caf::CAFMaker::produce(), cvn::ProngClassify(), jmshower::RecoJMShower::RecoShowers(), rb::Cluster::RemoveHit(), rb::Cluster::SetWeight(), lem::LEMSummarizer::SliceToLEMInput(), rb::Cluster::TotalGeVFastClusterOnly(), dprf::ChannelPlots::TrackOK(), dprf::TrackPlots::TrackOK(), me::MEFinder::TrkMEDist(), rb::Cluster::Weight(), and slicer::MMSlicer::WindowSlice().

106 {return fXCell.size();}
art::PtrVector< rb::CellHit > fXCell
collection of x-view cells in cluster
Definition: Cluster.h:317
size_type size() const
Definition: PtrVector.h:308
unsigned int rb::Cluster::NYCell ( ) const
inlineinherited

Number of cells in the y-view.

Definition at line 108 of file Cluster.h.

References rb::Cluster::fYCell, and art::PtrVector< T >::size().

Referenced by caf::AddSlcMEToVec(), caf::AddTrkMEToVec(), chaninfo::CosmicEff::analyze(), comi::CosmicMetrics::analyze(), align::AlignInspect::analyze(), align::Alignment::analyze(), align::SplitTracks::analyze(), sn::SNSlicerAna::analyze(), calib::HitEfficiency::analyze(), calib::PEResponse::analyze(), trk::KalmanTrackAna::analyze(), hough::HoughValidate::analyze(), slid::LIDTraining::analyze(), red::EWCosmics::analyze(), bpfit::DimuonFitter::AnaSlice(), sn::SNMichelAnalyzer::ClusterAroundTrackEnds(), sn::SNSlicer::ClusterIsGood(), cvn::PixelMapProducer::CreateMapGivenBoundary(), me::TrkME::DistToTrk(), evd::RecoBaseDrawer::DrawCluster2D(), caf::FillDiFShowerVars(), caf::FillDiFVars(), caf::FillHadClustVars(), caf::FillProngVars(), trk::CosmicTrackAna::FillRecoInfo(), caf::FillShowerVars(), filter::Filter::FillSliceVariables(), caf::FillSliceVars(), sn::SNSlicer::FinalizeCluster(), cvn::Get2DProngEfficiencyByPDG(), cvn::Get2DProngEnergyByPDG(), cvn::Get2DProngPurityByPDG(), jmshower::RecoJMShower::GetCentroid(), cvn::GetProngEfficiencyByPDG(), cvn::GetProngEnergyByPDG(), cvn::GetProngPurityByPDG(), jmshower::RecoJMShower::GetRVPStats(), bpfit::BreakPoint::GoodProng(), LSTME::BasicProngVars::initBasicVars(), trk::CosmicTrackSelection::IsCalibTrack(), calib::PCHitsList::IsGoodTrack(), skim::EvaluatorNue::KeepSlice(), nerd::NERDProng::MakeCluster(), trk::CosmicTrackAlg::MakeTrack(), rb::Cluster::NCell(), skim::ParametersNue::ParametersNue(), skim::ParametersNumu::ParametersNumu(), hough::HoughT::produce(), nuesand::FillNueSandbox::produce(), nussand::FillNusSandbox::produce(), presel::NuePresel::produce(), lem::Preselection::produce(), hough::MultiHoughT::produce(), earms::ElasticArmsHS::produce(), sn::SNSlicer::produce(), jmshower::JMClusterMerge::produce(), vdt::VertexDT::produce(), sn::SupernovaMCCluster::produce(), jmshower::NueSel::produce(), rvp::RecVarPID::produce(), cvntf::CVNProngEvaluatorTF::produce(), jmshower::NueSelLID::produce(), remid::RecoMuon::produce(), fuzz::FuzzyKVertex::produce(), nerd::NERDProng::produce(), caf::CAFMaker::produce(), cvn::ProngClassify(), jmshower::RecoJMShower::RecoShowers(), rb::Cluster::RemoveHit(), lem::LEMSummarizer::SliceToLEMInput(), rb::Cluster::TotalGeVFastClusterOnly(), dprf::ChannelPlots::TrackOK(), dprf::TrackPlots::TrackOK(), me::MEFinder::TrkMEDist(), and slicer::MMSlicer::WindowSlice().

108 {return fYCell.size();}
art::PtrVector< rb::CellHit > fYCell
collection of y-view cells in cluster
Definition: Cluster.h:318
size_type size() const
Definition: PtrVector.h:308
std::vector< geo::OfflineChan > rb::Cluster::OfflineChans ( ) const
inherited

Positions of all the CellHits.

Definition at line 190 of file Cluster.cxx.

References rb::Cluster::Cell(), MECModelEnuComparisons::i, rb::Cluster::NCell(), and runNovaSAM::ret.

Referenced by calib::PCHitsList::ProcessTrack(), calib::PCHitsList::ProcessTrackForBelowThresholdHits(), calib::PCHitsList::ProcessTrackForFLSHits(), and rb::Cluster::YCells().

191  {
192  std::vector<geo::OfflineChan> ret;
193  ret.reserve(NCell());
194  for(unsigned int i = 0; i < NCell(); ++i)
195  ret.push_back(Cell(i)->OfflineChan());
196  return ret;
197  }
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
bool rb::Prong::operator< ( const Prong other) const
inherited

Definition at line 226 of file Prong.cxx.

References rb::Prong::Start().

Referenced by rb::Prong::Dir().

227  {
228  return this->Start().Z() < other.Start().Z();
229  }
virtual TVector3 Start() const
Definition: Prong.h:73
bool rb::Cluster::operator< ( const Cluster other) const
inherited

Definition at line 576 of file Cluster.cxx.

References rb::Cluster::MeanZ().

577  {
578  return this->MeanZ() < other.MeanZ();
579  }
double MeanZ(rb::AveragingScheme scheme=kDefaultScheme) const
Definition: Cluster.h:233
int jmshower::JMShower::Pi0G2ID ( ) const

Definition at line 217 of file JMShower.cxx.

References fPi0G2ID.

218  {
219  return fPi0G2ID;
220  }
double jmshower::JMShower::Pi0Mgg ( ) const

Definition at line 208 of file JMShower.cxx.

References fPi0Mgg.

Referenced by jmshower::RecoJMShower::CalcANN().

209  {
210  return fPi0Mgg;
211  }
int jmshower::JMShower::PlaneCentroidCell ( unsigned int  plane) const

Definition at line 593 of file JMShower.cxx.

References fPlaneCentroidCell, NPlane(), and NDAPDHVSetting::plane.

594  {
595  if(plane>=JMShower::NPlane())return 0;
596  return fPlaneCentroidCell[plane];
597  }
std::vector< int > fPlaneCentroidCell
Definition: JMShower.h:405
unsigned int NPlane() const
Definition: JMShower.cxx:472
double jmshower::JMShower::PlaneDedx ( unsigned int  plane) const

Definition at line 605 of file JMShower.cxx.

References fPlaneDedx, NPlane(), and NDAPDHVSetting::plane.

606  {
607 // if(plane>=200)return 0;
608  if(plane>=JMShower::NPlane())return 0;
609  return fPlaneDedx[plane];
610  }
unsigned int NPlane() const
Definition: JMShower.cxx:472
std::vector< double > fPlaneDedx
Definition: JMShower.h:385
int jmshower::JMShower::PlaneE1Cell ( unsigned int  plane) const

Definition at line 569 of file JMShower.cxx.

References fPlaneE1Cell, NPlane(), and NDAPDHVSetting::plane.

570  {
571  if(plane>=JMShower::NPlane())return 0;
572  return fPlaneE1Cell[plane];
573  }
std::vector< int > fPlaneE1Cell
Definition: JMShower.h:403
unsigned int NPlane() const
Definition: JMShower.cxx:472
int jmshower::JMShower::PlaneE2Cell ( unsigned int  plane) const

Definition at line 581 of file JMShower.cxx.

References fPlaneE2Cell, NPlane(), and NDAPDHVSetting::plane.

582  {
583  if(plane>=JMShower::NPlane())return 0;
584  return fPlaneE2Cell[plane];
585  }
std::vector< int > fPlaneE2Cell
Definition: JMShower.h:404
unsigned int NPlane() const
Definition: JMShower.cxx:472
unsigned int jmshower::JMShower::PlaneHitCell ( unsigned int  plane) const

Definition at line 557 of file JMShower.cxx.

References fPlaneHitCell, NPlane(), and NDAPDHVSetting::plane.

558  {
559  if(plane>=JMShower::NPlane())return 0;
560  return fPlaneHitCell[plane];
561  }
unsigned int NPlane() const
Definition: JMShower.cxx:472
std::vector< unsigned int > fPlaneHitCell
Definition: JMShower.h:406
TVector3 jmshower::JMShower::PlaneHitXYZ ( unsigned int  plane) const

Definition at line 541 of file JMShower.cxx.

References fPlaneHitXYZ, NPlane(), and NDAPDHVSetting::plane.

542  {
543 // if(plane>=200)return 0;
544  if(plane>=JMShower::NPlane()){
545  TVector3 p3null(0,0,0);
546  return p3null;
547  }
548  return fPlaneHitXYZ[plane];
549  }
unsigned int NPlane() const
Definition: JMShower.cxx:472
std::vector< TVector3 > fPlaneHitXYZ
Definition: JMShower.h:401
double jmshower::JMShower::PlaneProb ( unsigned int  plane,
int  type 
) const

Definition at line 647 of file JMShower.cxx.

References fPlaneProbE, fPlaneProbEcoh, fPlaneProbEdis, fPlaneProbEqe, fPlaneProbEres, fPlaneProbG, fPlaneProbHad, fPlaneProbMu, fPlaneProbNuetron, fPlaneProbPi0, fPlaneProbPion, fPlaneProbProton, NPlane(), and NDAPDHVSetting::plane.

648  {
649  if(plane>=JMShower::NPlane()) return -99;
650  if(type==0)return fPlaneProbE[plane];
651  if(type==1)return fPlaneProbG[plane];
652  if(type==2)return fPlaneProbMu[plane];
653  if(type==3)return fPlaneProbPi0[plane];
654  if(type==4)return fPlaneProbHad[plane];
655  if(type==5)return fPlaneProbProton[plane];
656  if(type==6)return fPlaneProbNuetron[plane];
657  if(type==7)return fPlaneProbPion[plane];
658  if(type==8)fPlaneProbEqe[plane];
659  if(type==9)fPlaneProbEres[plane];
660  if(type==10)fPlaneProbEdis[plane];
661  if(type==11)fPlaneProbEcoh[plane];
662  return -9999;
663  }
std::vector< double > fPlaneProbEcoh
Definition: JMShower.h:391
std::vector< double > fPlaneProbProton
Definition: JMShower.h:397
unsigned int NPlane() const
Definition: JMShower.cxx:472
std::vector< double > fPlaneProbE
Definition: JMShower.h:387
std::vector< double > fPlaneProbEdis
Definition: JMShower.h:390
std::vector< double > fPlaneProbG
Definition: JMShower.h:393
std::vector< double > fPlaneProbPi0
Definition: JMShower.h:395
std::vector< double > fPlaneProbEqe
Definition: JMShower.h:388
std::vector< double > fPlaneProbNuetron
Definition: JMShower.h:398
std::vector< double > fPlaneProbMu
Definition: JMShower.h:394
std::vector< double > fPlaneProbPion
Definition: JMShower.h:399
std::vector< double > fPlaneProbEres
Definition: JMShower.h:389
std::vector< double > fPlaneProbHad
Definition: JMShower.h:396
double jmshower::JMShower::PlaneRadius ( unsigned int  plane) const

Definition at line 619 of file JMShower.cxx.

References fPlaneRadius, NPlane(), and NDAPDHVSetting::plane.

Referenced by jmshower::RecoJMShower::RecoShowers().

620  {
621 // if(plane>=200)return 0;
622  if(plane>=JMShower::NPlane())return 0;
623  return fPlaneRadius[plane];
624  }
unsigned int NPlane() const
Definition: JMShower.cxx:472
std::vector< double > fPlaneRadius
Definition: JMShower.h:386
double jmshower::JMShower::Radius ( ) const

Definition at line 376 of file JMShower.cxx.

References fRadius.

377  {
378  return fRadius;
379  }
rb::RecoHit rb::Cluster::RecoHit ( const art::Ptr< rb::CellHit > &  chit) const
inherited

Return calibrated hit based on assumed W coordinate.

To calibrate a hit you must know its distance from the readout. This is a convenience function which uses the W function to estimate the position of a CellHit and then uses calib::Calibrator to produce a calibrated hit from that information.

Definition at line 259 of file Cluster.cxx.

References art::Ptr< T >::get(), and calib::Calibrator::MakeRecoHit().

Referenced by dif::DiFShowerFinder::adjustPlane(), dif::DiFShowerFinder::adjustPlane_end(), tut::TutAnalyzer::analyze(), calib::TestParticleCorrections::analyze(), tbem::TBRecoAna::analyze(), trk::KalmanTrackAna::analyze(), showere::ShowerEnergyAna::analyze(), upmuana::UpMuRecoAna::analyze(), upmuana::UpMuAnalysis::analyze(), slid::NuEEnergyAlg::CellEnergy(), murem::TrackCleanUpAlg::CleanUpTrack(), nnbar::NNbarUtilities::correlationTCell(), nnbar::NNbarUtilities::correlationTPlane(), cvn::RegPixelMapProducer::CreateMapGivenBoundary(), cvn::PixelMapProducer::CreateMapGivenBoundary(), cvn::RegPixelMapProducer::CreateMapGivenShowerVertex(), cvn::RegPixelMapProducer::CreateMapGivenVertex(), murem::TrackCleanUpAlg::DeDxInPlane(), nnbar::NNbarUtilities::energyBalancingVertex(), dif::DiFShowerFinder::eparm(), calib::StopperThreshold::FillHist(), trk::CosmicTrackAna::FillTrackHistograms(), calib::StopperThreshold::FillTree(), showere::ShowerEnergyFilterMC::filter(), bsf::BremShowerFilter::findShowerByReco(), dif::DiFShowerFinder::findShowerByReco(), numusand::NumuSandFxs::getActivity(), numusand::NumuSandFxs::getAveTrackdEdx(), numusand::NumuSandFxs::getAveTrackdEdxLast4Cells(), numusand::NumuSandFxs::getAveTrackdEdxLast6Cells(), numusand::NumuSandFxs::getAveTrackdEdxLast8Cells(), trackinfo::TrackInfoFxs::getAveTrackdEdxLastCells(), xsrec::MakeXSecCCPi0Inc::GetBPI(), nnbar::NNbarUtilities::getCoordinateOfHits(), cosrej::CosRejFxs::getFits(), nuesand::FillNueSandbox::GetPlaneEnergy(), fuzz::FuzzyKValidate::GeVCalc(), tf::TimingFitAlg::HoughFit(), dif::DiFShowerFinder::muonstub(), numue::NumuEAlg::NDEnergy(), numue::NumuEAlg::NDTrackEnergySplitting(), nussand::FillNusSandbox::produce(), numusand::FillSandbox::produce(), slid::SliceLIDBuilder::produce(), lem::MakeLibrary::produce(), ndreco::NDReco::produce(), remid::RecoMuon::produce(), upmuana::UpMuProb::produce(), caf::CAFMaker::produce(), rb::Cluster::RecoHit(), lem::MakeLibrary::SliceMeanPosEWeighted(), lem::LEMSummarizer::SliceToLEMInput(), nnbar::NNbarUtilities::temporalExpand(), calib::StopperThreshold::testPath(), dt::ViewMerger::TotalChargePerView(), rb::Cluster::TotalGeV(), nnbar::NNbarUtilities::totalVisibleEnergyInView(), murem::TrackCleanUpAlg::TrackEinMIP(), trk::CosmicTrackUtilities::TrackResiduals(), and rb::Cluster::YCells().

260  {
262  rb::RecoHit rb(cal->MakeRecoHit(*chit, this->W(chit.get())));
263  return rb;
264  }
rb::RecoHit MakeRecoHit(rb::CellHit const &cellhit, double w)
Calibrated quantities relying on position in the orthogonal view. To generate a rb::CellHit from a rb...
Definition: RecoHit.h:19
Perform a "2 point" Hough transform on a collection of hits.
T const * get() const
Definition: Ptr.h:321
rb::RecoHit rb::Cluster::RecoHit ( geo::View_t  view,
unsigned int  viewIdx 
) const
inherited

Definition at line 267 of file Cluster.cxx.

References rb::Cluster::Cell(), and rb::Cluster::RecoHit().

268  {
269  return RecoHit(Cell(view, viewIdx));
270  }
rb::RecoHit RecoHit(const art::Ptr< rb::CellHit > &chit) const
Return calibrated hit based on assumed W coordinate.
Definition: Cluster.cxx:259
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
Definition: Cluster.cxx:145
rb::RecoHit rb::Cluster::RecoHit ( unsigned int  globalIdx) const
inherited

Definition at line 273 of file Cluster.cxx.

References rb::Cluster::Cell(), and rb::Cluster::RecoHit().

274  {
275  return RecoHit(Cell(globalIdx));
276  }
rb::RecoHit RecoHit(const art::Ptr< rb::CellHit > &chit) const
Return calibrated hit based on assumed W coordinate.
Definition: Cluster.cxx:259
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 rb::Cluster::RemoveHit ( const art::Ptr< rb::CellHit hit)
inherited

Remove hit from current cluster.

Definition at line 290 of file Cluster.cxx.

References art::PtrVector< T >::begin(), art::PtrVector< T >::erase(), rb::Cluster::fPrecalcTotalGeV, rb::Cluster::fXCell, rb::Cluster::fXWeights, rb::Cluster::fYCell, rb::Cluster::fYWeights, MECModelEnuComparisons::i, geo::kX, geo::kY, rb::Cluster::NXCell(), rb::Cluster::NYCell(), and rb::CellHit::View().

Referenced by slid::NuEEnergyAlg::HadronicDepEnergy(), murem::FindParent::MatchToOrigSlice(), slid::Recluster::produce(), sn::SNSlicer::produce(), slid::NuEEnergyAlg::VertexEnergy(), and rb::Cluster::YCells().

291  {
292  fPrecalcTotalGeV = -1; // Invalidate any cached value
293 
294  if(hit->View() == geo::kX){
295  // try to find the hit in the xcells
296  for(unsigned int i = 0;i<NXCell();++i){
297  if(fXCell[i] == hit){
299  if(!fXWeights.empty()) fXWeights.erase(fXWeights.begin()+i);
300  break;
301  }
302  }
303  }
304  else if(hit->View() == geo::kY){
305  // try to find the hit in the ycells
306  for(unsigned int i = 0;i<NYCell();++i){
307  if(fYCell[i] == hit){
309  if(!fYWeights.empty()) fYWeights.erase(fYWeights.begin()+i);
310  break;
311  }
312  }
313  }
314  }
double fPrecalcTotalGeV
-1 = uninitialized
Definition: Cluster.h:324
iterator begin()
Definition: PtrVector.h:223
geo::View_t View() const
Definition: CellHit.h:41
Vertical planes which measure X.
Definition: PlaneGeo.h:28
iterator erase(iterator position)
Definition: PtrVector.h:508
art::PtrVector< rb::CellHit > fYCell
collection of y-view cells in cluster
Definition: Cluster.h:318
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
art::PtrVector< rb::CellHit > fXCell
collection of x-view cells in cluster
Definition: Cluster.h:317
unsigned int NYCell() const
Number of cells in the y-view.
Definition: Cluster.h:108
std::vector< double > fXWeights
Weights, matching cell indexing.
Definition: Cluster.h:319
unsigned int NXCell() const
Number of cells in the x-view.
Definition: Cluster.h:106
std::vector< double > fYWeights
May be empty, means all weights are 1.
Definition: Cluster.h:320
void rb::Cluster::RemoveHit ( unsigned int  globalIdx)
inherited

Remove the ith hit from current cluster.

Definition at line 317 of file Cluster.cxx.

References ana::assert(), art::PtrVector< T >::begin(), art::PtrVector< T >::erase(), rb::Cluster::fPrecalcTotalGeV, rb::Cluster::fXCell, rb::Cluster::fYCell, rb::Cluster::NCell(), and rb::Cluster::NXCell().

318  {
319  fPrecalcTotalGeV = -1; // Invalidate any cached value
320 
321  assert(globalIdx < NCell());
322  if(globalIdx < NXCell()) fXCell.erase(fXCell.begin()+globalIdx);
323  else fYCell.erase(fYCell.begin()+globalIdx-NXCell());
324  }
double fPrecalcTotalGeV
-1 = uninitialized
Definition: Cluster.h:324
iterator begin()
Definition: PtrVector.h:223
iterator erase(iterator position)
Definition: PtrVector.h:508
art::PtrVector< rb::CellHit > fYCell
collection of y-view cells in cluster
Definition: Cluster.h:318
art::PtrVector< rb::CellHit > fXCell
collection of x-view cells in cluster
Definition: Cluster.h:317
unsigned int NCell() const
Number of cells in either view.
Definition: Cluster.h:110
unsigned int NXCell() const
Number of cells in the x-view.
Definition: Cluster.h:106
assert(nhit_max >=nhit_nbins)
void rb::Cluster::SavePrecalcTotalGeV ( ESaveGeVMode  savemode)
inherited

Store the current result of TotalGeV / CalorimetricEnergy.

If you intend to lock in the current calibrations, call this method immediately before storing the product in the event. The result can be retrieved by passing kUsePrecalcEnergy to TotalGeV or CalorimetricEnergy.

Multiple calls are considered to be an error. If you really do need to update the energy, pass kResetTotalGeV.

Definition at line 751 of file Cluster.cxx.

References allTimeWatchdog::endl, stan::math::fabs(), rb::Cluster::fPrecalcTotalGeV, rb::Cluster::kRecomputeEnergy, rb::Cluster::kResetTotalGeV, and rb::Cluster::TotalGeV().

752  {
753  const double gev = TotalGeV(kRecomputeEnergy);
754  if(fPrecalcTotalGeV < 0 || savemode == kResetTotalGeV){
755  fPrecalcTotalGeV = gev;
756  }
757  else{
758  if(fabs(gev-fPrecalcTotalGeV) > .01){
759  mf::LogError("rb::Cluster") << "SaveTotalGeV() already called. Old value was " << fPrecalcTotalGeV << ", now " << gev
760  << ". If you intended to reset the stored value, you must pass kResetTotalGeV. Aborting." << std::endl;
761  abort();
762  }
763  else{
764  mf::LogWarning("rb::Cluster") << "Called SaveTotalGeV() twice for the same cluster, which is inefficient." << std::endl;
765  }
766  }
767  }
double fPrecalcTotalGeV
-1 = uninitialized
Definition: Cluster.h:324
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
Altering the already-set value is not an error.
Definition: Cluster.h:283
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
double TotalGeV(EEnergyCalcScheme escheme=kRecomputeEnergy) const
Simple sum of the estimated GeV of all the hits.
Definition: Cluster.cxx:378
Default. Ask Calibrator about each hit, and sum.
Definition: Cluster.h:178
void jmshower::JMShower::SetANN ( unsigned int  mode,
double  ann 
)

Definition at line 754 of file JMShower.cxx.

References fANN, and submit_nova_art::mode.

755  {
756  fANN[mode] = ann;
757  }
double fANN[20]
Definition: JMShower.h:423
void jmshower::JMShower::SetAsym ( double  asym)

Definition at line 901 of file JMShower.cxx.

References fAsym.

Referenced by jmshower::RecoJMShower::RecoShowers().

902  {
903  fAsym = asym;
904  }
void jmshower::JMShower::SetBackTag ( bool  backtag)

Definition at line 399 of file JMShower.cxx.

References fBackTag.

Referenced by jmshower::RecoJMShower::RecoShowers().

400  {
401  fBackTag = backtag;
402  }
void jmshower::JMShower::SetCellTransDedx ( unsigned int  tcell,
double  celldedx 
)

Definition at line 690 of file JMShower.cxx.

References fCelltransDedx.

Referenced by jmshower::RecoJMShower::RecoShowers().

691  {
692  if(tcell>=20)return;
693  fCelltransDedx[tcell] = celldedx;
694  }
double fCelltransDedx[20]
Definition: JMShower.h:411
void jmshower::JMShower::SetCentroid ( TVector3  centroid)

Definition at line 441 of file JMShower.cxx.

References fCentroid.

Referenced by jmshower::RecoJMShower::RecoShowers().

442  {
443  fCentroid = centroid;
444  }
TVector3 fCentroid
Definition: JMShower.h:419
void jmshower::JMShower::SetClosetEdge ( int  edge)

Definition at line 306 of file JMShower.cxx.

References fClosetEdge.

Referenced by jmshower::RecoJMShower::RecoShowers().

307  {
308  fClosetEdge = edge;
309  }
void jmshower::JMShower::SetContGap ( double  gap)

Definition at line 420 of file JMShower.cxx.

References fContGap.

Referenced by jmshower::RecoJMShower::RecoShowers().

421  {
422  fContGap = gap;
423  }
void jmshower::JMShower::SetDedxInvLongLL ( double  dedxlongll,
int  type 
)

Definition at line 678 of file JMShower.cxx.

References fDedxInvLongLL.

Referenced by jmshower::RecoJMShower::RecoShowers().

679  {
680  if(type>=20) return;
681  fDedxInvLongLL[type] = dedxlongll;
682  }
double fDedxInvLongLL[20]
Definition: JMShower.h:410
void jmshower::JMShower::SetDedxLongLL ( double  dedxlongll,
int  type 
)

Definition at line 666 of file JMShower.cxx.

References fDedxLongLL.

Referenced by jmshower::RecoJMShower::RecoShowers().

667  {
668  if(type>=20) return;
669  fDedxLongLL[type] = dedxlongll;
670  }
double fDedxLongLL[20]
Definition: JMShower.h:409
void jmshower::JMShower::SetDedxTransLL ( double  dedxtransll,
int  type 
)

Definition at line 703 of file JMShower.cxx.

References fDedxTransLL.

Referenced by jmshower::RecoJMShower::RecoShowers().

704  {
705  if(type>=20) return;
706  fDedxTransLL[type] = dedxtransll;
707  }
double fDedxTransLL[20]
Definition: JMShower.h:412
void jmshower::JMShower::SetDepositEnergy ( double  depositenergy)

Definition at line 123 of file JMShower.cxx.

References fDepositEnergy.

Referenced by jmshower::RecoJMShower::RecoShowers().

124  {
125  fDepositEnergy = depositenergy;
126  }
double fDepositEnergy
Definition: JMShower.h:340
void rb::Prong::SetDir ( TVector3  dir)
virtualinherited

Definition at line 104 of file Prong.cxx.

References rb::Prong::fDir, and rb::Cluster::fPrecalcTotalGeV.

Referenced by slid::ParticleIDAlg::DedxInverseLongLL(), trk::WindowTrackingAlg::DetermineInitialDirection(), rb::Prong::Dir(), bpfit::BreakPoint::FitTracks(), fuzz::ViewMatchAlg::Matching(), nerd::ViewMatchAlg::Matching(), slid::Recluster::produce(), cheat::MCCheater::produce(), rb::Prong::Prong(), jmshower::RecoJMShower::RecoShowers(), and trk::KalmanTrackMerge::ViewMergeTracks().

105  {
106  fPrecalcTotalGeV = -1; // Invalidate any cached value
107 
108  // I've removed this assert to allow for 2D prongs to set a 3D start
109  // direction if they so choose.
110  // assert(fView == geo::kXorY);
111 
112  fDir = dir.Unit(); // Ensure normalized
113  }
double fPrecalcTotalGeV
-1 = uninitialized
Definition: Cluster.h:324
TVector3 fDir
Direction at starting point.
Definition: Prong.h:112
TDirectory * dir
Definition: macro.C:5
void rb::Prong::SetDir ( double  dv,
double  dz 
)
virtualinherited
Parameters
dvComponent of prong direction in View coordinate
dzz-component of prong direction

Definition at line 117 of file Prong.cxx.

References ana::assert(), rb::Prong::fDir, rb::Cluster::fPrecalcTotalGeV, rb::Cluster::fView, geo::kX, and geo::kY.

118  {
119  fPrecalcTotalGeV = -1; // Invalidate any cached value
120 
121  assert(fView == geo::kX || fView == geo::kY);
122 
123  if(fView == geo::kX){
124  fDir = TVector3(dv, 0, dz);
125  }
126  else{
127  fDir = TVector3(0, dv, dz);
128  }
129 
130  fDir = fDir.Unit(); // Ensure normalized
131  }
double fPrecalcTotalGeV
-1 = uninitialized
Definition: Cluster.h:324
TVector3 fDir
Direction at starting point.
Definition: Prong.h:112
Vertical planes which measure X.
Definition: PlaneGeo.h:28
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
double dz[NP][NC]
geo::View_t fView
view this cluster is in
Definition: Cluster.h:316
assert(nhit_max >=nhit_nbins)
void jmshower::JMShower::SetDistToEdge ( double  disttoedge)

Definition at line 113 of file JMShower.cxx.

References fDistToEdge.

Referenced by jmshower::RecoJMShower::RecoShowers().

114  {
115  fDistToEdge = disttoedge;
116  }
double fDistToEdge
Definition: JMShower.h:339
void jmshower::JMShower::SetEdge10GeV ( double  gev)

Definition at line 335 of file JMShower.cxx.

References fEdge10GeV.

Referenced by jmshower::RecoJMShower::RecoShowers().

336  {
337  fEdge10GeV = gev;
338  }
void jmshower::JMShower::SetEdge15GeV ( double  gev)

Definition at line 325 of file JMShower.cxx.

References fEdge15GeV.

Referenced by jmshower::RecoJMShower::RecoShowers().

326  {
327  fEdge15GeV = gev;
328  }
void jmshower::JMShower::SetEdge20GeV ( double  gev)

Definition at line 317 of file JMShower.cxx.

References fEdge20GeV.

Referenced by jmshower::RecoJMShower::RecoShowers().

318  {
319  fEdge20GeV = gev;
320  }
void jmshower::JMShower::SetEdge2GeV ( double  gev)

Definition at line 354 of file JMShower.cxx.

References fEdge2GeV.

Referenced by jmshower::RecoJMShower::RecoShowers().

355  {
356  fEdge2GeV = gev;
357  }
void jmshower::JMShower::SetEdge5GeV ( double  gev)

Definition at line 345 of file JMShower.cxx.

References fEdge5GeV.

Referenced by jmshower::RecoJMShower::RecoShowers().

346  {
347  fEdge5GeV = gev;
348  }
void jmshower::JMShower::SetEfrac_20slides ( double  efrac_20slides)

Definition at line 790 of file JMShower.cxx.

References fEfrac_20slides.

Referenced by jmshower::RecoJMShower::RecoShowers().

791  {
792  fEfrac_20slides = efrac_20slides;
793  }
double fEfrac_20slides
Definition: JMShower.h:428
void jmshower::JMShower::SetEfrac_2sigmaHOR ( double  efrac_2sigmaHOR)

Definition at line 799 of file JMShower.cxx.

References fEfrac_2sigmaHOR.

Referenced by jmshower::RecoJMShower::RecoShowers().

800  {
801  fEfrac_2sigmaHOR = efrac_2sigmaHOR;
802  }
double fEfrac_2sigmaHOR
Definition: JMShower.h:429
void jmshower::JMShower::SetEfrac_2slides ( double  efrac_2slides)

Definition at line 763 of file JMShower.cxx.

References fEfrac_2slides.

Referenced by jmshower::RecoJMShower::RecoShowers().

764  {
765  fEfrac_2slides = efrac_2slides;
766  }
double fEfrac_2slides
Definition: JMShower.h:425
void jmshower::JMShower::SetEfrac_4sigmaHOR ( double  efrac_4sigmaHOR)

Definition at line 808 of file JMShower.cxx.

References fEfrac_4sigmaHOR.

Referenced by jmshower::RecoJMShower::RecoShowers().

809  {
810  fEfrac_4sigmaHOR = efrac_4sigmaHOR;
811  }
double fEfrac_4sigmaHOR
Definition: JMShower.h:430
void jmshower::JMShower::SetEfrac_4slides ( double  efrac_4slides)

Definition at line 772 of file JMShower.cxx.

References fEfrac_4slides.

Referenced by jmshower::RecoJMShower::RecoShowers().

773  {
774  fEfrac_4slides = efrac_4slides;
775  }
double fEfrac_4slides
Definition: JMShower.h:426
void jmshower::JMShower::SetEfrac_6slides ( double  efrac_6slides)

Definition at line 781 of file JMShower.cxx.

References fEfrac_6slides.

Referenced by jmshower::RecoJMShower::RecoShowers().

782  {
783  fEfrac_6slides = efrac_6slides;
784  }
double fEfrac_6slides
Definition: JMShower.h:427
void jmshower::JMShower::SetEiso_2sigmaHOR ( double  eiso_2sigmaHOR)

Definition at line 817 of file JMShower.cxx.

References fEiso_2sigmaHOR.

Referenced by jmshower::RecoJMShower::RecoShowers().

818  {
819  fEiso_2sigmaHOR = eiso_2sigmaHOR;
820  }
double fEiso_2sigmaHOR
Definition: JMShower.h:431
void jmshower::JMShower::SetEiso_4sigmaHOR ( double  eiso_4sigmaHOR)

Definition at line 825 of file JMShower.cxx.

References fEiso_4sigmaHOR.

Referenced by jmshower::RecoJMShower::RecoShowers().

826  {
827  fEiso_4sigmaHOR = eiso_4sigmaHOR;
828  }
double fEiso_4sigmaHOR
Definition: JMShower.h:432
void jmshower::JMShower::SetEiso_6sigmaHOR ( double  eiso_6sigmaHOR)

Definition at line 833 of file JMShower.cxx.

References fEiso_6sigmaHOR.

Referenced by jmshower::RecoJMShower::RecoShowers().

834  {
835  fEiso_6sigmaHOR = eiso_6sigmaHOR;
836  }
double fEiso_6sigmaHOR
Definition: JMShower.h:433
void jmshower::JMShower::SetEnergy ( double  energy)

Definition at line 143 of file JMShower.cxx.

References energy, and fEnergy.

Referenced by jmshower::RecoJMShower::RecoShowers().

144  {
145  fEnergy = energy;
146  }
double energy
Definition: plottest35.C:25
void jmshower::JMShower::SetExclEnergy ( double  exclenergy)

Definition at line 132 of file JMShower.cxx.

References fExclEnergy.

133  {
134  fExclEnergy = exclenergy;
135  }
double fExclEnergy
Definition: JMShower.h:341
void jmshower::JMShower::SetGap ( double  gap)

Definition at line 410 of file JMShower.cxx.

References fGap.

Referenced by jmshower::RecoJMShower::RecoShowers().

411  {
412  fGap = gap;
413  }
void jmshower::JMShower::SetHitColSize ( unsigned int  ncell)

Definition at line 53 of file JMShower.cxx.

References fHitDeconvECol, fHitDistCol, fHitSumECol, and MECModelEnuComparisons::i.

Referenced by jmshower::RecoJMShower::RecoShowers().

54  {
55  for(unsigned int i = 0;i<ncell;i++) {
56  fHitDistCol.push_back(0);
57  fHitDeconvECol.push_back(0);
58  fHitSumECol.push_back(0);
59  }
60  }
std::vector< double > fHitSumECol
Definition: JMShower.h:329
std::vector< double > fHitDistCol
Definition: JMShower.h:327
std::vector< double > fHitDeconvECol
Definition: JMShower.h:328
void jmshower::JMShower::SetHitDeconvE ( unsigned int  cell,
double  deconve 
)

Definition at line 82 of file JMShower.cxx.

References getBrightness::cell, and fHitDeconvECol.

Referenced by jmshower::RecoJMShower::RecoShowers().

83  {
84  fHitDeconvECol[cell] = deconve;
85  }
std::vector< double > fHitDeconvECol
Definition: JMShower.h:328
void jmshower::JMShower::SetHitDist ( unsigned int  cell,
double  dist 
)

Definition at line 72 of file JMShower.cxx.

References getBrightness::cell, dist, and fHitDistCol.

Referenced by jmshower::RecoJMShower::RecoShowers().

73  {
75  }
double dist
Definition: runWimpSim.h:113
std::vector< double > fHitDistCol
Definition: JMShower.h:327
void jmshower::JMShower::SetHitSumE ( unsigned int  cell,
double  sume 
)

Definition at line 93 of file JMShower.cxx.

References getBrightness::cell, and fHitSumECol.

Referenced by jmshower::RecoJMShower::RecoShowers().

94  {
95  fHitSumECol[cell] = sume;
96  }
std::vector< double > fHitSumECol
Definition: JMShower.h:329
void rb::Cluster::SetID ( int  id)
inlineinherited
void jmshower::JMShower::SetIsFiducial ( bool  isfiducial)

Definition at line 104 of file JMShower.cxx.

References fIsFiducial.

Referenced by jmshower::RecoJMShower::RecoShowers().

105  {
106  fIsFiducial = isfiducial;
107  }
void jmshower::JMShower::SetIsInvPhoton ( bool  isinvphoton)

Definition at line 724 of file JMShower.cxx.

References fIsInvPhoton.

725  {
726  fIsInvPhoton = isinvphoton;
727  }
void jmshower::JMShower::SetISlice ( unsigned int  islice)

Definition at line 744 of file JMShower.cxx.

References fISlice.

Referenced by jmshower::RecoJMShower::RecoShowers().

745  {
746  fISlice = islice;
747  }
unsigned int fISlice
Definition: JMShower.h:384
void jmshower::JMShower::SetIsMuon ( bool  ismuon)

Definition at line 714 of file JMShower.cxx.

References fIsMuon.

715  {
716  fIsMuon = ismuon;
717  }
void jmshower::JMShower::SetIxyz ( TVector3  ixyz)

Definition at line 892 of file JMShower.cxx.

References fIxyz.

Referenced by jmshower::RecoJMShower::RecoShowers().

893  {
894  fIxyz = ixyz;
895  }
TVector3 fIxyz
Definition: JMShower.h:420
void jmshower::JMShower::SetNCellToEdge ( int  nce)

Definition at line 297 of file JMShower.cxx.

References fNCellToEdge.

Referenced by jmshower::RecoJMShower::RecoShowers().

298  {
299  fNCellToEdge = nce;
300  }
void jmshower::JMShower::SetNMIPPlane ( int  nmipplane)

Definition at line 735 of file JMShower.cxx.

References fNMIPPlane.

Referenced by jmshower::RecoJMShower::RecoShowers().

736  {
737  fNMIPPlane = nmipplane;
738  }
void jmshower::JMShower::SetNodes ( std::vector< TVector3 >  nodespos,
std::vector< double >  nodese,
std::vector< geo::OfflineChan xid,
std::vector< geo::OfflineChan yid 
)

Definition at line 842 of file JMShower.cxx.

References fNNode, fNodesE, fNodesPos, fNodesXID, fNodesYID, and MECModelEnuComparisons::i.

Referenced by jmshower::RecoJMShower::RecoShowers().

843  {
844  if(nodespos.size()!=nodese.size())return;
845  fNNode = nodespos.size();
846  fNodesPos.clear();
847  fNodesE.clear();
848  fNodesXID.clear();
849  fNodesYID.clear();
850  for(int i=0;i<fNNode;i++){
851  fNodesPos.push_back(nodespos[i]);
852  fNodesE.push_back(nodese[i]);
853  fNodesXID.push_back(xid[i]);
854  fNodesYID.push_back(yid[i]);
855  }
856  }
std::vector< TVector3 > fNodesPos
Definition: JMShower.h:331
std::vector< geo::OfflineChan > fNodesXID
Definition: JMShower.h:333
std::vector< double > fNodesE
Definition: JMShower.h:332
std::vector< geo::OfflineChan > fNodesYID
Definition: JMShower.h:334
void rb::Cluster::SetNoise ( bool  noise)
inlineinherited

Declare the cluster to consist of noise hits or not.

Definition at line 161 of file Cluster.h.

References rb::Cluster::fNoiseCluster.

Referenced by rb::Cluster::Exclude(), slicer::Slicer4D::produce(), airshower::AirSlicer::produce(), jmshower::JMClusterMerge::produce(), tdslicer::TDSlicer::produce(), and slicer::Slicer::WindowSlice().

161 {fNoiseCluster = noise;}
bool fNoiseCluster
flag for whether this is a noise cluster
Definition: Cluster.h:322
void jmshower::JMShower::SetNPlane ( unsigned int  nplane)

Definition at line 468 of file JMShower.cxx.

References fNPlane.

Referenced by jmshower::RecoJMShower::RecoShowers().

469  {
470  fNPlane = nplane;
471  }
unsigned fNPlane
Definition: JMShower.h:375
void jmshower::JMShower::SetNueEnergy ( double  nueenergy)

Definition at line 259 of file JMShower.cxx.

References fNueEnergy.

260  {
261  fNueEnergy = nueenergy;
262  }
void jmshower::JMShower::SetPi0G2ID ( int  id)

Definition at line 213 of file JMShower.cxx.

References fPi0G2ID.

214  {
215  fPi0G2ID = id;
216  }
::xsd::cxx::tree::id< char, ncname > id
Definition: Database.h:165
void jmshower::JMShower::SetPi0Mgg ( double  pi0mass)

Definition at line 204 of file JMShower.cxx.

References fPi0Mgg.

205  {
206  fPi0Mgg = pi0mass;
207  }
void jmshower::JMShower::SetPlaneCentroidCell ( unsigned int  plane,
int  cell 
)

Definition at line 587 of file JMShower.cxx.

References getBrightness::cell, fPlaneCentroidCell, NPlane(), and NDAPDHVSetting::plane.

Referenced by jmshower::RecoJMShower::RecoShowers().

588  {
589  if(plane>=JMShower::NPlane())return;
591  }
std::vector< int > fPlaneCentroidCell
Definition: JMShower.h:405
unsigned int NPlane() const
Definition: JMShower.cxx:472
void jmshower::JMShower::SetPlaneDedx ( unsigned int  plane,
double  planededx 
)

Definition at line 599 of file JMShower.cxx.

References fPlaneDedx, NPlane(), and NDAPDHVSetting::plane.

Referenced by jmshower::RecoJMShower::RecoShowers().

600  {
601  if(plane>=JMShower::NPlane())return;
602  fPlaneDedx[plane] = planededx;
603  }
unsigned int NPlane() const
Definition: JMShower.cxx:472
std::vector< double > fPlaneDedx
Definition: JMShower.h:385
void jmshower::JMShower::SetPlaneE1Cell ( unsigned int  plane,
int  cell 
)

Definition at line 563 of file JMShower.cxx.

References getBrightness::cell, fPlaneE1Cell, NPlane(), and NDAPDHVSetting::plane.

Referenced by jmshower::RecoJMShower::RecoShowers().

564  {
565  if(plane>=JMShower::NPlane())return;
567  }
std::vector< int > fPlaneE1Cell
Definition: JMShower.h:403
unsigned int NPlane() const
Definition: JMShower.cxx:472
void jmshower::JMShower::SetPlaneE2Cell ( unsigned int  plane,
int  cell 
)

Definition at line 575 of file JMShower.cxx.

References getBrightness::cell, fPlaneE2Cell, NPlane(), and NDAPDHVSetting::plane.

576  {
577  if(plane>=JMShower::NPlane())return;
579  }
std::vector< int > fPlaneE2Cell
Definition: JMShower.h:404
unsigned int NPlane() const
Definition: JMShower.cxx:472
void jmshower::JMShower::SetPlaneHitCell ( unsigned int  plane,
unsigned int  cell 
)

Definition at line 552 of file JMShower.cxx.

References getBrightness::cell, fPlaneHitCell, NPlane(), and NDAPDHVSetting::plane.

553  {
554  if(plane>=JMShower::NPlane())return;
556  }
unsigned int NPlane() const
Definition: JMShower.cxx:472
std::vector< unsigned int > fPlaneHitCell
Definition: JMShower.h:406
void jmshower::JMShower::SetPlaneHitXYZ ( unsigned int  plane,
TVector3  xyz 
)

Definition at line 534 of file JMShower.cxx.

References fPlaneHitXYZ, NPlane(), and NDAPDHVSetting::plane.

Referenced by jmshower::RecoJMShower::RecoShowers().

535  {
536  if(plane>=JMShower::NPlane())return;
537 // if(plane>=200)return;
538  fPlaneHitXYZ[plane] = xyz;
539  }
unsigned int NPlane() const
Definition: JMShower.cxx:472
std::vector< TVector3 > fPlaneHitXYZ
Definition: JMShower.h:401
void jmshower::JMShower::SetPlaneProb ( unsigned int  plane,
double  planeprob,
int  type 
)

Definition at line 626 of file JMShower.cxx.

References fPlaneProbE, fPlaneProbEcoh, fPlaneProbEdis, fPlaneProbEqe, fPlaneProbEres, fPlaneProbG, fPlaneProbHad, fPlaneProbMu, fPlaneProbNuetron, fPlaneProbPi0, fPlaneProbPion, fPlaneProbProton, NPlane(), and NDAPDHVSetting::plane.

Referenced by jmshower::RecoJMShower::RecoShowers().

627  {
628 
629  if(plane>=JMShower::NPlane())return;
630 
631  if(type==0)fPlaneProbE[plane] = planeprob;
632  if(type==1)fPlaneProbG[plane] = planeprob;
633  if(type==2)fPlaneProbMu[plane] = planeprob;
634  if(type==3)fPlaneProbPi0[plane] = planeprob;
635  if(type==4)fPlaneProbHad[plane] = planeprob;
636  if(type==5)fPlaneProbProton[plane] = planeprob;
637  if(type==6)fPlaneProbNuetron[plane] = planeprob;
638  if(type==7)fPlaneProbPion[plane] = planeprob;
639  if(type==8)fPlaneProbEqe[plane] = planeprob;
640  if(type==9)fPlaneProbEres[plane] = planeprob;
641  if(type==10)fPlaneProbEdis[plane] = planeprob;
642  if(type==11)fPlaneProbEcoh[plane] = planeprob;
643 
644  return;
645  }
std::vector< double > fPlaneProbEcoh
Definition: JMShower.h:391
std::vector< double > fPlaneProbProton
Definition: JMShower.h:397
unsigned int NPlane() const
Definition: JMShower.cxx:472
std::vector< double > fPlaneProbE
Definition: JMShower.h:387
std::vector< double > fPlaneProbEdis
Definition: JMShower.h:390
std::vector< double > fPlaneProbG
Definition: JMShower.h:393
std::vector< double > fPlaneProbPi0
Definition: JMShower.h:395
std::vector< double > fPlaneProbEqe
Definition: JMShower.h:388
std::vector< double > fPlaneProbNuetron
Definition: JMShower.h:398
std::vector< double > fPlaneProbMu
Definition: JMShower.h:394
std::vector< double > fPlaneProbPion
Definition: JMShower.h:399
std::vector< double > fPlaneProbEres
Definition: JMShower.h:389
std::vector< double > fPlaneProbHad
Definition: JMShower.h:396
void jmshower::JMShower::SetPlaneRadius ( unsigned int  plane,
double  planerad 
)

Definition at line 612 of file JMShower.cxx.

References fPlaneRadius, NPlane(), and NDAPDHVSetting::plane.

Referenced by jmshower::RecoJMShower::RecoShowers().

613  {
614  if(plane>=JMShower::NPlane())return;
615 // if(plane>=200)return;
616  fPlaneRadius[plane] = planerad;
617  }
unsigned int NPlane() const
Definition: JMShower.cxx:472
std::vector< double > fPlaneRadius
Definition: JMShower.h:386
void jmshower::JMShower::SetRadius ( double  radius)

Definition at line 372 of file JMShower.cxx.

References fRadius, and radius.

Referenced by jmshower::RecoJMShower::RecoShowers().

373  {
374  fRadius = radius;
375  }
Double_t radius
void jmshower::JMShower::SetSliceEdge10GeV ( double  gev)

Definition at line 269 of file JMShower.cxx.

References fSliceEdge10GeV.

Referenced by jmshower::RecoJMShower::RecoShowers().

270  {
271  fSliceEdge10GeV = gev;
272  }
double fSliceEdge10GeV
Definition: JMShower.h:356
void jmshower::JMShower::SetSliceEdge2GeV ( double  gev)

Definition at line 287 of file JMShower.cxx.

References fSliceEdge2GeV.

Referenced by jmshower::RecoJMShower::RecoShowers().

288  {
289  fSliceEdge2GeV = gev;
290  }
double fSliceEdge2GeV
Definition: JMShower.h:358
void jmshower::JMShower::SetSliceEdge5GeV ( double  gev)

Definition at line 278 of file JMShower.cxx.

References fSliceEdge5GeV.

Referenced by jmshower::RecoJMShower::RecoShowers().

279  {
280  fSliceEdge5GeV = gev;
281  }
double fSliceEdge5GeV
Definition: JMShower.h:357
void jmshower::JMShower::SetSliceEtot ( double  etot)

Definition at line 250 of file JMShower.cxx.

References fSliceEtot.

Referenced by jmshower::RecoJMShower::RecoShowers().

251  {
252  fSliceEtot = etot;
253  }
void jmshower::JMShower::SetSliceExclGeV ( double  gev)

Definition at line 363 of file JMShower.cxx.

References fSliceExclGeV.

Referenced by jmshower::RecoJMShower::RecoShowers().

364  {
365  fSliceExclGeV = gev;
366  }
double fSliceExclGeV
Definition: JMShower.h:369
void jmshower::JMShower::SetSliceGeV ( double  gev)

Definition at line 241 of file JMShower.cxx.

References fSliceGeV.

Referenced by jmshower::RecoJMShower::RecoShowers().

242  {
243  fSliceGeV = gev;
244  }
void rb::Prong::SetStart ( TVector3  start)
virtualinherited

Reimplemented in rb::Track.

Definition at line 75 of file Prong.cxx.

References rb::Cluster::fPrecalcTotalGeV, rb::Prong::fStart, and febshutoff_auto::start.

Referenced by slid::ParticleIDAlg::DedxInverseLongLL(), rb::Prong::Dir(), fuzz::ViewMatchAlg::Matching(), nerd::ViewMatchAlg::Matching(), slid::Recluster::produce(), fuzz::FuzzyKVertex::produce(), nerd::NERDProng::produce(), rb::Prong::Prong(), jmshower::RecoJMShower::RecoShowers(), and rb::Track::SetStart().

76  {
77  fPrecalcTotalGeV = -1; // Invalidate any cached value
78 
79  // I've removed this assert to allow for 2D prongs to set a 3D start
80  // point if they so choose.
81  // assert(fView == geo::kXorY);
82 
83  fStart = start;
84  }
double fPrecalcTotalGeV
-1 = uninitialized
Definition: Cluster.h:324
TVector3 fStart
Start location (xyz, cm)
Definition: Prong.h:111
void rb::Prong::SetStart ( double  v0,
double  z0 
)
virtualinherited

Reimplemented in rb::Track.

Definition at line 88 of file Prong.cxx.

References ana::assert(), rb::Cluster::fPrecalcTotalGeV, rb::Prong::fStart, rb::Cluster::fView, geo::kX, and geo::kY.

89  {
90  fPrecalcTotalGeV = -1; // Invalidate any cached value
91 
92  assert(fView == geo::kX || fView == geo::kY);
93 
94  if(fView == geo::kX){
95  fStart = TVector3(v0, 0, z0);
96  }
97  else{
98  fStart = TVector3(0, v0, z0);
99  }
100  }
double fPrecalcTotalGeV
-1 = uninitialized
Definition: Cluster.h:324
Vertical planes which measure X.
Definition: PlaneGeo.h:28
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
geo::View_t fView
view this cluster is in
Definition: Cluster.h:316
TVector3 fStart
Start location (xyz, cm)
Definition: Prong.h:111
assert(nhit_max >=nhit_nbins)
void jmshower::JMShower::SetStartPlane ( unsigned int  startplane)

Definition at line 450 of file JMShower.cxx.

References fStartPlane.

Referenced by jmshower::RecoJMShower::RecoShowers().

451  {
452  fStartPlane = startplane;
453  }
unsigned fStartPlane
Definition: JMShower.h:373
void jmshower::JMShower::SetStop ( TVector3  stop)

Definition at line 62 of file JMShower.cxx.

References fStop.

Referenced by jmshower::RecoJMShower::RecoShowers().

63  {
64  fStop = stop;
65  }
TVector3 fStop
Definition: JMShower.h:337
void jmshower::JMShower::SetStopPlane ( unsigned int  stopplane)

Definition at line 459 of file JMShower.cxx.

References fStopPlane.

Referenced by jmshower::RecoJMShower::RecoShowers().

460  {
461  fStopPlane = stopplane;
462  }
unsigned fStopPlane
Definition: JMShower.h:374
void jmshower::JMShower::SetSum10DRadius ( double  dradius)

Definition at line 390 of file JMShower.cxx.

References fSum10DRadius.

Referenced by jmshower::RecoJMShower::RecoShowers().

391  {
392  fSum10DRadius = dradius;
393  }
double fSum10DRadius
Definition: JMShower.h:372
void jmshower::JMShower::SetSumDRadius ( double  dradius)

Definition at line 381 of file JMShower.cxx.

References fSumDRadius.

Referenced by jmshower::RecoJMShower::RecoShowers().

382  {
383  fSumDRadius = dradius;
384  }
double fSumDRadius
Definition: JMShower.h:371
void jmshower::JMShower::SetTheta ( double  theta)

Definition at line 222 of file JMShower.cxx.

References fTheta, and chisquared::theta.

223  {
224  fTheta = theta;
225  }
void rb::Shower::SetTotalLength ( double  length)
inherited

Set length of a shower.

Definition at line 49 of file Shower.cxx.

References rb::Shower::fTotalLength, and demo0::length.

Referenced by slid::Recluster::produce(), and rb::Shower::Shower().

50  {
52  }
length
Definition: demo0.py:21
double fTotalLength
Definition: Shower.h:51
void jmshower::JMShower::SetTrkGeV ( double  gev)

Definition at line 232 of file JMShower.cxx.

References fTrkGeV.

Referenced by jmshower::RecoJMShower::RecoShowers().

233  {
234  fTrkGeV = gev;
235  }
void jmshower::JMShower::SetVtxCenterGeV ( double  gev)

Definition at line 161 of file JMShower.cxx.

References fVtxCenterGeV.

Referenced by jmshower::RecoJMShower::RecoShowers().

162  {
163  fVtxCenterGeV = gev;
164  }
double fVtxCenterGeV
Definition: JMShower.h:344
void jmshower::JMShower::SetVtxCenterGeV10cell ( double  gev)

Definition at line 169 of file JMShower.cxx.

References fVtxCenterGeV10cell.

Referenced by jmshower::RecoJMShower::RecoShowers().

170  {
171  fVtxCenterGeV10cell = gev;
172  }
double fVtxCenterGeV10cell
Definition: JMShower.h:346
void jmshower::JMShower::SetVtxCenterGeV15cell ( double  gev)

Definition at line 173 of file JMShower.cxx.

References fVtxCenterGeV15cell.

Referenced by jmshower::RecoJMShower::RecoShowers().

174  {
175  fVtxCenterGeV15cell = gev;
176  }
double fVtxCenterGeV15cell
Definition: JMShower.h:347
void jmshower::JMShower::SetVtxCenterGeV20cell ( double  gev)

Definition at line 177 of file JMShower.cxx.

References fVtxCenterGeV20cell.

Referenced by jmshower::RecoJMShower::RecoShowers().

178  {
179  fVtxCenterGeV20cell = gev;
180  }
double fVtxCenterGeV20cell
Definition: JMShower.h:348
void jmshower::JMShower::SetVtxCenterGeV5cell ( double  gev)

Definition at line 165 of file JMShower.cxx.

References fVtxCenterGeV5cell.

Referenced by jmshower::RecoJMShower::RecoShowers().

166  {
167  fVtxCenterGeV5cell = gev;
168  }
double fVtxCenterGeV5cell
Definition: JMShower.h:345
void jmshower::JMShower::SetVtxDoca ( double  vtxdoca)

Definition at line 430 of file JMShower.cxx.

References fVtxDoca.

Referenced by jmshower::RecoJMShower::RecoShowers().

431  {
432  fVtxDoca = vtxdoca;
433  }
void jmshower::JMShower::SetVtxGeV ( double  gev)

Definition at line 152 of file JMShower.cxx.

References fVtxGeV.

Referenced by jmshower::RecoJMShower::RecoShowers().

153  {
154  fVtxGeV = gev;
155  }
void rb::Cluster::SetWeight ( unsigned int  globalIdx,
double  weight 
)
inherited

Set weight of the cell at this index.

Definition at line 327 of file Cluster.cxx.

References rb::Cluster::fPrecalcTotalGeV, geo::kX, geo::kY, and rb::Cluster::NXCell().

Referenced by rb::Cluster::IsNoise(), rb::Shower::Shower(), and rb::Track::Track().

328  {
329  fPrecalcTotalGeV = -1; // Invalidate any cached value
330 
331  if(globalIdx < NXCell())
332  SetWeight(geo::kX, globalIdx, weight);
333  else
334  SetWeight(geo::kY, globalIdx-NXCell(), weight);
335  }
double fPrecalcTotalGeV
-1 = uninitialized
Definition: Cluster.h:324
const Var weight
Vertical planes which measure X.
Definition: PlaneGeo.h:28
void SetWeight(unsigned int globalIdx, double weight)
Set weight of the cell at this index.
Definition: Cluster.cxx:327
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
unsigned int NXCell() const
Number of cells in the x-view.
Definition: Cluster.h:106
void rb::Cluster::SetWeight ( geo::View_t  view,
unsigned int  viewIdx,
double  weight 
)
inherited

Set weight of the cell at this index in this view.

Definition at line 338 of file Cluster.cxx.

References ana::assert(), rb::Cluster::EnsureWeightAlloc(), rb::Cluster::fPrecalcTotalGeV, rb::Cluster::fXCell, rb::Cluster::fXWeights, rb::Cluster::fYCell, rb::Cluster::fYWeights, geo::kX, art::PtrVector< T >::size(), and ana::weight.

340  {
341  fPrecalcTotalGeV = -1; // Invalidate any cached value
342 
343  assert(weight >= 0 && weight <= 1);
344 
345  // Are we optimizing (omitting) the weights storage?
346  const bool optWeights = (weight == 1 && fXWeights.empty() && fYWeights.empty());
347  if(!optWeights) EnsureWeightAlloc();
348 
349  if(view == geo::kX){
350  assert(viewIdx < fXCell.size());
351  if(!optWeights) fXWeights[viewIdx] = weight;
352  }
353  else{
354  assert(viewIdx < fYCell.size());
355  if(!optWeights) fYWeights[viewIdx] = weight;
356  }
357  }
double fPrecalcTotalGeV
-1 = uninitialized
Definition: Cluster.h:324
const Var weight
Vertical planes which measure X.
Definition: PlaneGeo.h:28
art::PtrVector< rb::CellHit > fYCell
collection of y-view cells in cluster
Definition: Cluster.h:318
art::PtrVector< rb::CellHit > fXCell
collection of x-view cells in cluster
Definition: Cluster.h:317
size_type size() const
Definition: PtrVector.h:308
std::vector< double > fXWeights
Weights, matching cell indexing.
Definition: Cluster.h:319
assert(nhit_max >=nhit_nbins)
void EnsureWeightAlloc()
Helper. Resizes weights vectors to match cell vectors.
Definition: Cluster.cxx:712
std::vector< double > fYWeights
May be empty, means all weights are 1.
Definition: Cluster.h:320
void jmshower::JMShower::SetWindowSize ( unsigned int  nplane)

Definition at line 23 of file JMShower.cxx.

References fANN, fPlaneCentroidCell, fPlaneDedx, fPlaneE1Cell, fPlaneE2Cell, fPlaneHitCell, fPlaneHitXYZ, fPlaneProbE, fPlaneProbEcoh, fPlaneProbEdis, fPlaneProbEqe, fPlaneProbEres, fPlaneProbG, fPlaneProbHad, fPlaneProbMu, fPlaneProbNuetron, fPlaneProbPi0, fPlaneProbPion, fPlaneProbProton, fPlaneRadius, and MECModelEnuComparisons::i.

Referenced by jmshower::RecoJMShower::RecoShowers().

24  {
25  for(unsigned int i =0; i<20;i++){
26  fANN[i]=-5;
27  }
28  for(unsigned int i = 0;i<nplane;i++) {
29  fPlaneDedx.push_back(0);
30  fPlaneRadius.push_back(0);
31  fPlaneProbE.push_back(-99);
32  fPlaneProbEqe.push_back(-99);
33  fPlaneProbEres.push_back(-99);
34  fPlaneProbEdis.push_back(-99);
35  fPlaneProbEcoh.push_back(-99);
36  fPlaneProbG.push_back(-99);
37  fPlaneProbMu.push_back(-99);
38  fPlaneProbPi0.push_back(-99);
39  fPlaneProbHad.push_back(-99);
40  fPlaneProbProton.push_back(-99);
41  fPlaneProbNuetron.push_back(-99);
42  fPlaneProbPion.push_back(-99);
43  TVector3 plhitxyz(0,0,0);
44  fPlaneHitXYZ.push_back(plhitxyz);
45  fPlaneE1Cell.push_back(-1);
46  fPlaneE2Cell.push_back(-1);
47  fPlaneCentroidCell.push_back(-1);
48  fPlaneHitCell.push_back(0);
49 
50  }
51  }
std::vector< int > fPlaneCentroidCell
Definition: JMShower.h:405
std::vector< double > fPlaneProbEcoh
Definition: JMShower.h:391
std::vector< double > fPlaneProbProton
Definition: JMShower.h:397
std::vector< int > fPlaneE1Cell
Definition: JMShower.h:403
std::vector< int > fPlaneE2Cell
Definition: JMShower.h:404
std::vector< double > fPlaneProbE
Definition: JMShower.h:387
double fANN[20]
Definition: JMShower.h:423
std::vector< double > fPlaneRadius
Definition: JMShower.h:386
std::vector< double > fPlaneProbEdis
Definition: JMShower.h:390
std::vector< double > fPlaneProbG
Definition: JMShower.h:393
std::vector< double > fPlaneDedx
Definition: JMShower.h:385
std::vector< double > fPlaneProbPi0
Definition: JMShower.h:395
std::vector< unsigned int > fPlaneHitCell
Definition: JMShower.h:406
std::vector< double > fPlaneProbEqe
Definition: JMShower.h:388
std::vector< double > fPlaneProbNuetron
Definition: JMShower.h:398
std::vector< double > fPlaneProbMu
Definition: JMShower.h:394
std::vector< double > fPlaneProbPion
Definition: JMShower.h:399
std::vector< TVector3 > fPlaneHitXYZ
Definition: JMShower.h:401
std::vector< double > fPlaneProbEres
Definition: JMShower.h:389
std::vector< double > fPlaneProbHad
Definition: JMShower.h:396
void jmshower::JMShower::SetXMaxPlane ( unsigned int  xmaxplane)

Definition at line 515 of file JMShower.cxx.

References fXMaxPlane.

Referenced by jmshower::RecoJMShower::RecoShowers().

516  {
517  fXMaxPlane = xmaxlane;
518  }
unsigned fXMaxPlane
Definition: JMShower.h:380
void jmshower::JMShower::SetXMinPlane ( unsigned int  xminplane)

Definition at line 496 of file JMShower.cxx.

References fXMinPlane.

Referenced by jmshower::RecoJMShower::RecoShowers().

497  {
498  fXMinPlane = xminplane;
499  }
unsigned fXMinPlane
Definition: JMShower.h:378
void jmshower::JMShower::SetXNPlane ( unsigned int  xnplane)

Definition at line 477 of file JMShower.cxx.

References fXNPlane.

Referenced by jmshower::RecoJMShower::RecoShowers().

478  {
479  fXNPlane = xnplane;
480  }
unsigned fXNPlane
Definition: JMShower.h:376
void jmshower::JMShower::SetYMaxPlane ( unsigned int  ymaxplane)

Definition at line 524 of file JMShower.cxx.

References fYMaxPlane.

Referenced by jmshower::RecoJMShower::RecoShowers().

525  {
526  fYMaxPlane = ymaxlane;
527  }
unsigned fYMaxPlane
Definition: JMShower.h:381
void jmshower::JMShower::SetYMinPlane ( unsigned int  yminplane)

Definition at line 505 of file JMShower.cxx.

References fYMinPlane.

Referenced by jmshower::RecoJMShower::RecoShowers().

506  {
507&#