All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CRTDataAnalysis_module.cc
Go to the documentation of this file.
1 /**
2  * @file CRTDataAnalysis_module.cc
3  * @brief Access CRT data and reco products and compare to MCTruth info
4  * @author Chris Hilgenberg (Chris.Hilgenberg@colostate.edu)
5  *
6  * The last revision of this code was done in October 2018 with LArSoft v07_06_01.
7  */
8 
9 // LArSoft includes
15 #include "larcore/CoreUtils/ServiceUtil.h" // lar::providerFrom()
20 //#include "icaruscode/CRT/CRTUtils/CRTHitRecoAlg.h"
21 
22 // Framework includes
23 #include "art/Framework/Core/EDAnalyzer.h"
24 #include "art/Framework/Principal/Event.h"
25 #include "art/Framework/Principal/Handle.h"
26 #include "art/Framework/Services/Registry/ServiceHandle.h"
27 #include "art_root_io/TFileService.h"
28 #include "art/Framework/Core/ModuleMacros.h"
29 #include "canvas/Persistency/Common/FindManyP.h"
30 #include "canvas/Utilities/Exception.h"
31 
32 // Utility libraries
33 #include "messagefacility/MessageLogger/MessageLogger.h"
34 #include "fhiclcpp/ParameterSet.h"
35 #include "fhiclcpp/types/Table.h"
36 #include "fhiclcpp/types/Atom.h"
37 #include "cetlib/pow.h" // cet::sum_of_squares()
38 
39 // ROOT includes
40 #include "TH1.h"
41 #include "TH2.h"
42 #include "TTree.h"
43 #include "TLorentzVector.h"
44 #include "TVector3.h"
45 #include "TGeoManager.h"
46 #include "TMath.h"
47 #include "TROOT.h"
48 
49 // C++ includes
50 #include <map>
51 #include <vector>
52 #include <string>
53 #include <set>
54 #include <cmath>
55 #include <iostream>
56 #include <utility>
57 #include <array>
58 
59 // CRT data products
63 
66 
67 using std::string;
68 using std::vector;
69 using std::map;
70 using std::set;
71 using std::pair;
72 
73 
74 namespace icarus {
75 namespace crt {
76 
77  //-----------------------------------------------------------------------
78 
79  class CRTDataAnalysis : public art::EDAnalyzer
80  {
81  public:
82 
83  struct Config {
84 
85  // Save some typing:
86  using Name = fhicl::Name;
87  using Comment = fhicl::Comment;
88 
89 
90  fhicl::Atom<art::InputTag> CRTHitLabel {
91  Name("CRTHitLabel"),
92  Comment("tag of the input data product with reconstructed CRT hits")
93  };
94 
95  fhicl::Atom<art::InputTag> CRTDAQLabel {
96  Name("CRTDAQLabel"),
97  Comment("tag of the input data product with calibrated CRT data")
98  };
99 
100  fhicl::Atom<art::InputTag> TriggerLabel {
101  Name("TriggerLabel"),
102  Comment("Label for the Trigger fragment label")
103  };
104 
105  fhicl::Atom<double> QPed {
106  Name("QPed"),
107  Comment("Pedestal offset [ADC]")
108  };
109  fhicl::Atom<double> QSlope {
110  Name("QSlope"),
111  Comment("Pedestal slope [ADC/photon]")
112  };
113 
114  fhicl::Atom<double> PEThresh {
115  Name("PEThresh"),
116  Comment("threshold in photoelectrons above which charge amplitudes used in hit reco")
117  };
118 
119  fhicl::Atom<uint64_t> CrtWindow {
120  Name("CrtWindow"),
121  Comment("window for looking data [ns]")
122  };
123  }; // Config
124 
125  using Parameters = art::EDAnalyzer::Table<Config>;
126 
127  // -------------------------------------------------------------------
128  // -------------------------------------------------------------------
129  // Standard constructor for an ART module with configuration validation;
130  // we don't need a special destructor here.
131 
132  /// Constructor: configures the module (see the Config structure above)
133  explicit CRTDataAnalysis(Parameters const& config);
134 
135  virtual void beginJob() override;
136  virtual void beginRun(const art::Run& run) override;
137  virtual void analyze (const art::Event& event) override;
138 
139  //void reconfigure(fhicl::ParameterSet const & p);
140  private:
141 
142  void FillFebMap();
143 
144  // Declare member data here.
146  // CRTHitRecoAlg hitAlg;
147 
148  // The parameters we'll read from the .fcl file.
149  art::InputTag fTriggerLabel;
150  art::InputTag fCRTHitProducerLabel; ///< The name of the producer that created hits
151  art::InputTag fCRTDAQProducerLabel;
152  // bool fVerbose; ///< print info
153  double fQPed; ///< Pedestal offset of SiPMs [ADC]
154  double fQSlope; ///< Pedestal slope of SiPMs [ADC/photon]
155  double fPEThresh; ///< threshold[PE] above which charge amplitudes used in hit reco
156  uint64_t fCrtWindow; ///< Looking data window within trigger timestamp [ns]
157 
158  static map<int, vector<pair<int,int>>> fFebMap;
159 
160  // The n-tuples we'll create.
161  TTree* fDAQNtuple;
162  TTree* fHitNtuple;
163 
164  // The comment lines with the @ symbols define groups in doxygen.
165  /// @name The variables that will go into both n-tuples.
166  /// @{
167  int fEvent; ///< number of the event being processed
168  int fRun; ///< number of the run being processed
169  int fSubRun; ///< number of the sub-run being processed
170  /// @}
171 
172  /// @name The variables that will go into the CosmicDisplay n-tuple.
173  /// @{
174  static const int LAR_PROP_DELAY = 1.0/(30.0/1.38); //[ns/cm]
175 
176  //add trigger data product vars
177  unsigned int m_gate_type;
178  std::string m_gate_name;
182  uint64_t m_gate_crt_diff;
183 
184  //CRT data product vars
185  //static const int kDetMax = 64;
187  int fDetRun;
189  int fNChan; ///< number of channels above threshold for this front-end board readout
190  int fEntry; ///< front-end board entry number (reset for each event)
191  int fFEBReg; ///< CRT region for this front-end board
192  int fMac5; ///< Mac5 address for this front-end board
194  uint64_t fT0;///< signal time w.r.t. PPS
195  uint64_t fT1;///< signal time w.r.t. global event time
196  int fNMaxCh;/// Max number of channel
197  int fADC[64];///< signal amplitude
198  float fPE[64];///< signal amplitude
199  int fFlags;///< Flags
200  vector<vector<int>> fTrackID;///< track ID(s) of particle that produced the signal
201  vector<vector<int>> fDetPDG; /// signal inducing particle(s)' PDG code
202 
203  //CRT hit product vars
205  float fXHit; ///< reconstructed X position of CRT hit (cm)
206  float fYHit; ///< reconstructed Y position of CRT hit (cm)
207  float fZHit; ///< reconstructed Z position of CRT hit (cm)
208  float fXErrHit; ///< stat error of CRT hit reco X (cm)
209  float fYErrHit; ///< stat error of CRT hit reco Y (cm)
210  float fZErrHit; ///< stat error of CRT hit reco Z (cm)
211  uint64_t fT0Hit; ///< hit time w.r.t. PPS
212  Long64_t fT1Hit; ///< hit time w.r.t. global trigger
213  int fHitReg; ///< region code of CRT hit
215  int fNHit; ///< number of CRT hits for this event
217  int fHitMod;
218  int fNHitFeb;
219  float fHitTotPe;
220 
221  // Other variables that will be shared between different methods.
222  geo::GeometryCore const* fGeometryService; ///< pointer to Geometry provider
223  int fTriggerOffset; ///< (units of ticks) time of expected neutrino event
225  }; // class CRTDataAnalysis
226 
227 
228  //-----------------------------------------------------------------------
229  //-----------------------------------------------------------------------
230  // class implementation
231 
232  //-----------------------------------------------------------------------
233  // Constructor
234  //
235  // Note that config is a Table<Config>, and to access the Config
236  // value we need to use an operator: "config()". In the same way,
237  // each element in Config is an Atom<Type>, so to access the type we
238  // again use the call operator, e.g. "SimulationLabel()".
239 
240  map<int,vector<pair<int,int>>> CRTDataAnalysis::fFebMap;
241 
243  : EDAnalyzer(config)
244  , fTriggerLabel( config().TriggerLabel() )
245  , fCRTHitProducerLabel(config().CRTHitLabel())
246  , fCRTDAQProducerLabel(config().CRTDAQLabel())
247  , fQPed(config().QPed())
248  , fQSlope(config().QSlope())
249  , fPEThresh(config().PEThresh())
250  , fCrtWindow(config().CrtWindow())
251  , fCrtutils(new CRTCommonUtils())
252 
253  {
254  // Get a pointer to the geometry service provider.
255  fGeometryService = lar::providerFrom<geo::Geometry>();
256  fChannelMap = art::ServiceHandle<icarusDB::IICARUSChannelMap const>{}.get();
257  // The same for detector TDC clock services.
258  // Access to detector properties.
259  auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataForJob();
260  fTriggerOffset = trigger_offset(clockData);
261  }
262 
263 
265  if(!this->fFebMap.empty())
266  return;
267  std::string fullFileName;
268  cet::search_path searchPath("FW_SEARCH_PATH");
269  searchPath.find_file("feb_map.txt",fullFileName);
270  std::ifstream fin;
271  fin.open(fullFileName,std::ios::in);
272  if(fin.good()) mf::LogError("CRTDataAnalysis") << "opened file 'feb_map.txt' for reading..." << std::endl;
273  else // mf::LogError("CRTDataAnalysis") << "could not open file 'feb_map.txt' for reading!" << std::endl;
274  throw cet::exception("CRTDataAnalysis::FillFebMap") << "Unable to find/open file 'feb_map.txt'" << std::endl;
275  std::vector<std::string> row;
276  std::string line, word;
277  while(getline(fin,line)) {
278  row.clear();
279  std::stringstream s(line);
280  int mod;
281  while (std::getline(s, word, ',')) {
282  row.push_back(word);
283  }
284  mod = std::stoi(row[0]);
285  (this->fFebMap)[mod].push_back(std::make_pair(std::stoi(row[1]),std::stoi(row[2])));
286  if(row.size()>3)
287  (this->fFebMap)[mod].push_back(std::make_pair(std::stoi(row[3]),std::stoi(row[4])));
288  }
289  // mf::LogError("CRTDataAnalysis") << "filled febMap with " << (this->fFebMap).size() << " entries" << std::endl;
290  fin.close();
291  }
292 
293 
294  //-----------------------------------------------------------------------
296  {
297  mf::LogError("CRTDataAnalysis") << " starting analysis job" << std::endl;
298 
299  // Access ART's TFileService, which will handle creating and writing
300  // histograms and n-tuples for us.
301  art::ServiceHandle<art::TFileService> tfs;
302 
303  // Define our n-tuples
304  fDAQNtuple = tfs->make<TTree>("DAQTree", "MyCRTDAQ");
305  fHitNtuple = tfs->make<TTree>("HitTree", "MyCRTHit");
306 
307  // Define the branches of our DetSim n-tuple
308  fDAQNtuple->Branch("event", &fDetEvent, "event/I");
309  fDAQNtuple->Branch("run", &fDetRun, "run/I");
310  fDAQNtuple->Branch("subrun", &fDetSubRun, "subrun/I");
311  fDAQNtuple->Branch("nChan", &fNChan, "nChan/I");
312  fDAQNtuple->Branch("t0", &fT0, "t0/l");
313  fDAQNtuple->Branch("t1", &fT1, "t1/l");
314  fDAQNtuple->Branch("flags", &fFlags, "flags/I");
315  fDAQNtuple->Branch("nmaxch", &fNMaxCh, "nmaxch/I");
316  fDAQNtuple->Branch("adc", fADC, "adc[nmaxch]/I");
317  fDAQNtuple->Branch("pe", fPE, "pe[nmaxch]/F");
318  fDAQNtuple->Branch("entry", &fEntry, "entry/I");
319  fDAQNtuple->Branch("mac5", &fMac5, "mac5/I");
320  fDAQNtuple->Branch("region", &fFEBReg, "region/I");
321  fDAQNtuple->Branch("subSys", &fDetSubSys, "subSys/I");
322  fDAQNtuple->Branch("gate_type", &m_gate_type, "gate_type/b");
323  fDAQNtuple->Branch("gate_start_timestamp", &m_gate_start_timestamp, "gate_start_timestamp/l");
324 
325  // Define the branches of our SimHit n-tuple
326  fHitNtuple->Branch("event", &fHitEvent, "event/I");
327  fHitNtuple->Branch("nHit", &fNHit, "nHit/I");
328  fHitNtuple->Branch("x", &fXHit, "x/F");
329  fHitNtuple->Branch("y", &fYHit, "y/F");
330  fHitNtuple->Branch("z", &fZHit, "z/F");
331  fHitNtuple->Branch("xErr", &fXErrHit, "xErr/F");
332  fHitNtuple->Branch("yErr", &fYErrHit, "yErr/F");
333  fHitNtuple->Branch("zErr", &fZErrHit, "zErr/F");
334  fHitNtuple->Branch("t0", &fT0Hit, "t0/l");
335  fHitNtuple->Branch("t1", &fT1Hit, "t1/L");
336  fHitNtuple->Branch("region", &fHitReg, "region/I");
337  // fHitNtuple->Branch("tagger", &ftagger, "tagger/C");
338  fHitNtuple->Branch("subSys", &fHitSubSys, "subSys/I");
339  fHitNtuple->Branch("modID", &fHitMod, "modID/I");
340  fHitNtuple->Branch("stripID", &fHitStrip, "stripID/I");
341  fHitNtuple->Branch("nFeb", &fNHitFeb, "nFeb/I");
342  fHitNtuple->Branch("totPe", &fHitTotPe, "totPe/F");
343  fHitNtuple->Branch("gate_type", &m_gate_type, "gate_type/b");
344  fHitNtuple->Branch("gate_name", &m_gate_name);
345  fHitNtuple->Branch("trigger_timestamp", &m_trigger_timestamp, "trigger_timestamp/l");
346  fHitNtuple->Branch("gate_start_timestamp", &m_gate_start_timestamp, "gate_start_timestamp/l");
347  fHitNtuple->Branch("trigger_gate_diff", &m_trigger_gate_diff, "trigger_gate_diff/l");
348  fHitNtuple->Branch("gate_crt_diff",&m_gate_crt_diff, "gate_crt_diff/l");
349 }
350 
351  void CRTDataAnalysis::beginRun(const art::Run&)
352  {
353  }
354 
355  //-----------------------------------------------------------------------
356  void CRTDataAnalysis::analyze(const art::Event& event)
357  {
358  MF_LOG_DEBUG("CRTDataAnalysis") << "beginning analyis" << '\n';
359 
360  // Start by fetching some basic event information for our n-tuple.
361  fEvent = event.id().event();
362  fRun = event.run();
363  fSubRun = event.subRun();
364 
365  FillFebMap();//febMap);
366 
367  //add trigger info
368  if( !fTriggerLabel.empty() ) {
369 
370  art::Handle<sbn::ExtraTriggerInfo> trigger_handle;
371  event.getByLabel( fTriggerLabel, trigger_handle );
372  if( trigger_handle.isValid() ) {
373  sbn::triggerSource bit = trigger_handle->sourceType;
374  m_gate_type = (unsigned int)bit;
375  m_gate_name = bitName(bit);
376  m_trigger_timestamp = trigger_handle->triggerTimestamp;
377  m_gate_start_timestamp = trigger_handle->beamGateTimestamp;
378  m_trigger_gate_diff = trigger_handle->triggerTimestamp - trigger_handle->beamGateTimestamp;
379 
380  }
381  else{
382  mf::LogError("CRTDataAnalysis") << "No raw::Trigger associated to label: " << fTriggerLabel.label() << "\n" ;
383  }
384  }
385  else {
386  mf::LogError("CRTDataAnalysis") << "Trigger Data product " << fTriggerLabel.label() << " not found!\n" ;
387  }
388 
389  art::Handle<vector<icarus::crt::CRTData>> crtDAQHandle;
390  vector<art::Ptr<icarus::crt::CRTData> > crtList;
391  if ( event.getByLabel(fCRTDAQProducerLabel, crtDAQHandle))
392  art::fill_ptr_vector(crtList, crtDAQHandle);
393 
394  vector<art::Ptr<icarus::crt::CRTData>> crtData;
395  bool presel = false;
396 
397  for (size_t febdat_i=0; febdat_i<crtList.size(); febdat_i++) {
398 
399  uint8_t mac = crtList[febdat_i]->fMac5;
400  int adid = fCrtutils->MacToAuxDetID(mac,0);
401  char type = fCrtutils->GetAuxDetType(adid);
402  /*
403  for(int chan=0; chan<32; chan++) {
404  mf::LogError("CRTDataAnalysis") << "\nfebP (mac5, channel, adc, type, adid) = (" << (int)crtList[febdat_i]->fMac5 << " , " << chan << " , "
405  << crtList[febdat_i]->fAdc[chan] << " , " << type << " , " << adid << ")\n";
406  }
407  */
408  /// Looking for data within +/- 3ms within trigger time stamp
409  /// Here t0 - trigger time -ve, only adding 1s makes the value +ve or -ve
410  // if (std::fabs(int64_t(crtList[febdat_i]->fTs0 - m_trigger_timestamp) + 1e9) > fCrtWindow) continue;
411  if ( type == 'm'){
412  for(int chan=0; chan<32; chan++) {
413  std::pair<double,double> const chg_cal = fChannelMap->getSideCRTCalibrationMap((int)crtList[febdat_i]->fMac5,chan);
414  float pe = (crtList[febdat_i]->fAdc[chan]-chg_cal.second)/chg_cal.first;
415  // In order to have Reset TS1 hits in CRTData from Side CRT, we have to explicitly include them
416  // The current threshold cut (6.5 PE) was applied to filter out noise, but this also filters out
417  // Reset events which are random trigger around the pedestal. These Reset hits are removed in
418  // CRT Hit reconstruction. Top CRT has in internal triggering logic and threshold that screens
419  // from the noise (hence presel = true for all the hits).
420  // Please revise this in the future if also T0 Reset hits need to be kept in CRTData.
421  // To do so, include !0crtList[febdat_i]->IsReference_TS0()
422  if(pe<=fPEThresh && !crtList[febdat_i]->IsReference_TS1()) continue;
423  presel = true;
424  }
425  }else if ( type == 'c' ) {
426 
427  presel = true;
428 
429  }else if ( type == 'd'){
430  for(int chan=0; chan<64; chan++) {
431  float pe = (crtList[febdat_i]->fAdc[chan]-fQPed)/fQSlope;
432  if(pe<=fPEThresh) continue;
433  presel = true;
434  }
435  }
436  //std:: cout << "presel just before filling: " << presel << std::endl;
437  if (presel) crtData.push_back(crtList[febdat_i]);
438  presel = false;
439  } // end of crtList
440 
441  // mf::LogError("CRTDataAnalysis") << "size of the crtdata after removing unwanted charges: " << crtData.size() << std::endl;
442 
443  // mf::LogError("CRTDataAnalysis") << "about to loop over CRTDAQ entries" << std::endl;
444  for (size_t febdat_i=0; febdat_i<crtData.size(); febdat_i++) {
445 
446 
447  fDetEvent = fEvent;
448  fDetRun = fRun;
450  fMac5 = crtData[febdat_i]->fMac5;
451  fEntry = crtData[febdat_i]->fEntry;
453  fNChan = 0;
455  fT0 = crtData[febdat_i]->fTs0;
456  fT1 = crtData[febdat_i]->fTs1;
457  fFlags = crtData[febdat_i]->fFlags;
458  int maxchan =0;
459  if(fDetSubSys!=2) maxchan=32;
460  else maxchan = 64;
461  fNMaxCh = maxchan;
462  for(int ch=0; ch<maxchan; ch++) {
463  fADC[ch] = crtData[febdat_i]->fAdc[ch];
464  std::pair<double,double> const chg_cal = fChannelMap->getSideCRTCalibrationMap((int)fMac5,ch);
465  if (fDetSubSys == 0){
466  float pe = (fADC[ch]-chg_cal.second)/chg_cal.first;
467  if (pe < 0) continue;
468  fPE[ch] = pe;
469  }else{
470  float pe = (fADC[ch]-fQPed)/fQSlope;
471  if (pe < 0) continue;
472  fPE[ch] = pe;
473  }
474 
475  }
476 
477  fDAQNtuple->Fill();
478 
479  } //for CRT FEB events
480 
481 
482 
483 
484 
485  art::Handle<std::vector<sbn::crt::CRTHit>> crtHitHandle;
486 
487  bool isCRTHit = event.getByLabel(fCRTHitProducerLabel, crtHitHandle);
488  std::vector<int> ids;
489  fNHit = 0;
490  if (isCRTHit) {
491 
492  mf::LogError("CRTDataAnalysis") << "looping over reco hits..." << std::endl;
493  for ( auto const& hit : *crtHitHandle )
494  {
495  fNHit++;
496  fHitEvent = fEvent;
497  fXHit = hit.x_pos;
498  fYHit = hit.y_pos;
499  fZHit = hit.z_pos;
500  fXErrHit = hit.x_err;
501  fYErrHit = hit.y_err;
502  fZErrHit = hit.z_err;
503  fT0Hit = hit.ts0_ns;
504  fT1Hit = hit.ts1_ns;
505 
506  fNHitFeb = hit.feb_id.size();
507  fHitTotPe = hit.peshit;
508  int mactmp = hit.feb_id[0];
511 
513 
514  auto ittmp = hit.pesmap.find(mactmp);
515  if (ittmp==hit.pesmap.end()) {
516  mf::LogError("CRTDataAnalysis") << "hitreg: " << fHitReg << std::endl;
517  mf::LogError("CRTDataAnalysis") << "fHitSubSys: "<< fHitSubSys << std::endl;
518  mf::LogError("CRTDataAnalysis") << "mactmp = " << mactmp << std::endl;
519  mf::LogError("CRTDataAnalysis") << "could not find mac in pesmap!" << std::endl;
520  continue;
521  }
522  int chantmp = (*ittmp).second[0].first;
523 
524  fHitMod = fCrtutils->MacToAuxDetID(mactmp, chantmp);
525  fHitStrip = fCrtutils->ChannelToAuxDetSensitiveID(mactmp, chantmp);
526 
527  fHitNtuple->Fill();
528  }//for CRT Hits
529  }//if CRT Hits
530 
531  else mf::LogError("CRTDataAnalysis") << "CRTHit products not found! (expected if decoder step)" << std::endl;
532 
533 
534  } // CRTDataAnalysis::analyze()
535 
536 
537  DEFINE_ART_MODULE(CRTDataAnalysis)
538 
539 } // namespace crt
540 } // namespace icarus
541 
float fXHit
reconstructed X position of CRT hit (cm)
int fRun
number of the run being processed
then if[["$THISISATEST"==1]]
Definition: neoSmazza.sh:95
float fXErrHit
stat error of CRT hit reco X (cm)
Utilities related to art service access.
float fZErrHit
stat error of CRT hit reco Z (cm)
float fYErrHit
stat error of CRT hit reco Y (cm)
int fEntry
front-end board entry number (reset for each event)
vector< vector< int > > fTrackID
track ID(s) of particle that produced the signal
int fMac5
Mac5 address for this front-end board.
This provides an art tool interface definition for tools which &quot;decode&quot; artdaq fragments into LArSoft...
Declaration of signal hit object.
int fNHit
number of CRT hits for this event
process_name hit
Definition: cheaterreco.fcl:51
double fQSlope
Pedestal slope of SiPMs [ADC/photon].
int fHitEvent
signal inducing particle(s)&#39; PDG code
float fYHit
reconstructed Y position of CRT hit (cm)
virtual void analyze(const art::Event &event) override
virtual void beginRun(const art::Run &run) override
art::InputTag fCRTHitProducerLabel
The name of the producer that created hits.
uint64_t fT1
signal time w.r.t. global event time
uint64_t fCrtWindow
Looking data window within trigger timestamp [ns].
int fHitReg
region code of CRT hit
std::string bitName(triggerSource bit)
Returns a mnemonic short name of the beam type.
Definition: BeamBits.h:267
Access the description of auxiliary detector geometry.
fhicl::Atom< art::InputTag > CRTHitLabel
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
Access the description of detector geometry.
geo::GeometryCore const * fGeometryService
pointer to Geometry provider
object containing MC truth information necessary for making RawDigits and doing back tracking ...
uint64_t fT0
signal time w.r.t. PPS
fhicl::Atom< art::InputTag > TriggerLabel
virtual std::pair< double, double > getSideCRTCalibrationMap(int mac5, int chan) const =0
double fPEThresh
threshold[PE] above which charge amplitudes used in hit reco
const icarusDB::IICARUSChannelMap * fChannelMap
BEGIN_PROLOG vertical distance to the surface Name
int fEvent
number of the event being processed
uint64_t fT0Hit
hit time w.r.t. PPS
Description of geometry of one entire detector.
Declaration of cluster object.
static map< int, vector< pair< int, int > > > fFebMap
Definition of data types for geometry description.
int fNChan
number of channels above threshold for this front-end board readout
float fZHit
reconstructed Z position of CRT hit (cm)
fhicl::Atom< art::InputTag > CRTDAQLabel
if &&[-z"$BASH_VERSION"] then echo Attempting to switch to bash bash shellSwitch exit fi &&["$1"= 'shellSwitch'] shift declare a IncludeDirectives for Dir in
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
art::EDAnalyzer::Table< Config > Parameters
CRTDataAnalysis(Parameters const &config)
Constructor: configures the module (see the Config structure above)
int trigger_offset(DetectorClocksData const &data)
triggerSource
Type of beam or beam gate or other trigger source.
Definition: BeamBits.h:97
Data product holding additional trigger information.
Long64_t fT1Hit
hit time w.r.t. global trigger
art::ServiceHandle< art::TFileService > tfs
int fADC[64]
Max number of channel.
double fQPed
Pedestal offset of SiPMs [ADC].
float fPE[64]
signal amplitude
int fFEBReg
CRT region for this front-end board.
process_name crt
int fTriggerOffset
(units of ticks) time of expected neutrino event
art framework interface to geometry description