Classes | Typedefs | Enumerations | Functions | Variables
calib Namespace Reference

CDPStorage service. More...

Classes

class  AbsCache
 Look up absolute attenuation constants. More...
 
class  AbsCalib
 
class  ADCShapeFitAna
 TODO. More...
 
class  ADCShapeFitTable
 
class  AssessCalib
 Make TTree with reconstructed and true energies. More...
 
class  AttenCache
 
class  AttenCurve
 
class  AttenFit
 
class  AttenuationFit
 
class  BetheBlochAnalytic
 
class  BetheBlochFit
 
class  BetheBlochTables
 
class  CalibAna
 
struct  CalibAnaParams
 
class  Calibrator
 
struct  CalibratorParams
 
class  CDPStorage
 
struct  ChannelSet
 Provide a simple utility function for our sets. More...
 
class  CosmicCalib
 
class  CosmicTrends
 
class  DCMTimingOffset
 
class  DetRespDrift
 
class  DriftCache
 
class  DriftCorrection
 
class  DriftResponseCalc
 
class  EnergyLossVsDistance
 Integrate energy losses to calculate deposit near a track end. More...
 
class  EnergyStandardCandles
 
class  FiberCalibration
 
class  FindOutliers
 Simple module to find modules with unusual calibration constants. More...
 
class  HitEfficiency
 
class  IBetheBloch
 
class  MakeAttenuationProfiles
 
class  MichelCandidate
 Information about a reconstructed Michel electron candidate. More...
 
class  MuondEdx
 
class  MuondEdxAna
 
class  MuonTrackHits
 
class  ParticleCorrections
 Make plots of threshold effect from PCHits files. More...
 
class  PCHitAggregator
 
class  PCHitsList
 
class  PCHitTransposer
 
class  PEResponse
 
class  ResizeDetector
 
class  RockMuonStopperSelection
 Selects stopping cosmics. More...
 
struct  ShapeTableParams
 
class  StopperFilter
 
class  StopperSelection
 Selects stopping cosmics. More...
 
class  StopperThreshold
 
class  SumAttenuationProfiles
 Sum up AttenProfilesMap objects. More...
 
class  SumRunsCalib
 Sum up AttenProfilesMap objects. More...
 
class  SumSubrunsCalib
 Sum up AttenProfilesMap objects. More...
 
class  SystematicUncertaintyScaleAna
 
class  TestParticleCorrections
 Make plots of threshold effect from PCHits files. More...
 
class  ThresholdAna
 Make plots of threshold and shielding effects from PCHits files. More...
 
class  ThresholdCorrMap
 
class  ThroughgoingSelection
 Selects throughgoing cosmics. More...
 
class  TimingCache
 
class  TimingCalFilter
 
class  TimingCalibration
 
class  TrueEContrib
 Information about one of the true particles that contribute to a candidate Michel electron. More...
 
class  TrueMichel
 When a Michel candidate has a contribution from a true Michel electron, we want more info about it. More...
 
class  TrueNeutronCapture
 When a Michel candidate has a contribution from a neutron capture, that's also interesting. More...
 

Typedefs

typedef std::pair< TVector3, TVector3 > zBounds
 
typedef std::map< double, zBoundszBoundMap
 

Enumerations

enum  _quality { kAll = 0, kTriCell, kMaxQuality }
 
enum  _oneDHistNames {
  kFractionUsableX = 0, kFractionUsableY, kRecoCosTheta, kRecoAz,
  kPlanesCrossed, kDCosZ, kDCosX, kDCosY,
  kNumTracks
}
 
enum  _twoDHistNames {
  kStopperCountX = 0, kTotalCountX, kStopperCountY, kTotalCountY,
  kCosThetaVsAz, kCosThetaVsAzTru, kCosThetaVsPlanes, kAzVsPlanes,
  kDeltaAzVsAz, kDeltaZenVsZen, kTotalHitCountX, kTotalHitCountY
}
 
enum  _oneDHists
 
enum  _twoDHists
 
enum  Material { kPolyethylene }
 
enum  EFEBType { kFEB4p1, kFEB5p2 }
 Enumeration for the FEB 4.2 and 5.1 which have different clocks. More...
 
enum  EPathQuality { kXYAdjacents, kZAdjacents, kAverage, kBadTrack }
 Methods used to estimate path length of a track through a cell. More...
 

Functions

double corr (TGraph *g, double thresh)
 
bool ltTPt (BetheBlochTables::T_pt pt, double T)
 
bool ltXPt (EnergyLossVsDistance::x_pt pt, double x)
 
const char * getDetString (novadaq::cnv::DetId det)
 Utility function to get detector name as a string for file manipulations. More...
 
bool HasXYAdjacents (int plane, int cell, const ChannelSet &hmap)
 Internal helper for BestPathEstimates. Takes account of bad channels. More...
 
bool HasZAdjacents (int plane, int cell, const ChannelSet &hmap, const art::ServiceHandle< geo::Geometry > geom)
 
std::vector< double > BestPathEstimates (std::vector< geo::OfflineChan > const &chans, std::map< unsigned int, TVector3 > const &directions, std::vector< EPathQuality > &quals, std::vector< geo::OfflineChan > const &extras)
 
TVector3 const DirectionAtPlane (const std::map< unsigned int, TVector3 > &directions, unsigned int plane)
 Return the direction at a plane using the map provided by rb::Track. More...
 
void FindBelowThresholdCalibCandidates (const std::vector< geo::OfflineChan > &trkchans, const std::map< unsigned int, TVector3 > &directions, std::vector< EPathQuality > &quals, std::vector< double > &paths, std::vector< geo::OfflineChan > &chans)
 Find empty cells that would have contributed to the calibration if they'd been hit. We assume they fell below threshold. More...
 
void GetXYZD (geo::OfflineChan chan, double w, double *xyzd)
 Return position in world coordninates and distance to the readout. More...
 
void FindZBoundaries (std::set< double > &planeZBounds)
 Find the boundaries in the z direction of planes in the detector. More...
 
zBoundMap MakeZBoundaryMap (std::set< double > const &planeZBounds, std::vector< TVector3 > const &trajectory)
 Return a map of the z position of each trajectory point on a track to the bounding positions of where the track passes through that plane. In the case that a track stops in the plane, then the end of the track is the second bounding point. More...
 
zBounds ZBounds (zBoundMap const &bounds, double const &hitZ)
 Return the bounding points for a given z position along a track. More...
 
float PathLengthInCell (zBoundMap const &zBounds, TVector3 const &recoHitLoc, std::pair< uint32_t, uint32_t > const &pc)
 Return the path length of a track in the cell in question. More...
 
std::vector< std::string > globWrapper (const std::string &pattern)
 
std::string getCSVFilenameByParsingDirectory (int fCurrentRun, std::string prePattern, std::string postPattern)
 
bool doesDirectoryExist (std::string dirSting)
 Return true if the path in dirString points to a directory. More...
 
std::vector< double > BestPathEstimates (const std::vector< geo::OfflineChan > &chans, const std::map< unsigned int, TVector3 > &directions, std::vector< EPathQuality > &quals, const std::vector< geo::OfflineChan > &extras={})
 Calculate the best path length estimate for each hit in a track, and indicate how they were obtained. More...
 
double GetExpectations (double t0, double riseTime, double fallTime, double preAmp, const int16_t *obs, double *exps, double &base, int mode)
 Helper function for ADCShapeFit inner loop. More...
 
uint16_t ADCShapeFit (int16_t adc1, int16_t adc2, int16_t adc3, double riseTime, double fallTime, double preAmp, bool &goodTime, int fMode)
 
template<class T >
T FOURTH (T x)
 
std::ostream & operator<< (std::ostream &os, const AttenCurve &res)
 

Variables

int kStatsLimit = 1
 
const double Me = 510.998910e3
 
const double Mmu = 105.658367e6
 
const double K = 0.307075
 
const double j = 0.200
 
static const double GeV2MeV = CLHEP::GeV / CLHEP::MeV
 
static const double sCmPerNsec = 29.9792458
 
static const double sCmPerNsec = 29.9792458
 
const int kChunk = 2000
 
const unsigned int kNumFineTimingADCPoints = 4
 
const double kZeroOffsetSamples = -1
 
const int kOffsetStep = 16
 
const double kSamplesPerOffset = 1./(256*64)
 

Detailed Description

CDPStorage service.

Hold timing constants.

Hold drift constants from current run.

Store the results of the attenuation fits.

Helper for AttenCurve.

Function to perform, and table to cache, timing fits to ADC values.

Look up absolute attenuation constants.

Calibration service.

Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file.

Author
brebe.nosp@m.l@fn.nosp@m.al.go.nosp@m.v
Christopher Backhouse - bckho.nosp@m.use@.nosp@m.calte.nosp@m.ch.e.nosp@m.du
bckho.nosp@m.use@.nosp@m.calte.nosp@m.ch.e.nosp@m.du
Date
Author
Chris Backhouse - bckho.nosp@m.use@.nosp@m.calte.nosp@m.ch.e.nosp@m.du

Typedef Documentation

typedef std::map<double, zBounds> calib::zBoundMap

Definition at line 107 of file CalibUtil.h.

typedef std::pair<TVector3, TVector3> calib::zBounds

Definition at line 106 of file CalibUtil.h.

Enumeration Type Documentation

Enumerator
kFractionUsableX 
kFractionUsableY 
kRecoCosTheta 
kRecoAz 
kPlanesCrossed 
kDCosZ 
kDCosX 
kDCosY 
kNumTracks 

Definition at line 41 of file CosmicTrends_module.cc.

Definition at line 50 of file StopperThreshold_module.cc.

50  {
51  };
Enumerator
kAll 
kTriCell 
kMaxQuality 

Definition at line 35 of file CosmicTrends_module.cc.

Enumerator
kStopperCountX 
kTotalCountX 
kStopperCountY 
kTotalCountY 
kCosThetaVsAz 
kCosThetaVsAzTru 
kCosThetaVsPlanes 
kAzVsPlanes 
kDeltaAzVsAz 
kDeltaZenVsZen 
kTotalHitCountX 
kTotalHitCountY 

Definition at line 53 of file CosmicTrends_module.cc.

Definition at line 53 of file StopperThreshold_module.cc.

53  {
54  };

Enumeration for the FEB 4.2 and 5.1 which have different clocks.

Enumerator
kFEB4p1 
kFEB5p2 

Definition at line 25 of file CalibUtil.h.

25  {
26  kFEB4p1,
27  kFEB5p2
28  };

Methods used to estimate path length of a track through a cell.

The recommended method to perform a calibration is to accumulate separate histograms or averages for each cell in each quality level. If there is insufficient statistics in "xy" mode (there will be zero for cells along the sides of the detector), fall back to the "z" mode calculations. If there is insufficient stats here too (should only happen in the detector corners) fall back (reluctantly) to the kAverage calculations.

Enumerator
kXYAdjacents 

There are adjacent hits on the same plane. This means the track must have entered in one side wall of the cell and gone out the other. The path length estimate is likely very precise.

kZAdjacents 

There are no adjacent cells in the same plane, but the cells of the same index in the upstream and downstream planes are hit. There is high confidence that the track went in the front wall of the cell and out the back. The path length estimate should be good. The kXYAdjacents case is preferred only because it is more common.

kAverage 

The cell has no special properties, and the path length has been estimated using the geo::AverageCellPathLength method. The result is likely pretty poor. Only use cells with this estimate if you have no choice.

kBadTrack 

Something was wrong with the track object, the pathlength will be zero. Do not use this cell.

Definition at line 40 of file CalibUtil.h.

40  {
41  /// There are adjacent hits on the same plane. This means the track must
42  /// have entered in one side wall of the cell and gone out the other. The
43  /// path length estimate is likely very precise.
45  /// There are no adjacent cells in the same plane, but the cells of the
46  /// same index in the upstream and downstream planes are hit. There is high
47  /// confidence that the track went in the front wall of the cell and out
48  /// the back. The path length estimate should be good. The kXYAdjacents
49  /// case is preferred only because it is more common.
51  /// The cell has no special properties, and the path length has been
52  /// estimated using the \ref geo::AverageCellPathLength method. The result
53  /// is likely pretty poor. Only use cells with this estimate if you have no
54  /// choice.
55  kAverage,
56  /// Something was wrong with the track object, the pathlength will be
57  /// zero. Do not use this cell.
58  kBadTrack
59  };
Enumerator
kPolyethylene 

Definition at line 16 of file BetheBloch.h.

16  {
18  };

Function Documentation

uint16_t calib::ADCShapeFit ( int16_t  adc1,
int16_t  adc2,
int16_t  adc3,
double  riseTime,
double  fallTime,
double  preAmp,
bool &  goodTime,
int  mode 
)

Scans a pulseheight shape across the given ADC values and returns the best offset. Offset is in internal units. Use OffsetToTNS to convert to an absolute time in nanoseconds.

Rise and fall time should be in units of the spacing between samples

Definition at line 147 of file ADCShapeFit.cxx.

References ana::assert(), GetExpectations(), MECModelEnuComparisons::i, kNumFineTimingADCPoints, kSamplesPerOffset, kZeroOffsetSamples, norm, PandAna.reco_validation.add_data::offset, sqr(), and getGoodRuns4SAM::t0.

Referenced by calib::ADCShapeFitTable::TNS().

