49 if(!MET_handle.
isValid())
return;
54 if(!jet_handle.
isValid())
return;
55 const std::vector<pat::Jet>
jets = *jet_handle;
56 unsigned int nJets = 0;
57 std::vector<pat::Jet> seljets;
59 for(std::vector<pat::Jet>::const_iterator it = jets.begin(); it != jets.end(); it++) {
62 if(it->et()>30. && fabs(it->eta())<2.4) {
63 seljets.push_back(*it);
71 sort(seljets.begin(),seljets.end(),JetwithHigherPt());
75 if(!muon_handle.isValid())
return;
78 std::vector<pat::Muon> selMuons;
82 if(it->pt()>30 && fabs(it->eta())<2.1 && (it->pt()/(it->pt()+it->trackIso()+it->caloIso()))>0.95 && it->isGlobalMuon()){
83 if(gltr.
isNull())
continue;
84 if((gltr->chi2()/gltr->ndof())<10 && trtr->numberOfValidHits()>=11) {
87 for(std::vector<pat::Jet>::const_iterator ajet = seljets.begin(); ajet != seljets.end(); ajet++) {
90 double tmpdR =
DeltaR(muon,jet);
91 if(tmpdR<dRmin) dRmin = tmpdR;
96 selMuons.push_back(*it);
102 if(nmuons!=1)
return;
106 if(!electron_handle.
isValid())
return;
110 if(it->pt()>30 && fabs(it->eta())<2.4 && (it->pt()/(it->pt()+it->trackIso()+it->caloIso()))>0.95 && it->isElectronIDAvailable(
"eidTight"))
112 if(it->electronID(
"eidTight")==1) nelectrons++;
115 if(nelectrons>0)
return;
150 if(genEvt->isSemiLeptonic() && genEvt->semiLeptonicChannel() ==
lepChannel_) {
160 else std::cout<<
"Config File Error!! Please check <whatData> in TtSemiLepSignalSelMVATrainer.cfi";
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
double evaluateTtSemiLepSignalSel(PhysicsTools::MVAComputerCache &mvaComputer, const TtSemiLepSignalSel &sigsel, float weight=1., const bool training=false, const bool isSignal=false)
PhysicsTools::MVAComputerCache mvaComputer
static bool test(uint32_t val, uint32_t mask)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
double DeltaR(math::XYZTLorentzVector v1, math::XYZTLorentzVector v2)
bool isNull() const
Checks for null.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const_iterator begin() const
const_iterator end() const