Skip to content

Commit

Permalink
Merge pull request #130 from JeffersonLab/dalton_MakeDSelector
Browse files Browse the repository at this point in the history
Add example code for FCAL shower quality cut
  • Loading branch information
aaust authored Sep 2, 2020
2 parents 7700d75 + 628116a commit 4b95767
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions programs/MakeDSelector/MakeDSelector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,12 @@ void Print_SourceFile(string locSelectorBaseName, DTreeInterface* locTreeInterfa
locSourceStream << " //CUT MISSING MASS" << endl;
locSourceStream << " //dAnalysisActions.push_back(new DCutAction_MissingMassSquared(dComboWrapper, false, -0.03, 0.02));" << endl;
locSourceStream << endl;
locSourceStream << " //CUT ON SHOWER QUALITY" << endl;
locSourceStream << " //dAnalysisActions.push_back(new DCutAction_ShowerQuality(dComboWrapper, SYS_FCAL, 0.5));" << endl;
locSourceStream << endl;
locSourceStream << " //BEAM ENERGY" << endl;
locSourceStream << " dAnalysisActions.push_back(new DHistogramAction_BeamEnergy(dComboWrapper, false));" << endl;
locSourceStream << " //dAnalysisActions.push_back(new DCutAction_BeamEnergy(dComboWrapper, false, 8.4, 9.05));" << endl;
locSourceStream << " //dAnalysisActions.push_back(new DCutAction_BeamEnergy(dComboWrapper, false, 8.2, 8.8)); // Coherent peak for runs in the range 30000-59999" << endl;
locSourceStream << endl;
locSourceStream << " //KINEMATICS" << endl;
locSourceStream << " dAnalysisActions.push_back(new DHistogramAction_ParticleComboKinematics(dComboWrapper, false));" << endl;
Expand Down Expand Up @@ -546,7 +549,10 @@ void Print_SourceFile(string locSelectorBaseName, DTreeInterface* locTreeInterfa
locSourceStream << " // Double_t locAccidentalScalingFactor = dAnalysisUtilities.Get_AccidentalScalingFactor(Get_RunNumber(), locBeamP4.E(), dIsMC); // Ideal value would be 1, but deviations require added factor, which is different for data and MC." << endl;
locSourceStream << " // Double_t locAccidentalScalingFactorError = dAnalysisUtilities.Get_AccidentalScalingFactorError(Get_RunNumber(), locBeamP4.E()); // Ideal value would be 1, but deviations observed, need added factor." << endl;
locSourceStream << " // Double_t locHistAccidWeightFactor = locRelBeamBucket==0 ? 1 : -locAccidentalScalingFactor/(2*locNumOutOfTimeBunchesToUse) ; // Weight by 1 for in-time events, ScalingFactor*(1/NBunches) for out-of-time" << endl;
locSourceStream << " // if(locSkipNearestOutOfTimeBunch && abs(locRelBeamBucket)==1) continue; // Skip nearest out-of-time bunch: tails of in-time distribution also leak in" << endl;
locSourceStream << " // if(locSkipNearestOutOfTimeBunch && abs(locRelBeamBucket)==1) { // Skip nearest out-of-time bunch: tails of in-time distribution also leak in" << endl;
locSourceStream << " // dComboWrapper->Set_IsComboCut(true); " << endl;
locSourceStream << " // continue; " << endl;
locSourceStream << " // } " << endl;

locSourceStream << endl;
locSourceStream << " /********************************************* COMBINE FOUR-MOMENTUM ********************************************/" << endl;
Expand Down

0 comments on commit 4b95767

Please sign in to comment.