150  {
151  // The observations, in chronological order
152  const int16_t obs[kNumFineTimingADCPoints] = {0, adc1, adc2, adc3};
153 
154  double bestchisq = 1e10; // infinity
155  // Sane default
156  uint16_t bestoffset = -kZeroOffsetSamples/kSamplesPerOffset;
157  goodTime = false;
158 
159  // Scan through possible offsets of the peak, looking for the best match
160  uint16_t offset = 0;
161  do{
162  // In TDC
163  const double t0 = (double(offset)*kSamplesPerOffset+kZeroOffsetSamples);
164 
165  // Expectations
166  double exps[kNumFineTimingADCPoints];
167  double junk;
168  const double norm = GetExpectations(t0, riseTime, fallTime, preAmp, obs, exps, junk, fMode);
169 
170  if(norm < 0) continue;
171 
172  // Assuming equal, uncorrelated, errors on all points. (Including
173  // correlations was not found to improve resolution).
174  double chisq = 0;
175  for(unsigned int i = 0; i < kNumFineTimingADCPoints; ++i)
176  chisq += sqr(obs[i]-exps[i]);
177  assert(chisq >= 0);
178 
179  if(chisq < bestchisq){
180  bestchisq = chisq;
181  bestoffset = offset;
182  goodTime = true;
183  }
184  } while((offset += kOffsetStep) != 0);
185 
186  if(bestoffset == 0 || bestoffset == 256*256-kOffsetStep){
187  /*
188  std::cerr << "Best time offset is at edge of range. "
189  << "If this happens repeatedly there's a "
190  << "timing problem. Details: "
191  << adc0 << " " << adc1 << " " << adc2 << std::endl;
192  */
194  goodTime = false;
195  }
196 
197  return bestoffset;
198  }
const double kZeroOffsetSamples
Definition: ADCShapeFit.cxx:50
const unsigned int kNumFineTimingADCPoints
Definition: ADCShapeFit.cxx:45
const double kSamplesPerOffset
Definition: ADCShapeFit.cxx:54
T sqr(T x)
Function to perform, and table to cache, timing fits to ADC values.
Definition: ADCShapeFit.cxx:23
Float_t norm
assert(nhit_max >=nhit_nbins)
double GetExpectations(double t0, double riseTime, double fallTime, double preAmp, const int16_t *obs, double *exps, double &base, int mode)
Helper function for ADCShapeFit inner loop.
Definition: ADCShapeFit.cxx:64
const int kOffsetStep
Definition: ADCShapeFit.cxx:53
std::vector<double> calib::BestPathEstimates ( const std::vector< geo::OfflineChan > &  chans,
const std::map< unsigned int, TVector3 > &  directions,
std::vector< EPathQuality > &  quals,
const std::vector< geo::OfflineChan > &  extras = {} 
)

Calculate the best path length estimate for each hit in a track, and indicate how they were obtained.

Parameters
trkThe track whose cells should be used
[out]qualsHow the path length of each hit was determined. Please read the documentation for EPathQuality
extraOther cells that should be considered to be on the track (optional). Results for these will be at the end of returned vectors.
Returns
Path lengths (in cm). Indices correspond to those passed to rb::Track::Cell
std::vector<double> calib::BestPathEstimates ( std::vector< geo::OfflineChan > const &  chans,
std::map< unsigned int, TVector3 > const &  directions,
std::vector< EPathQuality > &  quals,
std::vector< geo::OfflineChan > const &  extras 
)

Definition at line 98 of file CalibUtil.cxx.

References std::abs(), ana::assert(), geo::AverageCellPathLength(), getBrightness::cell, geo::PlaneGeo::Cell(), DirectionAtPlane(), dx, dy, dz, geom(), geo::CellGeo::HalfD(), geo::CellGeo::HalfW(), HasXYAdjacents(), HasZAdjacents(), MECModelEnuComparisons::i, std::isnan(), kAverage, kBadTrack, geo::kX, kXYAdjacents, geo::kY, kZAdjacents, TB_WatchdogFx::paths, geo::GeometryBase::Plane(), NDAPDHVSetting::plane, qual, POTSpillRate::view, and geo::PlaneGeo::View().

Referenced by calib::PCHitsList::ProcessTrack(), and calib::PCHitsList::ProcessTrackForFLSHits().

102  {
103  const size_t trkN = chans.size();
104  const size_t extrasN = extras.size();
105  const size_t hitMax = trkN+extrasN;
106 
107  std::vector<double> paths;
108  paths.resize(hitMax);
109 
110  quals.clear();
111  quals.resize(hitMax);
112 
114 
115  ChannelSet hmap;
116  for(size_t i = 0; i < trkN; ++i) hmap.insert(chans[i]);
117  hmap.insert(extras.begin(), extras.end());
118 
119 
120  // Look for ones that have perpendicular hits either side
121  for(size_t hitIdx = 0; hitIdx < hitMax; ++hitIdx){
122  int plane, cell;
124  if(hitIdx < trkN){
125  plane = chans[hitIdx].Plane();
126  cell = chans[hitIdx].Cell();
127  view = geom->Plane(plane)->View();
128  }
129  else{
130  plane = extras[hitIdx-trkN].Plane();
131  cell = extras[hitIdx-trkN].Cell();
132  view = geom->Plane(plane)->View();
133  }
134 
136 
137  // Mark as xy if it satisfies the criteria. Or if not then maybe as
138  // z. Otherwise falls back to the default kAverage.
139  if(HasXYAdjacents(plane, cell, hmap)){
140  qual = kXYAdjacents;
141  }
142  else{
143  if(HasZAdjacents(plane, cell, hmap, geom)){
144  qual = kZAdjacents;
145  }
146  }
147 
148  quals[hitIdx] = qual;
149 
150  // get the direction for this plane
151  TVector3 dr = calib::DirectionAtPlane(directions, plane);
152 
153  const double dx = std::abs(dr.X());
154  const double dy = std::abs(dr.Y());
155  const double dz = std::abs(dr.Z());
156  if(std::isnan(dx) || std::isnan(dy) || std::isnan(dz) ||
157  (view == geo::kX && dx == 0) ||
158  (view == geo::kY && dy == 0) ||
159  (qual == kZAdjacents && dz == 0)){
160  paths[hitIdx] = 0;
161  quals[hitIdx] = kBadTrack;
162  continue;
163  }
164 
165  const geo::CellGeo* cellgeo = geom->Plane(plane)->Cell(cell);
166  const double width = 2*cellgeo->HalfW();
167  const double depth = 2*cellgeo->HalfD();
168 
169  switch(qual){
170  case kXYAdjacents:
171  paths[hitIdx] = (view == geo::kX) ? width/dx : width/dy;
172  break;
173  case kZAdjacents:
174  paths[hitIdx] = depth/dz;
175  break;
176  case kAverage:
177  paths[hitIdx] = geo::AverageCellPathLength(view, dx, dy, dz);
178  break;
179  default:
180  assert(0 && "Shouldn't happen");
181  } // end switch
182  } // end for hitIdx
183 
184  return paths;
185  }
double HalfD() const
Definition: CellGeo.cxx:205
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
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
bool HasXYAdjacents(int plane, int cell, const ChannelSet &hmap)
Internal helper for BestPathEstimates. Takes account of bad channels.
Definition: CalibUtil.cxx:54
const PlaneGeo * Plane(unsigned int i) const
float abs(float number)
Definition: d0nt_math.hpp:39
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
int isnan(const stan::math::var &a)
Definition: std_isnan.hpp:18
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:53
double dy[NP][NC]
double dx[NP][NC]
double dz[NP][NC]
EPathQuality
Methods used to estimate path length of a track through a cell.
Definition: CalibUtil.h:40
double AverageCellPathLength(geo::View_t view, double dx, double dy, double dz)
Mean path length of a ray with (unit) direction vector dx, dy, dz through a cell in view...
Definition: Geo.cxx:804
const Cut qual
TVector3 const DirectionAtPlane(const std::map< unsigned int, TVector3 > &directions, unsigned int plane)
Return the direction at a plane using the map provided by rb::Track.
Definition: CalibUtil.cxx:188
void geom(int which=0)
Definition: geom.C:163
assert(nhit_max >=nhit_nbins)
Encapsulate the cell geometry.
Definition: CellGeo.h:25
bool HasZAdjacents(int plane, int cell, const ChannelSet &hmap, const art::ServiceHandle< geo::Geometry > geom)
Definition: CalibUtil.cxx:87
double calib::corr ( TGraph *  g,
double  thresh 
)
TVector3 const calib::DirectionAtPlane ( const std::map< unsigned int, TVector3 > &  directions,
unsigned int  plane 
)

Return the direction at a plane using the map provided by rb::Track.

Definition at line 188 of file CalibUtil.cxx.

Referenced by BestPathEstimates(), and FindBelowThresholdCalibCandidates().

190  {
191  TVector3 dr;
192 
193  if(directions.count(plane) > 0){
194  dr = directions.find(plane)->second;
195  }
196  else{
197 
198  // the plane is not in the map, so now need to
199  // determine the direction of the track in z,
200  // and then use that result to determine whether
201  // to use the upper_bound or lower_bound methods
202  // remember that maps are ordered by the < operator
203  // of the key, in this case an unsigned int
204  // if the desired plane is outside the bounds of
205  // the map, just take the end point vector of the
206  // map in the direction of travel.
207 
208  auto ubitr = directions.upper_bound(plane);
209  auto lbitr = directions.lower_bound(plane);
210 
211  // the direction in z better not change or
212  // this track has problems
213  float dZ = directions.begin()->second.Z();
214  if( dZ > 0.){
215  if( ubitr != directions.end() )
216  dr = ubitr->second;
217  else
218  dr = directions.rbegin()->second;
219  }
220  if( dZ < 0. ){
221  if( lbitr != directions.end() )
222  dr = lbitr->second;
223  else
224  dr = directions.begin()->second;
225  }
226  } // end no key corresponding to plane in the map
227 
228  return dr;
229  }
bool calib::doesDirectoryExist ( std::string  dirSting)

Return true if the path in dirString points to a directory.

Parameters
dirStringpath to the directory to check

Definition at line 759 of file CalibUtil.cxx.

Referenced by calib::AttenCache::GetCSVPath().

760  {
761  struct stat info;
762 
763  if(stat( dirSting.c_str(), &info ) != 0)
764  return false;
765  else if(info.st_mode & S_IFDIR)
766  return true;
767  else
768  return false;
769  }
const XML_Char XML_Encoding * info
Definition: expat.h:530
void calib::FindBelowThresholdCalibCandidates ( const std::vector< geo::OfflineChan > &  trkchans,
const std::map< unsigned int, TVector3 > &  directions,
std::vector< EPathQuality > &  quals,
std::vector< double > &  paths,
std::vector< geo::OfflineChan > &  chans 
)

Find empty cells that would have contributed to the calibration if they'd been hit. We assume they fell below threshold.

TODO: Can only currently find "xy" quality candidates

Parameters
[out]qualsHow the path length of each cell was determined. Please read the documentation for EPathQuality
[out]pathsEstimated path length for each selected cell
[out]chansWhich cells were selected

Definition at line 232 of file CalibUtil.cxx.

References std::abs(), getBrightness::cell, geo::PlaneGeo::Cell(), calib::ChannelSet::CellExists(), DirectionAtPlane(), dx, dy, dz, geom(), geo::CellGeo::HalfW(), HasXYAdjacents(), std::isnan(), geo::kX, kXYAdjacents, geo::kY, getGoodRuns4SAM::n, geo::GeometryBase::Plane(), NDAPDHVSetting::plane, POTSpillRate::view, and geo::PlaneGeo::View().

Referenced by calib::PCHitsList::ProcessTrackForBelowThresholdHits().

237  {
238  // In case user passed in junk
239  quals.clear();
240  paths.clear();
241  chans.clear();
242 
243  const int hitMax = trkchans.size();
244 
246 
247  ChannelSet hmap;
248  for(int n = 0; n < hitMax; ++n) hmap.insert(trkchans[n]);
249 
250  for(int hitIdx = 0; hitIdx < hitMax; ++hitIdx){
251  const int plane = trkchans[hitIdx].Plane();
252  const geo::View_t view = geom->Plane(plane)->View();
253 
254  auto const dr = calib::DirectionAtPlane(directions, plane);
255 
256  const double dx = std::abs(dr.X());
257  const double dy = std::abs(dr.Y());
258  const double dz = std::abs(dr.Z());
259 
260  if(std::isnan(dx) || std::isnan(dy) || std::isnan(dz)) continue;
261 
262  if((view == geo::kX && dx == 0) || (view == geo::kY && dy == 0)){
263  continue;
264  }
265 
266  // Need to search between each cell and the next hit cell in the same
267  // plane
268  int cell = trkchans[hitIdx].Cell();
269  while(true){
270  ++cell;
271 
272  // If it's hit, then it isn't thresholded. And that ends our search
273  // because we'll pick it up and start there next.
274  if(hmap.CellExists(plane, cell)) break;
275 
276  if(HasXYAdjacents(plane, cell, hmap)){
277  const geo::CellGeo* cellgeo = geom->Plane(plane)->Cell(cell);
278  const double width = 2*cellgeo->HalfW();
279 
280  quals.push_back(kXYAdjacents);
281  paths.push_back((view == geo::kX) ? width/dx : width/dy);
282  chans.push_back(geo::OfflineChan(plane, cell));
283  }
284  else{
285  // Definition of the XY criteria mean that nothing else in this range
286  // can work either
287  break;
288  }
289  } // end while
290  }
291  }
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
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
bool HasXYAdjacents(int plane, int cell, const ChannelSet &hmap)
Internal helper for BestPathEstimates. Takes account of bad channels.
Definition: CalibUtil.cxx:54
const PlaneGeo * Plane(unsigned int i) const
float abs(float number)
Definition: d0nt_math.hpp:39
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
int isnan(const stan::math::var &a)
Definition: std_isnan.hpp:18
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:53
double dy[NP][NC]
double dx[NP][NC]
double dz[NP][NC]
TVector3 const DirectionAtPlane(const std::map< unsigned int, TVector3 > &directions, unsigned int plane)
Return the direction at a plane using the map provided by rb::Track.
Definition: CalibUtil.cxx:188
A (plane, cell) pair.
Definition: OfflineChan.h:17
void geom(int which=0)
Definition: geom.C:163
Encapsulate the cell geometry.
Definition: CellGeo.h:25
void calib::FindZBoundaries ( std::set< double > &  planeZBounds)

