Skip to content

Commit

Permalink
Add local trigger time to ntuples
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesJieranShen committed Jul 16, 2024
1 parent 9778277 commit b77cbfd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/io/include/RAT/OutNtupleProc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ class OutNtupleProc : public Processor {
std::vector<double> hitPMTDigitizedTime;
std::vector<double> hitPMTDigitizedCharge;
std::vector<int> hitPMTNCrossings;
std::vector<double> hitPMTDigitizedLocalTriggerTime;
// Tracking
std::map<std::string, int> processCodeMap;
std::vector<int> processCodeIndex;
Expand Down
4 changes: 4 additions & 0 deletions src/io/src/OutNtupleProc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ bool OutNtupleProc::OpenFile(std::string filename) {
outputTree->Branch("hitPMTDigitizedTime", &hitPMTDigitizedTime);
outputTree->Branch("hitPMTDigitizedCharge", &hitPMTDigitizedCharge);
outputTree->Branch("hitPMTNCrossings", &hitPMTNCrossings);
outputTree->Branch("hitPMTDigitizedLocalTriggerTime", &hitPMTDigitizedLocalTriggerTime);
}
if (options.mchits) {
// Save full MC PMT hit information
Expand Down Expand Up @@ -407,6 +408,7 @@ Processor::Result OutNtupleProc::DSEvent(DS::Root *ds) {
hitPMTDigitizedTime.clear();
hitPMTDigitizedCharge.clear();
hitPMTNCrossings.clear();
hitPMTDigitizedLocalTriggerTime.clear();

for (int pmtc = 0; pmtc < ev->GetPMTCount(); pmtc++) {
RAT::DS::PMT *pmt = ev->GetPMT(pmtc);
Expand All @@ -419,6 +421,7 @@ Processor::Result OutNtupleProc::DSEvent(DS::Root *ds) {
hitPMTDigitizedTime.push_back(digitpmt->GetDigitizedTime());
hitPMTDigitizedCharge.push_back(digitpmt->GetDigitizedCharge());
hitPMTNCrossings.push_back(digitpmt->GetNCrossings());
hitPMTDigitizedLocalTriggerTime.push_back(digitpmt->GetLocalTriggerTime());
}
}
this->FillEvent(ds, ev);
Expand All @@ -434,6 +437,7 @@ Processor::Result OutNtupleProc::DSEvent(DS::Root *ds) {
hitPMTDigitizedTime.clear();
hitPMTDigitizedCharge.clear();
hitPMTNCrossings.clear();
hitPMTDigitizedLocalTriggerTime.clear();
}
this->FillNoTriggerEvent(ds);
outputTree->Fill();
Expand Down

0 comments on commit b77cbfd

Please sign in to comment.