-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add new SimBeamSpotHLLHC CondFormat #43186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cmsbuild
merged 5 commits into
cms-sw:master
from
francescobrivio:alca-add_SimBeamSpotHLLHCObjects
Jul 4, 2024
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
33860ed
Add SimBeamSpotHLLHCObjects CondFormat and update HLLHCEvtVtxGenerato…
francescobrivio d6b3a51
remove unused and deprecated CrabKissing VtxGenerator configs
francescobrivio db9678b
fix missed CLHEP declarations in HLLHCEvtVtxGenerator
francescobrivio d4a9b65
use CLHEP namespace for c_light and update header guard
francescobrivio 17721fb
rename fTimeOffset to fTimeOffset_c_light and use correct gamma formula
francescobrivio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.