Find the boundaries in the z direction of planes in the detector.

Parameters
[out]planeZBoundsis a set of those values that is filled by the function

Definition at line 332 of file CalibUtil.cxx.

References geo::PlaneGeo::Cell(), geom(), geo::CellGeo::GetCenter(), geo::CellGeo::HalfD(), geo::GeometryBase::NPlanes(), and geo::GeometryBase::Plane().

Referenced by calib::StopperThreshold::FillHist(), trk::CosmicTrackAna::FillTrackHistograms(), calib::StopperThreshold::FillTree(), numusand::NumuSandFxs::getAveTrackdEdxLast4Cells(), numusand::NumuSandFxs::getAveTrackdEdxLast6Cells(), numusand::NumuSandFxs::getAveTrackdEdxLast8Cells(), trackinfo::TrackInfoFxs::getAveTrackdEdxLastCells(), calib::PCHitsList::produce(), and calib::StopperThreshold::testPath().

333  {
334  // loop over all the planes in the geometry and put their upper z boundary
335  // into a set
336  std::set<double> bounds;
337  bounds.insert(0.);
338  double xyz[3] = {0.};
339 
341  double planeZDepth = 2.*geom->Plane(0)->Cell(0)->HalfD();
342 
343  for(size_t p = 0; p < geom->NPlanes(); ++p){
344  geom->Plane(p)->Cell(0)->GetCenter(xyz);
345  bounds.insert(xyz[2] + 0.5*planeZDepth);
346  }
347 
348  planeZBounds.swap(bounds);
349 
350  return;
351  }
::xsd::cxx::tree::bounds< char > bounds
Definition: Database.h:226
double HalfD() const
Definition: CellGeo.cxx:205
void GetCenter(double *xyz, double localz=0.0) const
Definition: CellGeo.cxx:159
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
const char * p
Definition: xmltok.h:285
const PlaneGeo * Plane(unsigned int i) const
void geom(int which=0)
Definition: geom.C:163
unsigned int NPlanes() const
template<class T >
T calib::FOURTH ( T  x)

Definition at line 35 of file AttenCurve.cxx.

References submit_syst::x.

Referenced by calib::AttenCurve::MeanPEPerCmAt().

35 {return x*x*x*x;}
std::string calib::getCSVFilenameByParsingDirectory ( int  fCurrentRun,
std::string  prePattern,
std::string  postPattern 
)

Definition at line 706 of file CalibUtil.cxx.

References ana::assert(), om::cout, globWrapper(), path, and submit_syst::pattern.

Referenced by calib::AttenCache::GetCSVPath(), calib::TimingCache::LoadFromDatabase(), and calib::AbsCache::LoadFromVldDatabase().

706  {
707  //This function just finds all the CSV files that match the pattern
708  // and thens earches through these files to find which one covers the fCurrentRun
709  std::string pattern=prePattern+std::string("*")+postPattern;
710  std::vector<std::string> answers=globWrapper(pattern);
711  int startRun=0; int endRun=0;
712 
713  //Check if there were any matches
714  if(answers.size()==0) {
715  std::cout << "We didn't find anything that matches the pattern for calibration CSV files\n";
716  std::cout << pattern << "\n";
717  assert(0 && "Shouldn't happen");
718  }
719 
720  //Loop through the matches
721  for(auto path : answers) {
722  if(path.size() > prePattern.size() + postPattern.size()) {
723  std::string epStr=path.substr(prePattern.size(),path.size()-(prePattern.size()+postPattern.size()));
724  // std::cout << epStr.c_str() << "\n";
725  if(epStr.c_str()[2]=='-') {
726  //Start run = 0
727  startRun=0;
728  }
729  else {
730  size_t hyphenPlace = epStr.find("-");
731  startRun=stoi( epStr.substr(2,hyphenPlace-2));
732  }
733  if(epStr.c_str()[epStr.size()-2]=='-') {
734  endRun=0;
735  }
736  else {
737  size_t hyphenPlace = epStr.find("-");
738  // std::cout << "Substring: " << epStr.substr(hyphenPlace+2) << "\n";
739  endRun=stoi(epStr.substr(hyphenPlace+2 ));
740  }
741 
742  }
743  // std::cout << startRun << "\t" << endRun << "\n";
744  if(fCurrentRun>=startRun && (endRun==0 || fCurrentRun<=endRun)) {
745  // std::cout << fCurrentRun << "\t" << path << "\n";
746  return path;
747  }
748 
749  }
750 
751  std::cout << "We didn't find anything that matches the pattern for calibration CSV files\n";
752  std::cout << "This shouldn't happen and might mean that the calibration CSV files are incomplete.\n";
753  std::cout << "Looking for run: " << fCurrentRun << " using pattern:\n";
754  std::cout << pattern << "\n";
755  assert(0 && "Shouldn't happen");
756  return std::string("");
757 }
const std::string path
Definition: plot_BEN.C:43
std::vector< std::string > globWrapper(const std::string &pattern)
Definition: CalibUtil.cxx:676
OStream cout
Definition: OStream.cxx:6
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
assert(nhit_max >=nhit_nbins)
const char * calib::getDetString ( novadaq::cnv::DetId  det)

Utility function to get detector name as a string for file manipulations.

Definition at line 29 of file CalibUtil.cxx.

References ana::assert(), novadaq::cnv::kFARDET, novadaq::cnv::kNEARDET, and novadaq::cnv::kTESTBEAM.

Referenced by calib::AttenCache::GetCSVPath(), calib::TimingCache::LoadFromDatabase(), and calib::AbsCache::LoadFromVldDatabase().

30  {
31  switch(det) {
32  case novadaq::cnv::kFARDET: return "fd";
33  case novadaq::cnv::kNEARDET: return "nd";
34  case novadaq::cnv::kTESTBEAM: return "tb";
35  default:
36  assert (!"The default case of getDetString switch was reached.");
37  return "NeverHere";
38  }
39  }
Far Detector at Ash River, MN.
Near Detector in the NuMI cavern.
assert(nhit_max >=nhit_nbins)
double calib::GetExpectations ( double  t0,
double  riseTime,
double  fallTime,
double  preAmp,
const int16_t *  obs,
double *  exps,
double &  base,
int  mode 
)
inline

Helper function for ADCShapeFit inner loop.

Also used independently to calculate the best fit adc peak height (the return value).

Definition at line 64 of file ADCShapeFit.cxx.

References stan::math::exp(), MECModelEnuComparisons::i, kNumFineTimingADCPoints, kOffsetStep, getGoodRuns4SAM::n, norm, confusionMatrixTree::t, getGoodRuns4SAM::t0, W, X, and Z.

Referenced by ADCShapeFit(), and calib::ADCShapeFitTable::TNS().

68  {
69  // There are only a few thousand distinct inputs to this function per
70  // combination of riseTime, fallTime and preAmp. Cache all possible
71  // outputs. This saves about 40% of the run time of CalHit for ND and FD
72  // jobs, for which this cache needs to be built only once. For TB jobs,
73  // two kinds of FEBs are present, so the cache is rebuilt many times as we
74  // see hits from each kind. This is *still* faster than not having a
75  // cache, although obviously a little dumb since we could save both sets of
76  // cached data with a little more work.
77 
78  // The calculation of cache_size is slightly fragile because
79  // kSamplesPerOffset and kZeroOffsetSamples are defined as doubles even
80  // though they are representing integer concepts (also the meaning of
81  // kSamplesPerOffset is the reciprocal of its name). But I think the rest
82  // of the code also breaks if kZeroOffsetSamples isn't an integer or if
83  // kSamplesPerOffset isn't the reciprocal of an integer.
84  const int steps_per_offset = 1 / kSamplesPerOffset / kOffsetStep;
85  const int num_offsets = (kNumFineTimingADCPoints - 1) - kZeroOffsetSamples;
86  const int cache_size = steps_per_offset * num_offsets;
87 
88  static double cache_ideal[cache_size] = {0};
89  static double cache_3param[cache_size] = {0};
90 
91  static double cache_riseTime = -1, cache_fallTime = -1, cache_preAmp = -1;
92 
93  if(cache_ideal[0] == 0 || riseTime != cache_riseTime ||
94  fallTime != cache_fallTime || preAmp != cache_preAmp){
95  for(int i = 0; i < cache_size; i++){
96  const double t_minus_t0 = double(i+1)/steps_per_offset;
97 
98  // This is the ideal ASIC formula from SimpleReadout
99  cache_ideal[i] = exp(-t_minus_t0/fallTime)*(1-exp(-t_minus_t0/riseTime));
100 
101  //new three parameters function
102  cache_3param[i] = (fallTime * preAmp)*(
103  (exp(-t_minus_t0/fallTime) / ((preAmp-fallTime)*(fallTime-riseTime))) -
104  (exp(-t_minus_t0/preAmp) / ((preAmp-fallTime)*(preAmp - riseTime))) +
105  (exp(-t_minus_t0/riseTime) / ((preAmp-riseTime)*(riseTime-fallTime))) );
106  }
107  }
108 
109  cache_riseTime = riseTime;
110  cache_fallTime = fallTime;
111  cache_preAmp = preAmp;
112 
113  for(unsigned int t = 0; t < kNumFineTimingADCPoints; ++t){
114  if(t <= t0){
115  exps[t] = 0;
116  }
117  else{
118  const int cachei = (t-t0) * steps_per_offset - 1;
119  exps[t] = mode == 0?cache_ideal[cachei]: cache_3param[cachei];
120  }
121  }
122 
123  // We can calculate the best fit baseline and normalization at this offset
124  // analytically (just write the chisq expression, and take derivatives with
125  // norm or base), like so:
126  double U, V, W, X, Z;
127  U = V = W = X = Z = 0;
128  for(unsigned int i = 0; i < kNumFineTimingADCPoints; ++i){
129  U += exps[i];
130  V += 1;
131  W += obs[i];
132  X += exps[i]*exps[i];
133  Z += obs[i]*exps[i];
134  }
135  const double norm = (W*U-V*Z)/(U*U-X*V);
136  base = (W*X-Z*U)/(X*V-U*U);
137 
138  // Correct all the expectations for the best guess baseline and norm
139  for(unsigned int n = 0; n < kNumFineTimingADCPoints; ++n){
140  exps[n] = norm*exps[n]+base;
141  }
142 
143  return norm;
144  }
const XML_Char int const XML_Char int const XML_Char * base
Definition: expat.h:331
Float_t Z
Definition: plot.C:38
const double kZeroOffsetSamples
Definition: ADCShapeFit.cxx:50
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
const unsigned int kNumFineTimingADCPoints
Definition: ADCShapeFit.cxx:45
const double kSamplesPerOffset
Definition: ADCShapeFit.cxx:54
Float_t norm
Float_t X
Definition: plot.C:38
#define W(x)
const int kOffsetStep
Definition: ADCShapeFit.cxx:53
void calib::GetXYZD ( geo::OfflineChan  chan,
double  w,
double *  xyzd 
)

Return position in world coordninates and distance to the readout.

Parameters
cellhitA hit on a track
wThe unknown coordinate from the opposite view
xyzd[4]Returns x,y,z,d where d is the distance to readout

Definition at line 294 of file CalibUtil.cxx.

References make_syst_table_plots::c, getBrightness::cell, geo::OfflineChan::Cell(), geo::PlaneGeo::Cell(), geo::GeometryBase::DistToElectronics(), geom(), geo::CellGeo::GetCenter(), geo::kX, geo::PlaneGeo::Ncells(), geo::GeometryBase::NPlanes(), geo::OfflineChan::Plane(), geo::GeometryBase::Plane(), NDAPDHVSetting::plane, geo::PlaneGeo::View(), w, and geo::CellGeo::WorldToLocal().

Referenced by slid::NuEEnergyAlg::CellEnergy(), calib::PCHitsList::CellHitToPCHit(), calhit::CalHitAna::FillTruthInfo(), slid::NuEEnergyAlg::HadronicDepEnergy(), calib::Calibrator::MakeRecoHit(), and jmshower::RecoJMShower::RecoShowers().

294  {
295  // Return (via 'xyzd' argument) position of deposition in world
296  // coordinates and the distance to the readout, assuming deposition
297  // has cell-local-z position = w.
298 
300 
301  UInt_t plane = chan.Plane();
302  UInt_t cell = chan.Cell();
303  if ( plane >= geom->NPlanes() ) {
304  throw cet::exception("BAD_PLANE_NUMBER")
305  << "plane " << plane << " of " << geom->NPlanes() << " planes\n"
306  << __FILE__ << ":" << __LINE__ << "\n";
307  }
308  const geo::PlaneGeo* p = geom->Plane(plane);
309  if ( cell >= p->Ncells() ) {
310  throw cet::exception("BAD_CELL_NUMBER")
311  << "cell " << cell << " of " << p->Ncells()
312  << " in plane " << plane << "\n"
313  << __FILE__ << ":" << __LINE__ << "\n";
314  }
315  const geo::CellGeo* c = p->Cell(cell);
316 
317  // Should be replaced with alignment tables or whatnot. Okay for now.
318 
319  // w is not localZ, which makes this a lot messier than just
320  // c.GetCenter(xyzd,w) and c.DistToReadOut(w)
321  c->GetCenter(xyzd);
322  if (geom->Plane(plane)->View()==geo::kX)
323  xyzd[1] = w;
324  else
325  xyzd[0] = w;
326  Double_t localxyz[3];
327  c->WorldToLocal(xyzd,localxyz);
328  xyzd[3] = geom->DistToElectronics(localxyz[2], *c);
329  }
void GetCenter(double *xyz, double localz=0.0) const
Definition: CellGeo.cxx:159
void WorldToLocal(const double *local, double *world) const
Definition: CellGeo.cxx:100
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
const char * p
Definition: xmltok.h:285
Vertical planes which measure X.
Definition: PlaneGeo.h:28
unsigned int Ncells() const
Number of cells in this plane.
Definition: PlaneGeo.h:43
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
const PlaneGeo * Plane(unsigned int i) const
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:53
Geometry information for a single readout plane.
Definition: PlaneGeo.h:36
unsigned short Plane() const
Definition: OfflineChan.h:31
unsigned short Cell() const
Definition: OfflineChan.h:32
double DistToElectronics(double localz, const CellGeo &cell) const
get distance from local z position in cell to apd in cm, including pigtail
void geom(int which=0)
Definition: geom.C:163
unsigned int NPlanes() const
Encapsulate the cell geometry.
Definition: CellGeo.h:25
Float_t w
Definition: plot.C:20
std::vector< std::string > calib::globWrapper ( const std::string &  pattern)

