Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Residuals plots and fix monitoring plots for Pixel ClusterRepairs #26430

Merged
merged 1 commit into from Apr 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -26,7 +26,7 @@ class TrackerValidationVariables
AVHitStruct() : resX(-999.), resY(-999.), resErrX(-999.), resErrY(-999.), resXprime(-999.), resXatTrkY(-999.), resXprimeErr(-999.),
resYprime(-999.), resYprimeErr(-999.), phi(-999.), eta(-999.),
inside(false), localX(-999.), localY(-999.), localXnorm(-999.), localYnorm(-999.), localAlpha(-999.), localBeta(-999.),
rawDetId(0) {}
rawDetId(0), isOnEdgePixel(false), isOtherBadPixel(false) {}
float resX;
float resY;
float resErrX;
Expand All @@ -46,6 +46,8 @@ class TrackerValidationVariables
float localAlpha;
float localBeta;
uint32_t rawDetId;
bool isOnEdgePixel;
bool isOtherBadPixel;
};

struct AVTrackStruct
Expand All @@ -68,7 +70,7 @@ class TrackerValidationVariables
float dz;
int charge;
int numberOfValidHits;
int numberOfLostHits;
int numberOfLostHits;
std::vector<AVHitStruct> hits;
};

Expand Down
13 changes: 13 additions & 0 deletions Alignment/OfflineValidation/src/TrackerValidationVariables.cc
Expand Up @@ -29,6 +29,7 @@

#include "DataFormats/Math/interface/deltaPhi.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h"
#include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
#include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
#include "DataFormats/SiStripDetId/interface/SiStripDetId.h"
Expand Down Expand Up @@ -80,6 +81,12 @@ void TrackerValidationVariables::fillHitQuantities(reco::Track const & track, st

if(IntSubDetID == 0) continue;

if (IntSubDetID == PixelSubdetector::PixelBarrel || IntSubDetID == PixelSubdetector::PixelEndcap){
const SiPixelRecHit* prechit = dynamic_cast<const SiPixelRecHit*>(hit);//to be used to get the associated cluster and the cluster probability
if(prechit->isOnEdge()) hitStruct.isOnEdgePixel=true;
if(prechit->hasBadPixels()) hitStruct.isOtherBadPixel=true;
}

auto lPTrk = trajParams[h].position(); // update state
auto lVTrk = trajParams[h].direction();

Expand Down Expand Up @@ -214,6 +221,12 @@ TrackerValidationVariables::fillHitQuantities(const Trajectory* trajectory, std:
unsigned int IntSubDetID = (hit_detId.subdetId());

if(IntSubDetID == 0) continue;

if (IntSubDetID == PixelSubdetector::PixelBarrel || IntSubDetID == PixelSubdetector::PixelEndcap){
const SiPixelRecHit* prechit = dynamic_cast<const SiPixelRecHit*>(hit.get());//to be used to get the associated cluster and the cluster probability
if(prechit->isOnEdge()) hitStruct.isOnEdgePixel=true;
if(prechit->hasBadPixels()) hitStruct.isOtherBadPixel=true;
}

//first calculate residuals in cartesian coordinates in the local module coordinate system

Expand Down
2 changes: 2 additions & 0 deletions DQM/SiPixelPhase1Track/plugins/SiPixelPhase1RecHits.cc
Expand Up @@ -166,6 +166,8 @@ void SiPixelPhase1RecHits::analyze(const edm::Event& iEvent, const edm::EventSet
}

histo[NRECHITS].executePerEventHarvesting(&iEvent);
histo[NONEDGE].executePerEventHarvesting(&iEvent);
histo[NOTHERBAD].executePerEventHarvesting(&iEvent);
}

} //namespace
Expand Down
17 changes: 16 additions & 1 deletion DQM/SiPixelPhase1Track/plugins/SiPixelPhase1TrackResiduals.cc
Expand Up @@ -25,7 +25,11 @@ namespace {
class SiPixelPhase1TrackResiduals final : public SiPixelPhase1Base {
enum {
RESIDUAL_X,
RESIDUAL_Y
RESIDUAL_Y,
RESONEDGE_X,
RESONEDGE_Y,
RESOTHERBAD_X,
RESOTHERBAD_Y
};

public:
Expand Down Expand Up @@ -80,6 +84,17 @@ void SiPixelPhase1TrackResiduals::analyze(const edm::Event& iEvent, const edm::E

histo[RESIDUAL_X].fill(it.resXprime, id, &iEvent);
histo[RESIDUAL_Y].fill(it.resYprime, id, &iEvent);

if(it.isOnEdgePixel){
histo[RESONEDGE_X].fill(it.resXprime, id, &iEvent);
histo[RESONEDGE_Y].fill(it.resYprime, id, &iEvent);
}

if(it.isOtherBadPixel){
histo[RESOTHERBAD_X].fill(it.resXprime, id, &iEvent);
histo[RESOTHERBAD_Y].fill(it.resYprime, id, &iEvent);
}

}
}

Expand Down
20 changes: 10 additions & 10 deletions DQM/SiPixelPhase1Track/python/SiPixelPhase1RecHits_cfi.py
Expand Up @@ -133,25 +133,25 @@
Specification().groupBy("PXBarrel/PXLayer/Event")
.reduce("COUNT")
.groupBy("PXBarrel/PXLayer/")
.save(nbins=100, xmin=0, xmax=1000),
.save(nbins=100, xmin=0, xmax=500),
Specification().groupBy("PXBarrel/Event")
.reduce("COUNT")
.groupBy("PXBarrel")
.save(nbins=100, xmin=0, xmax=1000),
.save(nbins=100, xmin=0, xmax=500),

Specification().groupBy("PXForward/PXDisk/Event")
.reduce("COUNT")
.groupBy("PXForward/PXDisk/")
.save(nbins=100, xmin=0, xmax=1000),
.save(nbins=100, xmin=0, xmax=500),
Specification().groupBy("PXForward/PXDisk/Event")
.reduce("COUNT")
.groupBy("PXForward")
.save(nbins=100, xmin=0, xmax=1000),
.save(nbins=100, xmin=0, xmax=500),

Specification().groupBy("PXAll/Event")
.reduce("COUNT")
.groupBy("PXAll")
.save(nbins=100, xmin=0, xmax=1000)
.save(nbins=100, xmin=0, xmax=500)

)
)
Expand Down Expand Up @@ -181,25 +181,25 @@
Specification().groupBy("PXBarrel/PXLayer/Event")
.reduce("COUNT")
.groupBy("PXBarrel/PXLayer/")
.save(nbins=100, xmin=0, xmax=1000),
.save(nbins=100, xmin=0, xmax=500),
Specification().groupBy("PXBarrel/Event")
.reduce("COUNT")
.groupBy("PXBarrel")
.save(nbins=100, xmin=0, xmax=1000),
.save(nbins=100, xmin=0, xmax=500),

