15 muonsToken_(consumes<edm::
View<pat::
Muon> >(cfg.getParameter<edm::
InputTag>(
"muons"))),
16 jetsToken_(consumes<std::
vector<pat::
Jet> >(cfg.getParameter<edm::
InputTag>(
"jets"))),
17 METsToken_(consumes<edm::
View<pat::
MET> >(cfg.getParameter<edm::
InputTag>(
"mets"))),
19 putToken_(produces(
"DiscSel")) {}
37 const std::vector<pat::Jet>
jets = *jet_handle;
38 unsigned int nJets = 0;
39 std::vector<pat::Jet> seljets;
40 for (std::vector<pat::Jet>::const_iterator it = jets.begin(); it != jets.end(); it++) {
43 if (it->pt() > 30. && fabs(it->eta()) < 2.4) {
44 seljets.push_back(*it);
55 std::vector<pat::Muon> selMuons;
59 if (it->pt() > 30 && fabs(it->eta()) < 2.1 && (it->pt() / (it->pt() + it->trackIso() + it->caloIso())) > 0.95 &&
63 if ((gltr->chi2() / gltr->ndof()) < 10 && trtr->numberOfValidHits() > 11) {
65 for (std::vector<pat::Jet>::const_iterator ajet = seljets.begin(); ajet != seljets.end(); ajet++) {
68 double tmpdR =
DeltaR(muon, jet);
74 selMuons.push_back(*it);
87 if (it->pt() > 30 && fabs(it->eta()) < 2.4 && (it->pt() / (it->pt() + it->trackIso() + it->caloIso())) > 0.95 &&
88 it->isElectronIDAvailable(
"eidTight")) {
89 if (it->electronID(
"eidTight") == 1)
96 if (nmuons != 1 || nJets < 4 || nelectrons > 0)
111 double dPhi = fabs(v1.Phi() - v2.Phi());
119 double dR = TMath::Sqrt((v1.Eta() - v2.Eta()) * (v1.Eta() - v2.Eta()) + dPhi * dPhi);
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double DeltaPhi(const math::XYZTLorentzVector &v1, const math::XYZTLorentzVector &v2)
edm::EDPutTokenT< double > putToken_
static bool test(uint32_t val, uint32_t mask)
edm::EDGetTokenT< edm::View< pat::Electron > > electronsToken_
PhysicsTools::MVAComputerCache mvaComputer
bool getData(T &iHolder) const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
const_iterator begin() const
edm::EDGetTokenT< edm::View< pat::Muon > > muonsToken_
~TtSemiLepSignalSelMVAComputer() override
double evaluateTtSemiLepSignalSel(PhysicsTools::MVAComputerCache &mvaComputer, const TtSemiLepSignalSel &sigsel, float weight=1., const bool isSignal=false)
double DeltaR(const math::XYZTLorentzVector &v1, const math::XYZTLorentzVector &v2)
bool isNull() const
Checks for null.
edm::EDGetTokenT< edm::View< pat::MET > > METsToken_
OrphanHandle< PROD > emplace(EDPutTokenT< PROD > token, Args &&...args)
puts a new product
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
TtSemiLepSignalSelMVAComputer(const edm::ParameterSet &)
const_iterator end() const
void produce(edm::Event &evt, const edm::EventSetup &setup) override
constexpr char Electron[]
edm::ESGetToken< PhysicsTools::Calibration::MVAComputerContainer, TtSemiLepSignalSelMVARcd > mvaToken_
#define MVA_COMPUTER_CONTAINER_IMPLEMENT(N)