Definition at line 676 of file CalibUtil.cxx.

References allTimeWatchdog::endl, site_stats_from_log::filenames, MECModelEnuComparisons::i, test_Tier::return_value, and ss.

Referenced by getCSVFilenameByParsingDirectory().

676  {
677  using namespace std;
678 
679  // glob struct resides on the stack
680  glob_t glob_result;
681  memset(&glob_result, 0, sizeof(glob_result));
682 
683  // do the glob operation
684  int return_value = glob(pattern.c_str(), GLOB_TILDE, NULL, &glob_result);
685  if(return_value != 0) {
686  globfree(&glob_result);
687  stringstream ss;
688  ss << "glob(" << pattern.c_str() << ") failed with return_value " << return_value << endl;
689  throw std::runtime_error(ss.str());
690  }
691 
692  // collect all the filenames into a std::list<std::string>
693  vector<string> filenames;
694  for(size_t i = 0; i < glob_result.gl_pathc; ++i) {
695  filenames.push_back(string(glob_result.gl_pathv[i]));
696  }
697 
698  // cleanup
699  globfree(&glob_result);
700 
701  // done
702  return filenames;
703 }
Float_t ss
Definition: plot.C:24
bool calib::HasXYAdjacents ( int  plane,
int  cell,
const ChannelSet hmap 
)

Internal helper for BestPathEstimates. Takes account of bad channels.

Definition at line 54 of file CalibUtil.cxx.

References getBrightness::cell, calib::ChannelSet::CellExists(), geom(), chaninfo::BadChanList::IsBad(), geo::PlaneGeo::Ncells(), geo::GeometryBase::Plane(), and fillBadChanDBTables::step.

Referenced by BestPathEstimates(), and FindBelowThresholdCalibCandidates().

55  {
58 
59  // Look first below and then above this cell
60  for(int step = -1; step <= +1; step += 2){
61  int curCell = cell;
62  while(true){
63  curCell += step;
64 
65  // Ran out of detector
66  if(curCell < 0 ||
67  curCell >= int(geom->Plane(plane)->Ncells())) return false;
68 
69  // If this channel is bad we can keep on looking in this direction
70  if(bcl->IsBad(plane, curCell)) continue;
71 
72  // If there's a hit this side move on to the other side. If there's
73  // isn't then this cell fails the test.
74  if(hmap.CellExists(plane, curCell))
75  break;
76  else
77  return false;
78 
79  } // end while
80  } // end for step
81  return true;
82  }
unsigned int Ncells() const
Number of cells in this plane.
Definition: PlaneGeo.h:43
const PlaneGeo * Plane(unsigned int i) const
void geom(int which=0)
Definition: geom.C:163
bool IsBad(int plane, int cell)
bool calib::HasZAdjacents ( int  plane,
int  cell,
const ChannelSet hmap,
const art::ServiceHandle< geo::Geometry geom 
)

Definition at line 87 of file CalibUtil.cxx.

References getBrightness::cell, calib::ChannelSet::CellExists(), and geo::GeometryBase::NextPlaneInView().

Referenced by BestPathEstimates().

90  {
91  return (!hmap.CellExists(plane, cell-1) &&
92  !hmap.CellExists(plane, cell+1) &&
93  hmap.CellExists(geom->NextPlaneInView(plane, +1), cell) &&
94  hmap.CellExists(geom->NextPlaneInView(plane, -1), cell));
95  }
const unsigned int NextPlaneInView(unsigned int p, int d=+1) const
bool calib::ltTPt ( BetheBlochTables::T_pt  pt,
double  T 
)

Definition at line 94 of file BetheBloch.cxx.

References T, and calib::BetheBlochTables::T_pt::T.

Referenced by calib::BetheBlochTables::dEdx().

95  {
96  return pt.T < T;
97  }
double T
Definition: Xdiff_gwt.C:5
bool calib::ltXPt ( EnergyLossVsDistance::x_pt  pt,
double  x 
)
zBoundMap calib::MakeZBoundaryMap ( std::set< double > const &  planeZBounds,
std::vector< TVector3 > const &  trajectory 
)

Return a map of the z position of each trajectory point on a track to the bounding positions of where the track passes through that plane. In the case that a track stops in the plane, then the end of the track is the second bounding point.

Parameters
planeZBoundsA set of the z positions bounding each plane in the detector
trajectoryThe trajectory points of the track

Definition at line 354 of file CalibUtil.cxx.

References std::abs(), geo::PlaneGeo::Cell(), dir, geom(), geo::CellGeo::HalfD(), geo::LiveGeometry::IsPointLive(), LOG_DEBUG, make_pair(), geo::GeometryBase::Plane(), X, and Z.

Referenced by calib::StopperThreshold::FillHist(), trk::CosmicTrackAna::FillTrackHistograms(), calib::StopperThreshold::FillTree(), numusand::NumuSandFxs::getAveTrackdEdxLast4Cells(), numusand::NumuSandFxs::getAveTrackdEdxLast6Cells(), numusand::NumuSandFxs::getAveTrackdEdxLast8Cells(), trackinfo::TrackInfoFxs::getAveTrackdEdxLastCells(), calib::PCHitsList::ProcessTrackTrajectory(), and calib::StopperThreshold::testPath().

356  {
357  zBoundMap zToPlaneBounds;
358 
359  std::vector<TVector3> localTraj(trajectory);
360 
361  // drop duplicate entries that are right next to each other to avoid zero
362  // vectors
363  auto itr1 = localTraj.begin();
364  auto itr2 = localTraj.begin();
365  while(itr1 != localTraj.end()){
366  // set the second iterator to be the next entry in the vector
367  itr2 = itr1;
368  ++itr2;
369  if(itr2 == localTraj.end()) break;
370 
371  // if the TVector3s are the same, erase itr2 and set
372  // itr1 to be the return value, ie the position after
373  // the original itr2. Otherwise increase itr1
374  if(std::abs((*itr1).X() - (*itr2).X()) < 0.1 &&
375  std::abs((*itr1).Y() - (*itr2).Y()) < 0.1 &&
376  std::abs((*itr1).Z() - (*itr2).Z()) < 0.1){
377  LOG_DEBUG("CalibUtil") << "erasing " << (*itr1).X() << " " << (*itr1).Y() << " " << (*itr1).Z();
378  itr1 = localTraj.erase(itr2);
379  }
380  else ++itr1;
381  }
382 
383  double deltaZ = 0.;
384  double lowZ = 0.;
385  double highZ = 0.;
386 
387  auto litr = planeZBounds.begin();
388  auto hitr = planeZBounds.begin();
389 
390  TVector3 dir;
391  TVector3 lowBound;
392  TVector3 highBound;
393 
396  double planeZDepth = 2.*geom->Plane(0)->Cell(0)->HalfD();
397 
398  for(size_t tp = 0; tp < localTraj.size(); ++tp){
399 
400  LOG_DEBUG("CalibUtils")
401  << tp << "/" << localTraj.size()
402  << " localTraj: " << localTraj[tp].X()
403  << " " << localTraj[tp].Y()
404  << " " << localTraj[tp].Z();
405 
406  // make sure the localTraj point is inside the detector
407  if( !liveGeo->IsPointLive(localTraj[tp]) ){
408  LOG_DEBUG("CalibUtils") << tp << " is not valid";
409  continue;
410  }
411 
412  // find the intersection of the localTrajectory with the boundary
413  // of the plane it represents
414  if(tp < localTraj.size() - 1) dir = localTraj[tp+1] - localTraj[tp];
415  else dir = localTraj[tp] - localTraj[tp-1];
416 
417  // find the plane boundaries for this point
418  litr = planeZBounds.lower_bound(localTraj[tp].Z() - planeZDepth);
419  hitr = planeZBounds.upper_bound(localTraj[tp].Z());
420 
421  // in the muon catcher, the high side and low side iterators could be the same
422  if(hitr == litr){
423  if(litr != planeZBounds.begin() ) --litr;
424  else ++hitr;
425  }
426  lowZ = *litr;
427  highZ = *hitr;
428 
429  LOG_DEBUG("CalibUtils")
430  << tp << " " << localTraj[tp].Z()
431  << " low z: " << lowZ << " high z: " << highZ
432  << " localTraj point: ("
433  << localTraj[tp].X() << " " << localTraj[tp].Y() << " " << localTraj[tp].Z() << ")";
434 
435  // make sure we don't go past the detector boundaries
436  deltaZ = localTraj[tp].Z() - lowZ;
437  lowBound.SetXYZ(localTraj[tp].X() - deltaZ*dir.X()/dir.Z(),
438  localTraj[tp].Y() - deltaZ*dir.Y()/dir.Z(),
439  lowZ);
440 
441  LOG_DEBUG("CalibUtils")
442  << "is bounded by " << deltaZ << " " << dir.X()/dir.Z() << " " << dir.Y()/dir.Z()
443  << " (" << lowBound.X() << " " << lowBound.Y() << " " << lowBound.Z() << ")";
444 
445  deltaZ = highZ - localTraj[tp].Z();
446  highBound.SetXYZ(localTraj[tp].X() + deltaZ*dir.X()/dir.Z(),
447  localTraj[tp].Y() + deltaZ*dir.Y()/dir.Z(),
448  highZ);
449 
450  LOG_DEBUG("CalibUtils")
451  << "and " << deltaZ << " ("
452  << highBound.X() << " " << highBound.Y() << " " << highBound.Z() << ")";
453 
454  zToPlaneBounds[localTraj[tp].Z()] = std::make_pair(lowBound, highBound);
455 
456  }
457 
458  return zToPlaneBounds;
459  }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
double HalfD() const
Definition: CellGeo.cxx:205
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
std::pair< Spectrum *, CheatDecomp * > make_pair(SpectrumLoaderBase &loader_data, SpectrumLoaderBase &loader_mc, HistAxis *axis, Cut *cut, const SystShifts &shift, const Var &wei)
Definition: DataMCLoad.C:335
const PlaneGeo * Plane(unsigned int i) const
float abs(float number)
Definition: d0nt_math.hpp:39
Float_t Z
Definition: plot.C:38
TDirectory * dir
Definition: macro.C:5
bool IsPointLive(TVector3 vertex)
Note the muon catcher is considered bad; use in combination with InMuonCatcher if needed...
void geom(int which=0)
Definition: geom.C:163
std::map< double, zBounds > zBoundMap
Definition: CalibUtil.h:107
Float_t X
Definition: plot.C:38
std::ostream & calib::operator<< ( std::ostream &  os,
const AttenCurve res 
)

Definition at line 149 of file AttenCurve.cxx.

References calib::AttenCurve::atten_length, calib::AttenCurve::background, calib::AttenCurve::chan, calib::AttenCurve::chisq, calib::AttenCurve::coeff_exp, calib::AttenCurve::coeff_high, calib::AttenCurve::coeff_low, calib::AttenCurve::det, calib::AttenCurve::edge_high, calib::AttenCurve::edge_low, allTimeWatchdog::endl, novadaq::cnv::DetInfo::GetName(), calib::AttenCurve::initialized, calib::AttenCurve::interp_pts, and getGoodRuns4SAM::n.

Referenced by calib::AttenCurve::AttenCurve().

150  {
151  os << "Attenuation fit results for "
153  << ", " << res.chan << ": ";
154 
155  if(!res.initialized){
156  os << " Uninitialized." << std::endl;
157  return os;
158  }
159 
160  os << res.atten_length << "cm " << res.coeff_exp << " amplitude on "
161  << res.background << " background. Rolloffs start at -"
162  << res.edge_low << "cm and +" << res.edge_high << "cm with size "
163  << res.coeff_low << " and " << res.coeff_high
164  << " fit quality " << res.chisq << std::endl;
165  os << "Interpolation points are: [ ";
166  const int N = res.interp_pts.size();
167  for(int n = 0; n < N; ++n)
168  os << "(" << res.interp_pts[n].w << ", "
169  << res.interp_pts[n].factor << ") ";
170  os << "]" << std::endl;
171  return os;
172  }
static std::string GetName(int id)
float calib::PathLengthInCell ( zBoundMap const &  zBounds,
TVector3 const &  recoHitLoc,
std::pair< uint32_t, uint32_t > const &  pc 
)

Return the path length of a track in the cell in question.

Parameters
zBoundsThe z poisition boundaries for each trajectory point on the track
recoHitLocThe 3D position of the rb::RecoHit to ensure the trajectory passes through it
pcA std::pair corresponding to the plane (p) and cell (c) of the hit

Definition at line 498 of file CalibUtil.cxx.

