-
Notifications
You must be signed in to change notification settings - Fork 7
CRTest
The CRTest class is a wrapper for testing whether an event passed certain control region cuts.
CRTester(FillVals* _info, string var, double val, string _name);Takes the input values listed and sets the respective values
bool test(Analyzer* analyzer);Main function in the CRTest class. It is what actually grabs the value requested by the name of the variable variable and tests to to the value, cutVal. If it greater than the cutVal, it returns true, else, false. Any non-standard variable or variable not included in the function must be put into the function by the user. The FillVals helper class is used to facilitate accessing these values.
Right now, the CRTest class is a friend of the Analyzer class, so it can directly access all variables directly. This will hopefully change in the future to allow for safer code base.
bool partPassBoth(Analyzer*);Example of non-standard cut used in the test function. This takes the particle given and tests if the particle is found in both versions of the particle. This can be used for testing differences in ID, such as a Muon passing Medium cut, but not the Tight cut.
This serves as an example of how to expand this class for any non-standard variables.
const FillVals* info;
const string variable;
const double cutVal;
const string partName;- info: The helper class that holds general particle information that relates to the cut (look at FillVal class for more information)
- variable: name of the variable which is used in the
testfunction if block - cutVal: value that variable is cut on
- partName: name of the particles, used in certain cut functions