CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
HWWFunctions Namespace Reference

Namespaces

 wp2012
 

Classes

struct  mu2012_tightness
 

Typedefs

typedef
ROOT::Math::LorentzVector
< ROOT::Math::PxPyPzE4D< float > > 
LorentzVector
 

Enumerations

enum  cand_tightness { CAND_01, CAND_02 }
 
enum  cic_tightness {
  CIC_VERYLOOSE, CIC_LOOSE, CIC_MEDIUM, CIC_TIGHT,
  CIC_SUPERTIGHT, CIC_HYPERTIGHT1, CIC_HYPERTIGHT2, CIC_HYPERTIGHT3,
  CIC_HYPERTIGHT4
}
 
enum  EgammaElectronType { ISECALENERGYCORRECTED, ISMOMENTUMCORRECTED, ISECALDRIVEN, ISTRACKERDRIVEN }
 
enum  EgammaFiduciality {
  ISEB, ISEBEEGAP, ISEE, ISEEGAP,
  ISEBETAGAP, ISEBPHIGAP, ISEEDEEGAP, ISEERINGGAP,
  ISGAP
}
 
enum  ElectronIDComponent { ELEID_ID, ELEID_ISO, ELEID_CONV, ELEID_IP }
 
enum  EleSelectionType {
  ELEISO_REL010, ELEISO_REL015, ELEISO_REL040, ELEISO_REL100,
  ELEISO_REL010_WW, ELEISO_REL040_WW, ELEISO_REL100_WW, ELEISO_SMURFV4,
  ELEISO_SMURFV5, ELEISO_RELNT010, ELEISO_RELNT015, ELEISO_RELNT040,
  ELEISO_TRK_RELNT020, ELEISO_ECAL_RELNT020, ELEISO_ECAL_RELNT020_NPS, ELEISO_HCAL_RELNT020,
  ELEISO_ECAL_REL020, ELEISO_HCAL_REL020, ELEISO_FASTJET_REL005, ELEISO_FASTJET_REL010,
  ELEISO_FASTJET_REL015, ELEISO_COR_RELNT010, ELEIP_200, ELEIP_400,
  ELEIP_PV_200, ELEIP_PV_wwV1, ELEIP_PV_SMURFV3, ELEIP_PV_DZ_1MM,
  ELEIP_PV_OSV2, ELEIP_PV_OSV2_FO, ELEIP_SS200, ELEID_SMURFV1_EXTRA,
  ELEID_SMURFV2_EXTRA, ELEID_SMURFV3_EXTRA, ELEID_VBTF_35X_95, ELEID_VBTF_35X_90,
  ELEID_VBTF_35X_80, ELEID_VBTF_80_NOHOEEND, ELEID_VBTF_85_NOHOEEND, ELEID_VBTF_85,
  ELEID_VBTF_70_NOHOEEND, ELEID_VBTF_90_HLT, ELEID_VBTF_90_HLT_CALOIDT_TRKIDVL, ELEID_CIC_V03_MEDIUM,
  ELEID_VBTF_95_NOHOEEND, ELEID_WP2012_MEDIUM_NOISO, ELEID_WP2012_MEDIUM_NOISO_NOIP, ELEID_WP2012_LOOSE_NOISO,
  ELENOTCONV_MIT, ELENOTCONV_DISTDCOT002, ELENOTCONV_HITPATTERN_0MHITS, ELEETA_250,
  ELEETA_240, ELEPT_010, ELENOMUON_010, ELENOMUON_010_SS,
  ELESEED_ECAL, ELECHARGE_NOTFLIP3AGREE, ELE_NOT_TRANSITION, ELE_LAST
}
 
enum  HypothesisType {
  MM, ME, EM, EE,
  ALL
}
 
enum  HypTypeInNtuples { MuMu, MuEl, ElMu, ElEl }
 
enum  SelectionType {
  NominalWWV0, muonSelectionFO_mu_ww, muonSelectionFO_mu_ww_iso10, NominalWWV1,
  muonSelectionFO_mu_wwV1, muonSelectionFO_mu_wwV1_iso10, muonSelectionFO_mu_wwV1_iso10_d0, NominalSmurfV3,
  NominalSmurfV4, NominalSmurfV5, NominalSmurfV6, muonSelectionFO_mu_smurf_04,
  muonSelectionFO_mu_smurf_10
}
 
enum  vbtf_tightness {
  VBTF_35X_95, VBTF_35X_90, VBTF_35X_85, VBTF_35X_80,
  VBTF_35X_70, VBTF_35X_60, VBTF_35Xr2_70, VBTF_35Xr2_60,
  VBTF_80_NOHOEEND, VBTF_85_NOHOEEND, VBTF_85, VBTF_70_NOHOEEND,
  VBTF_90_HLT, VBTF_90_HLT_CALOIDT_TRKIDVL, VBTF_95_NOHOEEND
}
 
enum  wp2012_tightness { VETO, LOOSE, MEDIUM, TIGHT }
 

Functions

int bestHypothesis (HWW &hww, const std::vector< int > &)
 
void checkElectronSelections (void)
 
Bool_t comparePt (JetPair lv1, JetPair lv2)
 
bool defaultBTag (HWW &hww, unsigned int, float)
 
void doCutFlow (HWW &, int, EventMonitor::hypo_monitor &, EGammaMvaEleEstimator *, MuonMVAEstimator *)
 
double dzPV (const LorentzVector &vtx, const LorentzVector &p4, const LorentzVector &pv)
 
double dzPV_mu (HWW &hww, const LorentzVector &vtx, const LorentzVector &p4, const LorentzVector &pv)
 
void eidAssign (std::vector< double > &cutarr, double cutvals[], unsigned int size)
 
void eidAssign (std::vector< int > &cutarr, int cutvals[], unsigned int size)
 
void eidAssign (std::vector< bool > &cutarr, bool cutvals[], unsigned int size)
 
void eidGetVBTF (const vbtf_tightness tightness, std::vector< double > &cutdeta, std::vector< double > &cutdphi, std::vector< double > &cuthoe, std::vector< double > &cutsee, std::vector< double > &cutreliso)
 
void eidGetWP2012 (const wp2012_tightness tightness, std::vector< double > &cutdeta, std::vector< double > &cutdphi, std::vector< double > &cuthoe, std::vector< double > &cutsee, std::vector< double > &cutooemoop, std::vector< double > &cutd0vtx, std::vector< double > &cutdzvtx, std::vector< bool > &cutvtxfit, std::vector< int > &cutmhit, std::vector< double > &cutrelisohighpt, std::vector< double > &cutrelisolowpt)
 
double electron_d0PV_smurfV3 (HWW &, unsigned int index)
 
double electron_d0PV_wwV1 (HWW &, unsigned int index)
 
double electron_dzPV_smurfV3 (HWW &, unsigned int index)
 
double electron_dzPV_wwV1 (HWW &, unsigned int index)
 
void electronCorrection_pos (HWW &, const unsigned int index, float &dEtaIn, float &dPhiIn)
 
bool ElectronFOIdV4 (HWW &hww, unsigned int i)
 
bool ElectronFOV4 (HWW &hww, unsigned int i)
 
electronIdComponent_t electronId_CIC (HWW &, const unsigned int index, const unsigned int version, const cic_tightness tightness, bool applyAlignementCorrection=false, bool removedEtaCutInEndcap=false)
 
bool electronId_smurf_v1 (HWW &, const unsigned int index)
 
bool electronId_smurf_v2 (HWW &, const unsigned int index)
 
bool electronId_smurf_v3 (HWW &, const unsigned int index)
 
electronIdComponent_t electronId_VBTF (HWW &, const unsigned int index, const vbtf_tightness tightness, bool applyAlignementCorrection=false, bool removedEtaCutInEndcap=false)
 
electronIdComponent_t electronId_WP2012 (HWW &, const unsigned int index, const wp2012_tightness tightness)
 
electronIdComponent_t electronId_WP2012_noIso_useElEtaForIsEB (HWW &, const unsigned int index, const wp2012_tightness tightness)
 
electronIdComponent_t electronId_WP2012_v2 (HWW &, const unsigned int index, const wp2012_tightness tightness, bool useOldIsolation=false)
 
electronIdComponent_t electronId_WP2012_v3 (HWW &, const unsigned int index, const wp2012_tightness tightness, bool useOldIsolation=false)
 
float electronIsolation_rel (HWW &, const unsigned int index, bool use_calo_iso)
 
float electronIsoValuePF (HWW &, const unsigned int iel, unsigned int ivtx, float coner=0.4, float minptn=1.0, float dzcut=0.1, float footprintdr=0.07, float gammastripveto=0.025, float elestripveto=-999., int filterId=0)
 
void electronIsoValuePF2012 (HWW &, float &pfiso_ch, float &pfiso_em, float &pfiso_nh, const float R, const unsigned int iel, const int ivtx, bool barrelVetoes=false)
 
float electronIsoValuePF2012_FastJetEffArea (HWW &, int index, float conesize=0.3, int ivtx=0)
 
float electronIsoValuePF2012_FastJetEffArea_HWW (HWW &, int index)
 
float electronIsoValuePF2012_FastJetEffArea_v2 (HWW &, int index, float conesize=0.3, int ivtx=0, bool useOldIsolation=false)
 
float electronIsoValuePF2012_FastJetEffArea_v3 (HWW &, int index, float conesize=0.3, int ivtx=0, bool useOldIsolation=false)
 
void electronIsoValuePF2012reco (HWW &, float &pfiso_ch, float &pfiso_em, float &pfiso_nh, const float R, const unsigned int iel, const int ivtx, float neutral_threshold=0.5)
 
float electronRadialIsolation (HWW &, int index, float &chiso, float &nhiso, float &emiso, float neutral_et_threshold=1.0, float cone_size=0.3, bool barrelVetoes=false, bool verbose=false)
 
cuts_t electronSelection (HWW &, const unsigned int index, bool applyAlignmentCorrection=false, bool removedEtaCutInEndcap=false, bool useGsfTrack=true)
 
bool fakableElectron (HWW &hww, unsigned int i, EleFOTypes)
 
