LightLevels_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: LightLevels
3 // Module Type: analyzer
4 // File: LightLevels_module.cc
5 //
6 // Generated at Tue Apr 9 23:39:58 2013 by Adam Aurisano using artmod
7 // from art v1_02_06.
8 ////////////////////////////////////////////////////////////////////////
9 
20 
21 #include "Geometry/Geometry.h"
22 #include "Geometry/LiveGeometry.h"
23 
25 #include "GeometryObjects/Geo.h"
28 
30 #include "RecoBase/CellHit.h"
31 #include "RecoBase/Cluster.h"
32 #include "RecoBase/Track.h"
33 #include "Utilities/func/MathUtil.h"
38 #include "NovaDAQConventions/DAQConventions.h"
39 #include "cetlib/search_path.h"
40 #include "RawData/RawTrigger.h"
41 
42 #include <cmath>
43 #include <iostream>
44 #include <iomanip>
45 #include <map>
46 #include <unordered_map>
47 #include <vector>
48 #include <string>
49 #include <set>
50 #include <utility>
51 #include <algorithm>
52 
53 #include "TFile.h"
54 #include "TTree.h"
55 #include "TH1D.h"
56 #include "TH2F.h"
57 #include "TH2D.h"
58 #include "TH3D.h"
59 #include "TProfile.h"
60 #include "TString.h"
61 #include "TVector3.h"
62 
63 #include <sys/stat.h>
64 
65 #include <iostream>
66 #include <iomanip>
67 
68 class LightLevels;
69 
70 class LightLevels : public art::EDAnalyzer {
71 public:
72  explicit LightLevels(fhicl::ParameterSet const & p);
73  virtual ~LightLevels();
74 
75  void analyze(art::Event const & e) override;
76 
77  void beginJob() override;
78  void beginRun(const art::Run& run) override;
79  void beginSubRun(const art::SubRun& sr) override;
80  void endSubRun(const art::SubRun& sr) override;
81  void endRun(const art::Run& run) override;
82 
83  void CreateHistos();
84 
85 private:
86  // Declare member data here.
87  TH1D* fNSpills;
89  TH1D* fExposure;
91 
92  TH2D* fPEperCM;
93  TH2D* fPEperCM_X;
94  TH2D* fPEperCM_Y;
95 
96  TH2D* fPEperCM_all;
99 
100  TH1D* fPEperCM1D;
103 
107 
108  TH1D* fPE;
109  TH1D* fPE_X;
110  TH1D* fPE_Y;
111 
112  TH1D* fPE_all;
113  TH1D* fPE_all_X;
114  TH1D* fPE_all_Y;
115 
116  TH1D* fPathLength;
119 
123 
124  TH1D* fCosDirX;
125  TH1D* fCosDirY;
126  TH1D* fCosDirZ;
127 
129 
130  TH1D* fNoiseHits;
133 
135 
136  Float_t _pathLength;
137  Float_t _w;
138  Float_t _pe;
139  Int_t _plane;
140  Int_t _cell;
141  Float_t _distFromEnd;
142  Bool_t _isStopper;
143  Float_t _cosX;
144  Float_t _cosY;
145  Float_t _cosZ;
146  Bool_t _isX;
147 
149 
150  double fMaxW;
151 
153  bool fMakeTree;
154  bool fUseBeam;
155 
156  std::vector<std::string> fQualLabels;
157 };
158 
160  EDAnalyzer(p), fMakeTree( p.get<bool>("MakeTree") ), fUseBeam( p.get<bool>("UseBeam") )
161 {}
162 
164 {}
165 
167 {
168  fFirstTime = true;
169 }
170 
172 {
173  fTotExposure_us = 0.0;
174 }
175 
177 {
180 
181  unsigned int nLiveChans = 0;
182  const std::set<unsigned int>& planes = geom->GetPlanesByView(geo::kXorY);
183  for(std::set<unsigned int>::const_iterator it = planes.begin(); it != planes.end(); ++it){
184  const unsigned int plane = *it;
185  const unsigned int maxCell = geom->Plane(plane)->Ncells();
186  for(unsigned int cell = 0; cell < maxCell; ++cell){
187  if(!badChans->IsBad(plane, cell)) ++nLiveChans;
188  } // end for cell
189  } // end for it
190  mf::LogInfo("LightLevels") << "There are " << nLiveChans << " live channels " << fTotExposure_us << "us total exposure " << fTotExposure_us/fNSpills->Integral() << "us exposure/spill";
191  fCellScaledExposure_us->SetBinContent(1, nLiveChans*fTotExposure_us);
192 
193  double totActiveCells = fNActiveCells->GetBinContent(1);
194  totActiveCells += nLiveChans;
195  fNActiveCells->SetBinContent(1, totActiveCells);
196 }
197 
198 
200 {
201  //Fill fNActiveCells with the number of non-zero cells in fNoiseHitsPerCell
202  /*
203  double nActiveCells(0.0);
204  for (int iX = 1; iX <= fNoiseHitsPerCell->GetXaxis()->GetNbins(); ++iX) {
205  for (int iY = 1; iY <= fNoiseHitsPerCell->GetYaxis()->GetNbins(); ++iY) {
206  if (fNoiseHitsPerCell->GetBinContent(iX, iY) > 0) nActiveCells += 1.0;
207  }
208  }
209  fNActiveCells->SetBinContent(1, nActiveCells);
210  */
211 }
212 
214 {
215  if (!fFirstTime) return;
216 
219 
220  fMaxW = 0;
221  unsigned int maxCells(0);
222  unsigned int nPlanes = geo->NPlanes();
223  for (unsigned int plane = 0; plane < nPlanes; plane++) {
224  if (geo->Plane(plane)->Ncells() > maxCells) maxCells = geo->Plane(plane)->Ncells();
225  for (unsigned int cell = 0; cell < geo->Plane(plane)->Ncells(); cell++) {
226  if (geo->Plane(plane)->Cell(cell)->HalfL() > fMaxW) fMaxW = geo->Plane(plane)->Cell(cell)->HalfL();
227  }
228  }
229 
230  double cmPerBin = 5.0;
231  int nBinsW = 2.*fMaxW/cmPerBin;
232 
233  fNSpills = tfs->make<TH1D>("fNSpills", ";Number of Spills", 1, 0, 2);
234  fNActiveCells = tfs->make<TH1D>("fNActiveCells", ";Number of Active Cells", 1, 0, 2);
235  fExposure = tfs->make<TH1D>("fExposure", ";Total Exposure Time (us)", 1, 0, 2);
236  fCellScaledExposure_us = tfs->make<TH1D>("fCellScaledExposure_us", ";Exposure*Active Cells (us)", 1, 0, 2);
237 
238  fPEperCM = tfs->make<TH2D>("pPEperCM", ";Distance to Readout End of Cell; PE/Pathlength", nBinsW, 0, 2*fMaxW, 2000, 0, 500);
239  fPEperCM_X = tfs->make<TH2D>("pPEperCM_X",";Distance to Readout End of Cell (X View); PE/Pathlength", nBinsW, 0, 2*fMaxW, 2000, 0, 500);
240  fPEperCM_Y = tfs->make<TH2D>("pPEperCM_Y",";Distance to Readout End of Cell (Y View); PE/Pathlength", nBinsW, 0, 2*fMaxW, 2000, 0, 500);
241 
242  fPEperCM_all = tfs->make<TH2D>("pPEperCM_all", ";Distance to Readout End of Cell; PE/Pathlength", nBinsW, 0, 2*fMaxW, 2000, 0, 500);
243  fPEperCM_all_X = tfs->make<TH2D>("pPEperCM_all_X",";Distance to Readout End of Cell (X View); PE/Pathlength", nBinsW, 0, 2*fMaxW, 2000, 0, 500);
244  fPEperCM_all_Y = tfs->make<TH2D>("pPEperCM_all_Y",";Distance to Readout End of Cell (Y View); PE/Pathlength", nBinsW, 0, 2*fMaxW, 2000, 0, 500);
245 
246  fPEperCM1D = tfs->make<TH1D>("fPEperCM1D", ";Mean PE/Pathlength", 2000, 0, 500);
247  fPEperCM1D_X = tfs->make<TH1D>("fPEperCM1D_X",";Mean PE/Pathlength", 2000, 0, 500);
248  fPEperCM1D_Y = tfs->make<TH1D>("fPEperCM1D_Y",";Mean PE/Pathlength", 2000, 0, 500);
249 
250  fPEperCM1D_all = tfs->make<TH1D>("fPEperCM1D_all", ";Mean PE/Pathlength", 2000, 0, 500);
251  fPEperCM1D_all_X = tfs->make<TH1D>("fPEperCM1D_all_X",";Mean PE/Pathlength", 2000, 0, 500);
252  fPEperCM1D_all_Y = tfs->make<TH1D>("fPEperCM1D_all_Y",";Mean PE/Pathlength", 2000, 0, 500);
253 
254  fPE = tfs->make<TH1D>("fPE", ";Hit PE", 512, 0, 2048);
255  fPE_X = tfs->make<TH1D>("fPE_X", ";Hit PE: X View", 512, 0, 2048);
256  fPE_Y = tfs->make<TH1D>("fPE_Y", ";Hit PE: Y View", 512, 0, 2048);
257 
258  fPE_all = tfs->make<TH1D>("fPE_all", ";Hit PE", 512, 0, 2048);
259  fPE_all_X = tfs->make<TH1D>("fPE_all_X", ";Hit PE: X View", 512, 0, 2048);
260  fPE_all_Y = tfs->make<TH1D>("fPE_all_Y", ";Hit PE: Y View", 512, 0, 2048);
261 
262  fPathLength = tfs->make<TH1D>("fPathLength", ";Path Length", 100 ,0, 10);
263  fPathLength_X = tfs->make<TH1D>("fPathLength_X", ";Path Length: X View", 100 ,0, 10);
264  fPathLength_Y = tfs->make<TH1D>("fPathLength_Y", ";Path Length: Y View", 100 ,0, 10);
265 
266  fPathLength_all = tfs->make<TH1D>("fPathLength_all", ";Path Length", 100 ,0, 10);
267  fPathLength_all_X = tfs->make<TH1D>("fPathLength_all_X", ";Path Length: X View", 100 ,0, 10);
268  fPathLength_all_Y = tfs->make<TH1D>("fPathLength_all_Y", ";Path Length: Y View", 100 ,0, 10);
269 
270  fCosDirX = tfs->make<TH1D>("fCosDirX", ";X Direction Cosine", 100, 0, 1);
271  fCosDirY = tfs->make<TH1D>("fCosDirY", ";Y Direction Cosine", 100, 0, 1);
272  fCosDirZ = tfs->make<TH1D>("fCosDirZ", ";Z Direction Cosine", 100, 0, 1);
273 
274  fPhysicsHits = tfs->make<TH1D>("fPhysicsHits", ";N Physics Hits",1000, 0, 1000);
275 
276  fNoiseHits = tfs->make<TH1D>("fNoiseHits", ";Noise Slice ADC", 512, 0, 4095);
277  fNoiseHitsPerCell = tfs->make<TH2D>("fNoiseHitsPerCell", ";Plane;Cell;Noise Hits", nPlanes, 0, nPlanes-1, maxCells, 0, maxCells-1);
278  fNoiseHits3D = tfs->make<TH3D>("fNoiseHits3D", ";ADC1-ADC0;ADC2-ADC0;ADC3-ADC0", 150, 0, 300, 150, 0, 300, 150, 0, 300);
279 
280  fLightLevelTree = tfs->make<TTree>("lightLevelTree","Information for setting light levels");
281 
282  fLightLevelTree->Branch("pathLength", &_pathLength, "pathLength/F");
283  fLightLevelTree->Branch("w", &_w, "w/F");
284  fLightLevelTree->Branch("pe", &_pe, "pe/F");
285  fLightLevelTree->Branch("plane", &_plane, "plane/I");
286  fLightLevelTree->Branch("cell", &_cell, "cell/I");
287  fLightLevelTree->Branch("distFromEnd", &_distFromEnd, "distFromENd/F");
288  fLightLevelTree->Branch("isStopper", &_isStopper, "isStopper/B");
289  fLightLevelTree->Branch("isX", &_isX, "isX/B");
290  fLightLevelTree->Branch("cosX", &_cosX, "coxX/F");
291  fLightLevelTree->Branch("cosY", &_cosY, "coxY/F");
292  fLightLevelTree->Branch("cosZ", &_cosZ, "cosZ/F");
293 
294  //fQualLabels.push_back("pathQualXY");
295  //fQualLabels.push_back("pathQualZ");
296  fQualLabels.push_back("pathQualTraj");
297  fFirstTime = false;
298  return;
299 }
300 
302 {
303  CreateHistos();
304  return;
305 }
306 
308 {
309  /*
310  art::Handle<std::vector<rawdata::RawTrigger> > trigs;
311  evt.getByLabel("daq", trigs);
312  bool isDDT(true);
313  for(unsigned int n = 0; n < trigs->size(); ++n) {
314  const rawdata::RawTrigger& trig = (*trigs)[n];
315  std::cout << "Trigger length = " << trig.fTriggerRange_TriggerLength << std::endl;
316  //fTotExposure_us += trig.fTriggerRange_TriggerLength*500*1e-3;
317  if (trig.fTriggerRange_TriggerLength >= 1000)
318  {
319  isDDT = false;
320  fTotExposure_us += 500;
321  }
322  else
323  {
324  isDDT = true;
325  fTotExposure_us += 50;
326  }
327  }
328  */
329  //use beam or cosmic triggers and only take from 25 us to 175 us
330  fTotExposure_us += 150;
331 
332  std::string trackLabel = "cosmictrack";
333  std::string pclistLabel = "pclist";
334 
336 
337  //if there are no hits, this event was probably filtered
338 
340  evt.getByLabel("calhit", hits);
341  if (hits.failedToGet())
342  {
343  //std::cerr << "Failed to get calhits" << std::endl;
344  return;
345  }
346 
347  fNSpills->Fill(1);
348 
349  // get the slices
351  evt.getByLabel("slicer", slices);
352  if (slices.failedToGet()) {
353  std::cerr << "Failed to get slices" << std::endl;
354  return;
355  }
356 
357  double minTime(999999.0);
358  double maxTime(-999999.0);
359  for(unsigned int i = 0; i < hits->size(); ++i)
360  {
361  double tns = (*hits)[i].TNS();
362  //double tns = (*hits)[i].TDC();
363  if (i == 0) {
364  maxTime = tns;
365  minTime = tns;
366  }
367  else {
368  if (tns > maxTime) maxTime = tns;
369  if (tns < minTime) minTime = tns;
370  }
371  }
372  //std::cout << "minTime = " << minTime*1e-3 << " maxTime = " << maxTime*1e-3 << std::endl;
373  //std::cout << "minTime = " << minTime*1e-3 << " maxTime = " << maxTime*1e-3 << std::endl;
374 
375  double deltaTUS = fExposure->GetBinContent(1);
376  //deltaTMS += (maxTime - minTime)/1.0e6;
377  deltaTUS += 150.;
378  fExposure->SetBinContent(1, deltaTUS);
379 
381 
382  for(unsigned int i = 0; i < slices->size(); ++i) {
383  if ((*slices)[i].IsNoise()) {
384  std::cout << "N Hits in noise slice: " << (*slices)[i].NCell() << std::endl;
385  for(unsigned int j = 0; j < (*slices)[i].NCell(); ++j) {
386  const rb::CellHit* h = (*slices)[i].Cell(j).get();
387  double tus = h->TNS()*1e-3;
388  //if ( (isDDT && (tus >= 0 && tus <= 50)) || (!isDDT && (tus >= 0 && tus <= 500)) )
389  if (tus >= 25 && tus <= 175)
390  {
391  fNoiseHits->Fill( h->ADC() );
392  if (h->NADC() > 1) fNoiseHits3D->Fill( h->ADC(1) - h->ADC(0), h->ADC(2) - h->ADC(0), h->ADC(3) - h->ADC(0) );
393  const int plane = cmap->GetPlane(h);
394  const int cell = cmap->GetCell(h);
395  double nhits = fNoiseHitsPerCell->GetBinContent(plane, cell);
396  nhits += 1.0;
397  fNoiseHitsPerCell->SetBinContent(plane, cell, nhits);
398  }
399  }
400  }
401  else {
402  int nhits = (*slices)[i].NCell();
403  art::FindManyP<rb::Track> fmptrks(slices, evt, art::InputTag(trackLabel));
404  if (!fmptrks.isValid()) {
405  std::cerr << "No associated cosmic tracks for slice!" << std::endl;
406  return;
407  }
408  int nTrackHits(0);
409  std::vector<art::Ptr<rb::Track> > sliceTracks = fmptrks.at(i);
410  for( auto const& slcTrk: sliceTracks ) {
411  nTrackHits += slcTrk->NCell();
412  }
413  fPhysicsHits->Fill(nhits - nTrackHits);
414  }
415  }
416 
418  evt.getByLabel(trackLabel, tracks);
419  if (tracks.failedToGet()) {
420  std::cerr << "Failed to get cosmic tracks" << std::endl;
421  return;
422  }
423  if (tracks->empty()) {
424  //std::cerr << "Empty cosmic tracks container" << std::endl;
425  return;
426  }
427 
428  for (size_t trkIdx = 0; trkIdx < tracks->size(); ++trkIdx) {
429  const rb::Track* track(&tracks->at(trkIdx));
430 
431  //3D tracks
432  if(track->View() != geo::kXorY) continue;
433 
434  //sufficient length for track window
435  if ( track->TotalLength() < 200. ) continue;
436 
437  double dx = std::fabs( track->Dir().X() );
438  double dy = std::fabs( track->Dir().Y() );
439  double dz = std::fabs( track->Dir().Z() );
440 
441  fCosDirX->Fill( dx );
442  fCosDirY->Fill( dy );
443  fCosDirZ->Fill( dz );
444 
445  _cosX = dx;
446  _cosY = dy;
447  _cosZ = dz;
448 
449  //Determine if tracks come from outside and stop
451 
452  double distStartToFront = livegeo->DistToFront(track->Start());
453  double distStartToTop = livegeo->DistToTop(track->Start());
454  double distStartToSide = livegeo->DistToEdgeX(track->Start());
455 
456  //physical starts
457 
458  if (distStartToFront < 0) continue;
459  if (distStartToTop < 0) continue;
460  if (distStartToSide < 10) continue;
461 
462  //if (fUseBeam && distStartToFront > 10) continue;
463  //if (!fUseBeam && distStartToTop > 10) continue;
464 
465  //make sure it start near front for neardet (must be rock muon)
466  if (geo->DetId() == novadaq::cnv::kNEARDET && distStartToFront > 10) continue;
467  //make sure it start near top for fardet (must be cosmic muon)
468  if (geo->DetId() == novadaq::cnv::kFARDET && distStartToTop > 10) continue;
469  //moving to the activity trigger
470  //if (distStartToTop > 10) continue;
471 
472  // endpoint isn't contained
473  double distEndToEdge = std::min(livegeo->DistToEdgeXY(track->Stop()), livegeo->DistToEdgeZ(track->Stop()));
474  bool isStopper = true;
475  if (distEndToEdge < 50) isStopper = false;
476 
477  // fetch pc hits
478  for (size_t iQual = 0; iQual < fQualLabels.size(); ++iQual) {
479  art::FindManyP<caldp::PCHit> fmpcxy(tracks, evt, art::InputTag(pclistLabel, fQualLabels[iQual].c_str()) );
480  if (!fmpcxy.isValid()) {
481  std::cerr << "No associated pchits for cosmic tracks!" << std::endl;
482  return;
483  }
484 
485  std::vector<art::Ptr<caldp::PCHit> > pcxy = fmpcxy.at(trkIdx);
486  //std::cout << pcxy.size() << " pchits" << std::endl;
487  for( auto const& iPc: pcxy ) {
488  double pathLength = iPc->Path();
489  double w = iPc->W();
490  double pe = iPc->PE();
491  int plane = iPc->Plane();
492  int cell = iPc->Cell();
493 
494  //remove the first module in each plane (potential light contamination)
495  //if (cell < 32) continue;
496 
497  //don't keep hits in the muon catcher
498  if(geo->DetId() == novadaq::cnv::kNEARDET && plane >= int(geo->FirstPlaneInMuonCatcher())) continue;
499 
500  //maxW - |w| < 0.75*maxW -> away from the edges that might be affected by the roll-offs
501  const double maxW = geo->Plane(plane)->Cell(cell)->HalfL();
502  bool isCentral = (maxW - std::fabs(w) < 0.75*maxW);
503 
504  double x = track->TotalLength() - iPc->FlightLen();
505 
506  _pathLength = pathLength;
507  _w = w;
508  _pe = pe;
509  _plane = plane;
510  _cell = cell;
511  _distFromEnd = x;
512  _isStopper = isStopper;
513  if (iPc->View() == geo::kX) _isX = true;
514  else _isX = false;
515 
516  if (fMakeTree) fLightLevelTree->Fill();
517 
518  //remove potentially low efficiency cells and low oil cells
519  //int modcell = cell%32;
520  //if ( modcell == 7 || modcell == 15 || modcell == 23 || modcell == 31) continue;
521  //if ( iPc->View() == geo::kY && modcell == 30) continue;
522 
523  fPEperCM_all->Fill( maxW - w, pe/pathLength );
524  fPathLength_all->Fill( pathLength );
525  if (isCentral) {
526  fPE_all->Fill(pe);
527  fPEperCM1D_all->Fill( pe/pathLength );
528  }
529  if (iPc->View() == geo::kX) {
530  fPEperCM_all_X->Fill( maxW - w, pe/pathLength );
531  fPathLength_all_X->Fill( pathLength );
532  if (isCentral) {
533  fPE_all_X->Fill(pe);
534  fPEperCM1D_all_X->Fill( pe/pathLength );
535  }
536  }
537  else {
538  fPEperCM_all_Y->Fill( maxW - w, pe/pathLength );
539  fPathLength_all_Y->Fill( pathLength );
540  if (isCentral) {
541  fPE_all_Y->Fill(pe);
542  fPEperCM1D_all_Y->Fill( pe/pathLength );
543  }
544  }
545 
546  if (!isStopper) continue;
547  if (x < 100 || x > 200) continue;
548 
549  fPEperCM->Fill( maxW - w, pe/pathLength );
550  fPathLength->Fill( pathLength );
551  if (isCentral) {
552  fPE->Fill(pe);
553  fPEperCM1D->Fill( pe/pathLength );
554  }
555  if (iPc->View() == geo::kX) {
556  fPEperCM_X->Fill( maxW - w, pe/pathLength );
557  fPathLength_X->Fill( pathLength );
558  if (isCentral) {
559  fPE_X->Fill(pe);
560  fPEperCM1D_X->Fill( pe/pathLength );
561  }
562  }
563  else {
564  fPEperCM_Y->Fill( maxW - w, pe/pathLength );
565  fPathLength_Y->Fill( pathLength );
566  if (isCentral) {
567  fPE_Y->Fill(pe);
568  fPEperCM1D_Y->Fill( pe/pathLength );
569  }
570  }
571  }
572  }
573  }
574 }
575 
float TNS() const
Definition: CellHit.h:46
double HalfL() const
Definition: CellGeo.cxx:198
set< int >::iterator it
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
TH1D * fCellScaledExposure_us
X or Y views.
Definition: PlaneGeo.h:30
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
double DistToEdgeXY(TVector3 vertex)
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
virtual ~LightLevels()
Definition: event.h:19
OStream cerr
Definition: OStream.cxx:7
std::vector< std::string > fQualLabels
A rb::Prong with full reconstructed trajectory.
Definition: Track.h:20
double DistToEdgeX(TVector3 vertex)
double DistToFront(TVector3 vertex)
const PlaneGeo * Plane(unsigned int i) const
DEFINE_ART_MODULE(TestTMapFile)
Definition: Run.h:31
double DistToTop(TVector3 vertex)
Far Detector at Ash River, MN.
void hits()
Definition: readHits.C:15
double dy[NP][NC]
double dx[NP][NC]
double DistToEdgeZ(TVector3 vertex)
double dz[NP][NC]
Encapsulate the geometry of one entire detector (near, far, ndos)
novadaq::cnv::DetId DetId() const
Prefer ds::DetectorService::DetId() instead.
Definition: GeometryBase.h:243
Near Detector in the NuMI cavern.
Collect Geo headers and supply basic geometry functions.
unsigned short GetPlane(const rawdata::RawDigit *dig)
Definition: CMap.cxx:285
const double j
Definition: BetheBloch.cxx:29
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
void endRun(const art::Run &run) override
void beginJob() override
Definition: run.py:1
OStream cout
Definition: OStream.cxx:6
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
A rawdata::RawDigit with channel information decoded.
Definition: CellHit.h:27
T * make(ARGS...args) const
int16_t ADC(uint32_t i) const
Definition: RawDigit.cxx:58
uint32_t NADC() const
Definition: RawDigit.h:81
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
const std::set< unsigned int > & GetPlanesByView(View_t v=kXorY) const
void geom(int which=0)
Definition: geom.C:163
void analyze(art::Event const &e) override
unsigned short GetCell(const rawdata::RawDigit *dig)
Definition: CMap.cxx:327
void endSubRun(const art::SubRun &sr) override
void beginRun(const art::Run &run) override
unsigned int NPlanes() const
T min(const caf::Proxy< T > &a, T b)
Float_t e
Definition: plot.C:35
bool IsBad(int plane, int cell)
Helper for AttenCurve.
Definition: Path.h:10
Float_t track
Definition: plot.C:35
LightLevels(fhicl::ParameterSet const &p)
Float_t w
Definition: plot.C:20
void beginSubRun(const art::SubRun &sr) override
Encapsulate the geometry of one entire detector (near, far, ndos)
bool failedToGet() const
Definition: Handle.h:196
static constexpr Double_t sr
Definition: Munits.h:164
const unsigned int FirstPlaneInMuonCatcher() const
Returns the index of the first plane contained in the muon catcher.