CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
CreateIdealTkAlRecords Class Reference
Inheritance diagram for CreateIdealTkAlRecords:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 CreateIdealTkAlRecords (const edm::ParameterSet &)
 
 ~CreateIdealTkAlRecords () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
static std::string toString (const GeomDetEnumerators::SubDetector &)
 
static GeomDetEnumerators::SubDetector toSubDetector (const std::string &sub)
 
static std::vector< GeomDetEnumerators::SubDetectortoSubDetectors (const std::vector< std::string > &subs)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void addAlignmentInfo (const GeomDet &)
 
void alignToGT (const edm::EventSetup &)
 
void analyze (const edm::Event &, const edm::EventSetup &) override
 
void clearAlignmentInfos ()
 
std::unique_ptr< TrackerGeometryretrieveGeometry (const edm::EventSetup &)
 
void writeToDB ()
 

Private Attributes

AlignmentErrorsExtended alignmentErrors_
 
Alignments alignments_
 
AlignmentSurfaceDeformations alignmentSurfaceDeformations_
 
const bool alignToGlobalTag_
 
const bool createReferenceRcd_
 
bool firstEvent_
 
std::vector< uint32_t > rawIDs_
 
const std::vector< GeomDetEnumerators::SubDetectorskipSubDetectors_
 
std::vector< GeomDetEnumerators::SubDetectorsubDets_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description: Plugin to create ideal tracker alignment records.

Implementation: The plugin takes the geometry stored in the global tag and transfers this information to the format needed in the TrackerAlignmentRcd. The APEs are set to zero for all det IDs of the tracker geometry and put into an TrackerAlignmentErrorExtendedRcd. In addition an empty TrackerSurfaceDeformationRcd is created corresponding to ideal surfaces.

An option exists to align to the content of the used global tag. This is useful, if the geometry record and the tracker alignment records do not match.

Definition at line 69 of file CreateTrackerAlignmentRcds.cc.

Constructor & Destructor Documentation

CreateIdealTkAlRecords::CreateIdealTkAlRecords ( const edm::ParameterSet iConfig)
explicit

Definition at line 102 of file CreateTrackerAlignmentRcds.cc.

103  : skipSubDetectors_(toSubDetectors(iConfig.getUntrackedParameter<std::vector<std::string> >("skipSubDetectors"))),
104  alignToGlobalTag_(iConfig.getUntrackedParameter<bool>("alignToGlobalTag")),
105  createReferenceRcd_(iConfig.getUntrackedParameter<bool>("createReferenceRcd")),
106  firstEvent_(true) {}
T getUntrackedParameter(std::string const &, T const &) const
static std::vector< GeomDetEnumerators::SubDetector > toSubDetectors(const std::vector< std::string > &subs)
const std::vector< GeomDetEnumerators::SubDetector > skipSubDetectors_
CreateIdealTkAlRecords::~CreateIdealTkAlRecords ( )
override

Definition at line 108 of file CreateTrackerAlignmentRcds.cc.

108 {}

Member Function Documentation

void CreateIdealTkAlRecords::addAlignmentInfo ( const GeomDet det)
private

Definition at line 253 of file CreateTrackerAlignmentRcds.cc.

References alignmentErrors_, alignments_, createReferenceRcd_, GeomDet::geographicalId(), LogDebug, Alignments::m_align, AlignmentErrorsExtended::m_alignError, GeomDet::position(), DetId::rawId(), rawIDs_, makeMuonMisalignmentScenario::rot, idealTransformation::rotation, GeomDet::rotation(), GeomDet::subDetector(), subDets_, and toString().

Referenced by analyze().

