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

DQM: SiPixelPhase1- Added Big Pixel Charge Plots #22324

Merged
merged 5 commits into from
Mar 30, 2018
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions DQM/SiPixelPhase1Clusters/python/SiPixelPhase1Clusters_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,35 @@
)
)

SiPixelPhase1ClustersBigPixelCharge = DefaultHistoDigiCluster.clone(
name = "bigpixelcharge",
title = "Big Pixel Charge",
range_min = 0, range_max = 80e3, range_nbins = 100,
xlabel = "Charge (electrons)",

specs = VPSet(
Specification().groupBy("PXBarrel").save(),
Specification().groupBy("PXForward").save(),
Specification().groupBy("PXBarrel/PXLayer").save(),
Specification().groupBy("PXForward/PXDisk").save()
)
)

SiPixelPhase1ClustersNotBigPixelCharge = DefaultHistoDigiCluster.clone(
name = "notbigpixelcharge",
title = "Not Big Pixel Charge",
range_min = 0, range_max = 80e3, range_nbins = 100,
xlabel = "Charge (electrons)",
enabled=False,

specs = VPSet(
Specification().groupBy("PXBarrel").save(),
Specification().groupBy("PXForward").save(),
Specification().groupBy("PXBarrel/PXLayer").save(),
Specification().groupBy("PXForward/PXDisk").save()
)
)

