16 numTiltedLayerRings_ = pSetStubAlgo.
getParameter<vector<double>>(
"NTiltedRings");
17 windowSizeBarrelLayers_ = pSetStubAlgo.
getParameter<vector<double>>(
"BarrelCut");
18 const auto& pSetTiltedLayer = pSetStubAlgo.
getParameter<vector<edm::ParameterSet>>(
"TiltedBarrelCutSet");
19 const auto& pSetEncapDisks = pSetStubAlgo.
getParameter<vector<edm::ParameterSet>>(
"EndcapCutSet");
20 windowSizeTiltedLayersRings_.reserve(pSetTiltedLayer.size());
21 for (
const auto& pSet : pSetTiltedLayer) {
22 windowSizeTiltedLayersRings_.emplace_back(pSet.getParameter<vector<double>>(
"TiltedCut"));
24 windowSizeEndcapDisksRings_.reserve(pSetEncapDisks.size());
25 for (
const auto& pSet : pSetEncapDisks) {
26 windowSizeEndcapDisksRings_.emplace_back(pSet.getParameter<vector<double>>(
"EndcapCut"));
32 void StubFEWindows::setZero() {
33 std::fill(windowSizeBarrelLayers_.begin(), windowSizeBarrelLayers_.end(), 0.);
34 for (
auto& x : windowSizeEndcapDisksRings_)
36 for (
auto& y : windowSizeTiltedLayersRings_)
42 const double* StubFEWindows::storedWindowSize(
const TrackerTopology* trackerTopo,
const DetId& detId)
const {
45 const double* storedHalfWindow =
nullptr;
47 unsigned int layer = trackerTopo->
layer(detId);
52 if (type != TrackerModule::BarrelModuleType::flat) {
54 corr = (numTiltedLayerRings_.at(layer) + 1) / 2.;
56 ladder = corr - (corr -
ladder) * type;
57 storedHalfWindow = &(windowSizeTiltedLayersRings_.at(layer).at(ladder));
60 storedHalfWindow = &(windowSizeBarrelLayers_.at(layer));
65 unsigned int wheel = trackerTopo->
tidWheel(detId);
67 storedHalfWindow = &(windowSizeEndcapDisksRings_.at(wheel).at(ring));
69 return storedHalfWindow;
76 return const_cast<double*
>(std::as_const(*this).storedWindowSize(trackerTopo, detId));
unsigned int tidRing(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
constexpr std::array< uint8_t, layerIndexSize > layer
unsigned int tobSide(const DetId &id) const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static constexpr auto TOB
void fill(std::map< std::string, TH1 * > &h, const std::string &s, double x)
T getParameter(std::string const &) const
unsigned int layer(const DetId &id) const
unsigned int tobRod(const DetId &id) const
static constexpr auto TID