Class Truth
java.lang.Object
org.jlab.analysis.efficiency.Truth
Efficiency matrix calculator based solely on the MC::GenMatch truth-matching
bank, and a pid assignment match in MC::Particle and REC::Particle.
- Author:
- baltzell
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int truth, int rec) Add an event in the form of truth and reconstructed particle species.voidAdd input HIPO files by path.voidadd(org.jlab.jnp.hipo4.data.Event e) Add a HIPO event.booleancheckEfficiencies(String arg) Efficiency cut values specificed as pid1:eff1[pid2:eff2[...]]floatget(int truth, int rec) Get one element of the efficiency matrix.static voidorg.jlab.jnp.utils.json.JsonObjecttoJson()Get efficiencies as a JSON object.Get efficiencies as a Markdown table.toTable()Get efficiencies as a plain, human-readable table.
-
Constructor Details
-
Truth
public Truth(org.jlab.jnp.hipo4.data.SchemaFactory s)
-
-
Method Details
-
get
public float get(int truth, int rec) Get one element of the efficiency matrix.- Parameters:
truth- true PIDrec- reconstructed PID- Returns:
- probability
-
add
public void add(int truth, int rec) Add an event in the form of truth and reconstructed particle species.- Parameters:
truth- truth PIDrec- reconstructed PID
-
add
public void add(org.jlab.jnp.hipo4.data.Event e) Add a HIPO event.- Parameters:
e-
-
add
-
toTable
-
toJson
public org.jlab.jnp.utils.json.JsonObject toJson()Get efficiencies as a JSON object.- Returns:
-
toMarkdown
-
checkEfficiencies
Efficiency cut values specificed as pid1:eff1[pid2:eff2[...]] For example, 2212:0.9,11:0.95 is 90% for proton and 95% for electron.- Parameters:
arg-- Returns:
- whether all efficiency cuts pass
-
main
-