CMS 3D CMS Logo

CTPPSCompositeESSource.cc
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * Authors:
4 * Jan Kaspar (jan.kaspar@gmail.com)
5 * Christopher Misan (krzysmisan@gmail.com)
6 *
7 ****************************************************************************/
8 
16 
21 
25 
29 
33 
35 
36 #include "CLHEP/Random/RandFlat.h"
37 #include "CLHEP/Random/JamesRandom.h"
38 
39 #include <memory>
40 #include <vector>
41 #include <string>
42 #include <map>
43 #include <set>
44 
45 #include "TFile.h"
46 #include "TH2D.h"
47 
48 //----------------------------------------------------------------------------------------------------
49 
51 public:
53 
55 
56  std::unique_ptr<LHCInfo> produceLhcInfo(const LHCInfoRcd &);
57  std::unique_ptr<LHCOpticalFunctionsSetCollection> produceOptics(const CTPPSOpticsRcd &);
58  std::unique_ptr<PPSDirectSimulationData> produceDirectSimuData(const PPSDirectSimulationDataRcd &);
59 
60  std::shared_ptr<CTPPSRPAlignmentCorrectionsData> produceRealAlignments(const RPRealAlignmentRecord &);
61  std::shared_ptr<CTPPSRPAlignmentCorrectionsData> produceMisalignedAlignments(const RPMisalignedAlignmentRecord &);
62 
63  std::shared_ptr<CTPPSGeometry> produceRealTG(const VeryForwardRealGeometryRecord &);
64  std::shared_ptr<CTPPSGeometry> produceMisalignedTG(const VeryForwardMisalignedGeometryRecord &);
65 
66 private:
67  // config parameters
71  unsigned int generateEveryNEvents_;
72  unsigned int verbosity_;
73  const bool isRun2_;
74 
75  // ES tokens
77 
78  template <typename T>
79  struct BinData {
80  double min, max;
82  };
83 
84  struct ProfileData {
85  // LHCInfo
87  std::vector<BinData<std::pair<double, double>>> xangleBetaStarBins;
88 
89  // optics
91 
92  // geometry
93  std::shared_ptr<DDCompactView> ddCompactView;
94  std::shared_ptr<DetGeomDesc> misalignedGD;
95  std::shared_ptr<DetGeomDesc> realGD;
96  std::shared_ptr<CTPPSGeometry> misalignedTG;
97  std::shared_ptr<CTPPSGeometry> realTG;
98 
99  // alignment
100  std::shared_ptr<CTPPSRPAlignmentCorrectionsData> acReal, acMisaligned;
101 
102  // direct simulation configuration
104  };
105 
106  // profile variables
107  std::vector<BinData<ProfileData>> profile_bins_;
109 
110  // random engine
111  std::unique_ptr<CLHEP::HepRandomEngine> m_engine_;
112 
113  // methods to pre-compute profile data
114  void buildLHCInfo(const edm::ParameterSet &profile, ProfileData &pData);
115  void buildOptics(const edm::ParameterSet &profile, ProfileData &pData);
118 
119  // flag whether the geometry (for all profiles) has been built
120  bool geometryBuilt_;
121 
122  // this build method is different from all others - it is only called at the first
123  // geometry request since the ideal geometry must be obtained from ES;
124  // this method updates all profiles and builds all flavours of geometries
125  void buildGeometry(const DDCompactView &cpv);
126 
127  // event id for which method "setIntervalFor" set new profile
129 
130  // method set IOV (common to all products)
132  const edm::IOVSyncValue &,
134 };
135 
136 //----------------------------------------------------------------------------------------------------
137 
139  : compactViewTag_(conf.getParameter<std::string>("compactViewTag")),
140  lhcInfoLabel_(conf.getParameter<std::string>("lhcInfoLabel")),
141  opticsLabel_(conf.getParameter<std::string>("opticsLabel")),
142  generateEveryNEvents_(conf.getUntrackedParameter<unsigned int>("generateEveryNEvents")),
143  verbosity_(conf.getUntrackedParameter<unsigned int>("verbosity")),
144  isRun2_(conf.getParameter<bool>("isRun2")),
145  m_engine_(new CLHEP::HepJamesRandom(conf.getParameter<unsigned int>("seed"))),
146  geometryBuilt_(false) {
147  double l_int_sum = 0;
148 
149  for (const auto &cfg : conf.getParameter<std::vector<edm::ParameterSet>>("periods")) {
150  double l_int = cfg.getParameter<double>("L_int");
151 
152  profile_bins_.emplace_back(BinData<ProfileData>{l_int_sum, l_int_sum + l_int, ProfileData()});
153 
154  l_int_sum += l_int;
155 
156  auto &pData = profile_bins_.back().data;
157 
158  buildLHCInfo(cfg, pData);
159  buildOptics(cfg, pData);
160  buildAlignment(cfg, pData);
161  buildDirectSimuData(cfg, pData);
162  }
163 
164  // normalise L_int sums to probabilities
165  for (auto &bin : profile_bins_) {
166  bin.min /= l_int_sum;
167  bin.max /= l_int_sum;
168  }
169 
170  // framework registrations
174 
180 
181  findingRecord<LHCInfoRcd>();
182  findingRecord<CTPPSOpticsRcd>();
183  findingRecord<PPSDirectSimulationDataRcd>();
184  findingRecord<RPRealAlignmentRecord>();
185  findingRecord<RPMisalignedAlignmentRecord>();
186  findingRecord<VeryForwardRealGeometryRecord>();
187  findingRecord<VeryForwardMisalignedGeometryRecord>();
188 }
189 
190 //----------------------------------------------------------------------------------------------------
191 
194  desc.add<std::string>("compactViewTag", "")->setComment("label of the geometry compact view");
195  desc.add<std::string>("lhcInfoLabel", "")->setComment("label of the LHCInfo record");
196  desc.add<std::string>("opticsLabel", "")->setComment("label of the optics record");
197  desc.add<unsigned int>("seed", 1)->setComment("random seed");
198  desc.add<bool>("isRun2", false)->setComment("use diamond's run 2 geometry definition?");
199  desc.addUntracked<unsigned int>("generateEveryNEvents", 1)->setComment("how often to switch conditions");
200  desc.addUntracked<unsigned int>("verbosity", 0);
201 
202  edm::ParameterSetDescription desc_profile;
203  std::vector<edm::ParameterSet> vp;
204  desc_profile.add<double>("L_int", 0.)->setComment("integrated luminosity");
205 
206  // lhcInfo
207  edm::ParameterSetDescription desc_profile_ctppsLHCInfo;
208  desc_profile_ctppsLHCInfo.add<double>("xangle", -1)
209  ->setComment("constant xangle, if negative, the xangle/beta* distribution will be used");
210  desc_profile_ctppsLHCInfo.add<double>("betaStar", 0.)->setComment("constant beta*");
211  desc_profile_ctppsLHCInfo.add<double>("beamEnergy", 0.)->setComment("beam energy");
212  desc_profile_ctppsLHCInfo.add<std::string>("xangleBetaStarHistogramFile", "")
213  ->setComment("ROOT file with xangle/beta* distribution");
214  desc_profile_ctppsLHCInfo.add<std::string>("xangleBetaStarHistogramObject", "")
215  ->setComment("xangle distribution object in the ROOT file");
216  desc_profile.add<edm::ParameterSetDescription>("ctppsLHCInfo", desc_profile_ctppsLHCInfo);
217 
218  // optics
219  edm::ParameterSetDescription desc_profile_ctppsOpticalFunctions;
221  of_desc.add<double>("xangle")->setComment("half crossing angle value in urad");
222  of_desc.add<edm::FileInPath>("fileName")->setComment("ROOT file with optical functions");
223  std::vector<edm::ParameterSet> of;
224  desc_profile_ctppsOpticalFunctions.addVPSet("opticalFunctions", of_desc, of)
225  ->setComment("list of optical functions at different crossing angles");
226 
228  sp_desc.add<unsigned int>("rpId")->setComment("associated detector DetId");
229  sp_desc.add<std::string>("dirName")->setComment("associated path to the optical functions file");
230  sp_desc.add<double>("z")->setComment("longitudinal position at scoring plane/detector");
231  std::vector<edm::ParameterSet> sp;
232  desc_profile_ctppsOpticalFunctions.addVPSet("scoringPlanes", sp_desc, sp)
233  ->setComment("list of sensitive planes/detectors stations");
234  desc_profile.add<edm::ParameterSetDescription>("ctppsOpticalFunctions", desc_profile_ctppsOpticalFunctions);
235 
236  // alignment
237  edm::ParameterSetDescription desc_profile_ctppsRPAlignmentCorrectionsDataXML;
238  desc_profile_ctppsRPAlignmentCorrectionsDataXML.add<std::vector<std::string>>("MeasuredFiles");
239  desc_profile_ctppsRPAlignmentCorrectionsDataXML.add<std::vector<std::string>>("RealFiles");
240  desc_profile_ctppsRPAlignmentCorrectionsDataXML.add<std::vector<std::string>>("MisalignedFiles");
241  desc_profile.add<edm::ParameterSetDescription>("ctppsRPAlignmentCorrectionsDataXML",
242  desc_profile_ctppsRPAlignmentCorrectionsDataXML);
243 
244  // direct simu config
245  edm::ParameterSetDescription desc_profile_ctppsDirectSimuData;
246  desc_profile_ctppsDirectSimuData.add<std::string>("empiricalAperture45");
247  desc_profile_ctppsDirectSimuData.add<std::string>("empiricalAperture56");
248 
249  desc_profile_ctppsDirectSimuData.add<std::string>("timeResolutionDiamonds45");
250  desc_profile_ctppsDirectSimuData.add<std::string>("timeResolutionDiamonds56");
251 
253  eps_desc.add<unsigned int>("rpId")->setComment("RP id");
254  eps_desc.add<std::string>("file")->setComment("file name");
255  eps_desc.add<std::string>("object")->setComment("path to the efficiency histogram");
256  desc_profile_ctppsDirectSimuData.addVPSet("efficienciesPerRP", eps_desc, std::vector<edm::ParameterSet>());
257  desc_profile_ctppsDirectSimuData.addVPSet("efficienciesPerPlane", eps_desc, std::vector<edm::ParameterSet>());
258 
259  desc_profile.add<edm::ParameterSetDescription>("ctppsDirectSimuData", desc_profile_ctppsDirectSimuData);
260 
261  desc.addVPSet("periods", desc_profile, vp)->setComment("profiles");
262 
263  descriptions.add("ctppsCompositeESSource", desc);
264 }
265 
266 //----------------------------------------------------------------------------------------------------
267 
269  const auto &ctppsDirectSimuData = profile.getParameter<edm::ParameterSet>("ctppsDirectSimuData");
270 
271  pData.directSimuData.setEmpiricalAperture45(ctppsDirectSimuData.getParameter<std::string>("empiricalAperture45"));
272  pData.directSimuData.setEmpiricalAperture56(ctppsDirectSimuData.getParameter<std::string>("empiricalAperture56"));
273 
275  ctppsDirectSimuData.getParameter<std::string>("timeResolutionDiamonds45"));
277  ctppsDirectSimuData.getParameter<std::string>("timeResolutionDiamonds56"));
278 
279  for (const auto &ps : ctppsDirectSimuData.getParameterSetVector("efficienciesPerRP")) {
280  const auto rpId = ps.getParameter<unsigned int>("rpId");
281  const auto &file = ps.getParameter<std::string>("file");
282  const auto &object = ps.getParameter<std::string>("object");
283  pData.directSimuData.getEfficienciesPerRP()[rpId] = {file, object};
284  }
285 
286  for (const auto &ps : ctppsDirectSimuData.getParameterSetVector("efficienciesPerPlane")) {
287  const auto rpId = ps.getParameter<unsigned int>("rpId");
288  const auto &file = ps.getParameter<std::string>("file");
289  const auto &object = ps.getParameter<std::string>("object");
290  pData.directSimuData.getEfficienciesPerPlane()[rpId] = {file, object};
291  }
292 }
293 
294 //----------------------------------------------------------------------------------------------------
295 
297  std::unique_ptr<DetGeomDesc> idealGD = detgeomdescbuilder::buildDetGeomDescFromCompactView(cpv, isRun2_);
298 
299  for (auto &pb : profile_bins_) {
300  auto &p = pb.data;
301 
302  p.misalignedGD = CTPPSGeometryESCommon::applyAlignments(*(idealGD), p.acMisaligned.get());
303  p.misalignedTG = std::make_shared<CTPPSGeometry>(p.misalignedGD.get(), verbosity_);
304 
305  p.realGD = CTPPSGeometryESCommon::applyAlignments(*(idealGD), p.acReal.get());
306  p.realTG = std::make_shared<CTPPSGeometry>(p.realGD.get(), verbosity_);
307  }
308 
309  geometryBuilt_ = true;
310 }
311 
312 //----------------------------------------------------------------------------------------------------
313 
315  const auto &ctppsOpticalFunctions = profile.getParameter<edm::ParameterSet>("ctppsOpticalFunctions");
316 
317  struct FileInfo {
318  double m_xangle;
319  std::string m_fileName;
320  };
321 
322  std::vector<FileInfo> fileInfo;
323 
324  for (const auto &pset : ctppsOpticalFunctions.getParameter<std::vector<edm::ParameterSet>>("opticalFunctions")) {
325  const double &xangle = pset.getParameter<double>("xangle");
326  const std::string &fileName = pset.getParameter<edm::FileInPath>("fileName").fullPath();
327  fileInfo.push_back({xangle, fileName});
328  }
329 
330  struct RPInfo {
331  std::string m_dirName;
332  double m_scoringPlaneZ;
333  };
334 
335  std::unordered_map<unsigned int, RPInfo> rpInfo;
336 
337  for (const auto &pset : ctppsOpticalFunctions.getParameter<std::vector<edm::ParameterSet>>("scoringPlanes")) {
338  const unsigned int rpId = pset.getParameter<unsigned int>("rpId");
339  const std::string dirName = pset.getParameter<std::string>("dirName");
340  const double z = pset.getParameter<double>("z");
341  const RPInfo entry = {dirName, z};
342  rpInfo.emplace(rpId, entry);
343  }
344 
345  for (const auto &fi : fileInfo) {
346  std::unordered_map<unsigned int, LHCOpticalFunctionsSet> xa_data;
347 
348  for (const auto &rpi : rpInfo) {
349  LHCOpticalFunctionsSet fcn(fi.m_fileName, rpi.second.m_dirName, rpi.second.m_scoringPlaneZ);
350  xa_data.emplace(rpi.first, std::move(fcn));
351  }
352 
353  pData.lhcOptical.emplace(fi.m_xangle, xa_data);
354  }
355 }
356 
357 //----------------------------------------------------------------------------------------------------
358 
360  // load alignment data
361  auto ctppsRPAlignmentCorrectionsDataXMLPSet =
362  cfg.getParameter<edm::ParameterSet>("ctppsRPAlignmentCorrectionsDataXML");
363  ctppsRPAlignmentCorrectionsDataXMLPSet.addUntrackedParameter("verbosity", verbosity_);
364 
365  CTPPSRPAlignmentCorrectionsDataESSourceXMLCommon ctppsRPAlignmentCorrectionsDataESSourceXMLCommon(
366  ctppsRPAlignmentCorrectionsDataXMLPSet);
367 
368  // store the first entry from the alignment sequence (more cannot be done)
369  pData.acReal = std::make_shared<CTPPSRPAlignmentCorrectionsData>(
370  ctppsRPAlignmentCorrectionsDataESSourceXMLCommon.acsReal.empty()
372  : ctppsRPAlignmentCorrectionsDataESSourceXMLCommon.acsReal[0].second);
373 
374  pData.acMisaligned = std::make_shared<CTPPSRPAlignmentCorrectionsData>(
375  ctppsRPAlignmentCorrectionsDataESSourceXMLCommon.acsMisaligned.empty()
377  : ctppsRPAlignmentCorrectionsDataESSourceXMLCommon.acsMisaligned[0].second);
378 }
379 
380 //----------------------------------------------------------------------------------------------------
381 
383  const auto &ctppsLHCInfo = profile.getParameter<edm::ParameterSet>("ctppsLHCInfo");
384 
385  pData.beamEnergy = ctppsLHCInfo.getParameter<double>("beamEnergy");
386  pData.betaStar = ctppsLHCInfo.getParameter<double>("betaStar");
387  pData.xangle = ctppsLHCInfo.getParameter<double>("xangle");
388 
389  // continue only if distributed xangle/beta* shall be used
390  if (pData.xangle > 0)
391  return;
392 
393  edm::FileInPath fip(ctppsLHCInfo.getParameter<std::string>("xangleBetaStarHistogramFile").c_str());
394  std::unique_ptr<TFile> f_in(TFile::Open(fip.fullPath().c_str()));
395  if (!f_in)
396  throw cms::Exception("PPS") << "Cannot open input file '"
397  << ctppsLHCInfo.getParameter<std::string>("xangleBetaStarHistogramFile") << "'.";
398 
399  TH2D *h_xangle_beta_star =
400  (TH2D *)f_in->Get(ctppsLHCInfo.getParameter<std::string>("xangleBetaStarHistogramObject").c_str());
401  if (!h_xangle_beta_star)
402  throw cms::Exception("PPS") << "Cannot load input object '"
403  << ctppsLHCInfo.getParameter<std::string>("xangleBetaStarHistogramObject") << "'.";
404 
405  // extract non-empty bins, calculate weights
406  double sum = 0.;
407  for (int bi = 1; bi <= h_xangle_beta_star->GetNcells(); ++bi)
408  sum += h_xangle_beta_star->GetBinContent(bi);
409 
410  double cw = 0.;
411  for (int x = 1; x <= h_xangle_beta_star->GetNbinsX(); ++x)
412  for (int y = 1; y <= h_xangle_beta_star->GetNbinsY(); ++y) {
413  const double w = h_xangle_beta_star->GetBinContent(h_xangle_beta_star->GetBin(x, y)) / sum;
414  if (w > 0.) {
415  pData.xangleBetaStarBins.push_back(
416  {cw,
417  cw + w,
418  std::pair<double, double>(h_xangle_beta_star->GetXaxis()->GetBinCenter(x),
419  h_xangle_beta_star->GetYaxis()->GetBinCenter(y))});
420  cw += w;
421  }
422  }
423 }
424 
425 //----------------------------------------------------------------------------------------------------
426 
428  const edm::IOVSyncValue &iosv,
429  edm::ValidityInterval &oValidity) {
430  // determine new IOV
431  edm::EventID beginEvent = iosv.eventID();
432  edm::EventID endEvent(beginEvent.run(), beginEvent.luminosityBlock(), beginEvent.event() + generateEveryNEvents_);
433  oValidity = edm::ValidityInterval(edm::IOVSyncValue(beginEvent), edm::IOVSyncValue(endEvent));
434 
435  // stop if new profile has already been generated
436  if (beginEvent.run() == previously_set_eventID_.run() &&
438  return;
439 
440  previously_set_eventID_ = beginEvent;
441 
442  // randomly pick the next profile
443  const double u = CLHEP::RandFlat::shoot(m_engine_.get(), 0., 1.);
444 
445  for (const auto &bin : profile_bins_) {
446  if (bin.min <= u && u <= bin.max) {
447  currentProfile_ = &bin.data;
448  break;
449  }
450  }
451 }
452 
453 //----------------------------------------------------------------------------------------------------
454 
455 std::shared_ptr<CTPPSRPAlignmentCorrectionsData> CTPPSCompositeESSource::produceRealAlignments(
456  const RPRealAlignmentRecord &) {
457  return currentProfile_->acReal;
458 }
459 
460 //----------------------------------------------------------------------------------------------------
461 
462 std::shared_ptr<CTPPSRPAlignmentCorrectionsData> CTPPSCompositeESSource::produceMisalignedAlignments(
463  const RPMisalignedAlignmentRecord &) {
465 }
466 
467 //----------------------------------------------------------------------------------------------------
468 
469 std::shared_ptr<CTPPSGeometry> CTPPSCompositeESSource::produceRealTG(const VeryForwardRealGeometryRecord &iRecord) {
470  if (!geometryBuilt_)
472 
473  return currentProfile_->realTG;
474 }
475 
476 //----------------------------------------------------------------------------------------------------
477 
478 std::shared_ptr<CTPPSGeometry> CTPPSCompositeESSource::produceMisalignedTG(
479  const VeryForwardMisalignedGeometryRecord &iRecord) {
480  if (!geometryBuilt_)
482 
484 }
485 
486 //----------------------------------------------------------------------------------------------------
487 
488 std::unique_ptr<PPSDirectSimulationData> CTPPSCompositeESSource::produceDirectSimuData(
489  const PPSDirectSimulationDataRcd &) {
490  return std::make_unique<PPSDirectSimulationData>(currentProfile_->directSimuData);
491 }
492 
493 //----------------------------------------------------------------------------------------------------
494 
495 std::unique_ptr<LHCOpticalFunctionsSetCollection> CTPPSCompositeESSource::produceOptics(const CTPPSOpticsRcd &) {
496  return std::make_unique<LHCOpticalFunctionsSetCollection>(currentProfile_->lhcOptical);
497 }
498 
499 //----------------------------------------------------------------------------------------------------
500 
501 std::unique_ptr<LHCInfo> CTPPSCompositeESSource::produceLhcInfo(const LHCInfoRcd &) {
502  double xangle = currentProfile_->xangle;
504 
505  if (currentProfile_->xangle < 0) {
506  const double u = CLHEP::RandFlat::shoot(m_engine_.get(), 0., 1.);
507  for (const auto &d : currentProfile_->xangleBetaStarBins) {
508  if (d.min <= u && u <= d.max) {
509  xangle = d.data.first;
510  betaStar = d.data.second;
511  break;
512  }
513  }
514  }
515 
516  auto lhcInfo = std::make_unique<LHCInfo>();
517  lhcInfo->setEnergy(currentProfile_->beamEnergy);
518  lhcInfo->setCrossingAngle(xangle);
519  lhcInfo->setBetaStar(betaStar);
520 
521  edm::LogInfo("PPS") << "new LHCInfo: xangle=" << xangle << ", betaStar=" << betaStar;
522 
523  return lhcInfo;
524 }
525 
526 //----------------------------------------------------------------------------------------------------
527 
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition: DependentRecordImplementation.h:50
VeryForwardRealGeometryRecord
Event setup record containing the real (actual) geometry information.
Definition: VeryForwardRealGeometryRecord.h:22
CTPPSCompositeESSource::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: CTPPSCompositeESSource.cc:192
CTPPSCompositeESSource::tokenCompactViewMisaligned_
edm::ESGetToken< DDCompactView, IdealGeometryRecord > tokenCompactViewMisaligned_
Definition: CTPPSCompositeESSource.cc:81
DDAxes::y
CTPPSCompositeESSource::lhcInfoLabel_
std::string lhcInfoLabel_
Definition: CTPPSCompositeESSource.cc:74
electrons_cff.bool
bool
Definition: electrons_cff.py:366
CTPPSRPAlignmentCorrectionsDataESSourceXMLCommon.h
edm::ESInputTag
Definition: ESInputTag.h:87
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
funct::false
false
Definition: Factorize.h:29
CTPPSCompositeESSource::produceOptics
std::unique_ptr< LHCOpticalFunctionsSetCollection > produceOptics(const CTPPSOpticsRcd &)
Definition: CTPPSCompositeESSource.cc:495
CTPPSCompositeESSource::produceMisalignedTG
std::shared_ptr< CTPPSGeometry > produceMisalignedTG(const VeryForwardMisalignedGeometryRecord &)
Definition: CTPPSCompositeESSource.cc:478
ESHandle.h
CTPPSOpticsRcd
Definition: CTPPSOpticsRcd.h:8
base_cff.ctppsLHCInfo
ctppsLHCInfo
Definition: base_cff.py:14
BeamSpotFakeParameters_cfi.betaStar
betaStar
Definition: BeamSpotFakeParameters_cfi.py:19
CTPPSCompositeESSource::buildAlignment
void buildAlignment(const edm::ParameterSet &profile, ProfileData &pData)
Definition: CTPPSCompositeESSource.cc:359
contentValuesFiles.fullPath
fullPath
Definition: contentValuesFiles.py:64
mps_splice.entry
entry
Definition: mps_splice.py:68
CTPPSCompositeESSource::generateEveryNEvents_
unsigned int generateEveryNEvents_
Definition: CTPPSCompositeESSource.cc:76
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PPSDirectSimulationData::getEfficienciesPerPlane
std::map< unsigned int, FileObject > & getEfficienciesPerPlane()
Definition: PPSDirectSimulationData.cc:34
CTPPSCompositeESSource::buildGeometry
void buildGeometry(const DDCompactView &cpv)
Definition: CTPPSCompositeESSource.cc:296
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::ValidityInterval
Definition: ValidityInterval.h:28
LHCInfo.h
ESProducer.h
CTPPSCompositeESSource::compactViewTag_
std::string compactViewTag_
Definition: CTPPSCompositeESSource.cc:73
CTPPSRPAlignmentCorrectionsDataESSourceXMLCommon
Definition: CTPPSRPAlignmentCorrectionsDataESSourceXMLCommon.h:17
CTPPSCompositeESSource::BinData::max
double max
Definition: CTPPSCompositeESSource.cc:85
DDAxes::x
CTPPSCompositeESSource::opticsLabel_
std::string opticsLabel_
Definition: CTPPSCompositeESSource.cc:75
CTPPSCompositeESSource::BinData::data
T data
Definition: CTPPSCompositeESSource.cc:86
PPSDirectSimulationData::setEmpiricalAperture45
void setEmpiricalAperture45(std::string s)
Definition: PPSDirectSimulationData.cc:39
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
fcn
void fcn(int &, double *, double &, double *, int)
Definition: LASBarrelAlgorithm.cc:388
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
CTPPSCompositeESSource::produceMisalignedAlignments
std::shared_ptr< CTPPSRPAlignmentCorrectionsData > produceMisalignedAlignments(const RPMisalignedAlignmentRecord &)
Definition: CTPPSCompositeESSource.cc:462
RPMisalignedAlignmentRecord
Definition: RPMisalignedAlignmentRecord.h:6
CTPPSOpticsRcd.h
edm::EventID::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:39
edm::EventSetupRecordIntervalFinder
Definition: EventSetupRecordIntervalFinder.h:33
edm::ParameterSet::addUntrackedParameter
void addUntrackedParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:192
CTPPSCompositeESSource::buildLHCInfo
void buildLHCInfo(const edm::ParameterSet &profile, ProfileData &pData)
Definition: CTPPSCompositeESSource.cc:382
edm::eventsetup::EventSetupRecordKey
Definition: EventSetupRecordKey.h:30
CTPPSCompositeESSource::previously_set_eventID_
edm::EventID previously_set_eventID_
Definition: CTPPSCompositeESSource.cc:133
VeryForwardMisalignedGeometryRecord.h
CTPPSGeometryESCommon.h
CTPPSCompositeESSource::buildDirectSimuData
void buildDirectSimuData(const edm::ParameterSet &profile, ProfileData &pData)
Definition: CTPPSCompositeESSource.cc:268
edm::FileInPath
Definition: FileInPath.h:64
CTPPSCompositeESSource::verbosity_
unsigned int verbosity_
Definition: CTPPSCompositeESSource.cc:77
CTPPSGeometry.h
MakerMacros.h
RPRealAlignmentRecord
Definition: RPRealAlignmentRecord.h:6
CTPPSCompositeESSource::ProfileData::directSimuData
PPSDirectSimulationData directSimuData
Definition: CTPPSCompositeESSource.cc:108
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
CTPPSCompositeESSource::buildOptics
void buildOptics(const edm::ParameterSet &profile, ProfileData &pData)
Definition: CTPPSCompositeESSource.cc:314
LHCOpticalFunctionsSet
Set of optical functions corresponding to one scoring plane along LHC.
Definition: LHCOpticalFunctionsSet.h:13
CTPPSCompositeESSource::currentProfile_
const ProfileData * currentProfile_
Definition: CTPPSCompositeESSource.cc:113
w
const double w
Definition: UKUtility.cc:23
CTPPSCompositeESSource::geometryBuilt_
bool geometryBuilt_
Definition: CTPPSCompositeESSource.cc:125
DDCompactView
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
DDAxes::z
CTPPSCompositeESSource::ProfileData::xangle
double xangle
Definition: CTPPSCompositeESSource.cc:91
edm::es::Label
Definition: es_Label.h:56
base_cff.ctppsDirectSimuData
ctppsDirectSimuData
Definition: base_cff.py:36
CTPPSCompositeESSource::ProfileData::realGD
std::shared_ptr< DetGeomDesc > realGD
Definition: CTPPSCompositeESSource.cc:100
CTPPSCompositeESSource::m_engine_
std::unique_ptr< CLHEP::HepRandomEngine > m_engine_
Definition: CTPPSCompositeESSource.cc:116
LHCInfoRcd
Definition: LHCInfoRcd.h:24
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
PPSDirectSimulationDataRcd
Definition: PPSDirectSimulationDataRcd.h:7
edm::IOVSyncValue
Definition: IOVSyncValue.h:31
edm::EventID::run
RunNumber_t run() const
Definition: EventID.h:38
DEFINE_FWK_EVENTSETUP_SOURCE
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
Definition: SourceFactory.h:91
EventSetupRecordIntervalFinder.h
CTPPSCompositeESSource::ProfileData::acMisaligned
std::shared_ptr< CTPPSRPAlignmentCorrectionsData > acMisaligned
Definition: CTPPSCompositeESSource.cc:105
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
CLHEP
Definition: CocoaGlobals.h:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
OpticalFunctionsConfig_cfi.xangle
xangle
Definition: OpticalFunctionsConfig_cfi.py:17
base_cff.ctppsOpticalFunctions
ctppsOpticalFunctions
Definition: base_cff.py:23
ESProducts.h
PostProcessor_cff.profile
profile
Definition: PostProcessor_cff.py:38
CTPPSCompositeESSource::ProfileData::betaStar
double betaStar
Definition: CTPPSCompositeESSource.cc:91
CTPPSCompositeESSource::produceRealAlignments
std::shared_ptr< CTPPSRPAlignmentCorrectionsData > produceRealAlignments(const RPRealAlignmentRecord &)
Definition: CTPPSCompositeESSource.cc:455
SourceFactory.h
PPSDirectSimulationData::setEmpiricalAperture56
void setEmpiricalAperture56(std::string s)
Definition: PPSDirectSimulationData.cc:40
edm::IOVSyncValue::eventID
const EventID & eventID() const
Definition: IOVSyncValue.h:40
PPSDirectSimulationData::setTimeResolutionDiamonds56
void setTimeResolutionDiamonds56(std::string s)
Definition: PPSDirectSimulationData.cc:43
edm::ParameterSet
Definition: ParameterSet.h:47
CTPPSCompositeESSource::produceDirectSimuData
std::unique_ptr< PPSDirectSimulationData > produceDirectSimuData(const PPSDirectSimulationDataRcd &)
Definition: CTPPSCompositeESSource.cc:488
tkal_create_file_lists.FileInfo
FileInfo
Definition: tkal_create_file_lists.py:1119
CTPPSCompositeESSource::ProfileData
Definition: CTPPSCompositeESSource.cc:89
edm::EventID::event
EventNumber_t event() const
Definition: EventID.h:40
DetGeomDescBuilder.h
createfilelist.int
int
Definition: createfilelist.py:10
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
CTPPSGeometryESCommon::applyAlignments
std::unique_ptr< DetGeomDesc > applyAlignments(const DetGeomDesc &, const CTPPSRPAlignmentCorrectionsData *)
Definition: CTPPSGeometryESCommon.cc:6
IdealGeometryRecord.h
CTPPSCompositeESSource::tokenCompactViewReal_
edm::ESGetToken< DDCompactView, IdealGeometryRecord > tokenCompactViewReal_
Definition: CTPPSCompositeESSource.cc:81
CTPPSCompositeESSource::setIntervalFor
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
Definition: CTPPSCompositeESSource.cc:427
CTPPSCompositeESSource::isRun2_
const bool isRun2_
Definition: CTPPSCompositeESSource.cc:78
VeryForwardRealGeometryRecord.h
CTPPSCompositeESSource::ProfileData::beamEnergy
double beamEnergy
Definition: CTPPSCompositeESSource.cc:91
edm::ESGetToken< DDCompactView, IdealGeometryRecord >
CTPPSCompositeESSource::ProfileData::xangleBetaStarBins
std::vector< BinData< std::pair< double, double > > > xangleBetaStarBins
Definition: CTPPSCompositeESSource.cc:92
PPSDirectSimulationData.h
looper.cfg
cfg
Definition: looper.py:297
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
CTPPSCompositeESSource::BinData::min
double min
Definition: CTPPSCompositeESSource.cc:85
VeryForwardMisalignedGeometryRecord
Event setup record containing the misaligned geometry information. It is used for alignment studies o...
Definition: VeryForwardMisalignedGeometryRecord.h:23
PPSDirectSimulationData::getEfficienciesPerRP
std::map< unsigned int, FileObject > & getEfficienciesPerRP()
Definition: PPSDirectSimulationData.cc:31
profile_2016_postTS2_cff.rpId
rpId
Definition: profile_2016_postTS2_cff.py:21
PPSDirectSimulationData::setTimeResolutionDiamonds45
void setTimeResolutionDiamonds45(std::string s)
Definition: PPSDirectSimulationData.cc:42
cond::ValidityInterval
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:17
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
CTPPSCompositeESSource::ProfileData::misalignedTG
std::shared_ptr< CTPPSGeometry > misalignedTG
Definition: CTPPSCompositeESSource.cc:101
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
CTPPSRPAlignmentCorrectionsDataESSourceXMLCommon::acsMisaligned
CTPPSRPAlignmentCorrectionsDataSequence acsMisaligned
Definition: CTPPSRPAlignmentCorrectionsDataESSourceXMLCommon.h:22
PPSDirectSimulationData
Definition: PPSDirectSimulationData.h:9
CTPPSCompositeESSource::ProfileData::misalignedGD
std::shared_ptr< DetGeomDesc > misalignedGD
Definition: CTPPSCompositeESSource.cc:99
T
long double T
Definition: Basic3DVectorLD.h:48
CTPPSCompositeESSource::ProfileData::lhcOptical
LHCOpticalFunctionsSetCollection lhcOptical
Definition: CTPPSCompositeESSource.cc:95
Exception
Definition: hltDiff.cc:245
CTPPSCompositeESSource::produceLhcInfo
std::unique_ptr< LHCInfo > produceLhcInfo(const LHCInfoRcd &)
Definition: CTPPSCompositeESSource.cc:501
LHCOpticalFunctionsSetCollection.h
CTPPSRPAlignmentCorrectionsData
Container for CTPPS RP alignment corrections. The corrections are stored on two levels - RP and senso...
Definition: CTPPSRPAlignmentCorrectionsData.h:24
TrackerOfflineValidation_Dqm_cff.dirName
dirName
Definition: TrackerOfflineValidation_Dqm_cff.py:55
CTPPSCompositeESSource::BinData
Definition: CTPPSCompositeESSource.cc:84
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
CTPPSRPAlignmentCorrectionsData.h
CTPPSCompositeESSource::ProfileData::realTG
std::shared_ptr< CTPPSGeometry > realTG
Definition: CTPPSCompositeESSource.cc:102
CTPPSCompositeESSource::produceRealTG
std::shared_ptr< CTPPSGeometry > produceRealTG(const VeryForwardRealGeometryRecord &)
Definition: CTPPSCompositeESSource.cc:469
edm::ESProducer
Definition: ESProducer.h:104
ztail.d
d
Definition: ztail.py:151
CTPPSCompositeESSource::CTPPSCompositeESSource
CTPPSCompositeESSource(const edm::ParameterSet &)
Definition: CTPPSCompositeESSource.cc:138
CTPPSCompositeESSource::profile_bins_
std::vector< BinData< ProfileData > > profile_bins_
Definition: CTPPSCompositeESSource.cc:112
CTPPSCompositeESSource::ProfileData::acReal
std::shared_ptr< CTPPSRPAlignmentCorrectionsData > acReal
Definition: CTPPSCompositeESSource.cc:105
LHCOpticalFunctionsSetCollection
Collection of optical functions for two crossing angle values and various scoring planes....
Definition: LHCOpticalFunctionsSetCollection.h:16
ParameterSet.h
LHCInfoRcd.h
edm::ParameterDescriptionNode::setComment
void setComment(std::string const &value)
Definition: ParameterDescriptionNode.cc:106
PPSDirectSimulationDataRcd.h
edm::EventID
Definition: EventID.h:31
detgeomdescbuilder::buildDetGeomDescFromCompactView
std::unique_ptr< DetGeomDesc > buildDetGeomDescFromCompactView(const DDCompactView &myCompactView, const bool isRun2)
Definition: DetGeomDescBuilder.cc:10
crabWrapper.key
key
Definition: crabWrapper.py:19
CTPPSRPAlignmentCorrectionsDataESSourceXMLCommon::acsReal
CTPPSRPAlignmentCorrectionsDataSequence acsReal
Definition: CTPPSRPAlignmentCorrectionsDataESSourceXMLCommon.h:22
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
CTPPSCompositeESSource::ProfileData::ddCompactView
std::shared_ptr< DDCompactView > ddCompactView
Definition: CTPPSCompositeESSource.cc:98
CTPPSCompositeESSource
Definition: CTPPSCompositeESSource.cc:50