Skip to content

Commit

Permalink
Merge branch 'master' into aaust_FCAL_hits
Browse files Browse the repository at this point in the history
  • Loading branch information
aaust committed Aug 21, 2024
2 parents e9d489c + 24c16a1 commit 66725c6
Show file tree
Hide file tree
Showing 8 changed files with 1,933 additions and 4 deletions.
9 changes: 8 additions & 1 deletion src/libraries/ANALYSIS/DEventWriterROOT.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ static bool STORE_ERROR_MATRIX_INFO = false;
static bool STORE_MC_TRAJECTORIES = false;

static bool STORE_SC_VETO_INFO = false;
static bool STORE_THROWN_DECAYING_PARTICLES = true;

void DEventWriterROOT::Initialize(JEventLoop* locEventLoop)
{
Expand Down Expand Up @@ -114,6 +115,10 @@ void DEventWriterROOT::Create_ThrownTree(JEventLoop* locEventLoop, string locOut
if(dThrownTreeInterface->Get_BranchesCreatedFlag())
return; //branches already created: return

// set parameters specifically for thrown trees
if(gPARMS->Exists("ANALYSIS:STORE_THROWN_DECAYING_PARTICLES"))
{gPARMS->GetParameter("ANALYSIS:STORE_THROWN_DECAYING_PARTICLES",STORE_THROWN_DECAYING_PARTICLES); cout << "ANALYSIS:STORE_THROWN_DECAYING_PARTICLES set to " << STORE_THROWN_DECAYING_PARTICLES << ", IGNORE the \"<-- NO DEFAULT! (TYPO?)\" message " << endl;}

//TTREE BRANCHES
DTreeBranchRegister locBranchRegister;

Expand Down Expand Up @@ -284,6 +289,7 @@ TMap* DEventWriterROOT::Create_UserInfoMaps(DTreeBranchRegister& locBranchRegist
if(gPARMS->Exists("ANALYSIS:STORE_SC_VETO_INFO"))
{gPARMS->GetParameter("ANALYSIS:STORE_SC_VETO_INFO",STORE_SC_VETO_INFO); cout << "ANALYSIS:STORE_SC_VETO_INFO set to " << STORE_SC_VETO_INFO << ", IGNORE the \"<-- NO DEFAULT! (TYPO?)\" message " << endl;}


if(locKinFitType != d_NoFit)
{
DKinFitUtils_GlueX locKinFitUtils(locEventLoop);
Expand Down Expand Up @@ -1108,7 +1114,8 @@ void DEventWriterROOT::Fill_ThrownTree(JEventLoop* locEventLoop) const
locEventLoop->Get(locMCThrowns_FinalState, "FinalState");

vector<const DMCThrown*> locMCThrowns_Decaying;
locEventLoop->Get(locMCThrowns_Decaying, "Decaying");
if(STORE_THROWN_DECAYING_PARTICLES)
locEventLoop->Get(locMCThrowns_Decaying, "Decaying");

const DMCReaction* locMCReaction = NULL;
locEventLoop->GetSingle(locMCReaction);
Expand Down
5 changes: 5 additions & 0 deletions src/libraries/TAGGER/DTAGHHit_factory_Calib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ jerror_t DTAGHHit_factory_Calib::evnt(JEventLoop *loop, uint64_t eventnumber)
for (unsigned int i=0; i < tdcdigihits.size(); i++) {
const DTAGHTDCDigiHit *digihit = tdcdigihits[i];

// throw away hits from bad or noisy counters
int quality = counter_quality[digihit->counter_id];
if (quality == k_counter_dead || quality == k_counter_bad || quality == k_counter_noisy)
continue;

// Apply calibration constants here
int counter = digihit->counter_id;
double T = locTTabUtilities->Convert_DigiTimeToNs_F1TDC(digihit) - tdc_time_offsets[counter] + t_tdc_base;
Expand Down
5 changes: 5 additions & 0 deletions src/libraries/TAGGER/DTAGMHit_factory_Calib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ jerror_t DTAGMHit_factory_Calib::evnt(JEventLoop *loop, uint64_t eventnumber)
for (unsigned int i=0; i < tdcdigihits.size(); i++) {
const DTAGMTDCDigiHit *digihit = tdcdigihits[i];

// throw away hits from bad or noisy fibers
int quality = fiber_quality[digihit->row][digihit->column];
if (quality == k_fiber_dead || quality == k_fiber_bad || quality == k_fiber_noisy)
continue;

// Apply calibration constants here
int row = digihit->row;
int column = digihit->column;
Expand Down
Loading

0 comments on commit 66725c6

Please sign in to comment.