12 : jetSourceToken_( jetSourceToken )
23 std::vector< TtDilepLRSignalSelObservables::IntBoolPair >
34 bool matchBbar =
false;
35 bool matchLeptPos =
false;
36 bool matchLeptNeg =
false;
45 if (genEvent->isFullLeptonic()) {
60 if (genEvent->isSemiLeptonic()) {
61 int id = genEvent->singleLepton()->pdgId();
66 ( ((solution.
getWmDecay()==
"electron") && (
id==11))
67 || ((solution.
getWmDecay()==
"muon") && (
id==13)) )
72 ( ((solution.
getWpDecay()==
"electron")&& (
id==-11))
73 || ((solution.
getWpDecay()==
"muon") && (
id==-13)) )
78 if (genEvent->isTtBar() && genEvent->numberOfBQuarks()>1) {
85 matchB1= ( (dr1<0.4) || (dr2<0.4));
88 matchB = ( (dr1<0.4) );
98 matchBbar = ( (dr2<0.4) );
99 matchB2 = ( (dr1<0.4) || (dr2<0.4));
118 double pt1 = solution.
getJetB().
p4().pt();
166 double mass = pp.mass();
173 std::vector <pat::Jet> jet3;
174 for (
int i=0;
i<(int)jets->size();++
i) {
175 if ( ((*jets)[
i].et()<solution.
getJetB().
et()) && ((*jets)[
i].et()<solution.
getJetBbar().
et())) {jet3.push_back((*jets)[
i]);
177 double jet1Ratio = 0., jet2Ratio = 0.;
179 jet1Ratio = jet3[0].et()/solution.
getJetB().
et();
194 (
double v1,
double v2,
int obsNbr, std::vector< IntDblPair > & varList,
195 bool match1,
bool match2, std::vector< IntBoolPair > & matchList)
201 matchList.push_back(
IntBoolPair(obsNbr+1, match2));
207 matchList.push_back(
IntBoolPair(obsNbr+1, match1));
214 while (deltaPhi >
M_PI) deltaPhi -= 2*
M_PI;
215 while (deltaPhi <= -
M_PI) deltaPhi += 2*
M_PI;
pat::Jet getCalJetBbar() const
const reco::GenParticle * getGenLepm() const
double delta(double phi1, double phi2)
virtual double et() const GCC11_FINAL
transverse energy
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
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
virtual int pdgId() const GCC11_FINAL
PDG identifier.
std::pair< unsigned int, bool > IntBoolPair
const LorentzVector & p4() const
four-momentum Lorentz vector
std::vector< IntBoolPair > operator()(TtDilepEvtSolution &, const edm::Event &iEvent, bool matchOnly=false)
std::string getWmDecay() const
std::string getWpDecay() const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
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)
reco::Particle getLeptPos() const
int partonFlavour() const
return the parton-based flavour of the jet
std::vector< IntBoolPair > evtselectVarMatch
std::vector< IntDblPair > evtselectVarVal
edm::EDGetTokenT< std::vector< pat::Jet > > jetSourceToken_
pat::Jet getCalJetB() const
const reco::GenParticle * getGenLepp() const
~TtDilepLRSignalSelObservables()
genEvtToken_(mayConsume< TtGenEvent >(genEvt_))