4 inputToken_ (consumes<std::vector<pat::Electron> >(cfg.getParameter<edm::InputTag>(
"input" ))),
5 verbose_(cfg.getParameter<bool> (
"verbose"))
9 mult_ = fs->
make<TH1F>(
"mult",
"multiplicity (electrons)", 10, 0 , 10);
10 en_ = fs->
make<TH1F>(
"en" ,
"energy (electrons)" , 60, 0., 300.);
11 pt_ = fs->
make<TH1F>(
"pt" ,
"pt (electrons)" , 60, 0., 300.);
12 eta_ = fs->
make<TH1F>(
"eta" ,
"eta (electrons)" , 30, -3., 3.);
13 phi_ = fs->
make<TH1F>(
"phi" ,
"phi (electrons)" , 40, -4., 4.);
28 mult_->Fill( elecs->size() );
29 for(std::vector<pat::Electron>::const_iterator elec=elecs->begin(); elec!=elecs->end(); ++elec){
30 en_ ->Fill( elec->energy() );
31 pt_ ->Fill( elec->pt() );
32 eta_->Fill( elec->eta() );
33 phi_->Fill( elec->phi() );
43 std::cout <<
"======================================================="
46 << std::setw(13) <<
"et :"
47 << std::setw(13) <<
"eta :"
48 << std::setw(13) <<
"phi :"
49 << std::setw(11) <<
"relIso" << std::endl;
50 std::cout <<
"-------------------------------------------------------"
52 for(std::vector<pat::Electron>::const_iterator elec=elecs->begin(); elec!=elecs->end(); ++elec){
54 << std::setw(10) << elec->pt() <<
" : "
55 << std::setw(10) << elec->eta() <<
" : "
56 << std::setw(10) << elec->phi() <<
" : "
57 << std::setw(10) << (elec->dr03TkSumPt()+elec->dr03EcalRecHitSumEt()+elec->dr03HcalTowerSumEt())/elec->et() << std::endl;
60 std::cout <<
"======================================================="
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
T * make(const Args &...args) const
make new ROOT object
TopElecAnalyzer(const edm::ParameterSet &)
edm::EDGetTokenT< std::vector< pat::Electron > > inputToken_
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")