Skip to content

Commit

Permalink
Merge pull request #75 from OlivierBondu/hww_lepton_ID
Browse files Browse the repository at this point in the history
Hww and medium lepton ID
  • Loading branch information
BrieucF committed Jan 30, 2016
2 parents d322172 + b9848c4 commit 2b9dea4
Show file tree
Hide file tree
Showing 6 changed files with 285 additions and 327 deletions.
7 changes: 7 additions & 0 deletions interface/HHAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class HHAnalyzer: public Framework::Analyzer {
m_leadingElectronPtCut = config.getUntrackedParameter<double>("leadingElectronPtCut", 20);
m_subleadingElectronPtCut = config.getUntrackedParameter<double>("subleadingElectronPtCut", 15);
m_electron_loose_wp_name = config.getUntrackedParameter<std::string>("electrons_loose_wp_name", "cutBasedElectronID-Spring15-50ns-V1-standalone-loose");
m_electron_medium_wp_name = config.getUntrackedParameter<std::string>("electrons_medium_wp_name", "cutBasedElectronID-Spring15-50ns-V1-standalone-medium");
m_electron_tight_wp_name = config.getUntrackedParameter<std::string>("electrons_tight_wp_name", "cutBasedElectronID-Spring15-50ns-V1-standalone-tight");

m_jetEtaCut = config.getUntrackedParameter<double>("jetEtaCut", 2.4);
Expand Down Expand Up @@ -79,6 +80,11 @@ class HHAnalyzer: public Framework::Analyzer {
BRANCH(llmetjj_allTight_nobtag_ht, std::vector<HH::DileptonMetDijet>);
BRANCH(llmetjj_allTight_nobtag_pt, std::vector<HH::DileptonMetDijet>);
BRANCH(llmetjj_allTight_nobtag_csv, std::vector<HH::DileptonMetDijet>);
// Januray 2016: preapproval freezing custom candidates
BRANCH(llmetjj_HWWleptons_nobtag_csv, std::vector<HH::DileptonMetDijet>);
BRANCH(llmetjj_HWWleptons_btagL_csv, std::vector<HH::DileptonMetDijet>);
BRANCH(llmetjj_HWWleptons_btagM_csv, std::vector<HH::DileptonMetDijet>);
BRANCH(llmetjj_HWWleptons_btagT_csv, std::vector<HH::DileptonMetDijet>);

// maps
std::vector<std::vector<int>>& map_l = tree["map_l"].write_with_init<std::vector<std::vector<int>>>(lepID::Count * lepIso::Count, std::vector<int>(0));
Expand Down Expand Up @@ -126,6 +132,7 @@ class HHAnalyzer: public Framework::Analyzer {
float m_hltDRCut, m_hltDPtCut;
std::string m_jet_bDiscrName;
std::string m_electron_loose_wp_name;
std::string m_electron_medium_wp_name;
std::string m_electron_tight_wp_name;
bool m_applyBJetRegression;
std::map<std::string, ScaleFactor> m_hlt_efficiencies;
Expand Down
22 changes: 11 additions & 11 deletions interface/Indices.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ namespace HHAnalysis {

// lepton IDs
namespace lepID {
enum lepID{ L, T, Count };
enum lepID{ L, M, T, HWW, Count };
// Ugly way to allow iterating over all items in the enumeration ( for(const lepID::lepID& id: lepID::it) )
const std::array<lepID, Count> it = {{ L, T }};
const std::array<lepID, Count> it = {{ L, M, T, HWW }};
// Is useful in categories to construct cut strings out of each working point
const std::map<lepID, std::string> map = { {L, "L"}, {T, "T"} };
const std::map<lepID, std::string> map = { {L, "L"}, {M, "M"}, {T, "T"}, {HWW, "HWW"} };
}

// lepton Isolation
namespace lepIso {
enum lepIso{ no, L, T, Count };
const std::array<lepIso, Count> it = {{ no, L, T }};
const std::map<lepIso, std::string> map = { {no, "no"}, {L, "L"}, {T, "T"} };
enum lepIso{ no, L, T, HWW, Count };
const std::array<lepIso, Count> it = {{ no, L, T, HWW }};
const std::map<lepIso, std::string> map = { {no, "no"}, {L, "L"}, {T, "T"}, {HWW, "HWW"} };
}

// Combination of lepton ID + lepton Isolation for a single lepton
Expand Down Expand Up @@ -51,16 +51,16 @@ namespace HHAnalysis {
const std::map<jetPair, std::string> map = { {ht, "ht"}, {mh, "mh"}, {pt, "pt"}, {csv, "csv"}, {jp, "jp"}, {ptOverM, "ptOverM"} };
}

// Combination of jet ID and B-tagging working point for one jet (not yet available)
// Combination of jet ID and B-tagging working point for one jet
uint16_t jetIDbtagWP(const jetID::jetID& id, const btagWP::btagWP& wp);
std::string jetIDbtagWPStr(const jetID::jetID& id, const btagWP::btagWP& wp);

// Combination of jet ID and B-tagging working points for two jets
uint16_t jetjetIDbtagWP(const jetID::jetID& id1, const jetID::jetID& id2, const btagWP::btagWP& wp1, const btagWP::btagWP& wp2);
std::string jetjetIDbtagWPStr(const jetID::jetID& id1, const jetID::jetID& id2, const btagWP::btagWP& wp1, const btagWP::btagWP& wp2);
uint16_t jetjetIDbtagWPPair(const jetID::jetID& id1, const btagWP::btagWP& wp1, const jetID::jetID& id2, const btagWP::btagWP& wp2, const jetPair::jetPair& jetpair);
std::string jetjetIDbtagWPPairStr(const jetID::jetID& id1, const btagWP::btagWP& wp1, const jetID::jetID& id2, const btagWP::btagWP& wp2, const jetPair::jetPair& jetpair);

// Combination of lepton ID, lepton Isolation, jet ID, B-tagging working points and jetPair ordering for a two-lepton-two-b-jets object
uint16_t leplepIDIsojetjetIDbtagWPPair(const lepID::lepID& id1, const lepIso::lepIso& iso1, const lepID::lepID& id2, const lepIso::lepIso& iso2, const jetID::jetID& jetid1, const jetID::jetID& jetid2, const btagWP::btagWP& wp1, const btagWP::btagWP& wp2, const jetPair::jetPair& jetpair);
std::string leplepIDIsojetjetIDbtagWPPairStr(const lepID::lepID& id1, const lepIso::lepIso& iso1, const lepID::lepID& id2, const lepIso::lepIso& iso2, const jetID::jetID& jetid1, const jetID::jetID& jetid2, const btagWP::btagWP& wp1, const btagWP::btagWP& wp2, const jetPair::jetPair& jetpair);
uint16_t leplepIDIsojetjetIDbtagWPPair(const lepID::lepID& id1, const lepIso::lepIso& iso1, const lepID::lepID& id2, const lepIso::lepIso& iso2, const jetID::jetID& jetid1, const btagWP::btagWP& wp1, const jetID::jetID& jetid2, const btagWP::btagWP& wp2, const jetPair::jetPair& jetpair);
std::string leplepIDIsojetjetIDbtagWPPairStr(const lepID::lepID& id1, const lepIso::lepIso& iso1, const lepID::lepID& id2, const lepIso::lepIso& iso2, const jetID::jetID& jetid1, const btagWP::btagWP& wp1, const jetID::jetID& jetid2, const btagWP::btagWP& wp2, const jetPair::jetPair& jetpair);

}
20 changes: 20 additions & 0 deletions interface/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ namespace HH {
bool isMu;
bool isEl;
bool id_L; // Loose
bool id_M; // Medium
bool id_T; // Tight
bool id_HWW; // HWW-like id
bool iso_L; // Loose
bool iso_T; // Tight
bool iso_HWW;
bool gen_matched;
float gen_DR;
float gen_DPtOverPt;
Expand All @@ -41,13 +44,30 @@ namespace HH {
bool isMuEl;
bool isSF; // Same Flavour
bool id_LL;
bool id_LM;
bool id_LT;
bool id_LHWW;
bool id_ML;
bool id_MM;
bool id_MT;
bool id_MHWW;
bool id_TL;
bool id_TM;
bool id_TT;
bool id_THWW;
bool id_HWWL;
bool id_HWWM;
bool id_HWWT;
bool id_HWWHWW;
bool iso_LL;
bool iso_LT;
bool iso_LHWW;
bool iso_TL;
bool iso_TT;
bool iso_THWW;
bool iso_HWWL;
bool iso_HWWT;
bool iso_HWWHWW;
float DR_l_l;
float DPhi_l_l;
bool gen_matched;
Expand Down
Loading

0 comments on commit 2b9dea4

Please sign in to comment.