CMS 3D CMS Logo

TopTauAnalyzer.cc
Go to the documentation of this file.
2 
3 
5  inputToken_(consumes<std::vector<pat::Tau> >(cfg.getParameter<edm::InputTag>("input")))
6 {
8 
9  mult_ = fs->make<TH1F>("mult", "multiplicity (taus)", 30, 0 , 30);
10  en_ = fs->make<TH1F>("en" , "energy (taus)", 60, 0., 300.);
11  pt_ = fs->make<TH1F>("pt" , "pt (taus}", 60, 0., 300.);
12  eta_ = fs->make<TH1F>("eta" , "eta (taus)", 30, -3., 3.);
13  phi_ = fs->make<TH1F>("phi" , "phi (taus)", 40, -4., 4.);
14 }
15 
17 {
18 }
19 
20 void
22 {
24  evt.getByToken(inputToken_, taus);
25 
26  // fill histograms
27 
28  mult_->Fill( taus->size() );
29  for(std::vector<pat::Tau>::const_iterator tau=taus->begin(); tau!=taus->end(); ++tau){
30  en_ ->Fill( tau->energy() );
31  pt_ ->Fill( tau->pt() );
32  eta_->Fill( tau->eta() );
33  phi_->Fill( tau->phi() );
34  }
35 }
36 
38 {
39 }
40 
42 {
43 }
44 
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
void analyze(const edm::Event &, const edm::EventSetup &) override
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
Definition: HeavyIon.h:7
edm::EDGetTokenT< std::vector< pat::Tau > > inputToken_
void beginJob() override
Definition: Tau.py:1
void endJob() override
HLT enums.
TopTauAnalyzer(const edm::ParameterSet &)
~TopTauAnalyzer() override