52 log <<
"Known colum names:\n";
53 for (
auto e :
ids) log <<
"+++ column: " <<
e.first
62 assert(trackerTopologyHandle.
isValid());
64 std::vector<ID> geomquantities;
80 std::vector<std::pair<std::string, TTField>> namedPartitions {
93 for (
auto&
e : namedPartitions) {
94 geomquantities.push_back(
intern(
e.first));
107 auto diskid =
intern(
"PXDisk");
110 auto disk = pxdisk(iq);
112 auto endcap = pxendcap(iq);
113 return endcap == 1 ? -disk : disk;
118 uint32_t
id = iq.sourceModule.rawId();
129 bool isUpgrade = phase == 1;
134 assert(trackerGeometryHandle.
isValid());
137 auto detids = trackerGeometryHandle->
detIds();
138 for (
DetId id : detids) {
158 iq.row = 0; iq.col = 0;
160 iq.row = topo->
nrows()-1; iq.col = 0;
162 iq.row = 0; iq.col = topo->
ncolumns()-1;
180 auto coord = std::make_shared<SiPixelCoordinates>(phase);
204 case 1:
return Value(12);
205 case 2:
return Value(11);
206 case 3:
return Value(22);
207 case 4:
return Value(21);
217 case 1:
return Value(12);
218 case 2:
return Value(11);
219 case 3:
return Value(22);
220 case 4:
return Value(21);
229 return from_coord(coord->signed_ladder(iq.
sourceModule()));
234 return from_coord(coord->signed_module(iq.
sourceModule()));
239 return from_coord(coord->signed_blade(iq.
sourceModule()));
248 return from_coord(coord->signed_module_coord(iq.
sourceModule(),
249 std::make_pair(
int(iq.
row),
int(iq.
col))));
254 return from_coord(coord->signed_ladder_coord(iq.
sourceModule(),
255 std::make_pair(
int(iq.
row),
int(iq.
col))));
260 return from_coord(coord->signed_disk_coord(iq.
sourceModule(),
261 std::make_pair(
int(iq.
row),
int(iq.
col))));
266 return from_coord(coord->signed_disk_ring_coord(iq.
sourceModule(),
267 std::make_pair(
int(iq.
row),
int(iq.
col))));
273 return from_coord(coord->signed_blade_coord(
275 }
else if (phase == 1) {
276 return from_coord(coord->signed_blade_panel_coord(
286 return from_coord(coord->signed_blade_coord(
288 }
else if (phase == 1) {
289 return from_coord(coord->signed_shifted_blade_panel_coord(
298 return from_coord(coord->signed_blade_panel_coord(iq.
sourceModule(), std::make_pair(
int(iq.
row),
int(iq.
col))));
304 return from_coord(coord->signed_blade_panel_coord(iq.
sourceModule(), std::make_pair(
int(iq.
row),
int(iq.
col))));
312 std::make_pair(
int(iq.
row),
int(iq.
col))));
322 return from_coord(coord->channel(iq.
sourceModule(), std::make_pair(
int(iq.
row),
int(iq.
col))));
339 int onlineblock = iConfig.
getParameter<
int>(
"onlineblock");
340 int n_onlineblocks = iConfig.
getParameter<
int>(
"n_onlineblocks");
348 onlineblock, onlineblock+n_onlineblocks-1
359 -0.5, iConfig.
getParameter<
int>(
"max_lumisection")/lumiblock
393 std::shared_ptr<SiPixelFrameReverter> siPixelFrameReverter =
395 std::make_shared<SiPixelFrameReverter>(iSetup, theCablingMap.operator->());
439 if (val == 0) value =
"";
440 if (
name ==
"PXDisk" && val > 0)
441 value =
"_+" + std::to_string(
int(val));
443 std::map<int, std::string> shellname{
444 {11,
"_mI"}, {12,
"_mO"}, {21,
"_pI"}, {22,
"_pO"}};
445 if (
name ==
"HalfCylinder" ||
name ==
"Shell") value = shellname[
int(val)];
446 if (val ==
UNDEFINED) value =
"_UNDEFINED";
std::map< ID, Value > max_value
bool hasField(const DetId &id, DetIdFields idx) const
T getParameter(std::string const &) const
const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
virtual int nrows() const =0
std::map< std::pair< Column, Value >, std::string > format_value
std::map< std::string, ID > ids
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)
std::string formatValue(Column, Value)
int bunchCrossing() const
edm::LuminosityBlockNumber_t luminosityBlock() const
global coordinates (row and column in DetUnit, as in PixelDigi)
uint32_t rawId() const
get the raw id
void loadFromTopology(edm::EventSetup const &iSetup, const edm::ParameterSet &iConfig)
void load(edm::EventSetup const &iSetup)
const edm::ParameterSet iConfig
std::vector< InterestingQuantities > all_modules
static const Value UNDEFINED
virtual std::string name() const
from base class
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
unsigned int getField(const DetId &id, DetIdFields idx) const
void loadFEDCabling(edm::EventSetup const &iSetup, const edm::ParameterSet &iConfig)
virtual std::string name() const
from base class
virtual int ncolumns() const =0
const DetIdContainer & detIds() const
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
void loadModuleLevel(edm::EventSetup const &iSetup, const edm::ParameterSet &iConfig)
std::vector< std::function< Value(InterestingQuantities const &iq)> > extractors
const edm::Event * sourceEvent
std::map< ID, Value > min_value
ID intern(std::string const &id)
T mod(const T &a, const T &b)
void loadTimebased(edm::EventSetup const &iSetup, const edm::ParameterSet &iConfig)
void loadFromSiPixelCoordinates(edm::EventSetup const &iSetup, const edm::ParameterSet &iConfig)