Specification().groupBy("PXForward/PXDisk/Event")
.reduce("COUNT")
.groupBy("PXForward/PXDisk/")
.save(nbins=100, xmin=0, xmax=1000),
.save(nbins=100, xmin=0, xmax=500),
Specification().groupBy("PXForward/PXDisk/Event")
.reduce("COUNT")
.groupBy("PXForward")
.save(nbins=100, xmin=0, xmax=1000),
.save(nbins=100, xmin=0, xmax=500),

Specification().groupBy("PXAll/Event")
.reduce("COUNT")
.groupBy("PXAll")
.save(nbins=100, xmin=0, xmax=1000)
.save(nbins=100, xmin=0, xmax=500)
)
)

Expand Down
48 changes: 47 additions & 1 deletion DQM/SiPixelPhase1Track/python/SiPixelPhase1TrackResiduals_cfi.py
Expand Up @@ -35,9 +35,55 @@
xlabel = "(y_rec - y_pred) [cm]",
)

SiPixelPhase1TrackResidualsResOnEdgeX = DefaultHistoTrack.clone(
name = "residual_OnEdge_x",
title = "Track Residuals X (OnEdge Clusters)",
range_min = -0.1, range_max = 0.1, range_nbins = 100,
xlabel = "(x_rec - x_pred) [cm]",
dimensions = 1,
specs = VPSet(
Specification().groupBy("PXBarrel/PXLayer").saveAll(),
Specification().groupBy("PXForward/PXDisk").saveAll(),
Specification(PerLayer1D).groupBy("PXBarrel/Shell/PXLayer").save(),
Specification(PerLayer1D).groupBy("PXForward/HalfCylinder/PXRing/PXDisk").save()
)
)

SiPixelPhase1TrackResidualsResOnEdgeY = SiPixelPhase1TrackResidualsResOnEdgeX.clone(
name = "residual_OnEdge_y",
title = "Track Residuals Y (OnEdge Clusters)",
xlabel = "(y_rec - y_pred) [cm]",
)


SiPixelPhase1TrackResidualsResOtherBadX = DefaultHistoTrack.clone(
name = "residual_OtherBad_x",
title = "Track Residuals X (OtherBad Clusters)",
range_min = -0.1, range_max = 0.1, range_nbins = 100,
xlabel = "(x_rec - x_pred) [cm]",
dimensions = 1,
specs = VPSet(
Specification().groupBy("PXBarrel/PXLayer").saveAll(),
Specification().groupBy("PXForward/PXDisk").saveAll(),
Specification(PerLayer1D).groupBy("PXBarrel/Shell/PXLayer").save(),
Specification(PerLayer1D).groupBy("PXForward/HalfCylinder/PXRing/PXDisk").save()
)
)

SiPixelPhase1TrackResidualsResOtherBadY = SiPixelPhase1TrackResidualsResOtherBadX.clone(
name = "residual_OtherBad_y",
title = "Track Residuals Y (OtherBad Clusters)",
xlabel = "(y_rec - y_pred) [cm]",
)


SiPixelPhase1TrackResidualsConf = cms.VPSet(
SiPixelPhase1TrackResidualsResidualsX,
SiPixelPhase1TrackResidualsResidualsY
SiPixelPhase1TrackResidualsResidualsY,
SiPixelPhase1TrackResidualsResOnEdgeX,
SiPixelPhase1TrackResidualsResOnEdgeY,
SiPixelPhase1TrackResidualsResOtherBadX,
SiPixelPhase1TrackResidualsResOtherBadY
)

from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
Expand Down