bool fakableMuon (HWW &hww, unsigned int i, MuFOTypes, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
 
float fastJetEffArea04_v1 (const float eta)
 
float fastJetEffArea04_v1 (HWW &, const float eta)
 
std::vector< JetPairgetDefaultJets (HWW &hww, unsigned int, bool)
 
std::vector< LeptonPairgetExtraLeptons (HWW &hww, int i_hyp, double minPt, bool useLHeleId, int useMVAeleId, EGammaMvaEleEstimator *egammaMvaEleEstimator, bool useMVAmuId, MuonIDMVA *mumva, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
 
bool getGoodMVAs (HWW &, std::vector< float > &goodmvas, std::string variable)
 
bool getGoodMVAs (HWW &hww, vector< float > &goodmvas, string variable)
 
HypothesisType getHypothesisType (HypTypeInNtuples type)
 
HypothesisType getHypothesisType (HWW &, unsigned int)
 
HypothesisType getHypothesisType (unsigned int type)
 
HypothesisType getHypothesisTypeNew (HWW &, unsigned int i_hyp)
 
std::vector< JetPairgetJets (HWW &hww, int, double, double, bool, bool)
 
bool goodElectronIsolated (HWW &hww, unsigned int i, bool useLHeleId, int useMVAeleId, EGammaMvaEleEstimator *egammaMvaEleEstimator, bool lockToCoreSelectors)
 
bool goodElectronTMVA (HWW &hww, EGammaMvaEleEstimator *egammaMvaEleEstimator, int useMVAeleId, unsigned int i)
 
bool goodElectronWithoutIsolation (HWW &hww, unsigned int i, bool useLHeleId, int useMVAeleId, EGammaMvaEleEstimator *egammaMvaEleEstimator)
 
bool goodMuonIsolated (HWW &hww, unsigned int i, bool lockToCoreSelectors, bool useMVAmuId, MuonIDMVA *mva, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
 
bool goodMuonTMVA (HWW &hww, MuonIDMVA *mva, unsigned int i)
 
bool goodMuonWithoutIsolation (HWW &hww, unsigned int i, bool useMVAmuId, MuonIDMVA *mva, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
 
std::pair< double, double > gsftrks_d0_pv (HWW &, int itrk, int ipv)
 
std::pair< double, double > gsftrks_dz_pv (HWW &, int itrk, int ipv)
 
const char * HypothesisTypeName (HypothesisType type)
 
const char * HypothesisTypeName (unsigned int type)
 
bool isChargeFlip3agree (HWW &, int elIndex)
 
bool isFromConversionHitPattern (HWW &, const unsigned int index)
 
bool isFromConversionMIT (HWW &, const unsigned int index)
 
bool isFromConversionPartnerTrack (HWW &, const unsigned int index)
 
bool isGoodStandardMuon (HWW &, unsigned int index)
 
bool isGoodVertex (HWW &hww, int)
 
bool isMITConversion (HWW &, unsigned int elidx, int nWrongHitsMax, float probMin, float dlMin, bool matchCTF, bool requireArbitratedMerged)
 
bool isPFMuon (HWW &, int index, bool requireSamePt=true, float dpt_max=1.0)
 
bool isSpikeElectron (HWW &, const unsigned int index)
 
double mud0PV (HWW &, unsigned int index)
 
double mud0PV_smurfV3 (HWW &, unsigned int index)
 
double mud0PV_wwV1 (HWW &, unsigned int index)
 
double mudzPV_smurfV3 (HWW &, unsigned int index)
 
double mudzPV_wwV1 (HWW &, unsigned int index)
 
bool MuonFOV2 (HWW &hww, unsigned int i, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
 
bool muonId (HWW &, unsigned int index, SelectionType type)
 
bool muonIdNotIsolated (HWW &, unsigned int index, SelectionType type)
 
double muonIsoValue (HWW &, unsigned int, bool=true)
 
double muonIsoValue_ECAL (HWW &, unsigned int, bool=true)
 
double muonIsoValue_HCAL (HWW &, unsigned int, bool=true)
 
double muonIsoValue_TRK (HWW &, unsigned int, bool=true)
 
double muonIsoValuePF (HWW &, unsigned int imu, unsigned int ivtx, float coner=0.4, float minptn=1.0, float dzcut=0.1, int filterId=0)
 
double nearestDeltaPhi (HWW &hww, double Phi, int i_hyp)
 
unsigned int nGoodVertex (HWW &hww)
 
unsigned int numberOfExtraLeptons (HWW &hww, int i_hyp, double minPt, bool useLHeleId, int useMVAeleId, EGammaMvaEleEstimator *egammaMvaEleEstimator, bool useMVAmuId, MuonIDMVA *mumva, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
 
unsigned int numberOfJets (HWW &hww, unsigned int)
 
unsigned int numberOfSoftMuons (HWW &hww, int i_hyp, bool nonisolated)
 
bool pass_electronSelection (HWW &, const unsigned int index, const cuts_t selectionType, bool applyAlignmentCorrection=false, bool removedEtaCutInEndcap=false, bool useGsfTrack=true)
 
bool pass_electronSelectionCompareMask (const cuts_t cuts_passed, const cuts_t selectionType)
 
bool pass_electronSelectionCompareMask (HWW &, const cuts_t cuts_passed, const cuts_t selectionType)
 
bool passBaseline (HWW &, int, EGammaMvaEleEstimator *, MuonMVAEstimator *)
 
bool passCharge (HWW &, int)
 
bool passDPhiDiLepJet (HWW &, int)
 
bool passExtraLeptonVeto (HWW &, int, EGammaMvaEleEstimator *, MuonMVAEstimator *)
 
bool passFirstCuts (HWW &, int)
 
bool passFullLep (HWW &, int, EGammaMvaEleEstimator *, MuonMVAEstimator *)
 
bool passLikelihoodId_v2 (HWW &, unsigned int index, float lhValue, int workingPoint)
 
bool passMinMet (HWW &, int)
 
bool passMinMet40 (HWW &, int)
 
bool passMuonRingsMVA (HWW &hww, unsigned int mu, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
 
bool passMuonRingsMVAFO (HWW &hww, unsigned int mu, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
 
bool passMVAJetId (double, double, double, unsigned int)
 
bool passSoftMuonVeto (HWW &, int)
 
bool passTopVeto (HWW &, int)
 
bool passZVeto (HWW &, int)
 
int primaryVertex ()
 
double projectedMet (HWW &hww, unsigned int i_hyp, double met, double phi)
 
bool sortByPFJetPt (const std::pair< LorentzVector, Int_t > &pfjet1, const std::pair< LorentzVector, Int_t > &pfjet2)
 
bool toptag (HWW &hww, int i_hyp, double minPt, std::vector< JetPair > ignoreJets=std::vector< JetPair >())
 
std::pair< double, double > trks_d0_pv (HWW &, int itrk, int ipv)
 
std::pair< double, double > trks_dz_pv (HWW &, int itrk, int ipv)
 
bool ww_elBase (HWW &hww, unsigned int i)
 
bool ww_eld0 (HWW &hww, unsigned int i)
 
bool ww_eld0PV (HWW &hww, unsigned int i)
 
bool ww_eldZPV (HWW &hww, unsigned int i)
 
bool ww_elId (HWW &hww, unsigned int i, bool useLHeleId, int useMVAeleId, EGammaMvaEleEstimator *egammaMvaEleEstimator)
 
bool ww_elIso (HWW &hww, unsigned int i)
 
double ww_elIsoVal (HWW &hww, unsigned int i)
 
bool ww_muBase (HWW &hww, unsigned int i)
 
bool ww_mud0 (HWW &hww, unsigned int i)
 
bool ww_mud0PV (HWW &hww, unsigned int i)
 
double ww_mud0ValuePV (HWW &hww, unsigned int index)
 
bool ww_mudZPV (HWW &hww, unsigned int i, float cut=0.1)
 
bool ww_muId (HWW &hww, unsigned int i, bool useMVAmuId, MuonIDMVA *mva)
 
bool ww_muIso (HWW &hww, unsigned int i)
 
bool ww_muIso (HWW &hww, unsigned int i, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
 
double ww_muIsoVal (HWW &hww, unsigned int i)
 

Variables

static const cuts_t electronSelection_smurfV2
 
static const cuts_t electronSelection_smurfV2_baseline
 
static const cuts_t electronSelection_smurfV2_id
 
static const cuts_t electronSelection_smurfV2_iso
 
static const cuts_t electronSelection_smurfV3
 
static const cuts_t electronSelection_smurfV3_baseline
 
static const cuts_t electronSelection_smurfV3_convrej
 
static const cuts_t electronSelection_smurfV3_id
 
static const cuts_t electronSelection_smurfV3_ip
 
static const cuts_t electronSelection_smurfV3_iso
 
static const cuts_t electronSelection_smurfV4
 
static const cuts_t electronSelection_smurfV4_baseline
 
static const cuts_t electronSelection_smurfV4_convrej
 
static const cuts_t electronSelection_smurfV4_id
 
static const cuts_t electronSelection_smurfV4_ip
 
static const cuts_t electronSelection_smurfV4_iso
 
static const cuts_t electronSelection_smurfV5
 
static const cuts_t electronSelection_smurfV5_baseline
 
static const cuts_t electronSelection_smurfV5_convrej
 
static const cuts_t electronSelection_smurfV5_id
 
static const cuts_t electronSelection_smurfV5_ip
 
static const cuts_t electronSelection_smurfV5_iso
 
static const cuts_t electronSelection_smurfV6
 
static const cuts_t electronSelection_ww_ip
 
static const cuts_t electronSelection_ww_iso
 
static const cuts_t electronSelection_wwV0
 
static const cuts_t electronSelection_wwV0_base
 
static const cuts_t electronSelection_wwV0_id
 
static const cuts_t electronSelection_wwV0_ip
 
static const cuts_t electronSelection_wwV0_iso
 
static const cuts_t electronSelection_wwV0b
 
static const cuts_t electronSelection_wwV0b_base
 
static const cuts_t electronSelection_wwV0b_id
 
static const cuts_t electronSelection_wwV0b_ip
 
static const cuts_t electronSelection_wwV0b_iso
 
static const cuts_t electronSelection_wwV1
 
static const cuts_t electronSelection_wwV1_base
 
static const cuts_t electronSelection_wwV1_convrej
 
static const cuts_t electronSelection_wwV1_id
 
static const cuts_t electronSelection_wwV1_ip
 
static const cuts_t electronSelection_wwV1_iso
 
static const cuts_t electronSelectionFO_el_smurf_base
 
static const cuts_t electronSelectionFO_el_smurf_v1
 
static const cuts_t electronSelectionFO_el_smurf_v2
 
static const cuts_t electronSelectionFO_el_smurf_v3
 
static const cuts_t electronSelectionFO_el_smurf_v4
 
static const cuts_t electronSelectionFO_el_wwV0_v1
 
static const cuts_t electronSelectionFO_el_wwV0_v2
 
static const cuts_t electronSelectionFO_el_wwV0_v3
 
static const cuts_t electronSelectionFO_el_wwV0_v4
 
static const cuts_t electronSelectionFO_el_wwV0b_v1
 
static const cuts_t electronSelectionFO_el_wwV0b_v2
 
static const cuts_t electronSelectionFO_el_wwV0b_v3
 
static const cuts_t electronSelectionFO_el_wwV0b_v4
 
static const cuts_t electronSelectionFO_el_wwV1_v1
 
static const cuts_t electronSelectionFO_el_wwV1_v2
 
static const cuts_t electronSelectionFO_el_wwV1_v3
 
static const cuts_t electronSelectionFO_el_wwV1_v4
 
static const cuts_t electronSelectionFO_wwV0_baseline
 
static const cuts_t electronSelectionFO_wwV0b_baseline
 
static const cuts_t electronSelectionFO_wwV1_baseline
 

Typedef Documentation

typedef ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<float> > HWWFunctions::LorentzVector

Definition at line 10 of file pfjetMVAtools.h.

Enumeration Type Documentation

Enumerator
CAND_01 
CAND_02 

Definition at line 71 of file electronSelectionsParameters.h.

Enumerator
ISECALENERGYCORRECTED 
ISMOMENTUMCORRECTED 
ISECALDRIVEN 
ISTRACKERDRIVEN 

Definition at line 541 of file electronSelections.h.

541  {
542  ISECALENERGYCORRECTED, // if false, the electron "ecalEnergy" is just the supercluster energy
543  ISMOMENTUMCORRECTED, // has E-p combination been applied
544  ISECALDRIVEN,
546  };
Enumerator
ISEB 
ISEBEEGAP 
ISEE 
ISEEGAP 
ISEBETAGAP 
ISEBPHIGAP 
ISEEDEEGAP 
ISEERINGGAP 
ISGAP 

Definition at line 529 of file electronSelections.h.

Enumerator
ELEID_ID 
ELEID_ISO 
ELEID_CONV 
ELEID_IP 

Definition at line 548 of file electronSelections.h.

Enumerator
ELEISO_REL010 
ELEISO_REL015 
ELEISO_REL040 
ELEISO_REL100 
ELEISO_REL010_WW 
ELEISO_REL040_WW 
ELEISO_REL100_WW 
ELEISO_SMURFV4 
ELEISO_SMURFV5 
ELEISO_RELNT010 
ELEISO_RELNT015 
ELEISO_RELNT040 
ELEISO_TRK_RELNT020 
ELEISO_ECAL_RELNT020 
ELEISO_ECAL_RELNT020_NPS 
ELEISO_HCAL_RELNT020 
ELEISO_ECAL_REL020 
ELEISO_HCAL_REL020 
ELEISO_FASTJET_REL005 
ELEISO_FASTJET_REL010 
ELEISO_FASTJET_REL015 
ELEISO_COR_RELNT010 
ELEIP_200 
ELEIP_400 
ELEIP_PV_200 
ELEIP_PV_wwV1 
ELEIP_PV_SMURFV3 
ELEIP_PV_DZ_1MM 
ELEIP_PV_OSV2 
ELEIP_PV_OSV2_FO 
ELEIP_SS200 
ELEID_SMURFV1_EXTRA 
ELEID_SMURFV2_EXTRA 
ELEID_SMURFV3_EXTRA 
ELEID_VBTF_35X_95 
ELEID_VBTF_35X_90 
ELEID_VBTF_35X_80 
ELEID_VBTF_80_NOHOEEND 
ELEID_VBTF_85_NOHOEEND 
ELEID_VBTF_85 
ELEID_VBTF_70_NOHOEEND 
ELEID_VBTF_90_HLT 
ELEID_VBTF_90_HLT_CALOIDT_TRKIDVL 
ELEID_CIC_V03_MEDIUM 
ELEID_VBTF_95_NOHOEEND 
ELEID_WP2012_MEDIUM_NOISO 
ELEID_WP2012_MEDIUM_NOISO_NOIP 
ELEID_WP2012_LOOSE_NOISO 
ELENOTCONV_MIT 
ELENOTCONV_DISTDCOT002 
ELENOTCONV_HITPATTERN_0MHITS 
ELEETA_250 
ELEETA_240 
ELEPT_010 
ELENOMUON_010 
ELENOMUON_010_SS 
ELESEED_ECAL 
ELECHARGE_NOTFLIP3AGREE 
ELE_NOT_TRANSITION 
ELE_LAST 

Definition at line 28 of file electronSelections.h.

28  {
29 
31  // Isolation //
33 
34  ELEISO_REL010, // rel iso (fixed below 20 GeV) < 0.10, 0.3 cone size for all, 1 GeV pedestal sub in EB
35  ELEISO_REL015, // rel iso (fixed below 20 GeV) < 0.15, 0.3 cone size for all, 1 GeV pedestal sub in EB
36  ELEISO_REL040, // rel iso (fixed below 20 GeV) < 0.40, 0.3 cone size for all, 1 GeV pedestal sub in EB
37  ELEISO_REL100, // rel iso (fixed below 20 GeV) < 1.00, 0.3 cone size for all, 1 GeV pedestal sub in EB
38  ELEISO_REL010_WW, // rel iso (fixed below 20 GeV) < 0.10, 0.3 cone size for all, 1 GeV pedestal sub in EB/EE
39  ELEISO_REL040_WW, // rel iso (fixed below 20 GeV) < 0.40, 0.3 cone size for all, 1 GeV pedestal sub in EB/EE
40  ELEISO_REL100_WW, // rel iso (fixed below 20 GeV) < 1.00, 0.3 cone size for all, 1 GeV pedestal sub in EB/EE
41  ELEISO_SMURFV4, // non-truncated relative pf iso with cut [0.15,0.09] for [barrel,endcap]
42  ELEISO_SMURFV5, // non-truncated relative pf iso with cut [0.13,0.09] for [barrel,endcap]
43  ELEISO_RELNT010, // non-truncated relative iso < 0.10, 0.3 cone size for all, 1 GeV pedestal sub in EB
44  ELEISO_RELNT015, // non-truncated relative iso < 0.15, 0.3 cone size for all, 1 GeV pedestal sub in EB
45  ELEISO_RELNT040, // non-truncated relative iso < 0.40, 0.3 cone size for all, 1 GeV pedestal sub in EB
46  ELEISO_TRK_RELNT020, // non-truncated relative Tracker iso < 0.20, 0.3 cone size for all
47  ELEISO_ECAL_RELNT020, // non-truncated relative ECAL iso < 0.20, 0.3 cone size for all, 1 GeV pedestal sub in EB
48  ELEISO_ECAL_RELNT020_NPS, // non-truncated relative ECAL iso < 0.20, 0.3 cone size for all, no pedestal sub in EB
49  ELEISO_HCAL_RELNT020, // non-truncated relative HCAL iso < 0.20, 0.3 cone size for all
50  ELEISO_ECAL_REL020, // truncated relative ECAL iso < 0.20, 0.3 cone size for all, 1 GeV pedestal sub in EB
51  ELEISO_HCAL_REL020, // truncated relative HCAL iso < 0.20, 0.3 cone size for all
52  ELEISO_FASTJET_REL005, // truncated reliso < 0.05, 0.3 cone size, 1 GeV pedestal subtraction, fastjet-corrected
53  ELEISO_FASTJET_REL010, // truncated reliso < 0.05, 0.3 cone size, 1 GeV pedestal subtraction, fastjet-corrected
54  ELEISO_FASTJET_REL015, // truncated reliso < 0.05, 0.3 cone size, 1 GeV pedestal subtraction, fastjet-corrected
55  ELEISO_COR_RELNT010, // truncated correction reliso < 0.1, cor_iso = ntiso - (ln(pt) * nvtx)/(30+pt)
56 
58  // Impact Parameter //
60 
61  ELEIP_200, // d0 corrected for beamspot < 0.02
62  ELEIP_400, // d0 corrected for beamspot < 0.04
63  ELEIP_PV_200, // d0 corrected for primary vertex < 0.02
64  ELEIP_PV_wwV1, // d0 (PV) < 0.02 and dz (PV) < 1.0
65  ELEIP_PV_SMURFV3, // d0 (PV) < 0.02 and dz (PV) < 0.2, using first PV
66  ELEIP_PV_DZ_1MM, // dz (PV) < 0.1, using first PV
67  ELEIP_PV_OSV2, // d0 (PV) < 0.04 and dz (PV) < 1, using first PV
68  ELEIP_PV_OSV2_FO, // d0 (PV) < 0.2 and dz (PV) < 1, using first PV
69  ELEIP_SS200, // 2011 SS numerator d0 cut
70 
71 
73  // Electron Identification //
75 
76  ELEID_SMURFV1_EXTRA, // pass smurf v1 electron ID
77  ELEID_SMURFV2_EXTRA, // pass smurf v2 electron ID
78  ELEID_SMURFV3_EXTRA, // pass smurf v3 electron ID
79  ELEID_VBTF_35X_95, // VBTF95 electron ID (35X)
80  ELEID_VBTF_35X_90, // VBTF90 electron ID (35X)
81  ELEID_VBTF_35X_80, // VBTF80 electron ID (35X)
82  ELEID_VBTF_80_NOHOEEND, // VBTF80 electron ID no HoE in endcap
83  ELEID_VBTF_85_NOHOEEND, // VBTF85 electron ID no HoE in endcap
84  ELEID_VBTF_85, // VBTF85 electron ID
85  ELEID_VBTF_70_NOHOEEND, // VBTF70 electron ID no HoE in endcap
86  ELEID_VBTF_90_HLT, // VBTF90 electron ID with HoE and dPhiIn cuts tuned to represent HLT requirements for CaloIdL_TrkIdVL
87  ELEID_VBTF_90_HLT_CALOIDT_TRKIDVL, // VBTF90 electron ID with HoE and dPhiIn cuts tuned to represent HLT requirements for CaloIdT_TrkIdVL
88  ELEID_CIC_V03_MEDIUM, // CIC_MEDIUM electron ID (V03)
89  ELEID_VBTF_95_NOHOEEND, // VBTF80 electron ID no HoE in endcap
90  ELEID_WP2012_MEDIUM_NOISO, // WP2012 MEDIUM ELECTRON ID, NO ISO
91  ELEID_WP2012_MEDIUM_NOISO_NOIP, // WP2012 MEDIUM ELECTRON ID, NO ISO, NO IP
92  ELEID_WP2012_LOOSE_NOISO, // WP2012 MEDIUM ELECTRON ID, NO ISO
93 
95  // Conversion Rejection //
97 
98  ELENOTCONV_MIT, // mit conversion rejection v11
99  ELENOTCONV_DISTDCOT002, // dist < 0.02 && dcot(theta) < 0.02
100  ELENOTCONV_HITPATTERN_0MHITS, // < 1 missing hits
101 
103  // Basic Selections //
105 
106  ELEETA_250, // |eta| < 2.50
107  ELEETA_240, // |eta| < 2.40
108 
109  ELEPT_010, // Pt > 10
110 
111  ELENOMUON_010, // no muon within dR < 0.1
112  ELENOMUON_010_SS, // no muon passing same sign numerator selection within dR < 0.1
113 
114  ELESEED_ECAL, // seed must have been found by at least the ecal algo
115 
116  ELECHARGE_NOTFLIP3AGREE, // Not a charge flip and CTF, GSF, and Pixel-SuperCluster charges agree
117 
118  ELE_NOT_TRANSITION, // SC |eta| < 1.4442 OR SC |eta| > 1.566 (veto transition region)
119 
120 
121  ELE_LAST
122 
123  };
Enumerator
MM 
ME 
EM 
EE 
ALL 

Definition at line 16 of file wwtypes.h.

16 {MM, ME, EM, EE, ALL};
MonitorElement ME
Enumerator
MuMu 
MuEl 
ElMu 
ElEl 

Definition at line 11 of file wwtypes.h.

Enumerator
NominalWWV0 
muonSelectionFO_mu_ww 
muonSelectionFO_mu_ww_iso10 
NominalWWV1 
muonSelectionFO_mu_wwV1 
muonSelectionFO_mu_wwV1_iso10 
muonSelectionFO_mu_wwV1_iso10_d0 
NominalSmurfV3 
NominalSmurfV4 
NominalSmurfV5 
NominalSmurfV6 
muonSelectionFO_mu_smurf_04 
muonSelectionFO_mu_smurf_10 

Definition at line 12 of file muonSelections.h.

Enumerator
VBTF_35X_95 
VBTF_35X_90 
VBTF_35X_85 
VBTF_35X_80 
VBTF_35X_70 
VBTF_35X_60 
VBTF_35Xr2_70 
VBTF_35Xr2_60 
VBTF_80_NOHOEEND 
VBTF_85_NOHOEEND 
VBTF_85 
VBTF_70_NOHOEEND 
VBTF_90_HLT 
VBTF_90_HLT_CALOIDT_TRKIDVL 
VBTF_95_NOHOEEND 

Definition at line 46 of file electronSelectionsParameters.h.

Function Documentation

int HWWFunctions::bestHypothesis ( HWW hww,
const std::vector< int > &  candidates 
)

Definition at line 72 of file analysisSelections.cc.

References HWW::hyp_ll_p4(), HWW::hyp_lt_p4(), i, bookConverter::max, and min().

Referenced by HWWAnalyzer::analyze().

72  {
73  int best = -1;
74  for( unsigned int i = 0; i < candidates.size(); ++i ) {
75  unsigned int i_hyp = candidates.at(i);
76  if (best<0){
77  best = i_hyp;
78  continue;
79  }
80  if ( std::max(hww.hyp_lt_p4().at(i_hyp).pt(), hww.hyp_ll_p4().at(i_hyp).pt()) >= //GC add = in case the lepton is the same
81  std::max(hww.hyp_lt_p4().at(best).pt(), hww.hyp_ll_p4().at(best).pt()) &&
82  std::min(hww.hyp_lt_p4().at(i_hyp).pt(), hww.hyp_ll_p4().at(i_hyp).pt()) >=
83  std::min(hww.hyp_lt_p4().at(best).pt(), hww.hyp_ll_p4().at(best).pt()) )
84  best = i_hyp;
85  }
86  return best;
87  }
int i
Definition: DBlmapReader.cc:9
std::vector< LorentzVector > & hyp_ll_p4()
Definition: HWW.cc:569
T min(T a, T b)
Definition: MathUtil.h:58
std::vector< LorentzVector > & hyp_lt_p4()
Definition: HWW.cc:573
void HWWFunctions::checkElectronSelections ( void  )
inline

Definition at line 128 of file electronSelections.h.

References ELE_LAST, and n.

Referenced by pass_electronSelection().

128  {
129  using namespace std;
130  int n = (int) EleSelectionType(ELE_LAST);
131  int nMax = (int) 8*sizeof(1ll) - 1;
132  if( n > nMax ){
133  edm::LogError("InvalidInput") << "enum \"EleSelectionType\" has " << n << " elements but cannot have more than " << nMax << " elements...";
134  //exit(1);
135  }
136  }
Bool_t HWWFunctions::comparePt ( JetPair  lv1,
JetPair  lv2 
)

Definition at line 319 of file analysisSelections.cc.

Referenced by getJets().

319  {
320  return lv1.first.pt() > lv2.first.pt();
321  }
bool HWWFunctions::defaultBTag ( HWW hww,
unsigned int  iJet,
float  jec 
)

Definition at line 313 of file analysisSelections.cc.

References HWW::pfjets_trackCountingHighEffBJetTag().

Referenced by getJets(), and toptag().

313  {
314 
315  if ( hww.pfjets_trackCountingHighEffBJetTag().at(iJet) > 2.1) return true;
316  return 0;
317  }
std::vector< float > & pfjets_trackCountingHighEffBJetTag()
Definition: HWW.cc:789
void HWWFunctions::doCutFlow ( HWW hww,
int  i_hyp,
EventMonitor::hypo_monitor monitor,
EGammaMvaEleEstimator egammaMvaEleEstimator,
MuonMVAEstimator muonMVAEstimator 
)

Definition at line 10 of file analysisSelections.cc.

References EventMonitor::hypo_monitor::count(), HWW::evt_pfmet(), first, getHypothesisTypeNew(), getJets(), HWW::hyp_ll_p4(), HWW::hyp_lt_p4(), HWW::hyp_p4(), bookConverter::max, min(), numberOfJets(), passCharge(), passDPhiDiLepJet(), passExtraLeptonVeto(), passFullLep(), passMinMet(), passMinMet40(), passSoftMuonVeto(), passTopVeto(), passZVeto(), and histoStyle::weight.

Referenced by HWWAnalyzer::analyze().

10  {
11 
13  double weight = 1.0;
14 
15  monitor.count(type, "baseline", weight);
16  if(!passCharge(hww, i_hyp)) return;
17  monitor.count(type, "opposite sign", weight);
18  if(!passFullLep(hww, i_hyp, egammaMvaEleEstimator, muonMVAEstimator)) return;
19  monitor.count(type, "full lepton selection", weight);
20  if(!passExtraLeptonVeto(hww, i_hyp, egammaMvaEleEstimator, muonMVAEstimator)) return;
21  monitor.count(type, "extra lepton veto", weight);
22  if(!(hww.evt_pfmet() > 20.0)) return;
23  monitor.count(type, "met > 20 GeV", weight);
24  if(!(hww.hyp_p4().at(i_hyp).mass() > 12.0)) return;
25  monitor.count(type, "mll > 12 GeV", weight);
26  if(!passZVeto(hww, i_hyp)) return;
27  monitor.count(type, "|mll - mZ| > 15 GeV", weight);
28  if(!passMinMet(hww, i_hyp)) return;
29  monitor.count(type, "minMET > 20 GeV", weight);
30  if(!passMinMet40(hww, i_hyp)) return;
31  monitor.count(type, "minMET > 40 GeV for ee/mm", weight);
32  if(!passDPhiDiLepJet(hww, i_hyp)) return;
33  monitor.count(type, "dPhiDiLepJet < 165 dg for ee/mm", weight);
34  if(!passSoftMuonVeto(hww, i_hyp)) return;
35  monitor.count(type, "SoftMuons==0", weight);
36  if(!passTopVeto(hww, i_hyp)) return;
37  monitor.count(type, "top veto", weight);
38  if(hww.hyp_p4().at(i_hyp).pt() <= 45.0) return;
39  monitor.count(type, "ptll > 45 GeV", weight);
40 
41  int njets = numberOfJets(hww, i_hyp);
42  std::vector<JetPair> sortedJets = getJets(hww, i_hyp, 30.0, 4.7, true, false);
43 
44  LorentzVector jet1;
45  LorentzVector jet2;
46  LorentzVector jet3;
47 
48  if(njets==0){
49  monitor.count(type, "njets == 0", weight);
50  if(max(hww.hyp_ll_p4().at(i_hyp).pt(), hww.hyp_lt_p4().at(i_hyp).pt()) < 30) return;
51  monitor.count(type, "max(lep1.pt(),lep2.pt())>30", weight);
52  if(min(hww.hyp_ll_p4().at(i_hyp).pt(), hww.hyp_lt_p4().at(i_hyp).pt()) < 25) return;
53  monitor.count(type, "min(lep1.pt(),lep2.pt())>25", weight);
54  }
55  if(njets==1){
56  monitor.count( type, "njets == 1", weight);
57  }
58  if ( njets==2 || njets==3 ) {
59  monitor.count(type, "njets == 2 or 3", weight);
60  if (fabs(sortedJets[0].first.eta())>=4.7 || fabs(sortedJets[1].first.eta())>=4.7) return;
61  monitor.count(type,"abs(jet1.eta())<4.7 && abs(jet2.eta())<4.7",weight);
62  if (njets==3 && sortedJets[2].first.pt()>30 && ((sortedJets[0].first.eta()-sortedJets[2].first.eta() > 0 && sortedJets[1].first.eta()-sortedJets[2].first.eta() < 0) ||
63  (sortedJets[1].first.eta()-sortedJets[2].first.eta() > 0 && sortedJets[0].first.eta()-sortedJets[2].first.eta() < 0)) ) return;
64  monitor.count(type, "no central jets", weight);
65 
66  }
67 
68  return;
69 
70  }
type
Definition: HCALResponse.h:21
bool passMinMet40(HWW &, int)
float & evt_pfmet()
Definition: HWW.cc:639
HypothesisType getHypothesisTypeNew(HWW &, unsigned int i_hyp)
Definition: wwtypes.cc:57
bool passTopVeto(HWW &, int)
bool passCharge(HWW &, int)
std::vector< LorentzVector > & hyp_ll_p4()
Definition: HWW.cc:569
bool passDPhiDiLepJet(HWW &, int)
std::vector< JetPair > getJets(HWW &hww, int, double, double, bool, bool)
unsigned int numberOfJets(HWW &hww, unsigned int)
T min(T a, T b)
Definition: MathUtil.h:58
bool first
Definition: L1TdeRCT.cc:75
bool passExtraLeptonVeto(HWW &, int, EGammaMvaEleEstimator *, MuonMVAEstimator *)
bool passSoftMuonVeto(HWW &, int)
std::vector< LorentzVector > & hyp_p4()
Definition: HWW.cc:565
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > LorentzVector
Definition: analysisEnums.h:9
std::vector< LorentzVector > & hyp_lt_p4()
Definition: HWW.cc:573
bool passFullLep(HWW &, int, EGammaMvaEleEstimator *, MuonMVAEstimator *)
int weight
Definition: histoStyle.py:50
void count(HypothesisType type, const char *name, double weight=1.0)
Definition: monitor.cc:11
bool passMinMet(HWW &, int)
bool passZVeto(HWW &, int)
double HWWFunctions::dzPV ( const LorentzVector vtx,
const LorentzVector p4,
const LorentzVector pv 
)

Definition at line 551 of file electronSelections.cc.

Referenced by electron_dzPV_smurfV3(), TopElectronHLTOfflineSource::fill(), reco::modules::MultiTrackSelector::select(), ww_eldZPV(), and ww_mudZPV().

551  {
552  return (vtx.z()-pv.z()) - ((vtx.x()-pv.x())*p4.x()+(vtx.y()-pv.y())*p4.y())/p4.pt() * p4.z()/p4.pt();
553  }
double p4[4]
Definition: TauolaWrapper.h:92
double HWWFunctions::dzPV_mu ( HWW hww,
const LorentzVector vtx,
const LorentzVector p4,
const LorentzVector pv 
)

Definition at line 363 of file muonSelections.cc.

Referenced by mudzPV_smurfV3().

363  {
364  return (vtx.z()-pv.z()) - ((vtx.x()-pv.x())*p4.x()+(vtx.y()-pv.y())*p4.y())/p4.pt() * p4.z()/p4.pt();
365  }
double p4[4]
Definition: TauolaWrapper.h:92
void HWWFunctions::eidAssign ( std::vector< double > &  cutarr,
double  cutvals[],
unsigned int  size 
)

Definition at line 360 of file electronSelectionsParameters.cc.

References i, and findQualityFiles::size.

Referenced by eidGetVBTF(), and eidGetWP2012().

361  {
362  cutarr.clear();
363  for (unsigned int i = 0; i < size; ++i) {
364  cutarr.push_back(cutvals[i]);
365  }
366  }
int i
Definition: DBlmapReader.cc:9
tuple size
Write out results.
void HWWFunctions::eidAssign ( std::vector< int > &  cutarr,
int  cutvals[],
unsigned int  size 
)

Definition at line 377 of file electronSelectionsParameters.cc.

References i, and findQualityFiles::size.

378  {
379  cutarr.clear();
380  for (unsigned int i = 0; i < size; ++i) {
381  cutarr.push_back(cutvals[i]);
382  }
383  }
int i
Definition: DBlmapReader.cc:9
tuple size
Write out results.
void HWWFunctions::eidAssign ( std::vector< bool > &  cutarr,
bool  cutvals[],
unsigned int  size 
)

Definition at line 369 of file electronSelectionsParameters.cc.

References i, and findQualityFiles::size.

370  {
371  cutarr.clear();
372  for (unsigned int i = 0; i < size; ++i) {
373  cutarr.push_back(cutvals[i]);
374  }
375  }
int i
Definition: DBlmapReader.cc:9
tuple size
Write out results.
void HWWFunctions::eidGetVBTF ( const vbtf_tightness  tightness,
std::vector< double > &  cutdeta,
std::vector< double > &  cutdphi,
std::vector< double > &  cuthoe,
std::vector< double > &  cutsee,
std::vector< double > &  cutreliso 
)

Definition at line 125 of file electronSelectionsParameters.cc.

References eidAssign(), VBTF_35X_60, VBTF_35X_70, VBTF_35X_80, VBTF_35X_85, VBTF_35X_90, VBTF_35X_95, VBTF_35Xr2_60, VBTF_35Xr2_70, VBTF_70_NOHOEEND, VBTF_80_NOHOEEND, VBTF_85, VBTF_85_NOHOEEND, VBTF_90_HLT, VBTF_90_HLT_CALOIDT_TRKIDVL, and VBTF_95_NOHOEEND.

Referenced by electronId_VBTF().

126  {
127 
128  switch (tightness) {
129  case VBTF_35X_95:
130  {
131  double isoThresholds_tmp[2] = {0.15, 0.1};
132  double sigmaIEtaIEtaThresholds_tmp[2] = {0.01, 0.03};
133  double dPhiInThresholds_tmp[2] = {0.8, 0.7};
134  double dEtaInThresholds_tmp[2] = {0.007, 0.01};
135  double hoeThresholds_tmp[2] = {0.5, 0.07};
136  eidAssign(cutreliso, isoThresholds_tmp, 2);
137  eidAssign(cutdeta, dEtaInThresholds_tmp, 2);
138  eidAssign(cutdphi, dPhiInThresholds_tmp, 2);
139  eidAssign(cuthoe, hoeThresholds_tmp, 2);
140  eidAssign(cutsee, sigmaIEtaIEtaThresholds_tmp, 2);
141  return;
142  }
143 
144  case VBTF_35X_90:
145  {
146  double isoThresholds_tmp[2] = {0.1, 0.07};
147  double sigmaIEtaIEtaThresholds_tmp[2] = {0.01, 0.03};
148  double dPhiInThresholds_tmp[2] = {0.8, 0.7};
149  double dEtaInThresholds_tmp[2] = {0.007, 0.009};
150  double hoeThresholds_tmp[2] = {0.12, 0.05};
151  eidAssign(cutreliso, isoThresholds_tmp, 2);
152  eidAssign(cutdeta, dEtaInThresholds_tmp, 2);
153  eidAssign(cutdphi, dPhiInThresholds_tmp, 2);
154  eidAssign(cuthoe, hoeThresholds_tmp, 2);
155  eidAssign(cutsee, sigmaIEtaIEtaThresholds_tmp, 2);
156  return;
157  }
158 
159  case VBTF_35X_85:
160  {
161  double isoThresholds_tmp[2] = {0.09, 0.06};
162  double sigmaIEtaIEtaThresholds_tmp[2] = {0.01, 0.03};
163  double dPhiInThresholds_tmp[2] = {0.06, 0.04};
164  double dEtaInThresholds_tmp[2] = {0.006, 0.007};
165  double hoeThresholds_tmp[2] = {0.04, 0.025};
166  eidAssign(cutreliso, isoThresholds_tmp, 2);
167  eidAssign(cutdeta, dEtaInThresholds_tmp, 2);
168  eidAssign(cutdphi, dPhiInThresholds_tmp, 2);
169  eidAssign(cuthoe, hoeThresholds_tmp, 2);
170  eidAssign(cutsee, sigmaIEtaIEtaThresholds_tmp, 2);
171  return;
172  }
173 
174  case VBTF_35X_80:
175  {
176  double isoThresholds_tmp[2] = {0.07, 0.06};
177  double sigmaIEtaIEtaThresholds_tmp[2] = {0.01, 0.03};
178  double dPhiInThresholds_tmp[2] = {0.06, 0.03};
179  double dEtaInThresholds_tmp[2] = {0.004, 0.007};
180  double hoeThresholds_tmp[2] = {0.04, 0.025};
181  eidAssign(cutreliso, isoThresholds_tmp, 2);
182  eidAssign(cutdeta, dEtaInThresholds_tmp, 2);
183  eidAssign(cutdphi, dPhiInThresholds_tmp, 2);
184  eidAssign(cuthoe, hoeThresholds_tmp, 2);
185  eidAssign(cutsee, sigmaIEtaIEtaThresholds_tmp, 2);
186  return;
187  }
188 
189  case VBTF_35X_70:
190  {
191  double isoThresholds_tmp[2] = {0.05, 0.04};
192  double sigmaIEtaIEtaThresholds_tmp[2] = {0.01, 0.03};
193  double dPhiInThresholds_tmp[2] = {0.03, 0.02};
194  double dEtaInThresholds_tmp[2] = {0.003, 0.005};
195  double hoeThresholds_tmp[2] = {0.025, 0.012};
196  eidAssign(cutreliso, isoThresholds_tmp, 2);
197  eidAssign(cutdeta, dEtaInThresholds_tmp, 2);
198  eidAssign(cutdphi, dPhiInThresholds_tmp, 2);
199  eidAssign(cuthoe, hoeThresholds_tmp, 2);
200  eidAssign(cutsee, sigmaIEtaIEtaThresholds_tmp, 2);
201  return;
202  }
203 
204  case VBTF_35X_60:
205  {
206  double isoThresholds_tmp[2] = {0.04, 0.03};
207  double sigmaIEtaIEtaThresholds_tmp[2] = {0.01, 0.03};
208  double dPhiInThresholds_tmp[2] = {0.02, 0.02};
209  double dEtaInThresholds_tmp[2] = {0.0025, 0.003};
210  double hoeThresholds_tmp[2] = {0.025, 0.009};
211  eidAssign(cutreliso, isoThresholds_tmp, 2);
212  eidAssign(cutdeta, dEtaInThresholds_tmp, 2);
213  eidAssign(cutdphi, dPhiInThresholds_tmp, 2);
214  eidAssign(cuthoe, hoeThresholds_tmp, 2);
215  eidAssign(cutsee, sigmaIEtaIEtaThresholds_tmp, 2);
216  return;
217  }
218 
219  case VBTF_35Xr2_70:
220  {
221  double isoThresholds_tmp[2] = {0.04, 0.03};
222  double sigmaIEtaIEtaThresholds_tmp[2] = {0.01, 0.03};
223  double dPhiInThresholds_tmp[2] = {0.03, 0.02};
224  double dEtaInThresholds_tmp[2] = {0.004, 0.005};
225  double hoeThresholds_tmp[2] = {0.025, 0.025};
226  eidAssign(cutreliso, isoThresholds_tmp, 2);
227  eidAssign(cutdeta, dEtaInThresholds_tmp, 2);
228  eidAssign(cutdphi, dPhiInThresholds_tmp, 2);
229  eidAssign(cuthoe, hoeThresholds_tmp, 2);
230  eidAssign(cutsee, sigmaIEtaIEtaThresholds_tmp, 2);
231  return;
232  }
233 
234  case VBTF_35Xr2_60:
235  {
236  double isoThresholds_tmp[2] = {0.03, 0.02};
237  double sigmaIEtaIEtaThresholds_tmp[2] = {0.01, 0.03};
238  double dPhiInThresholds_tmp[2] = {0.025, 0.02};
239  double dEtaInThresholds_tmp[2] = {0.004, 0.005};
240  double hoeThresholds_tmp[2] = {0.025, 0.025};
241  eidAssign(cutreliso, isoThresholds_tmp, 2);
242  eidAssign(cutdeta, dEtaInThresholds_tmp, 2);
243  eidAssign(cutdphi, dPhiInThresholds_tmp, 2);
244  eidAssign(cuthoe, hoeThresholds_tmp, 2);
245  eidAssign(cutsee, sigmaIEtaIEtaThresholds_tmp, 2);
246  return;
247  }
248 
249  case VBTF_80_NOHOEEND:
250  {
251  double isoThresholds_tmp[2] = {0.07, 0.06};
252  double sigmaIEtaIEtaThresholds_tmp[2] = {0.01, 0.03};
253  double dPhiInThresholds_tmp[2] = {0.06, 0.03};
254  double dEtaInThresholds_tmp[2] = {0.004, 0.007};
255  double hoeThresholds_tmp[2] = {0.04, 9999.};
256  eidAssign(cutreliso, isoThresholds_tmp, 2);
257  eidAssign(cutdeta, dEtaInThresholds_tmp, 2);
258  eidAssign(cutdphi, dPhiInThresholds_tmp, 2);
259  eidAssign(cuthoe, hoeThresholds_tmp, 2);
260  eidAssign(cutsee, sigmaIEtaIEtaThresholds_tmp, 2);
261  return;
262  }
263 
264  case VBTF_85_NOHOEEND:
265  {
266  double isoThresholds_tmp[2] = { 0.09 , 0.06 };
267  double sigmaIEtaIEtaThresholds_tmp[2] = { 0.01 , 0.03 };
268  double dPhiInThresholds_tmp[2] = { 0.06 , 0.04 };
269  double dEtaInThresholds_tmp[2] = { 0.006 , 0.007 };
270  double hoeThresholds_tmp[2] = { 0.04 , 9999. };
271  eidAssign(cutreliso, isoThresholds_tmp, 2);
272  eidAssign(cutdeta, dEtaInThresholds_tmp, 2);
273  eidAssign(cutdphi, dPhiInThresholds_tmp, 2);
274  eidAssign(cuthoe, hoeThresholds_tmp, 2);
275  eidAssign(cutsee, sigmaIEtaIEtaThresholds_tmp, 2);
276  return;
277  }
278 
279  case VBTF_85:
280  {
281  double isoThresholds_tmp[2] = { 0.09 , 0.06 };
282  double sigmaIEtaIEtaThresholds_tmp[2] = { 0.01 , 0.03 };
283  double dPhiInThresholds_tmp[2] = { 0.06 , 0.04 };
284  double dEtaInThresholds_tmp[2] = { 0.006 , 0.007 };
285  double hoeThresholds_tmp[2] = { 0.04 , 0.025 };
286  eidAssign(cutreliso, isoThresholds_tmp, 2);
287  eidAssign(cutdeta, dEtaInThresholds_tmp, 2);
288  eidAssign(cutdphi, dPhiInThresholds_tmp, 2);
289  eidAssign(cuthoe, hoeThresholds_tmp, 2);
290  eidAssign(cutsee, sigmaIEtaIEtaThresholds_tmp, 2);
291  return;
292  }
293 
294  case VBTF_70_NOHOEEND:
295  {
296  double isoThresholds_tmp[2] = {0.04, 0.03};
297  double sigmaIEtaIEtaThresholds_tmp[2] = {0.01, 0.03};
298  double dPhiInThresholds_tmp[2] = {0.03, 0.02};
299  double dEtaInThresholds_tmp[2] = {0.004, 0.005};
300  double hoeThresholds_tmp[2] = {0.025, 9999.};
301  eidAssign(cutreliso, isoThresholds_tmp, 2);
302  eidAssign(cutdeta, dEtaInThresholds_tmp, 2);
303  eidAssign(cutdphi, dPhiInThresholds_tmp, 2);
304  eidAssign(cuthoe, hoeThresholds_tmp, 2);
305  eidAssign(cutsee, sigmaIEtaIEtaThresholds_tmp, 2);
306  return;
307  }
308  case VBTF_90_HLT:
309  {
310  double isoThresholds_tmp[2] = {0.1, 0.07};
311  double sigmaIEtaIEtaThresholds_tmp[2] = {0.01, 0.03};
312  double dPhiInThresholds_tmp[2] = {0.15, 0.10};
313  double dEtaInThresholds_tmp[2] = {0.007, 0.009};
314  double hoeThresholds_tmp[2] = {0.12, 0.10};
315  eidAssign(cutreliso, isoThresholds_tmp, 2);
316  eidAssign(cutdeta, dEtaInThresholds_tmp, 2);
317  eidAssign(cutdphi, dPhiInThresholds_tmp, 2);
318  eidAssign(cuthoe, hoeThresholds_tmp, 2);
319  eidAssign(cutsee, sigmaIEtaIEtaThresholds_tmp, 2);
320  return;
321  }
322 
324  {
325  double isoThresholds_tmp[2] = {0.1, 0.07};
326  double sigmaIEtaIEtaThresholds_tmp[2] = {0.01, 0.03};
327  double dPhiInThresholds_tmp[2] = {0.15, 0.10};
328  double dEtaInThresholds_tmp[2] = {0.007, 0.009};
329  double hoeThresholds_tmp[2] = {0.10, 0.075};
330  eidAssign(cutreliso, isoThresholds_tmp, 2);
331  eidAssign(cutdeta, dEtaInThresholds_tmp, 2);
332  eidAssign(cutdphi, dPhiInThresholds_tmp, 2);
333  eidAssign(cuthoe, hoeThresholds_tmp, 2);
334  eidAssign(cutsee, sigmaIEtaIEtaThresholds_tmp, 2);
335  return;
336  }
337 
338  case VBTF_95_NOHOEEND:
339  {
340  double isoThresholds_tmp[2] = {0.15, 0.10};
341  double sigmaIEtaIEtaThresholds_tmp[2] = {0.01, 0.03};
342  double dPhiInThresholds_tmp[2] = {0.80, 0.70};
343  double dEtaInThresholds_tmp[2] = {0.007, 0.01};
344  double hoeThresholds_tmp[2] = {0.15, 999.};
345  eidAssign(cutreliso, isoThresholds_tmp, 2);
346  eidAssign(cutdeta, dEtaInThresholds_tmp, 2);
347  eidAssign(cutdphi, dPhiInThresholds_tmp, 2);
348  eidAssign(cuthoe, hoeThresholds_tmp, 2);
349  eidAssign(cutsee, sigmaIEtaIEtaThresholds_tmp, 2);
350  return;
351  }
352 
353  default:
354  edm::LogError("InvalidInput") << "[eidGetVBTF] ERROR! Invalid tightness level";
355  }
356 
357  return;
358  }
void eidAssign(std::vector< double > &cutarr, double cutvals[], unsigned int size)
void HWWFunctions::eidGetWP2012 ( const wp2012_tightness  tightness,
std::vector< double > &  cutdeta,
std::vector< double > &  cutdphi,
std::vector< double > &  cuthoe,
std::vector< double > &  cutsee,
std::vector< double > &  cutooemoop,
std::vector< double > &  cutd0vtx,
std::vector< double > &  cutdzvtx,
std::vector< bool > &  cutvtxfit,
std::vector< int > &  cutmhit,
std::vector< double > &  cutrelisohighpt,
std::vector< double > &  cutrelisolowpt 
)

Definition at line 7 of file electronSelectionsParameters.cc.

References eidAssign(), LOOSE, MEDIUM, TIGHT, and VETO.

Referenced by electronId_WP2012().

8  {
9 
10  switch (tightness) {
11  case VETO:
12  {
13  double dEtaIn_tmp[2] = {0.007, 0.010};
14  double dPhiIn_tmp[2] = {0.800, 0.700};
15  double sigmaIEtaIEta_tmp[2] = {0.010, 0.030};
16  double hoe_tmp[2] = {0.150, 999.9};
17  double ooemoop_tmp[2] = {999.9, 999.9};
18  double d0Vtx_tmp[2] = {0.040, 0.040};
19  double dzVtx_tmp[2] = {0.200, 0.200};
20  bool vtxFit_tmp[2] = {false, false};
21  int mHits_tmp[2] = {999, 999};
22  double isoHi_tmp[2] = {0.150, 0.150};
23  double isoLo_tmp[2] = {0.150, 0.150};
24  eidAssign(cutdeta, dEtaIn_tmp, 2);
25  eidAssign(cutdphi, dPhiIn_tmp, 2);
26  eidAssign(cutsee, sigmaIEtaIEta_tmp, 2);
27  eidAssign(cuthoe, hoe_tmp, 2);
28  eidAssign(cutooemoop, ooemoop_tmp, 2);
29  eidAssign(cutd0vtx, d0Vtx_tmp, 2);
30  eidAssign(cutdzvtx, dzVtx_tmp, 2);
31  eidAssign(cutvtxfit, vtxFit_tmp, 2);
32  eidAssign(cutmhit, mHits_tmp, 2);
33  eidAssign(cutrelisohighpt, isoHi_tmp, 2);
34  eidAssign(cutrelisolowpt, isoLo_tmp, 2);
35  return;
36  }
37  case LOOSE:
38  {
39  double dEtaIn_tmp[2] = {0.007, 0.009};
40  double dPhiIn_tmp[2] = {0.150, 0.100};
41  double sigmaIEtaIEta_tmp[2] = {0.010, 0.030};
42  double hoe_tmp[2] = {0.120, 0.100};
43  double ooemoop_tmp[2] = {0.050, 0.050};
44  double d0Vtx_tmp[2] = {0.020, 0.020};
45  double dzVtx_tmp[2] = {0.200, 0.200};
46  bool vtxFit_tmp[2] = {true, true};
47  int mHits_tmp[2] = {1, 1};
48  double isoHi_tmp[2] = {0.150, 0.150};
49  double isoLo_tmp[2] = {0.150, 0.100};
50  eidAssign(cutdeta, dEtaIn_tmp, 2);
51  eidAssign(cutdphi, dPhiIn_tmp, 2);
52  eidAssign(cutsee, sigmaIEtaIEta_tmp, 2);
53  eidAssign(cuthoe, hoe_tmp, 2);
54  eidAssign(cutooemoop, ooemoop_tmp, 2);
55  eidAssign(cutd0vtx, d0Vtx_tmp, 2);
56  eidAssign(cutdzvtx, dzVtx_tmp, 2);
57  eidAssign(cutvtxfit, vtxFit_tmp, 2);
58  eidAssign(cutmhit, mHits_tmp, 2);
59  eidAssign(cutrelisohighpt, isoHi_tmp, 2);
60  eidAssign(cutrelisolowpt, isoLo_tmp, 2);
61  return;
62  }
63  case MEDIUM:
64  {
65  double dEtaIn_tmp[2] = {0.004, 0.007};
66  double dPhiIn_tmp[2] = {0.060, 0.030};
67  double sigmaIEtaIEta_tmp[2] = {0.010, 0.030};
68  double hoe_tmp[2] = {0.120, 0.100};
69  double ooemoop_tmp[2] = {0.050, 0.050};
70  double d0Vtx_tmp[2] = {0.020, 0.020};
71  double dzVtx_tmp[2] = {0.100, 0.100};
72  bool vtxFit_tmp[2] = {true, true};
73  int mHits_tmp[2] = {1, 1};
74  double isoHi_tmp[2] = {0.150, 0.150};
75  double isoLo_tmp[2] = {0.150, 0.100};
76  eidAssign(cutdeta, dEtaIn_tmp, 2);
77  eidAssign(cutdphi, dPhiIn_tmp, 2);
78  eidAssign(cutsee, sigmaIEtaIEta_tmp, 2);
79  eidAssign(cuthoe, hoe_tmp, 2);
80  eidAssign(cutooemoop, ooemoop_tmp, 2);
81  eidAssign(cutd0vtx, d0Vtx_tmp, 2);
82  eidAssign(cutdzvtx, dzVtx_tmp, 2);
83  eidAssign(cutvtxfit, vtxFit_tmp, 2);
84  eidAssign(cutmhit, mHits_tmp, 2);
85  eidAssign(cutrelisohighpt, isoHi_tmp, 2);
86  eidAssign(cutrelisolowpt, isoLo_tmp, 2);
87  return;
88  }
89  case TIGHT:
90  {
91  double dEtaIn_tmp[2] = {0.004, 0.005};
92  double dPhiIn_tmp[2] = {0.030, 0.020};
93  double sigmaIEtaIEta_tmp[2] = {0.010, 0.030};
94  double hoe_tmp[2] = {0.120, 0.100};
95  double ooemoop_tmp[2] = {0.050, 0.050};
96  double d0Vtx_tmp[2] = {0.020, 0.020};
97  double dzVtx_tmp[2] = {0.100, 0.100};
98  bool vtxFit_tmp[2] = {true, true};
99  int mHits_tmp[2] = {0, 0};
100  double isoHi_tmp[2] = {0.100, 0.100};
101  double isoLo_tmp[2] = {0.100, 0.070};
102  eidAssign(cutdeta, dEtaIn_tmp, 2);
103  eidAssign(cutdphi, dPhiIn_tmp, 2);
104  eidAssign(cutsee, sigmaIEtaIEta_tmp, 2);
105  eidAssign(cuthoe, hoe_tmp, 2);
106  eidAssign(cutooemoop, ooemoop_tmp, 2);
107  eidAssign(cutd0vtx, d0Vtx_tmp, 2);
108  eidAssign(cutdzvtx, dzVtx_tmp, 2);
109  eidAssign(cutvtxfit, vtxFit_tmp, 2);
110  eidAssign(cutmhit, mHits_tmp, 2);
111  eidAssign(cutrelisohighpt, isoHi_tmp, 2);
112  eidAssign(cutrelisolowpt, isoLo_tmp, 2);
113  return;
114  }
115 
116  default:
117  edm::LogError("InvalidInput") << "[eidGetWP2012] ERROR! Invalid tightness level";
118 
119  }
120 
121  return;
122 
123  }
void eidAssign(std::vector< double > &cutarr, double cutvals[], unsigned int size)
double HWWFunctions::electron_d0PV_smurfV3 ( HWW hww,
unsigned int  index 
)

Definition at line 543 of file electronSelections.cc.

References funct::cos(), HWW::els_d0(), HWW::els_trk_p4(), funct::sin(), and HWW::vtxs_position().

Referenced by electronId_WP2012(), and electronSelection().

543  {
544  int vtxIndex = 0;
545  double dxyPV = hww.els_d0().at(index)-
546  hww.vtxs_position().at(vtxIndex).x()*sin(hww.els_trk_p4().at(index).phi())+
547  hww.vtxs_position().at(vtxIndex).y()*cos(hww.els_trk_p4().at(index).phi());
548  return dxyPV;
549  }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< float > & els_d0()
Definition: HWW.cc:145
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
std::vector< LorentzVector > & els_trk_p4()
Definition: HWW.cc:105
double HWWFunctions::electron_d0PV_wwV1 ( HWW hww,
unsigned int  index 
)

Definition at line 579 of file electronSelections.cc.

References funct::cos(), HWW::els_d0(), HWW::els_trk_p4(), i, isGoodVertex(), funct::sin(), HWW::vtxs_position(), and HWW::vtxs_sumpt().

Referenced by ElectronIDMVA::MVAValue().

579  {
580  if ( hww.vtxs_sumpt().empty() ) return 9999.;
581  double sumPtMax = -1;
582  int iMax = -1;
583  for ( unsigned int i = 0; i < hww.vtxs_sumpt().size(); ++i ){
584  if (!isGoodVertex(hww, i)) continue;
585  if ( hww.vtxs_sumpt().at(i) > sumPtMax ){
586  iMax = i;
587  sumPtMax = hww.vtxs_sumpt().at(i);
588  }
589  }
590  if (iMax<0) return 9999.;
591  double dxyPV = hww.els_d0().at(index)-
592  hww.vtxs_position().at(iMax).x()*sin(hww.els_trk_p4().at(index).phi())+
593  hww.vtxs_position().at(iMax).y()*cos(hww.els_trk_p4().at(index).phi());
594  return dxyPV;
595  }
int i
Definition: DBlmapReader.cc:9
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< float > & els_d0()
Definition: HWW.cc:145
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
std::vector< float > & vtxs_sumpt()
Definition: HWW.cc:13
std::vector< LorentzVector > & els_trk_p4()
Definition: HWW.cc:105
bool isGoodVertex(HWW &hww, int)
double HWWFunctions::electron_dzPV_smurfV3 ( HWW hww,
unsigned int  index 
)

Definition at line 554 of file electronSelections.cc.

References dzPV(), HWW::els_trk_p4(), HWW::els_vertex_p4(), and HWW::vtxs_position().

Referenced by electronId_WP2012(), and electronSelection().

554  {
555  int vtxIndex = 0;
556  double dzpv = dzPV(hww.els_vertex_p4().at(index), hww.els_trk_p4().at(index), hww.vtxs_position().at(vtxIndex));
557  return dzpv;
558  }
std::vector< LorentzVector > & els_vertex_p4()
Definition: HWW.cc:109
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
double dzPV(const LorentzVector &vtx, const LorentzVector &p4, const LorentzVector &pv)
std::vector< LorentzVector > & els_trk_p4()
Definition: HWW.cc:105
double HWWFunctions::electron_dzPV_wwV1 ( HWW hww,
unsigned int  index 
)

Definition at line 560 of file electronSelections.cc.

References HWW::els_trk_p4(), HWW::els_vertex_p4(), i, isGoodVertex(), p4, HWW::vtxs_position(), and HWW::vtxs_sumpt().

Referenced by ElectronIDMVA::MVAValue().

560  {
561  if ( hww.vtxs_sumpt().empty() ) return 9999.;
562  double sumPtMax = -1;
563  int iMax = -1;
564  for ( unsigned int i = 0; i < hww.vtxs_sumpt().size(); ++i ){
565  if (!isGoodVertex(hww, i)) continue;
566  if ( hww.vtxs_sumpt().at(i) > sumPtMax ){
567  iMax = i;
568  sumPtMax = hww.vtxs_sumpt().at(i);
569  }
570  }
571  if (iMax<0) return 9999.;
572 
573  const LorentzVector& vtx = hww.els_vertex_p4().at(index);
574  const LorentzVector& p4 = hww.els_trk_p4().at(index);
575  const LorentzVector& pv = hww.vtxs_position().at(iMax);
576  return (vtx.z()-pv.z()) - ((vtx.x()-pv.x())*p4.x()+(vtx.y()-pv.y())*p4.y())/p4.pt() * p4.z()/p4.pt();
577  }
int i
Definition: DBlmapReader.cc:9
std::vector< LorentzVector > & els_vertex_p4()
Definition: HWW.cc:109
double p4[4]
Definition: TauolaWrapper.h:92
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > LorentzVector
Definition: analysisEnums.h:9
std::vector< float > & vtxs_sumpt()
Definition: HWW.cc:13
std::vector< LorentzVector > & els_trk_p4()
Definition: HWW.cc:105
bool isGoodVertex(HWW &hww, int)
void HWWFunctions::electronCorrection_pos ( HWW hww,
const unsigned int  index,
float &  dEtaIn,
float &  dPhiIn 
)

Definition at line 483 of file electronSelections.cc.

References funct::cos(), HWW::els_dEtaIn(), HWW::els_dPhiIn(), HWW::els_etaSC(), HWW::els_fiduciality(), HWW::els_scindex(), ISEE, and HWW::scs_pos_p4().

Referenced by electronId_VBTF().

483  {
484 
485  //
486  // uncorrected dEtaIn and dPhiIn
487  //
488 
489  dEtaIn = hww.els_dEtaIn().at(index);
490  dPhiIn = hww.els_dPhiIn().at(index);
491 
492  //
493  // if configered not to apply correction
494  // or in barrel or no valid super cluster
495  // return uncorrected values
496  //
497 
498  if (!(hww.els_fiduciality().at(index) & 1<<ISEE)) return;
499  if (hww.els_scindex().at(index) == -1) return;
500 
501  //
502  // set up correction parameters for EE+ and EE-
503  // RecoEgamma/EgammaTools/python/correctedElectronsProducer_cfi.py?revision=1.2
504  //
505 
506  // X', Y', Z'
507  float scPositionCorrectionEEP[3] = { 0.52, -0.81, 0.81};
508  float scPositionCorrectionEEM[3] = { -0.02, -0.81, -0.94};
509 
510  LorentzVector initial_pos = hww.scs_pos_p4().at(hww.els_scindex().at(index));
511  LorentzVector corrected_pos;
512 
513  //
514  // work out corrected position
515  //
516 
517  if (hww.els_etaSC().at(index) < 0) {
518  corrected_pos = LorentzVector( initial_pos.x() + scPositionCorrectionEEM[0],
519  initial_pos.y() + scPositionCorrectionEEM[1],
520  initial_pos.z() + scPositionCorrectionEEM[2], 0.0);
521  }
522  if (hww.els_etaSC().at(index) > 0) {
523  corrected_pos = LorentzVector( initial_pos.x() + scPositionCorrectionEEP[0],
524  initial_pos.y() + scPositionCorrectionEEP[1],
525  initial_pos.z() + scPositionCorrectionEEP[2], 0.0);
526  }
527 
528  //
529  // work out correction to dEtaIn and dPhiIn
530  //
531 
532  float deta_sc = corrected_pos.Eta() - initial_pos.Eta();
533  float dphi_sc = acos(cos(corrected_pos.Phi() - initial_pos.Phi()));
534  dEtaIn = deta_sc + hww.els_dEtaIn().at(index);
535  dPhiIn = acos(cos(dphi_sc + hww.els_dPhiIn().at(index)));
536 
537  }
std::vector< int > & els_scindex()
Definition: HWW.cc:325
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< float > & els_etaSC()
Definition: HWW.cc:117
std::vector< float > & els_dPhiIn()
Definition: HWW.cc:129
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > LorentzVector
Definition: analysisEnums.h:9
std::vector< float > & els_dEtaIn()
Definition: HWW.cc:125
std::vector< LorentzVector > & scs_pos_p4()
Definition: HWW.cc:685
math::PtEtaPhiELorentzVectorF LorentzVector
std::vector< int > & els_fiduciality()
Definition: HWW.cc:349
bool HWWFunctions::ElectronFOIdV4 ( HWW hww,
unsigned int  i 
)

Definition at line 409 of file analysisSelections.cc.

References HWW::els_dEtaIn(), HWW::els_dPhiIn(), HWW::els_ecalIso(), HWW::els_etaSC(), HWW::els_exp_innerlayers(), HWW::els_hcalIso(), HWW::els_hOverE(), HWW::els_p4(), HWW::els_sigmaIEtaIEta(), HWW::els_tkIso(), isFromConversionMIT(), and RecoTauCleanerPlugins::pt.

Referenced by ElectronFOV4().

409  {
410 
411  float pt = hww.els_p4().at(i).pt();
412  float etaSC = hww.els_etaSC().at(i);
413 
414  if (fabs(etaSC)<1.479) {
415  if (hww.els_sigmaIEtaIEta().at(i)>0.01 ||
416  fabs(hww.els_dEtaIn().at(i))>0.007 ||
417  fabs(hww.els_dPhiIn().at(i))>0.15 ||
418  hww.els_hOverE().at(i)>0.12 ||
419  hww.els_tkIso().at(i)/pt>0.2 ||
420  (hww.els_ecalIso().at(i) - 1.0)/pt>0.2 ||
421  hww.els_hcalIso().at(i)/pt>0.2 ) return false;
422  } else {
423  if (hww.els_sigmaIEtaIEta().at(i)>0.03 ||
424  fabs(hww.els_dEtaIn().at(i))>0.009 ||
425  fabs(hww.els_dPhiIn().at(i))>0.10 ||
426  hww.els_hOverE().at(i)>0.10 ||
427  hww.els_tkIso().at(i)/pt>0.2 ||
428  hww.els_ecalIso().at(i)/pt>0.2 ||
429  hww.els_hcalIso().at(i)/pt>0.2 ) return false;
430  }
431 
432  // MIT conversion
433  if ( isFromConversionMIT(hww, i) ) return false;
434  // conversion rejection - hit based
435  if ( hww.els_exp_innerlayers().at(i) > 0 ) return false;
436 
437  return true;
438  }
int i
Definition: DBlmapReader.cc:9
std::vector< float > & els_tkIso()
Definition: HWW.cc:137
std::vector< int > & els_exp_innerlayers()
Definition: HWW.cc:337
std::vector< float > & els_hOverE()
Definition: HWW.cc:133
std::vector< float > & els_ecalIso()
Definition: HWW.cc:261
std::vector< float > & els_hcalIso()
Definition: HWW.cc:265
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
std::vector< float > & els_etaSC()
Definition: HWW.cc:117
bool isFromConversionMIT(HWW &, const unsigned int index)
std::vector< float > & els_dPhiIn()
Definition: HWW.cc:129
std::vector< float > & els_dEtaIn()
Definition: HWW.cc:125
std::vector< float > & els_sigmaIEtaIEta()
Definition: HWW.cc:121
bool HWWFunctions::ElectronFOV4 ( HWW hww,
unsigned int  i 
)

Definition at line 440 of file analysisSelections.cc.

References ElectronFOIdV4(), ww_elBase(), ww_eld0PV(), and ww_eldZPV().

Referenced by fakableElectron().

440  {
441  return ww_elBase(hww, i) && ElectronFOIdV4(hww, i) && ww_eld0PV(hww, i) && ww_eldZPV(hww, i);
442  }
int i
Definition: DBlmapReader.cc:9
bool ww_eldZPV(HWW &hww, unsigned int i)
bool ElectronFOIdV4(HWW &hww, unsigned int i)
bool ww_elBase(HWW &hww, unsigned int i)
bool ww_eld0PV(HWW &hww, unsigned int i)
electronIdComponent_t HWWFunctions::electronId_CIC ( HWW ,
const unsigned int  index,
const unsigned int  version,
const cic_tightness  tightness,
bool  applyAlignementCorrection = false,
bool  removedEtaCutInEndcap = false 
)
bool HWWFunctions::electronId_smurf_v1 ( HWW hww,
const unsigned int  index 
)

Definition at line 141 of file electronSelections.cc.

References HWW::els_charge(), HWW::els_dPhiIn(), HWW::els_eOverPIn(), HWW::els_etaSC(), HWW::els_fbrem(), and HWW::els_p4().

Referenced by electronSelection().

142  {
143 
144  if (hww.els_p4().at(index).pt() > 20.0) return true;
145 
146  if (hww.els_fbrem().at(index) > 0.15) return true;
147 
148  if (fabs(hww.els_etaSC().at(index)) < 1.) {
149  if (hww.els_eOverPIn().at(index) > 0.95 && fabs(hww.els_dPhiIn().at(index)*hww.els_charge().at(index)) < 0.006) return true;
150  }
151 
152  return false;
153  }
std::vector< float > & els_fbrem()
Definition: HWW.cc:153
std::vector< float > & els_eOverPIn()
Definition: HWW.cc:157
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
std::vector< float > & els_etaSC()
Definition: HWW.cc:117
std::vector< int > & els_charge()
Definition: HWW.cc:329
std::vector< float > & els_dPhiIn()
Definition: HWW.cc:129
bool HWWFunctions::electronId_smurf_v2 ( HWW hww,
const unsigned int  index 
)

Definition at line 155 of file electronSelections.cc.

References HWW::els_eOverPIn(), HWW::els_etaSC(), HWW::els_fbrem(), and HWW::els_p4().

Referenced by electronSelection().

156  {
157 
158  if (hww.els_p4().at(index).pt() > 20.0) return true;
159 
160  if (hww.els_fbrem().at(index) > 0.15) return true;
161 
162  if (fabs(hww.els_etaSC().at(index)) < 1.) {
163  if (hww.els_eOverPIn().at(index) > 0.95) return true;
164  }
165 
166  return false;
167  }
std::vector< float > & els_fbrem()
Definition: HWW.cc:153
std::vector< float > & els_eOverPIn()
Definition: HWW.cc:157
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
std::vector< float > & els_etaSC()
Definition: HWW.cc:117
bool HWWFunctions::electronId_smurf_v3 ( HWW hww,
const unsigned int  index 
)

Definition at line 169 of file electronSelections.cc.

References electronId_VBTF(), ELEID_ID, HWW::els_eOverPIn(), HWW::els_etaSC(), HWW::els_fbrem(), HWW::els_hOverE(), HWW::els_p4(), and VBTF_70_NOHOEEND.

Referenced by electronSelection().

170  {
171  if (fabs(hww.els_etaSC().at(index)) > 1.479 && hww.els_hOverE().at(index) > 0.1) return false;
172 
173  if (hww.els_p4().at(index).pt() > 20.0) return true;
174 
175  electronIdComponent_t answer_vbtf = 0;
176  answer_vbtf = electronId_VBTF(hww, index, VBTF_70_NOHOEEND, false, false);
177  if ((answer_vbtf & (1ll<<ELEID_ID)) == (1ll<<ELEID_ID)) {
178 
179  if (hww.els_fbrem().at(index) > 0.15) return true;
180 
181  if (fabs(hww.els_etaSC().at(index)) < 1.) {
182  if (hww.els_eOverPIn().at(index) > 0.95) return true;
183  }
184 
185  }
186 
187  return false;
188  }
uint64 electronIdComponent_t
std::vector< float > & els_hOverE()
Definition: HWW.cc:133
std::vector< float > & els_fbrem()
Definition: HWW.cc:153
electronIdComponent_t electronId_VBTF(HWW &, const unsigned int index, const vbtf_tightness tightness, bool applyAlignementCorrection=false, bool removedEtaCutInEndcap=false)
std::vector< float > & els_eOverPIn()
Definition: HWW.cc:157
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
std::vector< float > & els_etaSC()
Definition: HWW.cc:117
electronIdComponent_t HWWFunctions::electronId_VBTF ( HWW hww,
const unsigned int  index,
const vbtf_tightness  tightness,
bool  applyAlignementCorrection = false,
bool  removedEtaCutInEndcap = false 
)

Definition at line 287 of file electronSelections.cc.

References submit::answer, eidGetVBTF(), electronCorrection_pos(), electronIsolation_rel(), ELEID_ID, ELEID_ISO, HWW::els_dEtaIn(), HWW::els_dPhiIn(), HWW::els_etaSC(), HWW::els_hOverE(), and HWW::els_sigmaIEtaIEta().

Referenced by electronId_smurf_v3(), and electronSelection().

288  {
289 
290  unsigned int answer = 0;
291 
292  std::vector<double> relisoThresholds;
293  std::vector<double> dEtaInThresholds;
294  std::vector<double> dPhiInThresholds;
295  std::vector<double> hoeThresholds;
296  std::vector<double> sigmaIEtaIEtaThresholds;
297 
298  eidGetVBTF(tightness, dEtaInThresholds, dPhiInThresholds, hoeThresholds,
299  sigmaIEtaIEtaThresholds, relisoThresholds);
300 
301  //
302  // get corrected dEtaIn and dPhiIn
303  //
304 
305  float dEtaIn = hww.els_dEtaIn().at(index);
306  float dPhiIn = hww.els_dPhiIn().at(index);
307  if (applyAlignementCorrection) electronCorrection_pos(hww, index, dEtaIn, dPhiIn);
308 
309  // barrel
310  if (fabs(hww.els_etaSC().at(index)) < 1.479) {
311 
312  if (electronIsolation_rel(hww, index, true) < relisoThresholds[0])
313  answer |= (1<<ELEID_ISO);
314 
315  if (fabs(dEtaIn) < dEtaInThresholds[0] &&
316  fabs(dPhiIn) < dPhiInThresholds[0] &&
317  hww.els_hOverE().at(index) < hoeThresholds[0] &&
318  hww.els_sigmaIEtaIEta().at(index) < sigmaIEtaIEtaThresholds[0])
319  answer |= (1<<ELEID_ID);
320  }
321 
322  // endcap
323  if (fabs(hww.els_etaSC().at(index)) > 1.479) {
324  if (electronIsolation_rel(hww, index, true) < relisoThresholds[1])
325  answer |= (1<<ELEID_ISO);
326  bool passdEtaCut = fabs(dEtaIn) < dEtaInThresholds[1];
327  if(removedEtaCutInEndcap) passdEtaCut = true;
328  if ( passdEtaCut &&
329  fabs(dPhiIn) < dPhiInThresholds[1] &&
330  hww.els_hOverE().at(index) < hoeThresholds[1] &&
331  hww.els_sigmaIEtaIEta().at(index) < sigmaIEtaIEtaThresholds[1])
332  answer |= (1<<ELEID_ID);
333  }
334 
335  return answer;
336 
337  }
float electronIsolation_rel(HWW &, const unsigned int index, bool use_calo_iso)
answer
Definition: submit.py:44
std::vector< float > & els_hOverE()
Definition: HWW.cc:133
void eidGetVBTF(const vbtf_tightness tightness, std::vector< double > &cutdeta, std::vector< double > &cutdphi, std::vector< double > &cuthoe, std::vector< double > &cutsee, std::vector< double > &cutreliso)
std::vector< float > & els_etaSC()
Definition: HWW.cc:117
std::vector< float > & els_dPhiIn()
Definition: HWW.cc:129
std::vector< float > & els_dEtaIn()
Definition: HWW.cc:125
void electronCorrection_pos(HWW &, const unsigned int index, float &dEtaIn, float &dPhiIn)
std::vector< float > & els_sigmaIEtaIEta()
Definition: HWW.cc:121
electronIdComponent_t HWWFunctions::electronId_WP2012 ( HWW hww,
const unsigned int  index,
const wp2012_tightness  tightness 
)

Definition at line 192 of file electronSelections.cc.

References HWWFunctions::wp2012::D0VTX, HWWFunctions::wp2012::DETAIN, HWWFunctions::wp2012::DPHIIN, HWWFunctions::wp2012::DZVTX, alignCSCRings::e, eidGetWP2012(), electron_d0PV_smurfV3(), electron_dzPV_smurfV3(), HWW::els_dEtaIn(), HWW::els_dPhiIn(), HWW::els_ecalEnergy(), HWW::els_eOverPIn(), HWW::els_etaSC(), HWW::els_exp_innerlayers(), HWW::els_fiduciality(), HWW::els_hOverE(), HWW::els_iso03_pf2012_ch(), HWW::els_iso03_pf2012_em(), HWW::els_iso03_pf2012_nh(), HWW::els_p4(), HWW::els_sigmaIEtaIEta(), HWW::evt_kt6pf_foregiso_rho(), HWWFunctions::wp2012::HOE, ISEB, isMITConversion(), HWWFunctions::wp2012::ISO, bookConverter::max, HWWFunctions::wp2012::MHITS, HWWFunctions::wp2012::OOEMOOP, RecoTauCleanerPlugins::pt, HWWFunctions::wp2012::SIGMAIETAIETA, and HWWFunctions::wp2012::VTXFIT.

Referenced by electronSelection().

193  {
194 
195  // set return value
196  unsigned int mask = 0;
197 
198  // cut values
199  std::vector<double> dEtaInThresholds;
200  std::vector<double> dPhiInThresholds;
201  std::vector<double> sigmaIEtaIEtaThresholds;
202  std::vector<double> hoeThresholds;
203  std::vector<double> ooemoopThresholds;
204  std::vector<double> d0VtxThresholds;
205  std::vector<double> dzVtxThresholds;
206  std::vector<bool> vtxFitThresholds;
207  std::vector<int> mHitsThresholds;
208  std::vector<double> isoHiThresholds;
209  std::vector<double> isoLoThresholds;
210 
211  // set cut values
212  eidGetWP2012(tightness, dEtaInThresholds, dPhiInThresholds, hoeThresholds, sigmaIEtaIEtaThresholds,
213  ooemoopThresholds, d0VtxThresholds, dzVtxThresholds, vtxFitThresholds, mHitsThresholds,
214  isoHiThresholds, isoLoThresholds);
215 
216  // useful kinematic variables
217  unsigned int det = ((hww.els_fiduciality().at(index) & (1<<ISEB)) == (1<<ISEB)) ? 0 : 1;
218  float etaAbs = fabs(hww.els_etaSC().at(index));
219  float pt = hww.els_p4().at(index).pt();
220 
221  // get effective area
222  float AEff = 0.;
223  if (etaAbs <= 1.0) AEff = 0.10;
224  else if (etaAbs > 1.0 && etaAbs <= 1.479) AEff = 0.12;
225  else if (etaAbs > 1.479 && etaAbs <= 2.0) AEff = 0.085;
226  else if (etaAbs > 2.0 && etaAbs <= 2.2) AEff = 0.11;
227  else if (etaAbs > 2.2 && etaAbs <= 2.3) AEff = 0.12;
228  else if (etaAbs > 2.3 && etaAbs <= 2.4) AEff = 0.12;
229  else if (etaAbs > 2.4) AEff = 0.13;
230 
231  // pf iso
232  // calculate from the ntuple for now...
233  float pfiso_ch = hww.els_iso03_pf2012_ch().at(index);
234  float pfiso_em = hww.els_iso03_pf2012_em().at(index);
235  float pfiso_nh = hww.els_iso03_pf2012_nh().at(index);
236 
237  // rho
238  float rhoPrime = std::max(hww.evt_kt6pf_foregiso_rho(), float(0.0));
239  float pfiso_n = std::max(pfiso_em + pfiso_nh - rhoPrime * AEff, float(0.0));
240  float pfiso = (pfiso_ch + pfiso_n) / pt;
241 
242  // |1/E - 1/p|
243  float ooemoop = fabs( (1.0/hww.els_ecalEnergy().at(index)) - (hww.els_eOverPIn().at(index)/hww.els_ecalEnergy().at(index)) );
244 
245  // MIT conversion vtx fit
246  bool vtxFitConversion = isMITConversion(hww, index, 0, 1e-6, 2.0, true, false);
247 
248  // d0
249  float d0vtx = electron_d0PV_smurfV3(hww, index);
250  float dzvtx = electron_dzPV_smurfV3(hww, index);
251 
252  // test cuts
253  if (fabs(hww.els_dEtaIn().at(index)) < dEtaInThresholds[det]) mask |= wp2012::DETAIN;
254  if (fabs(hww.els_dPhiIn().at(index)) < dPhiInThresholds[det]) mask |= wp2012::DPHIIN;
255  if (hww.els_sigmaIEtaIEta().at(index) < sigmaIEtaIEtaThresholds[det]) mask |= wp2012::SIGMAIETAIETA;
256  if (hww.els_hOverE().at(index) < hoeThresholds[det]) mask |= wp2012::HOE;
257  if (ooemoop < ooemoopThresholds[det]) mask |= wp2012::OOEMOOP;
258  if (fabs(d0vtx) < d0VtxThresholds[det]) mask |= wp2012::D0VTX;
259  if (fabs(dzvtx) < dzVtxThresholds[det]) mask |= wp2012::DZVTX;
260  if (!vtxFitThresholds[det] || !vtxFitConversion) mask |= wp2012::VTXFIT;
261  if (hww.els_exp_innerlayers().at(index) <= mHitsThresholds[det]) mask |= wp2012::MHITS;
262  if (pt >= 20.0 && pfiso < isoHiThresholds[det]) mask |= wp2012::ISO;
263  if (pt < 20.0 && pfiso < isoLoThresholds[det]) mask |= wp2012::ISO;
264 
265  // return the mask
266  return mask;
267 
268  }
std::vector< float > & els_iso03_pf2012_ch()
Definition: HWW.cc:301
std::vector< int > & els_exp_innerlayers()
Definition: HWW.cc:337
bool isMITConversion(HWW &, unsigned int elidx, int nWrongHitsMax, float probMin, float dlMin, bool matchCTF, bool requireArbitratedMerged)
std::vector< float > & els_hOverE()
Definition: HWW.cc:133
std::vector< float > & els_ecalEnergy()
Definition: HWW.cc:253
std::vector< float > & els_iso03_pf2012_nh()
Definition: HWW.cc:309
double electron_dzPV_smurfV3(HWW &, unsigned int index)
std::vector< float > & els_eOverPIn()
Definition: HWW.cc:157
double electron_d0PV_smurfV3(HWW &, unsigned int index)
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
std::vector< float > & els_etaSC()
Definition: HWW.cc:117
std::vector< float > & els_dPhiIn()
Definition: HWW.cc:129
float & evt_kt6pf_foregiso_rho()
Definition: HWW.cc:635
void eidGetWP2012(const wp2012_tightness tightness, std::vector< double > &cutdeta, std::vector< double > &cutdphi, std::vector< double > &cuthoe, std::vector< double > &cutsee, std::vector< double > &cutooemoop, std::vector< double > &cutd0vtx, std::vector< double > &cutdzvtx, std::vector< bool > &cutvtxfit, std::vector< int > &cutmhit, std::vector< double > &cutrelisohighpt, std::vector< double > &cutrelisolowpt)
std::vector< float > & els_dEtaIn()
Definition: HWW.cc:125
std::vector< float > & els_iso03_pf2012_em()
Definition: HWW.cc:305
std::vector< float > & els_sigmaIEtaIEta()
Definition: HWW.cc:121
std::vector< int > & els_fiduciality()
Definition: HWW.cc:349
electronIdComponent_t HWWFunctions::electronId_WP2012_noIso_useElEtaForIsEB ( HWW ,
const unsigned int  index,
const wp2012_tightness  tightness 
)
electronIdComponent_t HWWFunctions::electronId_WP2012_v2 ( HWW ,
const unsigned int  index,
const wp2012_tightness  tightness,
bool  useOldIsolation = false 
)
electronIdComponent_t HWWFunctions::electronId_WP2012_v3 ( HWW ,
const unsigned int  index,
const wp2012_tightness  tightness,
bool  useOldIsolation = false 
)
float HWWFunctions::electronIsolation_rel ( HWW hww,
const unsigned int  index,
bool  use_calo_iso 
)

Definition at line 373 of file electronSelections.cc.

References HWW::els_ecalIso(), HWW::els_etaSC(), HWW::els_hcalIso(), HWW::els_p4(), HWW::els_tkIso(), bookConverter::max, and RecoTauCleanerPlugins::pt.

Referenced by electronId_VBTF().

373  {
374  float sum = hww.els_tkIso().at(index);
375  if (use_calo_iso) {
376  if (fabs(hww.els_etaSC().at(index)) > 1.479) sum += hww.els_ecalIso().at(index);
377  if (fabs(hww.els_etaSC().at(index)) <= 1.479) sum += max(0., (hww.els_ecalIso().at(index) -1.));
378  sum += hww.els_hcalIso().at(index);
379  }
380  double pt = hww.els_p4().at(index).pt();
381  return sum/max(pt, 20.);
382  }
std::vector< float > & els_tkIso()
Definition: HWW.cc:137
std::vector< float > & els_ecalIso()
Definition: HWW.cc:261
std::vector< float > & els_hcalIso()
Definition: HWW.cc:265
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
std::vector< float > & els_etaSC()
Definition: HWW.cc:117
float HWWFunctions::electronIsoValuePF ( HWW hww,
const unsigned int  iel,
unsigned int  ivtx,
float  coner = 0.4,
float  minptn = 1.0,
float  dzcut = 0.1,
float  footprintdr = 0.07,
float  gammastripveto = 0.025,
float  elestripveto = -999.,
int  filterId = 0 
)

Definition at line 384 of file electronSelections.cc.

References funct::abs(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, HWW::els_gsftrkidx(), HWW::els_p4(), HWW::els_trkidx(), first, gsftrks_dz_pv(), HWW::pfcands_charge(), HWW::pfcands_p4(), HWW::pfcands_particleId(), HWW::pfcands_pfelsidx(), HWW::pfcands_trkidx(), HWW::pfels_elsidx(), and trks_dz_pv().

Referenced by electronSelection(), and ElectronMaker::SetVars().

384  {
385 
386  int elgsftkid = hww.els_gsftrkidx().at(iel);
387  int eltkid = hww.els_trkidx().at(iel);
388  float eldz = elgsftkid>=0 ? gsftrks_dz_pv(hww, elgsftkid,ivtx ).first : trks_dz_pv(hww, eltkid,ivtx).first;
389  float eleta = hww.els_p4().at(iel).eta();
390 
391  float pfciso = 0.;
392  float pfniso = 0.;
393  float pffootprint = 0.;
394  float pfjurveto = 0.;
395  float pfjurvetoq = 0.;
396  for (unsigned int ipf=0; ipf<hww.pfcands_p4().size(); ++ipf){
397 
398  float dR = ROOT::Math::VectorUtil::DeltaR( hww.pfcands_p4().at(ipf), hww.els_p4().at(iel) );
399 
400  if (dR>coner) continue;
401 
402  float pfpt = hww.pfcands_p4().at(ipf).pt();
403  float pfeta = hww.pfcands_p4().at(ipf).eta();
404  float deta = fabs(pfeta - eleta);
405  int pfid = abs(hww.pfcands_particleId().at(ipf));
406 
407  if (filterId!=0 && filterId!=pfid) continue;
408 
409  if (hww.pfcands_charge().at(ipf)==0) {
410  //neutrals
411  if (pfpt>minptn) {
412  pfniso+=pfpt;
413  if (dR<footprintdr && pfid==130) pffootprint+=pfpt;
414  if (deta<gammastripveto && pfid==22) pfjurveto+=pfpt;
415  }
416  } else {
417  //charged
418  //avoid double counting of electron itself
419  //if either the gsf or the ctf track are shared with the candidate, skip it
420  int pftkid = hww.pfcands_trkidx().at(ipf);
421  if (eltkid>=0 && pftkid>=0 && eltkid==pftkid) continue;
422  if (pfid==11 && hww.pfcands_pfelsidx().at(ipf)>=0 && hww.pfels_elsidx().at(hww.pfcands_pfelsidx().at(ipf))>=0) {
423  int pfgsfid = hww.els_gsftrkidx().at(hww.pfels_elsidx().at(hww.pfcands_pfelsidx().at(ipf)));
424  if (elgsftkid>=0 && pfgsfid>=0 && elgsftkid==pfgsfid) continue;
425  }
426  //check electrons with gsf track
427  if (pfid==11 && hww.pfcands_pfelsidx().at(ipf)>=0 && hww.pfels_elsidx().at(hww.pfcands_pfelsidx().at(ipf))>=0) {
428  int gsfid = hww.els_gsftrkidx().at(hww.pfels_elsidx().at(hww.pfcands_pfelsidx().at(ipf)));
429  if (gsfid>=0) {
430  if(fabs(gsftrks_dz_pv(hww, gsfid,ivtx ).first - eldz )<dzcut) {//dz cut
431  pfciso+=pfpt;
432  if (deta<elestripveto && pfid==11) pfjurvetoq+=pfpt;
433  }
434  continue;//and avoid double counting
435  }
436  }
437  //then check anything that has a ctf track
438  if (pftkid>=0) {//charged (with a ctf track)
439  if(fabs( trks_dz_pv(hww, hww.pfcands_trkidx().at(ipf),ivtx).first - eldz )<dzcut) {//dz cut
440  pfciso+=pfpt;
441  if (deta<elestripveto && pfid==11) pfjurvetoq+=pfpt;
442  }
443  }
444  }
445  }
446 
447 
448  return (pfciso+pfniso-pffootprint-pfjurveto-pfjurvetoq)/hww.els_p4().at(iel).pt();
449 
450  }
std::vector< int > & pfels_elsidx()
Definition: HWW.cc:749
std::vector< int > & pfcands_charge()
Definition: HWW.cc:745
std::vector< LorentzVector > & pfcands_p4()
Definition: HWW.cc:725
std::vector< int > & els_gsftrkidx()
Definition: HWW.cc:333
std::vector< int > & pfcands_trkidx()
Definition: HWW.cc:729
std::vector< int > & pfcands_pfelsidx()
Definition: HWW.cc:737
std::pair< double, double > gsftrks_dz_pv(HWW &, int itrk, int ipv)
std::vector< int > & pfcands_particleId()
Definition: HWW.cc:733
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool first
Definition: L1TdeRCT.cc:75
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
std::pair< double, double > trks_dz_pv(HWW &, int itrk, int ipv)
std::vector< int > & els_trkidx()
Definition: HWW.cc:341
void HWWFunctions::electronIsoValuePF2012 ( HWW ,
float &  pfiso_ch,
float &  pfiso_em,
float &  pfiso_nh,
const float  R,
const unsigned int  iel,
const int  ivtx,
bool  barrelVetoes = false 
)
float HWWFunctions::electronIsoValuePF2012_FastJetEffArea ( HWW ,
int  index,
float  conesize = 0.3,
int  ivtx = 0 
)
float HWWFunctions::electronIsoValuePF2012_FastJetEffArea_HWW ( HWW hww,
int  index 
)

Definition at line 599 of file electronSelections.cc.

References HWW::els_etaSC(), HWW::els_iso04_pf2012_ch(), HWW::els_iso04_pf2012_em(), HWW::els_iso04_pf2012_nh(), HWW::els_p4(), HWW::evt_ww_rho(), f, fastJetEffArea04_v1(), LogDebug, bookConverter::max, and RecoTauCleanerPlugins::pt.

Referenced by ww_elIsoVal().

599  {
600 
601  const float etaAbs = fabs(hww.els_etaSC().at(index));
602  const float pt = hww.els_p4().at(index).pt();
603 
604  // get effective area
605  const float AEff = fastJetEffArea04_v1(etaAbs);
606 
607  // pf iso
608  // calculate from the ntuple for now...
609  const float pfiso_ch = hww.els_iso04_pf2012_ch().at(index);
610  const float pfiso_em = hww.els_iso04_pf2012_em().at(index);
611  const float pfiso_nh = hww.els_iso04_pf2012_nh().at(index);
612 
613  // rho
614  const float rhoPrime = std::max(hww.evt_ww_rho(), 0.0f);
615  const float pfiso_n = std::max(pfiso_em + pfiso_nh - rhoPrime * AEff, 0.0f);
616  const float pfiso = (pfiso_ch + pfiso_n) / pt;
617 
618  // debug
619  if(0) {
620  LogDebug("electronSelections") << "AEff : " << AEff << " "
621  << "rho : " << rhoPrime << " "
622  << "pfiso_ch : " << pfiso_ch << " "
623  << "pfiso_em : " << pfiso_em << " "
624  << "pfiso_nh : " << pfiso_nh << " "
625  << "pfiso_n : " << pfiso_n << " "
626  << "pfiso : " << pfiso << " "
627  << "pt : " << pt << " "
628  << "etaAbs : " << etaAbs;
629  }
630 
631  return pfiso;
632  }
#define LogDebug(id)
float fastJetEffArea04_v1(HWW &, const float eta)
std::vector< float > & els_iso04_pf2012_nh()
Definition: HWW.cc:297
std::vector< float > & els_iso04_pf2012_em()
Definition: HWW.cc:293
std::vector< float > & els_iso04_pf2012_ch()
Definition: HWW.cc:289
double f[11][100]
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
std::vector< float > & els_etaSC()
Definition: HWW.cc:117
float & evt_ww_rho()
Definition: HWW.cc:627
float HWWFunctions::electronIsoValuePF2012_FastJetEffArea_v2 ( HWW ,
int  index,
float  conesize = 0.3,
int  ivtx = 0,
bool  useOldIsolation = false 
)
float HWWFunctions::electronIsoValuePF2012_FastJetEffArea_v3 ( HWW ,
int  index,
float  conesize = 0.3,
int  ivtx = 0,
bool  useOldIsolation = false 
)
void HWWFunctions::electronIsoValuePF2012reco ( HWW ,
float &  pfiso_ch,
float &  pfiso_em,
float &  pfiso_nh,
const float  R,
const unsigned int  iel,
const int  ivtx,
float  neutral_threshold = 0.5 
)
float HWWFunctions::electronRadialIsolation ( HWW ,
int  index,
float &  chiso,
float &  nhiso,
float &  emiso,
float  neutral_et_threshold = 1.0,
float  cone_size = 0.3,
bool  barrelVetoes = false,
bool  verbose = false 
)
cuts_t HWWFunctions::electronSelection ( HWW hww,
const unsigned int  index,
bool  applyAlignmentCorrection = false,
bool  removedEtaCutInEndcap = false,
bool  useGsfTrack = true 
)

Definition at line 26 of file electronSelections.cc.

References ELE_NOT_TRANSITION, ELECHARGE_NOTFLIP3AGREE, electron_d0PV_smurfV3(), electron_dzPV_smurfV3(), electronId_smurf_v1(), electronId_smurf_v2(), electronId_smurf_v3(), electronId_VBTF(), electronId_WP2012(), electronIsoValuePF(), ELEETA_240, ELEETA_250, ELEID_ID, ELEID_SMURFV1_EXTRA, ELEID_SMURFV2_EXTRA, ELEID_SMURFV3_EXTRA, ELEID_VBTF_35X_80, ELEID_VBTF_35X_90, ELEID_VBTF_35X_95, ELEID_VBTF_70_NOHOEEND, ELEID_VBTF_80_NOHOEEND, ELEID_VBTF_85, ELEID_VBTF_85_NOHOEEND, ELEID_VBTF_90_HLT, ELEID_VBTF_90_HLT_CALOIDT_TRKIDVL, ELEID_VBTF_95_NOHOEEND, ELEID_WP2012_LOOSE_NOISO, ELEID_WP2012_MEDIUM_NOISO, ELEID_WP2012_MEDIUM_NOISO_NOIP, ELEIP_PV_DZ_1MM, ELEIP_PV_OSV2, ELEIP_PV_OSV2_FO, ELEIP_PV_SMURFV3, ELEISO_SMURFV4, ELEISO_SMURFV5, ELENOTCONV_DISTDCOT002, ELENOTCONV_HITPATTERN_0MHITS, ELENOTCONV_MIT, ELEPT_010, ELESEED_ECAL, HWW::els_etaSC(), HWW::els_exp_innerlayers(), HWW::els_p4(), HWW::els_type(), isChargeFlip3agree(), ISECALDRIVEN, isFromConversionMIT(), isFromConversionPartnerTrack(), LOOSE, MEDIUM, HWWFunctions::wp2012::PassWP2012CutsNoIso, HWWFunctions::wp2012::PassWP2012CutsNoIsoNoIP, VBTF_35X_80, VBTF_35X_90, VBTF_35X_95, VBTF_70_NOHOEEND, VBTF_80_NOHOEEND, VBTF_85, VBTF_85_NOHOEEND, VBTF_90_HLT, VBTF_90_HLT_CALOIDT_TRKIDVL, and VBTF_95_NOHOEEND.

Referenced by WZInterestingEventSelector::filter(), and pass_electronSelection().

26  {
27 
28  // keep track of which cuts passed
29  cuts_t cuts_passed = 0;
30 
32  // Isolation //
34 
35 
36  //pf iso
37  float pfiso = electronIsoValuePF(hww, index,0);
38  if (fabs(hww.els_p4().at(index).eta()) < 1.479){
39  if (pfiso<0.15) cuts_passed |= (1ll<<ELEISO_SMURFV4);
40  if (pfiso<0.13) cuts_passed |= (1ll<<ELEISO_SMURFV5);
41  } else if (pfiso<0.09) {
42  cuts_passed |= (1ll<<ELEISO_SMURFV4);
43  cuts_passed |= (1ll<<ELEISO_SMURFV5);
44  }
45 
47  // d0 //
49  if (fabs(electron_d0PV_smurfV3(hww, index)) < 0.02 && fabs(electron_dzPV_smurfV3(hww, index)) < 0.2 ) cuts_passed |= (1ll<<ELEIP_PV_SMURFV3);
50  if (fabs(electron_dzPV_smurfV3(hww, index)) < 0.1 ) cuts_passed |= (1ll<<ELEIP_PV_DZ_1MM);
51  if (fabs(electron_d0PV_smurfV3(hww, index)) < 0.04 && fabs(electron_dzPV_smurfV3(hww, index)) < 1.0 ) cuts_passed |= (1ll<<ELEIP_PV_OSV2);
52  if (fabs(electron_d0PV_smurfV3(hww, index)) < 0.20 && fabs(electron_dzPV_smurfV3(hww, index)) < 1.0 ) cuts_passed |= (1ll<<ELEIP_PV_OSV2_FO);
53 
55  // Identification //
57 
58  // SMURF ID
59  if (electronId_smurf_v1(hww, index)) cuts_passed |= (1ll<<ELEID_SMURFV1_EXTRA);
60  if (electronId_smurf_v2(hww, index)) cuts_passed |= (1ll<<ELEID_SMURFV2_EXTRA);
61  if (electronId_smurf_v3(hww, index)) cuts_passed |= (1ll<<ELEID_SMURFV3_EXTRA);
62 
63 
64  electronIdComponent_t answer_med_2012 = electronId_WP2012(hww, index, MEDIUM);
65  if ((answer_med_2012 & PassWP2012CutsNoIso) == PassWP2012CutsNoIso) cuts_passed |= (1ll<<ELEID_WP2012_MEDIUM_NOISO);
66  if ((answer_med_2012 & PassWP2012CutsNoIsoNoIP) == PassWP2012CutsNoIsoNoIP) cuts_passed |= (1ll<<ELEID_WP2012_MEDIUM_NOISO_NOIP);
67 
68  electronIdComponent_t answer_loose_2012 = electronId_WP2012(hww, index, LOOSE);
69  if ((answer_loose_2012 & PassWP2012CutsNoIso) == PassWP2012CutsNoIso) cuts_passed |= (1ll<<ELEID_WP2012_LOOSE_NOISO);
70 
71  // VBTF ID
72  electronIdComponent_t answer_vbtf = 0;
73  // VBTF95 (optimised in 35X)
74  answer_vbtf = electronId_VBTF(hww, index, VBTF_35X_95, applyAlignmentCorrection, removedEtaCutInEndcap);
75  if ((answer_vbtf & (1ll<<ELEID_ID)) == (1ll<<ELEID_ID)) cuts_passed |= (1ll<<ELEID_VBTF_35X_95);
76  // VBTF90 (optimised in 35X)
77  answer_vbtf = electronId_VBTF(hww, index, VBTF_35X_90, applyAlignmentCorrection, removedEtaCutInEndcap);
78  if ((answer_vbtf & (1ll<<ELEID_ID)) == (1ll<<ELEID_ID)) cuts_passed |= (1ll<<ELEID_VBTF_35X_90);
79  // VBTF80 (optimised in 35X)
80  answer_vbtf = electronId_VBTF(hww, index, VBTF_35X_80, applyAlignmentCorrection, removedEtaCutInEndcap);
81  if ((answer_vbtf & (1ll<<ELEID_ID)) == (1ll<<ELEID_ID)) cuts_passed |= (1ll<<ELEID_VBTF_35X_80);
82  // VBTF85 no H/E in endcap
83  answer_vbtf = electronId_VBTF(hww, index, VBTF_85_NOHOEEND, applyAlignmentCorrection, removedEtaCutInEndcap);
84  if ((answer_vbtf & (1ll<<ELEID_ID)) == (1ll<<ELEID_ID)) cuts_passed |= (1ll<<ELEID_VBTF_85_NOHOEEND);
85  // VBTF85
86  answer_vbtf = electronId_VBTF(hww, index, VBTF_85 , applyAlignmentCorrection, removedEtaCutInEndcap);
87  if ((answer_vbtf & (1ll<<ELEID_ID)) == (1ll<<ELEID_ID)) cuts_passed |= (1ll<<ELEID_VBTF_85);
88  // VBTF80 no H/E in endcap
89  answer_vbtf = electronId_VBTF(hww, index, VBTF_80_NOHOEEND, applyAlignmentCorrection, removedEtaCutInEndcap);
90  if ((answer_vbtf & (1ll<<ELEID_ID)) == (1ll<<ELEID_ID)) cuts_passed |= (1ll<<ELEID_VBTF_80_NOHOEEND);
91  // VBTF70 no H/E in endcap
92  answer_vbtf = electronId_VBTF(hww, index, VBTF_70_NOHOEEND, applyAlignmentCorrection, removedEtaCutInEndcap);
93  if ((answer_vbtf & (1ll<<ELEID_ID)) == (1ll<<ELEID_ID)) cuts_passed |= (1ll<<ELEID_VBTF_70_NOHOEEND);
94  // VBTF90 with H/E and dPhiIn tuned to match HLT
95  answer_vbtf = electronId_VBTF(hww, index, VBTF_90_HLT, applyAlignmentCorrection, removedEtaCutInEndcap);
96  if ((answer_vbtf & (1ll<<ELEID_ID)) == (1ll<<ELEID_ID)) cuts_passed |= (1ll<<ELEID_VBTF_90_HLT);
97  // VBTF90 with H/E and dPhiIn tuned to match HLT (CaloIdT+TrkIdVL)
98  answer_vbtf = electronId_VBTF(hww, index, VBTF_90_HLT_CALOIDT_TRKIDVL, applyAlignmentCorrection, removedEtaCutInEndcap);
99  if ((answer_vbtf & (1ll<<ELEID_ID)) == (1ll<<ELEID_ID)) cuts_passed |= (1ll<<ELEID_VBTF_90_HLT_CALOIDT_TRKIDVL);
100  // VBTF95 no H/E in endcap
101  answer_vbtf = electronId_VBTF(hww, index, VBTF_95_NOHOEEND, applyAlignmentCorrection, removedEtaCutInEndcap);
102  if ((answer_vbtf & (1ll<<ELEID_ID)) == (1ll<<ELEID_ID)) cuts_passed |= (1ll<<ELEID_VBTF_95_NOHOEEND);
103 
104 
106  // Conversion Rejection //
108  if (!isFromConversionPartnerTrack(hww, index)) cuts_passed |= (1ll<<ELENOTCONV_DISTDCOT002);
109  if (hww.els_exp_innerlayers().at(index) == 0) cuts_passed |= (1ll<<ELENOTCONV_HITPATTERN_0MHITS);
110  if(!isFromConversionMIT(hww, index)) cuts_passed |= (1ll<<ELENOTCONV_MIT);
111 
113  // Fiduciality //
115  if ((hww.els_type().at(index) & (1ll<<ISECALDRIVEN))) cuts_passed |= (1ll<<ELESEED_ECAL);
116  if (fabs(hww.els_p4().at(index).eta()) < 2.5) cuts_passed |= (1ll<<ELEETA_250);
117  if (fabs(hww.els_p4().at(index).eta()) < 2.4) cuts_passed |= (1ll<<ELEETA_240);
118 
120  // Pt //
122  if( hww.els_p4().at(index).pt() > 10.0 ) cuts_passed |= (1ll<<ELEPT_010);
123 
124  // Veto electron in transition region
125  if( fabs(hww.els_etaSC().at(index)) < 1.4442 || fabs(hww.els_etaSC().at(index)) > 1.566 ) cuts_passed |= (1ll<<ELE_NOT_TRANSITION);
126 
128  // Charge Flip //
130  if (!isChargeFlip3agree(hww, index)) cuts_passed |= (1ll<<ELECHARGE_NOTFLIP3AGREE);
131 
132  // return which selections passed
133  return cuts_passed;
134 
135  }
bool electronId_smurf_v2(HWW &, const unsigned int index)
uint64 electronIdComponent_t
std::vector< int > & els_exp_innerlayers()
Definition: HWW.cc:337
float electronIsoValuePF(HWW &, const unsigned int iel, unsigned int ivtx, float coner=0.4, float minptn=1.0, float dzcut=0.1, float footprintdr=0.07, float gammastripveto=0.025, float elestripveto=-999., int filterId=0)
electronIdComponent_t electronId_VBTF(HWW &, const unsigned int index, const vbtf_tightness tightness, bool applyAlignementCorrection=false, bool removedEtaCutInEndcap=false)
double electron_dzPV_smurfV3(HWW &, unsigned int index)
static const electronIdComponent_t PassWP2012CutsNoIso
double electron_d0PV_smurfV3(HWW &, unsigned int index)
bool electronId_smurf_v1(HWW &, const unsigned int index)
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
std::vector< float > & els_etaSC()
Definition: HWW.cc:117
static const electronIdComponent_t PassWP2012CutsNoIsoNoIP
bool isFromConversionMIT(HWW &, const unsigned int index)
std::vector< int > & els_type()
Definition: HWW.cc:345
bool electronId_smurf_v3(HWW &, const unsigned int index)
uint64 cuts_t
electronIdComponent_t electronId_WP2012(HWW &, const unsigned int index, const wp2012_tightness tightness)
bool isChargeFlip3agree(HWW &, int elIndex)
bool isFromConversionPartnerTrack(HWW &, const unsigned int index)
bool HWWFunctions::fakableElectron ( HWW hww,
unsigned int  i,
EleFOTypes  type 
)

Definition at line 444 of file analysisSelections.cc.

References ElectronFOV4(), electronSelectionFO_el_smurf_v1, electronSelectionFO_el_smurf_v2, electronSelectionFO_el_smurf_v3, EleFOV1, EleFOV2, EleFOV3, EleFOV4, HWW::els_p4(), and pass_electronSelection().

Referenced by passBaseline().

444  {
445  if ( hww.els_p4().at(i).pt() < 10.0 ) return false;
446  switch (type){
450  case EleFOV4: return ElectronFOV4(hww, i);
451  }
452  return false;
453  }
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
bool ElectronFOV4(HWW &hww, unsigned int i)
static const cuts_t electronSelectionFO_el_smurf_v1
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
static const cuts_t electronSelectionFO_el_smurf_v3
bool pass_electronSelection(HWW &, const unsigned int index, const cuts_t selectionType, bool applyAlignmentCorrection=false, bool removedEtaCutInEndcap=false, bool useGsfTrack=true)
static const cuts_t electronSelectionFO_el_smurf_v2
bool HWWFunctions::fakableMuon ( HWW hww,
unsigned int  i,
MuFOTypes  type,
MuonMVAEstimator muonMVAEstimator,
std::vector< Int_t >  IdentifiedMu,
std::vector< Int_t >  IdentifiedEle 
)

Definition at line 789 of file analysisSelections.cc.

References MuFOV1, MuFOV2, MuonFOV2(), muonId(), muonSelectionFO_mu_smurf_10, and HWW::mus_p4().

Referenced by passBaseline().

790  {
791  if ( hww.mus_p4().at(i).pt() < 10.0 ) return false;
792  switch (type){
793  case MuFOV1: return muonId(hww, i, muonSelectionFO_mu_smurf_10);
794  case MuFOV2: return MuonFOV2(hww, i, muonMVAEstimator, IdentifiedMu, IdentifiedEle);
795  }
796  return false;
797  }
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
bool muonId(HWW &, unsigned int index, SelectionType type)
std::vector< LorentzVector > & mus_p4()
Definition: HWW.cc:367
bool MuonFOV2(HWW &hww, unsigned int i, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
float HWWFunctions::fastJetEffArea04_v1 ( const float  eta)

Definition at line 270 of file electronSelections.cc.

271  {
272  // use absolute eta
273  const float etaAbs = fabs(eta);
274 
275  // get effective area
276  if (etaAbs <= 1.0 ) {return 0.19;}
277  else if (etaAbs > 1.0 && etaAbs <= 1.479) {return 0.25;}
278  else if (etaAbs > 1.479 && etaAbs <= 2.0) {return 0.12;}
279  else if (etaAbs > 2.0 && etaAbs <= 2.2 ) {return 0.21;}
280  else if (etaAbs > 2.2 && etaAbs <= 2.3 ) {return 0.27;}
281  else if (etaAbs > 2.3 && etaAbs <= 2.4 ) {return 0.44;}
282  else if (etaAbs > 2.4 ) {return 0.52;}
283  return -9999.0f;
284  }
T eta() const
float HWWFunctions::fastJetEffArea04_v1 ( HWW ,
const float  eta 
)
std::vector< JetPair > HWWFunctions::getDefaultJets ( HWW hww,
unsigned int  i_hyp,
bool  btagged 
)

Definition at line 301 of file analysisSelections.cc.

References getJets().

Referenced by numberOfJets().

301  {
302  return getJets(hww, i_hyp, 30, 4.7, false, btagged);
303  }
std::vector< JetPair > getJets(HWW &hww, int, double, double, bool, bool)
std::vector< LeptonPair > HWWFunctions::getExtraLeptons ( HWW hww,
int  i_hyp,
double  minPt,
bool  useLHeleId,
int  useMVAeleId,
EGammaMvaEleEstimator egammaMvaEleEstimator,
bool  useMVAmuId,
MuonIDMVA mumva,
MuonMVAEstimator muonMVAEstimator,
std::vector< Int_t >  IdentifiedMu,
std::vector< Int_t >  IdentifiedEle 
)

Definition at line 800 of file analysisSelections.cc.

References Abs(), HWW::els_charge(), HWW::els_p4(), HWW::hyp_ll_id(), HWW::hyp_ll_index(), HWW::hyp_ll_p4(), HWW::hyp_lt_id(), HWW::hyp_lt_index(), HWW::hyp_lt_p4(), i, EgammaValidation_Wenu_cff::leptons, HWW::mus_charge(), HWW::mus_p4(), ww_eld0PV(), ww_elId(), ww_elIso(), ww_mud0PV(), ww_muId(), and ww_muIso().

Referenced by numberOfExtraLeptons().

801  {
802 
803  std::vector<LeptonPair> leptons;
804  for (int i=0; i < int(hww.mus_charge().size()); ++i) {
805  if ( hww.mus_p4().at(i).pt() < minPt ) continue;
806  if ( TMath::Abs(hww.hyp_lt_id().at(i_hyp)) == 13 && hww.hyp_lt_index().at(i_hyp) == i ) continue;
807  if ( TMath::Abs(hww.hyp_ll_id().at(i_hyp)) == 13 && hww.hyp_ll_index().at(i_hyp) == i ) continue;
808  if ( ! (ww_mud0PV(hww, i) && ww_muId(hww, i, useMVAmuId, mumva) && ww_muIso(hww, i, muonMVAEstimator, IdentifiedMu, IdentifiedEle) &&
809  fabs(hww.mus_p4().at(i).eta()) <2.4) ) continue;
810  leptons.push_back(LeptonPair(true,i));
811  }
812  for (int i=0; i < int(hww.els_charge().size()); ++i) {
813  if ( hww.els_p4().at(i).pt() < minPt ) continue;
814  if ( TMath::Abs(ROOT::Math::VectorUtil::DeltaR(hww.hyp_lt_p4().at(i_hyp),hww.els_p4().at(i)) <0.1) ) continue;
815  if ( TMath::Abs(ROOT::Math::VectorUtil::DeltaR(hww.hyp_ll_p4().at(i_hyp),hww.els_p4().at(i)) <0.1) ) continue;
816  if ( !(ww_elId(hww, i, useLHeleId, useMVAeleId, egammaMvaEleEstimator) && ww_eld0PV(hww, i) && ww_elIso(hww, i) &&
817  fabs(hww.els_p4().at(i).eta()) < 2.5) ) continue;
818  leptons.push_back(LeptonPair(false,i));
819  }
820  return leptons;
821  }
bool ww_muId(HWW &hww, unsigned int i, bool useMVAmuId, MuonIDMVA *mva)
int i
Definition: DBlmapReader.cc:9
std::vector< int > & hyp_ll_id()
Definition: HWW.cc:585
bool ww_elId(HWW &hww, unsigned int i, bool useLHeleId, int useMVAeleId, EGammaMvaEleEstimator *egammaMvaEleEstimator)
std::vector< int > & hyp_lt_index()
Definition: HWW.cc:581
std::vector< LorentzVector > & mus_p4()
Definition: HWW.cc:367
std::pair< bool, unsigned int > LeptonPair
Definition: analysisEnums.h:12
bool ww_elIso(HWW &hww, unsigned int i)
bool ww_mud0PV(HWW &hww, unsigned int i)
std::vector< LorentzVector > & hyp_ll_p4()
Definition: HWW.cc:569
T Abs(T a)
Definition: MathUtil.h:49
std::vector< int > & mus_charge()
Definition: HWW.cc:527
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
std::vector< int > & els_charge()
Definition: HWW.cc:329
std::vector< int > & hyp_lt_id()
Definition: HWW.cc:589
std::vector< LorentzVector > & hyp_lt_p4()
Definition: HWW.cc:573
bool ww_muIso(HWW &hww, unsigned int i)
bool ww_eld0PV(HWW &hww, unsigned int i)
std::vector< int > & hyp_ll_index()
Definition: HWW.cc:577
bool HWWFunctions::getGoodMVAs ( HWW ,
std::vector< float > &  goodmvas,
std::string  variable 
)

Referenced by getJets(), and toptag().

bool HWWFunctions::getGoodMVAs ( HWW hww,
vector< float > &  goodmvas,
string  variable 
)

Definition at line 14 of file pfjetMVAtools.cc.

References funct::abs(), funct::cos(), epsilon, HWW::evt_isRealData(), cmsRelvalreport::exit, HWW::pfjets_area(), HWW::pfjets_mvavalue(), HWW::pfjets_p4(), python.multivaluedict::sort(), sortByPFJetPt(), and mathSSE::sqrt().

15  {
16 
17  vector <float> mva_variable;
18  if( variable == "mvavalue" ){ mva_variable = hww.pfjets_mvavalue();
19  }
20  else{
21  edm::LogError("InvalidInput") <<"variable not found. Check input. Exiting.";
22  exit(99);
23  }
24 
25  //if no bug is detected, returns the original collection of the mvas stored in the cms2 ntuple.
26  if(hww.pfjets_p4().size() == mva_variable.size() ) {
27 
28  goodmvas = mva_variable;
29  return false;
30 
31  }else{
32 
33  vector <bool> isgoodindex;
34  vector <std::pair <LorentzVector, Int_t> > cjets;
35  double deta = 0.0;
36  double dphi = 0.0;
37  double dr = 0.0;
38 
39  if( hww.evt_isRealData() ){
40  for( size_t cjeti = 0; cjeti < hww.pfjets_p4().size(); cjeti++) { // corrected jets collection
41  LorentzVector corrjet = hww.pfjets_p4().at(cjeti);
42  pair <LorentzVector, Int_t> cjetpair = make_pair( corrjet, (Int_t)cjeti );
43  cjets.push_back(cjetpair);
44  }
45 
46  }else{
47  for( size_t cjeti = 0; cjeti < hww.pfjets_p4().size(); cjeti++) { // corrected jets collection
48  LorentzVector corrjet = hww.pfjets_p4().at(cjeti);
49  pair <LorentzVector, Int_t> cjetpair = make_pair( corrjet, (Int_t)cjeti );
50  cjets.push_back(cjetpair);
51  }
52  }
53 
54  sort(cjets.begin(), cjets.end(), sortByPFJetPt);
55 
56  for( size_t ucjeti = 0; ucjeti < hww.pfjets_p4().size(); ucjeti++) { // uncorrected jets collection
57  for( size_t cjeti = 0; cjeti < hww.pfjets_p4().size(); cjeti++) { // corrected jets collection
58 
59  //buggy method
60  if( hww.evt_isRealData() ){
61  if( abs( hww.pfjets_area().at(ucjeti) - hww.pfjets_area().at(cjets.at(cjeti).second)) > numeric_limits<float>::epsilon() ) continue;
62  if( fabs( hww.pfjets_p4().at(ucjeti).eta() - (hww.pfjets_p4().at(cjets.at(cjeti).second)).eta()) > 0.01 ) continue;
63  }else{
64  if( abs( hww.pfjets_area().at(ucjeti) - hww.pfjets_area().at(cjets.at(cjeti).second)) > numeric_limits<float>::epsilon() ) continue;
65  if( fabs( hww.pfjets_p4().at(ucjeti).eta() - (hww.pfjets_p4().at(cjets.at(cjeti).second)).eta()) > 0.01 ) continue;
66  }
67 
68  //fix
69  if( hww.evt_isRealData() ){
70  deta = hww.pfjets_p4().at(ucjeti).eta() - (hww.pfjets_p4().at(cjets.at(cjeti).second)).eta();
71  dphi = acos(cos(hww.pfjets_p4().at(ucjeti).phi() - (hww.pfjets_p4().at(cjets.at(cjeti).second)).phi()));
72  dr = sqrt(deta*deta + dphi*dphi);
73  }else{
74  deta = hww.pfjets_p4().at(ucjeti).eta() - (hww.pfjets_p4().at(cjets.at(cjeti).second)).eta();
75  dphi = acos(cos(hww.pfjets_p4().at(ucjeti).phi() - (hww.pfjets_p4().at(cjets.at(cjeti).second)).phi()));
76  dr = sqrt(deta*deta + dphi*dphi);
77  }
78 
79  if (dr > 0.01){
80  isgoodindex.push_back(false);
81  }else{
82  isgoodindex.push_back(true);
83  }
84  }
85  }
86 
87  if( isgoodindex.size() >= mva_variable.size() ){
88  for( size_t mvai = 0; mvai < mva_variable.size(); mvai++ ){
89  if( isgoodindex.at(mvai) ) goodmvas.push_back(mva_variable.at(mvai));
90  }
91  }
92 
93  //still possible that the fix picks up less events than the fix in cmssw
94  //This behavior was not seen by me, but just in case this line here will
95  // prevent the code from crashing and return the original mva collection.
96  if( goodmvas.size() == hww.pfjets_p4().size() ){
97  //fill the new mva values
98  return true;
99  }else{
100  //cout<<"new mva values vector size "<<goodmvas.size()<<" different to pfjets collection size "<<hww.pfjets_p4().size()<<endl;
101  //cout<<"returning old mva collection: "<<variable<<endl;
102  goodmvas.clear();
103  goodmvas = mva_variable;
104  return false;
105  }
106  }
107  }
T sqrt(T t)
Definition: SSEVec.h:48
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< float > & pfjets_mvavalue()
Definition: HWW.cc:785
int & evt_isRealData()
Definition: HWW.cc:619
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > LorentzVector
Definition: analysisEnums.h:9
bool sortByPFJetPt(const std::pair< LorentzVector, Int_t > &pfjet1, const std::pair< LorentzVector, Int_t > &pfjet2)
Definition: pfjetMVAtools.cc:9
std::vector< LorentzVector > & pfjets_p4()
Definition: HWW.cc:769
const double epsilon
std::vector< float > & pfjets_area()
Definition: HWW.cc:777
HypothesisType HWWFunctions::getHypothesisType ( HypTypeInNtuples  type)

Definition at line 35 of file wwtypes.cc.

References EE, ElEl, ElMu, EM, MM, MuEl, and MuMu.

Referenced by getHypothesisType().

35  {
36  switch (type){
37  case ElEl:
38  return EE;
39  break;
40  case MuMu:
41  return MM;
42  break;
43  case ElMu:
44  return EM;
45  break;
46  case MuEl:
47  return ME;
48  break;
49  }
50  return EM; //to stop warnings
51  }
type
Definition: HCALResponse.h:21
MonitorElement ME
HypothesisType HWWFunctions::getHypothesisType ( HWW ,
unsigned  int 
)
HypothesisType HWWFunctions::getHypothesisType ( unsigned int  type)

Definition at line 53 of file wwtypes.cc.

References getHypothesisType().

53  {
55  }
type
Definition: HCALResponse.h:21
HypTypeInNtuples
Definition: wwtypes.h:11
HypothesisType getHypothesisType(HypTypeInNtuples type)
Definition: wwtypes.cc:35
HypothesisType HWWFunctions::getHypothesisTypeNew ( HWW hww,
unsigned int  i_hyp 
)

Definition at line 57 of file wwtypes.cc.

References funct::abs(), EE, EM, HWW::hyp_ll_id(), HWW::hyp_ll_p4(), HWW::hyp_lt_id(), HWW::hyp_lt_p4(), and MM.

Referenced by doCutFlow().

57  {
58  if (abs(hww.hyp_lt_id().at(i_hyp))==11 && abs(hww.hyp_ll_id().at(i_hyp))==11) {
59  return EE;
60  } else if (abs(hww.hyp_lt_id().at(i_hyp))==13 && abs(hww.hyp_ll_id().at(i_hyp))==13) {
61  return MM;
62  } else {
63  if (hww.hyp_lt_p4().at(i_hyp).pt()>hww.hyp_ll_p4().at(i_hyp).pt()) {
64  if (abs(hww.hyp_lt_id().at(i_hyp))==11) return EM;
65  else return ME;
66  } else {
67  if (abs(hww.hyp_lt_id().at(i_hyp))==11) return ME;
68  else return EM;
69  }
70  }
71  //return MM;
72  }
std::vector< int > & hyp_ll_id()
Definition: HWW.cc:585
std::vector< LorentzVector > & hyp_ll_p4()
Definition: HWW.cc:569
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< int > & hyp_lt_id()
Definition: HWW.cc:589
MonitorElement ME
std::vector< LorentzVector > & hyp_lt_p4()
Definition: HWW.cc:573
std::vector< JetPair > HWWFunctions::getJets ( HWW hww,
int  i_hyp,
double  etThreshold,
double  etaMax,
bool  sortJets,
bool  btag 
)

Definition at line 275 of file analysisSelections.cc.

References Abs(), comparePt(), defaultBTag(), getGoodMVAs(), HWW::hyp_ll_p4(), HWW::hyp_lt_p4(), i, patTestJEC_cfi::jec, fwrapper::jets, passMVAJetId(), HWW::pfjets_JEC(), HWW::pfjets_p4(), and python.multivaluedict::sort().

Referenced by doCutFlow(), getDefaultJets(), passDPhiDiLepJet(), and pat::PATMHTProducer::produce().

275  {
276 
277  std::vector<JetPair> jets;
278  const double vetoCone = 0.3;
279  // bug fix for mva jet id
280  vector <float> fixedpfjetmva_analobj; getGoodMVAs(hww, fixedpfjetmva_analobj, "mvavalue");
281 
282  for ( unsigned int i=0; i < hww.pfjets_p4().size(); ++i) {
283  double jec = hww.pfjets_JEC().at(i);
284 
285  if ( (hww.pfjets_p4().at(i).pt() * jec) < etThreshold ) continue;
286  if ( btag && !defaultBTag(hww, i, jec) ) continue;
287  if ( TMath::Abs(hww.pfjets_p4().at(i).eta()) > etaMax ) continue;
288  if ( (hww.hyp_lt_p4().at(i_hyp).pt() > 0 && TMath::Abs(ROOT::Math::VectorUtil::DeltaR(hww.hyp_lt_p4().at(i_hyp), hww.pfjets_p4().at(i))) < vetoCone) ||
289  (hww.hyp_ll_p4().at(i_hyp).pt() > 0 && TMath::Abs(ROOT::Math::VectorUtil::DeltaR(hww.hyp_ll_p4().at(i_hyp), hww.pfjets_p4().at(i))) < vetoCone) ) continue;
290  if ( !passMVAJetId(hww.pfjets_p4().at(i).pt() * jec, hww.pfjets_p4().at(i).eta(), fixedpfjetmva_analobj[i], 2) ) continue;
291 
292 
293  jets.push_back(JetPair(hww.pfjets_p4().at(i) * jec,i));
294  }
295  if ( sortJets ) std::sort(jets.begin(), jets.end(), comparePt);
296  return jets;
297  }
int i
Definition: DBlmapReader.cc:9
Bool_t comparePt(JetPair lv1, JetPair lv2)
std::pair< LorentzVector, unsigned int > JetPair
Definition: analysisEnums.h:11
bool passMVAJetId(double, double, double, unsigned int)
bool defaultBTag(HWW &hww, unsigned int, float)
std::vector< LorentzVector > & hyp_ll_p4()
Definition: HWW.cc:569
vector< PseudoJet > jets
T Abs(T a)
Definition: MathUtil.h:49
bool getGoodMVAs(HWW &, std::vector< float > &goodmvas, std::string variable)
std::vector< LorentzVector > & hyp_lt_p4()
Definition: HWW.cc:573
std::vector< float > & pfjets_JEC()
Definition: HWW.cc:781
std::vector< LorentzVector > & pfjets_p4()
Definition: HWW.cc:769
bool HWWFunctions::goodElectronIsolated ( HWW hww,
unsigned int  i,
bool  useLHeleId,
int  useMVAeleId,
EGammaMvaEleEstimator egammaMvaEleEstimator,
bool  lockToCoreSelectors 
)

Definition at line 401 of file analysisSelections.cc.

References electronSelection_smurfV6, HWW::els_p4(), pass_electronSelection(), ww_elBase(), ww_eld0PV(), ww_eldZPV(), ww_elId(), and ww_elIso().

Referenced by passBaseline(), and passFullLep().

401  {
402  bool ptcut = hww.els_p4().at(i).pt() >= 10.0;
403  bool core = ptcut && pass_electronSelection(hww, i, electronSelection_smurfV6);
404  bool internal = ww_elBase(hww, i) && ww_elId(hww, i, useLHeleId, useMVAeleId, egammaMvaEleEstimator) && ww_eld0PV(hww, i) && ww_eldZPV(hww, i) && ww_elIso(hww, i);
405  assert(!lockToCoreSelectors || core==internal);
406  return internal;
407  }
static const cuts_t electronSelection_smurfV6
int i
Definition: DBlmapReader.cc:9
bool ww_elId(HWW &hww, unsigned int i, bool useLHeleId, int useMVAeleId, EGammaMvaEleEstimator *egammaMvaEleEstimator)
bool ww_eldZPV(HWW &hww, unsigned int i)
bool ww_elIso(HWW &hww, unsigned int i)
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
bool ww_elBase(HWW &hww, unsigned int i)
bool pass_electronSelection(HWW &, const unsigned int index, const cuts_t selectionType, bool applyAlignmentCorrection=false, bool removedEtaCutInEndcap=false, bool useGsfTrack=true)
bool ww_eld0PV(HWW &hww, unsigned int i)
bool HWWFunctions::goodElectronTMVA ( HWW hww,
EGammaMvaEleEstimator egammaMvaEleEstimator,
int  useMVAeleId,
unsigned int  i 
)

Definition at line 688 of file analysisSelections.cc.

References HWW::els_dEtaIn(), HWW::els_dPhiIn(), HWW::els_ecalIso(), HWW::els_etaSC(), HWW::els_exp_innerlayers(), HWW::els_hcalIso(), HWW::els_hOverE(), HWW::els_p4(), HWW::els_sigmaIEtaIEta(), HWW::els_tkIso(), isFromConversionMIT(), Max(), EGammaMvaEleEstimator::mvaValue(), and RecoTauCleanerPlugins::pt.

Referenced by ww_elId().

689  {
690 
691  float pt = hww.els_p4().at(i).pt();
692  float etaSC = hww.els_etaSC().at(i);
693 
694  //preselection
695  if (fabs(etaSC)<1.479) {
696  if (hww.els_sigmaIEtaIEta().at(i)>0.01 ||
697  fabs(hww.els_dEtaIn().at(i))>0.007 ||
698  fabs(hww.els_dPhiIn().at(i))>0.15 ||
699  hww.els_hOverE().at(i)>0.12 ||
700  hww.els_tkIso().at(i)/pt>0.2 ||
701  TMath::Max(hww.els_ecalIso().at(i) - 1.0, 0.0)/pt>0.20 ||
702  hww.els_hcalIso().at(i)/pt>0.20 ) return 0;
703  } else {
704  if (hww.els_sigmaIEtaIEta().at(i)>0.03 ||
705  fabs(hww.els_dEtaIn().at(i))>0.009 ||
706  fabs(hww.els_dPhiIn().at(i))>0.10 ||
707  hww.els_hOverE().at(i)>0.10 ||
708  hww.els_tkIso().at(i)/pt>0.2 ||
709  hww.els_ecalIso().at(i)/pt>0.20 ||
710  hww.els_hcalIso().at(i)/pt>0.20 ) return 0;
711  }
712 
713  // MIT conversion
714  if ( isFromConversionMIT(hww, i) ) return false;
715  // conversion rejection - hit based
716  if ( hww.els_exp_innerlayers().at(i) > 0 ) return false;
717 
718  double mvavalue = egammaMvaEleEstimator->mvaValue(hww, i,false);
719 
720  if( pt > 20 ) {
721  if( fabs(etaSC)>=1.479 && mvavalue>0.92) return true;
722  if( fabs(etaSC)>=0.8 && fabs(etaSC)<1.479 && mvavalue>0.85) return true;
723  if( fabs(etaSC)<0.8 && mvavalue>0.94) return true;
724  return false;
725  }
726  else {
727  if( fabs(etaSC)>=1.479 && mvavalue>0.62) return true;
728  if( fabs(etaSC)>=0.8 && fabs(etaSC)<1.479 && mvavalue>0.1) return true;
729  if( fabs(etaSC)<0.8 && mvavalue>0.0) return true;
730  return false;
731  }
732  }
int i
Definition: DBlmapReader.cc:9
Double_t mvaValue(Double_t fbrem, Double_t kfchi2, Int_t kfhits, Double_t gsfchi2, Double_t deta, Double_t dphi, Double_t detacalo, Double_t see, Double_t spp, Double_t etawidth, Double_t phiwidth, Double_t e1x5e5x5, Double_t R9, Double_t HoE, Double_t EoP, Double_t IoEmIoP, Double_t eleEoPout, Double_t PreShowerOverRaw, Double_t d0, Double_t ip3d, Double_t eta, Double_t pt, Bool_t printDebug=kFALSE)
std::vector< float > & els_tkIso()
Definition: HWW.cc:137
std::vector< int > & els_exp_innerlayers()
Definition: HWW.cc:337
std::vector< float > & els_hOverE()
Definition: HWW.cc:133
std::vector< float > & els_ecalIso()
Definition: HWW.cc:261
std::vector< float > & els_hcalIso()
Definition: HWW.cc:265
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
std::vector< float > & els_etaSC()
Definition: HWW.cc:117
T Max(T a, T b)
Definition: MathUtil.h:44
bool isFromConversionMIT(HWW &, const unsigned int index)
std::vector< float > & els_dPhiIn()
Definition: HWW.cc:129
std::vector< float > & els_dEtaIn()
Definition: HWW.cc:125
std::vector< float > & els_sigmaIEtaIEta()
Definition: HWW.cc:121
bool HWWFunctions::goodElectronWithoutIsolation ( HWW hww,
unsigned int  i,
bool  useLHeleId,
int  useMVAeleId,
EGammaMvaEleEstimator egammaMvaEleEstimator 
)

Definition at line 397 of file analysisSelections.cc.

References ww_elBase(), ww_eld0PV(), ww_eldZPV(), and ww_elId().

397  {
398  return ww_elBase(hww, i) && ww_elId(hww, i, useLHeleId, useMVAeleId, egammaMvaEleEstimator) && ww_eld0PV(hww, i) && ww_eldZPV(hww, i);
399  }
int i
Definition: DBlmapReader.cc:9
bool ww_elId(HWW &hww, unsigned int i, bool useLHeleId, int useMVAeleId, EGammaMvaEleEstimator *egammaMvaEleEstimator)
bool ww_eldZPV(HWW &hww, unsigned int i)
bool ww_elBase(HWW &hww, unsigned int i)
bool ww_eld0PV(HWW &hww, unsigned int i)
bool HWWFunctions::goodMuonIsolated ( HWW hww,
unsigned int  i,
bool  lockToCoreSelectors,
bool  useMVAmuId,
MuonIDMVA mva,
MuonMVAEstimator muonMVAEstimator,
std::vector< Int_t >  IdentifiedMu,
std::vector< Int_t >  IdentifiedEle 
)

Definition at line 528 of file analysisSelections.cc.

References muonId(), HWW::mus_p4(), NominalSmurfV6, ww_muBase(), ww_mud0PV(), ww_mudZPV(), ww_muId(), and ww_muIso().

Referenced by passBaseline(), and passFullLep().

529  {
530  bool ptcut = hww.mus_p4().at(i).pt() >= 10.0;
531  bool core = ptcut && muonId(hww, i, NominalSmurfV6);
532  bool internal = ww_muBase(hww, i) && ww_mud0PV(hww, i) && ww_mudZPV(hww, i, 0.1) && ww_muId(hww, i, useMVAmuId, mva) && ww_muIso(hww, i, muonMVAEstimator, IdentifiedMu, IdentifiedEle);
533  assert(!lockToCoreSelectors || core==internal);
534  return internal;
535  }
bool ww_muId(HWW &hww, unsigned int i, bool useMVAmuId, MuonIDMVA *mva)
int i
Definition: DBlmapReader.cc:9
bool muonId(HWW &, unsigned int index, SelectionType type)
std::vector< LorentzVector > & mus_p4()
Definition: HWW.cc:367
bool ww_mud0PV(HWW &hww, unsigned int i)
bool ww_muBase(HWW &hww, unsigned int i)
bool ww_mudZPV(HWW &hww, unsigned int i, float cut=0.1)
bool ww_muIso(HWW &hww, unsigned int i)
bool HWWFunctions::goodMuonTMVA ( HWW hww,
MuonIDMVA mva,
unsigned int  i 
)

Definition at line 459 of file analysisSelections.cc.

References muonIsoValuePF(), HWW::mus_gfit_chi2(), HWW::mus_gfit_ndof(), HWW::mus_gfit_validSTAHits(), HWW::mus_nmatches(), HWW::mus_p4(), HWW::mus_pid_TMLastStationTight(), HWW::mus_ptErr(), HWW::mus_trkidx(), HWW::mus_trkKink(), HWW::mus_type(), HWW::mus_validHits(), MuonIDMVA::MVAValue(), and HWW::trks_valid_pixelhits().

Referenced by ww_muId().

459  {
460  //Find MVA Bin
461  int subdet = 0;
462  if (fabs(hww.mus_p4().at(i).eta()) < 1.479) subdet = 0;
463  else subdet = 1;
464  int ptBin = 0;
465  if (hww.mus_p4().at(i).pt() > 14.5) ptBin = 1;
466  if (hww.mus_p4().at(i).pt() > 20.0) ptBin = 2;
467 
468  int MVABin = -1;
469  if (subdet == 0 && ptBin == 0) MVABin = 0;
470  if (subdet == 1 && ptBin == 0) MVABin = 1;
471  if (subdet == 0 && ptBin == 1) MVABin = 2;
472  if (subdet == 1 && ptBin == 1) MVABin = 3;
473  if (subdet == 0 && ptBin == 2) MVABin = 4;
474  if (subdet == 1 && ptBin == 2) MVABin = 5;
475 
476  double MVACut = -999.;
477  //same signal eff as cut-based (using V10 - Detector Based Iso)
478  if (MVABin == 0) MVACut = -0.5618;
479  if (MVABin == 1) MVACut = -0.3002;
480  if (MVABin == 2) MVACut = -0.4642;
481  if (MVABin == 3) MVACut = -0.2478;
482  if (MVABin == 4) MVACut = 0.1706;
483  if (MVABin == 5) MVACut = 0.8146;
484 
485  double mvaValue=mva->MVAValue(hww, i, 0);
486 
487  //Isolation
488  double iso03 = 0;
489  iso03 = muonIsoValuePF(hww, i,0,0.3);
490 
491  //Explicitly Apply M2 Denominator Cuts
492  bool pass = true;
493  if (hww.mus_p4().at(i).pt() < 10) pass = false;
494  if (fabs(hww.mus_p4().at(i).eta()) >= 2.4) pass = false;
495 
496  if (! ( (0==0)
497  &&
498  (
499  (((hww.mus_type().at(i)) & (1<<1)) == (1<<1)
500  && hww.mus_gfit_chi2().at(i)/hww.mus_gfit_ndof().at(i) < 10.0
501  && (hww.mus_gfit_validSTAHits().at(i) > 0)
502  && (hww.mus_nmatches().at(i) > 1 )
503  )
504  ||
505  ( ((hww.mus_type().at(i)) & (1<<2)) == (1<<2)
506  && hww.mus_pid_TMLastStationTight().at(i) == 1
507  )
508  )
509  && ((hww.mus_type().at(i)) & (1<<2)) == (1<<2)
510  && hww.mus_validHits().at(i) > 10
511  && (hww.trks_valid_pixelhits().at(hww.mus_trkidx().at(i)) > 0)
512  && iso03 < 0.4
513  && ( hww.mus_ptErr().at(i)/hww.mus_p4().at(i).pt() < 0.1)
514  && hww.mus_trkKink().at(i) < 20.
515  && mvaValue > MVACut
516  )
517  ) {
518  pass = false;
519  }
520  return pass;
521  }
int i
Definition: DBlmapReader.cc:9
std::vector< int > & trks_valid_pixelhits()
Definition: HWW.cc:63
std::vector< float > & mus_gfit_chi2()
Definition: HWW.cc:383
std::vector< int > & mus_pid_TMLastStationTight()
Definition: HWW.cc:543
std::vector< int > & mus_trkidx()
Definition: HWW.cc:535
std::vector< float > & mus_ptErr()
Definition: HWW.cc:391
std::vector< LorentzVector > & mus_p4()
Definition: HWW.cc:367
std::vector< int > & mus_nmatches()
Definition: HWW.cc:547
std::vector< int > & mus_gfit_validSTAHits()
Definition: HWW.cc:515
std::vector< int > & mus_validHits()
Definition: HWW.cc:531
std::vector< float > & mus_gfit_ndof()
Definition: HWW.cc:387
double muonIsoValuePF(HWW &, unsigned int imu, unsigned int ivtx, float coner=0.4, float minptn=1.0, float dzcut=0.1, int filterId=0)
std::vector< float > & mus_trkKink()
Definition: HWW.cc:395
Double_t MVAValue(HWW &, const unsigned int mu, const unsigned int vertex)
Definition: MuonIDMVA.cc:211
std::vector< int > & mus_type()
Definition: HWW.cc:555
bool HWWFunctions::goodMuonWithoutIsolation ( HWW hww,
unsigned int  i,
bool  useMVAmuId,
MuonIDMVA mva,
MuonMVAEstimator muonMVAEstimator,
std::vector< Int_t >  IdentifiedMu,
std::vector< Int_t >  IdentifiedEle 
)

Definition at line 523 of file analysisSelections.cc.

References passMuonRingsMVAFO(), ww_muBase(), ww_mud0PV(), ww_mudZPV(), and ww_muId().

524  {
525  return ww_muBase(hww, i) && ww_mud0PV(hww, i) && ww_mudZPV(hww, i, 0.1) && ww_muId(hww, i, useMVAmuId, mva) && passMuonRingsMVAFO(hww, i, muonMVAEstimator, IdentifiedMu, IdentifiedEle);
526  }
bool ww_muId(HWW &hww, unsigned int i, bool useMVAmuId, MuonIDMVA *mva)
int i
Definition: DBlmapReader.cc:9
bool ww_mud0PV(HWW &hww, unsigned int i)
bool ww_muBase(HWW &hww, unsigned int i)
bool ww_mudZPV(HWW &hww, unsigned int i, float cut=0.1)
bool passMuonRingsMVAFO(HWW &hww, unsigned int mu, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
std::pair< double, double > HWWFunctions::gsftrks_d0_pv ( HWW hww,
int  itrk,
int  ipv 
)

Definition at line 39 of file trackSelections.cc.

References funct::cos(), HWW::gsftrks_d0(), HWW::gsftrks_d0Err(), HWW::gsftrks_d0phiCov(), HWW::gsftrks_p4(), HWW::gsftrks_phiErr(), phi, funct::sin(), mathSSE::sqrt(), HWW::vtxs_covMatrix(), and HWW::vtxs_position().

Referenced by ElectronIDMVA::MVAValue(), and EGammaMvaEleEstimator::mvaValue().

40  {
41  // assume the layout of the covariance matrix is (Vxx, Vxy, Vxz)
42  // (Vyx, Vyy, ...)
43  const double bx = hww.vtxs_position().at(ipv).x() ;
44  const double by = hww.vtxs_position().at(ipv).y() ;
45  const double vxx = hww.vtxs_covMatrix().at(ipv).at(0);
46  const double vxy = hww.vtxs_covMatrix().at(ipv).at(1);
47  const double vyy = hww.vtxs_covMatrix().at(ipv).at(4);
48 
49  const double phi = hww.gsftrks_p4().at(itrk).phi();
50  const double d0vtx = hww.gsftrks_d0().at(itrk) - bx * sin(phi) + by * cos(phi);
51  const double d0err = hww.gsftrks_d0Err().at(itrk);
52  const double phierr = hww.gsftrks_phiErr().at(itrk);
53  const double d0phicov = hww.gsftrks_d0phiCov().at(itrk);
54 
55  // we will let the optimizer take care of subexpression
56  // elimination for this one...
57  const double d0err2vtx = d0err * d0err
58  - 2 * (bx * cos(phi) + by * sin(phi)) * d0phicov
59  + (bx * cos(phi) + by * sin(phi)) * (bx * cos(phi) + by * sin(phi)) * phierr * phierr
60  + sin(phi) * sin(phi) * vxx + cos(phi) * cos(phi) * vyy
61  - 2 * sin(phi) * cos(phi) * vxy;
62  if (d0err2vtx >= 0)
63  return std::pair<double, double>(d0vtx, sqrt(d0err2vtx));
64 
65  edm::LogError("NegativeValue") << "Oh no! sigma^2(d0corr) < 0!";
66  return std::pair<double, double>(d0vtx, -sqrt(-d0err2vtx));
67  }
std::vector< float > & gsftrks_phiErr()
Definition: HWW.cc:705
std::vector< float > & gsftrks_d0Err()
Definition: HWW.cc:701
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< std::vector< float > > & vtxs_covMatrix()
Definition: HWW.cc:33
T sqrt(T t)
Definition: SSEVec.h:48
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
std::vector< float > & gsftrks_d0phiCov()
Definition: HWW.cc:709
std::vector< float > & gsftrks_d0()
Definition: HWW.cc:697
std::vector< LorentzVector > & gsftrks_p4()
Definition: HWW.cc:689
Definition: DDAxes.h:10
std::pair< double, double > HWWFunctions::gsftrks_dz_pv ( HWW hww,
int  itrk,
int  ipv 
)

Definition at line 109 of file trackSelections.cc.

References funct::cos(), relativeConstraints::error, HWW::gsftrks_etaErr(), HWW::gsftrks_p4(), HWW::gsftrks_phiErr(), HWW::gsftrks_z0(), HWW::gsftrks_z0Err(), phi, funct::sin(), mathSSE::sqrt(), funct::tan(), theta(), relativeConstraints::value, HWW::vtxs_position(), HWW::vtxs_xError(), HWW::vtxs_yError(), and HWW::vtxs_zError().

Referenced by electronIsoValuePF(), and muonIsoValuePF().

110  {
111  LorentzVector pv = hww.vtxs_position().at(ipv);
112  double pvxErr = hww.vtxs_xError().at(ipv) ;
113  double pvyErr = hww.vtxs_yError().at(ipv) ;
114  double pvzErr = hww.vtxs_zError().at(ipv) ;
115 
116  //LorentzVector tkp = hww.gsftrks_p4().at(itrk);
117  //LorentzVector tkv = hww.gsftrks_vertex_p4().at(itrk);
118 
119  double phi = hww.gsftrks_p4().at(itrk).phi();
120  double theta = hww.gsftrks_p4().at(itrk).theta();
121 
122  double ddzdpvx = cos(phi)*1./tan(theta);
123  double ddzdpvy = sin(phi)*1./tan(theta);
124  double ddzdphi = -1*pv.x()*sin(phi)*1./tan(theta) + pv.y()*cos(phi)*1./tan(theta);
125  double ddzdtheta = -1*1/sin(theta)*1/sin(theta) * (pv.x()*cos(phi) + pv.y()*sin(phi));
126 
127  ddzdpvx *= ddzdpvx;
128  ddzdpvy *= ddzdpvy;
129  ddzdphi *= ddzdphi;
130  ddzdtheta *= ddzdtheta;
131 
132  double z0Err = hww.gsftrks_z0Err().at(itrk);
133  double phiErr = hww.gsftrks_phiErr().at(itrk);
134  double thetaErr = hww.gsftrks_etaErr().at(itrk)*sin(theta);
135 
136  z0Err *= z0Err;
137  phiErr *= phiErr;
138  thetaErr *= thetaErr;
139  pvxErr *= pvxErr;
140  pvyErr *= pvyErr;
141  pvzErr *= pvzErr;
142 
143  double value = hww.gsftrks_z0().at(itrk) - pv.z() + (pv.x()*cos(phi) + pv.y()*sin(phi) )*1./tan(theta);
144 
145  //note that the error does not account for correlations since we do not store the track covariance matrix
146  double error = sqrt(z0Err + pvzErr + ddzdpvx*pvxErr + ddzdpvy*pvyErr + ddzdphi*phiErr + ddzdtheta*thetaErr);
147 
148  return std::pair<double, double>(value, error);
149  }
std::vector< float > & gsftrks_phiErr()
Definition: HWW.cc:705
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< float > & gsftrks_z0Err()
Definition: HWW.cc:713
Geom::Theta< T > theta() const
std::vector< float > & vtxs_zError()
Definition: HWW.cc:29
std::vector< float > & gsftrks_etaErr()
Definition: HWW.cc:721
T sqrt(T t)
Definition: SSEVec.h:48
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
std::vector< float > & vtxs_xError()
Definition: HWW.cc:21
std::vector< LorentzVector > & gsftrks_p4()
Definition: HWW.cc:689
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > LorentzVector
Definition: analysisEnums.h:9
std::vector< float > & vtxs_yError()
Definition: HWW.cc:25
std::vector< float > & gsftrks_z0()
Definition: HWW.cc:717
Definition: DDAxes.h:10
const char * HWWFunctions::HypothesisTypeName ( HypothesisType  type)

Definition at line 9 of file wwtypes.cc.

References ALL, EE, EM, and MM.

Referenced by HypothesisTypeName().

9  {
10  switch (type){
11  case MM:
12  return "mm";
13  break;
14  case ME:
15  return "me";
16  break;
17  case EM:
18  return "em";
19  break;
20  case EE:
21  return "ee";
22  break;
23  case ALL:
24  return "all";
25  break;
26  }
27  edm::LogError("InvalidInput") << "ERROR: unknown hypothesis name is requested: " << type;
28  return "";
29  }
type
Definition: HCALResponse.h:21
Definition: ME.h:11
const char * HWWFunctions::HypothesisTypeName ( unsigned int  type)

Definition at line 31 of file wwtypes.cc.

References HypothesisTypeName().

31  {
33  }
type
Definition: HCALResponse.h:21
const char * HypothesisTypeName(HypothesisType type)
Definition: wwtypes.cc:9
bool HWWFunctions::isChargeFlip3agree ( HWW hww,
int  elIndex 
)

Definition at line 466 of file electronSelections.cc.

References HWW::els_sccharge(), HWW::els_trk_charge(), HWW::els_trkidx(), and HWW::trks_charge().

Referenced by electronSelection().

466  {
467  if (hww.els_trkidx().at(elIndex) >= 0) {
468  // false if 3 charge measurements agree
469  if(
470  (hww.els_trk_charge().at(elIndex) // gsf
471  == hww.trks_charge().at(hww.els_trkidx().at(elIndex))) // ctf
472  &&
473  (hww.trks_charge().at(hww.els_trkidx().at(elIndex)) // ctf
474  == hww.els_sccharge().at(elIndex)) ) // sc
475  return false;
476  }
477  return true;
478  }
std::vector< int > & els_sccharge()
Definition: HWW.cc:353
std::vector< int > & els_trk_charge()
Definition: HWW.cc:357
std::vector< int > & trks_charge()
Definition: HWW.cc:95
std::vector< int > & els_trkidx()
Definition: HWW.cc:341
bool HWWFunctions::isFromConversionHitPattern ( HWW ,
const unsigned int  index 
)
bool HWWFunctions::isFromConversionMIT ( HWW hww,
const unsigned int  index 
)

Definition at line 461 of file electronSelections.cc.

References alignCSCRings::e, and isMITConversion().

Referenced by ElectronFOIdV4(), electronSelection(), goodElectronTMVA(), and ww_elId().

461  {
462  return isMITConversion(hww, index, 0, 1e-6, 2.0, true, false);
463  }
bool isMITConversion(HWW &, unsigned int elidx, int nWrongHitsMax, float probMin, float dlMin, bool matchCTF, bool requireArbitratedMerged)
bool HWWFunctions::isFromConversionPartnerTrack ( HWW hww,
const unsigned int  index 
)

Definition at line 456 of file electronSelections.cc.

References HWW::els_conv_dcot(), and HWW::els_conv_dist().

Referenced by electronSelection().

456  {
457  if( fabs(hww.els_conv_dist().at(index)) < 0.02 && fabs(hww.els_conv_dcot().at(index)) < 0.02 ) return true;
458  return false;
459  }
std::vector< float > & els_conv_dcot()
Definition: HWW.cc:277
std::vector< float > & els_conv_dist()
Definition: HWW.cc:273
bool HWWFunctions::isGoodStandardMuon ( HWW ,
unsigned int  index 
)
bool HWWFunctions::isGoodVertex ( HWW hww,
int  ivtx 
)

Definition at line 370 of file analysisSelections.cc.

References HWW::vtxs_isFake(), HWW::vtxs_ndof(), and HWW::vtxs_position().

Referenced by electron_d0PV_wwV1(), electron_dzPV_wwV1(), nGoodVertex(), and passFirstCuts().

370  {
371 
372  if (hww.vtxs_isFake().at(ivtx)) return false;
373  if (hww.vtxs_ndof().at(ivtx) <= 4.) return false;
374  if (hww.vtxs_position().at(ivtx).Rho() > 2.0) return false;
375  if (fabs(hww.vtxs_position().at(ivtx).Z()) > 24.0) return false;
376  return true;
377 
378  }
std::vector< float > & vtxs_ndof()
Definition: HWW.cc:9
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
std::vector< int > & vtxs_isFake()
Definition: HWW.cc:17
bool HWWFunctions::isMITConversion ( HWW hww,
unsigned int  elidx,
int  nWrongHitsMax,
float  probMin,
float  dlMin,
bool  matchCTF,
bool  requireArbitratedMerged 
)

Definition at line 6 of file MITConversionUtilities.cc.

References HWW::convs_chi2(), HWW::convs_dl(), HWW::convs_isConverted(), HWW::convs_ndof(), HWW::convs_nHitsBeforeVtx(), HWW::convs_quality(), HWW::convs_tkalgo(), HWW::convs_tkidx(), HWW::els_gsftrkidx(), HWW::els_trkidx(), and j.

Referenced by electronId_WP2012(), and isFromConversionMIT().

11  {
12 
13  unsigned int nconvs = hww.convs_isConverted().size();
14  if(nconvs == 0)
15  return false;
16  bool isGoodConversion = false;
17 
18  for(unsigned int iconv = 0; iconv < nconvs; iconv++) {
19 
20  bool conversionMatchFound = false;
21  for(unsigned int itk = 0; itk < hww.convs_tkidx().at(iconv).size(); itk++) {
22 
23  if(hww.convs_tkalgo().at(iconv)[itk] == 29 && hww.convs_tkidx().at(iconv)[itk] == hww.els_gsftrkidx().at(elidx))
24  conversionMatchFound = true;
25  if(matchCTF) {
26  if(hww.convs_tkalgo().at(iconv)[itk] > 3 && hww.convs_tkalgo().at(iconv)[itk] < 14 && hww.convs_tkalgo().at(iconv)[itk] != 12 && hww.convs_tkidx().at(iconv)[itk] == hww.els_trkidx().at(elidx))
27  conversionMatchFound = true;
28  }
29 
30  if(conversionMatchFound)
31  break;
32  }
33 
34 
35  if(conversionMatchFound==false)
36  continue;
37 
38  if( TMath::Prob( hww.convs_chi2().at(iconv), (Int_t)hww.convs_ndof().at(iconv) ) > probMin && hww.convs_dl().at(iconv) > dlMin ) isGoodConversion = true;
39  if(requireArbitratedMerged) {
40  if(hww.convs_quality().at(iconv) & 4)
41  isGoodConversion = true;
42  else
43  isGoodConversion = false;
44  }
45 
46  for(unsigned int j = 0; j < hww.convs_nHitsBeforeVtx().at(iconv).size(); j++) {
47  if(hww.convs_nHitsBeforeVtx().at(iconv)[j] > nWrongHitsMax)
48  isGoodConversion = false;
49  }
50 
51  if(isGoodConversion)
52  break;
53 
54 
55  }//loop over convserions
56 
57 
58  return isGoodConversion;
59  }
std::vector< int > & els_gsftrkidx()
Definition: HWW.cc:333
std::vector< std::vector< int > > & convs_nHitsBeforeVtx()
Definition: HWW.cc:673
std::vector< std::vector< int > > & convs_tkalgo()
Definition: HWW.cc:665
int j
Definition: DBlmapReader.cc:9
std::vector< float > & convs_chi2()
Definition: HWW.cc:653
std::vector< float > & convs_ndof()
Definition: HWW.cc:649
std::vector< int > & convs_quality()
Definition: HWW.cc:677
std::vector< float > & convs_dl()
Definition: HWW.cc:657
std::vector< int > & convs_isConverted()
Definition: HWW.cc:661
std::vector< std::vector< int > > & convs_tkidx()
Definition: HWW.cc:669
std::vector< int > & els_trkidx()
Definition: HWW.cc:341
bool HWWFunctions::isPFMuon ( HWW hww,
int  index,
bool  requireSamePt = true,
float  dpt_max = 1.0 
)

Definition at line 394 of file muonSelections.cc.

References HWW::mus_p4(), HWW::mus_pfmusidx(), HWW::pfmus_p4(), and RecoTauCleanerPlugins::pt.

394  {
395 
396  int ipf = hww.mus_pfmusidx().at( index );
397 
398  //--------------------------
399  // require matched pfmuon
400  //--------------------------
401 
402  if( ipf >= int(hww.pfmus_p4().size()) || ipf < 0 ) return false;
403 
404  //----------------------------------------------------
405  // require PFMuon pt = reco muon pt (within dpt_max)
406  //----------------------------------------------------
407 
408  if( requireSamePt ){
409 
410  float pt_pf = hww.pfmus_p4().at(ipf).pt();
411  float pt = hww.mus_p4().at(index).pt();
412 
413  if( fabs( pt_pf - pt ) > dpt_max ) return false;
414 
415  }
416 
417  return true;
418 
419  }
std::vector< LorentzVector > & mus_p4()
Definition: HWW.cc:367
std::vector< int > & mus_pfmusidx()
Definition: HWW.cc:523
std::vector< LorentzVector > & pfmus_p4()
Definition: HWW.cc:757
bool HWWFunctions::isSpikeElectron ( HWW ,
const unsigned int  index 
)
double HWWFunctions::mud0PV ( HWW hww,
unsigned int  index 
)

Definition at line 319 of file muonSelections.cc.

References funct::cos(), i, HWW::mus_d0(), HWW::mus_trk_p4(), funct::sin(), HWW::vtxs_position(), and HWW::vtxs_sumpt().

Referenced by muonIdNotIsolated().

319  {
320  if ( hww.vtxs_sumpt().empty() ) return 9999.;
321  unsigned int iMax = 0;
322  double sumPtMax = hww.vtxs_sumpt().at(0);
323  for ( unsigned int i = iMax+1; i < hww.vtxs_sumpt().size(); ++i )
324  if ( hww.vtxs_sumpt().at(i) > sumPtMax ){
325  iMax = i;
326  sumPtMax = hww.vtxs_sumpt().at(i);
327  }
328  double dxyPV = hww.mus_d0().at(index)-
329  hww.vtxs_position().at(iMax).x()*sin(hww.mus_trk_p4().at(index).phi())+
330  hww.vtxs_position().at(iMax).y()*cos(hww.mus_trk_p4().at(index).phi());
331  return dxyPV;
332  }
int i
Definition: DBlmapReader.cc:9
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< LorentzVector > & mus_trk_p4()
Definition: HWW.cc:371
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
std::vector< float > & mus_d0()
Definition: HWW.cc:403
std::vector< float > & vtxs_sumpt()
Definition: HWW.cc:13
double HWWFunctions::mud0PV_smurfV3 ( HWW hww,
unsigned int  index 
)

Definition at line 355 of file muonSelections.cc.

References funct::cos(), HWW::mus_d0(), HWW::mus_trk_p4(), funct::sin(), and HWW::vtxs_position().

Referenced by muonIdNotIsolated(), and MuonIDMVA::MVAValue().

355  {
356  int vtxIndex = 0;
357  double dxyPV = hww.mus_d0().at(index)-
358  hww.vtxs_position().at(vtxIndex).x()*sin(hww.mus_trk_p4().at(index).phi())+
359  hww.vtxs_position().at(vtxIndex).y()*cos(hww.mus_trk_p4().at(index).phi());
360  return dxyPV;
361  }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< LorentzVector > & mus_trk_p4()
Definition: HWW.cc:371
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
std::vector< float > & mus_d0()
Definition: HWW.cc:403
double HWWFunctions::mud0PV_wwV1 ( HWW hww,
unsigned int  index 
)

Definition at line 334 of file muonSelections.cc.

References funct::cos(), i, HWW::mus_d0(), HWW::mus_trk_p4(), funct::sin(), HWW::vtxs_isFake(), HWW::vtxs_ndof(), HWW::vtxs_position(), and HWW::vtxs_sumpt().

Referenced by muonIdNotIsolated().

334  {
335  if ( hww.vtxs_sumpt().empty() ) return 9999.;
336  double sumPtMax = -1;
337  int iMax = -1;
338  for ( unsigned int i = 0; i < hww.vtxs_sumpt().size(); ++i ){
339  if (hww.vtxs_isFake().at(i)) continue;
340  if (hww.vtxs_ndof().at(i) < 4.) continue;
341  if (hww.vtxs_position().at(i).Rho() > 2.0) continue;
342  if (fabs(hww.vtxs_position().at(i).Z()) > 24.0) continue;
343  if ( hww.vtxs_sumpt().at(i) > sumPtMax ){
344  iMax = i;
345  sumPtMax = hww.vtxs_sumpt().at(i);
346  }
347  }
348  if (iMax<0) return 9999.;
349  double dxyPV = hww.mus_d0().at(index)-
350  hww.vtxs_position().at(iMax).x()*sin(hww.mus_trk_p4().at(index).phi())+
351  hww.vtxs_position().at(iMax).y()*cos(hww.mus_trk_p4().at(index).phi());
352  return dxyPV;
353  }
int i
Definition: DBlmapReader.cc:9
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< LorentzVector > & mus_trk_p4()
Definition: HWW.cc:371
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< float > & vtxs_ndof()
Definition: HWW.cc:9
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
std::vector< float > & mus_d0()
Definition: HWW.cc:403
std::vector< int > & vtxs_isFake()
Definition: HWW.cc:17
std::vector< float > & vtxs_sumpt()
Definition: HWW.cc:13
double HWWFunctions::mudzPV_smurfV3 ( HWW hww,
unsigned int  index 
)

Definition at line 367 of file muonSelections.cc.

References dzPV_mu(), HWW::mus_trk_p4(), HWW::mus_vertex_p4(), and HWW::vtxs_position().

Referenced by muonIdNotIsolated().

367  {
368  int vtxIndex = 0;
369  double dzpv = dzPV_mu(hww, hww.mus_vertex_p4().at(index), hww.mus_trk_p4().at(index), hww.vtxs_position().at(vtxIndex));
370  return dzpv;
371  }
std::vector< LorentzVector > & mus_trk_p4()
Definition: HWW.cc:371
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
std::vector< LorentzVector > & mus_vertex_p4()
Definition: HWW.cc:375
double dzPV_mu(HWW &hww, const LorentzVector &vtx, const LorentzVector &p4, const LorentzVector &pv)
double HWWFunctions::mudzPV_wwV1 ( HWW hww,
unsigned int  index 
)

Definition at line 373 of file muonSelections.cc.

References i, HWW::mus_trk_p4(), HWW::mus_vertex_p4(), p4, HWW::vtxs_isFake(), HWW::vtxs_ndof(), HWW::vtxs_position(), and HWW::vtxs_sumpt().

Referenced by muonIdNotIsolated().

373  {
374  if ( hww.vtxs_sumpt().empty() ) return 9999.;
375  double sumPtMax = -1;
376  int iMax = -1;
377  for ( unsigned int i = 0; i < hww.vtxs_sumpt().size(); ++i ){
378  if (hww.vtxs_isFake().at(i)) continue;
379  if (hww.vtxs_ndof().at(i) < 4.) continue;
380  if (hww.vtxs_position().at(i).Rho() > 2.0) continue;
381  if (fabs(hww.vtxs_position().at(i).Z()) > 24.0) continue;
382  if ( hww.vtxs_sumpt().at(i) > sumPtMax ){
383  iMax = i;
384  sumPtMax = hww.vtxs_sumpt().at(i);
385  }
386  }
387  if (iMax<0) return 9999.;
388  const LorentzVector& vtx = hww.mus_vertex_p4().at(index);
389  const LorentzVector& p4 = hww.mus_trk_p4().at(index);
390  const LorentzVector& pv = hww.vtxs_position().at(iMax);
391  return (vtx.z()-pv.z()) - ((vtx.x()-pv.x())*p4.x()+(vtx.y()-pv.y())*p4.y())/p4.pt() * p4.z()/p4.pt();
392  }
int i
Definition: DBlmapReader.cc:9
std::vector< LorentzVector > & mus_trk_p4()
Definition: HWW.cc:371
double p4[4]
Definition: TauolaWrapper.h:92
std::vector< float > & vtxs_ndof()
Definition: HWW.cc:9
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > LorentzVector
Definition: analysisEnums.h:9
std::vector< int > & vtxs_isFake()
Definition: HWW.cc:17
std::vector< LorentzVector > & mus_vertex_p4()
Definition: HWW.cc:375
std::vector< float > & vtxs_sumpt()
Definition: HWW.cc:13
bool HWWFunctions::MuonFOV2 ( HWW hww,
unsigned int  i,
MuonMVAEstimator muonMVAEstimator,
std::vector< Int_t >  IdentifiedMu,
std::vector< Int_t >  IdentifiedEle 
)

Definition at line 763 of file analysisSelections.cc.

References HWW::mus_gfit_chi2(), HWW::mus_gfit_ndof(), HWW::mus_gfit_validSTAHits(), HWW::mus_nmatches(), HWW::mus_pid_PFMuon(), HWW::mus_pid_TMLastStationTight(), HWW::mus_ptErr(), HWW::mus_trk_p4(), HWW::mus_trkidx(), HWW::mus_trkKink(), HWW::mus_type(), passMuonRingsMVAFO(), HWW::trks_nlayers(), HWW::trks_valid_pixelhits(), ww_muBase(), ww_mud0ValuePV(), and ww_mudZPV().

Referenced by fakableMuon().

764  {
765 
766  if (((hww.mus_type().at(i)) & (1<<2)) == 0) return false; // tracker muon
767  if (hww.trks_nlayers().at(hww.mus_trkidx().at(i)) < 6) return false; // # of tracker hits
768  if (hww.mus_ptErr().at(i)/hww.mus_trk_p4().at(i).pt()>0.1) return false; // Does pt come from track?
769  if (hww.trks_valid_pixelhits().at(hww.mus_trkidx().at(i))==0) return false;
770  if (hww.mus_trkKink().at(i) > 20.) return false; //kink finder
771  if (!hww.mus_pid_PFMuon().at(i)) return false; // should be a pfmuon
772  // global muon
773  bool goodMuonGlobalMuon = false;
774  if (((hww.mus_type().at(i)) & (1<<1)) == (1<<1)) {
775  goodMuonGlobalMuon = true;
776  if (hww.mus_gfit_chi2().at(i)/hww.mus_gfit_ndof().at(i) >= 10) goodMuonGlobalMuon = false; //glb fit chisq
777  if (hww.mus_gfit_validSTAHits().at(i)==0 ) goodMuonGlobalMuon = false;
778  if (hww.mus_nmatches().at(i)<2) goodMuonGlobalMuon = false;
779  }
780 
781  return (goodMuonGlobalMuon || hww.mus_pid_TMLastStationTight().at(i) == 1) && // ---> Id
782  ww_muBase(hww, i) &&
783  ww_mud0ValuePV(hww, i)<0.2 &&
784  ww_mudZPV(hww, i) &&
785  passMuonRingsMVAFO(hww, i, muonMVAEstimator, IdentifiedMu, IdentifiedEle);
786  }
int i
Definition: DBlmapReader.cc:9
std::vector< int > & mus_pid_PFMuon()
Definition: HWW.cc:539
std::vector< int > & trks_valid_pixelhits()
Definition: HWW.cc:63
std::vector< float > & mus_gfit_chi2()
Definition: HWW.cc:383
std::vector< int > & mus_pid_TMLastStationTight()
Definition: HWW.cc:543
std::vector< int > & mus_trkidx()
Definition: HWW.cc:535
std::vector< float > & mus_ptErr()
Definition: HWW.cc:391
std::vector< int > & mus_nmatches()
Definition: HWW.cc:547
std::vector< int > & mus_gfit_validSTAHits()
Definition: HWW.cc:515
double ww_mud0ValuePV(HWW &hww, unsigned int index)
std::vector< LorentzVector > & mus_trk_p4()
Definition: HWW.cc:371
std::vector< float > & mus_gfit_ndof()
Definition: HWW.cc:387
bool ww_muBase(HWW &hww, unsigned int i)
bool ww_mudZPV(HWW &hww, unsigned int i, float cut=0.1)
std::vector< float > & mus_trkKink()
Definition: HWW.cc:395
bool passMuonRingsMVAFO(HWW &hww, unsigned int mu, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
std::vector< int > & trks_nlayers()
Definition: HWW.cc:59
std::vector< int > & mus_type()
Definition: HWW.cc:555
bool HWWFunctions::muonId ( HWW hww,
unsigned int  index,
SelectionType  type 
)

Definition at line 16 of file muonSelections.cc.

References Abs(), cmsRelvalreport::exit, muonIdNotIsolated(), muonIsoValue(), muonIsoValuePF(), muonSelectionFO_mu_smurf_04, muonSelectionFO_mu_smurf_10, muonSelectionFO_mu_ww, muonSelectionFO_mu_ww_iso10, muonSelectionFO_mu_wwV1, muonSelectionFO_mu_wwV1_iso10, muonSelectionFO_mu_wwV1_iso10_d0, HWW::mus_p4(), NominalSmurfV3, NominalSmurfV4, NominalSmurfV5, NominalSmurfV6, NominalWWV0, and NominalWWV1.

Referenced by fakableMuon(), goodMuonIsolated(), reco::SoftLeptonProperties::Quality::internalByName(), and MuonIdProducer::sectorPhi().

16  {
17 
18  float isovalue;
19  bool truncated = true;
20 
21  switch(type) {
22 
24  // Higgs, WW //
26 
27  // WW
28  case NominalWWV0:
29  case NominalWWV1:
30  isovalue = 0.15;
31  break;
34  isovalue = 0.40;
35  break;
37  if (!muonIdNotIsolated(hww, index, type )) return false;
38  return muonIsoValuePF(hww, index,0,0.3) < 0.40;
39  break;
43  isovalue = 1.0;
44  break;
45 
46  // SMURF
48  if (!muonIdNotIsolated(hww, index, type )) return false;
49  return muonIsoValuePF(hww, index,0,0.3) < 1.0;
50  break;
51  case NominalSmurfV3:
52  if (!muonIdNotIsolated(hww, index, type )) return false;
53  if (hww.mus_p4().at(index).pt()<20)
54  return muonIsoValue(hww, index,false) < 0.1;
55  else
56  return muonIsoValue(hww, index,false) < 0.15;
57  break;
58  case NominalSmurfV4:
59  if (!muonIdNotIsolated(hww, index, type )) return false;
60  if (hww.mus_p4().at(index).pt()>20) {
61  if (TMath::Abs(hww.mus_p4().at(index).eta())<1.479) return muonIsoValuePF(hww, index,0) < 0.22;
62  else return muonIsoValuePF(hww, index,0) < 0.20;
63  } else {
64  return muonIsoValuePF(hww, index,0) < 0.11;
65  }
66  break;
67  case NominalSmurfV5:
68  case NominalSmurfV6:
69  if (!muonIdNotIsolated(hww, index, type )) return false;
70  if (hww.mus_p4().at(index).pt()>20) {
71  if (TMath::Abs(hww.mus_p4().at(index).eta())<1.479) return muonIsoValuePF(hww, index,0,0.3) < 0.13;
72  else return muonIsoValuePF(hww, index,0,0.3) < 0.09;
73  } else {
74  if (TMath::Abs(hww.mus_p4().at(index).eta())<1.479) return muonIsoValuePF(hww, index,0,0.3) < 0.06;
75  else return muonIsoValuePF(hww, index,0,0.3) < 0.05;
76  }
77  break;
78 
79 
80 
82  // Default //
84  default:
85  edm::LogError("InvalidInput") << "muonID ERROR: requested muon type is not defined. Abort.";
86  exit(1);
87  return false;
88  }
89  return
90  muonIdNotIsolated(hww, index, type ) && // Id
91  muonIsoValue(hww, index,truncated) < isovalue; // Isolation cut
92  }
type
Definition: HCALResponse.h:21
std::vector< LorentzVector > & mus_p4()
Definition: HWW.cc:367
double muonIsoValue(HWW &, unsigned int, bool=true)
T Abs(T a)
Definition: MathUtil.h:49
bool muonIdNotIsolated(HWW &, unsigned int index, SelectionType type)
double muonIsoValuePF(HWW &, unsigned int imu, unsigned int ivtx, float coner=0.4, float minptn=1.0, float dzcut=0.1, int filterId=0)
bool HWWFunctions::muonIdNotIsolated ( HWW hww,
unsigned int  index,
SelectionType  type 
)

Definition at line 99 of file muonSelections.cc.

References Abs(), mud0PV(), mud0PV_smurfV3(), mud0PV_wwV1(), mudzPV_smurfV3(), mudzPV_wwV1(), muonSelectionFO_mu_smurf_04, muonSelectionFO_mu_smurf_10, muonSelectionFO_mu_ww, muonSelectionFO_mu_ww_iso10, muonSelectionFO_mu_wwV1, muonSelectionFO_mu_wwV1_iso10, muonSelectionFO_mu_wwV1_iso10_d0, HWW::mus_gfit_chi2(), HWW::mus_gfit_ndof(), HWW::mus_gfit_validSTAHits(), HWW::mus_nmatches(), HWW::mus_p4(), HWW::mus_pid_TMLastStationTight(), HWW::mus_ptErr(), HWW::mus_trkidx(), HWW::mus_type(), HWW::mus_validHits(), NominalSmurfV3, NominalSmurfV4, NominalSmurfV5, NominalSmurfV6, NominalWWV0, NominalWWV1, and HWW::trks_valid_pixelhits().

Referenced by muonId().

99  {
100 
101  if ( hww.mus_p4().at(index).pt() < 5.0) {
102  return false;
103  }
104 
105  switch (type) {
106 
107  case NominalWWV0:
108  if ( TMath::Abs(hww.mus_p4().at(index).eta()) > 2.4) return false; // eta cut
109  if (hww.mus_gfit_chi2().at(index)/hww.mus_gfit_ndof().at(index) >= 10) return false; //glb fit chisq
110  if (((hww.mus_type().at(index)) & (1<<1)) == 0) return false; // global muon
111  if (((hww.mus_type().at(index)) & (1<<2)) == 0) return false; // tracker muon
112  if (hww.mus_validHits().at(index) < 11) return false; // # of tracker hits
113  if (hww.mus_gfit_validSTAHits().at(index)==0 ) return false; // Glb fit must have hits in mu chambers
114  if (TMath::Abs(mud0PV(hww, index)) >= 0.02) return false; // d0 from pvtx
115  return true;
116  break;
117 
120  case NominalWWV1:
121  if ( TMath::Abs(hww.mus_p4().at(index).eta()) > 2.4) return false; // eta cut
122  if (hww.mus_gfit_chi2().at(index)/hww.mus_gfit_ndof().at(index) >= 10) return false; //glb fit chisq
123  if (((hww.mus_type().at(index)) & (1<<1)) == 0) return false; // global muon
124  if (((hww.mus_type().at(index)) & (1<<2)) == 0) return false; // tracker muon
125  if (hww.mus_validHits().at(index) < 11) return false; // # of tracker hits
126  if (hww.mus_gfit_validSTAHits().at(index)==0 ) return false; // Glb fit must have hits in mu chambers
127  if (TMath::Abs(mud0PV_wwV1(hww, index)) >= 0.02) return false; // d0 from pvtx
128  if (TMath::Abs(mudzPV_wwV1(hww, index)) >= 1.0) return false; // dz from pvtx
129  if (hww.mus_ptErr().at(index)/hww.mus_p4().at(index).pt()>0.1) return false;
130  if (hww.trks_valid_pixelhits().at(hww.mus_trkidx().at(index))==0) return false;
131  if (hww.mus_nmatches().at(index)<2) return false;
132  return true;
133  break;
134 
135  case muonSelectionFO_mu_wwV1_iso10_d0: // same as muonSelectionFO_mu_wwV1_iso10 but with looser d0 cut
136  if ( TMath::Abs(hww.mus_p4().at(index).eta()) > 2.4) return false; // eta cut
137  if (hww.mus_gfit_chi2().at(index)/hww.mus_gfit_ndof().at(index) >= 10) return false; //glb fit chisq
138  if (((hww.mus_type().at(index)) & (1<<1)) == 0) return false; // global muon
139  if (((hww.mus_type().at(index)) & (1<<2)) == 0) return false; // tracker muon
140  if (hww.mus_validHits().at(index) < 11) return false; // # of tracker hits
141  if (hww.mus_gfit_validSTAHits().at(index)==0 ) return false; // Glb fit must have hits in mu chambers
142  if (TMath::Abs(mud0PV_wwV1(hww, index)) >= 0.2) return false; // d0 from pvtx
143  if (TMath::Abs(mudzPV_wwV1(hww, index)) >= 1.0) return false; // dz from pvtx
144  if (hww.mus_ptErr().at(index)/hww.mus_p4().at(index).pt()>0.1) return false;
145  if (hww.trks_valid_pixelhits().at(hww.mus_trkidx().at(index))==0) return false;
146  if (hww.mus_nmatches().at(index)<2) return false;
147  return true;
148  break;
149 
151  if ( TMath::Abs(hww.mus_p4().at(index).eta()) > 2.4) return false; // eta cut
152  if (hww.mus_gfit_chi2().at(index)/hww.mus_gfit_ndof().at(index) >= 10) return false; //glb fit chisq
153  if (((hww.mus_type().at(index)) & (1<<1)) == 0) return false; // global muon
154  if (((hww.mus_type().at(index)) & (1<<2)) == 0) return false; // tracker muon
155  if (hww.mus_validHits().at(index) < 11) return false; // # of tracker hits
156  if (hww.mus_gfit_validSTAHits().at(index)==0 ) return false; // Glb fit must have hits in mu chambers
157  if (TMath::Abs(mud0PV(hww, index)) >= 0.02) return false; // d0 from pvtx
158  return true;
159 
161  if ( TMath::Abs(hww.mus_p4().at(index).eta()) > 2.4) return false; // eta cut
162  if (hww.mus_gfit_chi2().at(index)/hww.mus_gfit_ndof().at(index) >= 10) return false; //glb fit chisq
163  if (((hww.mus_type().at(index)) & (1<<1)) == 0) return false; // global muon
164  if (((hww.mus_type().at(index)) & (1<<2)) == 0) return false; // tracker muon
165  if (hww.mus_validHits().at(index) < 11) return false; // # of tracker hits
166  if (hww.mus_gfit_validSTAHits().at(index)==0 ) return false; // Glb fit must have hits in mu chambers
167  if (TMath::Abs(mud0PV(hww, index)) >= 0.02) return false; // d0 from pvtx
168  return true;
169 
170  case NominalSmurfV3:
171  case NominalSmurfV4:
172  case NominalSmurfV5:
174  if (hww.mus_p4().at(index).pt()<20){
175  if (TMath::Abs(mud0PV_smurfV3(hww, index)) >= 0.01) return false; // d0 from pvtx
176  } else {
177  if (TMath::Abs(mud0PV_smurfV3(hww, index)) >= 0.02) return false; // d0 from pvtx
178  }
179  } else {
180  if (TMath::Abs(mud0PV_smurfV3(hww, index)) >= 0.2) return false; // d0 from pvtx
181  }
182  if ( TMath::Abs(hww.mus_p4().at(index).eta()) > 2.4) return false; // eta cut
183  if (hww.mus_gfit_chi2().at(index)/hww.mus_gfit_ndof().at(index) >= 10) return false; //glb fit chisq
184  if (((hww.mus_type().at(index)) & (1<<1)) == 0) return false; // global muon
185  if (((hww.mus_type().at(index)) & (1<<2)) == 0) return false; // tracker muon
186  if (hww.mus_validHits().at(index) < 11) return false; // # of tracker hits
187  if (hww.mus_gfit_validSTAHits().at(index)==0 ) return false; // Glb fit must have hits in mu chambers
188  if (TMath::Abs(mudzPV_smurfV3(hww, index)) >= 0.1) return false; // dz from pvtx
189  if (hww.mus_ptErr().at(index)/hww.mus_p4().at(index).pt()>0.1) return false;
190  if (hww.trks_valid_pixelhits().at(hww.mus_trkidx().at(index))==0) return false;
191  if (hww.mus_nmatches().at(index)<2) return false;
192  return true;
193  break;
194 
195 
198  case NominalSmurfV6:
199  {
200  if (type == NominalSmurfV6){
201  if (hww.mus_p4().at(index).pt()<20){
202  if (TMath::Abs(mud0PV_smurfV3(hww, index)) >= 0.01) return false; // d0 from pvtx
203  } else {
204  if (TMath::Abs(mud0PV_smurfV3(hww, index)) >= 0.02) return false; // d0 from pvtx
205  }
206  } else {
207  if (TMath::Abs(mud0PV_smurfV3(hww, index)) >= 0.2) return false; // d0 from pvtx
208  }
209  if ( TMath::Abs(hww.mus_p4().at(index).eta()) > 2.4) return false; // eta cut
210  if (hww.mus_validHits().at(index) < 11) return false; // # of tracker hits
211  if (TMath::Abs(mudzPV_smurfV3(hww, index)) >= 0.1) return false; // dz from pvtx
212  if (hww.mus_ptErr().at(index)/hww.mus_p4().at(index).pt()>0.1) return false;
213  if (hww.trks_valid_pixelhits().at(hww.mus_trkidx().at(index))==0) return false;
214  bool goodMuonGlobalMuon = false;
215  if (((hww.mus_type().at(index)) & (1<<1)) != 0) { // global muon
216  goodMuonGlobalMuon = true;
217  if (hww.mus_nmatches().at(index)<2) goodMuonGlobalMuon = false;
218  if (hww.mus_gfit_chi2().at(index)/hww.mus_gfit_ndof().at(index) >= 10) goodMuonGlobalMuon = false; //glb fit chisq
219  if (hww.mus_gfit_validSTAHits().at(index)==0 ) goodMuonGlobalMuon = false; // Glb fit must have hits in mu chambers
220  }
221  bool goodMuonTrackerMuon = false;
222  if (((hww.mus_type().at(index)) & (1<<2)) != 0) { // tracker muon
223  goodMuonTrackerMuon = true;
224  if (hww.mus_pid_TMLastStationTight().at(index) == 0 ) goodMuonTrackerMuon = false; // last station tight
225  }
226  return goodMuonGlobalMuon || goodMuonTrackerMuon;
227  break;
228  }
229  default:
230  edm::LogError("InvalidInput") << "muonID ERROR: requested muon type is not defined. Abort.";
231  return false;
232  }
233  }
type
Definition: HCALResponse.h:21
double mud0PV_smurfV3(HWW &, unsigned int index)
std::vector< int > & trks_valid_pixelhits()
Definition: HWW.cc:63
std::vector< float > & mus_gfit_chi2()
Definition: HWW.cc:383
std::vector< int > & mus_pid_TMLastStationTight()
Definition: HWW.cc:543
std::vector< int > & mus_trkidx()
Definition: HWW.cc:535
std::vector< float > & mus_ptErr()
Definition: HWW.cc:391
std::vector< LorentzVector > & mus_p4()
Definition: HWW.cc:367
std::vector< int > & mus_nmatches()
Definition: HWW.cc:547
std::vector< int > & mus_gfit_validSTAHits()
Definition: HWW.cc:515
double mud0PV_wwV1(HWW &, unsigned int index)
std::vector< int > & mus_validHits()
Definition: HWW.cc:531
T Abs(T a)
Definition: MathUtil.h:49
std::vector< float > & mus_gfit_ndof()
Definition: HWW.cc:387
double mudzPV_wwV1(HWW &, unsigned int index)
double mudzPV_smurfV3(HWW &, unsigned int index)
double mud0PV(HWW &, unsigned int index)
std::vector< int > & mus_type()
Definition: HWW.cc:555
double HWWFunctions::muonIsoValue ( HWW hww,
unsigned int  index,
bool  truncated = true 
)

Definition at line 240 of file muonSelections.cc.

References muonIsoValue_ECAL(), muonIsoValue_HCAL(), and muonIsoValue_TRK().

Referenced by muonId().

240  {
241  return ( muonIsoValue_TRK(hww, index, truncated ) + muonIsoValue_ECAL(hww, index, truncated ) + muonIsoValue_HCAL(hww, index, truncated ) );
242  }
double muonIsoValue_ECAL(HWW &, unsigned int, bool=true)
double muonIsoValue_HCAL(HWW &, unsigned int, bool=true)
double muonIsoValue_TRK(HWW &, unsigned int, bool=true)
double HWWFunctions::muonIsoValue_ECAL ( HWW hww,
unsigned int  index,
bool  truncated = true 
)

Definition at line 248 of file muonSelections.cc.

References bookConverter::max, HWW::mus_iso03_emEt(), HWW::mus_p4(), and RecoTauCleanerPlugins::pt.

Referenced by muonIsoValue().

248  {
249  double pt = hww.mus_p4().at(index).pt();
250  if(truncated) pt = max( pt, 20.0 );
251  return hww.mus_iso03_emEt().at(index) / pt;
252  }
std::vector< LorentzVector > & mus_p4()
Definition: HWW.cc:367
std::vector< float > & mus_iso03_emEt()
Definition: HWW.cc:463
double HWWFunctions::muonIsoValue_HCAL ( HWW hww,
unsigned int  index,
bool  truncated = true 
)

Definition at line 253 of file muonSelections.cc.

References bookConverter::max, HWW::mus_iso03_hadEt(), HWW::mus_p4(), and RecoTauCleanerPlugins::pt.

Referenced by muonIsoValue().

253  {
254  double pt = hww.mus_p4().at(index).pt();
255  if(truncated) pt = max( pt, 20.0 );
256  return hww.mus_iso03_hadEt().at(index) / pt;
257  }
std::vector< LorentzVector > & mus_p4()
Definition: HWW.cc:367
std::vector< float > & mus_iso03_hadEt()
Definition: HWW.cc:467
double HWWFunctions::muonIsoValue_TRK ( HWW hww,
unsigned int  index,
bool  truncated = true 
)

Definition at line 243 of file muonSelections.cc.

References bookConverter::max, HWW::mus_iso03_sumPt(), HWW::mus_p4(), and RecoTauCleanerPlugins::pt.

Referenced by muonIsoValue().

243  {
244  double pt = hww.mus_p4().at(index).pt();
245  if(truncated) pt = max( pt, 20.0 );
246  return hww.mus_iso03_sumPt().at(index) / pt;
247  }
std::vector< LorentzVector > & mus_p4()
Definition: HWW.cc:367
std::vector< float > & mus_iso03_sumPt()
Definition: HWW.cc:459
double HWWFunctions::muonIsoValuePF ( HWW hww,
unsigned int  imu,
unsigned int  ivtx,
float  coner = 0.4,
float  minptn = 1.0,
float  dzcut = 0.1,
int  filterId = 0 
)

Definition at line 273 of file muonSelections.cc.

References funct::abs(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, HWW::els_gsftrkidx(), first, gsftrks_dz_pv(), HWW::mus_p4(), HWW::mus_sta_z0corr(), HWW::mus_trkidx(), HWW::pfcands_charge(), HWW::pfcands_p4(), HWW::pfcands_particleId(), HWW::pfcands_pfelsidx(), HWW::pfcands_trkidx(), HWW::pfels_elsidx(), and trks_dz_pv().

Referenced by goodMuonTMVA(), muonId(), and ww_muIso().

273  {
274  float pfciso = 0;
275  float pfniso = 0;
276  int mutkid = hww.mus_trkidx().at(imu);
277  float mudz = mutkid>=0 ? trks_dz_pv(hww, mutkid,ivtx).first : hww.mus_sta_z0corr().at(imu);
278  for (unsigned int ipf=0; ipf<hww.pfcands_p4().size(); ++ipf){
279  float dR = ROOT::Math::VectorUtil::DeltaR( hww.pfcands_p4().at(ipf), hww.mus_p4().at(imu) );
280  if (dR>coner) continue;
281  float pfpt = hww.pfcands_p4().at(ipf).pt();
282  int pfid = abs(hww.pfcands_particleId().at(ipf));
283  if (filterId!=0 && filterId!=pfid) continue;
284  if (hww.pfcands_charge().at(ipf)==0) {
285  //neutrals
286  if (pfpt>minptn) pfniso+=pfpt;
287  } else {
288  //charged
289  //avoid double counting of muon itself
290  int pftkid = hww.pfcands_trkidx().at(ipf);
291  if (mutkid>=0 && pftkid>=0 && mutkid==pftkid) continue;
292  //first check electrons with gsf track
293  if (abs(hww.pfcands_particleId().at(ipf))==11 && hww.pfcands_pfelsidx().at(ipf)>=0 && hww.pfels_elsidx().at(hww.pfcands_pfelsidx().at(ipf))>=0) {
294  int gsfid = hww.els_gsftrkidx().at(hww.pfels_elsidx().at(hww.pfcands_pfelsidx().at(ipf)));
295  if (gsfid>=0) {
296  if(fabs(gsftrks_dz_pv(hww, gsfid,ivtx ).first - mudz )<dzcut) {//dz cut
297  pfciso+=pfpt;
298  }
299  continue;//and avoid double counting
300  }
301  }
302  //then check anything that has a ctf track
303  if (hww.pfcands_trkidx().at(ipf)>=0) {//charged (with a ctf track)
304  if(fabs( trks_dz_pv(hww, hww.pfcands_trkidx().at(ipf),ivtx).first - mudz )<dzcut) {//dz cut
305  pfciso+=pfpt;
306  }
307  }
308  }
309  }
310  return (pfciso+pfniso)/hww.mus_p4().at(imu).pt();
311  }
std::vector< int > & pfels_elsidx()
Definition: HWW.cc:749
std::vector< int > & pfcands_charge()
Definition: HWW.cc:745
std::vector< int > & mus_trkidx()
Definition: HWW.cc:535
std::vector< LorentzVector > & mus_p4()
Definition: HWW.cc:367
std::vector< LorentzVector > & pfcands_p4()
Definition: HWW.cc:725
std::vector< int > & els_gsftrkidx()
Definition: HWW.cc:333
std::vector< int > & pfcands_trkidx()
Definition: HWW.cc:729
std::vector< int > & pfcands_pfelsidx()
Definition: HWW.cc:737
std::pair< double, double > gsftrks_dz_pv(HWW &, int itrk, int ipv)
std::vector< int > & pfcands_particleId()
Definition: HWW.cc:733
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool first
Definition: L1TdeRCT.cc:75
std::pair< double, double > trks_dz_pv(HWW &, int itrk, int ipv)
std::vector< float > & mus_sta_z0corr()
Definition: HWW.cc:487
double HWWFunctions::nearestDeltaPhi ( HWW hww,
double  Phi,
int  i_hyp 
)

Definition at line 856 of file analysisSelections.cc.

References HWW::hyp_ll_p4(), HWW::hyp_lt_p4(), Min(), min(), colinearityKinematic::Phi, and Pi.

Referenced by projectedMet().

857  {
858  double tightDPhi = fabs(hww.hyp_lt_p4().at(i_hyp).Phi() - Phi);
859  tightDPhi = std::min(2*TMath::Pi() - tightDPhi, tightDPhi);
860  double looseDPhi = fabs(hww.hyp_ll_p4().at(i_hyp).Phi() - Phi);
861  looseDPhi = std::min(2*TMath::Pi() - looseDPhi, looseDPhi);
862  return TMath::Min(tightDPhi, looseDPhi);
863  }
const double Pi
T Min(T a, T b)
Definition: MathUtil.h:39
std::vector< LorentzVector > & hyp_ll_p4()
Definition: HWW.cc:569
T min(T a, T b)
Definition: MathUtil.h:58
std::vector< LorentzVector > & hyp_lt_p4()
Definition: HWW.cc:573
unsigned int HWWFunctions::nGoodVertex ( HWW hww)

Definition at line 380 of file analysisSelections.cc.

References i, isGoodVertex(), and HWW::vtxs_sumpt().

Referenced by passFirstCuts().

380  {
381  unsigned int nVtx = 0;
382  for ( unsigned int i = 0; i < hww.vtxs_sumpt().size(); ++i ){
383  if (!isGoodVertex(hww, i)) continue;
384  nVtx++;
385  }
386  return nVtx;
387  }
int i
Definition: DBlmapReader.cc:9
std::vector< float > & vtxs_sumpt()
Definition: HWW.cc:13
bool isGoodVertex(HWW &hww, int)
unsigned int HWWFunctions::numberOfExtraLeptons ( HWW hww,
int  i_hyp,
double  minPt,
bool  useLHeleId,
int  useMVAeleId,
EGammaMvaEleEstimator egammaMvaEleEstimator,
bool  useMVAmuId,
MuonIDMVA mumva,
MuonMVAEstimator muonMVAEstimator,
std::vector< Int_t >  IdentifiedMu,
std::vector< Int_t >  IdentifiedEle 
)

Definition at line 823 of file analysisSelections.cc.

References getExtraLeptons().

Referenced by passExtraLeptonVeto().

824  {
825  return getExtraLeptons(hww, i_hyp, minPt, useLHeleId, useMVAeleId, egammaMvaEleEstimator, useMVAmuId, mumva,muonMVAEstimator,IdentifiedMu,IdentifiedEle).size();
826  }
std::vector< LeptonPair > getExtraLeptons(HWW &hww, int i_hyp, double minPt, bool useLHeleId, int useMVAeleId, EGammaMvaEleEstimator *egammaMvaEleEstimator, bool useMVAmuId, MuonIDMVA *mumva, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
unsigned int HWWFunctions::numberOfJets ( HWW hww,
unsigned int  i_hyp 
)

Definition at line 307 of file analysisSelections.cc.

References getDefaultJets().

Referenced by doCutFlow(), passDPhiDiLepJet(), TtDilepEvtSolutionMaker::produce(), and pat::MHT::setNumberOfJets().

307  {
308  return getDefaultJets(hww, i_hyp, false).size();
309  }
std::vector< JetPair > getDefaultJets(HWW &hww, unsigned int, bool)
unsigned int HWWFunctions::numberOfSoftMuons ( HWW hww,
int  i_hyp,
bool  nonisolated 
)

Definition at line 829 of file analysisSelections.cc.

References Abs(), HWW::hyp_ll_id(), HWW::hyp_ll_index(), HWW::hyp_lt_id(), HWW::hyp_lt_index(), HWW::mus_charge(), HWW::mus_goodmask(), HWW::mus_p4(), HWW::mus_trkidx(), runGlobalFakeInputProducer::skip, HWW::trks_nlayers(), ww_mud0ValuePV(), ww_mudZPV(), and ww_muIsoVal().

Referenced by passSoftMuonVeto().

830  {
831 
832  const std::vector<JetPair> vetojets = std::vector<JetPair>(); //empty, so there is no jet veto
833 
834  unsigned int nMuons = 0;
835  for (int imu=0; imu < int(hww.mus_charge().size()); ++imu) {
836  // quality cuts
837  if ( ((hww.mus_goodmask().at(imu)) & (1<<19)) == 0 ) continue; // TMLastStationAngTight
838  if ( hww.mus_p4().at(imu).pt() < 3 ) continue;
839  if ( ww_mud0ValuePV(hww, imu) > 0.2) continue;
840  if ( ! ww_mudZPV(hww, imu,0.2) ) continue; //newcuts, was 0.1
841  if (hww.trks_nlayers().at(hww.mus_trkidx().at(imu)) < 6) return false; // # of tracker hits
842  if ( TMath::Abs(hww.hyp_lt_id().at(i_hyp)) == 13 && hww.hyp_lt_index().at(i_hyp) == imu ) continue;
843  if ( TMath::Abs(hww.hyp_ll_id().at(i_hyp)) == 13 && hww.hyp_ll_index().at(i_hyp) == imu ) continue;
844  if ( nonisolated && ww_muIsoVal(hww, imu)<0.1 && hww.mus_p4().at(imu).pt()>20 ) continue;
845  bool skip = false;
846  for ( std::vector<JetPair>::const_iterator ijet = vetojets.begin(); ijet != vetojets.end(); ++ijet ){
847  if ( TMath::Abs(ROOT::Math::VectorUtil::DeltaR(ijet->first,hww.mus_p4().at(imu))) < 0.3 ) skip=true;
848  }
849  if ( skip ) continue;
850  ++nMuons;
851  }
852  return nMuons;
853  }
double ww_muIsoVal(HWW &hww, unsigned int i)
std::vector< int > & hyp_ll_id()
Definition: HWW.cc:585
std::vector< int > & mus_trkidx()
Definition: HWW.cc:535
std::vector< int > & hyp_lt_index()
Definition: HWW.cc:581
std::vector< LorentzVector > & mus_p4()
Definition: HWW.cc:367
double ww_mud0ValuePV(HWW &hww, unsigned int index)
T Abs(T a)
Definition: MathUtil.h:49
std::vector< int > & mus_charge()
Definition: HWW.cc:527
bool ww_mudZPV(HWW &hww, unsigned int i, float cut=0.1)
std::vector< int > & hyp_lt_id()
Definition: HWW.cc:589
std::vector< int > & trks_nlayers()
Definition: HWW.cc:59
std::vector< int > & mus_goodmask()
Definition: HWW.cc:551
std::vector< int > & hyp_ll_index()
Definition: HWW.cc:577
bool HWWFunctions::pass_electronSelection ( HWW hww,
const unsigned int  index,
const cuts_t  selectionType,
bool  applyAlignmentCorrection = false,
bool  removedEtaCutInEndcap = false,
bool  useGsfTrack = true 
)

Definition at line 19 of file electronSelections.cc.

References checkElectronSelections(), and electronSelection().

Referenced by fakableElectron(), goodElectronIsolated(), and ww_elId().

19  {
21  cuts_t cuts_passed = electronSelection(hww, index, applyAlignmentCorrection, removedEtaCutInEndcap, useGsfTrack);
22  if ( (cuts_passed & selectionType) == selectionType ) return true;
23  return false;
24  }
cuts_t electronSelection(HWW &, const unsigned int index, bool applyAlignmentCorrection=false, bool removedEtaCutInEndcap=false, bool useGsfTrack=true)
void checkElectronSelections(void)
uint64 cuts_t
bool HWWFunctions::pass_electronSelectionCompareMask ( const cuts_t  cuts_passed,
const cuts_t  selectionType 
)

Definition at line 14 of file electronSelections.cc.

14  {
15  if ((cuts_passed & selectionType) == selectionType) return true;
16  return false;
17  }
bool HWWFunctions::pass_electronSelectionCompareMask ( HWW ,
const cuts_t  cuts_passed,
const cuts_t  selectionType 
)
bool HWWFunctions::passBaseline ( HWW hww,
int  i_hyp,
EGammaMvaEleEstimator egammaMvaEleEstimator,
MuonMVAEstimator muonMVAEstimator 
)

Definition at line 107 of file analysisSelections.cc.

References funct::abs(), EleFOV4, fakableElectron(), fakableMuon(), goodElectronIsolated(), goodMuonIsolated(), HWW::hyp_ll_id(), HWW::hyp_ll_index(), HWW::hyp_lt_id(), HWW::hyp_lt_index(), cmsHarvester::index, MuFOV2, PASSED_LL_FINAL, PASSED_LL_FO_ELEV4, PASSED_LL_FO_MU2, PASSED_LT_FINAL, PASSED_LT_FO_ELEV4, PASSED_LT_FO_MU2, ww_elBase(), and ww_muBase().

Referenced by HWWAnalyzer::analyze().

107  {
108 
109  if (abs(hww.hyp_lt_id().at(i_hyp)) == 13 && !ww_muBase(hww, hww.hyp_lt_index().at(i_hyp)) ) return false;
110  if (abs(hww.hyp_ll_id().at(i_hyp)) == 13 && !ww_muBase(hww, hww.hyp_ll_index().at(i_hyp)) ) return false;
111  if (abs(hww.hyp_lt_id().at(i_hyp)) == 11 && !ww_elBase(hww, hww.hyp_lt_index().at(i_hyp)) ) return false;
112  if (abs(hww.hyp_ll_id().at(i_hyp)) == 11 && !ww_elBase(hww, hww.hyp_ll_index().at(i_hyp)) ) return false;
113 
114  bool lockToCoreSelectors = false;
115  bool useLHeleId = false;
116  int useMVAeleId = 1;//zero means off, otherwise it's the mva version
117  bool useMVAmuId = false;
118 
119  MuonIDMVA* muonIdMVA = 0;
120  std::vector<Int_t> nullMu; // null identified muons
121  std::vector<Int_t> nullEle; // null identified electrons
122 
123  bool PASSED_LT_FINAL = false;
124  bool PASSED_LT_FO_MU2 = false;
125  bool PASSED_LT_FO_ELEV4 = false;
126  bool PASSED_LL_FINAL = false;
127  bool PASSED_LL_FO_MU2 = false;
128  bool PASSED_LL_FO_ELEV4 = false;
129 
130  if (abs(hww.hyp_lt_id().at(i_hyp)) == 13){
131  unsigned int index = hww.hyp_lt_index().at(i_hyp);
132  if ( goodMuonIsolated(hww, index, lockToCoreSelectors, useMVAmuId, muonIdMVA, muonMVAEstimator, nullMu, nullEle) ) PASSED_LT_FINAL = true;
133  if ( fakableMuon(hww, index,MuFOV2, muonMVAEstimator, nullMu, nullEle) && !goodMuonIsolated(hww, index, lockToCoreSelectors, useMVAmuId, muonIdMVA, muonMVAEstimator, nullMu, nullEle)) PASSED_LT_FO_MU2 = true;
134  }
135  if (abs(hww.hyp_ll_id().at(i_hyp)) == 13){
136  unsigned int index = hww.hyp_ll_index().at(i_hyp);
137  if ( goodMuonIsolated(hww, index, lockToCoreSelectors, useMVAmuId, muonIdMVA, muonMVAEstimator, nullMu, nullEle) ) PASSED_LL_FINAL = true;
138  if ( fakableMuon(hww, index,MuFOV2, muonMVAEstimator, nullMu, nullEle) && !goodMuonIsolated(hww, index, lockToCoreSelectors, useMVAmuId, muonIdMVA, muonMVAEstimator, nullMu, nullEle)) PASSED_LL_FO_MU2 = true;
139  }
140  if (abs(hww.hyp_lt_id().at(i_hyp)) == 11){
141  unsigned int index = hww.hyp_lt_index().at(i_hyp);
142  if ( goodElectronIsolated(hww, index, useLHeleId, useMVAeleId, egammaMvaEleEstimator, lockToCoreSelectors) ) PASSED_LT_FINAL = true;
143  if ( fakableElectron(hww, index,EleFOV4) && !goodElectronIsolated(hww, index, useLHeleId, useMVAeleId, egammaMvaEleEstimator, lockToCoreSelectors)) PASSED_LT_FO_ELEV4 = true;
144  }
145  if (abs(hww.hyp_ll_id().at(i_hyp)) == 11){
146  unsigned int index = hww.hyp_ll_index().at(i_hyp);
147  if ( goodElectronIsolated(hww, index, useLHeleId, useMVAeleId, egammaMvaEleEstimator, lockToCoreSelectors) ) PASSED_LL_FINAL = true;
148  if ( fakableElectron(hww, index,EleFOV4) && !goodElectronIsolated(hww, index, useLHeleId, useMVAeleId, egammaMvaEleEstimator, lockToCoreSelectors)) PASSED_LL_FO_ELEV4 = true;
149  }
150 
151  if( PASSED_LT_FINAL && PASSED_LL_FINAL ) return true;
152  if( PASSED_LT_FINAL && PASSED_LL_FO_MU2 ) return true;
153  if( PASSED_LT_FINAL && PASSED_LL_FO_ELEV4 ) return true;
154  if( PASSED_LL_FINAL && PASSED_LT_FINAL ) return true;
155  if( PASSED_LL_FINAL && PASSED_LT_FO_MU2 ) return true;
156  if( PASSED_LL_FINAL && PASSED_LT_FO_ELEV4 ) return true;
157 
158  return false;
159  }
bool fakableElectron(HWW &hww, unsigned int i, EleFOTypes)
std::vector< int > & hyp_ll_id()
Definition: HWW.cc:585
bool goodElectronIsolated(HWW &hww, unsigned int i, bool useLHeleId, int useMVAeleId, EGammaMvaEleEstimator *egammaMvaEleEstimator, bool lockToCoreSelectors)
std::vector< int > & hyp_lt_index()
Definition: HWW.cc:581
bool fakableMuon(HWW &hww, unsigned int i, MuFOTypes, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool ww_elBase(HWW &hww, unsigned int i)
bool ww_muBase(HWW &hww, unsigned int i)
bool goodMuonIsolated(HWW &hww, unsigned int i, bool lockToCoreSelectors, bool useMVAmuId, MuonIDMVA *mva, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
std::vector< int > & hyp_lt_id()
Definition: HWW.cc:589
std::vector< int > & hyp_ll_index()
Definition: HWW.cc:577
bool HWWFunctions::passCharge ( HWW hww,
int  i_hyp 
)

Definition at line 101 of file analysisSelections.cc.

References HWW::hyp_ll_id(), and HWW::hyp_lt_id().

Referenced by doCutFlow().

101  {
102 
103  if (hww.hyp_lt_id().at(i_hyp)*hww.hyp_ll_id().at(i_hyp)>0) return false;
104  return true;
105  }
std::vector< int > & hyp_ll_id()
Definition: HWW.cc:585
std::vector< int > & hyp_lt_id()
Definition: HWW.cc:589
bool HWWFunctions::passDPhiDiLepJet ( HWW hww,
int  i_hyp 
)

Definition at line 242 of file analysisSelections.cc.

References first, getJets(), HWW::hyp_p4(), HWW::hyp_type(), numberOfJets(), and Pi.

Referenced by doCutFlow().

242  {
243 
244  //pass if em or me hypothesis
245  if(hww.hyp_type().at(i_hyp)==1) return true;
246  if(hww.hyp_type().at(i_hyp)==2) return true;
247 
248  int njets = numberOfJets(hww, i_hyp);
249  std::vector<JetPair> sortedJets = getJets(hww, i_hyp, 15.0, 4.7, true, false);
250 
251  if (sortedJets.size()>0) {
252  if (njets<2 && fabs(ROOT::Math::VectorUtil::DeltaPhi(sortedJets[0].first,hww.hyp_p4().at(i_hyp))) >= (165.*TMath::Pi()/180.)) return false;
253  else if ( (njets>= 2) && (fabs(ROOT::Math::VectorUtil::DeltaPhi( (sortedJets[0].first+sortedJets[1].first),hww.hyp_p4().at(i_hyp))) >= (165.*TMath::Pi()/180.)) ) return false;
254  else return true;
255  }
256  return true;
257 
258  }
const double Pi
std::vector< JetPair > getJets(HWW &hww, int, double, double, bool, bool)
unsigned int numberOfJets(HWW &hww, unsigned int)
std::vector< int > & hyp_type()
Definition: HWW.cc:601
bool first
Definition: L1TdeRCT.cc:75
std::vector< LorentzVector > & hyp_p4()
Definition: HWW.cc:565
bool HWWFunctions::passExtraLeptonVeto ( HWW hww,
int  i_hyp,
EGammaMvaEleEstimator egammaMvaEleEstimator,
MuonMVAEstimator muonMVAEstimator 
)

Definition at line 198 of file analysisSelections.cc.

References numberOfExtraLeptons().

Referenced by doCutFlow().

198  {
199 
200  bool useLHeleId = false;
201  int useMVAeleId = 1;//zero means off, otherwise it's the mva version
202  bool useMVAmuId = false;
203 
204  MuonIDMVA* muonIdMVA = 0;
205  std::vector<Int_t> nullMu; // null identified muons
206  std::vector<Int_t> nullEle; // null identified electrons
207 
208  return ( numberOfExtraLeptons(hww, i_hyp,10, useLHeleId, useMVAeleId, egammaMvaEleEstimator, useMVAmuId, muonIdMVA,muonMVAEstimator, nullMu, nullEle) == 0);
209 
210  }
unsigned int numberOfExtraLeptons(HWW &hww, int i_hyp, double minPt, bool useLHeleId, int useMVAeleId, EGammaMvaEleEstimator *egammaMvaEleEstimator, bool useMVAmuId, MuonIDMVA *mumva, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
bool HWWFunctions::passFirstCuts ( HWW hww,
int  i_hyp 
)

Definition at line 89 of file analysisSelections.cc.

References HWW::hyp_ll_p4(), HWW::hyp_lt_p4(), HWW::hyp_p4(), isGoodVertex(), bookConverter::max, min(), nGoodVertex(), and HWW::trks_d0().

Referenced by HWWAnalyzer::analyze().

89  {
90 
91  if ( std::min(hww.hyp_lt_p4().at(i_hyp).pt(),hww.hyp_ll_p4().at(i_hyp).pt())<10 ) return false;
92  if ( std::max(hww.hyp_lt_p4().at(i_hyp).pt(),hww.hyp_ll_p4().at(i_hyp).pt())<20 ) return false;
93  if (hww.trks_d0().size()==0) return false;
94  if (!isGoodVertex(hww, 0)) return false;
95  if (nGoodVertex(hww)<1) return false;
96  if (hww.hyp_p4().at(i_hyp).mass2()<0) return false;
97 
98  return true;
99  }
std::vector< float > & trks_d0()
Definition: HWW.cc:55
std::vector< LorentzVector > & hyp_ll_p4()
Definition: HWW.cc:569
T min(T a, T b)
Definition: MathUtil.h:58
unsigned int nGoodVertex(HWW &hww)
std::vector< LorentzVector > & hyp_p4()
Definition: HWW.cc:565
std::vector< LorentzVector > & hyp_lt_p4()
Definition: HWW.cc:573
bool isGoodVertex(HWW &hww, int)
bool HWWFunctions::passFullLep ( HWW hww,
int  i_hyp,
EGammaMvaEleEstimator egammaMvaEleEstimator,
MuonMVAEstimator muonMVAEstimator 
)

Definition at line 161 of file analysisSelections.cc.

References funct::abs(), goodElectronIsolated(), goodMuonIsolated(), HWW::hyp_ll_id(), HWW::hyp_ll_index(), HWW::hyp_lt_id(), HWW::hyp_lt_index(), cmsHarvester::index, PASSED_LL_FINAL, and PASSED_LT_FINAL.

Referenced by doCutFlow().

161  {
162 
163  bool lockToCoreSelectors = false;
164  bool useLHeleId = false;
165  int useMVAeleId = 1;//zero means off, otherwise it's the mva version
166  bool useMVAmuId = false;
167 
168  MuonIDMVA* muonIdMVA = 0;
169  std::vector<Int_t> nullMu; // null identified muons
170  std::vector<Int_t> nullEle; // null identified electrons
171 
172  bool PASSED_LT_FINAL = false;
173  bool PASSED_LL_FINAL = false;
174 
175  if (abs(hww.hyp_lt_id().at(i_hyp)) == 13){
176  unsigned int index = hww.hyp_lt_index().at(i_hyp);
177  if ( goodMuonIsolated(hww, index, lockToCoreSelectors, useMVAmuId, muonIdMVA, muonMVAEstimator, nullMu, nullEle) ) PASSED_LT_FINAL = true;
178  }
179  if (abs(hww.hyp_ll_id().at(i_hyp)) == 13){
180  unsigned int index = hww.hyp_ll_index().at(i_hyp);
181  if ( goodMuonIsolated(hww, index, lockToCoreSelectors, useMVAmuId, muonIdMVA, muonMVAEstimator, nullMu, nullEle) ) PASSED_LL_FINAL = true;
182  }
183  if (abs(hww.hyp_lt_id().at(i_hyp)) == 11){
184  unsigned int index = hww.hyp_lt_index().at(i_hyp);
185  if ( goodElectronIsolated(hww, index, useLHeleId, useMVAeleId, egammaMvaEleEstimator, lockToCoreSelectors) ) PASSED_LT_FINAL = true;
186  }
187  if (abs(hww.hyp_ll_id().at(i_hyp)) == 11){
188  unsigned int index = hww.hyp_ll_index().at(i_hyp);
189  if ( goodElectronIsolated(hww, index, useLHeleId, useMVAeleId, egammaMvaEleEstimator, lockToCoreSelectors) ) PASSED_LL_FINAL = true;
190  }
191 
192  if(PASSED_LT_FINAL && PASSED_LL_FINAL) return true;
193 
194  return false;
195  }
std::vector< int > & hyp_ll_id()
Definition: HWW.cc:585
bool goodElectronIsolated(HWW &hww, unsigned int i, bool useLHeleId, int useMVAeleId, EGammaMvaEleEstimator *egammaMvaEleEstimator, bool lockToCoreSelectors)
std::vector< int > & hyp_lt_index()
Definition: HWW.cc:581
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool goodMuonIsolated(HWW &hww, unsigned int i, bool lockToCoreSelectors, bool useMVAmuId, MuonIDMVA *mva, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
std::vector< int > & hyp_lt_id()
Definition: HWW.cc:589
std::vector< int > & hyp_ll_index()
Definition: HWW.cc:577
bool HWWFunctions::passLikelihoodId_v2 ( HWW hww,
unsigned int  index,
float  lhValue,
int  workingPoint 
)

Definition at line 339 of file electronSelections.cc.

References HWW::els_etaSC(), HWW::els_nSeed(), HWW::els_p4(), and RecoTauCleanerPlugins::pt.

Referenced by ww_elId().

340  {
341 
342  float etaSC = hww.els_etaSC().at(index);
343  float pt = hww.els_p4().at(index).Pt();
344  unsigned int nbrem = hww.els_nSeed().at(index);
345 
346  if ( workingPoint == 0 ) {
347 
348  if (pt > 20.0) {
349  if ( ( fabs(etaSC) < 1.479 && nbrem == 0 && lhValue > 3.5 ) ||
350  ( fabs(etaSC) < 1.479 && nbrem >= 1 && lhValue > 4.0 ) ||
351  ( fabs(etaSC) > 1.479 && nbrem == 0 && lhValue > 4.0 ) ||
352  ( fabs(etaSC) > 1.479 && nbrem >= 1 && lhValue > 4.0 )) return true;
353  } else if (pt > 10.0 && pt <= 20.0) {
354  if ( ( fabs(etaSC) < 1.479 && nbrem == 0 && lhValue > 4.0 ) ||
355  ( fabs(etaSC) < 1.479 && nbrem >= 1 && lhValue > 4.5 ) ||
356  ( fabs(etaSC) > 1.479 && nbrem == 0 && lhValue > 4.0 ) ||
357  ( fabs(etaSC) > 1.479 && nbrem >= 1 && lhValue > 4.0 )) return true;
358  }
359 
360  } else {
361  edm::LogError("InvalidInput") << "Error! Likelihood WP not supported: "
362  << workingPoint << ". Please choose 0 for Emanuele 8th September";
363  }
364 
365  return false;
366  }
std::vector< int > & els_nSeed()
Definition: HWW.cc:321
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
std::vector< float > & els_etaSC()
Definition: HWW.cc:117
bool HWWFunctions::passMinMet ( HWW hww,
int  i_hyp 
)

Definition at line 221 of file analysisSelections.cc.

References HWW::evt_pfmet(), HWW::evt_pfmetPhi(), min(), projectedMet(), HWW::trk_met(), and HWW::trk_metPhi().

Referenced by doCutFlow().

221  {
222 
223  double pmet = projectedMet(hww, i_hyp, hww.evt_pfmet(), hww.evt_pfmetPhi());
224  double pTrackMet = projectedMet(hww, i_hyp, hww.trk_met().at(i_hyp), hww.trk_metPhi().at(i_hyp) );
225  return(min(pmet,pTrackMet)>20);
226 
227  }
float & evt_pfmetPhi()
Definition: HWW.cc:643
std::vector< float > & trk_met()
Definition: HWW.cc:761
float & evt_pfmet()
Definition: HWW.cc:639
std::vector< float > & trk_metPhi()
Definition: HWW.cc:765
double projectedMet(HWW &hww, unsigned int i_hyp, double met, double phi)
T min(T a, T b)
Definition: MathUtil.h:58
bool HWWFunctions::passMinMet40 ( HWW hww,
int  i_hyp 
)

Definition at line 229 of file analysisSelections.cc.

References HWW::evt_pfmet(), HWW::evt_pfmetPhi(), HWW::hyp_type(), min(), projectedMet(), HWW::trk_met(), and HWW::trk_metPhi().

Referenced by doCutFlow().

229  {
230 
231  //require minMet > 40 GeV for ee and mm hypotheses
232 
233  if(hww.hyp_type().at(i_hyp) == 1) return true;
234  if(hww.hyp_type().at(i_hyp) == 2) return true;
235  double pmet = projectedMet(hww, i_hyp, hww.evt_pfmet(), hww.evt_pfmetPhi());
236  double pTrackMet = projectedMet(hww, i_hyp, hww.trk_met().at(i_hyp), hww.trk_metPhi().at(i_hyp) );
237  return(min(pmet,pTrackMet)>40);
238 
239  }
float & evt_pfmetPhi()
Definition: HWW.cc:643
std::vector< float > & trk_met()
Definition: HWW.cc:761
float & evt_pfmet()
Definition: HWW.cc:639
std::vector< float > & trk_metPhi()
Definition: HWW.cc:765
double projectedMet(HWW &hww, unsigned int i_hyp, double met, double phi)
T min(T a, T b)
Definition: MathUtil.h:58
std::vector< int > & hyp_type()
Definition: HWW.cc:601
bool HWWFunctions::passMuonRingsMVA ( HWW hww,
unsigned int  mu,
MuonMVAEstimator muonMVAEstimator,
std::vector< Int_t >  IdentifiedMu,
std::vector< Int_t >  IdentifiedEle 
)

Definition at line 734 of file analysisSelections.cc.

References eta(), HWW::evt_ww_rho(), edm::false, MuonEffectiveArea::kMuEAFall11MC, HWW::mus_trk_p4(), MuonMVAEstimator::mvaValueIso(), and RecoTauCleanerPlugins::pt.

Referenced by ww_muIso().

735  {
736  double mvavalue = muonMVAEstimator->mvaValueIso(hww, mu, hww.evt_ww_rho(), MuonEffectiveArea::kMuEAFall11MC,
737  IdentifiedEle, IdentifiedMu, false );
738 
739  double pt = hww.mus_trk_p4().at(mu).pt();
740  double eta = hww.mus_trk_p4().at(mu).eta();
741 
742  if( pt>20 ) {
743  if( fabs(eta)>=1.479 && fabs(eta)<2.4 && mvavalue>0.86 ) return true;
744  if( fabs(eta)<1.479 && mvavalue>0.82 ) return true;
745  return false;
746  }
747  else {
748  if( fabs(eta)>=1.479 && fabs(eta)<2.4 && mvavalue>0.82 ) return true;
749  if( fabs(eta)<1.479 && mvavalue>0.86 ) return true;
750  return false;
751  }
752  }
T eta() const
std::vector< LorentzVector > & mus_trk_p4()
Definition: HWW.cc:371
Double_t mvaValueIso(HWW &, Int_t imu, Double_t rho, MuonEffectiveArea::MuonEffectiveAreaTarget EATarget, std::vector< Int_t > IdentifiedEle, std::vector< Int_t > IdentifiedMu, Bool_t printDebug)
const int mu
Definition: Constants.h:22
float & evt_ww_rho()
Definition: HWW.cc:627
volatile std::atomic< bool > shutdown_flag false
bool HWWFunctions::passMuonRingsMVAFO ( HWW hww,
unsigned int  mu,
MuonMVAEstimator muonMVAEstimator,
std::vector< Int_t >  IdentifiedMu,
std::vector< Int_t >  IdentifiedEle 
)

Definition at line 754 of file analysisSelections.cc.

References HWW::evt_ww_rho(), edm::false, MuonEffectiveArea::kMuEAFall11MC, and MuonMVAEstimator::mvaValueIso().

Referenced by goodMuonWithoutIsolation(), and MuonFOV2().

755  {
756  double mvavalue = muonMVAEstimator->mvaValueIso(hww, mu, hww.evt_ww_rho(), MuonEffectiveArea::kMuEAFall11MC,
757  IdentifiedEle, IdentifiedMu, false );
758 
759  if( mvavalue>-0.6 ) return true;
760  return false;
761  }
Double_t mvaValueIso(HWW &, Int_t imu, Double_t rho, MuonEffectiveArea::MuonEffectiveAreaTarget EATarget, std::vector< Int_t > IdentifiedEle, std::vector< Int_t > IdentifiedMu, Bool_t printDebug)
const int mu
Definition: Constants.h:22
float & evt_ww_rho()
Definition: HWW.cc:627
volatile std::atomic< bool > shutdown_flag false
bool HWWFunctions::passMVAJetId ( double  corjetpt,
double  jeteta,
double  mvavalue,
unsigned int  tightness 
)

Definition at line 326 of file analysisSelections.cc.

Referenced by getJets(), and toptag().

327  {
328  if(tightness>2)
329  {
330  edm::LogError("InvalidParameter") << "ERROR : tightness should be 0, 1, or 2. ";
331  return false;
332  }
333 
334  double fMVACut[3][4][4];
335 
336  //Tight Id
337  fMVACut[0][0][0] = 0.5; fMVACut[0][0][1] = 0.6; fMVACut[0][0][2] = 0.6; fMVACut[0][0][3] = 0.9;
338  fMVACut[0][1][0] = -0.2; fMVACut[0][1][1] = 0.2; fMVACut[0][1][2] = 0.2; fMVACut[0][1][3] = 0.6;
339  fMVACut[0][2][0] = 0.3; fMVACut[0][2][1] = 0.4; fMVACut[0][2][2] = 0.7; fMVACut[0][2][3] = 0.8;
340  fMVACut[0][3][0] = 0.5; fMVACut[0][3][1] = 0.4; fMVACut[0][3][2] = 0.8; fMVACut[0][3][3] = 0.9;
341  //Medium id
342  fMVACut[1][0][0] = 0.2; fMVACut[1][0][1] = 0.4; fMVACut[1][0][2] = 0.2; fMVACut[1][0][3] = 0.6;
343  fMVACut[1][1][0] = -0.3; fMVACut[1][1][1] = 0. ; fMVACut[1][1][2] = 0. ; fMVACut[1][1][3] = 0.5;
344  fMVACut[1][2][0] = 0.2; fMVACut[1][2][1] = 0.2; fMVACut[1][2][2] = 0.5; fMVACut[1][2][3] = 0.7;
345  fMVACut[1][3][0] = 0.3; fMVACut[1][3][1] = 0.2; fMVACut[1][3][2] = 0.7; fMVACut[1][3][3] = 0.8;
346  //Loose Id
347  fMVACut[2][0][0] = -0.2; fMVACut[2][0][1] = 0. ; fMVACut[2][0][2] = 0.2; fMVACut[2][0][3] = 0.5;
348  fMVACut[2][1][0] = -0.4; fMVACut[2][1][1] = -0.4; fMVACut[2][1][2] = -0.4; fMVACut[2][1][3] = 0.4;
349  fMVACut[2][2][0] = 0. ; fMVACut[2][2][1] = 0. ; fMVACut[2][2][2] = 0.2; fMVACut[2][2][3] = 0.6;
350  fMVACut[2][3][0] = 0. ; fMVACut[2][3][1] = 0. ; fMVACut[2][3][2] = 0.6; fMVACut[2][3][3] = 0.2;
351 
352  // pT categorization
353  int ptId = 0;
354  if( corjetpt > 10 && corjetpt < 20 ) ptId = 1;
355  if( corjetpt > 20 && corjetpt < 30 ) ptId = 2;
356  if( corjetpt > 30 ) ptId = 3;
357 
358  // eta categorization
359  int etaId = 0;
360  if( fabs(jeteta) > 2.5 && fabs(jeteta) < 2.75 ) etaId = 1;
361  if( fabs(jeteta) > 2.75 && fabs(jeteta) < 3.0 ) etaId = 2;
362  if( fabs(jeteta) > 3.0 && fabs(jeteta) < 5.0 ) etaId = 3;
363 
364  // return
365  if( mvavalue > fMVACut[tightness][ptId][etaId] ) return true;
366  return false;
367  }
bool HWWFunctions::passSoftMuonVeto ( HWW hww,
int  i_hyp 
)

Definition at line 261 of file analysisSelections.cc.

References numberOfSoftMuons().

Referenced by doCutFlow().

261  {
262 
263  return(numberOfSoftMuons(hww, i_hyp,true)==0);
264 
265  }
unsigned int numberOfSoftMuons(HWW &hww, int i_hyp, bool nonisolated)
bool HWWFunctions::passTopVeto ( HWW hww,
int  i_hyp 
)

Definition at line 268 of file analysisSelections.cc.

References toptag().

Referenced by doCutFlow().

268  {
269 
270  return(!toptag(hww, i_hyp, 10));
271 
272  }
bool toptag(HWW &hww, int i_hyp, double minPt, std::vector< JetPair > ignoreJets=std::vector< JetPair >())
bool HWWFunctions::passZVeto ( HWW hww,
int  i_hyp 
)

Definition at line 212 of file analysisSelections.cc.

References HWW::hyp_p4(), and HWW::hyp_type().

Referenced by doCutFlow().

212  {
213 
214  if(hww.hyp_type().at(i_hyp) == 1 || hww.hyp_type().at(i_hyp) == 2) return true; //em or me dileptons have no cut on the z mass
215  if(fabs(hww.hyp_p4().at(i_hyp).mass() - 91.1876) > 15.0) return true;
216  return false;
217 
218  }
std::vector< int > & hyp_type()
Definition: HWW.cc:601
std::vector< LorentzVector > & hyp_p4()
Definition: HWW.cc:565
int HWWFunctions::primaryVertex ( )
double HWWFunctions::projectedMet ( HWW hww,
unsigned int  i_hyp,
double  met,
double  phi 
)

Definition at line 866 of file analysisSelections.cc.

References CaloMET_cfi::met, nearestDeltaPhi(), and Pi.

Referenced by passMinMet(), and passMinMet40().

867  {
868  double DeltaPhi = nearestDeltaPhi(hww, phi,i_hyp);
869  if (DeltaPhi < TMath::Pi()/2) return met*TMath::Sin(DeltaPhi);
870  return met;
871  }
const double Pi
tuple met
____________________________________________________________________________||
Definition: CaloMET_cfi.py:4
double nearestDeltaPhi(HWW &hww, double Phi, int i_hyp)
Definition: DDAxes.h:10
bool HWWFunctions::sortByPFJetPt ( const std::pair< LorentzVector, Int_t > &  pfjet1,
const std::pair< LorentzVector, Int_t > &  pfjet2 
)

Definition at line 9 of file pfjetMVAtools.cc.

Referenced by getGoodMVAs().

10  {
11  return pfjet1.first.pt() > pfjet2.first.pt();
12  }
bool HWWFunctions::toptag ( HWW hww,
int  i_hyp,
double  minPt,
std::vector< JetPair ignoreJets = std::vector<JetPair>() 
)

Definition at line 875 of file analysisSelections.cc.

References Abs(), defaultBTag(), getGoodMVAs(), HWW::hyp_ll_p4(), HWW::hyp_lt_p4(), i, patTestJEC_cfi::jec, passMVAJetId(), HWW::pfjets_JEC(), and HWW::pfjets_p4().

Referenced by passTopVeto().

876  {
877  const double vetoCone = 0.3;
878  // bug fix for mva jet id
879  vector <float> fixedpfjetmva_analsel; getGoodMVAs(hww, fixedpfjetmva_analsel, "mvavalue");
880 
881  for ( unsigned int i=0; i < hww.pfjets_p4().size(); ++i) {
882 
883  if ( hww.pfjets_p4().at(i).pt() < minPt ) continue;
884  bool ignoreJet = false;
885  for ( std::vector<JetPair>::const_iterator ijet = ignoreJets.begin();
886  ijet != ignoreJets.end(); ++ijet )
887  if ( TMath::Abs(ROOT::Math::VectorUtil::DeltaR(ijet->first,hww.pfjets_p4().at(i))) < vetoCone ) ignoreJet=true;
888  if ( ignoreJet ) continue;
889 
890  if ( TMath::Abs(ROOT::Math::VectorUtil::DeltaR(hww.hyp_lt_p4().at(i_hyp),hww.pfjets_p4().at(i))) < vetoCone ||
891  TMath::Abs(ROOT::Math::VectorUtil::DeltaR(hww.hyp_ll_p4().at(i_hyp),hww.pfjets_p4().at(i))) < vetoCone ) continue;
892 
893  double jec = hww.pfjets_JEC().at(i);
894 
895  if ( !passMVAJetId( hww.pfjets_p4().at(i).pt() * jec, hww.pfjets_p4().at(i).eta(), fixedpfjetmva_analsel[i], 2) ) continue;
896 
897  if ( !defaultBTag(hww, i, jec) ) continue;
898 
899  return true;
900  }
901  return false;
902  }
int i
Definition: DBlmapReader.cc:9
bool passMVAJetId(double, double, double, unsigned int)
bool defaultBTag(HWW &hww, unsigned int, float)
std::vector< LorentzVector > & hyp_ll_p4()
Definition: HWW.cc:569
T Abs(T a)
Definition: MathUtil.h:49
bool getGoodMVAs(HWW &, std::vector< float > &goodmvas, std::string variable)
std::vector< LorentzVector > & hyp_lt_p4()
Definition: HWW.cc:573
std::vector< float > & pfjets_JEC()
Definition: HWW.cc:781
std::vector< LorentzVector > & pfjets_p4()
Definition: HWW.cc:769
std::pair< double, double > HWWFunctions::trks_d0_pv ( HWW hww,
int  itrk,
int  ipv 
)

Definition at line 8 of file trackSelections.cc.

References funct::cos(), phi, funct::sin(), mathSSE::sqrt(), HWW::trks_d0(), HWW::trks_d0Err(), HWW::trks_d0phiCov(), HWW::trks_phiErr(), HWW::trks_trk_p4(), HWW::vtxs_covMatrix(), and HWW::vtxs_position().

Referenced by MuonIDMVA::MVAValue().

9  {
10  // assume the layout of the covariance matrix is (Vxx, Vxy, Vxz)
11  // (Vyx, Vyy, ...)
12  const double bx = hww.vtxs_position().at(ipv).x() ;
13  const double by = hww.vtxs_position().at(ipv).y() ;
14  const double vxx = hww.vtxs_covMatrix().at(ipv).at(0);
15  const double vxy = hww.vtxs_covMatrix().at(ipv).at(1);
16  const double vyy = hww.vtxs_covMatrix().at(ipv).at(4);
17 
18  const double phi = hww.trks_trk_p4().at(itrk).phi();
19  const double d0vtx = hww.trks_d0().at(itrk) - bx * sin(phi) + by * cos(phi);
20  const double d0err = hww.trks_d0Err().at(itrk);
21  const double phierr = hww.trks_phiErr().at(itrk);
22  const double d0phicov = hww.trks_d0phiCov().at(itrk);
23 
24  // we will let the optimizer take care of subexpression
25  // elimination for this one...
26  const double d0err2vtx = d0err * d0err
27  - 2 * (bx * cos(phi) + by * sin(phi)) * d0phicov
28  + (bx * cos(phi) + by * sin(phi)) * (bx * cos(phi) + by * sin(phi)) * phierr * phierr
29  + sin(phi) * sin(phi) * vxx + cos(phi) * cos(phi) * vyy
30  - 2 * sin(phi) * cos(phi) * vxy;
31  if (d0err2vtx >= 0)
32  return std::pair<double, double>(d0vtx, sqrt(d0err2vtx));
33 
34  edm::LogError("NegativeValue") << "Oh no! sigma^2(d0corr) < 0!";
35  return std::pair<double, double>(d0vtx, -sqrt(-d0err2vtx));
36  }
std::vector< float > & trks_phiErr()
Definition: HWW.cc:83
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< LorentzVector > & trks_trk_p4()
Definition: HWW.cc:39
std::vector< std::vector< float > > & vtxs_covMatrix()
Definition: HWW.cc:33
std::vector< float > & trks_d0()
Definition: HWW.cc:55
T sqrt(T t)
Definition: SSEVec.h:48
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
std::vector< float > & trks_d0phiCov()
Definition: HWW.cc:87
std::vector< float > & trks_d0Err()
Definition: HWW.cc:79
Definition: DDAxes.h:10
std::pair< double, double > HWWFunctions::trks_dz_pv ( HWW hww,
int  itrk,
int  ipv 
)

Definition at line 70 of file trackSelections.cc.

References funct::cos(), relativeConstraints::error, phi, funct::sin(), mathSSE::sqrt(), funct::tan(), theta(), HWW::trks_etaErr(), HWW::trks_phiErr(), HWW::trks_trk_p4(), HWW::trks_z0(), HWW::trks_z0Err(), relativeConstraints::value, HWW::vtxs_position(), HWW::vtxs_xError(), HWW::vtxs_yError(), and HWW::vtxs_zError().

Referenced by electronIsoValuePF(), muonIsoValuePF(), and MuonMVAEstimator::mvaValueIso().

71  {
72 
73 
74  LorentzVector pv = hww.vtxs_position().at(ipv);
75  double pvxErr = hww.vtxs_xError().at(ipv) ;
76  double pvyErr = hww.vtxs_yError().at(ipv) ;
77  double pvzErr = hww.vtxs_zError().at(ipv) ;
78  double phi = hww.trks_trk_p4().at(itrk).phi();
79  double theta = hww.trks_trk_p4().at(itrk).theta();
80  double ddzdpvx = cos(phi)*1./tan(theta);
81  double ddzdpvy = sin(phi)*1./tan(theta);
82  double ddzdphi = -1*pv.x()*sin(phi)*1./tan(theta) + pv.y()*cos(phi)*1./tan(theta);
83  double ddzdtheta = -1*1/sin(theta)*1/sin(theta) * (pv.x()*cos(phi) + pv.y()*sin(phi));
84 
85  ddzdpvx *= ddzdpvx;
86  ddzdpvy *= ddzdpvy;
87  ddzdphi *= ddzdphi;
88  ddzdtheta *= ddzdtheta;
89 
90  double z0Err = hww.trks_z0Err().at(itrk);
91  double phiErr = hww.trks_phiErr().at(itrk);
92  double thetaErr = hww.trks_etaErr().at(itrk)*sin(theta);
93 
94  z0Err *= z0Err;
95  phiErr *= phiErr;
96  thetaErr *= thetaErr;
97  pvxErr *= pvxErr;
98  pvyErr *= pvyErr;
99  pvzErr *= pvzErr;
100 
101  double value = hww.trks_z0().at(itrk) - pv.z() + (pv.x()*cos(phi) + pv.y()*sin(phi) )*1./tan(theta);
102 
103  //note that the error does not account for correlations since we do not store the track covariance matrix
104  double error = sqrt(z0Err + pvzErr + ddzdpvx*pvxErr + ddzdpvy*pvyErr + ddzdphi*phiErr + ddzdtheta*thetaErr);
105 
106  return std::pair<double, double>(value, error);
107  }
std::vector< float > & trks_phiErr()
Definition: HWW.cc:83
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< LorentzVector > & trks_trk_p4()
Definition: HWW.cc:39
Geom::Theta< T > theta() const
std::vector< float > & vtxs_zError()
Definition: HWW.cc:29
std::vector< float > & trks_z0Err()
Definition: HWW.cc:71
std::vector< float > & trks_z0()
Definition: HWW.cc:67
T sqrt(T t)
Definition: SSEVec.h:48
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
std::vector< float > & trks_etaErr()
Definition: HWW.cc:75
std::vector< float > & vtxs_xError()
Definition: HWW.cc:21
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > LorentzVector
Definition: analysisEnums.h:9
std::vector< float > & vtxs_yError()
Definition: HWW.cc:25
Definition: DDAxes.h:10
bool HWWFunctions::ww_elBase ( HWW hww,
unsigned int  i 
)

Definition at line 542 of file analysisSelections.cc.

References HWW::els_p4().

Referenced by ElectronFOV4(), goodElectronIsolated(), goodElectronWithoutIsolation(), and passBaseline().

542  {
543  if (hww.els_p4().at(index).pt() < 10.0) return false;
544  if (fabs(hww.els_p4().at(index).eta()) > 2.5) return false;
545  return true;
546  }
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
bool HWWFunctions::ww_eld0 ( HWW hww,
unsigned int  i 
)

Definition at line 569 of file analysisSelections.cc.

References HWW::els_d0corr().

569  {
570  return fabs(hww.els_d0corr().at(index)) < 0.02;
571  }
std::vector< float > & els_d0corr()
Definition: HWW.cc:141
bool HWWFunctions::ww_eld0PV ( HWW hww,
unsigned int  i 
)

Definition at line 574 of file analysisSelections.cc.

References funct::cos(), HWW::els_d0(), HWW::els_trk_p4(), primaryVertex(), funct::sin(), and HWW::vtxs_position().

Referenced by ElectronFOV4(), getExtraLeptons(), goodElectronIsolated(), and goodElectronWithoutIsolation().

574  {
575  int vtxIndex = primaryVertex();
576  if (vtxIndex<0) return false;
577  double dxyPV = hww.els_d0().at(index)-
578  hww.vtxs_position().at(vtxIndex).x()*sin(hww.els_trk_p4().at(index).phi())+
579  hww.vtxs_position().at(vtxIndex).y()*cos(hww.els_trk_p4().at(index).phi());
580  return fabs(dxyPV) < 0.02;
581  }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< float > & els_d0()
Definition: HWW.cc:145
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
std::vector< LorentzVector > & els_trk_p4()
Definition: HWW.cc:105
bool HWWFunctions::ww_eldZPV ( HWW hww,
unsigned int  i 
)

Definition at line 583 of file analysisSelections.cc.

References dzPV(), HWW::els_trk_p4(), HWW::els_vertex_p4(), primaryVertex(), and HWW::vtxs_position().

Referenced by ElectronFOV4(), goodElectronIsolated(), and goodElectronWithoutIsolation().

583  {
584  int vtxIndex = primaryVertex();
585  if (vtxIndex<0) return false;
586  double dzpv = dzPV(hww.els_vertex_p4().at(index), hww.els_trk_p4().at(index), hww.vtxs_position().at(vtxIndex));
587  return fabs(dzpv)<0.1;
588  }
std::vector< LorentzVector > & els_vertex_p4()
Definition: HWW.cc:109
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
double dzPV(const LorentzVector &vtx, const LorentzVector &p4, const LorentzVector &pv)
std::vector< LorentzVector > & els_trk_p4()
Definition: HWW.cc:105
bool HWWFunctions::ww_elId ( HWW hww,
unsigned int  i,
bool  useLHeleId,
int  useMVAeleId,
EGammaMvaEleEstimator egammaMvaEleEstimator 
)

Definition at line 549 of file analysisSelections.cc.

References electronSelection_smurfV3_id, ELEID_ID, HWW::els_exp_innerlayers(), HWW::els_lh(), HWW::els_p4(), goodElectronTMVA(), isFromConversionMIT(), pass_electronSelection(), and passLikelihoodId_v2().

Referenced by getExtraLeptons(), goodElectronIsolated(), and goodElectronWithoutIsolation().

549  {
550 
551  if (useLHeleId) {
552  if (hww.els_p4().at(index).pt()>20 && (passLikelihoodId_v2(hww, index,hww.els_lh().at(index),0) & (1<<ELEID_ID))!=(1<<ELEID_ID) ) return false;
553  if (hww.els_p4().at(index).pt()<20 && (passLikelihoodId_v2(hww, index,hww.els_lh().at(index),0) & (1<<ELEID_ID))!=(1<<ELEID_ID) ) return false;
554  }
555  if (useMVAeleId>0){
556  if (!goodElectronTMVA(hww, egammaMvaEleEstimator, useMVAeleId, index)) return false;
557  } else {
558  if (!pass_electronSelection(hww, index, electronSelection_smurfV3_id, false, false) ) return false;
559  }
560 
561  // MIT conversion
562  if ( isFromConversionMIT(hww, index) ) return false;
563  // conversion rejection - hit based
564  if ( hww.els_exp_innerlayers().at(index) > 0 ) return false;
565 
566  return true;
567  }
std::vector< int > & els_exp_innerlayers()
Definition: HWW.cc:337
bool passLikelihoodId_v2(HWW &, unsigned int index, float lhValue, int workingPoint)
bool goodElectronTMVA(HWW &hww, EGammaMvaEleEstimator *egammaMvaEleEstimator, int useMVAeleId, unsigned int i)
static const cuts_t electronSelection_smurfV3_id
std::vector< float > & els_lh()
Definition: HWW.cc:113
std::vector< LorentzVector > & els_p4()
Definition: HWW.cc:101
bool pass_electronSelection(HWW &, const unsigned int index, const cuts_t selectionType, bool applyAlignmentCorrection=false, bool removedEtaCutInEndcap=false, bool useGsfTrack=true)
bool isFromConversionMIT(HWW &, const unsigned int index)
bool HWWFunctions::ww_elIso ( HWW hww,
unsigned int  i 
)

Definition at line 594 of file analysisSelections.cc.

References ww_elIsoVal().

Referenced by getExtraLeptons(), and goodElectronIsolated().

594  {
595  float pfiso = ww_elIsoVal(hww, index);
596  return pfiso<0.15;
597  }
double ww_elIsoVal(HWW &hww, unsigned int i)
double HWWFunctions::ww_elIsoVal ( HWW hww,
unsigned int  i 
)

Definition at line 590 of file analysisSelections.cc.

References electronIsoValuePF2012_FastJetEffArea_HWW().

Referenced by ww_elIso().

590  {
592  }
float electronIsoValuePF2012_FastJetEffArea_HWW(HWW &, int index)
bool HWWFunctions::ww_muBase ( HWW hww,
unsigned int  i 
)

Definition at line 604 of file analysisSelections.cc.

References HWW::mus_p4(), and HWW::mus_type().

Referenced by goodMuonIsolated(), goodMuonWithoutIsolation(), MuonFOV2(), and passBaseline().

604  {
605  if (hww.mus_p4().at(index).pt() < 10.0) return false;
606  if (fabs(hww.mus_p4().at(index).eta()) > 2.4) return false;
607  if (hww.mus_type().at(index) == 8) return false; // not STA
608  return true;
609  }
std::vector< LorentzVector > & mus_p4()
Definition: HWW.cc:367
std::vector< int > & mus_type()
Definition: HWW.cc:555
bool HWWFunctions::ww_mud0 ( HWW hww,
unsigned int  i 
)

Definition at line 611 of file analysisSelections.cc.

References HWW::mus_d0corr().

611  {
612  return fabs(hww.mus_d0corr().at(index)) < 0.02;
613  }
std::vector< float > & mus_d0corr()
Definition: HWW.cc:399
bool HWWFunctions::ww_mud0PV ( HWW hww,
unsigned int  i 
)

Definition at line 624 of file analysisSelections.cc.

References HWW::mus_p4(), and ww_mud0ValuePV().

Referenced by getExtraLeptons(), goodMuonIsolated(), and goodMuonWithoutIsolation().

624  {
625  if ( hww.mus_p4().at(index).pt() < 20. ) return ww_mud0ValuePV(hww, index) < 0.01;
626  return ww_mud0ValuePV(hww, index) < 0.02;
627  }
std::vector< LorentzVector > & mus_p4()
Definition: HWW.cc:367
double ww_mud0ValuePV(HWW &hww, unsigned int index)
double HWWFunctions::ww_mud0ValuePV ( HWW hww,
unsigned int  index 
)

Definition at line 615 of file analysisSelections.cc.

References funct::cos(), HWW::mus_d0(), HWW::mus_trk_p4(), primaryVertex(), funct::sin(), and HWW::vtxs_position().

Referenced by MuonFOV2(), numberOfSoftMuons(), and ww_mud0PV().

615  {
616  int vtxIndex = primaryVertex();
617  if (vtxIndex<0) return 9999;
618  double dxyPV = hww.mus_d0().at(index)-
619  hww.vtxs_position().at(vtxIndex).x()*sin(hww.mus_trk_p4().at(index).phi())+
620  hww.vtxs_position().at(vtxIndex).y()*cos(hww.mus_trk_p4().at(index).phi());
621  return fabs(dxyPV);
622  }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< LorentzVector > & mus_trk_p4()
Definition: HWW.cc:371
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
std::vector< float > & mus_d0()
Definition: HWW.cc:403
bool HWWFunctions::ww_mudZPV ( HWW hww,
unsigned int  i,
float  cut = 0.1 
)

Definition at line 629 of file analysisSelections.cc.

References GOODCOLL_filter_cfg::cut, dzPV(), HWW::mus_trk_p4(), HWW::mus_vertex_p4(), primaryVertex(), and HWW::vtxs_position().

Referenced by goodMuonIsolated(), goodMuonWithoutIsolation(), MuonFOV2(), and numberOfSoftMuons().

629  {
630  int vtxIndex = primaryVertex();
631  if (vtxIndex<0) return false;
632  double dzpv = dzPV(hww.mus_vertex_p4().at(index), hww.mus_trk_p4().at(index), hww.vtxs_position().at(vtxIndex));
633  return fabs(dzpv)<cut;
634  }
std::vector< LorentzVector > & mus_trk_p4()
Definition: HWW.cc:371
std::vector< LorentzVector > & vtxs_position()
Definition: HWW.cc:5
double dzPV(const LorentzVector &vtx, const LorentzVector &p4, const LorentzVector &pv)
std::vector< LorentzVector > & mus_vertex_p4()
Definition: HWW.cc:375
bool HWWFunctions::ww_muId ( HWW hww,
unsigned int  i,
bool  useMVAmuId,
MuonIDMVA mva 
)

Definition at line 636 of file analysisSelections.cc.

References goodMuonTMVA(), HWW::mus_gfit_chi2(), HWW::mus_gfit_ndof(), HWW::mus_gfit_validSTAHits(), HWW::mus_nmatches(), HWW::mus_pid_PFMuon(), HWW::mus_pid_TMLastStationTight(), HWW::mus_ptErr(), HWW::mus_trk_p4(), HWW::mus_trkidx(), HWW::mus_trkKink(), HWW::mus_type(), HWW::trks_nlayers(), and HWW::trks_valid_pixelhits().

Referenced by getExtraLeptons(), goodMuonIsolated(), and goodMuonWithoutIsolation().

636  {
637  if (useMVAmuId){
638  if (!goodMuonTMVA(hww, mva,index)) return false;
639  return true;
640  }
641 
642  if (((hww.mus_type().at(index)) & (1<<2)) == 0) return false; // tracker muon
643  if (hww.trks_nlayers().at(hww.mus_trkidx().at(index)) < 6) return false; // # of tracker hits
644  if (hww.mus_ptErr().at(index)/hww.mus_trk_p4().at(index).pt()>0.1) return false; // Does pt come from track?
645  if (hww.trks_valid_pixelhits().at(hww.mus_trkidx().at(index))==0) return false;
646  if (hww.mus_trkKink().at(index) > 20.) return false; //kink finder
647  if (!hww.mus_pid_PFMuon().at(index)) return false; // should be a pfmuon
648  // global muon
649  bool goodMuonGlobalMuon = false;
650  if (((hww.mus_type().at(index)) & (1<<1)) == (1<<1)){
651  goodMuonGlobalMuon = true;
652  if (hww.mus_gfit_chi2().at(index)/hww.mus_gfit_ndof().at(index) >= 10) goodMuonGlobalMuon = false; //glb fit chisq
653  if (hww.mus_gfit_validSTAHits().at(index)==0 ) goodMuonGlobalMuon = false;
654  if (hww.mus_nmatches().at(index)<2) goodMuonGlobalMuon = false;
655  }
656  return goodMuonGlobalMuon ||
657  hww.mus_pid_TMLastStationTight().at(index) == 1; // TM id
658  }
std::vector< int > & mus_pid_PFMuon()
Definition: HWW.cc:539
std::vector< int > & trks_valid_pixelhits()
Definition: HWW.cc:63
std::vector< float > & mus_gfit_chi2()
Definition: HWW.cc:383
std::vector< int > & mus_pid_TMLastStationTight()
Definition: HWW.cc:543
std::vector< int > & mus_trkidx()
Definition: HWW.cc:535
std::vector< float > & mus_ptErr()
Definition: HWW.cc:391
std::vector< int > & mus_nmatches()
Definition: HWW.cc:547
bool goodMuonTMVA(HWW &hww, MuonIDMVA *mva, unsigned int i)
std::vector< int > & mus_gfit_validSTAHits()
Definition: HWW.cc:515
std::vector< LorentzVector > & mus_trk_p4()
Definition: HWW.cc:371
std::vector< float > & mus_gfit_ndof()
Definition: HWW.cc:387
std::vector< float > & mus_trkKink()
Definition: HWW.cc:395
std::vector< int > & trks_nlayers()
Definition: HWW.cc:59
std::vector< int > & mus_type()
Definition: HWW.cc:555
bool HWWFunctions::ww_muIso ( HWW hww,
unsigned int  i 
)

Definition at line 668 of file analysisSelections.cc.

References Abs(), muonIsoValuePF(), and HWW::mus_p4().

Referenced by getExtraLeptons(), and goodMuonIsolated().

668  {
669  if (hww.mus_p4().at(index).pt()>20) {
670  if (TMath::Abs(hww.mus_p4().at(index).eta())<1.479)
671  return muonIsoValuePF(hww, index,0,0.3) < 0.13;
672  else
673  return muonIsoValuePF(hww, index,0,0.3) < 0.09;
674  } else {
675  if (TMath::Abs(hww.mus_p4().at(index).eta())<1.479)
676  return muonIsoValuePF(hww, index,0,0.3) < 0.06;
677  else
678  return muonIsoValuePF(hww, index,0,0.3) < 0.05;
679  }
680  }
std::vector< LorentzVector > & mus_p4()
Definition: HWW.cc:367
T Abs(T a)
Definition: MathUtil.h:49
double muonIsoValuePF(HWW &, unsigned int imu, unsigned int ivtx, float coner=0.4, float minptn=1.0, float dzcut=0.1, int filterId=0)
bool HWWFunctions::ww_muIso ( HWW hww,
unsigned int  i,
MuonMVAEstimator muonMVAEstimator,
std::vector< Int_t >  IdentifiedMu,
std::vector< Int_t >  IdentifiedEle 
)

Definition at line 682 of file analysisSelections.cc.

References passMuonRingsMVA().

682  {
683  return passMuonRingsMVA(hww, index, muonMVAEstimator, IdentifiedMu, IdentifiedEle);
684  }
bool passMuonRingsMVA(HWW &hww, unsigned int mu, MuonMVAEstimator *muonMVAEstimator, std::vector< Int_t > IdentifiedMu, std::vector< Int_t > IdentifiedEle)
double HWWFunctions::ww_muIsoVal ( HWW hww,
unsigned int  i 
)

Definition at line 660 of file analysisSelections.cc.

References HWW::mus_iso03_emEt(), HWW::mus_iso03_hadEt(), HWW::mus_iso03_sumPt(), HWW::mus_p4(), and RecoTauCleanerPlugins::pt.

Referenced by numberOfSoftMuons().

660  {
661  double sum = hww.mus_iso03_sumPt().at(index) +
662  hww.mus_iso03_emEt().at(index) +
663  hww.mus_iso03_hadEt().at(index);
664  double pt = hww.mus_p4().at(index).pt();
665  return sum/pt;
666  }
std::vector< LorentzVector > & mus_p4()
Definition: HWW.cc:367
std::vector< float > & mus_iso03_hadEt()
Definition: HWW.cc:467
std::vector< float > & mus_iso03_sumPt()
Definition: HWW.cc:459
std::vector< float > & mus_iso03_emEt()
Definition: HWW.cc:463

Variable Documentation

const cuts_t HWWFunctions::electronSelection_smurfV2
static
Initial value:
=
static const cuts_t electronSelection_smurfV2_baseline
static const cuts_t electronSelection_smurfV2_id
static const cuts_t electronSelection_smurfV2_iso

Definition at line 411 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_smurfV2_baseline
static
Initial value:
=
static const cuts_t electronSelection_wwV1_convrej
static const cuts_t electronSelection_wwV1_ip
static const cuts_t electronSelection_wwV1_base

Definition at line 402 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_smurfV2_id
static
Initial value:

Definition at line 408 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_smurfV2_iso
static
Initial value:

Definition at line 406 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_smurfV3
static
Initial value:
=
static const cuts_t electronSelection_smurfV3_id
static const cuts_t electronSelection_smurfV3_convrej
static const cuts_t electronSelection_smurfV3_iso
static const cuts_t electronSelection_smurfV3_baseline

Definition at line 432 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_smurfV3_baseline
static
Initial value:
=
static const cuts_t electronSelection_smurfV3_ip
static const cuts_t electronSelection_wwV1_base

Definition at line 420 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_smurfV3_convrej
static
const cuts_t HWWFunctions::electronSelection_smurfV3_id
static
const cuts_t HWWFunctions::electronSelection_smurfV3_ip
static
Initial value:

Definition at line 418 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_smurfV3_iso
static
Initial value:

Definition at line 426 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_smurfV4
static
Initial value:
=
static const cuts_t electronSelection_smurfV4_convrej
static const cuts_t electronSelection_smurfV4_id
static const cuts_t electronSelection_smurfV4_iso
static const cuts_t electronSelection_smurfV4_baseline

Definition at line 453 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_smurfV4_baseline
static
Initial value:
=
static const cuts_t electronSelection_smurfV4_ip
static const cuts_t electronSelection_wwV1_base

Definition at line 442 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_smurfV4_convrej
static
const cuts_t HWWFunctions::electronSelection_smurfV4_id
static
const cuts_t HWWFunctions::electronSelection_smurfV4_ip
static
const cuts_t HWWFunctions::electronSelection_smurfV4_iso
static
Initial value:

Definition at line 448 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_smurfV5
static
Initial value:
=
static const cuts_t electronSelection_smurfV5_iso
static const cuts_t electronSelection_smurfV5_convrej
static const cuts_t electronSelection_smurfV5_baseline
static const cuts_t electronSelection_smurfV5_id

Definition at line 474 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_smurfV5_baseline
static
Initial value:
=
static const cuts_t electronSelection_smurfV5_ip
static const cuts_t electronSelection_wwV1_base

Definition at line 463 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_smurfV5_convrej
static
const cuts_t HWWFunctions::electronSelection_smurfV5_id
static
const cuts_t HWWFunctions::electronSelection_smurfV5_ip
static
const cuts_t HWWFunctions::electronSelection_smurfV5_iso
static
Initial value:

Definition at line 469 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_smurfV6
static
Initial value:
=
static const cuts_t electronSelection_smurfV5

Definition at line 479 of file electronSelections.h.

Referenced by goodElectronIsolated().

const cuts_t HWWFunctions::electronSelection_ww_ip
static
Initial value:

Definition at line 148 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_ww_iso
static
Initial value:

Definition at line 155 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_wwV0
static
Initial value:
=
static const cuts_t electronSelection_wwV0_iso
static const cuts_t electronSelection_wwV0_id
static const cuts_t electronSelection_wwV0_ip
static const cuts_t electronSelection_wwV0_base

Definition at line 189 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_wwV0_base
static
const cuts_t HWWFunctions::electronSelection_wwV0_id
static
Initial value:

Definition at line 177 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_wwV0_ip
static
Initial value:

Definition at line 171 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_wwV0_iso
static
Initial value:

Definition at line 183 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_wwV0b
static
Initial value:
=
static const cuts_t electronSelection_wwV0b_id
static const cuts_t electronSelection_wwV0b_iso
static const cuts_t electronSelection_wwV0b_ip
static const cuts_t electronSelection_wwV0b_base

Definition at line 267 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_wwV0b_base
static
const cuts_t HWWFunctions::electronSelection_wwV0b_id
static
Initial value:

Definition at line 255 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_wwV0b_ip
static
Initial value:

Definition at line 249 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_wwV0b_iso
static
Initial value:

Definition at line 261 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_wwV1
static
Initial value:
=
static const cuts_t electronSelection_wwV1_convrej
static const cuts_t electronSelection_wwV1_ip
static const cuts_t electronSelection_wwV1_id
static const cuts_t electronSelection_wwV1_base
static const cuts_t electronSelection_wwV1_iso

Definition at line 349 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_wwV1_base
static
Initial value:

Definition at line 318 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_wwV1_convrej
static
const cuts_t HWWFunctions::electronSelection_wwV1_id
static
Initial value:

Definition at line 337 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_wwV1_ip
static
Initial value:

Definition at line 331 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelection_wwV1_iso
static
Initial value:

Definition at line 343 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelectionFO_el_smurf_base
static
const cuts_t HWWFunctions::electronSelectionFO_el_smurf_v1
static
Initial value:

Definition at line 501 of file electronSelections.h.

Referenced by fakableElectron().

const cuts_t HWWFunctions::electronSelectionFO_el_smurf_v2
static
const cuts_t HWWFunctions::electronSelectionFO_el_smurf_v3
static
Initial value:

Definition at line 492 of file electronSelections.h.

Referenced by fakableElectron().

const cuts_t HWWFunctions::electronSelectionFO_el_smurf_v4
static
const cuts_t HWWFunctions::electronSelectionFO_el_wwV0_v1
static
Initial value:

Definition at line 205 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelectionFO_el_wwV0_v2
static
Initial value:
=
static const cuts_t electronSelection_wwV0_iso
static const cuts_t electronSelectionFO_wwV0_baseline

Definition at line 213 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelectionFO_el_wwV0_v3
static
Initial value:

Definition at line 221 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelectionFO_el_wwV0_v4
static
const cuts_t HWWFunctions::electronSelectionFO_el_wwV0b_v1
static
Initial value:

Definition at line 283 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelectionFO_el_wwV0b_v2
static
Initial value:
=
static const cuts_t electronSelectionFO_wwV0b_baseline
static const cuts_t electronSelection_wwV0b_iso

Definition at line 291 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelectionFO_el_wwV0b_v3
static
Initial value:

Definition at line 299 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelectionFO_el_wwV0b_v4
static
const cuts_t HWWFunctions::electronSelectionFO_el_wwV1_v1
static
Initial value:

Definition at line 368 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelectionFO_el_wwV1_v2
static
Initial value:
=
static const cuts_t electronSelectionFO_wwV1_baseline
static const cuts_t electronSelection_wwV1_iso

Definition at line 376 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelectionFO_el_wwV1_v3
static
Initial value:

Definition at line 384 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelectionFO_el_wwV1_v4
static
const cuts_t HWWFunctions::electronSelectionFO_wwV0_baseline
static
Initial value:
=
static const cuts_t electronSelection_wwV0_base

Definition at line 198 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelectionFO_wwV0b_baseline
static
Initial value:
=
static const cuts_t electronSelection_wwV0b_base

Definition at line 276 of file electronSelections.h.

const cuts_t HWWFunctions::electronSelectionFO_wwV1_baseline
static
Initial value:
=
static const cuts_t electronSelection_wwV1_convrej
static const cuts_t electronSelection_wwV1_base

Definition at line 359 of file electronSelections.h.