79 log <<
"Known colum names:\n";
80 for (
const auto&
e :
ids)
89 std::vector<ID> geomquantities;
104 std::vector<std::pair<std::string, TTField>> namedPartitions{
117 for (
auto&
e : namedPartitions) {
118 geomquantities.push_back(
intern(
e.first));
135 auto diskid =
intern(
"PXDisk");
138 auto disk = pxdisk(iq);
141 auto endcap = pxendcap(iq);
142 return endcap == 1 ? -disk : disk;
147 uint32_t
id = iq.sourceModule.rawId();
157 bool isUpgrade = phase == 1;
160 auto detids = trackerGeometry.
detIds();
161 for (
DetId id : detids) {
185 iq.row = topo->
nrows() - 1;
191 iq.row = topo->
nrows() - 1;
211 auto coord = std::make_shared<SiPixelCoordinates>(
phase);
216 coord->init(&trackerTopology, &trackerGeometry, &siPixelFedCablingMap);
275 return from_coord(coord->signed_ladder(iq.
sourceModule()));
278 return from_coord(coord->signed_module(iq.
sourceModule()));
281 return from_coord(coord->signed_blade(iq.
sourceModule()));
296 intern(
"SignedModuleCoord"),
298 return from_coord(coord->signed_module_coord(iq.
sourceModule(), std::make_pair(
int(iq.
row),
int(iq.
col))));
304 intern(
"SignedLadderCoord"),
306 return from_coord(coord->signed_ladder_coord(iq.
sourceModule(), std::make_pair(
int(iq.
row),
int(iq.
col))));
312 intern(
"SignedDiskCoord"),
314 return from_coord(coord->signed_disk_coord(iq.
sourceModule(), std::make_pair(
int(iq.
row),
int(iq.
col))));
320 intern(
"SignedDiskRingCoord"),
322 return from_coord(coord->signed_disk_ring_coord(iq.
sourceModule(), std::make_pair(
int(iq.
row),
int(iq.
col))));
328 intern(
"SignedBladePanelCoord"),
331 return from_coord(coord->signed_blade_coord(iq.
sourceModule(), std::make_pair(
int(iq.
row),
int(iq.
col))));
332 }
else if (phase == 1) {
334 coord->signed_blade_panel_coord(iq.
sourceModule(), std::make_pair(
int(iq.
row),
int(iq.
col))));
341 phase == 1 ? 0.25 : 0.2);
343 intern(
"SignedShiftedBladePanelCoord"),
346 return from_coord(coord->signed_blade_coord(iq.
sourceModule(), std::make_pair(
int(iq.
row),
int(iq.
col))));
347 }
else if (phase == 1) {
349 coord->signed_shifted_blade_panel_coord(iq.
sourceModule(), std::make_pair(
int(iq.
row),
int(iq.
col))));
356 phase == 1 ? 0.25 : 0.1
359 intern(
"SignedBladePanel"),
361 return from_coord(coord->signed_blade_panel_coord(iq.
sourceModule(), std::make_pair(
int(iq.
row),
int(iq.
col))));
368 intern(
"SignedBladePanel"),
370 return from_coord(coord->signed_blade_panel_coord(iq.
sourceModule(), std::make_pair(
int(iq.
row),
int(iq.
col))));
378 return from_coord(coord->roc(iq.
sourceModule(), std::make_pair(
int(iq.
row),
int(iq.
col))));
384 return from_coord(coord->channel(iq.
sourceModule(), std::make_pair(
int(iq.
row),
int(iq.
col))));
401 int onlineblock = iConfig.
getParameter<
int>(
"onlineblock");
402 int n_onlineblocks = iConfig.
getParameter<
int>(
"n_onlineblocks");
413 onlineblock + n_onlineblocks - 1);
426 iConfig.
getParameter<
int>(
"max_lumisection") / lumiblock);
454 std::shared_ptr<SiPixelFrameReverter> siPixelFrameReverter =
456 std::make_shared<SiPixelFrameReverter>(labeledSiPixelFedCablingMap);
474 addExtractor(
intern(
"RocInLink"), [siPixelFrameReverter](InterestingQuantities
const& iq) {
476 return Value(siPixelFrameReverter->findRocInLink(iq.sourceModule.rawId(),
gp));
479 addExtractor(
intern(
"RocInDet"), [siPixelFrameReverter](InterestingQuantities
const& iq) {
481 return Value(siPixelFrameReverter->findRocInDet(iq.sourceModule.rawId(),
gp));
495 if (
name ==
"PXDisk" && val > 0)
496 value =
"_+" + std::to_string(
int(val));
498 std::map<int, std::string> shellname{{11,
"_mI"}, {12,
"_mO"}, {21,
"_pI"}, {22,
"_pO"}};
499 if (
name ==
"HalfCylinder" ||
name ==
"Shell")
500 value = shellname[int(val)];
502 value =
"_UNDEFINED";
std::map< ID, Value > max_value
std::string cablingMapLabel_
std::map< std::pair< Column, Value >, std::string > format_value
GeometryInterface(const edm::ParameterSet &, edm::ConsumesCollector &&, edm::Transition transition=edm::Transition::BeginRun)
static std::vector< std::string > checklist log
std::map< std::string, ID > ids
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
uint16_t *__restrict__ id
virtual int ncolumns() const =0
const DetIdContainer & detIds() const override
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
std::string pretty(Column col)
void addExtractor(ID id, std::function< Value(InterestingQuantities const &iq)> func, Value min=UNDEFINED, Value max=UNDEFINED, Value binwidth=1)
int quadrant(const DetId &detid, const TrackerTopology *tTopo_, bool phase_)
constexpr uint32_t rawId() const
get the raw id
std::string formatValue(Column, Value)
int bunchCrossing() const
virtual int nrows() const =0
edm::LuminosityBlockNumber_t luminosityBlock() const
global coordinates (row and column in DetUnit, as in PixelDigi)
bool getData(T &iHolder) const
void loadFromTopology(const TrackerGeometry &, const TrackerTopology &, const edm::ParameterSet &)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyToken_
void loadModuleLevel(const edm::ParameterSet &iConfig)
void load(edm::EventSetup const &iSetup)
std::string name() const override
from base class
void loadFromSiPixelCoordinates(const TrackerGeometry &, const TrackerTopology &, const SiPixelFedCablingMap &, const edm::ParameterSet &)
const edm::ParameterSet iConfig
std::vector< InterestingQuantities > all_modules
edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > labeledSiPixelFedCablingMapToken_
static const Value UNDEFINED
void loadFEDCabling(const SiPixelFedCablingMap *)
std::string name() const override
from base class
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
T getParameter(std::string const &) const
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > siPixelFedCablingMapToken_
std::vector< std::function< Value(InterestingQuantities const &iq)> > extractors
const edm::Event * sourceEvent
void loadTimebased(const edm::ParameterSet &iConfig)
std::map< ID, Value > min_value
ID intern(std::string const &id)
T mod(const T &a, const T &b)