Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20651 from capalmer85/lumicorrrcdfor94X
add LumiCorrections records and definitions; adding LumiInfo.h members/methods
- Loading branch information
Showing
14 changed files
with
285 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
#include "CondCore/ESSources/interface/registration_macros.h" | ||
#include "CondFormats/Luminosity/interface/LumiSectionData.h" | ||
#include "CondFormats/DataRecord/interface/LumiSectionDataRcd.h" | ||
#include "CondFormats/Luminosity/interface/LumiCorrections.h" | ||
#include "CondFormats/DataRecord/interface/LumiCorrectionsRcd.h" | ||
|
||
|
||
REGISTER_PLUGIN(LumiSectionDataRcd, lumi::LumiSectionData); | ||
|
||
|
||
REGISTER_PLUGIN(LumiCorrectionsRcd, LumiCorrections); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef DataRecord_LumiCorrectionsRcd_h | ||
#define DataRecord_LumiCorrectionsRcd_h | ||
// -*- C++ -*- | ||
// | ||
// Package: CondFormats/DataRecord | ||
// Class : LumiCorrectionsRcd | ||
// | ||
/**\class LumiCorrectionsRcd LumiCorrectionsRcd.h CondFormats/DataRecord/interface/LumiCorrectionsRcd.h | ||
Description: [one line class summary] | ||
Usage: | ||
<usage> | ||
*/ | ||
// | ||
// Author: Sam Higginbotham | ||
// Created: Fri, 21 Jul 2017 18:15:12 GMT | ||
// | ||
|
||
#include "FWCore/Framework/interface/EventSetupRecordImplementation.h" | ||
|
||
class LumiCorrectionsRcd : public edm::eventsetup::EventSetupRecordImplementation<LumiCorrectionsRcd> {}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// -*- C++ -*- | ||
// | ||
// Package: CondFormats/DataRecord | ||
// Class : LumiCorrectionsRcd | ||
// | ||
// Implementation: | ||
// [Notes on implementation] | ||
// | ||
// Author: Sam Higginbotham | ||
// Created: Fri, 21 Jul 2017 18:15:12 GMT | ||
|
||
#include "CondFormats/DataRecord/interface/LumiCorrectionsRcd.h" | ||
#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h" | ||
|
||
EVENTSETUP_RECORD_REG(LumiCorrectionsRcd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#ifndef CondFormats_Luminosity_LumiCorrections_h | ||
#define CondFormats_Luminosity_LumiCorrections_h | ||
|
||
/** | ||
* \class LumiCorrections | ||
* | ||
* \author Sam Higginbotham, Chris Palmer | ||
* | ||
* This class should contain scale factors for correcting | ||
* out-of-time pile-up per bunch crossing on rates intended | ||
* for luminosity estimates. There is the option of saving | ||
* the total scale factor on the total luminosity in | ||
* m_overallCorrection as well. | ||
*/ | ||
|
||
|
||
#include <sstream> | ||
#include <cstring> | ||
#include <vector> | ||
#include <boost/serialization/vector.hpp> | ||
#include "CondFormats/Serialization/interface/Serializable.h" | ||
|
||
class LumiCorrections { | ||
public: | ||
void setOverallCorrection(float overallCorrection){m_overallCorrection=overallCorrection;} | ||
void setType1Fraction(float type1frac){m_type1Fraction=type1frac;} | ||
void setType1Residual(float type1res){m_type1Residual=type1res;} | ||
void setType2Residual(float type2res){m_type2Residual=type2res;} | ||
void setCorrectionsBX(std::vector<float>& correctBX){m_correctionsBX.assign(correctBX.begin(),correctBX.end());} | ||
float getOverallCorrection(){return m_overallCorrection;} | ||
float getCorrectionAtBX(float bx){return m_correctionsBX[bx];} | ||
float getType1Fraction(){return m_type1Fraction;} | ||
float getType1Residual(){return m_type1Residual;} | ||
float getType2Residual(){return m_type2Residual;} | ||
const std::vector<float>& getCorrectionsBX() const{return m_correctionsBX;} | ||
private: | ||
float m_overallCorrection; | ||
float m_type1Fraction; | ||
float m_type1Residual; | ||
float m_type2Residual; | ||
std::vector<float> m_correctionsBX; | ||
COND_SERIALIZABLE; | ||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// T_EventSetup_LumiCorrections.cc | ||
|
||
#include "CondFormats/Luminosity/interface/LumiCorrections.h" | ||
#include "FWCore/Utilities/interface/typelookup.h" | ||
|
||
TYPELOOKUP_DATA_REG(LumiCorrections); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#include "CondFormats/Luminosity/interface/LumiSectionData.h" | ||
#include "CondFormats/Luminosity/interface/LumiCorrections.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
<bin file="testSerializationLuminosity.cpp"> | ||
<use name="CondFormats/Luminosity"/> | ||
</bin> | ||
<bin file="testSerializationLumiCorrections.cpp"> | ||
<use name="CondFormats/Luminosity"/> | ||
</bin> |
7 changes: 7 additions & 0 deletions
7
CondFormats/Luminosity/test/testSerializationLumiCorrections.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include "CondFormats/Serialization/interface/Test.h" | ||
#include "CondFormats/Luminosity/interface/LumiCorrections.h" | ||
|
||
int main() | ||
{ | ||
testSerialization<LumiCorrections>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.