CMS 3D CMS Logo

NormDML.h
Go to the documentation of this file.
1 #ifndef RecoLuminosity_LumiProducer_NormDML_H
2 #define RecoLuminosity_LumiProducer_NormDML_H
3 // -*- C++ -*-
4 //
5 // Package: LumiProducer
6 // Class: NormDML
7 //
15 //
16 // Original Author: Zhen Xie
17 //
18 #include <string>
19 #include <vector>
20 #include <map>
21 namespace coral {
22  class ISchema;
23 }
24 namespace lumi {
25  class NormDML {
26  public:
27  struct normData {
30  std::map<unsigned int, float> afterglows;
31  std::map<std::string, float> coefficientmap;
33  unsigned int beamegev;
34  };
35  enum LumiType { HF, PIXEL };
36  NormDML();
37  ~NormDML() {}
38  /*
39  find the most recent id for the given norm tag
40  */
41  unsigned long long normIdByName(const coral::ISchema& schema, const std::string& normtagname);
42  /*
43  find the most recent normid for the given norm type
44  */
45  void normIdByType(const coral::ISchema& schema,
46  std::map<std::string, unsigned long long>& resultMap,
47  LumiType = HF,
48  bool defaultonly = true);
49  /*
50  retrieve norm data by normid
51  */
52  void normById(const coral::ISchema& schema, unsigned long long normid, std::map<unsigned int, normData>& result);
53 
54  /*
55  parse corrector functions
56  */
57  void parseLumiCorrector(const std::string& correctorStr, std::vector<std::string>& correctorParams);
58  void parseAfterglows(const std::string& afterglowStr, std::map<unsigned int, float>& afterglowmap);
59  };
60 } // namespace lumi
61 #endif
unsigned int beamegev
Definition: NormDML.h:33
std::map< unsigned int, float > afterglows
Definition: NormDML.h:30
Definition: Binary.h:9
std::string normtag
Definition: NormDML.h:28
std::string corrfunc
Definition: NormDML.h:29
std::string amodetag
Definition: NormDML.h:32
std::map< std::string, float > coefficientmap
Definition: NormDML.h:31