CMS 3D CMS Logo

Functions
fakeOTLA Namespace Reference

Functions

template<class T >
std::unique_ptr< TproduceRecord (const float value, const GeometricDet &geomDet)
 

Function Documentation

◆ produceRecord()

template<class T >
std::unique_ptr<T> fakeOTLA::produceRecord ( const float  value,
const GeometricDet geomDet 
)

Definition at line 52 of file SiPhase2OuterTrackerFakeLorentzAngleESSource.cc.

52  {
53  using namespace edm::es;
54  T* obj = new T();
55  for (const auto detId : TrackerGeometryUtils::getOuterTrackerDetIds(geomDet)) {
56  const DetId detectorId = DetId(detId);
57  const int subDet = detectorId.subdetId();
58  if (detectorId.det() == DetId::Detector::Tracker) {
59  if (subDet == StripSubdetector::TOB || subDet == StripSubdetector::TID) {
60  if (!obj->putLorentzAngle(detId, value))
61  edm::LogError("SiPhase2OuterTrackerFakeLorentzAngleESSource")
62  << "[SiPhase2OuterTrackerFakeLorentzAngleESSource::produce] detid already exists" << std::endl;
63  } // if it's a OT DetId
64  } // check if Tracker
65  } // loop on DetIds
66  return std::unique_ptr<T>(obj);
67  }

References DetId::det(), TrackerGeometryUtils::getOuterTrackerDetIds(), getGTfromDQMFile::obj, DetId::subdetId(), StripSubdetector::TID, StripSubdetector::TOB, and align::Tracker.

DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
align::Tracker
Definition: StructureType.h:70
DetId
Definition: DetId.h:17
TrackerGeometryUtils::getOuterTrackerDetIds
std::vector< uint32_t > getOuterTrackerDetIds(const GeometricDet &geomDet)
Definition: utils.cc:20
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
value
Definition: value.py:1
T
long double T
Definition: Basic3DVectorLD.h:48
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
edm::es
Definition: es_Label.h:33
edm::Log
Definition: MessageLogger.h:70
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17