34 bool matchBbar =
false;
35 bool matchLeptPos =
false;
36 bool matchLeptNeg =
false;
45 if (genEvent->isFullLeptonic()) {
58 if (genEvent->isSemiLeptonic()) {
59 int id = genEvent->singleLepton()->pdgId();
63 matchLeptNeg = ((((solution.
getWmDecay() ==
"electron") && (
id == 11)) ||
64 ((solution.
getWmDecay() ==
"muon") && (
id == 13))) &&
68 matchLeptPos = ((((solution.
getWpDecay() ==
"electron") && (
id == -11)) ||
69 ((solution.
getWpDecay() ==
"muon") && (
id == -13))) &&
74 if (genEvent->isTtBar() && genEvent->numberOfBQuarks() > 1) {
83 matchB1 = ((dr1 < 0.4) || (dr2 < 0.4));
87 matchB = ((dr1 < 0.4));
101 matchBbar = ((dr2 < 0.4));
102 matchB2 = ((dr1 < 0.4) || (dr2 < 0.4));
123 double pt1 = solution.
getJetB().
p4().pt();
163 matchB && matchLeptPos,
164 matchBbar && matchLeptNeg,
170 double mass = pp.mass();
177 std::vector<pat::Jet> jet3;
178 for (
int i = 0;
i < (int)jets->size(); ++
i) {
180 jet3.push_back((*jets)[
i]);
183 double jet1Ratio = 0., jet2Ratio = 0.;
185 jet1Ratio = jet3[0].et() / solution.
getJetB().
et();
201 std::vector<IntDblPair> &varList,
204 std::vector<IntBoolPair> &matchList) {
207 varList.push_back(
IntDblPair(obsNbr + 1, v2));
209 matchList.push_back(
IntBoolPair(obsNbr + 1, match2));
213 varList.push_back(
IntDblPair(obsNbr + 1, v1));
215 matchList.push_back(
IntBoolPair(obsNbr + 1, match1));
221 while (deltaPhi >
M_PI)
222 deltaPhi -= 2 *
M_PI;
223 while (deltaPhi <= -
M_PI)
224 deltaPhi += 2 *
M_PI;
pat::Jet getCalJetBbar() const
const reco::GenParticle * getGenLepm() const
double delta(double phi1, double phi2)
void fillMinMax(double v1, double v2, int obsNbr, std::vector< IntDblPair > &varList, bool match1, bool match2, std::vector< IntBoolPair > &matchList)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
genEvtToken_(mayConsume< TtGenEvent >(genEvt_))
std::vector< IntBoolPair > operator()(TtDilepEvtSolution &, const edm::Event &iEvent, bool matchOnly=false)
const LorentzVector & p4() const
four-momentum Lorentz vector
const LorentzVector & p4() const final
four-momentum Lorentz vector
std::string getWmDecay() const
std::string getWpDecay() const
int pdgId() const final
PDG identifier.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
std::pair< unsigned int, bool > IntBoolPair
Class derived from the TopGenEvent for ttbar events.
void setLRSignalEvtObservables(const std::vector< std::pair< unsigned int, double > > &)
std::pair< unsigned int, double > IntDblPair
reco::Particle getLeptNeg() const
pat::Jet getJetBbar() const
Abs< T >::type abs(const T &t)
edm::EDGetTokenT< TtGenEvent > genEvtToken_
TtDilepLRSignalSelObservables(edm::ConsumesCollector &&iC, const edm::EDGetTokenT< std::vector< pat::Jet > > &jetSourceToken)
int partonFlavour() const
return the parton-based flavour of the jet
reco::Particle getLeptPos() const
edm::EDGetTokenT< std::vector< pat::Jet > > jetSourceToken_
pat::Jet getCalJetB() const
const reco::GenParticle * getGenLepp() const
double et() const final
transverse energy
~TtDilepLRSignalSelObservables()
std::vector< IntBoolPair > evtselectVarMatch
std::vector< IntDblPair > evtselectVarVal