67 modOn( pSet.getUntrackedParameter<
bool>(
"modOn",
true) ),
68 reducedSet( pSet.getUntrackedParameter<
bool>(
"reducedSet",
true) ),
69 ladOn( pSet.getUntrackedParameter<
bool>(
"ladOn",
false) ),
70 layOn( pSet.getUntrackedParameter<
bool>(
"layOn",
false) ),
71 phiOn( pSet.getUntrackedParameter<
bool>(
"phiOn",
false) ),
72 ringOn( pSet.getUntrackedParameter<
bool>(
"ringOn",
false) ),
73 bladeOn( pSet.getUntrackedParameter<
bool>(
"bladeOn",
false) ),
74 diskOn( pSet.getUntrackedParameter<
bool>(
"diskOn",
false) ),
75 isUpgrade( pSet.getUntrackedParameter<
bool>(
"isUpgrade",
false) ),
97 LogInfo(
"PixelDQM") <<
"SiPixelTrackResidualSource constructor" << endl;
112 LogInfo(
"PixelDQM") <<
"SiPixelTrackResidualSource destructor" << endl;
114 std::map<uint32_t,SiPixelTrackResidualModule*>::iterator struct_iter;
116 delete struct_iter->second;
117 struct_iter->second =
nullptr;
123 LogInfo(
"PixelDQM") <<
"SiPixelTrackResidualSource beginRun()" << endl;
127 if (
debug_)
LogVerbatim(
"PixelDQM") <<
"TrackerGeometry "<< &(*TG) <<
" size is "<< TG->
dets().size() << endl;
133 for (TrackerGeometry::DetContainer::const_iterator pxb = TG->
detsPXB().begin();
134 pxb!=TG->
detsPXB().end(); pxb++) {
135 if (dynamic_cast<PixelGeomDetUnit const *>((*pxb))!=
nullptr) {
137 theSiPixelStructure.insert(pair<uint32_t, SiPixelTrackResidualModule*>((*pxb)->geographicalId().rawId(), module));
143 for (TrackerGeometry::DetContainer::const_iterator pxf = TG->
detsPXF().begin();
144 pxf!=TG->
detsPXF().end(); pxf++) {
145 if (dynamic_cast<PixelGeomDetUnit const *>((*pxf))!=
nullptr) {
147 theSiPixelStructure.insert(pair<uint32_t, SiPixelTrackResidualModule*>((*pxf)->geographicalId().rawId(), module));
160 std::stringstream nameX, titleX, nameY, titleY;
165 nameX.str(
std::string()); nameX <<
"siPixelTrackResidualsX_SummedLayer_" <<
i;
166 titleX.str(
std::string()); titleX <<
"Layer"<< i <<
"Hit-to-Track Residual in r-phi";
169 nameY.str(
std::string()); nameY <<
"siPixelTrackResidualsY_SummedLayer_" <<
i;
170 titleY.str(
std::string()); titleY <<
"Layer"<< i <<
"Hit-to-Track Residual in Z";
176 for (std::map<uint32_t, SiPixelTrackResidualModule*>::iterator pxd =
theSiPixelStructure.begin();
181 else throw cms::Exception(
"LogicError") <<
"SiPixelTrackResidualSource Folder Creation Failed! ";
188 else throw cms::Exception(
"LogicError") <<
"SiPixelTrackResidualSource ladder Folder Creation Failed! ";
192 else throw cms::Exception(
"LogicError") <<
"SiPixelTrackResidualSource layer Folder Creation Failed! ";
196 else throw cms::Exception(
"LogicError") <<
"SiPixelTrackResidualSource phi Folder Creation Failed! ";
200 else throw cms::Exception(
"LogicError") <<
"SiPixelTrackResidualSource Blade Folder Creation Failed! ";
204 else throw cms::Exception(
"LogicError") <<
"SiPixelTrackResidualSource Disk Folder Creation Failed! ";
208 else throw cms::Exception(
"LogicError") <<
"SiPixelTrackResidualSource Ring Folder Creation Failed! ";
249 std::stringstream ss1, ss2;
259 ss2.str(
std::string()); ss2 <<
"Charge (on track, layer" <<
i <<
")";
266 ss2.str(
std::string()); ss2 <<
"Charge (on track, diskp" <<
i <<
")";
273 ss2.str(
std::string()); ss2 <<
"Charge (on track, diskm" <<
i <<
")";
288 ss2.str(
std::string()); ss2 <<
"Charge (off track, layer" <<
i <<
")";
295 ss2.str(
std::string()); ss2 <<
"Charge (off track, diskp" <<
i <<
")";
302 ss2.str(
std::string()); ss2 <<
"Charge (off track, diskm" <<
i <<
")";
319 ss2.str(
std::string()); ss2 <<
"Size (on track, layer" <<
i <<
")";
326 ss2.str(
std::string()); ss2 <<
"Size (on track, diskp" <<
i <<
")";
333 ss2.str(
std::string()); ss2 <<
"Size (on track, diskm" <<
i <<
")";
346 ss2.str(
std::string()); ss2 <<
"SizeX (on track, layer" <<
i <<
")";
353 ss2.str(
std::string()); ss2 <<
"SizeX (on track, diskp" <<
i <<
")";
360 ss2.str(
std::string()); ss2 <<
"SizeX (on track, diskm" <<
i <<
")";
373 ss2.str(
std::string()); ss2 <<
"SizeY (on track, layer" <<
i <<
")";
380 ss2.str(
std::string()); ss2 <<
"SizeY (on track, diskp" <<
i <<
")";
387 ss2.str(
std::string()); ss2 <<
"SizeY (on track, diskm" <<
i <<
")";
402 ss2.str(
std::string()); ss2 <<
"Size (off track, layer" <<
i <<
")";
408 int ybins = -1;
float ymin = 0.;
float ymax = 0.;
409 if (
i==1) { ybins = 42; ymin = -10.5; ymax = 10.5; }
410 if (
i==2) { ybins = 66; ymin = -16.5; ymax = 16.5; }
411 if (
i==3) { ybins = 90; ymin = -22.5; ymax = 22.5; }
413 ss2.str(
std::string()); ss2 <<
"Pixel Barrel Occupancy, ROC level (Off Track): Layer " <<
i;
422 ss2.str(
std::string()); ss2 <<
"Size (off track, diskp" <<
i <<
")";
429 ss2.str(
std::string()); ss2 <<
"Size (off track, diskm" <<
i <<
")";
442 ss2.str(
std::string()); ss2 <<
"SizeX (off track, layer" <<
i <<
")";
449 ss2.str(
std::string()); ss2 <<
"SizeX (off track, diskp" <<
i <<
")";
456 ss2.str(
std::string()); ss2 <<
"SizeX (off track, diskm" <<
i <<
")";
469 ss2.str(
std::string()); ss2 <<
"SizeY (off track, layer" <<
i <<
")";
476 ss2.str(
std::string()); ss2 <<
"SizeY (off track, diskp" <<
i <<
")";
483 ss2.str(
std::string()); ss2 <<
"SizeY (off track, diskm" <<
i <<
")";
495 ss2.str(
std::string()); ss2 <<
"Clusters Layer" <<
i <<
" (on track)";
500 int ybins = -1;
float ymin = 0.;
float ymax = 0.;
501 if (i==1) { ybins = 23; ymin = -11.5; ymax = 11.5; }
502 if (i==2) { ybins = 33; ymin = -17.5; ymax = 17.5; }
503 if (i==3) { ybins = 45; ymin = -24.5; ymax = 24.5; }
505 ss2.str(
std::string()); ss2 <<
"Clusters Layer" << i <<
"_LadvsMod (on track)";
512 int ybins = -1;
float ymin = 0.;
float ymax = 0.;
513 if (
i==1) { ybins = 42; ymin = -10.5; ymax = 10.5; }
514 if (
i==2) { ybins = 66; ymin = -16.5; ymax = 16.5; }
515 if (
i==3) { ybins = 90; ymin = -22.5; ymax = 22.5; }
517 ss2.str(
std::string()); ss2 <<
"Pixel Barrel Occupancy, ROC level (On Track): Layer " <<
i;
526 ss2.str(
std::string()); ss2 <<
"nclusters (on track, layer" <<
i <<
")";
536 ss2.str(
std::string()); ss2 <<
"Clusters +Z Disk" <<
i <<
" (on track)";
544 ss2.str(
std::string()); ss2 <<
"Clusters -Z Disk" <<
i <<
" (on track)";
558 ss2.str(
std::string()); ss2 <<
"Number of Clusters (on track, layer" <<
i <<
")";
565 ss2.str(
std::string()); ss2 <<
"Number of Clusters (on track, diskp" <<
i <<
")";
570 ss2.str(
std::string()); ss2 <<
"nclusters (on track, diskp" << i <<
")";
579 ss2.str(
std::string()); ss2 <<
"Number of Clusters (on track, diskm" <<
i <<
")";
584 ss2.str(
std::string()); ss2 <<
"nclusters (on track, diskm" << i <<
")";
609 ss2.str(
std::string()); ss2 <<
"Clusters Layer" <<
i <<
" (off track)";
618 ss2.str(
std::string()); ss2 <<
"Clusters +Z Disk" <<
i <<
" (off track)";
626 ss2.str(
std::string()); ss2 <<
"Clusters -Z Disk" <<
i <<
" (off track)";
640 ss2.str(
std::string()); ss2 <<
"Number of Clusters (off track, layer" <<
i <<
")";
647 ss2.str(
std::string()); ss2 <<
"Number of Clusters (off track, diskp" <<
i <<
")";
654 ss2.str(
std::string()); ss2 <<
"Number of Clusters (off track, diskm" <<
i <<
")";
675 meHitProbability = iBooker.
book1D(
"FractionLowProb",
"Fraction of hits with low probability;FractionLowProb;#HitsOnTrack",100,0.,1.);
681 for (
int s=0;
s<3;
s++) {
682 sprintf(hisID,
"residual_x_subdet_%i",
s);
685 sprintf(hisID,
"residual_y_subdet_%i",
s);
728 if( vertices.failedToGet() )
return;
729 if( !vertices.isValid() )
return;
734 double bestNdof = 0.0;
735 double maxSumPt = 0.0;
737 for(reco::VertexCollection::const_iterator iVertex = vertices->begin();
738 iVertex != vertices->end(); ++iVertex ) {
739 if( iVertex->ndof() > bestNdof ) {
740 bestNdof = iVertex->
ndof();
741 vtxN =
math::XYZPoint( iVertex->x(), iVertex->y(), iVertex->z() );
743 if( iVertex->p4().pt() > maxSumPt ) {
744 maxSumPt = iVertex->p4().pt();
745 vtxP =
math::XYZPoint( iVertex->x(), iVertex->y(), iVertex->z() );
751 if( maxSumPt < 1.0 ) vtxP = vtxN;
778 if( !TracksForRes.
isValid() )
return;
785 cout <<
"Unable to find TrackerDigiGeometry. Return\n";
793 for( reco::TrackCollection::const_iterator iTrack = TracksForRes->begin();
794 iTrack != TracksForRes->end(); ++iTrack ) {
801 double pt = iTrack->pt();
802 if( pt < 0.75 )
continue;
803 if(
abs( iTrack->dxy(vtxP) ) > 5*iTrack->dxyError() )
continue;
805 double charge = iTrack->charge();
812 if( iTrack->extra().isNonnull() &&iTrack->extra().isAvailable() ){
828 vector<TransientTrackingRecHit::RecHitPointer> GoodPixBarrelHits;
831 irecHit != iTrack->recHitsEnd(); ++irecHit){
833 if( (*irecHit)->isValid() ){
834 DetId detId = (*irecHit)->geographicalId();
836 if( detId.
det() != 1 ){
838 cout <<
"rec hit ID = " << detId.
det() <<
" not in tracker!?!?\n";
850 double gX = trecHit->globalPosition().x();
851 double gY = trecHit->globalPosition().y();
852 double gZ = trecHit->globalPosition().z();
865 GoodPixBarrelHits.push_back((trecHit));
874 GoodPixBarrelHits.push_back((trecHit));
883 GoodPixBarrelHits.push_back((trecHit));
894 if( n1+n2+n3 == 3 && n1*n2*n3 > 0) {
895 for(
unsigned int i = 0;
i < GoodPixBarrelHits.size();
i++){
897 if( GoodPixBarrelHits[
i]->isValid() ){
898 DetId detId = GoodPixBarrelHits[
i]->geographicalId().
rawId();
902 double dca2 = 0.0, dz2=0.0;
904 if(charge<0.) ptsig = -
pt;
915 triplets(x2,y2,z2,x1,y1,z1,x3,y3,z3,ptsig,dca2,dz2, kap);
923 triplets(x1,y1,z1,x2,y2,z2,x3,y3,z3,ptsig,dca2,dz2, kap);
932 triplets(x1,y1,z1,x3,y3,z3,x2,y2,z2,ptsig,dca2,dz2, kap);
939 std::map<uint32_t, SiPixelTrackResidualModule*>::iterator pxd =
theSiPixelStructure.find(detId);
967 auto const & clustColl = *(clusterColl.
product());
975 std::set<SiPixelCluster> clusterSet;
977 int tracks=0, pixeltracks=0, bpixtracks=0, fpixtracks=0;
978 int trackclusters=0, barreltrackclusters=0, endcaptrackclusters=0;
979 int otherclusters=0, barrelotherclusters=0, endcapotherclusters=0;
988 std::cout <<
"Trajectories for Res from " << labels.
module << std::endl;
991 if (trajCollectionHandle.
isValid()) {
993 auto const & trajColl = *(trajCollectionHandle.
product());
997 auto const & ttac = *(match.
product());
1000 std::cout <<
"Trajectories\t : " << trajColl.size() << std::endl;
1002 std::cout <<
"Map entries \t : " << ttac.size() << std::endl;
1013 bool isBpixtrack =
false, isFpixtrack =
false, crossesPixVol=
false;
1017 double d0 = (*trackref).d0(),
dz = (*trackref).dz();
1019 if(
abs(d0)<15 &&
abs(
dz)<50) crossesPixVol =
true;
1021 const std::vector<TrajectoryMeasurement>& tmeasColl =traj_iterator->measurements();
1022 std::vector<TrajectoryMeasurement>::const_iterator tmeasIt;
1024 for(tmeasIt = tmeasColl.begin();tmeasIt!=tmeasColl.end();tmeasIt++){
1025 if(! tmeasIt->updatedState().isValid())
continue;
1027 if(! testhit->isValid() || testhit->geographicalId().det() !=
DetId::Tracker)
continue;
1028 uint testSubDetID = (testhit->geographicalId().subdetId());
1040 if(isBpixtrack || isFpixtrack){
1045 const std::vector<TrajectoryMeasurement>& tmeasColl = traj_iterator->measurements();
1046 for(std::vector<TrajectoryMeasurement>::const_iterator tmeasIt = tmeasColl.begin(); tmeasIt!=tmeasColl.end(); tmeasIt++){
1047 if(! tmeasIt->updatedState().isValid())
continue;
1050 if (!tsos.
isValid())
continue;
1053 if(! hit->isValid() || hit->geographicalId().det() !=
DetId::Tracker ) {
1058 const DetId & hit_detId = hit->geographicalId();
1062 if(IntSubDetID == 0 )
continue;
1067 if ((persistentHit !=
nullptr) && (
typeid(*persistentHit) ==
typeid(
SiPixelRecHit))) {
1071 float hit_prob = -1.;
1091 if(theGeomDet ==
nullptr) {
1099 std::map<uint32_t, SiPixelTrackResidualModule*>::iterator pxd =
theSiPixelStructure.find((*hit).geographicalId().rawId());
1106 float clust_alpha = atan2(localDir.
z(), localDir.
x());
1107 float clust_beta = atan2(localDir.
z(), localDir.
y());
1108 double corrCharge = clust->charge() *
sqrt( 1.0 / ( 1.0/
pow(
tan(clust_alpha), 2 ) +
1109 1.0/
pow(
tan(clust_beta ), 2 ) +
1113 if (pxd!=
theSiPixelStructure.end()) (*pxd).second->fill((*clust),
true, corrCharge,
reducedSet,
modOn,
ladOn,
layOn,
phiOn,
bladeOn,
diskOn,
ringOn);
1122 clusterSet.insert(*clust);
1126 float xcenter = clust->x();
1127 float ycenter = clust->y();
1137 barreltrackclusters++;
1139 DetId detId = (*hit).geographicalId();
1149 float phi = clustgp.
phi();
1150 float z = clustgp.
z();
1158 int moduleSigned=module;
1162 if(shell==1 || shell==2) { moduleSigned = -module; }
1164 if(shell==1 || shell==3) { ladderSigned = -
ladder; }
1168 if (DBlayer ==
i + 1) {
1181 endcaptrackclusters++;
1189 float x = clustgp.
x();
1190 float y = clustgp.
y();
1191 float z = clustgp.
z();
1192 float phi = clustgp.
phi();
1194 float xclust = clust->x();
1195 float yclust = clust->y();
1202 if (DBdisk ==
i + 1) {
1215 if (DBdisk ==
i + 1) {
1248 if(
debug_)
std::cout <<
"clusters not on track: (size " << clustColl.size() <<
") ";
1250 for(TrackerGeometry::DetContainer::const_iterator it = TG->
dets().begin(); it != TG->
dets().end(); it++){
1252 DetId detId = (*it)->geographicalId();
1253 if(detId>=302055684 && detId<=352477708){
1254 int nofclOnTrack = 0, nofclOffTrack=0;
1257 if( isearch != clustColl.
end() ) {
1259 for(di=isearch->
begin(); di!=isearch->
end(); di++){
1260 unsigned int temp = clusterSet.size();
1261 clusterSet.insert(*di);
1263 if(clusterSet.size()>
temp) {
1271 std::map<uint32_t, SiPixelTrackResidualModule*>::iterator pxd =
theSiPixelStructure.find((*it)->geographicalId().rawId());
1273 if (pxd!=
theSiPixelStructure.end()) (*pxd).second->fill((*di),
false, -1.,
reducedSet,
modOn,
ladOn,
layOn,
phiOn,
bladeOn,
diskOn,
ringOn);
1288 if(theGeomDet ==
nullptr) {
1295 float xcenter = di->x();
1296 float ycenter = di->y();
1305 if(
DetId(detId).subdetId() == 1) {
1310 barrelotherclusters++;
1312 float phi = clustgp.
phi();
1317 if (DBlayer ==
i + 1) {
1332 endcapotherclusters++;
1334 float x = clustgp.
x();
1335 float y = clustgp.
y();
1343 if (DBdisk ==
i + 1) {
1355 if (DBdisk ==
i + 1) {
1375 if(theGeomDet ==
nullptr) {
1381 float xcenter = di->x();
1382 float ycenter = di->y();
1393 std::map<uint32_t, SiPixelTrackResidualModule*>::iterator pxd =
theSiPixelStructure.find((*it)->geographicalId().rawId());
1398 if(
DetId(detId).subdetId() == 1){
1404 if (DBlayer ==
i + 1) {
1411 if(
DetId(detId).subdetId() == 2) {
1419 if (DBdisk ==
i + 1) {
1428 if (DBdisk ==
i + 1) {
1454 if( ipxsearch != diginp.
end() ) {
1458 for (pxdi = ipxsearch->
begin(); pxdi != ipxsearch->
end(); pxdi++) {
1467 if (DBshell==1 || DBshell==2) { DBmodule = -DBmodule; }
1468 if (DBshell==1 || DBshell==3) { DBladder = -DBladder; }
1470 int col = pxdi->column();
1471 int row = pxdi->row();
1473 float modsign = (
float)DBmodule/(
abs((
float)DBmodule));
1474 float ladsign = (
float)DBladder/(
abs((
float)DBladder));
1475 float rocx = ((
float)col/(52.*8.))*modsign + ((
float)DBmodule-(modsign)*0.5);
1476 float rocy = ((
float)row/(80.*2.))*ladsign + ((
float)DBladder-(ladsign)*0.5);
1480 if ( (DBladder%2==0) && (!isHalfModule) ) { flip =
true; }
1481 if ((flip) && (DBladder>0)) {
1482 if ( ( ((
float)DBladder-(ladsign)*0.5)<=rocy) && (rocy<(
float)DBladder)) { rocy = rocy + ladsign*0.5; }
1483 else if ( ( ((
float)DBladder)<=rocy) && (rocy<((
float)DBladder+(ladsign)*0.5)) ) { rocy = rocy - ladsign*0.5; }
1487 if (modsign<0) { rocx = rocx -0.0001; }
1488 if (ladsign<0) { rocy = rocy -0.0001; }
else { rocy = rocy +0.0001; }
1489 if (
abs(DBladder)==1) { rocy = rocy + ladsign*0.5; }
1491 if (DBlayer==1) { meinput.at(0)->Fill(rocx,rocy); }
1492 if (DBlayer==2) { meinput.at(1)->Fill(rocx,rocy); }
1493 if (DBlayer==3) { meinput.at(2)->Fill(rocx,rocy); }
1501 double ptsig,
double & dca2,
double & dz2,
double kap) {
1504 using namespace std;
1511 double r1 =
sqrt( x1*x1 + y1*y1 );
1512 double r3 =
sqrt( x3*x3 + y3*y3 );
1514 if( r3-r1 < 2.0 )
cout <<
"warn r1 = " << r1 <<
", r3 = " << r3 << endl;
1519 double L=
sqrt((x3-x1)*(x3-x1)+(y3-y1)*(y3-y1));
1522 double lam =
sqrt(rho*rho - L*L/4);
1527 if( kap > 0 ) lam = -lam;
1532 double x0 = 0.5*( x1 + x3 ) + lam/L * ( -y1 + y3 );
1533 double y0 = 0.5*( y1 + y3 ) + lam/L * ( x1 - x3 );
1537 double num = ( y3 - y0 ) * ( x1 - x0 ) - ( x3 - x0 ) * ( y1 - y0 );
1538 double den = ( x1 - x0 ) * ( x3 - x0 ) + ( y1 - y0 ) * ( y3 - y0 );
1539 double tandip = kap * ( z3 - z1 ) / atan( num / den );
1544 double dphi = atan( ( ( x1 - x0 ) * y0 - ( y1 - y0 ) * x0 )
1545 / ( ( x1 - x0 ) * x0 + ( y1 - y0 ) * y0 ) );
1548 double uz0 = z1 + tandip * dphi *
rho;
1556 if(kap>0) dca2=rho-
sqrt((x0-x2)*(x0-x2)+(y0-y2)*(y0-y2));
1557 else dca2=rho+
sqrt((-x0+x2)*(-x0+x2)+(-y0+y2)*(-y0+y2));
1568 xx = x2+(dca2*((x0-
x2))/
sqrt((x0-x2)*(x0-x2)+(y0-y2)*(y0-y2)));
1569 yy = y2+(dca2*((y0-y2))/
sqrt((x0-x2)*(x0-x2)+(y0-y2)*(y0-y2)));
1572 xx = x2-(dca2*((x0-
x2))/
sqrt((x0-x2)*(x0-x2)+(y0-y2)*(y0-y2)));
1573 yy = y2-(dca2*((y0-y2))/
sqrt((x0-x2)*(x0-x2)+(y0-y2)*(y0-y2)));
1578 double dphi2 = atan( ( ( xx - x0 ) * y0 - ( yy - y0 ) * x0 )
1579 / ( ( xx - x0 ) * x0 + ( yy - y0 ) * y0 ) );
1582 double uz2= uz0 - dphi2*tandip*
rho;
1597 int pxfpanel = tTopo->
pxfPanel((*hit).geographicalId());
1598 int pxfmodule = tTopo->
pxfModule((*hit).geographicalId());
1599 int pxfdisk = tTopo->
pxfDisk((*hit).geographicalId());
1600 int pxfblade_off = tTopo->
pxfBlade((*hit).geographicalId());
1610 if (z<0.) { pxfdisk = -1.*pxfdisk; }
1612 if (pxfblade_off<=6 && pxfblade_off>=1) { pxfblade = 7-pxfblade_off; }
1613 else if (pxfblade_off<=18 && pxfblade_off>=7) { pxfblade = 6-pxfblade_off; }
1614 else if (pxfblade_off<=24 && pxfblade_off>=19) { pxfblade = 31-pxfblade_off; }
1616 int clu_sdpx = ((pxfdisk>0) ? 1 : -1) * (2 * (
abs(pxfdisk) - 1) + pxfpanel);
1617 int binselx = (pxfpanel==1&&(pxfmodule==1||pxfmodule==4)) ? (pxfmodule==1) : ((pxfpanel==1&& xclust<80.0)||(pxfpanel==2&&xclust>=80.0));
1618 int nperpan = 2 * pxfmodule + pxfpanel - 1 + binselx;
1619 int clu_roc_binx = ((pxfdisk>0) ? nperpan : 9 - nperpan) + (clu_sdpx + 4) * 8 - 2 * ((
abs(pxfdisk)==1) ? pxfdisk : 0);
1621 int clu_roc_biny = -99.;
1622 int nrocly = pxfmodule + pxfpanel;
1623 for (
int i=0;
i<nrocly;
i++) {
1624 int j = (pxfdisk<0) ?
i : nrocly - 1 -
i;
1625 if (yclust>=(j*52.0)&& yclust<((j+1)*52.0))
1626 clu_roc_biny = 6 - nrocly + 2 *
i + ((pxfblade>0) ? pxfblade-1 : pxfblade + 12)*12 + 1;
1628 if (pxfblade>0) { clu_roc_biny = clu_roc_biny+144; }
1641 int pxfpanel = pxfid.
panel();
1642 int pxfmodule = pxfid.
module();
1643 int pxfdisk = pxfid.
disk();
1644 int pxfblade_off = pxfid.
blade();
1646 if (z<0.) { pxfdisk = -1.*pxfdisk; }
1649 if (pxfblade_off<=6 && pxfblade_off>=1) { pxfblade = 7-pxfblade_off; }
1650 else if (pxfblade_off<=18 && pxfblade_off>=7) { pxfblade = 6-pxfblade_off; }
1651 else if (pxfblade_off<=24 && pxfblade_off>=19) { pxfblade = 31-pxfblade_off; }
1653 int clu_sdpx = ((pxfdisk>0) ? 1 : -1) * (2 * (
abs(pxfdisk) - 1) + pxfpanel);
1654 int binselx = (pxfpanel==1&&(pxfmodule==1||pxfmodule==4)) ? (pxfmodule==1) : ((pxfpanel==1&& xclust<80.0)||(pxfpanel==2&&xclust>=80.0));
1655 int nperpan = 2 * pxfmodule + pxfpanel - 1 + binselx;
1656 int clu_roc_binx = ((pxfdisk>0) ? nperpan : 9 - nperpan) + (clu_sdpx + 4) * 8 - 2 * ((
abs(pxfdisk)==1) ? pxfdisk : 0);
1658 int clu_roc_biny = -99.;
1659 int nrocly = pxfmodule + pxfpanel;
1660 for (
int i=0;
i<nrocly;
i++) {
1661 int j = (pxfdisk<0) ?
i : nrocly - 1 -
i;
1662 if (yclust>=(j*52.0)&& yclust<((j+1)*52.0))
1663 clu_roc_biny = 6 - nrocly + 2 *
i + ((pxfblade>0) ? pxfblade-1 : pxfblade + 12)*12 + 1;
1665 if (pxfblade>0) { clu_roc_biny = clu_roc_biny+144; }
MonitorElement * meClSizeYNotOnTrack_fpix
MonitorElement * meClSizeNotOnTrack_fpix
MonitorElement * meClSizeXNotOnTrack_all
MonitorElement * meSubdetResidualX[3]
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
MonitorElement * meClSizeXOnTrack_bpix
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::TrackCollection > generalTracksToken_
double z0() const
z coordinate
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meClSizeOnTrack_all
bool hasFilledProb() const
MonitorElement * meClSizeOnTrack_bpix
MonitorElement * meClChargeOnTrack_all
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
unsigned int panel() const
panel id
void setBinContent(int binx, double content)
set content of bin (1-D)
const_iterator end(bool update=false) const
std::vector< MonitorElement * > meClChargeOnTrack_layers
MonitorElement * meNClustersNotOnTrack_all
bool isNonnull() const
Checks for non-null.
float clusterProbability(unsigned int flags=0) const
iterator find(det_id_type id)
std::vector< MonitorElement * > meClSizeYNotOnTrack_diskps
edm::EDGetTokenT< std::vector< Trajectory > > tracksrcToken_
MonitorElement * meNofTracks_
const LocalTrajectoryParameters & localParameters() const
int moduleName() const
module id (index in z)
friend struct const_iterator
MonitorElement * meClSizeYOnTrack_fpix
std::string topFolderName_
MonitorElement * meRocBladevsDiskEndcapOnTrk
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * meClChargeNotOnTrack_fpix
std::vector< MonitorElement * > meClSizeXNotOnTrack_diskms
#define DEFINE_FWK_MODULE(type)
unsigned int pxfDisk(const DetId &id) const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::vector< MonitorElement * > meClSizeXOnTrack_layers
std::vector< MonitorElement * > meNClustersNotOnTrack_diskps
Geom::Phi< T > phi() const
constexpr uint32_t rawId() const
get the raw id
reco::TransientTrack build(const reco::Track *p) const
MonitorElement * meHitProbability
std::vector< MonitorElement * > meClSizeYOnTrack_diskms
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::vector< MonitorElement * > meClSizeNotOnTrack_diskms
std::vector< MonitorElement * > meClPosLayersOnTrack
MonitorElement * meClSizeYNotOnTrack_bpix
std::vector< MonitorElement * > meClPosDisksmzOnTrack
MonitorElement * meClChargeNotOnTrack_all
std::vector< MonitorElement * > meClSizeOnTrack_layers
MonitorElement * meNofClustersOnTrack_
std::vector< MonitorElement * > meClPosDiskspzOnTrack
data_type const * const_iterator
std::vector< MonitorElement * > meClChargeNotOnTrack_diskps
key_type key() const
Accessor for product key.
MonitorElement * meSubdetResidualY[3]
std::vector< MonitorElement * > meClChargeOnTrack_diskms
std::vector< MonitorElement * > meNofClustersvsPhiOnTrack_layers
MonitorElement * meClSizeYOnTrack_bpix
std::vector< MonitorElement * > meClPosDiskspzNotOnTrack
const Plane & surface() const
The nominal surface of the GeomDet.
SiPixelTrackResidualSource(const edm::ParameterSet &)
std::vector< MonitorElement * > meClPosLayersNotOnTrack
MonitorElement * meNClustersOnTrack_all
std::vector< MonitorElement * > meResidualXSummedLay
MonitorElement * meNofTracksInPixVol_
TrajectoryStateOnSurface innermostMeasurementState() const
unsigned int blade() const
blade id
MonitorElement * meClSizeYOnTrack_all
std::vector< MonitorElement * > meNofClustersvsPhiOnTrack_diskps
std::vector< MonitorElement * > meClSizeXNotOnTrack_layers
void analyze(const edm::Event &, const edm::EventSetup &) override
~SiPixelTrackResidualSource() override
std::vector< MonitorElement * > meNofClustersvsPhiOnTrack_diskms
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
void getepixrococcupancyontrk(const TrackerTopology *const tTopo, TransientTrackingRecHit::ConstRecHitPointer hit, float xclust, float yclust, float z, MonitorElement *meinput)
bool isHalfModule() const
full or half module
MonitorElement * meClSizeNotOnTrack_bpix
std::vector< MonitorElement * > meClChargeOnTrack_diskps
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
MonitorElement * meClChargeOnTrack_fpix
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::vector< MonitorElement * > meResidualYSummedLay
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
Set folder name for a module or plaquette.
std::vector< MonitorElement * > meClSizeYNotOnTrack_diskms
std::vector< MonitorElement * > meZeroRocLadvsModOnTrackBarrel
void triplets(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double ptsig, double &dc, double &dz, double kap)
MonitorElement * meClSizeXOnTrack_all
const DetContainer & detsPXB() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
MonitorElement * book1D(Args &&...args)
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
MonitorElement * meNClustersOnTrack_fpix
unsigned int module() const
det id
LocalVector momentum() const
Momentum vector in the local frame.
std::vector< MonitorElement * > meClPosDisksmzNotOnTrack
std::vector< MonitorElement * > meZeroRocLadvsModOffTrackBarrel
edm::EDGetTokenT< std::vector< reco::Track > > trackToken_
std::vector< MonitorElement * > meClSizeYOnTrack_layers
std::vector< MonitorElement * > meNClustersOnTrack_diskps
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > clustersrcToken_
iterator end()
Return the off-the-end iterator.
unsigned int disk() const
disk id
void getepixrococcupancyofftrk(DetId detId, const TrackerTopology *const tTopo, float xclust, float yclust, float z, MonitorElement *meinput)
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
MonitorElement * meNClustersNotOnTrack_fpix
std::vector< MonitorElement * > meClSizeNotOnTrack_diskps
unsigned int pxfModule(const DetId &id) const
std::vector< MonitorElement * > meClSizeXOnTrack_diskps
unsigned int pxbLayer(const DetId &id) const
std::vector< MonitorElement * > meClSizeYNotOnTrack_layers
MonitorElement * meNClustersOnTrack_bpix
std::vector< MonitorElement * > meClSizeYOnTrack_diskps
FreeTrajectoryState initialFreeState() const
virtual TrackingRecHit const * hit() const
int ladderName() const
ladder id (index in phi)
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > digisrcToken_
std::vector< MonitorElement * > meClPosLayersLadVsModOnTrack
void setCurrentFolder(const std::string &fullpath)
std::map< uint32_t, SiPixelTrackResidualModule * > theSiPixelStructure
T const * product() const
MonitorElement * book2D(Args &&...args)
MonitorElement * meClSizeXNotOnTrack_bpix
void getrococcupancy(DetId detId, const edm::DetSetVector< PixelDigi > &diginp, const TrackerTopology *const tTopo, std::vector< MonitorElement * > meinput)
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< MonitorElement * > meClChargeNotOnTrack_diskms
std::vector< MonitorElement * > meClSizeOnTrack_diskps
MonitorElement * meClSizeXNotOnTrack_fpix
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
int layerName() const
layer id
edm::EDGetTokenT< reco::VertexCollection > offlinePrimaryVerticesToken_
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
double transverseCurvature() const
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
std::vector< MonitorElement * > meNClustersOnTrack_diskms
MonitorElement * meClChargeNotOnTrack_bpix
double getBinContent(int binx) const
get content of bin (1-D)
Pixel cluster – collection of neighboring pixels above threshold.
MonitorElement * meClSizeXOnTrack_fpix
const DetContainer & detsPXF() const
const TrackerGeomDet * idToDet(DetId) const override
double y0() const
y coordinate
MonitorElement * meClSizeNotOnTrack_all
edm::InputTag clustersrc_
std::vector< MonitorElement * > meNClustersNotOnTrack_diskms
std::vector< MonitorElement * > meClSizeXNotOnTrack_diskps
int diskName() const
disk id
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
iterator begin()
Return an iterator to the first DetSet.
std::vector< MonitorElement * > meClChargeNotOnTrack_layers
MonitorElement * meNClustersNotOnTrack_bpix
void dqmBeginRun(const edm::Run &r, edm::EventSetup const &iSetup) override
std::vector< MonitorElement * > meNClustersOnTrack_layers
std::vector< MonitorElement * > meClSizeNotOnTrack_layers
collection_type::const_iterator const_iterator
MonitorElement * meClChargeOnTrack_bpix
collection_type::const_iterator const_iterator
MonitorElement * meClSizeOnTrack_fpix
std::vector< MonitorElement * > meNClustersNotOnTrack_layers
std::vector< MonitorElement * > meClSizeOnTrack_diskms
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * meNofClustersNotOnTrack_
MonitorElement * meClSizeYNotOnTrack_all
T const * product() const
edm::EDGetTokenT< TrajTrackAssociationCollection > trackAssociationToken_
int layerName() const
layer id
unsigned int pxfPanel(const DetId &id) const
unsigned int pxfBlade(const DetId &id) const
Power< A, B >::type pow(const A &a, const B &b)
std::vector< MonitorElement * > meClSizeXOnTrack_diskms
const_iterator begin(bool update=false) const
MonitorElement * meRocBladevsDiskEndcapOffTrk
constexpr Detector det() const
get the detector field from this detid
double x0() const
x coordinate