253  {
254  const auto subDetector = toString(det.subDetector());
255  const auto& detId = det.geographicalId().rawId();
256  const auto& pos = det.position();
257  const auto& rot = det.rotation();
258  rawIDs_.push_back(detId);
259  subDets_.push_back(det.subDetector());
260 
261  // TrackerAlignmentRcd entry
262  if (createReferenceRcd_) {
264  } else {
265  const AlignTransform::Translation translation(pos.x(), pos.y(), pos.z());
267  CLHEP::HepRep3x3(rot.xx(), rot.xy(), rot.xz(), rot.yx(), rot.yy(), rot.yz(), rot.zx(), rot.zy(), rot.zz()));
268  const auto& eulerAngles = rotation.eulerAngles();
269  LogDebug("Alignment") << "============================================================\n"
270  << "subdetector: " << subDetector << "\n"
271  << "detId: " << detId << "\n"
272  << "------------------------------------------------------------\n"
273  << " x: " << pos.x() << "\n"
274  << " y: " << pos.y() << "\n"
275  << " z: " << pos.z() << "\n"
276  << " phi: " << eulerAngles.phi() << "\n"
277  << " theta: " << eulerAngles.theta() << "\n"
278  << " psi: " << eulerAngles.psi() << "\n"
279  << "============================================================\n";
280  alignments_.m_align.emplace_back(AlignTransform(translation, rotation, detId));
281  }
282 
283  // TrackerAlignmentErrorExtendedRcd entry
284  const AlignTransformError::SymMatrix zeroAPEs(6, 0);
285  alignmentErrors_.m_alignError.emplace_back(AlignTransformErrorExtended(zeroAPEs, detId));
286 }
#define LogDebug(id)
std::vector< uint32_t > rawIDs_
static std::string toString(const GeomDetEnumerators::SubDetector &)
AlignmentErrorsExtended alignmentErrors_
std::vector< GeomDetEnumerators::SubDetector > subDets_
const Surface::RotationType & rotation() const
The rotation defining the local R.F.
Definition: GeomDet.h:46
CLHEP::HepSymMatrix SymMatrix
CLHEP::Hep3Vector Translation
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
std::vector< AlignTransformErrorExtended > m_alignError
virtual SubDetector subDetector() const
Which subdetector.
Definition: GeomDet.cc:38
CLHEP::HepRotation Rotation
void CreateIdealTkAlRecords::alignToGT ( const edm::EventSetup iSetup)
private

Definition at line 288 of file CreateTrackerAlignmentRcds.cc.

References AlignmentSurfaceDeformations::add(), alignmentErrors_, alignments_, alignmentSurfaceDeformations_, HLT_2018_cff::distance, spr::find(), newFWLiteAna::found, edm::EventSetup::get(), mps_fire::i, triggerObjects_cff::id, B2GTnPMonitor_cfi::item, AlignmentSurfaceDeformations::items(), LogDebug, Alignments::m_align, AlignmentErrorsExtended::m_alignError, AlignmentSurfaceDeformations::parameters(), CalibrationSummaryClient_cfi::params, rawIDs_, skipSubDetectors_, subDets_, and toString().

Referenced by analyze().