SiPixelPhase1ClustersSize = DefaultHistoDigiCluster.clone(
name = "size",
title = "Total Cluster Size",
Expand Down Expand Up @@ -238,6 +267,8 @@

SiPixelPhase1ClustersConf = cms.VPSet(
SiPixelPhase1ClustersCharge,
SiPixelPhase1ClustersBigPixelCharge,
SiPixelPhase1ClustersNotBigPixelCharge,
SiPixelPhase1ClustersSize,
SiPixelPhase1ClustersSizeX,
SiPixelPhase1ClustersSizeY,
Expand Down
22 changes: 22 additions & 0 deletions DQM/SiPixelPhase1Clusters/src/SiPixelPhase1Clusters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ namespace {
class SiPixelPhase1Clusters final : public SiPixelPhase1Base {
enum {
CHARGE,
BIGPIXELCHARGE,
NOTBIGPIXELCHARGE,
SIZE,
SIZEX,
SIZEY,
Expand Down Expand Up @@ -89,6 +91,26 @@ void SiPixelPhase1Clusters::analyze(const edm::Event& iEvent, const edm::EventSe

for(SiPixelCluster const& cluster : *it) {
int row = cluster.x()-0.5, col = cluster.y()-0.5;
const std::vector<SiPixelCluster::Pixel> pixelsVec = cluster.pixels();

for (unsigned int i = 0; i < pixelsVec.size(); ++i) {

float pixx = pixelsVec[i].x; // index as float=iteger, row index
float pixy = pixelsVec[i].y; // same, col index

bool bigInX = topol.isItBigPixelInX(int(pixx));
bool bigInY = topol.isItBigPixelInY(int(pixy));
float pixel_charge = pixelsVec[i].adc;


if (bigInX==true || bigInY==true) {
histo[BIGPIXELCHARGE].fill(pixel_charge, id, &iEvent, col, row);
}

else {
histo[NOTBIGPIXELCHARGE].fill(pixel_charge, id, &iEvent, col, row);
}
}
histo[READOUT_CHARGE].fill(double(cluster.charge()), id, &iEvent, col, row);
histo[CHARGE].fill(double(cluster.charge()), id, &iEvent, col, row);
histo[SIZE ].fill(double(cluster.size() ), id, &iEvent, col, row);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,35 @@
)
)

SiPixelPhase1TrackClustersOnTrackBigPixelCharge = DefaultHistoTrack.clone(
name = "bigpixelcharge",
title = "Corrected Big Pixel Charge (OnTrack)",
range_min = 0, range_max = 80e3, range_nbins = 100,
xlabel = "Charge (electrons)",

specs = VPSet(
Specification().groupBy("PXBarrel").save(),
Specification().groupBy("PXForward").save(),
Specification().groupBy("PXBarrel/PXLayer").save(),
Specification().groupBy("PXForward/PXDisk").save()
)
)

SiPixelPhase1TrackClustersOnTrackNotBigPixelCharge = DefaultHistoTrack.clone(
name = "notbigpixelcharge",
title = "Corrected Not Big Pixel Charge (OnTrack)",
range_min = 0, range_max = 80e3, range_nbins = 100,
xlabel = "Charge (electrons)",
enabled=False,

specs = VPSet(
Specification().groupBy("PXBarrel").save(),
Specification().groupBy("PXForward").save(),
Specification().groupBy("PXBarrel/PXLayer").save(),
Specification().groupBy("PXForward/PXDisk").save()
)
)

SiPixelPhase1TrackClustersOnTrackSize = DefaultHistoTrack.clone(
name = "size",
title = "Total Cluster Size (OnTrack)",
Expand Down Expand Up @@ -432,6 +461,8 @@
# copy this in the enum
SiPixelPhase1TrackClustersConf = cms.VPSet(
SiPixelPhase1TrackClustersOnTrackCharge,
SiPixelPhase1TrackClustersOnTrackBigPixelCharge,
SiPixelPhase1TrackClustersOnTrackNotBigPixelCharge,
SiPixelPhase1TrackClustersOnTrackSize,
SiPixelPhase1TrackClustersOnTrackShape,
SiPixelPhase1TrackClustersOnTrackNClusters,
Expand Down Expand Up @@ -478,7 +509,3 @@
histograms = SiPixelPhase1TrackClustersConf,
geometry = SiPixelPhase1Geometry
)




24 changes: 21 additions & 3 deletions DQM/SiPixelPhase1TrackClusters/src/SiPixelPhase1TrackClusters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ namespace {
class SiPixelPhase1TrackClusters final : public SiPixelPhase1Base {
enum {
ON_TRACK_CHARGE,
ON_TRACK_BIGPIXELCHARGE,
ON_TRACK_NOTBIGPIXELCHARGE,
ON_TRACK_SIZE,
ON_TRACK_SHAPE,
ON_TRACK_NCLUSTERS,
Expand Down Expand Up @@ -178,14 +180,31 @@ void SiPixelPhase1TrackClusters::analyze(const edm::Event& iEvent, const edm::Ev
auto pixhit = dynamic_cast<const SiPixelRecHit*>(hit->hit());
if (!pixhit) continue;

// auto geomdetunit = dynamic_cast<const PixelGeomDetUnit*>(pixhit->detUnit());
// auto const & topol = geomdetunit->specificTopology();
auto geomdetunit = dynamic_cast<const PixelGeomDetUnit*>(pixhit->detUnit());
auto const & topol = geomdetunit->specificTopology();

// get the cluster
auto clustp = pixhit->cluster();
if (clustp.isNull()) continue;
auto const & cluster = *clustp;
const std::vector<SiPixelCluster::Pixel> pixelsVec = cluster.pixels();
for (unsigned int i = 0; i < pixelsVec.size(); ++i) {

float pixx = pixelsVec[i].x; // index as float=iteger, row index
float pixy = pixelsVec[i].y; // same, col index

bool bigInX = topol.isItBigPixelInX(int(pixx));
bool bigInY = topol.isItBigPixelInY(int(pixy));
float pixel_charge = pixelsVec[i].adc;

if (bigInX==true || bigInY==true) {
histo[ON_TRACK_BIGPIXELCHARGE].fill(pixel_charge, id, &iEvent);
}
else {
histo[ON_TRACK_NOTBIGPIXELCHARGE].fill(pixel_charge, id, &iEvent);

}
} // End loop over pixels
auto const & ltp = trajParams[h];

auto localDir = ltp.momentum() / ltp.momentum().mag();
Expand Down Expand Up @@ -275,4 +294,3 @@ void SiPixelPhase1TrackClusters::analyze(const edm::Event& iEvent, const edm::Ev

#include "FWCore/Framework/interface/MakerMacros.h"
DEFINE_FWK_MODULE(SiPixelPhase1TrackClusters);

35 changes: 33 additions & 2 deletions DQMOffline/Trigger/python/SiPixel_OfflineMonitoring_Cluster_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from DQMOffline.Trigger.SiPixel_OfflineMonitoring_HistogramManager_cfi import *

# order is important and it should follow ordering in .h !!!
# order is important and it should follow ordering in hltSiPixelPhase1ClustersConf VPSet
hltSiPixelPhase1ClustersCharge = hltDefaultHistoDigiCluster.clone(
name = "charge",
title = "Cluster Charge",
Expand All @@ -20,6 +20,36 @@
)
)

hltSiPixelPhase1ClustersBigPixelCharge = DefaultHistoDigiCluster.clone(
name = "bigpixelcharge",
title = "Big Pixel Charge",
range_min = 0, range_max = 80e3, range_nbins = 100,
xlabel = "Charge (electrons)",
enabled=False,

specs = VPSet(
Specification().groupBy("PXBarrel").save(),
Specification().groupBy("PXForward").save(),
Specification().groupBy("PXBarrel/PXLayer").save(),
Specification().groupBy("PXForward/PXDisk").save()
)
)

hltSiPixelPhase1ClustersNotBigPixelCharge = DefaultHistoDigiCluster.clone(
name = "notbigpixelcharge",
title = "Not Big Pixel Charge",
range_min = 0, range_max = 80e3, range_nbins = 100,
xlabel = "Charge (electrons)",
enabled=False,

specs = VPSet(
Specification().groupBy("PXBarrel").save(),
Specification().groupBy("PXForward").save(),
Specification().groupBy("PXBarrel/PXLayer").save(),
Specification().groupBy("PXForward/PXDisk").save()
)
)

hltSiPixelPhase1ClustersSize = hltDefaultHistoDigiCluster.clone(
enabled = cms.bool(False), # TO BE CHECKED IF NEEDED
name = "size",
Expand Down Expand Up @@ -239,6 +269,8 @@

hltSiPixelPhase1ClustersConf = cms.VPSet(
hltSiPixelPhase1ClustersCharge,
hltSiPixelPhase1ClustersBigPixelCharge,
hltSiPixelPhase1ClustersNotBigPixelCharge,
hltSiPixelPhase1ClustersSize,
hltSiPixelPhase1ClustersSizeX,
hltSiPixelPhase1ClustersSizeY,
Expand Down Expand Up @@ -275,4 +307,3 @@
histograms = hltSiPixelPhase1ClustersConf,
geometry = hltSiPixelPhase1Geometry
)

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from DQMOffline.Trigger.SiPixel_OfflineMonitoring_HistogramManager_cfi import *

# order is important and it should follow ordering in .h !!!
# order is important and it should follow ordering in hltSiPixelPhase1ClustersConf VPSet
hltSiPixelPhase1TrackClustersOnTrackCharge = hltDefaultHistoTrack.clone(
name = "charge",
title = "Corrected Cluster Charge (OnTrack)",
Expand All @@ -15,6 +15,36 @@
)
)

hltSiPixelPhase1TrackClustersOnTrackBigPixelCharge = DefaultHistoTrack.clone(
name = "bigpixelcharge",
title = "Corrected Big Pixel Charge (OnTrack)",
range_min = 0, range_max = 80e3, range_nbins = 100,
xlabel = "Charge (electrons)",
enabled=False,

specs = VPSet(
Specification().groupBy("PXBarrel").save(),
Specification().groupBy("PXForward").save(),
Specification().groupBy("PXBarrel/PXLayer").save(),
Specification().groupBy("PXForward/PXDisk").save()
)
)

hltSiPixelPhase1TrackClustersOnTrackNotBigPixelCharge = DefaultHistoTrack.clone(
name = "notbigpixelcharge",
title = "Corrected Not Big Pixel Charge (OnTrack)",
range_min = 0, range_max = 80e3, range_nbins = 100,
xlabel = "Charge (electrons)",
enabled=False,

specs = VPSet(
Specification().groupBy("PXBarrel").save(),
Specification().groupBy("PXForward").save(),
Specification().groupBy("PXBarrel/PXLayer").save(),
Specification().groupBy("PXForward/PXDisk").save()
)
)

hltSiPixelPhase1TrackClustersOnTrackSize = hltDefaultHistoTrack.clone(
name = "size",
title = "Total Cluster Size (OnTrack)",
Expand Down Expand Up @@ -275,6 +305,8 @@
### THE LIST DEFINED IN THE ENUM
### https://cmssdt.cern.ch/lxr/source/DQM/SiPixelPhase1TrackClusters/src/SiPixelPhase1TrackClusters.cc#0063
hltSiPixelPhase1TrackClustersOnTrackCharge,
hltSiPixelPhase1TrackClustersOnTrackBigPixelCharge,
hltSiPixelPhase1TrackClustersOnTrackNotBigPixelCharge,
hltSiPixelPhase1TrackClustersOnTrackSize,
hltSiPixelPhase1TrackClustersOnTrackShape,
hltSiPixelPhase1TrackClustersOnTrackNClusters,
Expand Down Expand Up @@ -321,4 +353,3 @@
histograms = hltSiPixelPhase1TrackClustersConf,
geometry = hltSiPixelPhase1Geometry
)