Skip to content

Commit

Permalink
Merge pull request #19740 from folguera/PixDQM_AddInactiveHits
Browse files Browse the repository at this point in the history
Adding inactive hit maps
  • Loading branch information
cmsbuild committed Jul 17, 2017
2 parents 17e2441 + 465d4a7 commit 3b78078
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
Expand Up @@ -17,6 +17,7 @@ class SiPixelPhase1TrackEfficiency : public SiPixelPhase1Base {
enum {
VALID,
MISSING,
INACTIVE,
EFFICIENCY,
VERTICES
};
Expand Down
Expand Up @@ -24,6 +24,27 @@
)
)

SiPixelPhase1TrackEfficiencyInactive = DefaultHistoTrack.clone(
name = "inactive",
title = "Inactive Hits",
xlabel = "inactive hits",
dimensions = 0,

specs = VPSet(
StandardSpecifications1D_Num,
StandardSpecification2DProfile_Num,

Specification().groupBy("PXBarrel/PXLayer/Event") #this will produce inclusive counts per Layer/Disk
.reduce("COUNT")
.groupBy("PXBarrel/PXLayer")
.save(nbins=100, xmin=0, xmax=100),
Specification().groupBy("PXForward/PXDisk/Event")
.reduce("COUNT")
.groupBy("PXForward/PXDisk/")
.save(nbins=100, xmin=0, xmax=100),
)
)

SiPixelPhase1TrackEfficiencyMissing = DefaultHistoTrack.clone(
name = "missing",
title = "Missing Hits",
Expand Down Expand Up @@ -79,6 +100,7 @@
SiPixelPhase1TrackEfficiencyConf = cms.VPSet(
SiPixelPhase1TrackEfficiencyValid,
SiPixelPhase1TrackEfficiencyMissing,
SiPixelPhase1TrackEfficiencyInactive,
SiPixelPhase1TrackEfficiencyEfficiency,
SiPixelPhase1TrackEfficiencyVertices
)
Expand Down
Expand Up @@ -98,7 +98,8 @@ void SiPixelPhase1TrackEfficiency::analyze(const edm::Event& iEvent, const edm::

bool isHitValid = hit->getType()==TrackingRecHit::valid;
bool isHitMissing = hit->getType()==TrackingRecHit::missing;

bool isHitInactive = hit->getType()==TrackingRecHit::inactive;

/*
const SiPixelRecHit* pixhit = dynamic_cast<const SiPixelRecHit*>(hit);
const PixelGeomDetUnit* geomdetunit = dynamic_cast<const PixelGeomDetUnit*> ( tracker->idToDet(id) );
Expand Down Expand Up @@ -126,10 +127,14 @@ void SiPixelPhase1TrackEfficiency::analyze(const edm::Event& iEvent, const edm::
histo[MISSING].fill(id, &iEvent);
histo[EFFICIENCY].fill(0, id, &iEvent);
}
if (isHitInactive) {
histo[INACTIVE].fill(id, &iEvent);
}
}
}
histo[VALID ].executePerEventHarvesting(&iEvent);
histo[MISSING].executePerEventHarvesting(&iEvent);
histo[VALID ].executePerEventHarvesting(&iEvent);
histo[MISSING ].executePerEventHarvesting(&iEvent);
histo[INACTIVE].executePerEventHarvesting(&iEvent);
}

DEFINE_FWK_MODULE(SiPixelPhase1TrackEfficiency);
Expand Down

0 comments on commit 3b78078

Please sign in to comment.