References std::abs(), allTimeWatchdog::boundaries, geo::PlaneGeo::Cell(), d, Dot(), geom(), geo::CellGeo::GetCenter(), geo::CellGeo::HalfD(), geo::CellGeo::HalfL(), geo::CellGeo::HalfW(), MECModelEnuComparisons::i, geo::kY, LOG_VERBATIM, Mag(), geo::GeometryBase::Plane(), demo5::surf, Unit(), geo::PlaneGeo::View(), and ZBounds().

Referenced by calib::StopperThreshold::FillHist(), trk::CosmicTrackAna::FillTrackHistograms(), calib::StopperThreshold::FillTree(), numusand::NumuSandFxs::getAveTrackdEdxLast4Cells(), numusand::NumuSandFxs::getAveTrackdEdxLast6Cells(), numusand::NumuSandFxs::getAveTrackdEdxLast8Cells(), trackinfo::TrackInfoFxs::getAveTrackdEdxLastCells(), calib::PCHitsList::ProcessTrackTrajectory(), and calib::StopperThreshold::testPath().

501  {
503 
504  double xyz[3] = {0.};
505  geom->Plane(pc.first)->Cell(pc.second)->GetCenter(xyz);
506  TVector3 cellCenter = TVector3(xyz);
507  TVector3 cellExtent = TVector3(geom->Plane(pc.first)->Cell(pc.second)->HalfW(),
508  geom->Plane(pc.first)->Cell(pc.second)->HalfL(),
509  geom->Plane(pc.first)->Cell(pc.second)->HalfD());
510  if(geom->Plane(pc.first)->View() == geo::kY)
511  cellExtent = TVector3(geom->Plane(pc.first)->Cell(pc.second)->HalfL(),
512  geom->Plane(pc.first)->Cell(pc.second)->HalfW(),
513  geom->Plane(pc.first)->Cell(pc.second)->HalfD());
514 
515  // find the trajectory points of the track that bound this
516  // hit in z and determine where the hit is expected to be
517  // based on the direction of the track between the trajectory
518  // points
520 
521 
522  TVector3 lowerPlaneBound = boundaries.first;
523  TVector3 upperPlaneBound = boundaries.second;
524 
525  // now determine where the trajectory intersects the cell boundaries
526  // evaluate the point where the line intersects the plane of each
527  // boundary and see if that point is within the cell
528  // see http://en.wikipedia.org/wiki/Line–plane_intersection
529 
530  float pathLength = 0.;
531  float d = 0.;
532  // all vectors are in order of -x, +x, -y, +y, -z, +z
533 
534  // determine a point on each plane bounding the cell
535  // define the edges of the cell using its center and extent values
536  auto pointsList = {TVector3(cellCenter.X() - cellExtent.X(), cellCenter.Y(), cellCenter.Z()),
537  TVector3(cellCenter.X() + cellExtent.X(), cellCenter.Y(), cellCenter.Z()),
538  TVector3(cellCenter.X(), cellCenter.Y() - cellExtent.Y(), cellCenter.Z()),
539  TVector3(cellCenter.X(), cellCenter.Y() + cellExtent.Y(), cellCenter.Z()),
540  TVector3(cellCenter.X(), cellCenter.Y(), cellCenter.Z() - cellExtent.Z()),
541  TVector3(cellCenter.X(), cellCenter.Y(), cellCenter.Z() + cellExtent.Z())};
542  std::vector<TVector3> pointsInPlanes(pointsList);
543 
544  auto normalList = {TVector3(-1., 0., 0.),
545  TVector3( 1., 0., 0.),
546  TVector3( 0., -1., 0.),
547  TVector3( 0., 1., 0.),
548  TVector3( 0., 0., -1.),
549  TVector3( 0., 0., 1.) };
550  std::vector<TVector3> normalVects(normalList);
551 
552  std::vector<TVector3> intersections;
553  TVector3 intersect;
554 
555  // vector describing the boundaries of this cell
556  auto boundList = {pointsInPlanes[0].X() - 1.e-4, pointsInPlanes[1].X() + 1.e-4,
557  pointsInPlanes[2].Y() - 1.e-4, pointsInPlanes[3].Y() + 1.e-4,
558  pointsInPlanes[4].Z() - 1.e-4, pointsInPlanes[5].Z() + 1.e-4};
559  std::vector<double> cellBounds(boundList);
560 
561  // check that the reco hit is between the bounds, return 0 if not
562  if(recoHitLoc.X() < cellBounds[0] || recoHitLoc.X() > cellBounds[1] ||
563  recoHitLoc.Y() < cellBounds[2] || recoHitLoc.Y() > cellBounds[3] ||
564  recoHitLoc.Z() < cellBounds[4] || recoHitLoc.Z() > cellBounds[5])
565  return 0.;
566 
567  // the recoHitLoc is the determined 3D position for the given hit
568  // the plane bounds are the 3D positions where the track crosses the
569  // plane containing this hit in the upstream and downstream locations
570 
571  // the vector from the upstream and downstream locations gives the direction
572  // from one side of the plane to the other. Grab the location of the hit
573  // and then walk along the direction vector until we step out of the cell
574  // be sure to check the boundary of the cell in both the z direction and
575  // in the width of the cell
576  TVector3 traj = (upperPlaneBound - lowerPlaneBound).Unit();
577 
578  // loop over the different planes bounding the cell and find the intersection points
579  // go in the reverse order and remove any surfaces where the intersection is outside
580  // of the bounds of the cell
581  for(size_t surf = 0; surf < normalVects.size(); ++surf){
582 
583  bool repeatIntersection = false;
584 
585  // check that you can do the calculation, if not, there is no
586  // intersectoin with that surface and we remove it.
587  if( std::abs(traj.Dot(normalVects[surf])) > 0. ){
588  d = (pointsInPlanes[surf] - lowerPlaneBound).Dot(normalVects[surf])/traj.Dot(normalVects[surf]);
589  intersect = d*traj + lowerPlaneBound;
590 
591  // LOG_VERBATIM("CalibUtils") << "intersection: "
592  // << intersect.X() << " "
593  // << intersect.Y() << " "
594  // << intersect.Z() << " surf "
595  // << surf << " "
596  // << normalVects[surf].X() << " "
597  // << normalVects[surf].Y() << " "
598  // << normalVects[surf].Z() << " "
599  // << d << " "
600  // << d*traj.X() << " "
601  // << d*traj.Y() << " "
602  // << d*traj.Z();
603 
604  // check that the intersection is between the bounds of the cell
605  // if not, remove the intersection, allow the boundaries to be fuzzy by
606  // 0.1 cm to account for rounding errors
607  if(intersect.X() > cellBounds[0] && intersect.X() < cellBounds[1] &&
608  intersect.Y() > cellBounds[2] && intersect.Y() < cellBounds[3] &&
609  intersect.Z() > cellBounds[4] && intersect.Z() < cellBounds[5]){
610 
611  // check that the intersection is not already in the vector
612  // that can happen if the intersection is in a corner of the cell, then
613  // two surfaces have the same intersection
614  for(auto p : intersections){
615  if(std::abs(p.X() - intersect.X()) < 0.01 &&
616  std::abs(p.Y() - intersect.Y()) < 0.01 &&
617  std::abs(p.Z() - intersect.Z()) < 0.01 ){
618  // LOG_VERBATIM("CalibUtils") << "intersection point repeats " << intersect.X()
619  // << " " << intersect.Y() << " " << intersect.Z();
620  repeatIntersection = true;
621  break;
622  }
623  } // end loop to look for a repeat intersection
624  if(!repeatIntersection) intersections.push_back(intersect);
625 
626  } // end if there is a legit intersection
627  }// end if the denominator is non-zero
628  }// end loop over surfaces
629 
630  // better have just 2 intersections at this point
631  // possible to have only one, if the track appears to stop in the cell, then use the reco hit location as
632  // one end point
633  if(intersections.size() > 2){
634  LOG_VERBATIM("CalibUtils")
635  << "reco hit location: "
636  << recoHitLoc.X() << " " << recoHitLoc.Y() << " " << recoHitLoc.Z()
637  <<"\ncell center: "
638  << cellCenter.X() << " " << cellCenter.Y() << " " << cellCenter.Z()
639  << "\ncell boundaries: "
640  << cellBounds[0] << " " << cellBounds[1] << " "
641  << cellBounds[2] << " " << cellBounds[3] << " "
642  << cellBounds[4] << " " << cellBounds[5];
643 
644 
645  LOG_VERBATIM("CalibUtils")
646  << "upper bound: "
647  << upperPlaneBound.X() << " "
648  << upperPlaneBound.Y() << " "
649  << upperPlaneBound.Z() << "\nlower bound: "
650  << lowerPlaneBound.X() << " "
651  << lowerPlaneBound.Y() << " "
652  << lowerPlaneBound.Z() << "\ntrajectory: "
653  << traj.X() << " " << traj.Y() << " " << traj.Z();
654 
655  for(auto i : intersections)
656  LOG_VERBATIM("CosmicTrackUtilitites")
657  << "intersection point: "
658  << i.X() << " " << i.Y() << " " << i.Z();
659 
660  throw cet::exception("CalibUtils")
661  << "too many cell surfaces intersected "
662  << "by trajectory: " << intersections.size();
663  }
664  else if(intersections.size() == 1)
665  pathLength = (intersections[0] - recoHitLoc).Mag();
666  else if(intersections.size() < 1)
667  pathLength = 0.;
668  else
669  pathLength = (intersections[0] - intersections[1]).Mag();
670 
671  return pathLength;
672  }
zBounds ZBounds(zBoundMap const &bounds, double const &hitZ)
Return the bounding points for a given z position along a track.
Definition: CalibUtil.cxx:462
double HalfL() const
Definition: CellGeo.cxx:198
double HalfD() const
Definition: CellGeo.cxx:205
void GetCenter(double *xyz, double localz=0.0) const
Definition: CellGeo.cxx:159
float Dot(const Proxy &v) const
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
const char * p
Definition: xmltok.h:285
double HalfW() const
Definition: CellGeo.cxx:191
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
const PlaneGeo * Plane(unsigned int i) const
std::pair< TVector3, TVector3 > zBounds
Definition: CalibUtil.h:106
float abs(float number)
Definition: d0nt_math.hpp:39
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:53
Float_t d
Definition: plot.C:236
TVector3 Unit() const
void geom(int which=0)
Definition: geom.C:163
float Mag() const
#define LOG_VERBATIM(category)
surf
Definition: demo5.py:35
zBounds calib::ZBounds ( zBoundMap const &  bounds,
double const &  hitZ 
)

Return the bounding points for a given z position along a track.

Parameters
boundsThe z position boundaries for each trajectory point on the track
hitZThe z position of the trajectory point in question

Definition at line 462 of file CalibUtil.cxx.

References geo::PlaneGeo::Cell(), geom(), geo::CellGeo::HalfD(), and geo::GeometryBase::Plane().

Referenced by PathLengthInCell().

464  {
465  if(bounds.empty())
466  throw cet::exception("CalibUtil")
467  << "bounds map has no entries, cannot "
468  << "find bounding points for hit z location: "
469  << hitZ;
470 
471  // for(auto itr = bounds.begin(); itr != bounds.end(); ++itr)
472  // LOG_VERBATIM("CalibUtils") << "hit z: " << hitZ << " " << itr->first << " lower "
473  // << itr->second.first.X() << " "
474  // << itr->second.first.Y() << " "
475  // << itr->second.first.Z() << " upper "
476  // << itr->second.second.X() << " "
477  // << itr->second.second.Y() << " "
478  // << itr->second.second.Z();
480  double planeZDepth = 2.*geom->Plane(0)->Cell(0)->HalfD();
481 
482  zBoundMap::const_iterator lbitr = bounds.lower_bound(hitZ - planeZDepth);
483 
484  // if we did not find an iterator, then the z position passed is
485  // off the edge of the track, use the last entry in the map
486  if(lbitr == bounds.end() )
487  return zBounds(bounds.rbegin()->second.first, bounds.rbegin()->second.second);
488 
489  return zBounds(lbitr->second.first, lbitr->second.second);
490 
491  }
::xsd::cxx::tree::bounds< char > bounds
Definition: Database.h:226
double HalfD() const
Definition: CellGeo.cxx:205
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
const PlaneGeo * Plane(unsigned int i) const
std::pair< TVector3, TVector3 > zBounds
Definition: CalibUtil.h:106
void geom(int which=0)
Definition: geom.C:163

Variable Documentation

const double calib::GeV2MeV = CLHEP::GeV / CLHEP::MeV
static
const double calib::j = 0.200

Definition at line 29 of file BetheBloch.cxx.