288  {
289  LogDebug("Alignment") << "Aligning to global tag\n";
290 
291  edm::ESHandle<Alignments> alignments;
292  iSetup.get<TrackerAlignmentRcd>().get(alignments);
294  iSetup.get<TrackerAlignmentErrorExtendedRcd>().get(alignmentErrors);
296  iSetup.get<TrackerSurfaceDeformationRcd>().get(surfaceDeformations);
297 
298  if (alignments->m_align.size() != alignmentErrors->m_alignError.size())
299  throw cms::Exception("GeometryMismatch")
300  << "Size mismatch between alignments (size=" << alignments->m_align.size()
301  << ") and alignment errors (size=" << alignmentErrors->m_alignError.size() << ")";
302 
303  std::vector<uint32_t> commonIDs;
304  auto itAlignErr = alignmentErrors->m_alignError.cbegin();
305  for (auto itAlign = alignments->m_align.cbegin(); itAlign != alignments->m_align.cend(); ++itAlign, ++itAlignErr) {
306  const auto id = itAlign->rawId();
307  auto found = std::find(rawIDs_.cbegin(), rawIDs_.cend(), id);
308  if (found != rawIDs_.cend()) {
309  if (id != itAlignErr->rawId())
310  throw cms::Exception("GeometryMismatch") << "DetId mismatch between alignments (rawId=" << id
311  << ") and alignment errors (rawId=" << itAlignErr->rawId() << ")";
312 
313  const auto index = std::distance(rawIDs_.cbegin(), found);
315  continue;
316 
317  if (alignments_.m_align[index].rawId() != alignmentErrors_.m_alignError[index].rawId())
318  throw cms::Exception("GeometryMismatch")
319  << "DetId mismatch between alignments (rawId=" << alignments_.m_align[index].rawId()
320  << ") and alignment errors (rawId=" << alignmentErrors_.m_alignError[index].rawId() << ")";
321 
322  LogDebug("Alignment") << "============================================================\n"
323  << "\nGeometry content (" << toString(subDets_[index]) << ", "
324  << alignments_.m_align[index].rawId() << "):\n"
325  << "\tx: " << alignments_.m_align[index].translation().x()
326  << "\ty: " << alignments_.m_align[index].translation().y()
327  << "\tz: " << alignments_.m_align[index].translation().z()
328  << "\tphi: " << alignments_.m_align[index].rotation().phi()
329  << "\ttheta: " << alignments_.m_align[index].rotation().theta()
330  << "\tpsi: " << alignments_.m_align[index].rotation().psi()
331  << "============================================================\n";
332  alignments_.m_align[index] = *itAlign;
333  alignmentErrors_.m_alignError[index] = *itAlignErr;
334  commonIDs.push_back(id);
335  LogDebug("Alignment") << "============================================================\n"
336  << "Global tag content (" << toString(subDets_[index]) << ", "
337  << alignments_.m_align[index].rawId() << "):\n"
338  << "\tx: " << alignments_.m_align[index].translation().x()
339  << "\ty: " << alignments_.m_align[index].translation().y()
340  << "\tz: " << alignments_.m_align[index].translation().z()
341  << "\tphi: " << alignments_.m_align[index].rotation().phi()
342  << "\ttheta: " << alignments_.m_align[index].rotation().theta()
343  << "\tpsi: " << alignments_.m_align[index].rotation().psi()
344  << "============================================================\n";
345  }
346  }
347 
348  // - surface deformations are stored differently
349  // -> different treatment
350  // - the above payloads contain also entries for ideal modules
351  // - no entry is created for ideal surfaces
352  // -> size of surface deformation payload does not necessarily match the
353  // size of the other tracker alignment payload
354  for (const auto& id : commonIDs) {
355  // search for common raw ID in surface deformation items
356  auto item = std::find_if(surfaceDeformations->items().cbegin(),
357  surfaceDeformations->items().cend(),
358  [&id](const auto& i) { return i.m_rawId == id; });
359  if (item == surfaceDeformations->items().cend())
360  continue; // not found
361 
362  // copy surface deformation item
363  const auto index = std::distance(surfaceDeformations->items().cbegin(), item);
364  const auto beginEndPair = surfaceDeformations->parameters(index);
365  std::vector<align::Scalar> params(beginEndPair.first, beginEndPair.second);
366  alignmentSurfaceDeformations_.add(item->m_rawId, item->m_parametrizationType, params);
367  }
368 }
#define LogDebug(id)
std::vector< uint32_t > rawIDs_
static std::string toString(const GeomDetEnumerators::SubDetector &)
AlignmentErrorsExtended alignmentErrors_
AlignmentSurfaceDeformations alignmentSurfaceDeformations_
std::vector< GeomDetEnumerators::SubDetector > subDets_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
const std::vector< GeomDetEnumerators::SubDetector > skipSubDetectors_
ParametersConstIteratorPair parameters(size_t index) const
const ItemVector & items() const
Get vector of all items.
bool add(align::ID rawId, int type, const std::vector< align::Scalar > &parameters)
Add a new item.
std::vector< AlignTransformErrorExtended > m_alignError
T get() const
Definition: EventSetup.h:73
void CreateIdealTkAlRecords::analyze ( const edm::Event ,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 115 of file CreateTrackerAlignmentRcds.cc.

References a, addAlignmentInfo(), alignToGlobalTag_, alignToGT(), b, clearAlignmentInfos(), createReferenceRcd_, firstEvent_, retrieveGeometry(), PbPb_ZMuSkimMuonDPG_cff::tracker, and writeToDB().

115  {
116  if (firstEvent_) {
118  const auto tracker = retrieveGeometry(iSetup);
119 
120  auto dets = tracker->dets();
121  std::sort(dets.begin(), dets.end(), [](const auto& a, const auto& b) {
122  return a->geographicalId().rawId() < b->geographicalId().rawId();
123  });
124 
125  for (const auto& det : dets)
126  addAlignmentInfo(*det);
128  alignToGT(iSetup);
129  writeToDB();
130  firstEvent_ = false;
131  }
132 }
std::unique_ptr< TrackerGeometry > retrieveGeometry(const edm::EventSetup &)
void addAlignmentInfo(const GeomDet &)
void alignToGT(const edm::EventSetup &)
double b
Definition: hdecay.h:118
double a
Definition: hdecay.h:119
void CreateIdealTkAlRecords::clearAlignmentInfos ( )
private

Definition at line 230 of file CreateTrackerAlignmentRcds.cc.

References alignmentErrors_, alignments_, alignmentSurfaceDeformations_, AlignmentErrorsExtended::clear(), Alignments::clear(), and rawIDs_.

Referenced by analyze().

230  {
231  alignments_.clear();
234  rawIDs_.clear();
235 }
std::vector< uint32_t > rawIDs_
AlignmentErrorsExtended alignmentErrors_
AlignmentSurfaceDeformations alignmentSurfaceDeformations_
void clear()
Clear vector without having to look into internals:
Definition: Alignments.h:17
void clear()
Clear vector without having to look into internals:
void CreateIdealTkAlRecords::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 385 of file CreateTrackerAlignmentRcds.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), DEFINE_FWK_MODULE, and edm::ParameterSetDescription::setComment().

