CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BTagPerformanceAnalyzerMC.h
Go to the documentation of this file.
1 #ifndef BTagPerformanceAnalyzerMC_H
2 #define BTagPerformanceAnalyzerMC_H
3 
28  public:
29  explicit BTagPerformanceAnalyzerMC(const edm::ParameterSet& pSet);
30 
32 
33  virtual void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup);
34 
35  private:
36 
37  struct JetRefCompare :
38  public std::binary_function<edm::RefToBase<reco::Jet>, edm::RefToBase<reco::Jet>, bool> {
39  inline bool operator () (const edm::RefToBase<reco::Jet> &j1,
40  const edm::RefToBase<reco::Jet> &j2) const
41  { return j1.id() < j2.id() || (j1.id() == j2.id() && j1.key() < j2.key()); }
42  };
43 
44  // Get histogram plotting options from configuration.
45  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
46 
47  EtaPtBin getEtaPtBin(const int& iEta, const int& iPt);
48 
49  typedef std::pair<reco::Jet, reco::JetFlavourInfo> JetWithFlavour;
50  typedef std::map<edm::RefToBase<reco::Jet>, unsigned int, JetRefCompare> FlavourMap;
51  typedef std::map<edm::RefToBase<reco::Jet>, reco::JetFlavour::Leptons, JetRefCompare> LeptonMap;
52 
53  bool getJetWithFlavour(const edm::Event& iEvent,
55  const FlavourMap& _flavours, JetWithFlavour &jetWithFlavour,
59 
60  std::vector<std::string> tiDataFormatType;
61  AcceptJet jetSelector; // Decides if jet and parton satisfy kinematic cuts.
62  std::vector<double> etaRanges, ptRanges;
64  bool doJEC;
65 
67 
71 
72  std::vector< std::vector<JetTagPlotter*> > binJetTagPlotters;
73  std::vector< std::vector<TagCorrelationPlotter*> > binTagCorrelationPlotters;
74  std::vector< std::vector<BaseTagInfoPlotter*> > binTagInfoPlotters;
75  std::vector<edm::InputTag> jetTagInputTags;
76  std::vector< std::pair<edm::InputTag, edm::InputTag> > tagCorrelationInputTags;
77  std::vector< std::vector<edm::InputTag> > tagInfoInputTags;
78  // JetFlavourIdentifier jfi;
79  std::vector<edm::ParameterSet> moduleConfig;
80  std::map<BaseTagInfoPlotter*, size_t> binTagInfoPlottersToModuleConfig;
81 
83  unsigned int mcPlots_;
84 
87 
88  bool doPUid;
91 
92  //add consumes
100  std::vector< edm::EDGetTokenT<reco::JetTagCollection> > jetTagToken;
101  std::vector< std::pair<edm::EDGetTokenT<reco::JetTagCollection>, edm::EDGetTokenT<reco::JetTagCollection>> > tagCorrelationToken;
102  std::vector<std::vector <edm::EDGetTokenT<edm::View<reco::BaseTagInfo>> >> tagInfoToken;
103 };
104 
105 
106 #endif
std::vector< std::pair< edm::InputTag, edm::InputTag > > tagCorrelationInputTags
std::vector< std::vector< TagCorrelationPlotter * > > binTagCorrelationPlotters
edm::EDGetTokenT< edm::Association< reco::GenJetCollection > > genJetsMatchedToken
edm::EDGetTokenT< reco::JetCorrector > jecMCToken
std::map< edm::RefToBase< reco::Jet >, unsigned int, JetRefCompare > FlavourMap
std::map< edm::RefToBase< reco::Jet >, reco::JetFlavour::Leptons, JetRefCompare > LeptonMap
std::vector< edm::EDGetTokenT< reco::JetTagCollection > > jetTagToken
std::vector< std::pair< edm::EDGetTokenT< reco::JetTagCollection >, edm::EDGetTokenT< reco::JetTagCollection > > > tagCorrelationToken
bool getJetWithGenJet(edm::RefToBase< reco::Jet > jetRef, edm::Handle< edm::Association< reco::GenJetCollection > > genJetsMatched)
ProductID id() const
Definition: RefToBase.h:233
std::pair< reco::Jet, reco::JetFlavourInfo > JetWithFlavour
edm::EDGetTokenT< GenEventInfoProduct > genToken
virtual void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup)
BTagPerformanceAnalyzerMC(const edm::ParameterSet &pSet)
int iEvent
Definition: GenABIO.cc:230
edm::EDGetTokenT< reco::JetFlavourMatchingCollection > caloJetToken
tuple corrector
Definition: mvaPFMET_cff.py:86
size_t key() const
Definition: RefToBase.h:241
edm::EDGetTokenT< reco::JetFlavourInfoMatchingCollection > jetToken
edm::EDGetTokenT< reco::JetCorrector > jecDataToken
std::vector< std::vector< BaseTagInfoPlotter * > > binTagInfoPlotters
std::vector< edm::ParameterSet > moduleConfig
std::vector< std::vector< edm::InputTag > > tagInfoInputTags
EtaPtBin getEtaPtBin(const int &iEta, const int &iPt)
bool operator()(const edm::RefToBase< reco::Jet > &j1, const edm::RefToBase< reco::Jet > &j2) const
lepton info struct
Definition: JetFlavour.h:25
std::vector< std::vector< edm::EDGetTokenT< edm::View< reco::BaseTagInfo > > > > tagInfoToken
std::vector< std::string > tiDataFormatType
edm::EDGetTokenT< reco::SoftLeptonTagInfoCollection > slInfoToken
std::vector< edm::InputTag > jetTagInputTags
std::vector< std::vector< JetTagPlotter * > > binJetTagPlotters
std::map< BaseTagInfoPlotter *, size_t > binTagInfoPlottersToModuleConfig
bool getJetWithFlavour(const edm::Event &iEvent, edm::RefToBase< reco::Jet > caloRef, const FlavourMap &_flavours, JetWithFlavour &jetWithFlavour, const reco::JetCorrector *corrector, edm::Handle< edm::Association< reco::GenJetCollection > > genJetsMatched)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: Run.h:43