Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:46

0001 #ifndef JetTagPlotter_H
0002 #define JetTagPlotter_H
0003 
0004 #include "TH1F.h"
0005 
0006 #include <string>
0007 #include <vector>
0008 #include "DQMOffline/RecoB/interface/FlavourHistorgrams.h"
0009 #include "DQMOffline/RecoB/interface/BaseBTagPlotter.h"
0010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0011 #include "DataFormats/BTauReco/interface/JetTag.h"
0012 #include "DQMServices/Core/interface/DQMStore.h"
0013 
0014 class JetTagPlotter : public BaseBTagPlotter {
0015 public:
0016   JetTagPlotter(const std::string& tagName,
0017                 const EtaPtBin& etaPtBin,
0018                 const edm::ParameterSet& pSet,
0019                 unsigned int mc,
0020                 bool willFinalize,
0021                 DQMStore::IBooker& ibook,
0022                 bool doCTagPlots = false,
0023                 bool doDifferentialPlots = false,
0024                 double discrCut = -999.);
0025 
0026   ~JetTagPlotter() override;
0027 
0028   void analyzeTag();         //added to fill the jet multiplicity on data
0029   void analyzeTag(float w);  //added to fill the jet multiplicity on mc
0030   //void analyzeTag (const reco::JetTag & jetTag, const double & jec, const int & jetFlavour);
0031   void analyzeTag(const reco::JetTag& jetTag, double jec, int jetFlavour, float w = 1);
0032   //void analyzeTag (const reco::Jet & jet, const double & jec, const float& discriminator, const int& jetFlavour);
0033   void analyzeTag(const reco::Jet& jet, double jec, float discriminator, int jetFlavour, float w = 1);
0034 
0035   // final computation, plotting, printing .......
0036   void finalize(DQMStore::IBooker& ibook_, DQMStore::IGetter& igetter_) override;
0037 
0038   // get "2d" histograms for misid. vs. b-eff
0039   EffPurFromHistos& getEffPurFromHistos() { return *effPurFromHistos_; }
0040 
0041   void epsPlot(const std::string& name) override;
0042   void psPlot(const std::string& name) override;
0043 
0044   int nBinEffPur() const { return nBinEffPur_; }
0045   double startEffPur() const { return startEffPur_; }
0046   double endEffPur() const { return endEffPur_; }
0047 
0048 protected:
0049   // binning and bounds
0050   // 1) for 'efficiency' versus discriminator cut histos
0051   double discrStart_;
0052   double discrEnd_;
0053   int nBinEffPur_;
0054   double startEffPur_;
0055   double endEffPur_;
0056 
0057   unsigned int mcPlots_;
0058   bool willFinalize_;
0059 
0060   bool doCTagPlots_;
0061 
0062   // Differential plots: efficiency vs. variable for cut on discrimator > cutValue_
0063   bool doDifferentialPlots_;
0064   double cutValue_;
0065 
0066   std::vector<int> nJets_;
0067 
0068   // jet multiplicity
0069   std::unique_ptr<FlavourHistograms<int>> jetMultiplicity_;
0070 
0071   // for the misid vs. eff plots
0072   std::unique_ptr<EffPurFromHistos> effPurFromHistos_;
0073 
0074   std::unique_ptr<FlavourHistograms<int>> dJetFlav_;
0075 
0076   // Discriminator: again with reasonable binning
0077   std::unique_ptr<FlavourHistograms<double>> dDiscriminator_;
0078 
0079   // reconstructed jet momentum
0080   std::unique_ptr<FlavourHistograms<double>> dJetRecMomentum_;
0081 
0082   // reconstructed jet transverse momentum
0083   std::unique_ptr<FlavourHistograms<double>> dJetRecPt_;
0084 
0085   // reconstructed jet eta
0086   std::unique_ptr<FlavourHistograms<double>> dJetRecPseudoRapidity_;
0087 
0088   // reconstructed jet phi
0089   std::unique_ptr<FlavourHistograms<double>> dJetRecPhi_;
0090 
0091   // jet Phi larger than requested discrimnator cut
0092   std::unique_ptr<FlavourHistograms<double>> dJetPhiDiscrCut_;
0093 
0094   // jet Eta larger than requested discrimnator cut
0095   std::unique_ptr<FlavourHistograms<double>> dJetPseudoRapidityDiscrCut_;
0096 };
0097 
0098 #endif