385  {
387  desc.setComment(
388  "Creates ideal TrackerAlignmentRcd and TrackerAlignmentErrorExtendedRcd "
389  "from the loaded tracker geometry. "
390  "PoolDBOutputService must be set up for these records.");
391  desc.addUntracked<bool>("alignToGlobalTag", false);
392  desc.addUntracked<std::vector<std::string> >("skipSubDetectors", std::vector<std::string>{});
393  desc.addUntracked<bool>("createReferenceRcd", false);
394  descriptions.add("createIdealTkAlRecords", desc);
395 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void setComment(std::string const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::unique_ptr< TrackerGeometry > CreateIdealTkAlRecords::retrieveGeometry ( const edm::EventSetup iSetup)
private

Definition at line 237 of file CreateTrackerAlignmentRcds.cc.

References TrackerGeomBuilderFromGeometricDet::build(), edm::EventSetup::get(), and edm::ESHandle< T >::product().

Referenced by analyze().

237  {
238  edm::ESHandle<GeometricDet> geometricDet;
239  iSetup.get<IdealGeometryRecord>().get(geometricDet);
240 
242  iSetup.get<PTrackerParametersRcd>().get(ptp);
243 
244  edm::ESHandle<TrackerTopology> tTopoHandle;
245  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
246  const auto* const tTopo = tTopoHandle.product();
247 
248  TrackerGeomBuilderFromGeometricDet trackerBuilder;
249 
250  return std::unique_ptr<TrackerGeometry>{trackerBuilder.build(&(*geometricDet), *ptp, tTopo)};
251 }
TrackerGeometry * build(const GeometricDet *gd, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
T get() const
Definition: EventSetup.h:73
T const * product() const
Definition: ESHandle.h:86
std::string CreateIdealTkAlRecords::toString ( const GeomDetEnumerators::SubDetector sub)
static

Definition at line 134 of file CreateTrackerAlignmentRcds.cc.

References GeomDetEnumerators::CSC, GeomDetEnumerators::DT, Exception, GeomDetEnumerators::GEM, GeomDetEnumerators::invalidDet, GeomDetEnumerators::ME0, GeomDetEnumerators::P1PXB, GeomDetEnumerators::P1PXEC, GeomDetEnumerators::P2OTB, GeomDetEnumerators::P2OTEC, GeomDetEnumerators::P2PXB, GeomDetEnumerators::P2PXEC, GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, GeomDetEnumerators::RPCBarrel, GeomDetEnumerators::RPCEndcap, GeomDetEnumerators::TEC, GeomDetEnumerators::TIB, GeomDetEnumerators::TID, and GeomDetEnumerators::TOB.

Referenced by addAlignmentInfo(), and alignToGT().

134  {
135  switch (sub) {
137  return "PixelBarrel";
139  return "PixelEndcap";
141  return "TIB";
143  return "TOB";
145  return "TID";
147  return "TEC";
149  return "CSC";
151  return "DT";
153  return "RPCBarrel";
155  return "RPCEndcap";
157  return "GEM";
159  return "ME0";
161  return "P2OTB";
163  return "P2OTEC";
165  return "P1PXB";
167  return "P1PXEC";
169  return "P2PXB";
171  return "P2PXEC";
173  return "invalidDet";
174  default:
175  throw cms::Exception("UnknownSubdetector");
176  }
177 }
GeomDetEnumerators::SubDetector CreateIdealTkAlRecords::toSubDetector ( const std::string &  sub)
static

Definition at line 179 of file CreateTrackerAlignmentRcds.cc.

References GeomDetEnumerators::CSC, GeomDetEnumerators::DT, Exception, GeomDetEnumerators::GEM, GeomDetEnumerators::invalidDet, GeomDetEnumerators::ME0, GeomDetEnumerators::P1PXB, GeomDetEnumerators::P1PXEC, GeomDetEnumerators::P2OTB, GeomDetEnumerators::P2OTEC, GeomDetEnumerators::P2PXB, GeomDetEnumerators::P2PXEC, GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, GeomDetEnumerators::RPCBarrel, GeomDetEnumerators::RPCEndcap, GeomDetEnumerators::TEC, GeomDetEnumerators::TIB, GeomDetEnumerators::TID, and GeomDetEnumerators::TOB.

Referenced by toSubDetectors().

179  {
180  if (sub == "PixelBarrel")
182  else if (sub == "PixelEndcap")
184  else if (sub == "TIB")
186  else if (sub == "TOB")
188  else if (sub == "TID")
190  else if (sub == "TEC")
192  else if (sub == "CSC")
194  else if (sub == "DT")
195  return GeomDetEnumerators::DT;
196  else if (sub == "RPCBarrel")
198  else if (sub == "RPCEndcap")
200  else if (sub == "GEM")
202  else if (sub == "ME0")
204  else if (sub == "P2OTB")
206  else if (sub == "P2OTEC")
208  else if (sub == "P1PXB")
210  else if (sub == "P1PXEC")
212  else if (sub == "P2PXB")
214  else if (sub == "P2PXEC")
216  else if (sub == "invalidDet")
218  else
219  throw cms::Exception("UnknownSubdetector") << sub;
220 }
std::vector< GeomDetEnumerators::SubDetector > CreateIdealTkAlRecords::toSubDetectors ( const std::vector< std::string > &  subs)
static

Definition at line 222 of file CreateTrackerAlignmentRcds.cc.

References mps_fire::result, and toSubDetector().

223  {
224  std::vector<GeomDetEnumerators::SubDetector> result;
225  for (const auto& sub : subs)
226  result.emplace_back(toSubDetector(sub));
227  return result;
228 }
static GeomDetEnumerators::SubDetector toSubDetector(const std::string &sub)
void CreateIdealTkAlRecords::writeToDB ( )
private

Definition at line 370 of file CreateTrackerAlignmentRcds.cc.

References alignmentErrors_, alignments_, alignmentSurfaceDeformations_, cond::TimeTypeSpecs::beginValue, Exception, edm::Service< T >::isAvailable(), cond::runnumber, writeEcalDQMStatus::since, cond::timeTypeSpecs, and cond::service::PoolDBOutputService::writeOne().

Referenced by analyze().

370  {
372 
374  if (!poolDb.isAvailable()) {
375  throw cms::Exception("NotAvailable") << "PoolDBOutputService not available";
376  }
377 
378  edm::LogInfo("Alignment") << "Writing ideal tracker-alignment records.";
379  poolDb->writeOne(&alignments_, since, "TrackerAlignmentRcd");
380  poolDb->writeOne(&alignmentErrors_, since, "TrackerAlignmentErrorExtendedRcd");
381  poolDb->writeOne(&alignmentSurfaceDeformations_, since, "TrackerSurfaceDeformationRcd");
382 }
const TimeTypeSpecs timeTypeSpecs[]
Definition: Time.cc:16
AlignmentErrorsExtended alignmentErrors_
AlignmentSurfaceDeformations alignmentSurfaceDeformations_
Time_t beginValue
Definition: Time.h:41
bool isAvailable() const
Definition: Service.h:40
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)

Member Data Documentation

AlignmentErrorsExtended CreateIdealTkAlRecords::alignmentErrors_
private
Alignments CreateIdealTkAlRecords::alignments_
private
AlignmentSurfaceDeformations CreateIdealTkAlRecords::alignmentSurfaceDeformations_
private

Definition at line 94 of file CreateTrackerAlignmentRcds.cc.

Referenced by alignToGT(), clearAlignmentInfos(), and writeToDB().

const bool CreateIdealTkAlRecords::alignToGlobalTag_
private

Definition at line 89 of file CreateTrackerAlignmentRcds.cc.

Referenced by analyze().

const bool CreateIdealTkAlRecords::createReferenceRcd_
private

Definition at line 90 of file CreateTrackerAlignmentRcds.cc.

Referenced by addAlignmentInfo(), and analyze().

bool CreateIdealTkAlRecords::firstEvent_
private

Definition at line 91 of file CreateTrackerAlignmentRcds.cc.

Referenced by analyze().

std::vector<uint32_t> CreateIdealTkAlRecords::rawIDs_
private

Definition at line 95 of file CreateTrackerAlignmentRcds.cc.

Referenced by addAlignmentInfo(), alignToGT(), and clearAlignmentInfos().

const std::vector<GeomDetEnumerators::SubDetector> CreateIdealTkAlRecords::skipSubDetectors_
private

Definition at line 88 of file CreateTrackerAlignmentRcds.cc.

Referenced by alignToGT().

std::vector<GeomDetEnumerators::SubDetector> CreateIdealTkAlRecords::subDets_
private

Definition at line 96 of file CreateTrackerAlignmentRcds.cc.

Referenced by addAlignmentInfo(), and alignToGT().