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")),
93 nr_ =
fs->make<TH1I>(
"nr",
"nr", 10, 0, 10);
94 pt_ =
fs->make<TH1F>(
"pt",
"pt", 20, 0., 100.);
95 eta_ =
fs->make<TH1F>(
"eta",
"eta", 30, -3., 3.);
96 phi_ =
fs->make<TH1F>(
"phi",
"phi", 35, -3.5, 3.5);
97 genPt_ =
fs->make<TH1F>(
"genPt",
"pt", 20, 0., 100.);
98 genEta_ =
fs->make<TH1F>(
"genEta",
"eta", 30, -3., 3.);
99 genPhi_ =
fs->make<TH1F>(
"genPhi",
"phi", 35, -3.5, 3.5);
100 deltaR_ =
fs->make<TH1F>(
"deltaR",
"log(dR)", 50, -5., 0.);
101 isoTag_ =
fs->make<TH1F>(
"isoTag",
"iso", 50, 0., 10.);
102 invMass_ =
fs->make<TH1F>(
"invMass",
"m", 100, 50., 150.);
103 deltaPhi_ =
fs->make<TH1F>(
"deltaPhi",
"deltaPhi", 100, -3.5, 3.5);
127 if (
part->status() == 1 &&
abs(
part->pdgId()) == 11) {
137 for (std::vector<pat::Electron>::const_iterator elec =
electrons->begin(); elec !=
electrons->end(); ++elec) {
138 if (elec->genLepton()) {
147 pt_->Fill(elec->pt());
148 eta_->Fill(elec->eta());
149 phi_->Fill(elec->phi());
163 for (std::vector<pat::Electron>::const_iterator elec =
electrons->begin(); elec !=
electrons->end(); ++elec) {
164 isoTag_->Fill(elec->trackIso());
165 if (elec->trackIso() <
maxTagIso_ && elec->electronID(
"eidTight") > 0.5) {
167 for (std::vector<pat::Electron>::const_iterator probe =
electrons->begin(); probe !=
electrons->end();
173 float zMass = (probe->p4() + elec->p4()).
mass();
185 pt_->Fill(probe->pt());
186 eta_->Fill(probe->eta());
187 phi_->Fill(probe->phi());
static const std::string kSharedResource
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
T getParameter(std::string const &) const
edm::EDGetTokenT< std::vector< pat::Electron > > electronSrcToken_
~PatElectronAnalyzer() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Abs< T >::type abs(const T &t)
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::GenParticleCollection > particleSrcToken_
edm::ParameterSet tagAndProbeMode_
edm::ParameterSet genMatchMode_
void analyze(const edm::Event &, const edm::EventSetup &) override
PatElectronAnalyzer(const edm::ParameterSet &)