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