|
using | EventSetupRecordKey = eventsetup::EventSetupRecordKey |
|
using | KeyedResolversVector = std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >> |
|
ESConsumesInfo * | consumesInfoPushBackNew () |
|
unsigned int | consumesInfoSize () const |
|
template<typename CallbackT , typename TList , typename TRecord > |
void | registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel) |
|
template<typename CallbackT , typename TRecord > |
void | registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &) |
|
template<typename T > |
auto | setWhatProduced (T *iThis, const es::Label &iLabel={}) |
|
template<typename T > |
auto | setWhatProduced (T *iThis, const char *iLabel) |
|
template<typename T > |
auto | setWhatProduced (T *iThis, const std::string &iLabel) |
|
template<typename T , typename TDecorator > |
auto | setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={}) |
|
template<typename T , typename TReturn , typename TRecord > |
auto | setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={}) |
|
template<typename T , typename TReturn , typename TRecord , typename TDecorator > |
auto | setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TDecorator &iDec, const es::Label &iLabel={}) |
|
template<typename TFunc > |
auto | setWhatProduced (TFunc &&func, const es::Label &iLabel={}) |
|
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator > |
ESConsumesCollectorT< TRecord > | setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={}) |
|
void | usesResources (std::vector< std::string > const &) |
|
template<class TFactory > |
void | registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string()) |
|
virtual void | registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ESProductResolverFactoryBase > iFactory, const std::string &iLabel=std::string()) |
|
KeyedResolversVector | registerResolvers (const EventSetupRecordKey &, unsigned int iovIndex) override |
|
template<class T > |
void | usingRecord () |
|
void | usingRecordWithKey (const EventSetupRecordKey &key) |
|
Definition at line 70 of file CTPPSInterpolatedOpticalFunctionsESSource.cc.
References LHCInfoCombined::createLHCInfoCombined(), LHCInfoCombined::crossingAngleInvalid, currentCrossingAngle_, currentData_, currentDataValid_, MillePedeFileConverter_cfg::e, Exception, dqmdumpme::first, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), LHCInterpolatedOpticalFunctionsSet::initializeSplines(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, lhcInfoPerFillToken_, lhcInfoPerLSToken_, lhcInfoToken_, LHCOpticalFunctionsSet::m_fcn_values, LHCOpticalFunctionsSet::m_xi_values, LHCOpticalFunctionsSet::m_z, eostools::move(), GetRecoTauVFromDQM_MC_cff::next, LHCOpticalFunctionsSet::nFunctions, opticsToken_, pi, useNewLHCInfo_, and protons_cff::xi.
85 if (lhcInfoCombined.isCrossingAngleInvalid()) {
86 edm::LogInfo(
"CTPPSInterpolatedOpticalFunctionsESSource")
87 <<
"Invalid crossing angle, no optical functions produced.";
91 currentData_ = std::make_shared<LHCInterpolatedOpticalFunctionsSetCollection>();
98 edm::LogInfo(
"CTPPSInterpolatedOpticalFunctionsESSource")
102 if (ofColl.empty()) {
103 edm::LogInfo(
"CTPPSInterpolatedOpticalFunctionsESSource")
104 <<
"No input optics available, no optical functions produced.";
107 currentData_ = std::make_shared<LHCInterpolatedOpticalFunctionsSetCollection>();
113 if (ofColl.size() == 1) {
114 const auto &
it = ofColl.begin();
119 <<
"Cannot interpolate: input given only for xangle " <<
it->first <<
" while interpolation requested for " 122 currentData_ = std::make_shared<LHCInterpolatedOpticalFunctionsSetCollection>();
123 for (
const auto &rp_p :
it->second) {
124 const auto rpId = rp_p.first;
126 iof.initializeSplines();
134 if (ofColl.size() > 1) {
136 auto it1 = ofColl.begin();
140 for (; it1 != ofColl.end(); ++it1) {
143 if (it2 == ofColl.end()) {
145 it1 = std::prev(it1);
154 const auto &xangle1 = it1->first;
155 const auto &xangle2 = it2->first;
157 const auto &ofs1 = it1->second;
158 const auto &ofs2 = it2->second;
161 currentData_ = std::make_shared<LHCInterpolatedOpticalFunctionsSetCollection>();
162 for (
const auto &rp_p : ofs1) {
163 const auto rpId = rp_p.first;
164 const auto &rp_it2 = ofs2.find(rpId);
165 if (rp_it2 == ofs2.end())
166 throw cms::Exception(
"CTPPSInterpolatedOpticalFunctionsESSource") <<
"RP mismatch between ofs1 and ofs2.";
168 const auto &of1 = rp_p.second;
169 const auto &of2 = rp_it2->second;
171 const size_t num_xi_vals1 = of1.getXiValues().size();
172 const size_t num_xi_vals2 = of2.getXiValues().size();
174 if (num_xi_vals1 != num_xi_vals2)
175 throw cms::Exception(
"CTPPSInterpolatedOpticalFunctionsESSource") <<
"Size mismatch between ofs1 and ofs2.";
177 const size_t num_xi_vals = num_xi_vals1;
180 iof.
m_z = of1.getScoringPlaneZ();
184 for (
size_t fi = 0; fi < of1.getFcnValues().size(); ++fi) {
187 for (
size_t pi = 0;
pi < num_xi_vals; ++
pi) {
188 double xi = of1.getXiValues()[
pi];
189 double xi_control = of2.getXiValues()[
pi];
191 if (fabs(
xi - xi_control) > 1
e-6)
192 throw cms::Exception(
"CTPPSInterpolatedOpticalFunctionsESSource") <<
"Xi mismatch between ofs1 and ofs2.";
196 double v1 = of1.getFcnValues()[fi][
pi];
197 double v2 = of2.getFcnValues()[fi][
pi];
edm::ESGetToken< LHCInfoPerLS, LHCInfoPerLSRcd > lhcInfoPerLSToken_
const bool useNewLHCInfo_
edm::ESGetToken< LHCInfo, LHCInfoRcd > lhcInfoToken_
std::shared_ptr< LHCInterpolatedOpticalFunctionsSetCollection > currentData_
static constexpr float crossingAngleInvalid
float currentCrossingAngle_
std::vector< double > m_xi_values
void initializeSplines()
builds splines from m_*_values fields
Log< level::Info, false > LogInfo
edm::ESGetToken< LHCOpticalFunctionsSetCollection, CTPPSOpticsRcd > opticsToken_
std::vector< std::vector< double > > m_fcn_values
length unit cm
Set of optical functions corresponding to one scoring plane along LHC, including splines for interpol...
edm::ESGetToken< LHCInfoPerFill, LHCInfoPerFillRcd > lhcInfoPerFillToken_
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Collection of optical functions for two crossing angle values and various scoring planes...
double m_z
position of the scoring plane, in LHC/TOTEM convention, cm
static LHCInfoCombined createLHCInfoCombined(const edm::eventsetup::DependentRecordImplementation< RecordT, ListT > &iRecord, const edm::ESGetToken< LHCInfoPerLS, LHCInfoPerLSRcd > &tokenInfoPerLS, const edm::ESGetToken< LHCInfoPerFill, LHCInfoPerFillRcd > &tokenInfoPerFill, const edm::ESGetToken< LHCInfo, LHCInfoRcd > &tokenInfo, bool useNewLHCInfo)