32 std::unique_ptr< double > pOutDisc (
new double);
40 std::vector<PhysicsTools::Calibration::VarProcessor*> processors
41 = (calibContainer->find(
"ttSemiLepSignalSelMVA")).getProcessors();
46 if(!MET_handle.
isValid())
return;
51 if(!jet_handle.
isValid())
return;
52 const std::vector<pat::Jet>
jets = *jet_handle;
53 unsigned int nJets = 0;
54 std::vector<pat::Jet> seljets;
55 for(std::vector<pat::Jet>::const_iterator it = jets.begin(); it != jets.end(); it++) {
57 if(it->pt()>30. && fabs(it->eta())<2.4) {
58 seljets.push_back(*it);
65 if(!muon_handle.
isValid())
return;
68 std::vector<pat::Muon> selMuons;
72 if(it->pt()>30 && fabs(it->eta())<2.1 && (it->pt()/(it->pt()+it->trackIso()+it->caloIso()))>0.95 && it->isGlobalMuon()){
73 if(gltr.
isNull())
continue;
74 if((gltr->chi2()/gltr->ndof())<10 && trtr->numberOfValidHits()>11) {
76 for(std::vector<pat::Jet>::const_iterator ajet = seljets.begin(); ajet != seljets.end(); ajet++) {
79 double tmpdR =
DeltaR(muon,jet);
80 if(tmpdR<dRmin) dRmin = tmpdR;
84 selMuons.push_back(*it);
92 if(!electron_handle.
isValid())
return;
96 if(it->pt()>30 && fabs(it->eta())<2.4 && (it->pt()/(it->pt()+it->trackIso()+it->caloIso()))>0.95 && it->isElectronIDAvailable(
"eidTight"))
98 if(it->electronID(
"eidTight")==1) nelectrons++;
107 nelectrons > 0 ) discrim = -1.;
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double evaluateTtSemiLepSignalSel(PhysicsTools::MVAComputerCache &mvaComputer, const TtSemiLepSignalSel &sigsel, float weight=1., const bool training=false, const bool isSignal=false)
static bool test(uint32_t val, uint32_t mask)
def setup(process, global_tag, zero_tesla=False)
PhysicsTools::MVAComputerCache mvaComputer
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
const_iterator begin() const
void get(HolderT &iHolder) const
double DeltaR(const math::XYZTLorentzVector &v1, const math::XYZTLorentzVector &v2)
edm::EDGetTokenT< edm::View< pat::Muon > > muonsToken_
bool isNull() const
Checks for null.
edm::EDGetTokenT< edm::View< pat::MET > > METsToken_
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
edm::EDGetTokenT< edm::View< pat::Electron > > electronsToken_
const_iterator end() const