41 siPixelFedCablingMapToken_ =
43 if (!cablingMapLabel_.empty()) {
44 labeledSiPixelFedCablingMapToken_ =
49 trackerGeometryToken_ =
52 siPixelFedCablingMapToken_ =
54 if (!cablingMapLabel_.empty()) {
55 labeledSiPixelFedCablingMapToken_ =
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();
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))));
454 std::shared_ptr<SiPixelFrameReverter> siPixelFrameReverter =
456 std::make_shared<SiPixelFrameReverter>(labeledSiPixelFedCablingMap);
495 if (
name ==
"PXDisk" &&
val > 0)
498 std::map<int, std::string> shellname{{11,
"_mI"}, {12,
"_mO"}, {21,
"_pI"}, {22,
"_pO"}};
499 if (
name ==
"HalfCylinder" ||
name ==
"Shell")
502 value =
"_UNDEFINED";
std::map< ID, Value > max_value
std::string cablingMapLabel_
std::map< std::pair< Column, Value >, std::string > format_value
T getParameter(std::string const &) const
GeometryInterface(const edm::ParameterSet &, edm::ConsumesCollector &&, edm::Transition transition=edm::Transition::BeginRun)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
std::map< std::string, ID > ids
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
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_)
std::string formatValue(Column, Value)
virtual int nrows() const =0
edm::LuminosityBlockNumber_t luminosityBlock() const
static std::string to_string(const XMLCh *ch)
global coordinates (row and column in DetUnit, as in PixelDigi)
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)
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 *)
constexpr uint32_t rawId() const
get the raw id
int bunchCrossing() const
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeometryToken_
edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > siPixelFedCablingMapToken_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
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)