JeffersonLab / gluex_root_analysis

9 stars 9 forks source link

A new cut action to use beta to select the PID #145

Closed aaust closed 3 years ago

aaust commented 3 years ago

Requested by @nsjarvis

By default, the boundaries on beta are used independent of the momentum of the particle. Analogous to other cut actions, momentum-dependent user functions can also be supplied. Here is an example on how to do that in the DSelector::Init():

 DCutAction_PIDBeta *myBetaCut = new DCutAction_PIDBeta(dComboWrapper, false, 0.5, 1, Proton, SYS_BCAL);
 TF1* f = new TF1("f","[0]*x + [1]",0.0,12.0);
 f->SetParameters(0.125,0.5);
 myBetaCut->dFunc_BetaCut_SelectNegative = f;
 dAnalysisActions.push_back(myBetaCut);