4 inputGenEventToken_(consumes<
TtGenEvent>(cfg.getParameter<
edm::InputTag>(
"genEvent")))
7 nLep_ = fs->
make<TH1F>(
"nLep",
"N(Lepton)", 5, 0., 5.);
8 topPt_ = fs->
make<TH1F>(
"topPt",
"pt (top)", 100, 0., 500.);
9 topEta_ = fs->
make<TH1F>(
"topEta",
"eta(top)", 40, -5., 5.);
10 topPhi_ = fs->
make<TH1F>(
"topPhi",
"phi(top)", 60, -3.5, 3.5);
11 topBarPt_ = fs->
make<TH1F>(
"topBarPt",
"pt (topBar)", 100, 0., 500.);
12 topBarEta_ = fs->
make<TH1F>(
"topBarEta",
"eta(topBar)", 40, -5., 5.);
13 topBarPhi_ = fs->
make<TH1F>(
"topBarPhi",
"phi(topBar)", 60, -3.5, 3.5);
14 ttbarPt_ = fs->
make<TH1F>(
"ttbarPt",
"pt (ttbar)", 100, 0., 500.);
15 ttbarEta_ = fs->
make<TH1F>(
"ttbarEta",
"eta(ttbar)", 40, -5., 5.);
16 ttbarPhi_ = fs->
make<TH1F>(
"ttbarPhi",
"phi(ttbar)", 60, -3.5, 3.5);
17 prodChan_ = fs->
make<TH1F>(
"prodChan",
"production mode", 3, 0, 3);
18 prodChan_->GetXaxis()->SetBinLabel(1,
"gg" );
19 prodChan_->GetXaxis()->SetBinLabel(2,
"qqbar");
20 prodChan_->GetXaxis()->SetBinLabel(3,
"other");
double eta() const final
momentum pseudorapidity
TopGenEventAnalyzer(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool fromQuarkAnnihilation() const
check if the tops were produced from qqbar
def setup(process, global_tag, zero_tesla=False)
double pt() const final
transverse momentum
T * make(const Args &...args) const
make new ROOT object
const reco::GenParticle * top() const
return top if available; 0 else
Class derived from the TopGenEvent for ttbar events.
bool fromGluonFusion() const
check if the tops were produced from a pair of gluons
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< TtGenEvent > inputGenEventToken_
~TopGenEventAnalyzer() override
const math::XYZTLorentzVector * topPair() const
return combined 4-vector of top and topBar
double phi() const final
momentum azimuthal angle
const reco::GenParticle * topBar() const
return anti-top if available; 0 else
bool isTtBar() const
check if the event can be classified as ttbar
int numberOfLeptons(bool fromWBoson=true) const
return number of leptons in the decay chain