50 log <<
"Known colum names:\n";
51 for (
auto e :
ids) log <<
"+++ column: " <<
e.first
62 std::vector<ID> geomquantities;
78 std::vector<std::pair<std::string, TTField>> namedPartitions {
91 for (
auto&
e : namedPartitions) {
92 geomquantities.push_back(
intern(
e.first));
103 auto diskid =
intern(
"PXDisk");
106 auto disk = pxdisk(iq);
108 auto endcap = pxendcap(iq);
109 return endcap == 1 ? -disk : disk;
114 uint32_t
id = iq.sourceModule.rawId();
125 bool isUpgrade = phase == 1;
133 auto module_rows = iConfig.
getParameter<
int>(
"module_rows") - 1;
134 auto module_cols = iConfig.
getParameter<
int>(
"module_cols") - 1;
137 auto detids = trackerGeometryHandle->detIds();
138 for (
DetId id : detids) {
158 iq.row = 1; iq.col = 1;
160 iq.row = module_rows-1; iq.col = 1;
162 iq.row = 1; iq.col = module_cols-1;
164 iq.row = module_rows-1; iq.col = module_cols-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()));
247 return from_coord(coord->signed_module_coord(iq.
sourceModule(),
248 std::make_pair(
int(iq.
row),
int(iq.
col))));
253 return from_coord(coord->signed_ladder_coord(iq.
sourceModule(),
254 std::make_pair(
int(iq.
row),
int(iq.
col))));
259 return from_coord(coord->signed_disk_coord(iq.
sourceModule(),
260 std::make_pair(
int(iq.
row),
int(iq.
col))));
266 return from_coord(coord->signed_blade_coord(
268 }
else if (phase == 1) {
269 return from_coord(coord->signed_blade_panel_coord(
280 return from_coord(coord->signed_blade_panel_coord(iq.
sourceModule(), std::make_pair(
int(iq.
row),
int(iq.
col))));
288 std::make_pair(
int(iq.
row),
int(iq.
col))));
309 int onlineblock = iConfig.
getParameter<
int>(
"onlineblock");
310 int n_onlineblocks = iConfig.
getParameter<
int>(
"n_onlineblocks");
318 onlineblock, onlineblock+n_onlineblocks-1
351 std::shared_ptr<SiPixelFrameReverter> siPixelFrameReverter =
353 std::make_shared<SiPixelFrameReverter>(iSetup, theCablingMap.operator->());
374 addExtractor(intern(
"RocInLink"),
375 [siPixelFrameReverter] (InterestingQuantities
const& iq) {
377 return Value(siPixelFrameReverter->findRocInLink(iq.sourceModule.rawId(),
gp));
381 addExtractor(intern(
"RocInDet"),
382 [siPixelFrameReverter] (InterestingQuantities
const& iq) {
384 return Value(siPixelFrameReverter->findRocInDet(iq.sourceModule.rawId(),
gp));
396 if (val == 0) value =
"";
397 if (
name ==
"PXDisk" && val > 0)
398 value =
"_+" + std::to_string(
int(val));
400 std::map<int, std::string> shellname{
401 {11,
"_mI"}, {12,
"_mO"}, {21,
"_pI"}, {22,
"_pO"}};
402 if (
name ==
"HalfCylinder" ||
name ==
"Shell") value = shellname[int(val)];
403 if (val ==
UNDEFINED) value =
"_UNDEFINED";
std::map< ID, Value > max_value
T getParameter(std::string const &) const
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
reco::JetExtendedAssociation::JetExtendedData Value
static const Value UNDEFINED
virtual std::string name() const
from base class
void loadFEDCabling(edm::EventSetup const &iSetup, const edm::ParameterSet &iConfig)
virtual std::string name() const
from base class
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)