|
|
Go to the documentation of this file.
76 #include "CLHEP/Random/RandFlat.h"
77 #include "CLHEP/Random/RandGauss.h"
81 void setUniform(
const std::vector<double>& estimatedValuesMin,
82 const std::vector<double>& estimatedValuesMax,
83 std::vector<bool>& uniform) {
84 if (!estimatedValuesMax.empty()) {
85 std::vector<double>::const_iterator
min = estimatedValuesMin.begin();
86 std::vector<double>::const_iterator
max = estimatedValuesMax.begin();
87 std::vector<bool>::iterator uniformIt = uniform.begin();
88 for (;
min != estimatedValuesMin.end(); ++
min, ++
max, ++uniformIt) {
95 double computeSigma(
const double&
value,
const double& perCentError) {
return (perCentError / 100) *
value; }
103 float hallMobility(
const double& meanMin,
const double& meanMax,
const double& sigma,
const bool uniform) {
105 return CLHEP::RandFlat::shoot(meanMin, meanMax);
106 }
else if (sigma > 0) {
107 return CLHEP::RandGauss::shoot(meanMin, sigma);
118 findingRecord<SiStripLorentzAngleRcd>();
130 std::cout <<
"ERROR: size of min and max values is different" << std::endl;
189 auto lorentzAngle = std::make_unique<SiStripLorentzAngle>();
193 const int subDet = detectorId.
subdetId();
198 const int layerId = tTopo.tibLayer(detectorId) - 1;
204 const int layerId = tTopo.tobLayer(detectorId) - 1;
214 if (tTopo.tecRing(detectorId) < 5) {
223 if (!lorentzAngle->putLorentzAngle(detId, mobi)) {
224 edm::LogError(
"SiStripLorentzAngleFakeESSource::produce ") <<
" detid already exists";
const DepRecordT getRecord() const
std::vector< double > m_StdDevs_TIB
std::vector< double > m_TIB_EstimatedValuesMax
double m_TIBmeanPerCentError
std::unique_ptr< SiStripLorentzAngle > ReturnType
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
std::vector< uint32_t > getSiStripDetIds(const GeometricDet &geomDet)
ReturnType produce(const SiStripLorentzAngleRcd &)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > m_tTopoToken
static constexpr auto TIB
std::vector< double > m_TIB_PerCent_Errs
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
edm::ESGetToken< GeometricDet, IdealGeometryRecord > m_geomDetToken
~SiStripLorentzAngleFakeESSource() override
static const IOVSyncValue & endOfTime()
std::vector< double > m_TIB_EstimatedValuesMin
SiStripLorentzAngleFakeESSource(const edm::ParameterSet &)
std::vector< bool > m_uniformTIB
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &iov, edm::ValidityInterval &iValidity) override
Log< level::Error, false > LogError
std::vector< bool > m_uniformTOB
std::vector< double > m_TOB_PerCent_Errs
static constexpr auto TEC
std::vector< double > m_StdDevs_TOB
std::vector< double > m_TOB_EstimatedValuesMax
static constexpr auto TOB
static const IOVSyncValue & beginOfTime()
T getParameter(std::string const &) const
double m_TOBmeanPerCentError
std::vector< double > m_TOB_EstimatedValuesMin
static constexpr auto TID