-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 #43186 from francescobrivio/alca-add_SimBeamSpotHL…
…LHCObjects Add new SimBeamSpotHLLHC CondFormat
- Loading branch information
Showing
28 changed files
with
1,304 additions
and
152 deletions.
There are no files selected for viewing
469 changes: 468 additions & 1 deletion
469
CondCore/BeamSpotPlugins/interface/BeamSpotPayloadInspectorHelper.h
Large diffs are not rendered by default.
Oops, something went wrong.
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
30 changes: 30 additions & 0 deletions
30
CondCore/BeamSpotPlugins/plugins/SimBeamSpotHLLHC_PayloadInspector.cc
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,30 @@ | ||
#include "CondCore/BeamSpotPlugins/interface/BeamSpotPayloadInspectorHelper.h" | ||
#include "CondCore/CondDB/interface/Time.h" | ||
#include "CondCore/Utilities/interface/PayloadInspector.h" | ||
#include "CondCore/Utilities/interface/PayloadInspectorModule.h" | ||
#include "CondFormats/BeamSpotObjects/interface/SimBeamSpotHLLHCObjects.h" | ||
|
||
namespace { | ||
|
||
/************************************************ | ||
Display of Sim Beam Spot HL-LHC parameters | ||
*************************************************/ | ||
|
||
typedef simBeamSpotHLLHCPI::DisplayParameters<SimBeamSpotHLLHCObjects> SimBeamSpotHLLHCParameters; | ||
|
||
/********************************************************* | ||
Display of Sim Beam Spot HL-LHC parameters Differences | ||
**********************************************************/ | ||
|
||
typedef simBeamSpotHLLHCPI::DisplayParametersDiff<SimBeamSpotHLLHCObjects, cond::payloadInspector::MULTI_IOV, 1> | ||
SimBeamSpotHLLHCParametersDiffSingleTag; | ||
typedef simBeamSpotHLLHCPI::DisplayParametersDiff<SimBeamSpotHLLHCObjects, cond::payloadInspector::SINGLE_IOV, 2> | ||
SimBeamSpotHLLHCParametersDiffTwoTags; | ||
|
||
} // namespace | ||
|
||
PAYLOAD_INSPECTOR_MODULE(SimBeamSpotHLLHC) { | ||
PAYLOAD_INSPECTOR_CLASS(SimBeamSpotHLLHCParameters); | ||
PAYLOAD_INSPECTOR_CLASS(SimBeamSpotHLLHCParametersDiffSingleTag); | ||
PAYLOAD_INSPECTOR_CLASS(SimBeamSpotHLLHCParametersDiffTwoTags); | ||
} |
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,13 +1,16 @@ | ||
#include "CondCore/ESSources/interface/registration_macros.h" | ||
#include "CondFormats/BeamSpotObjects/interface/BeamSpotObjects.h" | ||
#include "CondFormats/BeamSpotObjects/interface/BeamSpotOnlineObjects.h" | ||
#include "CondFormats/BeamSpotObjects/interface/SimBeamSpotObjects.h" | ||
#include "CondFormats/BeamSpotObjects/interface/SimBeamSpotHLLHCObjects.h" | ||
#include "CondFormats/DataRecord/interface/BeamSpotObjectsRcd.h" | ||
#include "CondFormats/DataRecord/interface/SimBeamSpotObjectsRcd.h" | ||
#include "CondFormats/DataRecord/interface/BeamSpotOnlineHLTObjectsRcd.h" | ||
#include "CondFormats/DataRecord/interface/BeamSpotOnlineLegacyObjectsRcd.h" | ||
#include "CondFormats/BeamSpotObjects/interface/BeamSpotObjects.h" | ||
#include "CondFormats/BeamSpotObjects/interface/SimBeamSpotObjects.h" | ||
#include "CondFormats/BeamSpotObjects/interface/BeamSpotOnlineObjects.h" | ||
#include "CondFormats/DataRecord/interface/SimBeamSpotObjectsRcd.h" | ||
#include "CondFormats/DataRecord/interface/SimBeamSpotHLLHCObjectsRcd.h" | ||
|
||
REGISTER_PLUGIN(BeamSpotObjectsRcd, BeamSpotObjects); | ||
REGISTER_PLUGIN(SimBeamSpotObjectsRcd, SimBeamSpotObjects); | ||
REGISTER_PLUGIN(BeamSpotOnlineHLTObjectsRcd, BeamSpotOnlineObjects); | ||
REGISTER_PLUGIN_NO_SERIAL(BeamSpotOnlineLegacyObjectsRcd, BeamSpotOnlineObjects); | ||
REGISTER_PLUGIN(SimBeamSpotObjectsRcd, SimBeamSpotObjects); | ||
REGISTER_PLUGIN(SimBeamSpotHLLHCObjectsRcd, SimBeamSpotHLLHCObjects); |
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
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
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
106 changes: 106 additions & 0 deletions
106
CondFormats/BeamSpotObjects/interface/SimBeamSpotHLLHCObjects.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 |
---|---|---|
@@ -0,0 +1,106 @@ | ||
#ifndef CondFormats_BeamSpotObjects_SimBeamSpotHLLHCObjects_h | ||
#define CondFormats_BeamSpotObjects_SimBeamSpotHLLHCObjects_h | ||
|
||
/** \class SimBeamSpotHLLHCObjects | ||
* | ||
* Provide the vertex smearing parameters from DB | ||
* | ||
* This Object contains the parameters needed by the HLLHCEvtVtxGenerator generator: | ||
* Parameters used: | ||
* - fMeanX, fMeanY, fMeanZ | ||
* - fEProton, fCrabFrequency, fRF800 | ||
* - fCrossingAngle | ||
* - fCrabbingAngleCrossing, fCrabbingAngleSeparation | ||
* - fBetaCrossingPlane, fBetaSeparationPlane | ||
* - fHorizontalEmittance, fVerticalEmittance | ||
* - fBunchLength | ||
* - fTimeOffset | ||
* | ||
*/ | ||
|
||
#include "CondFormats/Serialization/interface/Serializable.h" | ||
|
||
#include <sstream> | ||
|
||
class SimBeamSpotHLLHCObjects { | ||
public: | ||
/// default constructor | ||
SimBeamSpotHLLHCObjects() { | ||
fMeanX = 0.0; | ||
fMeanY = 0.0; | ||
fMeanZ = 0.0; | ||
fEProton = 0.0; | ||
fCrabFrequency = 0.0; | ||
fRF800 = 0.0; | ||
fCrossingAngle = 0.0; | ||
fCrabbingAngleCrossing = 0.0; | ||
fCrabbingAngleSeparation = 0.0; | ||
fBetaCrossingPlane = 0.0; | ||
fBetaSeparationPlane = 0.0; | ||
fHorizontalEmittance = 0.0; | ||
fVerticalEmittance = 0.0; | ||
fBunchLength = 0.0; | ||
fTimeOffset = 0.0; | ||
}; | ||
|
||
virtual ~SimBeamSpotHLLHCObjects(){}; | ||
|
||
/// set meanX, meanY, meanZ | ||
void setMeanX(double val) { fMeanX = val; } | ||
void setMeanY(double val) { fMeanY = val; } | ||
void setMeanZ(double val) { fMeanZ = val; } | ||
/// set EProton, fCrabFrequency, RF800 | ||
void setEProton(double val) { fEProton = val; } | ||
void setCrabFrequency(double val) { fCrabFrequency = val; } | ||
void setRF800(double val) { fRF800 = val; } | ||
/// set Crossing and Crabbing angles | ||
void setCrossingAngle(double val) { fCrossingAngle = val; } | ||
void setCrabbingAngleCrossing(double val) { fCrabbingAngleCrossing = val; } | ||
void setCrabbingAngleSeparation(double val) { fCrabbingAngleSeparation = val; } | ||
/// set BetaStar and Emittance | ||
void setBetaCrossingPlane(double val) { fBetaCrossingPlane = val; } | ||
void setBetaSeparationPlane(double val) { fBetaSeparationPlane = val; } | ||
void setHorizontalEmittance(double val) { fHorizontalEmittance = val; } | ||
void setVerticalEmittance(double val) { fVerticalEmittance = val; } | ||
/// set BunchLength and TimeOffset | ||
void setBunchLength(double val) { fBunchLength = val; } | ||
void setTimeOffset(double val) { fTimeOffset = val; } | ||
|
||
/// get meanX, meanY, meanZ position | ||
double meanX() const { return fMeanX; } | ||
double meanY() const { return fMeanY; } | ||
double meanZ() const { return fMeanZ; } | ||
/// get EProton, fCrabFrequency, RF800 | ||
double eProton() const { return fEProton; } | ||
double crabFrequency() const { return fCrabFrequency; } | ||
double rf800() const { return fRF800; } | ||
/// set Crossing and Crabbing angles | ||
double crossingAngle() const { return fCrossingAngle; } | ||
double crabbingAngleCrossing() const { return fCrabbingAngleCrossing; } | ||
double crabbingAngleSeparation() const { return fCrabbingAngleSeparation; } | ||
/// get BetaStar and Emittance | ||
double betaCrossingPlane() const { return fBetaCrossingPlane; } | ||
double betaSeparationPlane() const { return fBetaSeparationPlane; } | ||
double horizontalEmittance() const { return fHorizontalEmittance; } | ||
double verticalEmittance() const { return fVerticalEmittance; } | ||
/// get BunchLength and TimeOffset | ||
double bunchLenght() const { return fBunchLength; } | ||
double timeOffset() const { return fTimeOffset; } | ||
|
||
/// print sim beam spot parameters | ||
void print(std::stringstream& ss) const; | ||
|
||
private: | ||
double fMeanX, fMeanY, fMeanZ; | ||
double fEProton, fCrabFrequency, fRF800; | ||
double fCrossingAngle, fCrabbingAngleCrossing, fCrabbingAngleSeparation; | ||
double fBetaCrossingPlane, fBetaSeparationPlane; | ||
double fHorizontalEmittance, fVerticalEmittance; | ||
double fBunchLength, fTimeOffset; | ||
|
||
COND_SERIALIZABLE; | ||
}; | ||
|
||
std::ostream& operator<<(std::ostream&, SimBeamSpotHLLHCObjects beam); | ||
|
||
#endif |
31 changes: 31 additions & 0 deletions
31
CondFormats/BeamSpotObjects/src/SimBeamSpotHLLHCObjects.cc
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,31 @@ | ||
#include "CondFormats/BeamSpotObjects/interface/SimBeamSpotHLLHCObjects.h" | ||
|
||
#include <iostream> | ||
|
||
void SimBeamSpotHLLHCObjects::print(std::stringstream& ss) const { | ||
ss << "------------------------------------------------------------------------\n" | ||
<< " Sim Beam Spot HL LHC Data\n\n" | ||
<< " MeanX = " << meanX() << " [cm]\n" | ||
<< " MeanY = " << meanY() << " [cm]\n" | ||
<< " MeanZ = " << meanZ() << " [cm]\n" | ||
<< " E Proton = " << eProton() << " [GeV]\n" | ||
<< " Crab Frequency = " << crabFrequency() << " [MHz]\n" | ||
<< " 800 MHz RF ? " << rf800() << "\n" | ||
<< " Crossing Angle = " << crossingAngle() << " [urad]\n" | ||
<< " Crabbing Angle Crossing = " << crabbingAngleCrossing() << " [urad]\n" | ||
<< " Crabbing Angle Separation = " << crabbingAngleSeparation() << " [urad]\n" | ||
<< " Beta Crossing Plane = " << betaCrossingPlane() << " [m]\n" | ||
<< " Beta Separation Plane = " << betaSeparationPlane() << " [m]\n" | ||
<< " Horizontal Emittance = " << horizontalEmittance() << " [mm]\n" | ||
<< " Vertical Emittance = " << verticalEmittance() << " [mm]\n" | ||
<< " Bunch Lenght = " << bunchLenght() << " [m]\n" | ||
<< " TimeOffset = " << timeOffset() << " [ns]\n" | ||
<< "------------------------------------------------------------------------\n\n"; | ||
} | ||
|
||
std::ostream& operator<<(std::ostream& os, SimBeamSpotHLLHCObjects beam) { | ||
std::stringstream ss; | ||
beam.print(ss); | ||
os << ss.str(); | ||
return os; | ||
} |
3 changes: 3 additions & 0 deletions
3
CondFormats/BeamSpotObjects/src/T_EventSetup_SimBeamSpotHLLHCObjects.cc
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,3 @@ | ||
#include "CondFormats/BeamSpotObjects/interface/SimBeamSpotHLLHCObjects.h" | ||
#include "FWCore/Utilities/interface/typelookup.h" | ||
TYPELOOKUP_DATA_REG(SimBeamSpotHLLHCObjects); |
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,5 +1,6 @@ | ||
<lcgdict> | ||
<class name="BeamSpotObjects"/> | ||
<class name="SimBeamSpotObjects"/> | ||
<class name="BeamSpotObjects"/> | ||
<class name="BeamSpotOnlineObjects"/> | ||
<class name="SimBeamSpotObjects"/> | ||
<class name="SimBeamSpotHLLHCObjects"/> | ||
</lcgdict> |
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,4 @@ | ||
#include "CondFormats/BeamSpotObjects/interface/BeamSpotObjects.h" | ||
#include "CondFormats/BeamSpotObjects/interface/SimBeamSpotObjects.h" | ||
#include "CondFormats/BeamSpotObjects/interface/BeamSpotOnlineObjects.h" | ||
#include "CondFormats/BeamSpotObjects/interface/SimBeamSpotObjects.h" | ||
#include "CondFormats/BeamSpotObjects/interface/SimBeamSpotHLLHCObjects.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
23 changes: 23 additions & 0 deletions
23
CondFormats/DataRecord/interface/SimBeamSpotHLLHCObjectsRcd.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef DataRecord_SimBeamSpotHLLHCObjectsRcd_h | ||
#define DataRecord_SimBeamSpotHLLHCObjectsRcd_h | ||
// -*- C++ -*- | ||
// | ||
// Package: DataRecord | ||
// Class : SimBeamSpotHLLHCObjectsRcd | ||
// | ||
/**\class SimBeamSpotHLLHCObjectsRcd SimBeamSpotHLLHCObjectsRcd.h CondFormats/DataRecord/interface/SimBeamSpotHLLHCObjectsRcd.h | ||
Description: Contains the Vertex Smearing parameters used by HLLHCEvtVtxGenerator (Phase 2 BeamSpot simulation) | ||
*/ | ||
// | ||
// Author: Francesco Brivio (INFN Milano-Bicocca) | ||
// Created: Thu Nov 2 2023 | ||
// | ||
|
||
#include "FWCore/Framework/interface/EventSetupRecordImplementation.h" | ||
|
||
class SimBeamSpotHLLHCObjectsRcd : public edm::eventsetup::EventSetupRecordImplementation<SimBeamSpotHLLHCObjectsRcd> { | ||
}; | ||
|
||
#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: DataRecord | ||
// Class : SimBeamSpotHLLHCObjectsRcd | ||
// | ||
// Implementation: | ||
// <Notes on implementation> | ||
// | ||
// Author: Francesco Brivio (INFN Milano-Bicocca) | ||
// Created: Thu Nov 2 2023 | ||
|
||
#include "CondFormats/DataRecord/interface/SimBeamSpotHLLHCObjectsRcd.h" | ||
#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h" | ||
|
||
EVENTSETUP_RECORD_REG(SimBeamSpotHLLHCObjectsRcd); |
Oops, something went wrong.