CMS 3D CMS Logo

SiStripBackplaneCalibration.cc
Go to the documentation of this file.
1 // reference - but the strip local reco foresees also calibration parameters
8 // for peak data like for the Lorentz angle.
15 
18 // include 'locally':
20 #include "TreeStruct.h"
21 
26 // #include "CalibTracker/Records/interface/SiStripDependentRecords.h"
28 
31 
37 
42 
43 #include "TTree.h"
44 #include "TFile.h"
45 #include "TString.h"
46 
47 // #include <iostream>
48 #include <vector>
49 #include <map>
50 #include <sstream>
51 #include <cstdio>
52 #include <functional>
53 
55 public:
58 
61 
63  unsigned int numParameters() const override;
64 
65  // /// Return all derivatives,
66  // /// default implementation uses other derivatives(..) method,
67  // /// but can be overwritten in derived class for efficiency.
68  // virtual std::vector<double> derivatives(const TransientTrackingRecHit &hit,
69  // const TrajectoryStateOnSurface &tsos,
70  // const edm::EventSetup &setup,
71  // const EventInfo &eventInfo) const;
72 
75  unsigned int derivatives(std::vector<ValuesIndexPair> &outDerivInds,
77  const TrajectoryStateOnSurface &tsos,
78  const edm::EventSetup &setup,
79  const EventInfo &eventInfo) const override;
80 
83  bool setParameter(unsigned int index, double value) override;
84 
87  bool setParameterError(unsigned int index, double error) override;
88 
91  double getParameter(unsigned int index) const override;
92 
95  double getParameterError(unsigned int index) const override;
96 
97  // /// Call at beginning of job:
99 
102  void endOfJob() override;
103 
104 private:
112 
115  double getParameterForDetId(unsigned int detId, edm::RunNumber_t run) const;
116 
117  void writeTree(const SiStripBackPlaneCorrection *backPlaneCorr,
118  const std::map<unsigned int, TreeStruct> &treeInfo,
119  const char *treeName) const;
120  SiStripBackPlaneCorrection *createFromTree(const char *fileName, const char *treeName) const;
121 
123  int16_t readoutMode_;
124  const bool saveToDB_;
127  const std::vector<std::string> mergeFileNames_;
128 
130 
132 
133  std::vector<double> parameters_;
134  std::vector<double> paramUncertainties_;
135 
138 };
139 
140 //======================================================================
141 //======================================================================
142 //======================================================================
143 
146  readoutModeName_(cfg.getParameter<std::string>("readoutMode")),
147  saveToDB_(cfg.getParameter<bool>("saveToDB")),
148  recordNameDBwrite_(cfg.getParameter<std::string>("recordNameDBwrite")),
149  outFileName_(cfg.getParameter<std::string>("treeFile")),
150  mergeFileNames_(cfg.getParameter<std::vector<std::string> >("mergeTreeFiles")),
151  siStripBackPlaneCorrInput_(nullptr),
152  moduleGroupSelector_(nullptr),
153  moduleGroupSelCfg_(cfg.getParameter<edm::ParameterSet>("BackplaneModuleGroups")) {
154  // SiStripLatency::singleReadOutMode() returns
155  // 1: all in peak, 0: all in deco, -1: mixed state
156  // (in principle one could treat even mixed state APV by APV...)
157  if (readoutModeName_ == "peak") {
159  } else if (readoutModeName_ == "deconvolution") {
161  } else {
162  throw cms::Exception("BadConfig") << "SiStripBackplaneCalibration:\n"
163  << "Unknown mode '" << readoutModeName_
164  << "', should be 'peak' or 'deconvolution' .\n";
165  }
166 }
167 
168 //======================================================================
170  delete moduleGroupSelector_;
171  // std::cout << "Destroy SiStripBackplaneCalibration named " << this->name() << std::endl;
173 }
174 
175 //======================================================================
176 unsigned int SiStripBackplaneCalibration::numParameters() const { return parameters_.size(); }
177 
178 //======================================================================
179 unsigned int SiStripBackplaneCalibration::derivatives(std::vector<ValuesIndexPair> &outDerivInds,
181  const TrajectoryStateOnSurface &tsos,
182  const edm::EventSetup &setup,
183  const EventInfo &eventInfo) const {
184  // ugly const-cast:
185  // But it is either only first initialisation or throwing an exception...
186  const_cast<SiStripBackplaneCalibration *>(this)->checkBackPlaneCorrectionInput(setup, eventInfo);
187 
188  outDerivInds.clear();
189 
192  const int16_t mode = latency->singleReadOutMode();
193 
194  if (mode == readoutMode_) {
195  if (hit.det()) { // otherwise 'constraint hit' or whatever
196 
197  const int index =
198  moduleGroupSelector_->getParameterIndexFromDetId(hit.det()->geographicalId(), eventInfo.eventId().run());
199  if (index >= 0) { // otherwise not treated
202  const GlobalVector bField(magneticField->inTesla(hit.det()->surface().position()));
203  const LocalVector bFieldLocal(hit.det()->surface().toLocal(bField));
204  //std::cout << "SiStripBackplaneCalibration derivatives " << readoutModeName_ << std::endl;
205  const double dZ = hit.det()->surface().bounds().thickness(); // it's a float only...
206  const double tanPsi = tsos.localParameters().mixedFormatVector()[1]; //float...
207 
208  edm::ESHandle<SiStripLorentzAngle> lorentzAngleHandle;
209  setup.get<SiStripLorentzAngleRcd>().get(readoutModeName_, lorentzAngleHandle);
210  // Yes, mobility (= LA/By) stored in object called LA...
211  const double mobility = lorentzAngleHandle->getLorentzAngle(hit.det()->geographicalId());
212  // shift due to dead back plane has two parts:
213  // 1) Lorentz Angle correction formula gets reduced thickness dz*(1-bp)
214  // 2) 'Direct' effect is shift of effective module position in local z by bp*dz/2
215  // (see GF's presentation in alignment meeting 25.10.2012,
216  // https://indico.cern.ch/conferenceDisplay.py?confId=174266#2012-10-25)
217  // const double xDerivative = 0.5 * dZ * (mobility * bFieldLocal.y() - tanPsi);
218  //FIXME: +tanPsi? At least that fits the sign of the dr/dw residual
219  // in KarimakiDerivatives...
220  const double xDerivative = 0.5 * dZ * (mobility * bFieldLocal.y() + tanPsi);
221  // std::cout << "derivative is " << xDerivative << " for index " << index
222  // << std::endl;
223  // if (index >= 10) {
224  // std::cout << "mobility * y-field " << mobility * bFieldLocal.y()
225  // << ", \n tanPsi " << tanPsi /*<< ", dZ " << dZ */ << std::endl;
226  // std::cout << "|tanPsi| - |mobility * y-field| "
227  // << fabs(tanPsi) - fabs(mobility * bFieldLocal.y())
228  // << std::endl;
229  // }
230  const Values derivs(xDerivative, 0.); // yDerivative = 0.
231  outDerivInds.push_back(ValuesIndexPair(derivs, index));
232  }
233  } else {
234  edm::LogWarning("Alignment") << "@SUB=SiStripBackplaneCalibration::derivatives1"
235  << "Hit without GeomDet, skip!";
236  }
237  } else if (mode != kDeconvolutionMode && mode != kPeakMode) {
238  // warn only if unknown/mixed mode
239  edm::LogWarning("Alignment") << "@SUB=SiStripBackplaneCalibration::derivatives2"
240  << "Readout mode is " << mode << ", but looking for " << readoutMode_ << " ("
241  << readoutModeName_ << ").";
242  }
243 
244  return outDerivInds.size();
245 }
246 
247 //======================================================================
249  if (index >= parameters_.size()) {
250  return false;
251  } else {
253  return true;
254  }
255 }
256 
257 //======================================================================
259  if (index >= paramUncertainties_.size()) {
260  return false;
261  } else {
263  return true;
264  }
265 }
266 
267 //======================================================================
269  return (index >= parameters_.size() ? 0. : parameters_[index]);
270 }
271 
272 //======================================================================
274  return (index >= paramUncertainties_.size() ? 0. : paramUncertainties_[index]);
275 }
276 
277 //======================================================================
279  AlignableMuon * /*aliMuon*/,
280  AlignableExtras * /*aliExtras*/) {
281  //specify the sub-detectors for which the back plane correction is determined: all strips
282  const std::vector<int> sdets = {SiStripDetId::TIB, SiStripDetId::TID, SiStripDetId::TOB, SiStripDetId::TEC};
283 
285 
288 
289  edm::LogInfo("Alignment") << "@SUB=SiStripBackplaneCalibration"
290  << "Created with name " << this->name() << " for readout mode '" << readoutModeName_
291  << "',\n"
292  << this->numParameters() << " parameters to be determined."
293  << "\nsaveToDB = " << saveToDB_ << "\n outFileName = " << outFileName_
294  << "\n N(merge files) = " << mergeFileNames_.size()
295  << "\n number of IOVs = " << moduleGroupSelector_->numIovs();
296 
297  if (!mergeFileNames_.empty()) {
298  edm::LogInfo("Alignment") << "@SUB=SiStripBackplaneCalibration"
299  << "First file to merge: " << mergeFileNames_[0];
300  }
301 }
302 
303 //======================================================================
305  // loginfo output
306  std::ostringstream out;
307  out << "Parameter results for readout mode '" << readoutModeName_ << "'\n";
308  for (unsigned int iPar = 0; iPar < parameters_.size(); ++iPar) {
309  out << iPar << ": " << parameters_[iPar] << " +- " << paramUncertainties_[iPar] << "\n";
310  }
311  edm::LogInfo("Alignment") << "@SUB=SiStripBackplaneCalibration::endOfJob" << out.str();
312 
313  std::map<unsigned int, TreeStruct> treeInfo; // map of TreeStruct for each detId
314 
315  // now write 'input' tree
316  const SiStripBackPlaneCorrection *input = this->getBackPlaneCorrectionInput(); // never NULL
317  const std::string treeName(this->name() + '_' + readoutModeName_ + '_');
318  this->writeTree(input, treeInfo, (treeName + "input").c_str()); // empty treeInfo for input...
319 
320  if (input->getBackPlaneCorrections().empty()) {
321  edm::LogError("Alignment") << "@SUB=SiStripBackplaneCalibration::endOfJob"
322  << "Input back plane correction map is empty ('" << readoutModeName_
323  << "' mode), skip writing output!";
324  return;
325  }
326 
327  const unsigned int nonZeroParamsOrErrors = // Any determined value?
328  count_if(parameters_.begin(), parameters_.end(), [](auto c) { return c != 0.; }) +
329  count_if(paramUncertainties_.begin(), paramUncertainties_.end(), [](auto c) { return c != 0.; });
330 
331  for (unsigned int iIOV = 0; iIOV < moduleGroupSelector_->numIovs(); ++iIOV) {
332  cond::Time_t firstRunOfIOV = moduleGroupSelector_->firstRunOfIOV(iIOV);
334  // Loop on map of values from input and add (possible) parameter results
335  for (auto iterIdValue = input->getBackPlaneCorrections().begin();
336  iterIdValue != input->getBackPlaneCorrections().end();
337  ++iterIdValue) {
338  // type of (*iterIdValue) is pair<unsigned int, float>
339  const unsigned int detId = iterIdValue->first; // key of map is DetId
340  // Some code one could use to miscalibrate wrt input:
341  // double param = 0.;
342  // const DetId id(detId);
343  // switch (id.subdetId()) {
344  // case 3:
345  // // delta = 0.025;
346  // {
347  // TIBDetId tibId(detId);
348  // param = tibId.layer() * 0.01;
349  // }
350  // break;
351  // case 5:
352  // //delta = 0.050;
353  // {
354  // TOBDetId tobId(detId);
355  // param = tobId.layer() * 0.015;
356  // }
357  // break;
358  // case 4: // TID
359  // param = 0.03; break;
360  // case 6: // TEC
361  // param = 0.05; break;
362  // break;
363  // default:
364  // std::cout << "unknown subdet " << id.subdetId() << std::endl;
365  // }
366  const double param = this->getParameterForDetId(detId, firstRunOfIOV);
367  // put result in output, i.e. sum of input and determined parameter:
368  output->putBackPlaneCorrection(detId, iterIdValue->second + param);
369  const int paramIndex = moduleGroupSelector_->getParameterIndexFromDetId(detId, firstRunOfIOV);
370  treeInfo[detId] = TreeStruct(param, this->getParameterError(paramIndex), paramIndex);
371  }
372 
373  if (saveToDB_ || nonZeroParamsOrErrors != 0) { // Skip writing mille jobs...
374  this->writeTree(output, treeInfo, (treeName + Form("result_%lld", firstRunOfIOV)).c_str());
375  }
376 
377  if (saveToDB_) { // If requested, write out to DB
379  if (dbService.isAvailable()) {
380  dbService->writeOne(output, firstRunOfIOV, recordNameDBwrite_);
381  // no 'delete output;': writeOne(..) took over ownership
382  } else {
383  delete output;
384  edm::LogError("BadConfig") << "@SUB=SiStripBackplaneCalibration::endOfJob"
385  << "No PoolDBOutputService available, but saveToDB true!";
386  }
387  } else {
388  delete output;
389  }
390  } // end loop on IOVs
391 }
392 
393 //======================================================================
395  const EventInfo &eventInfo) {
396  edm::ESHandle<SiStripBackPlaneCorrection> backPlaneCorrHandle;
398  setup.get<SiStripBackPlaneCorrectionRcd>().get(readoutModeName_, backPlaneCorrHandle);
399  siStripBackPlaneCorrInput_ = new SiStripBackPlaneCorrection(*backPlaneCorrHandle);
400  // FIXME: Should we call 'watchBackPlaneCorrRcd_.check(setup)' as well?
401  // Otherwise could be that next check has to check via following 'else', though
402  // no new IOV has started... (to be checked)
403  } else {
404  if (watchBackPlaneCorrRcd_.check(setup)) { // new IOV of input - but how to check peak vs deco?
405  setup.get<SiStripBackPlaneCorrectionRcd>().get(readoutModeName_, backPlaneCorrHandle);
406  if (backPlaneCorrHandle->getBackPlaneCorrections() // but only bad if non-identical values
407  != siStripBackPlaneCorrInput_->getBackPlaneCorrections()) { // (comparing maps)
408  // Maps are containers sorted by key, but comparison problems may arise from
409  // 'floating point comparison' problems (FIXME?)
410  throw cms::Exception("BadInput") << "SiStripBackplaneCalibration::checkBackPlaneCorrectionInput:\n"
411  << "Content of SiStripBackPlaneCorrection changed at run "
412  << eventInfo.eventId().run() << ", but algorithm expects constant input!\n";
413  return false; // not reached...
414  }
415  }
416  }
417 
418  return true;
419 }
420 
421 //======================================================================
423  // For parallel processing in Millepede II, create SiStripBackPlaneCorrection
424  // from info stored in files of parallel jobs and check that they are identical.
425  // If this job has run on events, still check that back plane corrections are
426  // identical to the ones from mergeFileNames_.
427  const std::string treeName(((this->name() + '_') += readoutModeName_) += "_input");
428  for (auto iFile = mergeFileNames_.begin(); iFile != mergeFileNames_.end(); ++iFile) {
429  SiStripBackPlaneCorrection *bpCorr = this->createFromTree(iFile->c_str(), treeName.c_str());
430  // siStripBackPlaneCorrInput_ could be non-null from previous file of this loop
431  // or from checkBackPlaneCorrectionInput(..) when running on data in this job as well
433  delete siStripBackPlaneCorrInput_; // NULL or empty
435  } else {
436  // about comparison of maps see comments in checkBackPlaneCorrectionInput
437  if (bpCorr && !bpCorr->getBackPlaneCorrections().empty() && // single job might not have got events
439  // Throw exception instead of error?
440  edm::LogError("NoInput") << "@SUB=SiStripBackplaneCalibration::getBackPlaneCorrectionInput"
441  << "Different input values from tree " << treeName << " in file " << *iFile << ".";
442  }
443  delete bpCorr;
444  }
445  }
446 
447  if (!siStripBackPlaneCorrInput_) { // no files nor ran on events
449  edm::LogError("NoInput") << "@SUB=SiStripBackplaneCalibration::getBackPlaneCorrectionInput"
450  << "No input, create an empty one ('" << readoutModeName_ << "' mode)!";
451  } else if (siStripBackPlaneCorrInput_->getBackPlaneCorrections().empty()) {
452  edm::LogError("NoInput") << "@SUB=SiStripBackplaneCalibration::getBackPlaneCorrectionInput"
453  << "Empty result ('" << readoutModeName_ << "' mode)!";
454  }
455 
457 }
458 
459 //======================================================================
462 
463  return (index < 0 ? 0. : parameters_[index]);
464 }
465 
466 //======================================================================
468  const std::map<unsigned int, TreeStruct> &treeInfo,
469  const char *treeName) const {
470  if (!backPlaneCorrection)
471  return;
472 
473  TFile *file = TFile::Open(outFileName_.c_str(), "UPDATE");
474  if (!file) {
475  edm::LogError("BadConfig") << "@SUB=SiStripBackplaneCalibration::writeTree"
476  << "Could not open file '" << outFileName_ << "'.";
477  return;
478  }
479 
480  TTree *tree = new TTree(treeName, treeName);
481  unsigned int id = 0;
482  float value = 0.;
483  TreeStruct treeStruct;
484  tree->Branch("detId", &id, "detId/i");
485  tree->Branch("value", &value, "value/F");
486  tree->Branch("treeStruct", &treeStruct, TreeStruct::LeafList());
487 
488  for (auto iterIdValue = backPlaneCorrection->getBackPlaneCorrections().begin();
489  iterIdValue != backPlaneCorrection->getBackPlaneCorrections().end();
490  ++iterIdValue) {
491  // type of (*iterIdValue) is pair<unsigned int, float>
492  id = iterIdValue->first; // key of map is DetId
493  value = iterIdValue->second;
494  // type of (*treeStructIter) is pair<unsigned int, TreeStruct>
495  auto treeStructIter = treeInfo.find(id); // find info for this id
496  if (treeStructIter != treeInfo.end()) {
497  treeStruct = treeStructIter->second; // info from input map
498  } else { // if none found, fill at least parameter index (using 1st IOV...)
499  const cond::Time_t run1of1stIov = moduleGroupSelector_->firstRunOfIOV(0);
500  const int ind = moduleGroupSelector_->getParameterIndexFromDetId(id, run1of1stIov);
501  treeStruct = TreeStruct(ind);
502  }
503  tree->Fill();
504  }
505  tree->Write();
506  delete file; // tree vanishes with the file...
507 }
508 
509 //======================================================================
511  const char *treeName) const {
512  // Check for file existence on your own to work around
513  // https://hypernews.cern.ch/HyperNews/CMS/get/swDevelopment/2715.html:
514  TFile *file = nullptr;
515  FILE *testFile = fopen(fileName, "r");
516  if (testFile) {
517  fclose(testFile);
518  file = TFile::Open(fileName, "READ");
519  } // else not existing, see error below
520 
521  TTree *tree = nullptr;
522  if (file)
523  file->GetObject(treeName, tree);
524 
526  if (tree) {
527  unsigned int id = 0;
528  float value = 0.;
529  tree->SetBranchAddress("detId", &id);
530  tree->SetBranchAddress("value", &value);
531 
533  const Long64_t nEntries = tree->GetEntries();
534  for (Long64_t iEntry = 0; iEntry < nEntries; ++iEntry) {
535  tree->GetEntry(iEntry);
536  result->putBackPlaneCorrection(id, value);
537  }
538  } else { // Warning only since could be parallel job on no events.
539  edm::LogWarning("Alignment") << "@SUB=SiStripBackplaneCalibration::createFromTree"
540  << "Could not get TTree '" << treeName << "' from file '" << fileName
541  << (file ? "'." : "' (file does not exist).");
542  }
543 
544  delete file; // tree will vanish with file
545  return result;
546 }
547 
548 //======================================================================
549 //======================================================================
550 // Plugin definition
551 
553 
Vector3DBase
Definition: Vector3DBase.h:8
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
SiStripBackplaneCalibration::moduleGroupSelCfg_
const edm::ParameterSet moduleGroupSelCfg_
Definition: SiStripBackplaneCalibration.cc:137
electrons_cff.bool
bool
Definition: electrons_cff.py:366
SiStripBackplaneCalibration::derivatives
unsigned int derivatives(std::vector< ValuesIndexPair > &outDerivInds, const TransientTrackingRecHit &hit, const TrajectoryStateOnSurface &tsos, const edm::EventSetup &setup, const EventInfo &eventInfo) const override
Definition: SiStripBackplaneCalibration.cc:179
input
static const std::string input
Definition: EdmProvDump.cc:48
MessageLogger.h
SiStripBackplaneCalibration::beginOfJob
void beginOfJob(AlignableTracker *tracker, AlignableMuon *muon, AlignableExtras *extras) override
Definition: SiStripBackplaneCalibration.cc:278
IntegratedCalibrationBase::name
const std::string & name() const
name of this calibration
Definition: IntegratedCalibrationBase.h:126
SiStripBackplaneCalibration::writeTree
void writeTree(const SiStripBackPlaneCorrection *backPlaneCorr, const std::map< unsigned int, TreeStruct > &treeInfo, const char *treeName) const
Definition: SiStripBackplaneCalibration.cc:467
edm::ESWatcher< SiStripBackPlaneCorrectionRcd >
config_102169_raw_cff.latency
latency
Definition: config_102169_raw_cff.py:29
ESHandle.h
SiStripBackplaneCalibration::getBackPlaneCorrectionInput
const SiStripBackPlaneCorrection * getBackPlaneCorrectionInput()
Definition: SiStripBackplaneCalibration.cc:422
kDeconvolutionMode
Definition: SiStripReadoutModeEnums.h:6
muon
Definition: MuonCocktails.h:17
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
SiStripBackplaneCalibration::siStripBackPlaneCorrInput_
SiStripBackPlaneCorrection * siStripBackPlaneCorrInput_
Definition: SiStripBackplaneCalibration.cc:131
SiStripBackplaneCalibration::getParameter
double getParameter(unsigned int index) const override
Definition: SiStripBackplaneCalibration.cc:268
SiStripBackplaneCalibration::readoutModeName_
const std::string readoutModeName_
Definition: SiStripBackplaneCalibration.cc:122
edm
HLT enums.
Definition: AlignableModifier.h:19
TkModuleGroupSelector::getParameterIndexFromDetId
int getParameterIndexFromDetId(unsigned int detId, edm::RunNumber_t run) const
Definition: TkModuleGroupSelector.cc:210
tree
Definition: tree.py:1
IntegratedCalibrationBase::ValuesIndexPair
std::pair< Values, unsigned int > ValuesIndexPair
x- and y-values
Definition: IntegratedCalibrationBase.h:44
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
SiStripBackplaneCalibration::moduleGroupSelector_
TkModuleGroupSelector * moduleGroupSelector_
Definition: SiStripBackplaneCalibration.cc:136
IntegratedCalibrationBase
Definition: IntegratedCalibrationBase.h:40
SiStripBackplaneCalibration
Definition: SiStripBackplaneCalibration.cc:54
SiStripReadoutModeEnums.h
IntegratedCalibrationPluginFactory.h
SiStripDetId.h
TransientTrackingRecHit.h
TreeStruct
structure to store algorithm results in a TTree
Definition: TreeStruct.h:6
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
SiStripBackplaneCalibration::saveToDB_
const bool saveToDB_
Definition: SiStripBackplaneCalibration.cc:124
HLT_FULL_cff.magneticField
magneticField
Definition: HLT_FULL_cff.py:348
TkModuleGroupSelector::firstRunOfIOV
edm::RunNumber_t firstRunOfIOV(unsigned int iovNum) const
First run of iov (0 if iovNum not treated).
Definition: TkModuleGroupSelector.cc:205
relativeConstraints.error
error
Definition: relativeConstraints.py:53
SiStripBackPlaneCorrectionRcd
Definition: SiStripCondDataRecords.h:30
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
TkModuleGroupSelector::numIovs
unsigned int numIovs() const
Total number of IOVs.
Definition: TkModuleGroupSelector.cc:202
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
PoolDBOutputService.h
SiStripBackPlaneCorrection::getBackPlaneCorrections
const std::map< unsigned int, float > & getBackPlaneCorrections() const
Definition: SiStripBackPlaneCorrection.h:33
SiStripBackplaneCalibration::checkBackPlaneCorrectionInput
bool checkBackPlaneCorrectionInput(const edm::EventSetup &setup, const EventInfo &eventInfo)
Definition: SiStripBackplaneCalibration.cc:394
IntegratedCalibrationBase::Values
std::pair< double, double > Values
Definition: IntegratedCalibrationBase.h:43
SiStripBackplaneCalibration::endOfJob
void endOfJob() override
Definition: SiStripBackplaneCalibration.cc:304
Service.h
SiStripBackplaneCalibration::~SiStripBackplaneCalibration
~SiStripBackplaneCalibration() override
Destructor.
Definition: SiStripBackplaneCalibration.cc:169
SiStripBackplaneCalibration::parameters_
std::vector< double > parameters_
Definition: SiStripBackplaneCalibration.cc:133
IdealMagneticFieldRecord.h
edm::ESHandle
Definition: DTSurvey.h:22
AlignableTracker
Definition: AlignableTracker.h:17
SiStripBackplaneCalibration::getParameterError
double getParameterError(unsigned int index) const override
Definition: SiStripBackplaneCalibration.cc:273
SiStripBackplaneCalibration::getParameterForDetId
double getParameterForDetId(unsigned int detId, edm::RunNumber_t run) const
Definition: SiStripBackplaneCalibration.cc:460
AlignableExtras
Definition: AlignableExtras.h:19
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: PluginFactory.h:124
SiStripDetId::TEC
static constexpr auto TEC
Definition: SiStripDetId.h:40
SiStripBackplaneCalibration::recordNameDBwrite_
const std::string recordNameDBwrite_
Definition: SiStripBackplaneCalibration.cc:125
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrajectoryStateOnSurface::localParameters
const LocalTrajectoryParameters & localParameters() const
Definition: TrajectoryStateOnSurface.h:73
TkModuleGroupSelector.h
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripCondDataRecords.h
ParameterSet
Definition: Functions.h:16
SiStripBackplaneCalibration::outFileName_
const std::string outFileName_
Definition: SiStripBackplaneCalibration.cc:126
SiStripBackPlaneCorrection.h
edmplugin::PluginFactory
Definition: PluginFactory.h:34
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
AlignableMuon
Constructor of the full muon geometry.
Definition: AlignableMuon.h:38
edm::Service< cond::service::PoolDBOutputService >
TkModuleGroupSelector
Definition: TkModuleGroupSelector.h:35
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
SiStripLorentzAngleRcd
Definition: SiStripCondDataRecords.h:25
TreeStruct.h
value
Definition: value.py:1
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
SiStripDetId::TOB
static constexpr auto TOB
Definition: SiStripDetId.h:39
MagneticField.h
LocalTrajectoryParameters::mixedFormatVector
AlgebraicVector5 mixedFormatVector() const
Definition: LocalTrajectoryParameters.h:135
edm::EventSetup
Definition: EventSetup.h:58
TreeStruct::LeafList
static const char * LeafList()
Definition: TreeStruct.h:16
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
SiStripBackplaneCalibration::SiStripBackplaneCalibration
SiStripBackplaneCalibration(const edm::ParameterSet &cfg)
Constructor.
Definition: SiStripBackplaneCalibration.cc:144
looper.cfg
cfg
Definition: looper.py:297
TrackingRecHit
Definition: TrackingRecHit.h:21
SiStripDetId::TID
static constexpr auto TID
Definition: SiStripDetId.h:38
SiStripLorentzAngle::getLorentzAngle
float getLorentzAngle(const uint32_t &) const
Definition: SiStripLorentzAngle.cc:15
dumpTauVariables_cfi.eventInfo
eventInfo
add run, event number and lumi section
Definition: dumpTauVariables_cfi.py:12
GeomDet.h
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
Calorimetry_cff.bField
bField
Definition: Calorimetry_cff.py:284
DetId.h
ESWatcher.h
relativeConstraints.value
value
Definition: relativeConstraints.py:53
Exception
Definition: hltDiff.cc:245
cond::service::PoolDBOutputService::writeOne
Hash writeOne(const T *payload, Time_t time, const std::string &recordName)
Definition: PoolDBOutputService.h:63
SiStripBackplaneCalibration::paramUncertainties_
std::vector< double > paramUncertainties_
Definition: SiStripBackplaneCalibration.cc:134
SiStripBackplaneCalibration::watchBackPlaneCorrRcd_
edm::ESWatcher< SiStripBackPlaneCorrectionRcd > watchBackPlaneCorrRcd_
Definition: SiStripBackplaneCalibration.cc:129
SiStripDetId::TIB
static constexpr auto TIB
Definition: SiStripDetId.h:37
IntegratedCalibrationBase.h
SiStripBackplaneCalibration::numParameters
unsigned int numParameters() const override
How many parameters does this calibration define?
Definition: SiStripBackplaneCalibration.cc:176
SiStripLatencyRcd
Definition: SiStripCondDataRecords.h:36
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
SiStripBackplaneCalibration::mergeFileNames_
const std::vector< std::string > mergeFileNames_
Definition: SiStripBackplaneCalibration.cc:127
SiStripBackplaneCalibration::setParameterError
bool setParameterError(unsigned int index, double error) override
Definition: SiStripBackplaneCalibration.cc:258
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
mps_fire.result
result
Definition: mps_fire.py:311
SiStripLatency.h
ParameterSet.h
SiStripBackplaneCalibration::setParameter
bool setParameter(unsigned int index, double value) override
Definition: SiStripBackplaneCalibration.cc:248
kPeakMode
Definition: SiStripReadoutModeEnums.h:6
SiStripBackplaneCalibration::readoutMode_
int16_t readoutMode_
Definition: SiStripBackplaneCalibration.cc:123
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
SiStripLorentzAngle.h
SiStripBackPlaneCorrection
Definition: SiStripBackPlaneCorrection.h:27
TkModuleGroupSelector::getNumberOfParameters
unsigned int getNumberOfParameters() const
Definition: TkModuleGroupSelector.cc:199
hit
Definition: SiStripHitEffFromCalibTree.cc:88
AlignmentAlgorithmBase::EventInfo
define event information passed to algorithms
Definition: AlignmentAlgorithmBase.h:72
SiStripBackplaneCalibration::createFromTree
SiStripBackPlaneCorrection * createFromTree(const char *fileName, const char *treeName) const
Definition: SiStripBackplaneCalibration.cc:510