15 #include "TLorentzVector.h" 45 int id,
int mom,
int gmom,
int ggmom,
48 charge_(TMath::Nint(3.*charge)),
58 int id_,
mom_, gmom_, ggmom_;
71 virtual void GetEntry(
const long entry);
73 bool GetTriggerInfo(std::vector<TString> &trig_names, std::vector<bool> &trig_dec,
74 std::vector<float> &trig_prescale);
76 bool PassesJSONCut(TString type);
78 std::vector<int> GetMuons(
bool doSignal =
true,
bool mini =
true)
const;
80 bool IsSignalMuon(
unsigned imu,
bool mini =
true)
const;
81 bool IsVetoMuon(
unsigned imu,
bool mini =
true)
const;
82 bool IsSignalIdMuon(
unsigned iel)
const;
83 bool IsVetoIdMuon(
unsigned iel)
const;
85 bool IsIdMuon(
unsigned imu,
CutLevel threshold)
const;
87 float GetMuonIsolation(
unsigned imu,
bool mini=
true)
const;
90 std::vector<int> GetElectrons(
bool doSignal =
true,
bool mini =
true)
const;
92 bool IsSignalElectron(
unsigned iel,
bool mini =
true)
const;
93 bool IsVetoElectron(
unsigned iel,
bool mini =
true)
const;
94 bool IsSignalIdElectron(
unsigned iel,
bool do_iso=
false)
const;
95 bool IsVetoIdElectron(
unsigned iel,
bool do_iso=
false)
const;
97 bool IsIdElectron(
unsigned iel,
CutLevel threshold,
bool do_iso=
false)
const;
99 float GetElectronIsolation(
unsigned iel,
bool mini=
true)
const;
100 float GetEffectiveArea(
float SCEta,
bool isMC)
const;
103 static int GetMom(
float id,
float mom,
float gmom,
float ggmom,
105 void GetBestLepton(
bool &is_muon,
size_t &index);
106 double GetMiniIsolation(
int particle_type,
int ilep,
double riso_min = 0.05,
double riso_max = 0.2,
107 bool add_ph =
true,
bool add_nh =
true,
bool add_ch =
true,
108 bool use_pf_weight =
false,
double kt_scale = 10.)
const;
111 bool PassPhys14TauID(
const int itau,
const bool againstEMu,
const bool mt_cut)
const;
113 bool IsGoodIsoTrack(
unsigned itrk,
bool mt_cut)
const;
116 float met_corr()
const;
117 float met_phi_corr()
const;
120 std::vector<int> GetJets(
const std::vector<int> &VetoEl,
const std::vector<int> &VetoMu,
121 double pt_thresh,
double eta_thresh)
const;
122 bool AllGoodJets(
const std::vector<int> &VetoEl,
const std::vector<int> &VetoMu,
123 double pt_thresh,
double eta_thresh)
const;
124 void GetMatchedLeptons(
const std::vector<int> &veto_mu,
125 const std::vector<int> &veto_el,
126 std::map<
size_t,std::vector<size_t> > &mu_matches,
127 std::map<
size_t,std::vector<size_t> > &el_matches)
const;
129 std::vector<Jet> GetSubtractedJets(
const std::vector<int> &veto_el,
const std::vector<int> &veto_mu,
130 double pt_thresh,
double eta_thresh)
const;
131 bool IsGoodJet(
unsigned ijet,
double ptThresh,
double etaThresh)
const;
132 bool IsBasicJet(
unsigned ijet)
const;
133 const std::vector<TLorentzVector> & jets_corr_p4()
const;
134 std::vector<TLorentzVector> & jets_corr_p4();
137 int GetTrueElectron(
int index,
int &momID,
bool &fromW,
float &closest_dR,
double &els_mc_pt,
double &els_mc_phi)
const;
138 int GetTrueMuon(
int index,
int &momID,
bool &fromW,
float &closest_dR,
double &mus_mc_pt,
double &mus_mc_phi)
const;
139 int GetTrueParticle(
float RecPt,
float RecEta,
float RecPhi,
float &closest_dR,
int ID)
const;
140 std::vector<mc_particle> GetMCParticles()
const;
141 size_t MatchCandToStatus1(
size_t icand,
142 const std::vector<mc_particle> &parts)
const;
143 static size_t GetMom(
size_t index,
const std::vector<mc_particle> &parts);
144 static std::vector<size_t> GetMoms(
const std::vector<mc_particle> &parts);
145 static bool IsBrem(
size_t index,
146 const std::vector<mc_particle> &parts,
147 const std::vector<size_t> &moms);
148 static bool FromStatus23(
size_t index,
149 const std::vector<mc_particle> &parts,
150 const std::vector<size_t> &moms);
151 static bool FromTop(
size_t index,
152 const std::vector<mc_particle> &parts,
153 const std::vector<size_t> &moms);
154 static bool FromW(
size_t index,
155 const std::vector<mc_particle> &parts,
156 const std::vector<size_t> &moms);
157 static bool FromTau(
size_t index,
158 const std::vector<mc_particle> &parts,
159 const std::vector<size_t> &moms);
160 static bool FromTauLep(
size_t index,
161 const std::vector<mc_particle> &parts,
162 const std::vector<size_t> &moms);
163 static unsigned NumChildren(
size_t index,
164 const std::vector<mc_particle> &parts,
165 const std::vector<size_t> &moms,
167 static unsigned NumDescendants(
size_t index,
168 const std::vector<mc_particle> &parts,
169 const std::vector<size_t> &moms,
171 static bool IsDescendantOf(
size_t descendant,
size_t ancestor,
172 const std::vector<size_t> &moms);
173 static unsigned ParentTauDescendants(
size_t index,
174 const std::vector<mc_particle> &parts,
175 const std::vector<size_t> &moms);
176 static size_t ParentW(
size_t index,
177 const std::vector<mc_particle> &parts,
178 const std::vector<size_t> &moms);
179 static size_t ParentTau(
size_t index,
180 const std::vector<mc_particle> &parts,
181 const std::vector<size_t> &moms);
182 static void CountLeptons(
const std::vector<mc_particle> &parts,
183 const std::vector<size_t> &moms,
189 bool PassesMETCleaningCut()
const;
190 bool PassesPVCut()
const;
191 double getDZ(
double vx,
double vy,
double vz,
double px,
double py,
double pz,
int firstGoodVertex)
const;
194 long double SumDeltaPhi(
long double phi_x,
long double phi_a,
long double phi_b);
195 double GetDeltaPhiMETN(
unsigned goodJetI,
float otherpt,
float othereta,
bool useArcsin)
const;
196 double GetDeltaPhiMETN_deltaT(
unsigned goodJetI,
float otherpt,
float othereta)
const;
197 double GetMinDeltaPhiMETN(
unsigned maxjets,
float mainpt,
float maineta,
198 float otherpt,
float othereta,
bool useArcsin)
const;
199 double GetHT(
const std::vector<int> &good_jets,
double pt_cut=0.0)
const;
200 double GetMHT(
const std::vector<int> &good_jets,
double pt_cut)
const;
201 size_t GetNumJets(
const std::vector<int> &good_jets,
203 double csv_cut=-std::numeric_limits<float>::max())
const;
204 static double GetSphericity(
const std::vector<TLorentzVector> &vs);
210 void GetLeadingBJets(
const std::vector<int> &good_jets,
211 double pt_cut,
double csv_cut,
212 size_t &lead,
size_t &sub);
241 void CorrectJets()
const;
std::vector< TString > yes_trig
FactorizedJetCorrector * jet_corrector_
mc_particle(const TLorentzVector &momentum, float charge, int id, int mom, int gmom, int ggmom, int status)
T chooseVal(CutLevel threshold, T valVeto, T valLoose, T valMedium, T valTight) const
static float MinVetoLeptonPt
std::vector< TLorentzVector > jets_corr_p4_