11 #include "TLorentzVector.h" 17 #include "fastjet/ClusterSequence.hh" 29 const double CSVCuts[] = {0.605, 0.890, 0.970};
32 const float fltmax = numeric_limits<float>::max();
40 TFile *puweights = TFile::Open(
"pu_weights.root");
41 TH1F * h_wpu =
static_cast<TH1F*
>(puweights->Get(
"sf"));
43 TFile out_file(out_file_name,
"recreate");
48 float luminosity = 1000.;
50 vector<TString> trig_name;
52 trig_name.push_back(
"HLT_PFHT350_PFMET100_JetIdCleaned_v");
53 trig_name.push_back(
"HLT_Mu15_IsoVVVL_PFHT350_PFMET50_v");
54 trig_name.push_back(
"HLT_Mu15_IsoVVVL_PFHT600_v");
55 trig_name.push_back(
"HLT_Mu15_IsoVVVL_BTagCSV0p72_PFHT400_v");
56 trig_name.push_back(
"HLT_Mu15_IsoVVVL_PFHT350_v");
57 trig_name.push_back(
"HLT_Ele15_IsoVVVL_PFHT350_PFMET50_v");
58 trig_name.push_back(
"HLT_Ele15_IsoVVVL_PFHT600_v");
59 trig_name.push_back(
"HLT_Ele15_IsoVVVL_BTagCSV0p72_PFHT400_v");
60 trig_name.push_back(
"HLT_Ele15_IsoVVVL_PFHT350_v");
61 trig_name.push_back(
"HLT_DoubleMu8_Mass8_PFHT300_v");
62 trig_name.push_back(
"HLT_DoubleEle8_CaloIdM_TrackIdM_Mass8_PFHT300_v");
63 trig_name.push_back(
"HLT_PFHT475_v");
64 trig_name.push_back(
"HLT_PFHT800_v");
65 trig_name.push_back(
"HLT_PFMET120_NoiseCleaned_Mu5_v");
66 trig_name.push_back(
"HLT_PFMET170_NoiseCleaned_v");
67 trig_name.push_back(
"HLT_DoubleIsoMu17_eta2p1_v");
68 trig_name.push_back(
"HLT_Mu17_TrkIsoVVL_v");
69 trig_name.push_back(
"HLT_IsoMu17_eta2p1_v");
70 trig_name.push_back(
"HLT_IsoMu20_v");
71 trig_name.push_back(
"HLT_IsoMu24_eta2p1_v");
72 trig_name.push_back(
"HLT_IsoMu27_v");
73 trig_name.push_back(
"HLT_Mu50_v");
74 trig_name.push_back(
"HLT_Ele27_eta2p1_WPLoose_Gsf_v");
75 trig_name.push_back(
"HLT_Ele32_eta2p1_WPLoose_Gsf_v");
76 trig_name.push_back(
"HLT_Ele105_CaloIdVT_GsfTrkIdT_v");
77 trig_name.push_back(
"HLT_DoubleEle33_CaloIdL_GsfTrkIdVL_MW_v");
78 trig_name.push_back(
"HLT_DoubleEle24_22_eta2p1_WPLoose_Gsf_v");
84 Timer timer(num_entries, 1.);
86 for(
int entry = 0; entry < num_entries; ++entry){
91 if(out_file_name.Contains(
"Run2015B-PromptReco") &&
run() < 251585)
continue;
100 vector<bool> trig_decision;
102 if(!
GetTriggerInfo(trig_name, trig_decision, trig_prescale))
continue;
103 tree.
trig()=trig_decision;
110 if(name.Contains(
"MET")||name.Contains(
"HT")||name.Contains(
"Combined")||name.Contains(
"Mu")||
111 name.Contains(
"Ele")||name.Contains(
"Egamma"))
115 if(name==
"hltPFMETProducer::HLT") tree.
onmet() = objpt;
116 if(name==
"hltPFHT::HLT") tree.
onht() = objpt;
117 if(name==
"hltL3MuonCandidates::HLT" && tree.
onmaxmu()<objpt) tree.
onmaxmu() = objpt;
118 if(name==
"hltEgammaCandidates::HLT" && tree.
onmaxel()<objpt) tree.
onmaxel() = objpt;
125 else tree.
weight() =
Sign(
weight())*xsec*luminosity /
static_cast<double>(num_total_entries);
129 else tree.
wpu() = h_wpu->GetBinContent(h_wpu->FindBin(tree.
npv()));
145 int nnus = 0, nnus_fromw = 0;
146 double genmetx = 0., genmety = 0., genmetx_fromw = 0, genmety_fromw = 0;
147 for(
size_t imc = 0; imc <
mc_final_id()->size(); ++imc){
151 if(
id==12 ||
id==14 ||
id==16 ||
id==18
152 ||
id==1000012 ||
id==1000014 ||
id==1000016
153 ||
id==1000022 ||
id==1000023 ||
id==1000025 ||
id==1000035 ||
id==1000039){
182 bool one_good_pv(
false);
183 for(
unsigned ipv(0); ipv <
pv_z()->size(); ipv++){
184 const double pv_rho(sqrt(
pv_x()->at(ipv)*
pv_x()->at(ipv) +
pv_y()->at(ipv)*
pv_y()->at(ipv)));
193 vector<int> sig_muons =
GetMuons(
true,
true);
199 TLorentzVector lepmax_p4(0., 0., 0., 0.), lepmax_p4_reliso(0., 0., 0., 0.);
200 short lepmax_chg = 0, lepmax_chg_reliso = 0;
201 vector<int> sig_electrons_reliso =
GetElectrons(
true,
false);
202 vector<int> sig_muons_reliso =
GetMuons(
true,
false);
204 vector<int> veto_muons =
GetMuons(
false,
true);
205 vector<int> veto_electrons_reliso =
GetElectrons(
false,
false);
206 vector<int> veto_muons_reliso =
GetMuons(
false,
false);
207 tree.
nels() = sig_electrons.size(); tree.
nvels() = veto_electrons.size();
209 tree.
nmus() = sig_muons.size(); tree.
nvmus() = veto_muons.size();
212 int els_tru_prompt = 0;
214 for(
size_t index(0); index<
els_pt()->size(); index++) {
231 for(
size_t iel(index+1); iel<
els_pt()->size(); iel++) {
240 double els_mc_pt, els_mc_phi;
241 int mcID =
GetTrueElectron(static_cast<int>(index), mcmomID, fromW, deltaR, els_mc_pt, els_mc_phi);
264 lepmax_p4 = TLorentzVector(
els_px()->at(index),
els_py()->at(index),
269 lepmax_p4_reliso = TLorentzVector(
els_px()->at(index),
els_py()->at(index),
277 int mus_tru_prompt = 0;
279 for(
size_t index(0); index<
mus_pt()->size(); index++) {
293 for(
size_t imu(index+1); imu<
mus_pt()->size(); imu++) {
302 double mus_mc_pt, mus_mc_phi;
303 int mcID =
GetTrueMuon(static_cast<int>(index), mcmomID, fromW, deltaR, mus_mc_pt, mus_mc_phi);
326 lepmax_p4 = TLorentzVector(
mus_px()->at(index),
mus_py()->at(index),
331 lepmax_p4_reliso = TLorentzVector(
mus_px()->at(index),
mus_py()->at(index),
345 if(lepmax_p4.Pt()>0.){
346 tree.
lep_pt() = lepmax_p4.Pt();
347 tree.
lep_phi() = lepmax_p4.Phi();
348 tree.
lep_eta() = lepmax_p4.Eta();
354 float wphi = atan2(wy, wx);
360 if(lepmax_p4_reliso.Pt()>0.){
369 float wphi = atan2(wy, wx);
389 tree.
met_hf() = sqrt(met_hf_x*met_hf_x + met_hf_y*met_hf_y);
418 vector<int> good_jets40 =
GetJets(sig_electrons, sig_muons, 40. , 2.4);
425 vector<int> dirty_jets =
GetJets(vector<int>(0), vector<int>(0), 30., 5.0);
426 tree.
jets_pt().resize(dirty_jets.size());
427 tree.
jets_eta().resize(dirty_jets.size());
428 tree.
jets_phi().resize(dirty_jets.size());
429 tree.
jets_m().resize(dirty_jets.size());
430 tree.
jets_csv().resize(dirty_jets.size());
431 tree.
jets_id().resize(dirty_jets.size());
433 for(
size_t idirty = 0; idirty < dirty_jets.size(); ++idirty){
434 int ijet = dirty_jets.at(idirty);
441 tree.
jets_islep().at(idirty) = !(find(good_jets.begin(), good_jets.end(), ijet) != good_jets.end());
445 vector<int> ra2b_jets =
GetJets(vector<int>(0), vector<int>(0), 30., 2.4);
451 vector<int> hlt_jets =
GetJets(vector<int>(0), vector<int>(0), 40., 3.0);
456 vector<bool> mj_jets_islep;
457 map<size_t,vector<size_t> > mu_matches, el_matches;
459 for(
unsigned ijet(0); ijet<
jets_corr_p4().size(); ijet++) {
460 if(mu_matches.find(ijet) != mu_matches.end() || el_matches.find(ijet) != el_matches.end()){
461 mj_jets.push_back(static_cast<int>(ijet));
462 mj_jets_islep.push_back(
true);
474 for(
unsigned ijet(0); ijet<good_jets.size(); ijet++) {
475 mj_jets.push_back(good_jets[ijet]);
476 mj_jets_islep.push_back(
false);
495 std::vector<int> mc_mus, mc_els, mc_taush, mc_tausl;
497 tree.
ntrumus() = mc_mus.size();
498 tree.
ntruels() = mc_els.size();
504 float toppt1(0),toppt2(0),topphi1(0),topphi2(0);
506 for(
unsigned i = 0; i <
mc_doc_id()->size(); ++i){
507 const int id =
static_cast<int>(floor(fabs(
mc_doc_id()->at(i))+0.5));
508 const int mom =
static_cast<int>(floor(fabs(
mc_doc_mother_id()->at(i))+0.5));
513 if(
mc_doc_status()->at(i)==23 &&
id!=6 && mom!=6 && mom!=24 && gmom!=6 && ggmom!=6) nisr++;
540 TString type = tree.
Type();
541 TString root_version = gROOT->GetVersion();
542 TString root_tutorial_dir = gROOT->GetTutorialsDir();
543 TTree treeglobal(
"treeglobal",
"treeglobal");
544 treeglobal.Branch(
"nev_file", &num_entries);
545 treeglobal.Branch(
"nev_sample", &num_total_entries);
546 treeglobal.Branch(
"commit", &commit);
547 treeglobal.Branch(
"model", &model);
548 treeglobal.Branch(
"type", &type);
549 treeglobal.Branch(
"root_version", &root_version);
550 treeglobal.Branch(
"root_tutorial_dir", &root_tutorial_dir);
551 treeglobal.Branch(
"trig_name", &trig_name);
575 const vector<int> &jets,
578 const vector<bool> &to_clean){
579 vector<PseudoJet> sjets(0);
580 vector<int> ijets(0);
581 vector<float> csvs(0);
582 jets_fjet_index = vector<int>(jets.size(), -1);
585 for(
size_t idirty = 0; idirty<jets.size(); ++idirty){
586 int jet = jets.at(idirty);
590 const PseudoJet this_pj(v.Px(), v.Py(), v.Pz(), v.E());
591 sjets.push_back(this_pj);
592 ijets.push_back(idirty);
596 for(
size_t idirty = 0; idirty<jets.size(); ++idirty){
598 int jet = jets.at(idirty);
601 || (clean && to_clean.at(idirty)))
continue;
603 const PseudoJet this_pj(this_lv.Px(), this_lv.Py(), this_lv.Pz(), this_lv.E());
605 sjets.push_back(this_pj);
606 ijets.push_back(idirty);
611 JetDefinition jet_def(antikt_algorithm, radius);
612 ClusterSequence cs(sjets, jet_def);
613 vector<PseudoJet> fjets =
sorted_by_m(cs.inclusive_jets());
616 fjets_pt.resize(fjets.size());
617 fjets_eta.resize(fjets.size());
618 fjets_phi.resize(fjets.size());
619 fjets_m.resize(fjets.size());
620 fjets_nconst.resize(fjets.size());
621 fjets_sumcsv.resize(fjets.size());
622 fjets_poscsv.resize(fjets.size());
623 fjets_btags.resize(fjets.size());
625 for(
size_t ipj = 0; ipj < fjets.size(); ++ipj){
626 const PseudoJet &pj = fjets.at(ipj);
627 fjets_pt.at(ipj) = pj.pt();
628 fjets_eta.at(ipj) = pj.eta();
629 fjets_phi.at(ipj) = pj.phi_std();
630 fjets_m.at(ipj) = pj.m();
631 const vector<PseudoJet> &cjets = pj.constituents();
632 fjets_nconst.at(ipj) = cjets.size();
635 fjets_btags.at(ipj) = 0;
636 fjets_sumcsv.at(ipj) = 0.;
637 fjets_poscsv.at(ipj) = 0.;
638 for(
size_t ijet = 0; ijet < ijets.size(); ++ijet){
639 size_t i = ijets.at(ijet);
640 for(
size_t cjet = 0; cjet < cjets.size(); ++ cjet){
641 if((cjets.at(cjet) - sjets.at(ijet)).pt() < 0.0001){
642 jets_fjet_index.at(i) = ipj;
643 fjets_sumcsv.at(ipj) += csvs.at(ijet);
644 if(csvs.at(ijet) > 0.){
645 fjets_poscsv.at(ipj) += csvs.at(ijet);
647 if(csvs.at(ijet) >
CSVCuts[1]){
648 ++(fjets_btags.at(ipj));
658 switch(ParticleType){
672 const double bTag_req,
673 const bool use_W_mass)
const{
675 for (uint ijet(0); ijet<good_jets.size(); ijet++) {
676 uint jet = good_jets[ijet];
681 if (mT<min_mT) min_mT=mT;
688 const vector<size_t> &moms){
690 unsigned sample_code = 0xF;
693 }
else if(
Contains(sample_name,
"TTJets")
696 }
else if(
Contains(sample_name,
"WJets")){
698 }
else if(
Contains(sample_name,
"T_s-channel")
699 ||
Contains(sample_name,
"T_tW-channel")
700 ||
Contains(sample_name,
"T_t-channel")
701 ||
Contains(sample_name,
"Tbar_s-channel")
702 ||
Contains(sample_name,
"Tbar_tW-channel")
703 ||
Contains(sample_name,
"Tbar_t-channel")){
705 }
else if(
Contains(sample_name,
"QCD")){
707 }
else if(
Contains(sample_name,
"DY")){
712 unsigned nlep, ntau, ntaul;
714 if(nlep > 0xF) nlep = 0xF;
715 if(ntau > 0xF) ntau = 0xF;
716 if(ntaul > 0xF) ntaul = 0xF;
717 return (sample_code << 12) | (nlep << 8) | (ntaul << 4) | ntau;
722 vector<int> &true_had_taus, vector<int> &true_lep_taus) {
723 true_electrons.clear();
725 true_had_taus.clear();
726 true_lep_taus.clear();
727 bool tau_to_3tau(
false);
728 vector<int> lep_from_tau;
729 for(
unsigned i = 0; i <
mc_doc_id()->size(); ++i){
730 const int id =
static_cast<int>(floor(fabs(
mc_doc_id()->at(i))+0.5));
731 const int mom =
static_cast<int>(floor(fabs(
mc_doc_mother_id()->at(i))+0.5));
736 if((
id == 11 ||
id == 13) && (mom == 24 || (mom == 15 && (gmom == 24 || (gmom == 15 && ggmom == 24))))){
738 if (
id==11) true_electrons.push_back(i);
739 else if (
id==13) true_muons.push_back(i);
740 }
else if(!tau_to_3tau) {
742 for(uint j=i+1; j<
mc_doc_id()->size(); ++j) {
743 const int idb =
static_cast<int>(floor(fabs(
mc_doc_id()->at(j))+0.5));
744 const int momb =
static_cast<int>(floor(fabs(
mc_doc_mother_id()->at(j))+0.5));
745 if(momb==15 && (idb==11 || idb==13)) nlep++;
746 if(momb!=15 || (momb==15&&idb==16) || j==
mc_doc_id()->size()-1){
750 lep_from_tau.push_back(i);
758 if(
id == 15 && mom == 24){
759 true_had_taus.push_back(i);
762 if((
id == 15) && (mom == 15 && (gmom == 24 || (gmom == 15 && ggmom == 24)))){
764 for(uint j=i+1; j<
mc_doc_id()->size(); ++j) {
765 const int idb =
static_cast<int>(floor(fabs(
mc_doc_id()->at(j))+0.5));
766 const int momb =
static_cast<int>(floor(fabs(
mc_doc_mother_id()->at(j))+0.5));
767 if(momb==15 && idb==15) nlep++;
768 if(momb!=15 || (momb==15&&idb==16) || j==
mc_doc_id()->size()-1){
769 if(nlep>1) tau_to_3tau =
true;
777 for(
unsigned ind = 0; ind < lep_from_tau.size(); ++ind){
778 float minDr(9999.), lepEta(
mc_doc_eta()->at(lep_from_tau[ind])), lepPhi(
mc_doc_phi()->at(lep_from_tau[ind]));
780 for(
unsigned itau=0; itau < true_had_taus.size(); itau++){
782 float tauEta(
mc_doc_eta()->at(true_had_taus[itau])), tauPhi(
mc_doc_phi()->at(true_had_taus[itau]));
783 float tauDr(
dR(tauEta,lepEta, tauPhi,lepPhi));
790 true_lep_taus.push_back(imintau);
791 true_had_taus.erase(true_had_taus.begin()+imintau);
792 }
else cout<<
"Not found a tau match for lepton "<<ind<<endl;
798 return a.m() > b.m();
808 sm_float ll_m, ll_pt1, ll_pt2, ll_zpt;
824 }
else if(pdgid==13){
840 cout<<
"PDG ID "<<pdgid<<
" not supported in Setllmass, you silly."<<endl;
843 if((tree.*ll_m)() > 0)
return;
845 float px1(-1.), py1(-1.), pz1(-1.), energy1(-1.), px2(-1.), py2(-1.), pz2(-1.), energy2(-1.);
855 TLorentzVector lep1(px1, py1, pz1, energy1), lep2(px2, py2, pz2, energy2);
857 (tree.*ll_m)() = lep2.M();
858 (tree.*ll_zpt)() = lep2.Pt();
859 (tree.*ll_pt1)() = max(sqrt(px1*px1+py1*py1), sqrt(px2*px2+py2*py2));
860 (tree.*ll_pt2)() = min(sqrt(px1*px1+py1*py1), sqrt(px2*px2+py2*py2));
int const & nfjets() const
std::vector< float > *const & els_pt() const
float const & ntrupv_mean() const
float const & st_reliso() const
std::vector< float > *const & els_pz() const
virtual void GetEntry(const long entry)
std::vector< double > const & els_tru_pt() const
std::vector< float > const & jets_pt() const
float const & ht_nohf() const
int const & lep_charge() const
const std::string & SampleName() const
int const & nbm_ra2b() const
std::vector< float > const & mus_d0() const
std::vector< bool > const & els_ispf() const
static int GetMom(float id, float mom, float gmom, float ggmom, bool &fromW)
float const & trutop2_pt() const
std::vector< float > *const & els_eta() const
int const & nbm40() const
std::vector< float > const & jets_id() const
std::vector< TString > yes_trig
std::vector< float > *const & mus_tk_d0dum() const
std::vector< double > const & mus_genmt_fromw() const
std::vector< float > const & fjets08_phi() const
bool GetTriggerInfo(std::vector< TString > &trig_names, std::vector< bool > &trig_dec, std::vector< float > &trig_prescale)
long double GetMT(long double m1, long double pt1, long double phi1, long double m2, long double pt2, long double phi2)
bool IsSignalElectron(unsigned iel, bool mini=true) const
std::vector< float > const & jets_m() const
float const & elelv_pt2() const
std::vector< float > *const & PU_TrueNumInteractions() const
float const & genht() const
float const & met_mini_phi() const
int const & nvleps() const
int const & ntrutausl() const
Int_t const & cschalofilter_decision() const
int const & ntruleps() const
std::vector< float > *const & pfType1mets_default_et() const
std::vector< float > *const & mus_tk_vz() const
std::vector< float > const & mus_dz() const
std::vector< float > const & els_tru_dr() const
int GetTrueElectron(int index, int &momID, bool &fromW, float &closest_dR, double &els_mc_pt, double &els_mc_phi) const
Int_t const & HBHENoisefilter_decision() const
std::vector< bool > const & els_tight() const
int const & nbl40() const
int const & ntrumus() const
std::vector< float > const & els_reliso() const
Int_t const & goodVerticesfilter_decision() const
bool const & pass_hbhe() const
std::vector< float > *const & els_energy() const
std::vector< float > const & fjets08_poscsv() const
std::vector< float > *const & mc_final_grandmother_id() const
double const & gen_met_phi_fromw() const
float const & lep_pt() const
float const & weight() const
std::vector< float > *const & jets_parton_Id() const
std::vector< int > const & fjets_nconst() const
bool Contains(const std::string &text, const std::string &pattern)
float const & ht_hf() const
std::vector< float > const & jets_csv() const
std::vector< float > *const & mc_final_mother_id() const
std::vector< double > const & mus_tru_pt() const
std::vector< float > *const & mc_doc_id() const
std::vector< int > *const & PU_NumInteractions() const
std::vector< float > *const & pv_isFake() const
float const & elel_m() const
std::vector< float > *const & mc_final_pt() const
int const & nfjets08() const
std::vector< double > const & mus_genmt() const
std::vector< int > const & mus_tru_id() const
std::vector< float > *const & pv_y() const
float const & trutop2_phi() const
std::vector< int > *const & PU_bunchCrossing() const
void SetMiniIso(small_tree_quick &tree, int ilep, int ParticleType)
float const & mumu_zpt() const
std::vector< float > *const & pv_x() const
std::vector< float > *const & mus_charge() const
std::vector< int > const & fjets08_btags() const
float met_phi_corr() const
virtual ~event_handler_quick()
float const & mumu_pt2() const
std::vector< float > *const & els_px() const
float const & lep_eta_reliso() const
bool const & json_golden() const
bool IsVetoIdElectron(unsigned iel, bool do_iso=false) const
int const & ntrutaush() const
std::vector< float > *const & mc_doc_pt() const
int const & nleps_reliso() const
std::vector< double > const & els_tru_phi() const
std::vector< float > const & fjets08_eta() const
std::vector< float > *const & mus_miniso() const
int const & nmus_reliso() const
std::vector< float > const & els_eta() const
std::vector< float > *const & els_vz() const
std::vector< int > const & jets_fjet_index() const
Float_t const & mets_et() const
float const & elel_pt2() const
int const & lumiblock() const
std::vector< float > const & mus_phi() const
size_t GetNumJets(const std::vector< int > &good_jets, double pt_cut=0.0, double csv_cut=-std::numeric_limits< float >::max()) const
int const & nels_tru_prompt() const
float const & dphi_wlep() const
std::vector< float > const & jets_phi() const
int const & ntrupv() const
std::string execute(const std::string &cmd)
std::vector< float > const & fjets08_sumcsv() const
float GetMuonIsolation(unsigned imu, bool mini=true) const
float const & mumu_pt1() const
UInt_t const & event() const
double GetMinDeltaPhiMETN(unsigned maxjets, float mainpt, float maineta, float otherpt, float othereta, bool useArcsin) const
std::vector< float > *const & els_d0dum() const
std::vector< float > *const & mc_final_id() const
bool IsSignalIdMuon(unsigned iel) const
std::vector< float > const & els_miniso() const
std::vector< float > const & fjets08_pt() const
bool const & pass_eebadsc() const
Float_t const & genHT() const
Float_t const & mets_sumEt() const
int const & event() const
std::vector< bool > const & els_sigid() const
std::vector< int > const & fjets_btags() const
bool const & pass_jets() const
int const & nvels() const
std::vector< bool > const & trig() const
void GetTrueLeptons(std::vector< int > &true_electrons, std::vector< int > &true_muons, std::vector< int > &true_had_taus, std::vector< int > &true_lep_taus)
int const & ntruels() const
std::vector< float > const & fjets_m() const
Float_t const & mets_phi() const
bool IsIdElectron(unsigned iel, CutLevel threshold, bool do_iso=false) const
bool const & pass_goodv() const
std::vector< float > const & els_dz() const
std::vector< float > *const & mus_pt() const
void GetMatchedLeptons(const std::vector< int > &veto_mu, const std::vector< int > &veto_el, std::map< size_t, std::vector< size_t > > &mu_matches, std::map< size_t, std::vector< size_t > > &el_matches) const
std::vector< float > const & mus_eta() const
float const & mumuv_zpt() const
int const & nmus_tru_prompt() const
float const & elelv_pt1() const
std::vector< std::string > *const & standalone_triggerobject_collectionname() const
float const & met_phi() const
int const & nvels_reliso() const
bool IsSignalMuon(unsigned imu, bool mini=true) const
std::vector< float > const & mus_tru_dr() const
float const & met() const
int const & lep_charge_reliso() const
float const & lep_pt_reliso() const
std::vector< bool > const & mus_tru_tm() const
void WriteFatJets(int &nfjets, float &mj, std::vector< float > &fjets_pt, std::vector< float > &fjets_eta, std::vector< float > &fjets_phi, std::vector< float > &fjets_m, std::vector< int > &fjets_nconst, std::vector< float > &fjets_sumcsv, std::vector< float > &fjets_poscsv, std::vector< int > &fjets_btags, std::vector< int > &jets_fjet_index, double radius, const std::vector< int > &jets, bool gen=false, bool clean=false, const std::vector< bool > &to_clean=std::vector< bool >(0))
float const & mht_ra2b() const
int const & njets_nohf() const
float const & ht_reliso() const
int const & nleps() const
static void CountLeptons(const std::vector< mc_particle > &parts, const std::vector< size_t > &moms, unsigned &nleps, unsigned &ntaus, unsigned &ntauleps)
std::vector< float > const & mus_mt() const
std::vector< float > const & fjets_eta() const
UInt_t const & run() const
std::vector< int > GetJets(const std::vector< int > &VetoEl, const std::vector< int > &VetoMu, double pt_thresh, double eta_thresh) const
float const & trutop1_pt() const
std::vector< float > *const & mc_doc_eta() const
std::vector< float > const & mus_pt() const
std::vector< int > const & mus_charge() const
std::vector< float > const & els_sceta() const
event_handler_quick(const std::string &file_name)
float const & ht_ra2b() const
std::vector< double > const & els_genmt() const
float cross_section(const TString &file)
std::vector< float > *const & mus_tk_phi() const
float const & met_nohf_sumEt() const
static float MinVetoLeptonPt
int const & njets_ra2b() const
std::vector< float > *const & pv_z() const
int const & njets40() const
float const & lep_phi() const
std::vector< float > *const & jets_btag_inc_secVertexCombined() const
std::vector< float > *const & mc_final_phi() const
float const & mht() const
std::vector< float > const & fjets_sumcsv() const
std::vector< int > GetMuons(bool doSignal=true, bool mini=true) const
static std::vector< fastjet::PseudoJet > sorted_by_m(std::vector< fastjet::PseudoJet > pjs)
std::vector< float > *const & mc_doc_status() const
std::vector< float > *const & mc_doc_phi() const
std::vector< float > const & fjets08_m() const
float dR(float eta1, float eta2, float phi1, float phi2)
int const & nbt40() const
float const & lep_eta() const
bool IsSignalIdElectron(unsigned iel, bool do_iso=false) const
float const & lep_phi_reliso() const
float const & mumuv_m() const
std::vector< float > *const & els_py() const
std::vector< int > GetElectrons(bool doSignal=true, bool mini=true) const
std::vector< int > const & mus_tru_momid() const
float const & elel_zpt() const
std::vector< float > const & mus_reliso() const
int const & ntrunus_fromw() const
std::vector< float > const & fjets_poscsv() const
std::vector< float > *const & mus_px() const
float const & met_hf() const
std::vector< float > *const & els_miniso() const
std::vector< double > const & els_genmt_fromw() const
std::vector< float > *const & mus_energy() const
float const & elel_pt1() const
int const & nvmus_reliso() const
void Setllmass(small_tree_quick &tree, size_t id1, size_t id2, int pdgid, bool isSig)
std::string *const & model_params() const
float const & onmaxel() const
std::vector< float > *const & pv_ndof() const
std::vector< float > *const & mus_eta() const
bool const & pass_cschalo() const
int const & njets() const
std::vector< float > *const & mus_phi() const
bool PassesJSONCut(TString type)
float const & elelv_m() const
float const & onmaxmu() const
int const & njets_hf() const
Int_t const & eebadscfilter_decision() const
std::string RemoveTrailingNewlines(std::string str)
std::vector< bool > const & mus_sigid() const
float const & onht() const
std::vector< float > *const & mc_doc_ggrandmother_id() const
double GetMHT(const std::vector< int > &good_jets, double pt_cut) const
std::vector< float > const & els_phi() const
bool const & pass() const
float const & met_mini() const
std::vector< float > const & els_mt() const
float const & wpu() const
std::vector< float > *const & els_scEta() const
std::vector< float > *const & mc_jets_phi() const
std::vector< float > *const & mc_jets_eta() const
std::vector< int > const & fjets08_nconst() const
std::vector< float > *const & mus_py() const
std::vector< float > *const & mc_doc_grandmother_id() const
std::vector< float > const & els_d0() const
std::vector< float > *const & standalone_triggerobject_pt() const
bool AllGoodJets(const std::vector< int > &VetoEl, const std::vector< int > &VetoMu, double pt_thresh, double eta_thresh) const
float const & mindphin_metjet() const
double const & gen_met_phi() const
std::vector< int > const & els_tru_momid() const
float const & mj08() const
std::vector< float > *const & mc_jets_pt() const
UInt_t const & lumiblock() const
float const & mumu_m() const
std::vector< float > *const & mc_doc_mother_id() const
virtual void ReduceTree(int num_entries, const TString &out_file_name, int num_total_entries)
std::vector< float > const & trig_prescale() const
const std::vector< TLorentzVector > & jets_corr_p4() const
bool IsVetoIdMuon(unsigned iel) const
float const & met_nohf() const
float const & met_hf_phi() const
int const & nels_reliso() const
long double DeltaPhi(long double phi1, long double phi2)
std::vector< int > const & els_tru_id() const
std::vector< float > *const & mc_final_ggrandmother_id() const
float const & mumuv_pt2() const
float const & mumuv_pt1() const
double const & gen_met_fromw() const
std::vector< bool > *const & els_isPF() const
std::vector< float > *const & mus_pz() const
bool IsIdMuon(unsigned imu, CutLevel threshold) const
int const & ntrumeisr() const
static bool greater_m(const fastjet::PseudoJet &a, const fastjet::PseudoJet &b)
int const & ntrunus() const
std::vector< float > *const & els_phi() const
std::vector< float > const & jets_eta() const
float const & met_nohf_phi() const
std::vector< float > const & mus_miniso() const
unsigned TypeCode(const std::vector< mc_particle > &parts, const std::vector< size_t > &moms)
UInt_t const & Npv() const
std::vector< double > const & mus_tru_phi() const
float GetElectronIsolation(unsigned iel, bool mini=true) const
int GetTrueMuon(int index, int &momID, bool &fromW, float &closest_dR, double &mus_mc_pt, double &mus_mc_phi) const
float const & trutop1_phi() const
std::vector< float > *const & els_tk_phi() const
virtual std::string Type() const
std::vector< float > const & fjets_phi() const
std::vector< float > const & els_pt() const
std::vector< int > const & jets_fjet08_index() const
std::vector< bool > const & els_tru_tm() const
double GetHT(const std::vector< int > &good_jets, double pt_cut=0.0) const
std::vector< int > const & els_charge() const
float const & elelv_zpt() const
std::vector< float > *const & els_charge() const
float const & ht_hlt() const
float const & mt_reliso() const
float const & dphi_wlep_reliso() const
float const & ht40() const
bool const & hfjet() const
double const & gen_met() const
std::vector< float > *const & mc_jets_energy() const
std::vector< bool > const & mus_tight() const
std::vector< float > const & fjets_pt() const
int const & nvmus() const
float const & onmet() const
Float_t const & weight() const
long double AddInQuadrature(long double x, long double y)
std::vector< bool > const & jets_islep() const
float GetMinMTWb(const std::vector< int > &good_jets, const double pt_cut, const double bTag_req, const bool use_W_mass) const