Referenced by stan::math::matrix_exp_action_handler::action(), add_and_normalize_LLhistos(), nova::database::Table::AddDistinctColumn(), nova::dbi::Table::AddDistinctColumn(), nutools::dbi::Table::AddDistinctColumn(), genie::flux::GNuMIFlux::AddFile(), earms::GridSearch::AddHoughIntersections(), ana::CovarianceMatrix::AddMatrix(), nova::database::Table::AddOrderColumn(), nova::dbi::Table::AddOrderColumn(), nutools::dbi::Table::AddOrderColumn(), genie::BLI2DNonUnifGrid::AddPoint(), fuzz::FuzzyKVertex::AddProng(), earms::GridSearch::AddVtxPoints(), om::FEBRateAnalysis::AnaFile(), novaddt::SingletonRejectionAna::analyze(), calhit::CalHitAna::analyze(), rsim::MakeNoiseSpectrumFile::analyze(), mcchk::CloseInTime::analyze(), G4MismatchAna::analyze(), zcl::SMMTriggerAna::analyze(), mcchk::ShowerAnaCheck::analyze(), slicer::S4DParamCalc::analyze(), beamlinereco::ToFSingleCounterAnalysis::analyze(), sn::SNSlicerAna::analyze(), slicer::IdenticalSlicerAna::analyze(), testbeam::TestBeamCommissioning::analyze(), pa::HitEva::analyze(), vf::TrackEva::analyze(), validation::NoiseClusterAnalysis::analyze(), comi::NumiFilteringAna::analyze(), showere::ShowerEnergyAna::analyze(), slicer::SlicerAna::analyze(), fuzz::FuzzyKValidate::analyze(), remid::ReMIdDedxRock::analyze(), comi::NearlineAna::analyze(), remid::ReMIdDedxFD::analyze(), remid::ReMIdDedxStudies::analyze(), beamlinereco::ToFAnalysisMini::analyze(), bpfit::BreakPointProtonAna::analyze(), LightLevels::analyze(), air::AirKalmanAna::analyze(), ncs::GenieTruth::analyze(), ncs::Xeff::analyze(), nnbar::RecoAnalysis::analyze(), beamlinereco::ToFPositionRecoAnalysis::analyze(), htk::HoughTrack::analyze(), comi::FEBFlash::analyze(), AnaPlotMaker(), stan::math::append_col(), stan::math::append_row(), stan::math::apply_scalar_unary< F, T >::apply(), stan::model::assign(), om::PlotOptions::AutoScale(), evd::TZProjPad::AutoZoomTruth(), bpfit::BreakPoint::AverageXY(), chaninfo::BadChanList::BadChanList(), beamlinereco::ToFSingleCounterAnalysis::beginJob(), beamlinereco::ToFAnalysisMini::beginJob(), beamlinereco::ToFPositionRecoAnalysis::beginJob(), DataCheck::HardwareStatusCheck::beginSubRun(), comi::DataCheck::beginSubRun(), ana::best_spline_fcn0(), ana::best_spline_make_mode_graph(), ana::best_spline_seeds(), me::MEFinder::BestSlcMatch(), ana::AtmConstraint::BiCubicInterp(), bin_composition_pie_chart(), BuildEmuEnuCosThetaPdf(), ana::CovarianceMatrix::BuildFullCovMx(), osc::PMNS_Sterile::BuildHms(), geo::GeometryBase::BuildMaps(), nova::database::Table::BulkInsertInDB(), caf_numu_fd_validation_data(), caf_numu_fd_validation_MC(), caf_numu_fd_validation_MC_no_tau(), bpfit::Lutz::CalcD(), bpfit::Lutz::Calcq(), ana::MultiverseCorrelation::calculate_correlation_matrix(), ana::MultiverseCorrelation::calculate_covariance_matrix(), CalculateCovarianceMatrix(), caldp::TCTrack::CalculateFiberVelocity(), caldp::TCTrack::CalculateMuonVelocity(), CalculateTotalCovariance(), cafrwgt::CAFReweight::CalcWeightVector(), bpfit::Lutz::Calcx(), bpfit::Lutz::CalcZeta(), trk::KalmanTrack::CellToPlaneSort(), trk::KalmanTrack::CellToPlaneSortHits(), stan::math::algebra_solver_vari< Fs, F, T, Fx >::chain(), stan::math::cholesky_block::chain(), stan::math::cholesky_scalar::chain(), osc::_OscCalculatorDMP< T >::ChannelCacheIdx(), osc::OscCalculatorPMNSOptEigen::ChannelCacheIdx(), stan::test::unit::check_adaptation(), stan::test::unit::check_different(), fuzz::FuzzyKMeanAlg::CheckUnique(), nova::database::Table::CheckValidXMLDef(), nova::dbi::Table::CheckValidXMLDef(), bpfit::Lutz::Chi2Beta(), bpfit::Lutz::Chi2BetaJ(), ana::OscCovMxExperiment::ChiSq(), stan::math::chol2inv(), stan::math::cholesky_block::cholesky_block(), stan::math::cholesky_corr_constrain(), stan::math::cholesky_corr_free(), stan::math::cholesky_decompose(), stan::math::cholesky_scalar::cholesky_scalar(), genie::utils::math::CholeskyDecomposition(), earms::GridSearch::ChooseBestProngDir(), slicer::PointManager::CleanUpNeighborhood(), me::MEFinder::ClusterMEHits(), stan::math::columns_dot_product(), cmf::CovarianceBinUtility::CompactMatrix(), compare_cos_numi(), compare_fits(), CompareMCCompPrediction(), stan::math::LDLT_alloc< R, C >::compute(), keras::LayerFlatten::compute_output(), keras::LayerMaxPooling::compute_output(), keras::LayerActivation::compute_output(), keras::LayerConv2D::compute_output(), keras::LayerDense::compute_output(), fuzz::FuzzyKMeanAlg::ComputeA(), bpfit::dEdxCalculator::computeDEDX(), fuzz::FuzzyKMeanAlg::ComputeDij(), genie::DFRKinematicsGenerator::ComputeMaxXSec(), genie::DISKinematicsGenerator::ComputeMaxXSec(), genie::SKKinematicsGenerator::ComputeMaxXSec(), genie::DMDISKinematicsGenerator::ComputeMaxXSec(), fuzz::FuzzyKMeanAlg::ComputeUij(), CondenseRunList(), cafrwgt::CAFReweight::Configure(), g4n::G4Alg::ConfigUserActionManager(), confusionMatrix(), confusionMatrixProng(), osc::conjugate_elements(), om::PlotViewer::ContentProjectionTH2F(), ContourComparisonPlot(), keras::conv_single_depth_same(), keras::conv_single_depth_valid(), ConvertToGINuke(), ConvertToGST(), om::HitMaps::CopyHistContent(), nnbar::NNbarUtilities::correlationTCell(), nnbar::NNbarUtilities::correlationTPlane(), cmf::CovarianceTools::CorrToCov(), airshower::AirSlicer::CountActiveDCM(), chaninfo::BadChanList::CountDCMHits(), stan::math::cov_exp_quad(), stan::math::cov_exp_quad_vari< T_x, T_sigma, T_l >::cov_exp_quad_vari(), stan::math::cov_exp_quad_vari< T_x, double, T_l >::cov_exp_quad_vari(), cmf::CovarianceTools::CovToCorr(), cmf::CovarianceTools::CovToFracCov(), nova::database::Table::CreateFromDB(), nova::database::Table::CreateFromXML(), nova::dbi::Table::CreateFromXML(), rsim::ReadoutSim::CreateRawDigits(), CVNCuts(), cmf::CovarianceMatrixDecorrelator::CycleMatrixComponents(), CylindricalSmoothing(), d3sigma_calc(), d4sigma_calc(), d4sigma_hist(), d4sigma_plot(), DCMOffsetCalculator(), caldp::DCMSummary::DCMOffsetCountIndx(), caldp::DCMSummary::DCMOffsetSumIndx(), caldp::DCMSummary::DCMOffsetSumSquareIndx(), ana::MinuitFitter::DecodePars(), ana::StanFitter::DecodePars(), ana::CovarianceMatrix::DecomposeCovMx(), stan::math::coupled_ode_system< F, double, var >::decouple_states(), stan::math::coupled_ode_system< F, var, double >::decouple_states(), stan::math::coupled_ode_system< F, var, var >::decouple_states(), genie::alvarezruso::ARSampledNucleus::Density(), genie::alvarezruso::ARSampledNucleus::DensityOfCentres(), stan::math::determinant(), stan::math::diag_post_multiply(), stan::math::diag_pre_multiply(), ValidCalibPDF::DiblockTex(), diffapdhv(), stan::io::random_var_context::dim_size(), stan::math::divide(), novaddt::HoughTrackMaker::do_like_zukai(), fuzz::FuzzyKMeanAlg::DoClustering(), nueccinc_test::NueCCIncGlobalFitter::doFullFit(), slicemergeviews::SliceMergeViews::DoMerge(), evd::PlotView::Draw(), evd::MCTrueView::Draw(), drawBinLines(), evd::RecoBaseDrawer::DrawHoughResults2D(), drawIntensityEffect_2019(), drawLongTerm(), drawLongTerm_2019(), DrawSurface(), drawVsPOT(), nova::dbi::RunHistory::Dump(), stan::math::internal::ops_partials_edge< double, std::vector< Eigen::Matrix< var, R, C > > >::dump_operands(), stan::math::internal::ops_partials_edge< double, std::vector< std::vector< var > > >::dump_operands(), stan::math::internal::ops_partials_edge< double, std::vector< Eigen::Matrix< var, R, C > > >::dump_partials(), stan::math::internal::ops_partials_edge< double, std::vector< std::vector< var > > >::dump_partials(), stan::math::internal::ops_partials_edge< Dx, std::vector< Eigen::Matrix< fvar< Dx >, R, C > > >::dx(), stan::math::internal::ops_partials_edge< Dx, std::vector< std::vector< fvar< Dx > > > >::dx(), ana::ICrossSectionAnalysis::DXDY(), ana::ICrossSectionAnalysis::DXDYDZ(), efficiency(), efficiencySA(), mcchk::ShowerAnaCheck::EMMoliereRadius(), cmf::CovarianceBinUtility::EmptyBins(), mcchk::ShowerAnaCheck::EMShowerWidth(), rsim::MakeNoiseSpectrumFile::endJob(), comi::DataCheck::endJob(), bpfit::BPFdEdxHistoMaker::endJob(), calib::DCMTimingOffset::endJob(), beamlinereco::ToFPositionRecoAnalysis::endJob(), calib::AbsCalib::endRun(), calib::DCMTimingOffset::endRun(), comi::ChanOcc::endSubRun(), calib::TimingCalFilter::endSubRun(), calib::DCMTimingOffset::endSubRun(), ana::Kriger::EnsureMatrix(), ErrorBand(), osc::_PMNS< T >::EvalEqn5(), om::HitMaps::EvalFEBShutOff(), rb::Cluster::Exclude(), stan::math::exp_action_chain_vd(), ana::ExPIDPlot(), ExPIDPlot(), fake_future_data(), fcn(), fcn2Var(), FD_plots(), rsim::IFPGAAlgorithm::FetchThresholds(), genie::GiBUURESFormFactor::FormFactors::FFRes(), geo::LiveGeometry::FillBadBoxes(), nutools::dbi::Table::FillChanRowMap(), nova::dbi::Table::FillChanRowMap(), ana::NumuCCIncPionTemplateFitter::FillCovarianceBetweenSysts(), ana::nueccinc::NueCCIncTemplateFitter::FillCovarianceBetweenSysts(), cmf::CovarianceFitHelper::FillCovarianceMatrix(), ana::nueccinc::NueCCIncTemplateFitter::FillCovarianceMatrix(), ana::NumuCCIncPionTemplateFitter::FillCovarianceMatrix(), ana::NumuCCIncPionTemplateFitter::FillCovarianceMatrixExtra(), nueccinc_test::NueCCIncGlobalFitter::FillCovarianceMatrixFull(), nueccinc_test::NueCCIncGlobalFitter::FillCovarianceMatrixReduced(), genie::alvarezruso::ARSampledNucleus::FillDensities(), tdslicer::TDSlicer::FillDists(), cmf::CovarianceMatrixDecorrelator::FillHistFromMatrix(), FillHists(), hv::HoughVertexAlg::FillMaps(), fnex::CovarianceFitHelper::FillMCSpectrum(), caf::FillNumuInfo(), nueccinc_test::NueCCIncGlobalFitter::FillParameterCovariance(), sn::SupernovaAna::FillPlaneSeperations(), ana::PredictionInterp::ShiftedPreds::FillRemaps(), nueccinc_test::NueCCIncGlobalFitter::FillStatisticalCovarianceMatrixFull(), nueccinc_test::NueCCIncGlobalFitter::FillStatisticalCovarianceMatrixReduced(), ana::nueccinc::NueCCIncTemplateFitter::FillStatisticCovarianceMatrix(), ana::NumuCCIncPionTemplateFitter::FillStatisticCovarianceMatrix(), ana::FrequentistSurface::FillSurfacePoint(), novaddt::NuMuTrigger::filter(), novaddt::ActivityTrigger::filter(), novaddt::ActivityTriggerAna::filter(), comi::NumiFiltering::filter(), novaddt::ClusterConvert::filter(), novaddt::SlowMMTrigger::filter(), calib::MuondEdx::filter(), calib::DetRespDrift::filter(), showere::ShowerEnergyFilterMC::filter(), calib::MuonTrackHits::filter(), calib::MuondEdxAna::filter(), comi::FEBFlash::FilterFEBFlash(), util::FilterFEBFlash(), novaddt::ContainedSlice::filterForContainedHitLists(), novaddt::SingletonRejection::filterNoise(), earms::GridSearch::FindBestVtx(), beamlinereco::CFDHitFinder< T >::FindCFDHits(), dq::FlasherFinder::FindInstigators(), bpfit::Path::FindLayers(), beamlinereco::LEHitFinder< T >::FindLEHits(), lem::FindMatches(), lem::FindMatchesAlg::FindMatchesHeads(), slicer::PointManager::FindNeighbors(), airshower::AirSlicer::FindNeighbors(), FindNewDQRuns(), FindNewDQRunsND(), fuzz::FuzzyKVertex::FindOrphanedHits(), nerd::NERDProng::FindOrphanedHits(), beamlinereco::LEHitFinder< T >::FindRawHitLogic(), beamlinereco::CFDHitFinder< T >::FindRawHitLogic(), earms::ElasticArmsHS::FindSeed(), art::TriggerNamesService::findTrigPath(), fuzz::FuzzyKMeanAlg::FindUnclustered(), bpfit::DimuonFitter::FindVertexZ(), trk::KalmanTrackAna::FindVisibleProngs(), cheat::RecoCheckAna::FindVisibleProngs(), fuzz::FuzzyKValidate::FindVisibleProngs3D(), fuzz::FuzzyKVertex::FindVisibleProngs3D(), stan::math::finite_diff_hessian(), trk::RLFit::Fit(), bpfit::Lutz::Fit(), ana::MinuitFitter::FitHelperSeeded(), bpfit::BreakPoint::FitTracks(), trk::CosmicTrackAlg::FitView(), novaddt::TrackFit::FitView(), evd::SimulationDrawer::FLSHit2D(), evd::SimulationDrawer::FLSHit3D(), FOMPlot(), for(), cmf::CovarianceTools::FracCovToCov(), fragmentAngularDistribution(), fragmentAngularDistributionGM(), fragmentEnergyDistributionDifferentAngles(), fragmentYieldsPlot(), cosrej::CosRejFxs::FScatterEstim(), g4n::G4Alg::G4Alg(), stan::math::gaussian_dlm_obs_lpdf(), generate_fc_binlists(), stan::lang::write_array_visgen::generate_initialize_array(), stan::lang::init_local_var_visgen::generate_initialize_array(), genie::NNBarOscPrimaryVtxGenerator::GenerateDecayProducts(), genie_syst_make(), genie_syst_pca(), genie_syst_shifts(), genie_syst_universe(), genie::alvarezruso::ARWavefunction::get(), get_mass(), cet::sqlite::detail::get_result(), get_rms(), cosrej::CosRejFxs::getBBC(), geo::LiveGeometry::GetBCInfo(), evd::GeometryDrawer::GetBox(), evd::RecoBaseDrawer::GetClusterOutlines(), getColors(), nutools::dbi::Table::GetColsFromDB(), GetCommandLineArgs(), ana::NumuCCIncPionTemplateFitter::getCorrelationBetweenSysts(), ana::nueccinc::NueCCIncTemplateFitter::getCorrelationBetweenSysts(), nueccinc_test::NueCCIncGlobalFitter::getCorrelationMatrix(), nueccinc_test::NueCCIncGlobalFitter::getCorrelationMatrixReduced(), ana::NumuCCIncPionTemplateFitter::getCorrelationMatrixTemplateBins(), ana::nueccinc::NueCCIncTemplateFitter::getCorrelationMatrixTemplateBins(), ana::CovarianceMatrix::GetCorrelationMxTH2(), nueccinc_test::NueCCIncGlobalFitter::getCovarianceMatrix(), nueccinc_test::NueCCIncGlobalFitter::getCovarianceMatrixReduced(), ana::NumuCCIncPionTemplateFitter::getCovarianceMatrixTemplateBins(), ana::nueccinc::NueCCIncTemplateFitter::getCovarianceMatrixTemplateBins(), ana::CovarianceMatrix::GetCovMxAbsoluteTH2(), ana::CovarianceMatrix::GetCovMxAbsoluteWithStatsTH2(), ana::CovarianceMatrix::GetCovMxRelative(), ana::CovarianceMatrix::GetCovMxRelativeTH2(), ana::CovarianceMatrix::GetCovMxRelativeWithStats(), ana::CovarianceMatrix::GetCovMxRelativeWithStatsTH2(), GetCrossSection(), nuesand::FillNueSandbox::GetECF(), GetExtrap(), nueccinc_test::NueCCIncGlobalFitter::getFitParameterCorrelation(), nueccinc_test::NueCCIncGlobalFitter::getFitParameterCovariance(), ana::CovarianceMatrix::GetFullCorrelationMxTH2(), ana::CovarianceMatrix::GetFullCovMxTH2(), ana::AtmConstraint::GetGridMatrix(), novaddt::MoonShadow::GetHisto(), moonshadowana::MoonShadowAna::GetHisto(), moonshadowana::MoonShadowAnaHough::GetHisto(), airshower::AirSlicer::GetHoughAngles(), airshower::AirSlicer::GetHoughMap(), airshower::AirSlicer::GetHoughRhos(), genie::alvarezruso::AlvarezRusoCOHPiPDXSec::GetLeptonMass(), evd::SimulationDrawer::GetLimits(), nnbar::NNbarUtilities::getMultipleCellFraction(), om::HitMaps::GetNanoSliceSummary(), ana::Multiverse::GetNSigmaShift(), osc::OscCalculatorSterileBeam::GetParamsHash(), GetPartList_4DB(), tdslicer::TDSlicer::GetPtInfo(), gibuu::RecordLoader::GetRecord(), geo::LiveGeometry::GetRHInfo(), nova::database::Table::GetRowByColSet(), nova::database::Table::GetRowByPKey(), getStabilitySpectra(), osc::OscCalculatorSterile::GetState(), nueccinc_test::NueCCIncGlobalFitter::GetTemplateWeightsAndErrors(), evd::SimulationDrawer::GetTimeLimits(), getTimePeakPlots(), gov::fnal::cd::rms::util::UUIDGenerator::getUUIDHex(), evd::SimulationDrawer::GetVertexPoints(), genie::geometry::ROOTGeomAnalyzer::GetWeight(), nnbar::NNbarUtilities::getXyAsymmetry(), fuzz::FuzzyKValidate::GeVCalc(), goFNBasis(), goodness_of_fit(), stan::math::gp_dot_prod_cov(), stan::math::gp_periodic_cov(), stan::math::gp_periodic_cov_vari< T_x, T_sigma, T_l, T_p >::gp_periodic_cov_vari(), stan::math::gp_periodic_cov_vari< T_x, double, T_l, T_p >::gp_periodic_cov_vari(), stan::math::grad_hessian(), vdt::gsFCN(), genie::alvarezruso::AlvarezRusoCOHPiPDXSec::H(), om::IPC::HandleCurrentWatchListRequests(), DecTreeLoader::HandlePOT(), om::WatchListBox::HandleRemoveFromList(), heatMap(), stan::math::hessian(), cmf::CovarianceMatrixDecorrelator::HistToTMatrix(), om::HitMaps::HitMaps(), util::HoughCalc::HoughCalc(), remid::RecoMuon::Init(), daqdataformats::DCMSimulator::initFEBList(), genie::GRV98LO::Initialize(), cmf::CovarianceFitHelper::InitializeFitHelper(), genie::INukeHadroData2018::IntBounce(), genie::INukeHadroData::IntBounce(), stan::math::inverse(), nueccinc_test::NueCCIncGlobalFitter::InvertCovarianceMatrix(), dq::FlasherFinder::IsInstigator(), joint_fit_2017_fc_submit(), joint_fit_future_bestfit_univ(), joint_fit_future_contour_univ(), fuzz::FuzzyKMeanAlg::Jpfuz(), keras::KerasModel::KerasModel(), ana::kNue2017BasicPartFunc(), hough::IslandsTH2::LabelIslands(), genie::NievesQELCCPXSec::leviCivita(), levy_func_problem(), lin_solve(), util::LinFitTS(), stan::math::lkj_corr_cholesky_rng(), stan::math::lmgamma(), genie::NievesQELCCPXSec::LmunuAnumu(), nerd::NERDEval::load_anchors(), genie::flux::GNuMIFlux::LoadBeamSimData(), nutools::dbi::Table::LoadConditionsTable(), evd::MCTrueView::LoadEvent(), nova::dbi::RunHistory::LoadFEBMasksFromDAQDB(), nova::database::Table::LoadFromCSV(), nova::dbi::Table::LoadFromCSV(), nutools::dbi::Table::LoadFromCSV(), nova::database::Table::LoadFromDB(), nova::dbi::Table::LoadFromDB(), nutools::dbi::Table::LoadFromDB(), nova::database::Table::LoadFromSSV(), g4n::LoadNeutronFates(), nutools::dbi::Table::LoadNonConditionsTable(), nova::dbi::Table::LoadNonValidityTable(), fnex::ShifterAndWeighter::LoadNueSystHists(), nova::dbi::RunHistory::LoadPixelInfo(), genie::GiBUURESFormFactor::FormFactors::LoadTables(), nova::dbi::Table::LoadValidityTable(), readFlux::Loop(), lsqr_fprime(), lu_factorize(), main(), make1DsAndRatio(), make_angle_plot(), make_fc_mass_and_oct_nersc_2018(), make_fc_mass_and_oct_nersc_2019(), make_fc_mh_nersc_2018(), make_fc_mh_nersc_2019(), make_fc_nus_surfs_nersc_2019(), make_fc_oct_nersc_2018(), make_fc_oct_nersc_2019(), make_fc_slices_nersc_2018(), make_fc_slices_nersc_2018_stats(), make_fc_slices_nersc_2019(), make_fc_surfaces_2020(), make_fc_surfaces_2020_validation(), make_fc_surfaces_nersc_2018(), make_fc_surfaces_nersc_2018_stats(), make_fc_surfaces_nersc_2019(), stan::math::make_nu(), make_pi0_xcheck(), make_pid(), ana::make_simple_res_plot(), make_template(), make_UU_plot(), MakeAverageTrueEnergySurface(), genie::geometry::GeomVolSelectorFiducial::MakeBox(), dt::View::MakeChunkCombos(), nerd::NERDProng::MakeCluster(), nutools::dbi::Table::MakeConditionsCSVString(), MakeDQValidityCSV(), MakeDQValidityCSVND(), makeHWwatchlist(), osc::EarthModel::MakeLayers(), MakeNus17CosBkgd(), MakeNus18CosBkgd(), evtsum::EventSummary::MakeOutput(), makePlots(), MakePlots(), genie::geometry::GeomVolSelectorRockBox::MakeRockBox(), MakeSummaryTable(), MakeSurface(), MakeTestStandPlots_AllRuns(), MakeTestStandPlots_NewRuns(), om::HistoSet::MakeTH1FCopies(), om::HistoSet::MakeTH2FCopies(), airshower::AirSlicer::MakeTrackSlices(), nova::dbi::Table::MakeValidityCSVString(), makeXSecPlots2D(), makeXSecPlots_TemplateFit(), hough::Hough2P::Map(), hough::MultiHough2P::Map(), nova::dbi::RunHistory::MapHardwareToLocation(), lem::MatchableEvent::MatchableEvent(), fuzz::ViewMatchAlg::Matching(), nerd::ViewMatchAlg::Matching(), trk::KalmanTrackMerge::MatchTracks(), stan::io::reader< T >::matrix_lb(), stan::io::reader< T >::matrix_lb_constrain(), stan::io::writer< T >::matrix_lb_unconstrain(), stan::io::reader< T >::matrix_lub(), stan::io::reader< T >::matrix_lub_constrain(), stan::io::writer< T >::matrix_lub_unconstrain(), stan::io::reader< T >::matrix_ub(), stan::io::reader< T >::matrix_ub_constrain(), stan::io::writer< T >::matrix_ub_unconstrain(), stan::io::writer< T >::matrix_unconstrain(), genie::geometry::ROOTGeomAnalyzer::MaxPathLengthsBoxMethod(), genie::COHKinematicsGenerator::MaxXSec_BergerSehgal(), genie::COHKinematicsGenerator::MaxXSec_BergerSehgalFM(), genie::COHKinematicsGenerator::MaxXSec_ReinSehgal(), evd::MCTrueView::MCTrueView(), evd::SimulationDrawer::MCTruthShortText(), evd::SimulationDrawer::MCTruthTrajectoriesAnyD(), evd::SimulationDrawer::MCTruthVectors2D(), evd::SimulationDrawer::MCTruthVectors3D(), earms::ElasticArmsHS::MCVertex(), stan::math::mdivide_left(), stan::math::mdivide_left_ldlt(), stan::math::mdivide_left_spd(), stan::math::mdivide_left_tri(), stan::math::mdivide_left_tri_low(), stan::math::mdivide_right(), stan::math::mdivide_right_tri_low(), mec_tuning(), mec_tuning_fitter_2020(), median_contours(), fuzz::FuzzyKMeanAlg::MergeClusters(), om::MicroErrors::MicroErrors(), keras::missing_activation_impl(), nerd::NERDEval::mold_input(), osc::_PMNS< T >::Multi(), stan::math::multi_normal_cholesky_lpdf(), stan::math::multi_normal_lpdf(), stan::math::multi_normal_prec_lpdf(), stan::math::multi_student_t_lpdf(), stan::math::multiply(), stan::math::multiply_lower_tri_self_transpose(), myBarChart(), nueccinc_test::NueCCIncGlobalFitter::myFunction(), ana::NumuCCIncPionTemplateFitter::myFunction2Vars(), ana::nueccinc::NueCCIncTemplateFitter::myFunction2Vars(), ana::nueccinc::NueCCIncTemplateFitter::myFunction3Vars(), ana::NumuCCIncPionTemplateFitter::myFunction3Vars(), genie::alvarezruso::ARSampledNucleus::N(), om::NanoErrors::NanoErrors(), slicer::Slicer::NeighborSlice(), NewNearlinePlots(), evgen::NuMISpillTimeStructure::NewSpill(), hough::IslandsTH2::Nislands(), nova::dbi::RunHistory::NLiveDCMs(), NormalizeHists(), nue_background_decomposition(), nue_cafvsfnex_cosmics(), nuebar_signif(), nueccinc_test::NueCCIncGlobalFitter::NueCCIncGlobalFitter(), nuint09_1pi3(), nuint09_coh3(), nuint09_qel4(), nuint09_qel5(), bpfit::Lutz::NullResult(), OnMonAnaHistos(), OnMonAnaHistosFEB_IssueRates(), OnMonAnaHistosPIX(), OnMonPlotMaker(), stan::math::internal::map_rect_reduce< F, var, var >::operator()(), genie::alvarezruso::ARWavefunction::operator()(), stan::math::internal::map_rect_reduce< F, double, var >::operator()(), stan::math::internal::map_rect_combine< F, T_shared_param, T_job_param >::operator()(), stan::test::unit::instrumented_writer::operator()(), stan::math::internal::map_rect_reduce< F, var, double >::operator()(), stan::math::coupled_ode_system< F, double, var >::operator()(), stan::lang::expression_visgen::operator()(), stan::math::coupled_ode_system< F, var, double >::operator()(), stan::math::coupled_ode_system< F, var, var >::operator()(), stan::lang::data_only_expression::operator()(), operator*(), nova::database::operator<<(), nutools::dbi::operator<<(), nova::dbi::operator<<(), air::AirKalmanAna::OppSignTrkCount(), stan::math::ordered_logistic_rng(), stan::math::ordered_probit_rng(), ana::OverlayCutFromNuTruthCut(), osc::OscCalculatorPMNS_CPT::P(), osc::OscCalculatorPMNS_NSI::P(), osc::_OscCalculatorPMNS< T >::P(), osc::_OscCalculatorPMNSOpt< T >::P(), osc::OscCalculatorSterile::P(), evdb::ParameterSetEditFrame::ParameterSetEditFrame(), evd::PlotView::Parse(), ParseFluxFileConfig(), partial_pivot(), PeripheralCuts(), permute(), slid::ParticleIDAlg::Pi0Mass(), genie::HAIntranuke::PiBounce(), genie::HAIntranuke2018::PiBounce(), plot(), plot_abstree(), plot_diff(), plot_input_data(), plot_multiplicity_prob(), plot_nd_spectra_2018(), plot_pi0_xcheck(), plot_pid(), plot_residPerPlane(), plot_residPerViewV(), plot_residPerViewZ(), plot_timing_resolution(), plotapdhv(), PlotGenRatios(), PlotSignalBackground(), plotTime(), Plotting_DataAndPrediction(), genie::HAIntranuke::PnBounce(), genie::HAIntranuke2018::PnBounce(), novaddt::UpMuAna::populateFLSmap(), geo::LiveGeometry::postBeginSubRun(), pots(), ppfx_smooth_weights_make(), tensorflow::TensorflowHandler::Predict(), genie::utils::intranuke::PreEquilibrium(), genie::utils::intranuke2018::PreEquilibrium(), slicer::PointManager::PreparekDistInfo(), tdslicer::TDSlicer::Prims(), genie::alvarezruso::ARWavefunction::print(), print_decay_channels(), stan::lang::print_signature(), daqdataformats::RawDAQData::printBuffer(), nova::dbi::RunHistory::PrintChanInfo(), nova::database::Table::PrintColumns(), nutools::dbi::Table::PrintColumns(), nova::dbi::Table::PrintColumns(), novaddt::RemoveOneDSlices::printDDTSlice(), novaddt::RemoveSpatialNoise::printDDTSlice(), novaddt::ContainedSlice::printDDTSlices(), PrintErrorSurface(), osc::OscCalculatorPMNSOptEigen::PrintMatrixAddresses(), evdb::PrintDialog::PrintToFile(), vf::VertexFinder::produce(), filter::TruthFilter::produce(), slicer::Slicer4D::produce(), trk::KalmanTrackMerge::produce(), MergeG4Collections::MergeG4Collections::produce(), MergeCollections::MergeCollections::produce(), novaddt::TrackFit::produce(), jmshower::JMTrackMerge::produce(), numusand::FillSandbox::produce(), slid::SliceLIDBuilder::produce(), cvn::CVNCosmicMapper::produce(), calib::FiberCalibration::produce(), zcl::SPCluster::produce(), g4n::TruthSlim::produce(), cosrej::CosRej::produce(), airshower::AirSlicer::produce(), earms::ElasticArmsHS::produce(), calib::TimingCalibration::produce(), comi::Cana::produce(), sn::SNSlicer::produce(), vdt::VertexDT::produce(), lem::LEM::produce(), cvntf::CVNProngEvaluatorTF::produce(), crvtx::CosmicRayVertex::produce(), xnue::XnuePID::produce(), cvn::RegCVNMapper::produce(), jmshower::NueSelLID::produce(), cheat::MCCheater::produce(), slicemergeviews::SliceMergeViews::produce(), tdslicer::TDSlicer::produce(), ProducingSA(), cvn::ProngSummary::ProngSummary(), osc::PMNS_Sterile::PropMatter(), osc::_PMNSOpt< T >::PropMatter(), osc::_PMNS< T >::PropMatter(), osc::_PMNSOpt< T >::PropVacuum(), osc::_PMNS< T >::PropVacuum(), stan::math::qr_R(), stan::math::qr_thin_R(), stan::math::quad_form_diag(), genie::alvarezruso::ARSampledNucleus::Radius(), lem::dec::Forest::RandomOrthoMatrix(), read_eventlisttress_missingruns(), read_eventlisttress_runs_subruns(), Rebin(), reco_minus_true_panels(), jmshower::RecoJMShower::RecoShowers(), ana::PredictionExtendToPeripheral::ReduceHelper(), ana::PredictionExtendToPeripheral::ReduceHelperNC(), novaddt::DBSlicer::regionQuery(), ana::TrivialCrossSectionAnalysis::RelativeUncertainty(), murem::MuonRemove::RemoveByProngCVN(), nova::database::Table::RemoveDistinctColumn(), nova::dbi::Table::RemoveDistinctColumn(), nutools::dbi::Table::RemoveDistinctColumn(), trk::KalmanTrack::RemoveHitsFromSignal(), nova::database::Table::RemoveOrderColumn(), nova::dbi::Table::RemoveOrderColumn(), nutools::dbi::Table::RemoveOrderColumn(), nova::database::Table::RemoveRow(), nova::dbi::Table::RemoveRow(), nutools::dbi::Table::RemoveRow(), util::HoughCalc::Reset(), osc::_PMNS< T >::Reset(), hough::MultiHough2P::ReweightHits(), genie::alvarezruso::integrationtools::RG201D(), genie::alvarezruso::integrationtools::RG202D(), genie::alvarezruso::integrationtools::RG481D(), genie::alvarezruso::integrationtools::RG482D(), calib::RockMuonStopperSelection::RockMuonStopperSelection(), rootgINukeVal(), osc::PMNS_Sterile::RotateH(), stan::math::rows_dot_product(), run_evgen_test(), nerd::NERDEval::run_graph(), RunCalibration(), RunFitter(), stan::model::rvalue(), evgen::SingleGen::Sample(), SaveDataToRootFile(), SaveToPsFile(), SaveToRootFile(), stan::io::dump_reader::scan_chars(), stan::io::dump_reader::scan_number(), hough::MultiHoughT::Scrub(), earms::ElasticArmsHS::Scrub(), vdt::VertexDT::Scrub(), fuzz::FuzzyKVertex::Scrub(), nueccinc_test::NueCCIncGlobalFitter::searchFitInfo(), fuzz::FuzzyKMeanAlg::SeedA(), novaddt::TrackFit::SeedWeights(), trk::RLFit::SeedWeights(), stan::math::segment(), sensitivity_plot(), genie::alvarezruso::ARWavefunction::set(), stan::mcmc::base_hmc< Model, diag_e_metric, expl_leapfrog, BaseRNG >::set_stepsize_jitter(), osc::PMNS_Sterile::SetAngle(), ana::CovarianceMatrix::SetBinning(), caldp::DCMSummary::SetDCMOffsetCountIndx(), caldp::DCMSummary::SetDCMOffsetSumIndx(), caldp::DCMSummary::SetDCMOffsetSumSquareIndx(), genie::utils::style::SetDefaultStyle(), osc::PMNS_Sterile::SetDelta(), osc::_PMNS< T >::SetDeltaMsqrs(), SetErrors(), evgen::IsoGen::setInSurfID(), genie::geometry::GeomVolSelectorRockBox::SetMinimumWall(), osc::_PMNS< T >::SetMix(), osc::_PMNS< T >::SetMixBWCP(), osc::OscCalculatorSterile::SetRho(), genie::geometry::GeomVolSelectorRockBox::SetRockBoxInclusion(), genie::geometry::GeomVolSelectorRockBox::SetRockBoxMinimal(), bpfit::Lutz::SetScatteringPlane(), osc::OscCalculatorSterile::SetState(), cmf::CovarianceMatrixDecorrelator::SetTemplateMatrix(), evdb::ParameterSetEditRow::SetupListBox(), geo::LiveGeometry::SetupLiveGeo(), genie::alvarezruso::integrationtools::SG20R(), genie::alvarezruso::integrationtools::SG48R(), sg_coeff(), sha1_forRMS_hmac(), keras::DataChunk2D::show_values(), novaddt::DDTTrackMerge::simpleMerge(), novaddt::Merge2DTracks::simpleMerge(), slicer_production_validation(), comi::FEBFlash::SliceStatistics(), bpf::SliceSummary::SliceSummary(), hough::Hough2P::SmoothMap(), hough::MultiHough2P::SmoothMap(), osc::PMNS_NSI::SolveHam(), osc::PMNS_Sterile::SolveHam(), osc::_PMNSOpt< T >::SolveHam(), genie::alvarezruso::AlvarezRusoCOHPiPDXSec::SolveWavefunctions(), osc::_PMNS< T >::SortEigenvalues(), Spec2DtoHist(), specprod_numuccinc(), dt::DiscreteTracker::SpliceChains(), SplitFakeData(), stan::math::stan_print(), calib::StopperSelection::StopperSelection(), om::FEBRateAnalysis::StoreContent(), SuppressND(), genie::GHepRecord::SwapParticles(), ana::SystConcat::SystConcat(), systematics_extrap_comp_from_pred_interp(), systematics_summary_from_pred_interp(), ana::systsQ3Q0(), nova::dbi::Table::Table(), airshower::AirSlicer::TemporalClusters(), nnbar::NNbarUtilities::temporalExpand(), TEST(), TEST_F(), geo::GeometryTest::testCellPos(), testfom(), calib::ThroughgoingSelection::ThroughgoingSelection(), util::TimeSlice(), stan::math::to_array_1d(), stan::math::to_array_2d(), stan::math::to_fvar(), stan::math::to_matrix(), stan::math::to_var(), ana::TrivialCrossSectionAnalysis::TotalErrors(), nnbar::NNbarUtilities::totalVisibleEnergyInView(), ana::GenieMultiverseSpectra::ToTH2(), ana::Spectrum::ToTH2NormX(), om::TQPlots::TQPlots(), geo::CoordinateTransformation::transformBeamToDetectorCoordinates(), geo::CoordinateTransformation::transformDetectorToBeamCoordinates(), transpose(), TrimGraph(), slicemergeviews::SliceMergeViews::TrimNoise(), tdslicer::TDSlicer::TrimNoise(), novaddt::Merge2DTracks::twoViewMerge(), ana::MultiverseCorrelation::Unifyinghists(), evgen::GFlavorOsc::UnityProbMatrix(), evdb::ParameterSetEditRow::UnpackParameter(), stan::mcmc::softabs_metric< Model, BaseRNG >::update_metric_gradient(), om::PlotViewer::UpdateCompare(), om::FEBRatesByDiblock::UpdateRatePlots(), uptime(), om::HistoSet::UTCResetTH2F(), ValidateDBMasks(), Validation(), validationscript(), stan::math::value_of(), stan::math::value_of_rec(), cvnprongtf::CVNProngTF::vector_to_tensor(), dq::FlasherFinder::Veto(), zcl::FmmTrackerValidation::vfit(), zcl::FmmTrackerAna::vfit(), evdb::WindowMenu::WindowMenu(), stan::math::wishart_rng(), stan::mcmc::dense_e_point::write_metric(), novaddt::DDTEvd::WriteHitListInfo(), moonshadowana::MoonShadowAna::WriteHitListInfo(), moonshadowana::MoonShadowAnaHough::WriteHitListInfo(), cmf::CovarianceMatrixMaker::writeResults(), fnex::CovarianceMatrixMaker::writeResults(), cmf::CovarianceMatrixDecorrelator::writeResults(), nova::dbi::Table::WriteToCSV(), nutools::dbi::Table::WriteToCSV(), nova::database::Table::WriteToDB(), nova::dbi::Table::WriteToDB(), nutools::dbi::Table::WriteToDB(), bpfit::Lutz::X(), zheevh3(), zhetrd3(), ana::BeamSystOrWeightBase::~BeamSystOrWeightBase(), ana::FixGibuuWeight::~FixGibuuWeight(), genie::GiBUURESFormFactor::FormFactors::~FormFactors(), ana::GeniePCASyst::~GeniePCASyst(), and ana::NumuSummedSmallGENIESyst::~NumuSummedSmallGENIESyst().

