Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prune MC when an event does not pass the daq trigger #154

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/daq/src/LessSimpleDAQProc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace RAT {
double triggerWindow = 200.; //ns
unsigned long triggerThreshold = 6;
unsigned long hits = 0;

int trigger = 0;

//cout <<"New Event====================================" << endl;
// First part is to load into vector PMT information for full event
Expand Down Expand Up @@ -89,6 +89,7 @@ namespace RAT {
// occurred within the trigger window
double dt = pmtARRAY[pmtIndex][0]-pmtARRAY[hits-triggerThreshold][0];
if (dt>triggerWindow) continue;
trigger = 1;
// assign the sixth hit in a cluster of length triggerWindow as the trigger
// (clusterTime is the the time of the 6th hit)
for (unsigned long jj = 0; jj< clusterTime.size();jj++){
Expand Down Expand Up @@ -201,7 +202,10 @@ namespace RAT {
//regster total charge of one subevent
ev->SetTotalCharge(totalQ);
}

if (trigger==0){
ds->PruneMC();
}

return Processor::OK;
}

Expand Down