27 void TrkClassEfficiencyPlots::fill(std::vector<const xAOD::TruthParticle*> & truth_taus, std::vector<const xAOD::TauJet*> & reco_taus,
float weight,
float avg_mu)
35 for (
auto reco_tau : reco_taus) {
37 for (
auto truth_tau : truth_taus) {
39 if(truth_tau ==
nullptr){
continue; }
41 if((acc_ptvis(*truth_tau) < 15 * Athena::Units::GeV) || (std::abs(acc_etavis(*truth_tau)) > 2.5)){
continue; }
43 if(!(accIsHadronicTau(*truth_tau))) {
continue; }
45 if(truth_tau->p4().DeltaR(reco_tau->p4()) < 0.2) {
46 bool track_num_match =
false;
47 if( acc_ntracks(*truth_tau) == 1){
48 if( reco_tau->nTracks() == 1 ) { track_num_match =
true; }
49 else { track_num_match =
false;}
51 m_eff_truth_pt_1p->Fill(acc_ptvis(*truth_tau)/Athena::Units::GeV,track_num_match,weight);
55 }
else if ( acc_ntracks(*truth_tau) == 3){
57 if( reco_tau->nTracks() == 3 ) { track_num_match =
true; }
58 else { track_num_match =
false;}
60 m_eff_truth_pt_3p->Fill(acc_ptvis(*truth_tau)/Athena::Units::GeV,track_num_match,weight);
TProfile * BookTProfile(std::string_view name, std::string_view labels, int nBinsX, float startX, float endX, float startY=-1, float endY=-1, bool prependDir=true, bool useRMS=false)
Book a TProfile histogram.