92 float met = pfmet.
pt();
97 std::vector<reco::PFJet>
jets;
98 std::vector<reco::PFJet> htjets;
99 if ( jetHandle->size() <
njets_ )
return;
100 for (
auto const & j : *jetHandle ) {
103 double abseta =
abs(j.eta());
104 double NHF = j.neutralHadronEnergyFraction();
105 double NEMF = j.neutralEmEnergyFraction();
106 double CHF = j.chargedHadronEnergyFraction();
107 double CEMF = j.chargedEmEnergyFraction();
108 unsigned NumNeutralParticles =j.neutralMultiplicity();
109 unsigned CHM = j.chargedMultiplicity();
110 bool passId = (
jetId_==
"loose" &&
looseJetId(abseta,NHF,NEMF,CHF,CEMF,NumNeutralParticles,CHM)) || (
jetId_==
"tight" &&
tightJetId(abseta,NHF,NEMF,CHF,CEMF,NumNeutralParticles,CHM));
111 if (passId) jets.push_back(j);
113 else jets.push_back(j);
117 if ( jets.size() <
njets_ )
return;
121 std::vector<reco::GsfElectron>
electrons;
123 for (
auto const &
e : *eleHandle ) {
130 if ( muoHandle->size() <
nmuons_ )
return;
131 std::vector<reco::Muon>
muons;
132 for (
auto const &
m : *muoHandle ) {
135 if ( muons.size() <
nmuons_ )
return;
139 if ( phoHandle->size() <
nphotons_ )
return;
140 std::vector<reco::Photon>
photons;
141 for (
auto const &
m : *phoHandle ) {
144 if ( photons.size() <
nphotons_ )
return;
146 std::vector<TLorentzVector> passedMesons;
151 TLorentzVector t1,t2;
152 float hadronMassHyp[2] = {0.1396,0.4937};
153 float loMassLim[2] = {0.5,0.9};
154 float hiMassLim[2] = {1.0,1.11};
156 for (
size_t i = 0;
i < trkHandle->size(); ++
i){
159 for (
size_t j =
i+1; j < trkHandle->size(); ++j){
164 for (
unsigned hyp = 0; hyp < 2; ++hyp){
166 t1.SetPtEtaPhiM(trk1.
pt(),trk1.
eta(),trk1.
phi(),hadronMassHyp[hyp]);
167 t2.SetPtEtaPhiM(trk2.
pt(),trk2.
eta(),trk2.
phi(),hadronMassHyp[hyp]);
168 TLorentzVector mesCand = t1 + t2;
171 if (mesCand.M() < loMassLim[hyp] || mesCand.M() > hiMassLim[hyp])
continue;
172 if (mesCand.Pt() < 35. || fabs(mesCand.Rapidity()) > 2.1 )
continue;
176 for (
size_t k = 0;
k < trkHandle->size(); ++
k){
177 if (
k ==
i ||
k == j)
continue;
179 if (trkN.
charge() == 0 || trkN.
pt() < 0.5 ||
180 ( trkN.
dz() > 0.1 ) ||
181 deltaR(trkN.
eta(),trkN.
phi(),mesCand.Eta(),mesCand.Phi()) > 0.5)
continue;
184 if (absIso/mesCand.Pt() > 0.2)
continue;
185 passedMesons.push_back(mesCand);
189 if ( passedMesons.size() <
nmesons_ )
return;
193 int ls =
iEvent.id().luminosityBlock();
void fillHistograms(const double &met, const double &phi, const int &ls, const bool passCond)
edm::EDGetTokenT< reco::TrackCollection > trkToken_
void fillHistograms(const std::vector< reco::PFJet > &jets, const reco::PFMET &pfmet, const int &ls, const bool passCond)
bool looseJetId(const double &abseta, const double &NHF, const double &NEMF, const double &CHF, const double &CEMF, const unsigned &NumNeutralParticles, const unsigned &CHM)
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
double phi() const
azimuthal angle of momentum vector
double pt() const final
transverse momentum
bool tightJetId(const double &abseta, const double &NHF, const double &NEMF, const double &CHF, const double &CEMF, const unsigned &NumNeutralParticles, const unsigned &CHM)
StringCutObjectSelector< reco::MET, true > metSelection_
StringCutObjectSelector< reco::Photon, true > phoSelection_
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
double eta() const
pseudorapidity of momentum vector
edm::EDGetTokenT< reco::PFMETCollection > metToken_
double pt() const
track transverse momentum
Abs< T >::type abs(const T &t)
StringCutObjectSelector< reco::PFJet, true > jetSelection_
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
edm::EDGetTokenT< reco::PhotonCollection > phoToken_
StringCutObjectSelector< reco::Track, true > trkSelection_
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
StringCutObjectSelector< reco::Muon, true > muoSelection_
void fillHistograms(const reco::PhotonCollection &photons, std::vector< TLorentzVector > mesons, const int &ls, const bool passCond)
StringCutObjectSelector< reco::PFJet, true > htjetSelection_
void fillHistograms(const std::vector< reco::PFJet > &htjets, const double &met, const int &ls, const bool passCond)
int charge() const
track electric charge
edm::EDGetTokenT< reco::MuonCollection > muoToken_
double phi() const final
momentum azimuthal angle
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_