Skip to content

Commit

Permalink
Add seperate branches in ntuple for frontend time and hit time
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesJieranShen committed Apr 30, 2024
1 parent 7d82469 commit 41790b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/io/include/RAT/OutNtupleProc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class OutNtupleProc : public Processor {
std::vector<int> mcpmtnpe;
// MCPE
std::vector<double> mcpetime;
std::vector<double> mcpefrontendtime;
std::vector<int> mcpeprocess;
std::vector<double> mcpewavelength;
std::vector<double> mcpex;
Expand Down
5 changes: 4 additions & 1 deletion src/io/src/OutNtupleProc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ bool OutNtupleProc::OpenFile(std::string filename) {
outputTree->Branch("mcPMTNPE", &mcpmtnpe);

outputTree->Branch("mcPETime", &mcpetime);
outputTree->Branch("mcPEFrontEndTime", &mcpefrontendtime);
// Production process
// 1=Cherenkov, 0=Dark noise, 2=Scint., 3=Reem., 4=Unknown
outputTree->Branch("mcPEProcess", &mcpeprocess);
Expand Down Expand Up @@ -288,6 +289,7 @@ Processor::Result OutNtupleProc::DSEvent(DS::Root *ds) {

// MCPE information
mcpetime.clear();
mcpefrontendtime.clear();
mcpeprocess.clear();
mcpewavelength.clear();
mcpex.clear();
Expand All @@ -304,7 +306,8 @@ Processor::Result OutNtupleProc::DSEvent(DS::Root *ds) {
TVector3 position = pmtinfo->GetPosition(mcpmt->GetID());
for (int ipe = 0; ipe < mcpmt->GetMCPhotonCount(); ipe++) {
RAT::DS::MCPhoton *mcph = mcpmt->GetMCPhoton(ipe);
mcpetime.push_back(mcph->GetFrontEndTime());
mcpetime.push_back(mcph->GetHitTime());
mcpefrontendtime.push_back(mcph->GetFrontEndTime());
mcpewavelength.push_back(mcph->GetLambda());
mcpex.push_back(position.X());
mcpey.push_back(position.Y());
Expand Down

0 comments on commit 41790b8

Please sign in to comment.