HiggsAnalysis-KITHiggsToTauTau
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
EmbeddingConsumer.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <TH1.h>
5 #include "TROOT.h"
6 #include "TRandom3.h"
7 
8 #include "Artus/Core/interface/ConsumerBase.h"
9 #include "Artus/Utility/interface/RootFileHelper.h"
10 
11 #include "HiggsAnalysis/KITHiggsToTauTau/interface/HttTypes.h"
12 
13 class EmbeddingConsumer : public ConsumerBase<HttTypes> {
14 public:
15 
16  virtual std::string GetConsumerId() const override;
17  virtual void Init(setting_type const& settings, metadata_type& metadata) override;
18  virtual void ProcessFilteredEvent(event_type const& event, product_type const& product, setting_type const& settings, metadata_type const& metadata) override;
19  virtual void Finish(setting_type const& settings, metadata_type const& metadata) override;
20 
21  virtual void FillPtFlowHistogram(std::map<std::string, TH1F*> histmap, std::vector<const KPFCandidate*> pf_collection, KMuon* muon, std::string region);
22 
23 private:
24  TRandom3* randomnumbergenerator = new TRandom3(0);
25  unsigned int nDeltaRBins = 0;
26  float DeltaRMax = 0.0;
27  unsigned int nIsoPtSumBins = 0;
28  float IsoPtSumMax = 0.0;
29  float IsoPtSumOverPtMax = 0.0;
30  bool randomMuon = false;
31 
32  std::vector<TH1F*> histograms;
33 
34  std::map<std::string, KMuon*> Muon;
35 
36  std::vector<TString> muonTypeVector = {"leading", "trailing", "positive", "negative"};
37  std::vector<TString> regionTypeVector = {"full", "peak", "sideband"};
38 
39  std::map<std::string, std::map<std::string, TH1F*>> Muon_ChargedFromFirstPVPtFlow;
40  std::map<std::string, std::map<std::string, TH1F*>> Muon_ChargedNotFromFirstPVPtFlow;
41  std::map<std::string, std::map<std::string, TH1F*>> Muon_NeutralFromFirstPVPtFlow;
42  std::map<std::string, std::map<std::string, TH1F*>> Muon_PhotonsFromFirstPVPtFlow;
43 };
virtual void Finish(setting_type const &settings, metadata_type const &metadata) override
Definition: EmbeddingConsumer.cc:89
virtual std::string GetConsumerId() const override
Definition: EmbeddingConsumer.cc:98
virtual void ProcessFilteredEvent(event_type const &event, product_type const &product, setting_type const &settings, metadata_type const &metadata) override
Definition: EmbeddingConsumer.cc:40
Definition: EmbeddingConsumer.h:13
virtual void FillPtFlowHistogram(std::map< std::string, TH1F * > histmap, std::vector< const KPFCandidate * > pf_collection, KMuon *muon, std::string region)
Definition: EmbeddingConsumer.cc:103
virtual void Init(setting_type const &settings, metadata_type &metadata) override
Definition: EmbeddingConsumer.cc:4