ILDPerformance/PID
===================

particle ID part of ILD performance
J.List, Sept/Oct 2015

needs:
- a physics sample (best with jets) to test (DST)
- insert path in scripts/PIDTree.xml 
- if needed adjust collection names and/or name of output root tree 
- matching GEAR file (scripts/GearOutput.xml is ILD_o1_v05)

=================================================================

cd scripts
$MARLIN/bin/Marlin PIDTree.xml

[writes ../Results/PID_output_n1n1hh.root"]

cd ../macros
root -l

     .x plotPIDs.C("../Results/PID_output_n1n1hh.root");

[plots PID efficiencies for the four algorthms,
writes ../Results/PIDs_pdg[i]_cut[j].pdf [optionally also eps and ps].
cuts on true particle can be adjusted]

  
---------------------------------
some additional plots (added by Peter McKeown, Aug, 2016 ):


     .x plotPIDEfficiency.C("../Results/PID_output_n1n1hh.root", int pdgCode )

creates plots for efficiency/fake as a function of momentum and cos(theta)
using the likelihoodPID with:
      int pdgCode = 13 ;  //muon
      int pdgCode = 211 ;  // pion
      int pdgCode = 11 ; //electron
      int pdgCode = 321 ; //kaon
      int pdgCode = 2212 ; //protons
writes files:
../Results/Eff_FakeRate_pdgXX.pdf  (where XX==pdgCode )


      .x plotdEdx.C("../Results/PID_output_n1n1hh.root")

creates a plot of the actual dEdx in the TPC that is used for the likelihoodPID in
file:
../Results/dEdx_plots_output.pdf



	.x plotPIDLike.C ("../Results/PID_output_n1n1hh.root")

creates plots for the PID-likelihood for the different particle types 
for the correct true particles (blue) and all other particles (red)
in file:
../Results/Likely_PDG.pdf
	
	
	
	.x plotPIDPurity.C ("../Results/PID_output_n1n1hh.root")
creates plots of efficiency vs purity from using the PID likelihood directly
in files:
../Results/Eff_Purity.pdf


--------------------------------------------------------------------------------------






	



    	    	
    

    
	