CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
QGLikelihoodDBReader.cc
Go to the documentation of this file.
1 #include <memory>
12 
14 public:
15  explicit QGLikelihoodDBReader(const edm::ParameterSet&);
16  ~QGLikelihoodDBReader() override{};
17 
18 private:
19  void beginJob() override{};
20  void analyze(const edm::Event&, const edm::EventSetup&) override;
21  void endJob() override{};
22 
26 };
27 
29  mPayloadName = iConfig.getUntrackedParameter<std::string>("payloadName");
31  mPrintScreen = iConfig.getUntrackedParameter<bool>("printScreen");
32  mCreateTextFile = iConfig.getUntrackedParameter<bool>("createTextFile");
33 }
34 
36  edm::LogInfo("UserOutput") << "Inspecting QGLikelihood payload with label:" << mPayloadName << std::endl;
38 
39  edm::LogInfo("UserOutput") << "Ranges in which the QGTagger could be applied:"
40  << " pt: " << QGLParamsColl->qgValidRange.PtMin << " --> "
41  << QGLParamsColl->qgValidRange.PtMax << ", eta: " << QGLParamsColl->qgValidRange.EtaMin
42  << " --> " << QGLParamsColl->qgValidRange.EtaMax
43  << ", rho: " << QGLParamsColl->qgValidRange.RhoMin << " --> "
44  << QGLParamsColl->qgValidRange.RhoMax << std::endl;
45 
46  std::vector<QGLikelihoodObject::Entry> const& data = QGLParamsColl->data;
47  edm::LogInfo("UserOutput") << "There are " << data.size()
48  << " entries (categories with associated PDF):" << std::endl;
49  for (auto idata = data.begin(); idata != data.end(); ++idata) {
50  int varIndex = idata->category.VarIndex;
51  int qgBin = idata->category.QGIndex;
52  double etaMin = idata->category.EtaMin;
53  double etaMax = idata->category.EtaMax;
54  double rhoMin = idata->category.RhoMin;
55  double rhoMax = idata->category.RhoMax;
56  double ptMin = idata->category.PtMin;
57  double ptMax = idata->category.PtMax;
58 
59  char buff[1000];
60  sprintf(buff,
61  "var=%1d, qg=%1d, ptMin=%8.2f, ptMax=%8.2f, etaMin=%3.1f, etaMax=%3.1f, rhoMin=%6.2f, rhoMax=%6.2f",
62  varIndex,
63  qgBin,
64  ptMin,
65  ptMax,
66  etaMin,
67  etaMax,
68  rhoMin,
69  rhoMax);
70  edm::LogVerbatim("UserOutput") << buff << std::endl;
71  }
72 }
73 
Log< level::Info, true > LogVerbatim
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< QGLikelihoodObject, QGLikelihoodRcd > mPayloadToken
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
constexpr float ptMin
tuple etaMin
Definition: Puppi_cff.py:45
int iEvent
Definition: GenABIO.cc:224
QGLikelihoodDBReader(const edm::ParameterSet &)
void analyze(const edm::Event &, const edm::EventSetup &) override
Log< level::Info, false > LogInfo
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:157
tuple etaMax
Definition: Puppi_cff.py:46