73 #include "Math/VectorUtil.h"
76 : minPt_(cfg.getParameter<double>(
"minPt")),
77 maxEta_(cfg.getParameter<double>(
"maxEta")),
78 mode_(cfg.getParameter<unsigned int>(
"mode")),
79 electronID_(cfg.getParameter<std::
string>(
"electronID")),
82 genMatchMode_(cfg.getParameter<edm::
ParameterSet>(
"genMatchMode")),
83 tagAndProbeMode_(cfg.getParameter<edm::
ParameterSet>(
"tagAndProbeMode")) {
91 nr_ = fs->make<TH1I>(
"nr",
"nr", 10, 0, 10);
92 pt_ = fs->make<TH1F>(
"pt",
"pt", 20, 0., 100.);
93 eta_ = fs->make<TH1F>(
"eta",
"eta", 30, -3., 3.);
94 phi_ = fs->make<TH1F>(
"phi",
"phi", 35, -3.5, 3.5);
95 genPt_ = fs->make<TH1F>(
"genPt",
"pt", 20, 0., 100.);
96 genEta_ = fs->make<TH1F>(
"genEta",
"eta", 30, -3., 3.);
97 genPhi_ = fs->make<TH1F>(
"genPhi",
"phi", 35, -3.5, 3.5);
98 deltaR_ = fs->make<TH1F>(
"deltaR",
"log(dR)", 50, -5., 0.);
99 isoTag_ = fs->make<TH1F>(
"isoTag",
"iso", 50, 0., 10.);
100 invMass_ = fs->make<TH1F>(
"invMass",
"m", 100, 50., 150.);
101 deltaPhi_ = fs->make<TH1F>(
"deltaPhi",
"deltaPhi", 100, -3.5, 3.5);
114 nr_->Fill(electrons->size());
123 for (reco::GenParticleCollection::const_iterator
part = particles->begin();
part != particles->end(); ++
part) {
125 if (
part->status() == 1 &&
abs(
part->pdgId()) == 11) {
135 for (std::vector<pat::Electron>::const_iterator elec = electrons->begin(); elec != electrons->end(); ++elec) {
136 if (elec->genLepton()) {
138 deltaR_->Fill(TMath::Log10(deltaR));
145 pt_->Fill(elec->pt());
146 eta_->Fill(elec->eta());
147 phi_->Fill(elec->phi());
161 for (std::vector<pat::Electron>::const_iterator elec = electrons->begin(); elec != electrons->end(); ++elec) {
162 isoTag_->Fill(elec->trackIso());
163 if (elec->trackIso() <
maxTagIso_ && elec->electronID(
"eidTight") > 0.5) {
165 for (std::vector<pat::Electron>::const_iterator probe = electrons->begin(); probe != electrons->end();
171 float zMass = (probe->p4() + elec->p4()).
mass();
183 pt_->Fill(probe->pt());
184 eta_->Fill(probe->eta());
185 phi_->Fill(probe->phi());
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
edm::EDGetTokenT< std::vector< pat::Electron > > electronSrcToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
~PatElectronAnalyzer() override
Abs< T >::type abs(const T &t)
edm::EDGetTokenT< reco::GenParticleCollection > particleSrcToken_
edm::ParameterSet tagAndProbeMode_
T getParameter(std::string const &) const
edm::ParameterSet genMatchMode_
constexpr char Electron[]
void analyze(const edm::Event &, const edm::EventSetup &) override
PatElectronAnalyzer(const edm::ParameterSet &)