73 #include "Math/VectorUtil.h"
78 minPt_ (cfg.getParameter<double>(
"minPt")),
79 maxEta_ (cfg.getParameter<double>(
"maxEta")),
80 mode_ (cfg.getParameter<unsigned int>(
"mode")),
81 electronID_ (cfg.getParameter<std::string>(
"electronID")),
82 electronSrc_ (cfg.getParameter<edm::InputTag>(
"electronSrc")),
83 particleSrc_ (cfg.getParameter<edm::InputTag>(
"particleSrc")),
84 genMatchMode_(cfg.getParameter<edm::
ParameterSet>(
"genMatchMode")),
85 tagAndProbeMode_(cfg.getParameter<edm::
ParameterSet>(
"tagAndProbeMode"))
95 nr_ = fs->make<TH1I>(
"nr",
"nr", 10, 0 , 10 );
96 pt_ = fs->make<TH1F>(
"pt",
"pt", 20, 0., 100.);
97 eta_ = fs->make<TH1F>(
"eta",
"eta", 30, -3., 3.);
98 phi_ = fs->make<TH1F>(
"phi",
"phi", 35, -3.5, 3.5);
99 genPt_ = fs->make<TH1F>(
"genPt",
"pt", 20, 0., 100.);
100 genEta_ = fs->make<TH1F>(
"genEta",
"eta", 30, -3., 3.);
101 genPhi_ = fs->make<TH1F>(
"genPhi",
"phi", 35, -3.5, 3.5);
102 deltaR_ = fs->make<TH1F>(
"deltaR",
"log(dR)", 50, -5., 0.);
103 isoTag_ = fs->make<TH1F>(
"isoTag",
"iso", 50, 0., 10.);
104 invMass_ = fs->make<TH1F>(
"invMass",
"m", 100, 50., 150.);
105 deltaPhi_= fs->make<TH1F>(
"deltaPhi",
"deltaPhi", 100, -3.5, 3.5);
122 nr_->Fill( electrons->size() );
131 for(reco::GenParticleCollection::const_iterator
part=particles->begin();
144 for( std::vector<pat::Electron>::const_iterator elec=electrons->begin(); elec!=electrons->end(); ++elec ){
145 if( elec->genLepton() ){
146 float deltaR = ROOT::Math::VectorUtil::DeltaR(elec->genLepton()->p4(), elec->p4());
147 deltaR_->Fill(TMath::Log10(deltaR));
154 pt_ ->Fill( elec->pt() );
155 eta_->Fill( elec->eta() );
156 phi_->Fill( elec->phi() );
170 for( std::vector<pat::Electron>::const_iterator elec=electrons->begin(); elec!=electrons->end(); ++elec ){
171 isoTag_->Fill(elec->trackIso());
172 if( elec->trackIso()<
maxTagIso_ && elec->electronID(
"eidTight")>0.5 ){
174 for( std::vector<pat::Electron>::const_iterator probe=electrons->begin(); probe!=electrons->end(); ++probe ){
176 if( probe==elec )
continue;
178 float zMass = (probe->p4()+elec->p4()).mass();
180 float deltaPhi = ROOT::Math::VectorUtil::DeltaPhi(elec->p4(), probe->p4());
190 pt_ ->Fill( probe->pt() );
191 eta_->Fill( probe->eta() );
192 phi_->Fill( probe->phi() );
T getParameter(std::string const &) const
edm::InputTag electronSrc_
double deltaPhi(float phi1, float phi2)
#define DEFINE_FWK_MODULE(type)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double deltaR(double eta1, double eta2, double phi1, double phi2)
edm::ParameterSet tagAndProbeMode_
edm::InputTag particleSrc_
edm::ParameterSet genMatchMode_
PatElectronAnalyzer(const edm::ParameterSet &)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
virtual void analyze(const edm::Event &, const edm::EventSetup &)