86 consumes<reco::VertexCollection>(
vtxsrc_);
97 LogInfo(
"PixelDQM") <<
"SiPixelTrackResidualSource constructor" << endl;
109 LogInfo(
"PixelDQM") <<
"SiPixelTrackResidualSource destructor" << endl;
111 std::map<uint32_t, SiPixelTrackResidualModule *>::iterator struct_iter;
113 delete struct_iter->second;
114 struct_iter->second =
nullptr;
119 LogInfo(
"PixelDQM") <<
"SiPixelTrackResidualSource beginRun()" << endl;
124 LogVerbatim(
"PixelDQM") <<
"TrackerGeometry " << &(*TG) <<
" size is " << TG->
dets().size() << endl;
131 for (TrackerGeometry::DetContainer::const_iterator pxb = TG->
detsPXB().begin(); pxb != TG->
detsPXB().end(); pxb++) {
132 if (dynamic_cast<PixelGeomDetUnit const *>((*pxb)) !=
nullptr) {
135 pair<uint32_t, SiPixelTrackResidualModule *>((*pxb)->geographicalId().rawId(), module));
143 for (TrackerGeometry::DetContainer::const_iterator pxf = TG->
detsPXF().begin(); pxf != TG->
detsPXF().end(); pxf++) {
144 if (dynamic_cast<PixelGeomDetUnit const *>((*pxf)) !=
nullptr) {
147 pair<uint32_t, SiPixelTrackResidualModule *>((*pxf)->geographicalId().rawId(), module));
163 std::stringstream nameX, titleX, nameY, titleY;
169 nameX <<
"siPixelTrackResidualsX_SummedLayer_" <<
i;
171 titleX <<
"Layer" <<
i <<
"Hit-to-Track Residual in r-phi";
175 nameY <<
"siPixelTrackResidualsY_SummedLayer_" <<
i;
177 titleY <<
"Layer" <<
i <<
"Hit-to-Track Residual in Z";
183 for (std::map<uint32_t, SiPixelTrackResidualModule *>::iterator pxd =
theSiPixelStructure.begin();
190 throw cms::Exception(
"LogicError") <<
"SiPixelTrackResidualSource Folder Creation Failed! ";
196 throw cms::Exception(
"LogicError") <<
"SiPixelTrackResidualSource ladder Folder Creation Failed! ";
202 throw cms::Exception(
"LogicError") <<
"SiPixelTrackResidualSource layer Folder Creation Failed! ";
208 throw cms::Exception(
"LogicError") <<
"SiPixelTrackResidualSource phi Folder Creation Failed! ";
214 throw cms::Exception(
"LogicError") <<
"SiPixelTrackResidualSource Blade Folder Creation Failed! ";
220 throw cms::Exception(
"LogicError") <<
"SiPixelTrackResidualSource Disk Folder Creation Failed! ";
226 throw cms::Exception(
"LogicError") <<
"SiPixelTrackResidualSource Ring Folder Creation Failed! ";
246 "ntracksInPixVol_" +
tracksrc_.
label(),
"Number of Tracks crossing Pixel fiducial Volume", 2, 0, 2);
271 std::stringstream ss1, ss2;
284 ss2 <<
"Charge (on track, layer" <<
i <<
")";
292 ss2 <<
"Charge (on track, diskp" <<
i <<
")";
300 ss2 <<
"Charge (on track, diskm" <<
i <<
")";
318 ss2 <<
"Charge (off track, layer" <<
i <<
")";
326 ss2 <<
"Charge (off track, diskp" <<
i <<
")";
334 ss2 <<
"Charge (off track, diskm" <<
i <<
")";
354 ss2 <<
"Size (on track, layer" <<
i <<
")";
362 ss2 <<
"Size (on track, diskp" <<
i <<
")";
370 ss2 <<
"Size (on track, diskm" <<
i <<
")";
386 ss2 <<
"SizeX (on track, layer" <<
i <<
")";
394 ss2 <<
"SizeX (on track, diskp" <<
i <<
")";
402 ss2 <<
"SizeX (on track, diskm" <<
i <<
")";
418 ss2 <<
"SizeY (on track, layer" <<
i <<
")";
426 ss2 <<
"SizeY (on track, diskp" <<
i <<
")";
434 ss2 <<
"SizeY (on track, diskm" <<
i <<
")";
452 ss2 <<
"Size (off track, layer" <<
i <<
")";
477 ss1 <<
"pix_bar Occ_roc_offtrack" +
digisrc_.
label() +
"_layer_" <<
i;
479 ss2 <<
"Pixel Barrel Occupancy, ROC level (Off Track): Layer " <<
i;
489 ss2 <<
"Size (off track, diskp" <<
i <<
")";
497 ss2 <<
"Size (off track, diskm" <<
i <<
")";
513 ss2 <<
"SizeX (off track, layer" <<
i <<
")";
521 ss2 <<
"SizeX (off track, diskp" <<
i <<
")";
529 ss2 <<
"SizeX (off track, diskm" <<
i <<
")";
545 ss2 <<
"SizeY (off track, layer" <<
i <<
")";
553 ss2 <<
"SizeY (off track, diskp" <<
i <<
")";
561 ss2 <<
"SizeY (off track, diskm" <<
i <<
")";
574 ss2 <<
"Clusters Layer" <<
i <<
" (on track)";
600 ss2 <<
"Clusters Layer" <<
i <<
"_LadvsMod (on track)";
626 ss1 <<
"pix_bar Occ_roc_ontrack" +
digisrc_.
label() +
"_layer_" <<
i;
628 ss2 <<
"Pixel Barrel Occupancy, ROC level (On Track): Layer " <<
i;
638 ss2 <<
"nclusters (on track, layer" <<
i <<
")";
649 ss2 <<
"Clusters +Z Disk" <<
i <<
" (on track)";
658 ss2 <<
"Clusters -Z Disk" <<
i <<
" (on track)";
667 "nclusters_" +
clustersrc_.
label() +
"_Barrel",
"Number of Clusters (on track, barrel)", 50, 0., 50.);
670 "nclusters_" +
clustersrc_.
label() +
"_Endcap",
"Number of Clusters (on track, endcap)", 50, 0., 50.);
676 ss2 <<
"Number of Clusters (on track, layer" <<
i <<
")";
684 ss2 <<
"Number of Clusters (on track, diskp" <<
i <<
")";
691 ss2 <<
"nclusters (on track, diskp" <<
i <<
")";
700 ss2 <<
"Number of Clusters (on track, diskm" <<
i <<
")";
707 ss2 <<
"nclusters (on track, diskm" <<
i <<
")";
714 "ROC_endcap_occupancy_ontrk",
"Pixel Endcap Occupancy, ROC level (On Track)", 72, -4.5, 4.5, 288, -12.5, 12.5);
733 ss2 <<
"Clusters Layer" <<
i <<
" (off track)";
743 ss2 <<
"Clusters +Z Disk" <<
i <<
" (off track)";
752 ss2 <<
"Clusters -Z Disk" <<
i <<
" (off track)";
761 "nclusters_" +
clustersrc_.
label() +
"_Barrel",
"Number of Clusters (off track, barrel)", 50, 0., 50.);
764 "nclusters_" +
clustersrc_.
label() +
"_Endcap",
"Number of Clusters (off track, endcap)", 50, 0., 50.);
770 ss2 <<
"Number of Clusters (off track, layer" <<
i <<
")";
778 ss2 <<
"Number of Clusters (off track, diskp" <<
i <<
")";
786 ss2 <<
"Number of Clusters (off track, diskm" <<
i <<
")";
792 "ROC_endcap_occupancy_offtrk",
"Pixel Endcap Occupancy, ROC level (Off Track)", 72, -4.5, 4.5, 288, -12.5, 12.5);
808 "FractionLowProb",
"Fraction of hits with low probability;FractionLowProb;#HitsOnTrack", 100, 0., 1.);
815 for (
int s = 0;
s < 3;
s++) {
816 sprintf(hisID,
"residual_x_subdet_%i",
s);
819 sprintf(hisID,
"residual_y_subdet_%i",
s);
869 double bestNdof = 0.0;
870 double maxSumPt = 0.0;
872 for (reco::VertexCollection::const_iterator iVertex =
vertices->begin(); iVertex !=
vertices->end(); ++iVertex) {
873 if (iVertex->ndof() > bestNdof) {
874 bestNdof = iVertex->
ndof();
877 if (iVertex->p4().pt() > maxSumPt) {
878 maxSumPt = iVertex->p4().pt();
923 cout <<
"Unable to find TrackerDigiGeometry. Return\n";
931 for (reco::TrackCollection::const_iterator iTrack = TracksForRes->begin(); iTrack != TracksForRes->end(); ++iTrack) {
938 double pt = iTrack->pt();
941 if (
abs(iTrack->dxy(vtxP)) > 5 * iTrack->dxyError())
944 double charge = iTrack->charge();
951 if (iTrack->extra().isNonnull() && iTrack->extra().isAvailable()) {
966 vector<TransientTrackingRecHit::RecHitPointer> GoodPixBarrelHits;
969 if ((*irecHit)->isValid()) {
970 DetId detId = (*irecHit)->geographicalId();
972 if (detId.
det() != 1) {
974 cout <<
"rec hit ID = " << detId.
det() <<
" not in tracker!?!?\n";
985 double gX = trecHit->globalPosition().x();
986 double gY = trecHit->globalPosition().y();
987 double gZ = trecHit->globalPosition().z();
998 GoodPixBarrelHits.push_back((trecHit));
1006 GoodPixBarrelHits.push_back((trecHit));
1014 GoodPixBarrelHits.push_back((trecHit));
1023 if (n1 + n2 + n3 == 3 && n1 * n2 * n3 > 0) {
1024 for (
unsigned int i = 0;
i < GoodPixBarrelHits.size();
i++) {
1025 if (GoodPixBarrelHits[
i]->isValid()) {
1026 DetId detId = GoodPixBarrelHits[
i]->geographicalId().
rawId();
1029 double dca2 = 0.0, dz2 = 0.0;
1042 triplets(
x2,
y2,
z2,
x1,
y1, z1, x3, y3, z3, ptsig, dca2, dz2, kap);
1045 residual = Test - Test2;
1049 triplets(
x1,
y1, z1,
x2,
y2,
z2, x3, y3, z3, ptsig, dca2, dz2, kap);
1052 residual = Test - Test2;
1056 triplets(
x1,
y1, z1, x3, y3, z3,
x2,
y2,
z2, ptsig, dca2, dz2, kap);
1059 residual = Test - Test2;
1063 std::map<uint32_t, SiPixelTrackResidualModule *>::iterator pxd =
theSiPixelStructure.find(detId);
1090 auto const &clustColl = *(clusterColl.
product());
1097 std::set<SiPixelCluster> clusterSet;
1099 int tracks = 0, pixeltracks = 0, bpixtracks = 0, fpixtracks = 0;
1100 int trackclusters = 0, barreltrackclusters = 0, endcaptrackclusters = 0;
1101 int otherclusters = 0, barrelotherclusters = 0, endcapotherclusters = 0;
1110 std::cout <<
"Trajectories for Res from " <<
labels.module << std::endl;
1113 if (trajCollectionHandle.
isValid()) {
1114 auto const &trajColl = *(trajCollectionHandle.
product());
1118 auto const &ttac = *(
match.product());
1121 std::cout <<
"Trajectories\t : " << trajColl.size() << std::endl;
1123 std::cout <<
"Map entries \t : " << ttac.size() << std::endl;
1133 bool isBpixtrack =
false, isFpixtrack =
false, crossesPixVol =
false;
1138 double d0 = (*trackref).d0(),
dz = (*trackref).dz();
1141 crossesPixVol =
true;
1143 const std::vector<TrajectoryMeasurement> &tmeasColl = traj_iterator->measurements();
1144 std::vector<TrajectoryMeasurement>::const_iterator tmeasIt;
1147 for (tmeasIt = tmeasColl.begin(); tmeasIt != tmeasColl.end(); tmeasIt++) {
1148 if (!tmeasIt->updatedState().isValid())
1151 if (!testhit->isValid() || testhit->geographicalId().det() !=
DetId::Tracker)
1153 uint testSubDetID = (testhit->geographicalId().subdetId());
1169 if (isBpixtrack || isFpixtrack) {
1175 const std::vector<TrajectoryMeasurement> &tmeasColl = traj_iterator->measurements();
1176 for (std::vector<TrajectoryMeasurement>::const_iterator tmeasIt = tmeasColl.begin(); tmeasIt != tmeasColl.end();
1178 if (!tmeasIt->updatedState().isValid())
1190 const DetId &hit_detId =
hit->geographicalId();
1194 if (IntSubDetID == 0)
1200 if ((persistentHit !=
nullptr) && (
typeid(*persistentHit) ==
typeid(
SiPixelRecHit))) {
1202 const SiPixelRecHit *pixhit = static_cast<const SiPixelRecHit *>(
hit->hit());
1204 float hit_prob = -1.;
1208 if (hit_prob <
pow(10., -15.))
1223 static_cast<const PixelGeomDetUnit *>(theTracker.
idToDet(hit_detId));
1226 if (theGeomDet ==
nullptr) {
1235 std::map<uint32_t, SiPixelTrackResidualModule *>::iterator pxd =
1243 float clust_alpha = atan2(localDir.
z(), localDir.
x());
1244 float clust_beta = atan2(localDir.
z(), localDir.
y());
1245 double corrCharge = clust->charge() *
1246 sqrt(1.0 / (1.0 /
pow(
tan(clust_alpha), 2) + 1.0 /
pow(
tan(clust_beta), 2) + 1.0)) /
1250 (*pxd).second->fill(
1251 (*clust),
true, corrCharge,
reducedSet,
modOn,
ladOn,
layOn,
phiOn,
bladeOn,
diskOn,
ringOn);
1259 clusterSet.insert(*clust);
1263 float xcenter = clust->x();
1264 float ycenter = clust->y();
1276 barreltrackclusters++;
1278 DetId detId = (*hit).geographicalId();
1279 if (detId >= 302055684 && detId <= 352477708) {
1290 float phi = clustgp.
phi();
1291 float z = clustgp.
z();
1298 int ladderSigned =
ladder;
1299 int moduleSigned = module;
1304 moduleSigned = -module;
1312 if (DBlayer ==
i + 1) {
1324 endcaptrackclusters++;
1332 float x = clustgp.
x();
1333 float y = clustgp.
y();
1334 float z = clustgp.
z();
1335 float phi = clustgp.
phi();
1337 float xclust = clust->x();
1338 float yclust = clust->y();
1344 if (DBdisk ==
i + 1) {
1355 if (DBdisk ==
i + 1) {
1389 std::cout <<
"clusters not on track: (size " << clustColl.size() <<
") ";
1391 for (TrackerGeometry::DetContainer::const_iterator it = TG->
dets().begin(); it != TG->
dets().end(); it++) {
1393 DetId detId = (*it)->geographicalId();
1394 if (detId >= 302055684 && detId <= 352477708) {
1396 int nofclOnTrack = 0, nofclOffTrack = 0;
1399 if (isearch != clustColl.
end()) {
1401 for (di = isearch->
begin(); di != isearch->
end(); di++) {
1402 unsigned int temp = clusterSet.size();
1403 clusterSet.insert(*di);
1405 if (clusterSet.size() >
temp) {
1415 std::map<uint32_t, SiPixelTrackResidualModule *>::iterator pxd =
1419 (*pxd).second->fill((*di),
false, -1.,
reducedSet,
modOn,
ladOn,
layOn,
phiOn,
bladeOn,
diskOn,
ringOn);
1432 if (theGeomDet ==
nullptr) {
1440 float xcenter = di->x();
1441 float ycenter = di->y();
1450 if (
DetId(detId).subdetId() == 1) {
1455 barrelotherclusters++;
1457 float phi = clustgp.
phi();
1461 if (DBlayer ==
i + 1) {
1476 endcapotherclusters++;
1478 float x = clustgp.
x();
1479 float y = clustgp.
y();
1486 if (DBdisk ==
i + 1) {
1496 if (DBdisk ==
i + 1) {
1515 if (theGeomDet ==
nullptr) {
1522 float xcenter = di->x();
1523 float ycenter = di->y();
1534 std::map<uint32_t, SiPixelTrackResidualModule *>::iterator pxd =
1537 (*pxd).second->nfill(
1539 if (nofclOnTrack != 0)
1541 if (nofclOffTrack != 0)
1544 if (
DetId(detId).subdetId() == 1) {
1545 if (nofclOnTrack != 0)
1547 if (nofclOffTrack != 0)
1551 if (DBlayer ==
i + 1) {
1552 if (nofclOnTrack != 0)
1554 if (nofclOffTrack != 0)
1560 if (
DetId(detId).subdetId() == 2) {
1563 if (nofclOnTrack != 0)
1565 if (nofclOffTrack != 0)
1569 if (DBdisk ==
i + 1) {
1570 if (nofclOnTrack != 0)
1572 if (nofclOffTrack != 0)
1579 if (DBdisk ==
i + 1) {
1580 if (nofclOnTrack != 0)
1582 if (nofclOffTrack != 0)
1592 if (trackclusters > 0)
1594 if (barreltrackclusters > 0)
1596 if (endcaptrackclusters > 0)
1598 if (otherclusters > 0)
1600 if (barrelotherclusters > 0)
1602 if (endcapotherclusters > 0)
1606 if (pixeltracks > 0)
1617 std::vector<MonitorElement *> meinput) {
1619 if (ipxsearch != diginp.
end()) {
1622 for (pxdi = ipxsearch->
begin(); pxdi != ipxsearch->
end(); pxdi++) {
1630 if (DBshell == 1 || DBshell == 2) {
1631 DBmodule = -DBmodule;
1633 if (DBshell == 1 || DBshell == 3) {
1634 DBladder = -DBladder;
1637 int col = pxdi->column();
1638 int row = pxdi->row();
1640 float modsign = (
float)DBmodule / (
abs((
float)DBmodule));
1641 float ladsign = (
float)DBladder / (
abs((
float)DBladder));
1642 float rocx = ((
float)
col / (52. * 8.)) * modsign + ((
float)DBmodule - (modsign)*0.5);
1643 float rocy = ((
float)row / (80. * 2.)) * ladsign + ((
float)DBladder - (ladsign)*0.5);
1647 if ((DBladder % 2 == 0) && (!isHalfModule)) {
1650 if ((
flip) && (DBladder > 0)) {
1651 if ((((
float)DBladder - (ladsign)*0.5) <= rocy) && (rocy < (
float)DBladder)) {
1652 rocy = rocy + ladsign * 0.5;
1653 }
else if ((((
float)DBladder) <= rocy) && (rocy < ((
float)DBladder + (ladsign)*0.5))) {
1654 rocy = rocy - ladsign * 0.5;
1660 rocx = rocx - 0.0001;
1663 rocy = rocy - 0.0001;
1665 rocy = rocy + 0.0001;
1667 if (
abs(DBladder) == 1) {
1668 rocy = rocy + ladsign * 0.5;
1672 meinput.at(0)->Fill(rocx, rocy);
1675 meinput.at(1)->Fill(rocx, rocy);
1678 meinput.at(2)->Fill(rocx, rocy);
1698 using namespace std;
1703 double rho = 1 / kap;
1706 double r3 =
sqrt(x3 * x3 + y3 * y3);
1709 cout <<
"warn r1 = " <<
r1 <<
", r3 = " << r3 << endl;
1715 double L =
sqrt((x3 -
x1) * (x3 -
x1) + (y3 -
y1) * (y3 -
y1));
1731 double x0 = 0.5 * (
x1 + x3) + lam /
L * (-
y1 + y3);
1732 double y0 = 0.5 * (
y1 + y3) + lam /
L * (
x1 - x3);
1736 double num = (y3 - y0) * (
x1 - x0) - (x3 - x0) * (
y1 - y0);
1737 double den = (
x1 - x0) * (x3 - x0) + (
y1 - y0) * (y3 - y0);
1738 double tandip = kap * (z3 - z1) / atan(
num / den);
1742 double dphi = atan(((
x1 - x0) * y0 - (
y1 - y0) * x0) / ((
x1 - x0) * x0 + (
y1 - y0) * y0));
1745 double uz0 = z1 + tandip * dphi *
rho;
1767 xx =
x2 + (dca2 * ((x0 -
x2)) /
sqrt((x0 -
x2) * (x0 -
x2) + (y0 -
y2) * (y0 -
y2)));
1768 yy =
y2 + (dca2 * ((y0 -
y2)) /
sqrt((x0 -
x2) * (x0 -
x2) + (y0 -
y2) * (y0 -
y2)));
1769 }
else if (kap >= 0) {
1770 xx =
x2 - (dca2 * ((x0 -
x2)) /
sqrt((x0 -
x2) * (x0 -
x2) + (y0 -
y2) * (y0 -
y2)));
1771 yy =
y2 - (dca2 * ((y0 -
y2)) /
sqrt((x0 -
x2) * (x0 -
x2) + (y0 -
y2) * (y0 -
y2)));
1777 double dphi2 = atan(((
xx - x0) * y0 - (
yy - y0) * x0) / ((
xx - x0) * x0 + (
yy - y0) * y0));
1781 double uz2 = uz0 - dphi2 * tandip *
rho;
1797 int pxfpanel = tTopo->
pxfPanel((*hit).geographicalId());
1798 int pxfmodule = tTopo->
pxfModule((*hit).geographicalId());
1799 int pxfdisk = tTopo->
pxfDisk((*hit).geographicalId());
1800 int pxfblade_off = tTopo->
pxfBlade((*hit).geographicalId());
1811 pxfdisk = -1. * pxfdisk;
1814 if (pxfblade_off <= 6 && pxfblade_off >= 1) {
1815 pxfblade = 7 - pxfblade_off;
1816 }
else if (pxfblade_off <= 18 && pxfblade_off >= 7) {
1817 pxfblade = 6 - pxfblade_off;
1818 }
else if (pxfblade_off <= 24 && pxfblade_off >= 19) {
1819 pxfblade = 31 - pxfblade_off;
1822 int clu_sdpx = ((pxfdisk > 0) ? 1 : -1) * (2 * (
abs(pxfdisk) - 1) + pxfpanel);
1823 int binselx = (pxfpanel == 1 && (pxfmodule == 1 || pxfmodule == 4))
1825 : ((pxfpanel == 1 && xclust < 80.0) || (pxfpanel == 2 && xclust >= 80.0));
1826 int nperpan = 2 * pxfmodule + pxfpanel - 1 + binselx;
1828 ((pxfdisk > 0) ? nperpan : 9 - nperpan) + (clu_sdpx + 4) * 8 - 2 * ((
abs(pxfdisk) == 1) ? pxfdisk : 0);
1830 int clu_roc_biny = -99.;
1831 int nrocly = pxfmodule + pxfpanel;
1832 for (
int i = 0;
i < nrocly;
i++) {
1833 int j = (pxfdisk < 0) ?
i : nrocly - 1 -
i;
1834 if (yclust >= (
j * 52.0) && yclust < ((
j + 1) * 52.0))
1835 clu_roc_biny = 6 - nrocly + 2 *
i + ((pxfblade > 0) ? pxfblade - 1 : pxfblade + 12) * 12 + 1;
1838 clu_roc_biny = clu_roc_biny + 144;
1850 int pxfpanel = pxfid.
panel();
1851 int pxfmodule = pxfid.
module();
1852 int pxfdisk = pxfid.
disk();
1853 int pxfblade_off = pxfid.
blade();
1856 pxfdisk = -1. * pxfdisk;
1860 if (pxfblade_off <= 6 && pxfblade_off >= 1) {
1861 pxfblade = 7 - pxfblade_off;
1862 }
else if (pxfblade_off <= 18 && pxfblade_off >= 7) {
1863 pxfblade = 6 - pxfblade_off;
1864 }
else if (pxfblade_off <= 24 && pxfblade_off >= 19) {
1865 pxfblade = 31 - pxfblade_off;
1868 int clu_sdpx = ((pxfdisk > 0) ? 1 : -1) * (2 * (
abs(pxfdisk) - 1) + pxfpanel);
1869 int binselx = (pxfpanel == 1 && (pxfmodule == 1 || pxfmodule == 4))
1871 : ((pxfpanel == 1 && xclust < 80.0) || (pxfpanel == 2 && xclust >= 80.0));
1872 int nperpan = 2 * pxfmodule + pxfpanel - 1 + binselx;
1874 ((pxfdisk > 0) ? nperpan : 9 - nperpan) + (clu_sdpx + 4) * 8 - 2 * ((
abs(pxfdisk) == 1) ? pxfdisk : 0);
1876 int clu_roc_biny = -99.;
1877 int nrocly = pxfmodule + pxfpanel;
1878 for (
int i = 0;
i < nrocly;
i++) {
1879 int j = (pxfdisk < 0) ?
i : nrocly - 1 -
i;
1880 if (yclust >= (
j * 52.0) && yclust < ((
j + 1) * 52.0))
1881 clu_roc_biny = 6 - nrocly + 2 *
i + ((pxfblade > 0) ? pxfblade - 1 : pxfblade + 12) * 12 + 1;
1884 clu_roc_biny = clu_roc_biny + 144;