const double calib::K = 0.307075

Definition at line 28 of file BetheBloch.cxx.

const int calib::kChunk = 2000
const unsigned int calib::kNumFineTimingADCPoints = 4

Definition at line 45 of file ADCShapeFit.cxx.

Referenced by ADCShapeFit(), GetExpectations(), and calib::ADCShapeFitTable::TNS().

const int calib::kOffsetStep = 16

Definition at line 53 of file ADCShapeFit.cxx.

Referenced by GetExpectations().

const double calib::kSamplesPerOffset = 1./(256*64)

Definition at line 54 of file ADCShapeFit.cxx.

Referenced by ADCShapeFit().

int calib::kStatsLimit = 1
const double calib::kZeroOffsetSamples = -1

Definition at line 50 of file ADCShapeFit.cxx.

Referenced by ADCShapeFit(), and calib::ADCShapeFitTable::TNS().

const double calib::Me = 510.998910e3

Definition at line 25 of file BetheBloch.cxx.

const double calib::Mmu = 105.658367e6

Definition at line 26 of file BetheBloch.cxx.

Referenced by calib::BetheBlochAnalytic::BetaGamma().

const double calib::sCmPerNsec = 29.9792458
static
const double calib::sCmPerNsec = 29.9792458
static

Definition at line 141 of file TimingCalibration_module.cc.