#include <TopElecAnalyzer.h>
|
| TopElecAnalyzer (const edm::ParameterSet &) |
|
| ~TopElecAnalyzer () |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
| EDAnalyzer () |
|
ModuleDescription const & | moduleDescription () const |
|
std::string | workerType () const |
|
virtual | ~EDAnalyzer () |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
| EDConsumerBase () |
|
ProductHolderIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const |
|
std::vector
< ProductHolderIndexAndSkipBit >
const & | itemsToGetFromEvent () const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const |
|
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
bool | registeredToConsume (ProductHolderIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
void | updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &) |
|
virtual | ~EDConsumerBase () |
|
Definition at line 15 of file TopElecAnalyzer.h.
Definition at line 3 of file TopElecAnalyzer.cc.
References en_, eta_, TFileService::make(), mult_, phi_, and pt_.
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.);
T getParameter(std::string const &) const
T * make(const Args &...args) const
make new ROOT object
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< std::vector< pat::Electron > > inputToken_
TopElecAnalyzer::~TopElecAnalyzer |
( |
| ) |
|
Implements edm::EDAnalyzer.
Definition at line 21 of file TopElecAnalyzer.cc.
References gather_cfg::cout, en_, eta_, edm::Event::getByToken(), i, inputToken_, mult_, phi_, pt_, and verbose_.
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
edm::EDGetTokenT< std::vector< pat::Electron > > inputToken_
void TopElecAnalyzer::beginJob |
( |
void |
| ) |
|
|
privatevirtual |
void TopElecAnalyzer::endJob |
( |
void |
| ) |
|
|
privatevirtual |
TH1F* TopElecAnalyzer::en_ |
|
private |
TH1F* TopElecAnalyzer::eta_ |
|
private |
TH1F* TopElecAnalyzer::mult_ |
|
private |
TH1F* TopElecAnalyzer::phi_ |
|
private |
TH1F* TopElecAnalyzer::pt_ |
|
private |
bool TopElecAnalyzer::verbose_ |
|
private |