Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
slicer::S4DParamCalc Class Reference
Inheritance diagram for slicer::S4DParamCalc:
art::EDAnalyzer art::EventObserverBase art::Consumer art::EngineCreator

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 S4DParamCalc (fhicl::ParameterSet const &pset)
 
 ~S4DParamCalc ()
 
void analyze (const art::Event &evt)
 
void reconfigure (const fhicl::ParameterSet &pset)
 
void beginJob ()
 
std::string workerType () const
 
bool modifiesEvent () const
 
void registerProducts (MasterProductRegistry &, ProductDescriptions &, ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const
 
bool wantEvent (Event const &e)
 
fhicl::ParameterSetID selectorConfig () const
 
art::Handle< art::TriggerResultsgetTriggerResults (Event const &e) const
 
template<typename T , BranchType = InEvent>
ProductToken< Tconsumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< Tconsumes (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TconsumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< TmayConsume (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TmayConsumeView (InputTag const &it)
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 
seed_t get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
 

Static Public Member Functions

static cet::exempt_ptr< Consumernon_module_context ()
 

Protected Member Functions

CurrentProcessingContext const * currentContext () const
 
detail::CachedProducts & cachedProducts ()
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

Private Attributes

std::string fCellHitLabel
 
std::string fSlicerLabel
 
bool fMakeKDistPlots
 
double fEpsilon
 Minimum causal separation value. More...
 
unsigned int fMinPts
 minimum number of casual neighbors for a hit to be in a cluster More...
 
bool fUseLowPEPen
 Add a causal distance penalty for PE (low PE is INCREASES the distance) More...
 
double fPEPen
 PE value for which the low PE penalty will be 1. More...
 
double fDistPen
 Distance (in cm) for which the distance penalty will be 1 (roughly one strong interaction length.) More...
 
double fOpVPlPen
 Allowed plane gap for hits in opposite views for which the distance penalty will be 1. More...
 
PointManager fPtMan
 
TH1F * fPEnoise
 
TH1F * fPEphys
 
TH1F * fDeltaT0
 
TH1F * fDeltaT1
 
TH1F * fDeltaX0
 
TH1F * fDeltaX1
 
TH1F * fDeltaY0
 
TH1F * fDeltaY1
 
TH1F * fDeltaZ0
 
TH1F * fDeltaZ1
 
TH1F * fDeltaP0
 
TH1F * fDeltaP1
 
TH1F * fAveTClose
 
TH1F * fAveDClose
 
TH1F * fAvePClose
 
TH1F * fTClose3
 
TH1F * fDClose3
 
TH1F * fPClose3
 
TH1F * fTClose4
 
TH1F * fDClose4
 
TH1F * fPClose4
 
TH1F * fTClose5
 
TH1F * fDClose5
 
TH1F * fPClose5
 
TH1F * fTres
 
TH1F * fTresNoise
 

Detailed Description

Definition at line 41 of file S4DParamCalc_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

slicer::S4DParamCalc::S4DParamCalc ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 109 of file S4DParamCalc_module.cc.

References fDistPen, fEpsilon, fOpVPlPen, fPEPen, fPtMan, fUseLowPEPen, slicer::PointManager::Initalize(), and reconfigure().

110  : EDAnalyzer(pset)
111  {
112  this->reconfigure(pset);
114  }
double fOpVPlPen
Allowed plane gap for hits in opposite views for which the distance penalty will be 1...
bool fUseLowPEPen
Add a causal distance penalty for PE (low PE is INCREASES the distance)
void Initalize(double eps, double pepen, double distpen, double opvplpen, bool usepepen)
double fDistPen
Distance (in cm) for which the distance penalty will be 1 (roughly one strong interaction length...
double fEpsilon
Minimum causal separation value.
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
void reconfigure(const fhicl::ParameterSet &pset)
double fPEPen
PE value for which the low PE penalty will be 1.
slicer::S4DParamCalc::~S4DParamCalc ( )

Definition at line 117 of file S4DParamCalc_module.cc.

118  { }

Member Function Documentation

void slicer::S4DParamCalc::analyze ( const art::Event evt)

Definition at line 224 of file S4DParamCalc_module.cc.

References a, abs(), slicer::PointManager::AddHit(), rb::CellHit::Cell(), DEFINE_ART_MODULE(), dist, febshutoff_auto::end, stan::math::fabs(), fAveDClose, fAvePClose, fAveTClose, fCellHitLabel, fDClose3, fDClose4, fDClose5, fDeltaP0, fDeltaP1, fDeltaT0, fDeltaT1, fDeltaX0, fDeltaX1, fDeltaY0, fDeltaY1, fDeltaZ0, fDeltaZ1, fMakeKDistPlots, fPClose3, fPClose4, fPClose5, fPEnoise, fPEphys, fPtMan, fSlicerLabel, fTClose3, fTClose4, fTClose5, fTres, fTresNoise, geom(), art::DataViewImpl::getByLabel(), geo::CellGeo::GetCenter(), calib::Calibrator::GetTimeRes(), hi(), MECModelEnuComparisons::i, makeTrainCVSamples::int, ip, calib::j, slicer::PointManager::kDist(), geo::kX, geo::kY, art::TFileDirectory::make(), P, rb::CellHit::PE(), rb::CellHit::Plane(), geo::GeometryBase::Plane(), slicer::PointManager::PreparekDistInfo(), slicer::PointManager::Reset(), std::sqrt(), T, APDHVSetting::temp, rb::CellHit::TNS(), rb::CellHit::View(), and geo::PlaneGeo::View().

225  {
226  // std::cout << "\n\n====================\nBegin processing for event: "
227  // << evt.id() << "\n";
228 
229  // declare geometry service handle
232 
233  // get the CellHits
235  evt.getByLabel(fCellHitLabel, hitcol);
236 
237  std::vector<art::Ptr<rb::CellHit > > hitlist;
238  for(unsigned int i = 0; i < hitcol->size(); ++i){
239  art::Ptr<rb::CellHit> hit(hitcol, i);
240  hitlist.push_back(hit);
241  }
242 
243  // get the Slices
245  evt.getByLabel(fSlicerLabel, slices);
246 
247  // Set the PointManager for this event. (Use false for skipping the
248  // delta T calculation since we want the correct distances for all of
249  // the noise hits.)
250  fPtMan.Reset(hitcol->size(), false);
251 
252  // General Plan:
253  //
254  // loop over all slices, get all hits in the slice
255  // loop over all hits
256  // - add hit to PtMan
257  // - add PE to noise or phys histo
258 
259  // std::cout << "\nMaking PE plots...";
260 
261  for(unsigned int sli = 0; sli < slices->size(); ++sli) {
262  if((*slices)[sli].IsNoise()) {
263  for(unsigned int hiti = 0; hiti < (*slices)[sli].NCell(); ++hiti) {
264  const rb::CellHit* hit = (*slices)[sli].Cell(hiti).get();
265  fPtMan.AddHit(hit->TNS(), cal->GetTimeRes(*hit),
266  hit->Plane(), hit->Cell(),
267  hit->PE(), hit->View());
268  fPEnoise->Fill(hit->PE());
269  fTresNoise->Fill(cal->GetTimeRes(*hit));
270  }
271  }
272  else {
273  for(unsigned int hiti = 0; hiti < (*slices)[sli].NCell(); ++hiti) {
274  const rb::CellHit* hit = (*slices)[sli].Cell(hiti).get();
275  fPtMan.AddHit(hit->TNS(), cal->GetTimeRes(*hit),
276  hit->Plane(), hit->Cell(),
277  hit->PE(), hit->View());
278  fPEphys->Fill(hit->PE());
279  fTres->Fill(cal->GetTimeRes(*hit));
280  }
281  }
282  }
283 
284 
285 
286  // std::cout << "\t(done)\nMaking timing/spatial resolution plots...";
287 
288  //
289  // Make plots form pairs of hits in the same non-noise slice
290  //
291 
292  // define number of neighbors to keep track of
293  unsigned int Nn = 5;
294 
295  for(unsigned int sli = 0; sli < slices->size(); ++sli) {
296  if((*slices)[sli].IsNoise()) continue;
297 
298  std::vector< std::vector< double > > D;
299  std::vector< std::vector< double > > P;
300  std::vector< std::vector< double > > T;
301  for(unsigned int i = 0; i < (*slices)[sli].NCell(); ++i) {
302  std::vector< double > temp;
303  for(unsigned int j = 0; j < Nn; ++j) temp.push_back(1.0e6);
304  D.push_back(temp);
305  P.push_back(temp);
306  T.push_back(temp);
307  }
308 
309  for(unsigned int hi = 0; hi < (*slices)[sli].NCell(); ++hi) {
310  const rb::CellHit* hiti = (*slices)[sli].Cell(hi).get();
311  for(unsigned int hj = 0; hj < (*slices)[sli].NCell(); ++hj) {
312  if(hi == hj) continue;
313  const rb::CellHit* hitj = (*slices)[sli].Cell(hj).get();
314 
315  // compute delta Time
316  T[hi].push_back(fabs(hiti->TNS()-hitj->TNS()));
317  std::sort(T[hi].begin(),T[hi].end());
318  T[hi].resize(Nn);
319 
320  // if same view, compute 2D Distance
321  if(hiti->View() == hitj->View()) {
322 
323  // get xyz info about i-th hit
324  unsigned int iplane = hiti->Plane();
325  unsigned int icell = hiti->Cell();
326  const geo::PlaneGeo* ip = geom->Plane(iplane);
327  const geo::CellGeo* ic = ip-> Cell (icell);
328  double ixyz[3];
329  ic->GetCenter(ixyz);
330  double iz = ixyz[2];
331  double ixy = 0.0;
332  if (ip->View()==geo::kX) ixy = ixyz[0];
333  if (ip->View()==geo::kY) ixy = ixyz[1];
334 
335  // get xyz info about j-th hit
336  unsigned int jplane = hitj->Plane();
337  unsigned int jcell = hitj->Cell();
338  const geo::PlaneGeo* jp = geom->Plane(jplane);
339  const geo::CellGeo* jc = jp-> Cell (jcell);
340  double jxyz[3];
341  jc->GetCenter(jxyz);
342  double jz = jxyz[2];
343  double jxy = 0.0;
344  if (jp->View()==geo::kX) jxy = jxyz[0];
345  if (jp->View()==geo::kY) jxy = jxyz[1];
346 
347  double dist = sqrt((iz-jz)*(iz-jz) + (ixy-jxy)*(ixy-jxy));
348  D[hi].push_back(dist);
349  std::sort(D[hi].begin(),D[hi].end());
350  D[hi].resize(Nn);
351 
352  }
353 
354  // if opposite view, compute delta Plane
355  if(hiti->View() != hitj->View()) {
356  P[hi].push_back(abs((int)hiti->Plane()-(int)hitj->Plane()));
357  std::sort(P[hi].begin(),P[hi].end());
358  P[hi].resize(Nn);
359  }
360 
361  } // end loop over hits (hj)
362 
363  double Tave = 0.0;
364  int Tn = 0;
365  std::vector<double> Ttemp = T[hi];
366  double Dave = 0.0;
367  int Dn = 0;
368  std::vector<double> Dtemp = D[hi];
369  double Pave = 0.0;
370  int Pn = 0;
371  std::vector<double> Ptemp = P[hi];
372  for(unsigned int a = 0; a < Nn; ++a) {
373  if(Ttemp[a] < 1.0e6) {
374  Tave += Ttemp[a];
375  Tn++;
376  }
377  if(Dtemp[a] < 1.0e6) {
378  Dave += Dtemp[a];
379  Dn++;
380  }
381  if(Ptemp[a] < 1.0e6) {
382  Pave += Ptemp[a];
383  Pn++;
384  }
385  } // end loop over a
386  if(Tn > 0) Tave = Tave/(double)Tn;
387  else Tave = -1.0;
388  if(Dn > 0) Dave = Dave/(double)Dn;
389  else Dave = -1.0;
390  if(Pn > 0) Pave = Pave/(double)Pn;
391  else Pave = -1.0;
392 
393  fAveTClose->Fill(Tave);
394  fAveDClose->Fill(Dave);
395  fAvePClose->Fill(Pave);
396 
397  fTClose3->Fill(Ttemp[2]);
398  fDClose3->Fill(Dtemp[2]);
399  fPClose3->Fill(Ptemp[2]);
400 
401  fTClose4->Fill(Ttemp[3]);
402  fDClose4->Fill(Dtemp[3]);
403  fPClose4->Fill(Ptemp[3]);
404 
405  fTClose5->Fill(Ttemp[4]);
406  fDClose5->Fill(Dtemp[4]);
407  fPClose5->Fill(Ptemp[4]);
408 
409  } // end loop over hits (hi)
410  } // end loop over (slices sli)
411 
412 
413  //
414  // Make plots from ALL pairs of hits
415  //
416 
417  // use i+1 < fNhits to protect against the case where fNhits = 0
418  for(unsigned int i = 0; i+1 < hitlist.size(); ++i) {
419 
420  // get xyz info about i-th hit
421  unsigned int iplane = hitlist[i]->Plane();
422  unsigned int icell = hitlist[i]->Cell();
423  const geo::PlaneGeo* ip = geom->Plane(iplane);
424  const geo::CellGeo* ic = ip-> Cell (icell);
425  double ixyz[3];
426  ic->GetCenter(ixyz);
427  double iz = ixyz[2];
428  double ixy = 0.0;
429  if (ip->View()==geo::kX) ixy = ixyz[0];
430  if (ip->View()==geo::kY) ixy = ixyz[1];
431 
432  for(unsigned int j = i+1; j < hitlist.size(); ++j) {
433 
434  // get xyz info about j-th hit
435  unsigned int jplane = hitlist[j]->Plane();
436  unsigned int jcell = hitlist[j]->Cell();
437  const geo::PlaneGeo* jp = geom->Plane(jplane);
438  const geo::CellGeo* jc = jp-> Cell (jcell);
439  double jxyz[3];
440  jc->GetCenter(jxyz);
441  double jz = jxyz[2];
442  double jxy = 0.0;
443  if (jp->View()==geo::kX) jxy = jxyz[0];
444  if (jp->View()==geo::kY) jxy = jxyz[1];
445 
446  //
447  // Make delta-TXYZ plots...
448  //
449  double dt = hitlist[i]->TNS()-hitlist[j]->TNS();
450  int dp = (int)hitlist[i]->Plane()-(int)hitlist[j]->Plane();
451 
452  fDeltaT0->Fill(dt);
453  if(abs(dp) <= 10) fDeltaT1->Fill(dt);
454 
455  // same view X
456  if(ip->View() == geo::kX && jp->View() == geo::kX) {
457  fDeltaX0->Fill(ixy-jxy);
458  fDeltaZ0->Fill(iz-jz);
459  if(fabs(dt) <= 1000.0) {
460  fDeltaX1->Fill(ixy-jxy);
461  fDeltaZ1->Fill(iz-jz);
462  }
463  }
464 
465  // same view Y
466  if(ip->View() == geo::kY && jp->View() == geo::kY) {
467  fDeltaY0->Fill(ixy-jxy);
468  fDeltaZ0->Fill(iz-jz);
469  if(fabs(dt) <= 1000.0) {
470  fDeltaY1->Fill(ixy-jxy);
471  fDeltaZ1->Fill(iz-jz);
472  }
473  }
474 
475  // opposite views
476  if(ip->View() != jp->View()) {
477  fDeltaP0->Fill(dp);
478  if(fabs(dt) <= 1000.0) {
479  fDeltaP1->Fill(dp);
480  }
481  }
482 
483  }
484  }
485 
486 
487  // std::cout << "\t(done)\n";
488 
489  if(fMakeKDistPlots) {
490 
491  // std::cout << "Preparing k-Dist information...";
492 
493  // have PtMan initialize what it needs to do the k-dist calculations
494  // loop over all hits
495  // - get the k-dist values for k = 2 to 7 and fill std::vectors of doubles
496  // - sort each vector and fill the histo
497  // - MAKE SURE THESE HISTOS ARE WRITTEN AND RESET PER EVENT!!!!!
498 
499  TH1F *f2dist = new TH1F("f2dist","2-dist for all hits",20001,-0.5,20000.5);
500  TH1F *f3dist = new TH1F("f3dist","3-dist for all hits",20001,-0.5,20000.5);
501  TH1F *f4dist = new TH1F("f4dist","4-dist for all hits",20001,-0.5,20000.5);
502  TH1F *f5dist = new TH1F("f5dist","5-dist for all hits",20001,-0.5,20000.5);
503 
505 
506  // std::cout << "\t(done)\n";
507 
508  for(unsigned int k = 2; k <= 5; ++k) {
509  // std::cout << "Filling kDist plots for k = " << k << "...";
510  double kdist[hitcol->size()];
511  for(unsigned int i = 0; i < hitcol->size(); ++i) {
512  kdist[i] = fPtMan.kDist(k,i);
513  } // end for i
514 
515  // sort kdist
516  bool done = false;
517  while(!done) {
518  done = true;
519  for(unsigned int j = 1; j < hitcol->size(); ++j) {
520  if(kdist[j-1] < kdist[j]) {
521  double temp = kdist[j];
522  kdist[j] = kdist[j-1];
523  kdist[j-1] = temp;
524  done = false;
525  } // end if
526  } // end for j
527  } // end while !done
528 
529  if(k == 2) {
530  for(unsigned int i = 0; i < hitcol->size(); ++i) {
531  f2dist->Fill(i,kdist[i]);
532  } // end for i
533  }
534  if(k == 3) {
535  for(unsigned int i = 0; i < hitcol->size(); ++i) {
536  f3dist->Fill(i,kdist[i]);
537  } // end for i
538  }
539  if(k == 4) {
540  for(unsigned int i = 0; i < hitcol->size(); ++i) {
541  f4dist->Fill(i,kdist[i]);
542  } // end for i
543  }
544  if(k == 5) {
545  for(unsigned int i = 0; i < hitcol->size(); ++i) {
546  f5dist->Fill(i,kdist[i]);
547  } // end for i
548  }
549  // std::cout << "\t(done)\n";
550  } // end for k
551 
553  tfs->make<TH1F>(*f2dist);
554  tfs->make<TH1F>(*f3dist);
555  tfs->make<TH1F>(*f4dist);
556  tfs->make<TH1F>(*f5dist);
557 
558  // std::cout << "\n\n====================\nFinished processing.\n\n";
559 
560  if(f2dist) { delete f2dist; f2dist = 0; }
561  if(f3dist) { delete f3dist; f3dist = 0; }
562  if(f4dist) { delete f4dist; f4dist = 0; }
563  if(f5dist) { delete f5dist; f5dist = 0; }
564 
565  } // end if{fMakeKDistPlots)
566 
567  // std::cout << "\n\n";
568 
569  return;
570  }
float TNS() const
Definition: CellHit.h:46
double GetTimeRes(rb::CellHit const &cellhit)
void GetCenter(double *xyz, double localz=0.0) const
Definition: CellGeo.cxx:159
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
unsigned short Plane() const
Definition: CellHit.h:39
geo::View_t View() const
Definition: CellHit.h:41
T sqrt(T number)
Definition: d0nt_math.hpp:156
void Reset(unsigned int n, bool skip=true)
Vertical planes which measure X.
Definition: PlaneGeo.h:28
void PreparekDistInfo(unsigned int kmax)
void abs(TH1 *hist)
TString ip
Definition: loadincs.C:5
const PlaneGeo * Plane(unsigned int i) const
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
double dist
Definition: runWimpSim.h:113
#define P(a, b, c, d, e, x)
unsigned short Cell() const
Definition: CellHit.h:40
Definition: Cand.cxx:23
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:53
TSpline3 hi("hi", xhi, yhi, 18,"0")
const double a
Geometry information for a single readout plane.
Definition: PlaneGeo.h:36
float PE() const
Definition: CellHit.h:42
const double j
Definition: BetheBloch.cxx:29
void AddHit(double t, double tres, unsigned int p, unsigned int c, double pe, geo::View_t v)
A rawdata::RawDigit with channel information decoded.
Definition: CellHit.h:27
T * make(ARGS...args) const
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
Definition: structs.h:12
void geom(int which=0)
Definition: geom.C:163
double T
Definition: Xdiff_gwt.C:5
Encapsulate the cell geometry.
Definition: CellGeo.h:25
double kDist(unsigned int k, unsigned int pt)
void slicer::S4DParamCalc::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 135 of file S4DParamCalc_module.cc.

References fAveDClose, fAvePClose, fAveTClose, fDClose3, fDClose4, fDClose5, fDeltaP0, fDeltaP1, fDeltaT0, fDeltaT1, fDeltaX0, fDeltaX1, fDeltaY0, fDeltaY1, fDeltaZ0, fDeltaZ1, fPClose3, fPClose4, fPClose5, fPEnoise, fPEphys, fTClose3, fTClose4, fTClose5, fTres, fTresNoise, and art::TFileDirectory::make().

136  {
138 
139  // book the histograms
140  fPEnoise = tfs->make<TH1F>("fPEnoise",
141  "PE for hits in the noise cluster",
142  200,0.0,2000.0);
143  fPEphys = tfs->make<TH1F>("fPEphys",
144  "PE for all hits in the non-noise clusters",
145  200,0.0,2000.0);
146  fDeltaT0 = tfs->make<TH1F>("fDeltaT0",
147  "Delta T for all hits;delta T [ns];count",
148  1100000,-550000.0,550000.0);
149  fDeltaT1 = tfs->make<TH1F>("fDeltaT1",
150  "Delta T for all hits within 10 planes;delta T [ns];count",
151  1100000,-550000.0,550000.0);
152  fDeltaX0 = tfs->make<TH1F>("fDeltaX0",
153  "Delta X for all hits in the X-view;delta X [cm];count",
154  400,-1600,1600); // 8 cm bins
155  fDeltaX1 = tfs->make<TH1F>("fDeltaX1",
156  "Delta X for all hits in the X-view within 1 usec;delta X [cm];count",
157  400,-1600,1600); // 8 cm bins
158  fDeltaY0 = tfs->make<TH1F>("fDeltaY0",
159  "Delta Y for all hits in the Y-view;delta Y [cm];count",
160  400,-1600,1600); // 8 cm bins
161  fDeltaY1 = tfs->make<TH1F>("fDeltaY1",
162  "Delta Y for all hits in the Y-view within 1 usec;delta Y [cm];count",
163  400,-1600,1600); // 8 cm bins
164  fDeltaZ0 = tfs->make<TH1F>("fDeltaZ0",
165  "Delta Z for all hits in the same view;delta Z [cm];count",
166  1000,-6000,6000); // 12 cm bins
167  fDeltaZ1 = tfs->make<TH1F>("fDeltaZ1",
168  "Delta Z for all hits in the same view within 1 usec;delta Z [cm];count",
169  1000,-6000,6000); // 12 cm bins
170  fDeltaP0 = tfs->make<TH1F>("fDeltaP0",
171  "Delta Plane for all hits in opposite views;delta Plane;count",
172  1000,-1000,1000); // 2 plane bins
173  fDeltaP1 = tfs->make<TH1F>("fDeltaP1",
174  "Delta Plane for all hits in opposite views within 1 usec;delta Plane;count",
175  1000,-1000,1000); // 2 plane bins
176 
177  fAveTClose = tfs->make<TH1F>("fAveTClose",
178  "Average delta-time for 4 closest neighbors in the slice;time [ns];count",
179  1000,0.0,1000.0);
180  fAveDClose = tfs->make<TH1F>("fAveDClose",
181  "Average distance for 4 closest neighbors in the same view and in the same slice;dist [cm];count",
182  160,0.0,1600.0);
183  fAvePClose = tfs->make<TH1F>("fAvePClose",
184  "Average delta plane for 4 closest neighbors in opposite views and in the same slice;# of planes;count",
185  100,0.0,200.0);
186  fTClose3 = tfs->make<TH1F>("fTClose3",
187  "Delta-time for 3rd closest neighbor in the slice;time [ns];count",
188  1000,0.0,1000.0);
189  fDClose3 = tfs->make<TH1F>("fDClose3",
190  "Distance to 3rd closest neighbor in the same view and in the same slice;dist [cm];count",
191  160,0.0,1600.0);
192  fPClose3 = tfs->make<TH1F>("fPClose3",
193  "Delta plane for 3rd closest neighbor in opposite view and in the same slice;# of planes;count",
194  100,0.0,200.0);
195  fTClose4 = tfs->make<TH1F>("fTClose4",
196  "Delta-time for 4th closest neighbor in the slice;time [ns];count",
197  1000,0.0,1000.0);
198  fDClose4 = tfs->make<TH1F>("fDClose4",
199  "Distance to 4th closest neighbor in the same view and in the same slice;dist [cm];count",
200  160,0.0,1600.0);
201  fPClose4 = tfs->make<TH1F>("fPClose4",
202  "Delta plane for 4th closest neighbor in opposite view and in the same slice;# of planes;count",
203  100,0.0,200.0);
204  fTClose5 = tfs->make<TH1F>("fTClose5",
205  "Delta-time for 5th closest neighbor in the slice;time [ns];count",
206  1000,0.0,1000.0);
207  fDClose5 = tfs->make<TH1F>("fDClose5",
208  "Distance to 5th closest neighbor in the same view and in the same slice;dist [cm];count",
209  160,0.0,1600.0);
210  fPClose5 = tfs->make<TH1F>("fPClose5",
211  "Delta plane for 5th closest neighbor in opposite view and in the same slice;# of planes;count",
212  100,0.0,200.0);
213 
214  fTres = tfs->make<TH1F>("fTres",
215  "Computed timing resolution for hits in non-noise slices;time [ns];count",
216  500,0.0,500.0);
217  fTresNoise = tfs->make<TH1F>("fTresNoise",
218  "Computed timing resolution for hits in the noise slice;time [ns];count",
219  500,0.0,500.0);
220 
221  }
T * make(ARGS...args) const
detail::CachedProducts& art::EventObserverBase::cachedProducts ( )
inlineprotectedinherited

Definition at line 79 of file EventObserverBase.h.

References art::EventObserverBase::selectors_.

80  {
81  return selectors_;
82  }
detail::CachedProducts selectors_
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::consumes ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::consumes ( InputTag const &  it)
inherited

Definition at line 146 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

147 {
148  if (!moduleContext_)
149  return ProductToken<T>::invalid();
150 
151  consumables_[BT].emplace_back(ConsumableType::Product,
152  TypeID{typeid(T)},
153  it.label(),
154  it.instance(),
155  it.process());
156  return ProductToken<T>{it};
157 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::consumesMany ( )
inherited

Definition at line 161 of file Consumer.h.

References T.

162 {
163  if (!moduleContext_)
164  return;
165 
166  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
167 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::consumesView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::consumesView ( InputTag const &  it)
inherited

Definition at line 171 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

172 {
173  if (!moduleContext_)
174  return ViewToken<T>::invalid();
175 
176  consumables_[BT].emplace_back(ConsumableType::ViewElement,
177  TypeID{typeid(T)},
178  it.label(),
179  it.instance(),
180  it.process());
181  return ViewToken<T>{it};
182 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited
CurrentProcessingContext const* art::EDAnalyzer::currentContext ( ) const
protectedinherited
seed_t art::EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited
art::Handle<art::TriggerResults> art::EventObserverBase::getTriggerResults ( Event const &  e) const
inlineinherited

Definition at line 61 of file EventObserverBase.h.

References art::detail::CachedProducts::getOneTriggerResults(), and art::EventObserverBase::selectors_.

62  {
64  }
detail::CachedProducts selectors_
art::Handle< art::TriggerResults > getOneTriggerResults(Event const &) const
Float_t e
Definition: plot.C:35
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::mayConsume ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::mayConsume ( InputTag const &  it)
inherited

Definition at line 189 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

190 {
191  if (!moduleContext_)
192  return ProductToken<T>::invalid();
193 
194  consumables_[BT].emplace_back(ConsumableType::Product,
195  TypeID{typeid(T)},
196  it.label(),
197  it.instance(),
198  it.process());
199  return ProductToken<T>{it};
200 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::mayConsumeMany ( )
inherited

Definition at line 204 of file Consumer.h.

References T.

205 {
206  if (!moduleContext_)
207  return;
208 
209  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
210 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::mayConsumeView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::mayConsumeView ( InputTag const &  it)
inherited

Definition at line 214 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

215 {
216  if (!moduleContext_)
217  return ViewToken<T>::invalid();
218 
219  consumables_[BT].emplace_back(ConsumableType::ViewElement,
220  TypeID{typeid(T)},
221  it.label(),
222  it.instance(),
223  it.process());
224  return ViewToken<T>{it};
225 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
bool art::EventObserverBase::modifiesEvent ( ) const
inlineinherited

Definition at line 25 of file EventObserverBase.h.

26  {
27  return false;
28  }
static cet::exempt_ptr<Consumer> art::Consumer::non_module_context ( )
staticinherited
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
std::string const& art::EventObserverBase::processName ( ) const
inlineinherited
void slicer::S4DParamCalc::reconfigure ( const fhicl::ParameterSet pset)

Definition at line 121 of file S4DParamCalc_module.cc.

References fCellHitLabel, fDistPen, fEpsilon, fMakeKDistPlots, fMinPts, fOpVPlPen, fPEPen, fSlicerLabel, fUseLowPEPen, fhicl::ParameterSet::get(), and string.

Referenced by S4DParamCalc().

122  {
123  fCellHitLabel = pset.get< std::string >("CellHitLabel");
124  fSlicerLabel = pset.get< std::string >("SlicerLabel");
125  fMakeKDistPlots = pset.get< bool >("MakeKDistPlots");
126  fEpsilon = pset.get< double >("Epsilon");
127  fMinPts = pset.get< unsigned int >("MinPts");
128  fUseLowPEPen = pset.get< bool >("UseLowPEPen");
129  fPEPen = pset.get< double >("PEPen");
130  fDistPen = pset.get< double >("DistPen");
131  fOpVPlPen = pset.get< double >("OppViewPlanePen");
132  }
double fOpVPlPen
Allowed plane gap for hits in opposite views for which the distance penalty will be 1...
bool fUseLowPEPen
Add a causal distance penalty for PE (low PE is INCREASES the distance)
double fDistPen
Distance (in cm) for which the distance penalty will be 1 (roughly one strong interaction length...
unsigned int fMinPts
minimum number of casual neighbors for a hit to be in a cluster
T get(std::string const &key) const
Definition: ParameterSet.h:231
double fEpsilon
Minimum causal separation value.
double fPEPen
PE value for which the low PE penalty will be 1.
enum BeamMode string
void art::EventObserverBase::registerProducts ( MasterProductRegistry ,
ProductDescriptions ,
ModuleDescription const &   
)
inlineinherited

Definition at line 33 of file EventObserverBase.h.

References string.

36  {}
fhicl::ParameterSetID art::EventObserverBase::selectorConfig ( ) const
inlineinherited

Definition at line 56 of file EventObserverBase.h.

References art::EventObserverBase::selector_config_id_.

57  {
58  return selector_config_id_;
59  }
fhicl::ParameterSetID selector_config_id_
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Referenced by art::RootOutput::endJob().

void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited
bool art::EventObserverBase::wantAllEvents ( ) const
inlineinherited

Definition at line 46 of file EventObserverBase.h.

References art::EventObserverBase::wantAllEvents_.

Referenced by art::RootOutput::RootOutput().

47  {
48  return wantAllEvents_;
49  }
bool art::EventObserverBase::wantEvent ( Event const &  e)
inlineinherited

Definition at line 51 of file EventObserverBase.h.

References art::EventObserverBase::selectors_, and art::detail::CachedProducts::wantEvent().

52  {
53  return selectors_.wantEvent(e);
54  }
detail::CachedProducts selectors_
Float_t e
Definition: plot.C:35
bool wantEvent(Event const &)
std::string art::EDAnalyzer::workerType ( ) const
inlineinherited

Definition at line 109 of file EDAnalyzer.h.

References art::EDAnalyzer::currentContext().

110  {
111  return "WorkerT<EDAnalyzer>";
112  }

Member Data Documentation

TH1F* slicer::S4DParamCalc::fAveDClose
private

Definition at line 84 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fAvePClose
private

Definition at line 85 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fAveTClose
private

Definition at line 83 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

std::string slicer::S4DParamCalc::fCellHitLabel
private

Definition at line 51 of file S4DParamCalc_module.cc.

Referenced by analyze(), and reconfigure().

TH1F* slicer::S4DParamCalc::fDClose3
private

Definition at line 88 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fDClose4
private

Definition at line 92 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fDClose5
private

Definition at line 96 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fDeltaP0
private

Definition at line 80 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fDeltaP1
private

Definition at line 81 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fDeltaT0
private

Definition at line 72 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fDeltaT1
private

Definition at line 73 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fDeltaX0
private

Definition at line 74 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fDeltaX1
private

Definition at line 75 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fDeltaY0
private

Definition at line 76 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fDeltaY1
private

Definition at line 77 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fDeltaZ0
private

Definition at line 78 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fDeltaZ1
private

Definition at line 79 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

double slicer::S4DParamCalc::fDistPen
private

Distance (in cm) for which the distance penalty will be 1 (roughly one strong interaction length.)

Definition at line 62 of file S4DParamCalc_module.cc.

Referenced by reconfigure(), and S4DParamCalc().

double slicer::S4DParamCalc::fEpsilon
private

Minimum causal separation value.

Definition at line 56 of file S4DParamCalc_module.cc.

Referenced by reconfigure(), and S4DParamCalc().

bool slicer::S4DParamCalc::fMakeKDistPlots
private

Definition at line 53 of file S4DParamCalc_module.cc.

Referenced by analyze(), and reconfigure().

unsigned int slicer::S4DParamCalc::fMinPts
private

minimum number of casual neighbors for a hit to be in a cluster

Definition at line 57 of file S4DParamCalc_module.cc.

Referenced by reconfigure().

double slicer::S4DParamCalc::fOpVPlPen
private

Allowed plane gap for hits in opposite views for which the distance penalty will be 1.

Definition at line 63 of file S4DParamCalc_module.cc.

Referenced by reconfigure(), and S4DParamCalc().

TH1F* slicer::S4DParamCalc::fPClose3
private

Definition at line 89 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fPClose4
private

Definition at line 93 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fPClose5
private

Definition at line 97 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fPEnoise
private

Definition at line 69 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

double slicer::S4DParamCalc::fPEPen
private

PE value for which the low PE penalty will be 1.

Definition at line 61 of file S4DParamCalc_module.cc.

Referenced by reconfigure(), and S4DParamCalc().

TH1F* slicer::S4DParamCalc::fPEphys
private

Definition at line 70 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

PointManager slicer::S4DParamCalc::fPtMan
private

Definition at line 66 of file S4DParamCalc_module.cc.

Referenced by analyze(), and S4DParamCalc().

std::string slicer::S4DParamCalc::fSlicerLabel
private

Definition at line 52 of file S4DParamCalc_module.cc.

Referenced by analyze(), and reconfigure().

TH1F* slicer::S4DParamCalc::fTClose3
private

Definition at line 87 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fTClose4
private

Definition at line 91 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fTClose5
private

Definition at line 95 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fTres
private

Definition at line 99 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

TH1F* slicer::S4DParamCalc::fTresNoise
private

Definition at line 100 of file S4DParamCalc_module.cc.

Referenced by analyze(), and beginJob().

bool slicer::S4DParamCalc::fUseLowPEPen
private

Add a causal distance penalty for PE (low PE is INCREASES the distance)

Definition at line 60 of file S4DParamCalc_module.cc.

Referenced by reconfigure(), and S4DParamCalc().


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