#include <TopElecAnalyzer.h>
|
| TopElecAnalyzer (const edm::ParameterSet &) |
|
| ~TopElecAnalyzer () override |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
| EDAnalyzer () |
|
SerialTaskQueue * | globalLuminosityBlocksQueue () |
|
SerialTaskQueue * | globalRunsQueue () |
|
ModuleDescription const & | moduleDescription () const |
|
std::string | workerType () const |
|
| ~EDAnalyzer () override |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
void | convertCurrentProcessAlias (std::string const &processName) |
| Convert "@currentProcess" in InputTag process names to the actual current process name. More...
|
|
| EDConsumerBase () |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
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 |
( |
| ) |
|
|
override |
Definition at line 21 of file TopElecAnalyzer.cc.
References gather_cfg::cout, PatTopSelectionAnalyzer_cfi::elecs, en_, eta_, edm::Event::getByToken(), mps_fire::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 |
| ) |
|
|
overrideprivatevirtual |
void TopElecAnalyzer::endJob |
( |
void |
| ) |
|
|
overrideprivatevirtual |
TH1F* TopElecAnalyzer::en_ |
|
private |
TH1F* TopElecAnalyzer::eta_ |
|
private |
TH1F* TopElecAnalyzer::mult_ |
|
private |
TH1F* TopElecAnalyzer::phi_ |
|
private |
TH1F* TopElecAnalyzer::pt_ |
|
private |
bool TopElecAnalyzer::verbose_ |
|
private |