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
lumi::NormDML::normIdByType
void normIdByType(const coral::ISchema &schema, std::map< std::string, unsigned long long > &resultMap, LumiType=HF, bool defaultonly=true)
Definition: NormDML.cc:47
lumi::NormDML::normData::coefficientmap
std::map< std::string, float > coefficientmap
Definition: NormDML.h:31
lumi::NormDML::normData::beamegev
unsigned int beamegev
Definition: NormDML.h:33
lumi::NormDML::normIdByName
unsigned long long normIdByName(const coral::ISchema &schema, const std::string &normtagname)
Definition: NormDML.cc:16
lumi::NormDML::NormDML
NormDML()
Definition: NormDML.cc:15
lumi::NormDML::HF
Definition: NormDML.h:35
lumi::NormDML::normData::normtag
std::string normtag
Definition: NormDML.h:28
coral
Definition: Binary.h:9
lumi::NormDML::LumiType
LumiType
Definition: NormDML.h:35
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
lumi::NormDML::normData::amodetag
std::string amodetag
Definition: NormDML.h:32
lumi::NormDML::~NormDML
~NormDML()
Definition: NormDML.h:37
lumi::NormDML
Definition: NormDML.h:25
lumi::NormDML::normData::afterglows
std::map< unsigned int, float > afterglows
Definition: NormDML.h:30
lumi::NormDML::parseAfterglows
void parseAfterglows(const std::string &afterglowStr, std::map< unsigned int, float > &afterglowmap)
Definition: NormDML.cc:147
lumi::NormDML::normData::corrfunc
std::string corrfunc
Definition: NormDML.h:29
lumi::NormDML::normData
Definition: NormDML.h:27
lumi::NormDML::parseLumiCorrector
void parseLumiCorrector(const std::string &correctorStr, std::vector< std::string > &correctorParams)
Definition: NormDML.cc:142
lumi::NormDML::PIXEL
Definition: NormDML.h:35
mps_fire.result
result
Definition: mps_fire.py:311
lumi::NormDML::normById
void normById(const coral::ISchema &schema, unsigned long long normid, std::map< unsigned int, normData > &result)
Definition: NormDML.cc:97
lumi
Definition: LumiSectionData.h:20